]> git.ipfire.org Git - thirdparty/bird.git/blob - nest/iface.h
Next attempt on data structures...
[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 unsigned mtu;
19 struct ifa *ifa; /* First address is primary */
20 };
21
22 #define IF_UP 1
23 #define IF_MULTIACCESS 2
24 #define IF_UNNUMBERED 4
25 #define IF_BROADCAST 8
26 #define IF_MULTICAST 16
27 #define IF_TUNNEL 32
28
29 /* Interface address */
30
31 struct ifa {
32 struct ifa *next;
33 ip_addr ip; /* IP address of this host */
34 ip_addr prefix; /* Network prefix */
35 unsigned pxlen; /* Prefix length */
36 ip_addr brd; /* Broadcast address */
37 struct neighbor *neigh; /* List of neighbors on this interface */
38 };
39
40 #endif