5 * Copyright (c) 2004, Andreas Tønnesen(andreto@olsr.org)
8 * Redistribution and use in source and binary forms, with or
9 * without modification, are permitted provided that the following
12 * * Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * * Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in
16 * the documentation and/or other materials provided with the
18 * * Neither the name of olsrd, olsr.org nor the names of its
19 * contributors may be used to endorse or promote products derived
20 * from this software without specific prior written permission.
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
32 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 *POSSIBILITY OF SUCH DAMAGE.
38 * Dynamic linked library example for UniK OLSRd
41 #ifndef _OLSRD_PLUGIN_TEST
42 #define _OLSRD_PLUGIN_TEST
44 #include "secure_messages.h"
49 #define KEYFILE "/etc/olsrd.d/olsrd_secure_key"
52 #define ONE_CHECKSUM 1
54 /* Algorithm definitions */
55 #define SHA1_INCLUDING_KEY 1
56 #define MD5_INCLUDING_KEY 2
59 #define SIGNATURE_SIZE 20
61 #define SIGNATURE_SIZE 16
69 extern char aes_key[16];
70 /* Seconds of slack allowed */
73 int secure_plugin_init(void);
75 void secure_plugin_exit(void);
77 int plugin_ipc_init(void);