2 * The olsr.org Optimized Link-State Routing daemon (olsrd)
4 * (c) by the OLSR project
6 * See our Git repository to find out who worked on this file
7 * and thus is a copyright holder on it.
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
15 * * Redistributions of source code must retain the above copyright
16 * notice, this list of conditions and the following disclaimer.
17 * * Redistributions in binary form must reproduce the above copyright
18 * notice, this list of conditions and the following disclaimer in
19 * the documentation and/or other materials provided with the
21 * * Neither the name of olsr.org, olsrd nor the names of its
22 * contributors may be used to endorse or promote products derived
23 * from this software without specific prior written permission.
25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
28 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
30 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
31 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
32 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
33 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
35 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 * POSSIBILITY OF SUCH DAMAGE.
38 * Visit http://www.olsr.org for more information.
40 * If you find this software useful feel free to make a donation
41 * to the project. For more information see the website or contact
42 * the copyright holders.
46 #ifndef _OLSR_FUNCTIONS
47 #define _OLSR_FUNCTIONS
49 #include "olsr_protocol.h"
50 #include "interfaces.h"
52 extern bool changes_topology;
53 extern bool changes_neighborhood;
54 extern bool changes_hna;
55 extern bool changes_force;
57 extern union olsr_ip_addr all_zero;
59 void olsr_startup_sleep(int);
60 void olsr_do_startup_sleep(void);
62 void register_pcf(int (*)(int, int, int));
64 void olsr_process_changes(void);
66 void init_msg_seqno(void);
68 uint16_t get_msg_seqno(void);
70 bool olsr_is_bad_duplicate_msg_seqno(uint16_t seqno);
72 int olsr_forward_message(union olsr_message *, struct interface_olsr *, union olsr_ip_addr *);
74 void set_buffer_timer(struct interface_olsr *);
76 void olsr_init_tables(void);
78 void olsr_init_willingness(void);
80 void olsr_update_willingness(void *);
82 uint8_t olsr_calculate_willingness(void);
84 const char *olsr_msgtype_to_string(uint8_t);
86 const char *olsr_link_to_string(uint8_t);
88 const char *olsr_status_to_string(uint8_t);
90 void olsr_exit(const char *, int) __attribute__((noreturn));
92 void *olsr_malloc(size_t, const char *);
94 int olsr_printf(int, const char *, ...) __attribute__ ((format(printf, 2, 3)));
96 void olsr_trigger_forced_update(void *);
98 #endif /* _OLSR_FUNCTIONS */
103 * indent-tabs-mode: nil