Revision 153f02da nest/iface.h

View differences:

nest/iface.h
35 35
  unsigned mtu;
36 36
  unsigned index;			/* OS-dependent interface index */
37 37
  list addrs;				/* Addresses assigned to this interface */
38
  struct ifa *addr;			/* Primary address */
38
  struct ifa *addr4;			/* Primary address for IPv4 */
39
  struct ifa *addr6;			/* Primary address for IPv6 */
40
  struct ifa *llv6;			/* Primary link-local address for IPv6 */
41
  ip4_addr sysdep;			/* Arbitrary IPv4 address for internal sysdep use */
39 42
  list neighbors;			/* All neighbors on this interface */
40 43
};
41 44

  
42
#define IF_UP 1				/* IF_ADMIN_UP and IP address known */
45
#define IF_UP 1				/* Currently just IF_ADMIN_UP */
43 46
#define IF_MULTIACCESS 2
44 47
#define IF_BROADCAST 4
45 48
#define IF_MULTICAST 8
......
70 73

  
71 74
#define IF_JUST_CREATED 0x10000000	/* Send creation event as soon as possible */
72 75
#define IF_TMP_DOWN 0x20000000		/* Temporary shutdown due to interface reconfiguration */
73
#define IF_UPDATED 0x40000000		/* Touched in last scan */
76
#define IF_UPDATED 0x40000000		/* Iface touched in last scan */
77
#define IF_NEEDS_RECALC	0x80000000	/* Preferred address recalculation is needed */
78

  
79
#define IA_UPDATED IF_UPDATED		/* Address touched in last scan */
74 80

  
75 81
/* Interface change events */
76 82

  
......
79 85
#define IF_CHANGE_MTU 4
80 86
#define IF_CHANGE_CREATE 8		/* Seen this interface for the first time */
81 87
#define IF_CHANGE_LINK 0x10
88
#define IF_CHANGE_ADDR4	0x100		/* Change of iface->addr4 */
89
#define IF_CHANGE_ADDR6	0x200		/* ... */
90
#define IF_CHANGE_LLV6 0x400
91
#define IF_CHANGE_SYSDEP 0x800
82 92
#define IF_CHANGE_TOO_MUCH 0x40000000	/* Used internally */
83 93

  
94
#define IF_CHANGE_PREFERRED (IF_CHANGE_ADDR4 | IF_CHANGE_ADDR6 | IF_CHANGE_LLV6)
95

  
84 96
void if_init(void);
85 97
void if_dump(struct iface *);
86 98
void if_dump_all(void);
......
99 111
struct iface *if_find_by_index(unsigned);
100 112
struct iface *if_find_by_name(char *);
101 113
struct iface *if_get_by_name(char *);
102
void ifa_recalc_all_primary_addresses(void);
114
void if_recalc_all_preferred_addresses(void);
103 115

  
104 116

  
105 117
/* The Neighbor Cache */

Also available in: Unified diff