Lines 313-318
Link Here
|
313 |
*/ |
313 |
*/ |
314 |
}; |
314 |
}; |
315 |
|
315 |
|
|
|
316 |
/* |
317 |
* The ifaddr structure contains information about one address |
318 |
* of an interface. They are maintained by the different address families, |
319 |
* are allocated and attached when an address is set, and are linked |
320 |
* together so all addresses for an interface can be located. |
321 |
* |
322 |
* NOTE: a 'struct ifaddr' is always at the beginning of a larger |
323 |
* chunk of malloc'ed memory, where we store the three addresses |
324 |
* (ifa_addr, ifa_dstaddr and ifa_netmask) referenced here. |
325 |
*/ |
326 |
struct ifaddr { |
327 |
struct sockaddr *ifa_addr; /* address of interface */ |
328 |
struct sockaddr *ifa_dstaddr; /* other end of p-to-p link */ |
329 |
#define ifa_broadaddr ifa_dstaddr /* broadcast address interface */ |
330 |
struct sockaddr *ifa_netmask; /* used to determine subnet */ |
331 |
struct ifnet *ifa_ifp; /* back-pointer to interface */ |
332 |
struct carp_softc *ifa_carp; /* pointer to CARP data */ |
333 |
TAILQ_ENTRY(ifaddr) ifa_link; /* queue macro glue */ |
334 |
void (*ifa_rtrequest) /* check or clean routes (+ or -)'d */ |
335 |
(int, struct rtentry *, struct rt_addrinfo *); |
336 |
u_short ifa_flags; /* mostly rt_flags for cloning */ |
337 |
#define IFA_ROUTE RTF_UP /* route installed */ |
338 |
#define IFA_RTSELF RTF_HOST /* loopback route to self installed */ |
339 |
u_int ifa_refcnt; /* references to this structure */ |
340 |
|
341 |
counter_u64_t ifa_ipackets; |
342 |
counter_u64_t ifa_opackets; |
343 |
counter_u64_t ifa_ibytes; |
344 |
counter_u64_t ifa_obytes; |
345 |
}; |
346 |
|
347 |
|
348 |
|
316 |
/* for compatibility with other BSDs */ |
349 |
/* for compatibility with other BSDs */ |
317 |
#define if_addrlist if_addrhead |
350 |
#define if_addrlist if_addrhead |
318 |
#define if_list if_link |
351 |
#define if_list if_link |
Lines 418-454
Link Here
|
418 |
|
451 |
|
419 |
#define TOEDEV(ifp) ((ifp)->if_llsoftc) |
452 |
#define TOEDEV(ifp) ((ifp)->if_llsoftc) |
420 |
|
453 |
|
421 |
/* |
|
|
422 |
* The ifaddr structure contains information about one address |
423 |
* of an interface. They are maintained by the different address families, |
424 |
* are allocated and attached when an address is set, and are linked |
425 |
* together so all addresses for an interface can be located. |
426 |
* |
427 |
* NOTE: a 'struct ifaddr' is always at the beginning of a larger |
428 |
* chunk of malloc'ed memory, where we store the three addresses |
429 |
* (ifa_addr, ifa_dstaddr and ifa_netmask) referenced here. |
430 |
*/ |
431 |
struct ifaddr { |
432 |
struct sockaddr *ifa_addr; /* address of interface */ |
433 |
struct sockaddr *ifa_dstaddr; /* other end of p-to-p link */ |
434 |
#define ifa_broadaddr ifa_dstaddr /* broadcast address interface */ |
435 |
struct sockaddr *ifa_netmask; /* used to determine subnet */ |
436 |
struct ifnet *ifa_ifp; /* back-pointer to interface */ |
437 |
struct carp_softc *ifa_carp; /* pointer to CARP data */ |
438 |
TAILQ_ENTRY(ifaddr) ifa_link; /* queue macro glue */ |
439 |
void (*ifa_rtrequest) /* check or clean routes (+ or -)'d */ |
440 |
(int, struct rtentry *, struct rt_addrinfo *); |
441 |
u_short ifa_flags; /* mostly rt_flags for cloning */ |
442 |
#define IFA_ROUTE RTF_UP /* route installed */ |
443 |
#define IFA_RTSELF RTF_HOST /* loopback route to self installed */ |
444 |
u_int ifa_refcnt; /* references to this structure */ |
445 |
|
446 |
counter_u64_t ifa_ipackets; |
447 |
counter_u64_t ifa_opackets; |
448 |
counter_u64_t ifa_ibytes; |
449 |
counter_u64_t ifa_obytes; |
450 |
}; |
451 |
|
452 |
/* For compatibility with other BSDs. SCTP uses it. */ |
454 |
/* For compatibility with other BSDs. SCTP uses it. */ |
453 |
#define ifa_list ifa_link |
455 |
#define ifa_list ifa_link |
454 |
|
456 |
|