]> git.ipfire.org Git - thirdparty/bird.git/blob - nest/iface.h
Added IP address manipulation macros, interface declarations and logging.
[thirdparty/bird.git] / nest / iface.h
1 /*
2 * BIRD Internet Routing Daemon -- Network Interfaces
3 *
4 * (c) 1998 Martin Mares <mj@ucw.cz>
5 *
6 * Can be freely distributed and used under the terms of the GNU GPL.
7 */
8
9 #ifndef _BIRD_IFACE_H_
10 #define _BIRD_IFACE_H_
11
12 #include <lib/lists.h>
13
14 struct iface {
15 node n;
16 char *name;
17 unsigned flags;
18 struct ifa *ifa; /* First address is primary */
19 };
20
21 #define IF_UP 1
22 #define IF_MULTIACCESS 2
23 #define IF_UNNUMBERED 4
24 #define IF_BROADCAST 8
25 #define IF_MULTICAST 16
26 #define IF_TUNNEL 32
27
28 /* Interface address */
29
30 struct ifa {
31 struct ifa *next;
32 ip_addr ip; /* IP address of this host */
33 ip_addr prefix; /* Network prefix */
34 unsigned pxlen; /* Prefix length */
35 ip_addr brd; /* Broadcast address */
36 };
37
38 #endif