2 * OLSR ad-hoc routing table management protocol
3 * Copyright (C) 2004 Andreas Tønnesen (andreto@ifi.uio.no)
5 * This file is part of the olsr.org OLSR daemon.
7 * olsr.org is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * olsr.org is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with olsr.org; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 * $Id: olsr.h,v 1.12 2004/11/05 02:06:13 tlopatic Exp $
27 #ifndef _OLSR_FUNCTIONS
28 #define _OLSR_FUNCTIONS
30 #include "olsr_protocol.h"
31 #include "interfaces.h"
36 * Process changes functions
41 int (*function)(int, int, int);
48 olsr_bool changes_topology;
49 olsr_bool changes_neighborhood;
50 olsr_bool changes_hna;
52 olsr_u16_t message_seqno;
54 #define TIMED_OUT(s1) \
61 /* First "argument" is NOT a pointer! */
63 #define QUEUE_ELEM(pre, new) \
64 pre.next->prev = new; \
65 new->next = pre.next; \
69 #define DEQUEUE_ELEM(elem) \
70 elem->prev->next = elem->next; \
71 elem->next->prev = elem->prev
75 register_pcf(int (*)(int, int, int));
78 olsr_process_changes(void);
81 olsr_init_timer(olsr_u32_t, struct timeval *);
84 olsr_get_timestamp(olsr_u32_t, struct timeval *);
93 olsr_forward_message(union olsr_message *,
97 union olsr_ip_addr *);
100 set_buffer_timer(struct interface *);
103 olsr_init_tables(void);
106 olsr_init_willingness(void);
109 olsr_update_willingness(void *);
112 olsr_calculate_willingness(void);
115 olsr_exit(const char *, int);
118 olsr_malloc(size_t, const char *);
121 olsr_printf(int, char *, ...);