Commit | Line | Data |
---|---|---|
8ae0e4b4 | 1 | /* |
0880b18e | 2 | * Copyright (c) 1985, 1986 Regents of the University of California. |
8ae0e4b4 KM |
3 | * All rights reserved. The Berkeley software License Agreement |
4 | * specifies the terms and conditions for redistribution. | |
5 | * | |
95f51977 | 6 | * @(#)in_var.h 7.1 (Berkeley) 6/5/86 |
8ae0e4b4 | 7 | */ |
c1c25466 MK |
8 | |
9 | /* | |
58bca61d MK |
10 | * Interface address, Internet version. One of these structures |
11 | * is allocated for each interface with an Internet address. | |
c1c25466 MK |
12 | * The ifaddr structure contains the protocol-independent part |
13 | * of the structure and is assumed to be first. | |
14 | */ | |
15 | struct in_ifaddr { | |
16 | struct ifaddr ia_ifa; /* protocol-independent info */ | |
17 | #define ia_addr ia_ifa.ifa_addr | |
18 | #define ia_broadaddr ia_ifa.ifa_broadaddr | |
19 | #define ia_dstaddr ia_ifa.ifa_dstaddr | |
20 | #define ia_ifp ia_ifa.ifa_ifp | |
21 | u_long ia_net; /* network number of interface */ | |
22 | u_long ia_netmask; /* mask of net part */ | |
23 | u_long ia_subnet; /* subnet number, including net */ | |
24 | u_long ia_subnetmask; /* mask of net + subnet */ | |
4afb57fa | 25 | struct in_addr ia_netbroadcast; /* broadcast addr for (logical) net */ |
c1c25466 MK |
26 | int ia_flags; |
27 | struct in_ifaddr *ia_next; /* next in list of internet addresses */ | |
28 | }; | |
29 | /* | |
30 | * Given a pointer to an in_ifaddr (ifaddr), | |
31 | * return a pointer to the addr as a sockadd_in. | |
32 | */ | |
33 | #define IA_SIN(ia) ((struct sockaddr_in *)(&((struct in_ifaddr *)ia)->ia_addr)) | |
34 | /* | |
35 | * ia_flags | |
36 | */ | |
37 | #define IFA_ROUTE 0x01 /* routing entry installed */ | |
38 | ||
39 | #ifdef KERNEL | |
58bca61d MK |
40 | struct in_ifaddr *in_ifaddr; |
41 | struct in_ifaddr *in_iaonnetof(); | |
42 | struct ifqueue ipintrq; /* ip packet input queue */ | |
c1c25466 | 43 | #endif |