1
2#define UNKNOWN -1
3#define EMPTY 0
4#define IGMPVERSION 1
5#define IS_QUERIER 2
6#define UPSTREAM   4
7
8/*#define DEFAULT_VERSION 2*/
9#define DEFAULT_ISQUERIER 1
10#define EQUAL(s1,s2)	(strcmp((s1),(s2)) == 0)
11extern int log_level;
12
13/*
14 * Log support
15 */
16#ifdef DEBUG
17#define LOG(x) debug x
18#else
19#define LOG(x)
20#endif
21//#define LOG_INFO	1
22#define	LOG_DETAIL	2
23//#define LOG_DEBUG	3
24
25typedef struct _interface_list_t {
26    char ifl_name[IFNAMSIZ];
27    struct sockaddr ifl_addr;
28    struct _interface_list_t *ifl_next;
29} interface_list_t;
30
31unsigned short in_cksum(unsigned short *addr, int len);
32interface_list_t* get_interface_list(short af, short flags, short unflags);
33void free_interface_list(interface_list_t *ifl);
34short get_interface_flags(char *ifname);
35short set_interface_flags(char *ifname, short flags);
36int get_interface_mtu(char *ifname);
37int mrouter_onoff(int sockfd, int onoff);
38char *next_word(char **s);
39