Revision cf318e3c
nest/iface.h | ||
---|---|---|
1 | 1 |
/* |
2 | 2 |
* BIRD Internet Routing Daemon -- Network Interfaces |
3 | 3 |
* |
4 |
* (c) 1998--1999 Martin Mares <mj@ucw.cz>
|
|
4 |
* (c) 1998--2000 Martin Mares <mj@ucw.cz>
|
|
5 | 5 |
* |
6 | 6 |
* Can be freely distributed and used under the terms of the GNU GPL. |
7 | 7 |
*/ |
... | ... | |
81 | 81 |
struct iface *if_find_by_index(unsigned); |
82 | 82 |
struct iface *if_find_by_name(char *); |
83 | 83 |
|
84 |
/* |
|
85 |
* Neighbor Cache. We hold (direct neighbor, protocol) pairs we've seen |
|
86 |
* along with pointer to protocol-specific data. |
|
87 |
* |
|
88 |
* The primary goal of this cache is to quickly validate all incoming |
|
89 |
* packets if their have been sent by our neighbors and to notify |
|
90 |
* protocols about lost neighbors when an interface goes down. |
|
91 |
* |
|
92 |
* Anyway, it can also contain `sticky' entries for currently unreachable |
|
93 |
* addresses which cause notification when the address becomes a neighbor. |
|
94 |
*/ |
|
84 |
/* The Neighbor Cache */ |
|
95 | 85 |
|
96 | 86 |
typedef struct neighbor { |
97 | 87 |
node n; /* Node in global neighbor list */ |
... | ... | |
107 | 97 |
|
108 | 98 |
#define NEF_STICKY 1 |
109 | 99 |
|
110 |
/* |
|
111 |
* Find neighbor or return NULL if it doesn't exist. |
|
112 |
* If you specify flags == NEF_STICKY, a sticky entry is created if the |
|
113 |
* address is not a neighbor, but NULL can still be returned if the address |
|
114 |
* given is invalid. |
|
115 |
*/ |
|
116 | 100 |
neighbor *neigh_find(struct proto *, ip_addr *, unsigned flags); |
117 | 101 |
|
118 | 102 |
static inline int neigh_connected_to(struct proto *p, ip_addr *a, struct iface *i) |
Also available in: Unified diff