date and time created 88/12/14 15:30:09 by sklower
[unix-history] / usr / src / sys / netinet / in_var.h
CommitLineData
8ae0e4b4 1/*
0880b18e 2 * Copyright (c) 1985, 1986 Regents of the University of California.
2b6b6284 3 * All rights reserved.
8ae0e4b4 4 *
2b6b6284 5 * Redistribution and use in source and binary forms are permitted
616d42db
KB
6 * provided that the above copyright notice and this paragraph are
7 * duplicated in all such forms and that any documentation,
8 * advertising materials, and other materials related to such
9 * distribution and use acknowledge that the software was developed
10 * by the University of California, Berkeley. The name of the
11 * University may not be used to endorse or promote products derived
12 * from this software without specific prior written permission.
13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
2b6b6284 16 *
616d42db 17 * @(#)in_var.h 7.3 (Berkeley) %G%
8ae0e4b4 18 */
c1c25466
MK
19
20/*
58bca61d
MK
21 * Interface address, Internet version. One of these structures
22 * is allocated for each interface with an Internet address.
c1c25466
MK
23 * The ifaddr structure contains the protocol-independent part
24 * of the structure and is assumed to be first.
25 */
26struct in_ifaddr {
27 struct ifaddr ia_ifa; /* protocol-independent info */
28#define ia_addr ia_ifa.ifa_addr
29#define ia_broadaddr ia_ifa.ifa_broadaddr
30#define ia_dstaddr ia_ifa.ifa_dstaddr
31#define ia_ifp ia_ifa.ifa_ifp
32 u_long ia_net; /* network number of interface */
33 u_long ia_netmask; /* mask of net part */
34 u_long ia_subnet; /* subnet number, including net */
35 u_long ia_subnetmask; /* mask of net + subnet */
4afb57fa 36 struct in_addr ia_netbroadcast; /* broadcast addr for (logical) net */
c1c25466
MK
37 int ia_flags;
38 struct in_ifaddr *ia_next; /* next in list of internet addresses */
39};
40/*
41 * Given a pointer to an in_ifaddr (ifaddr),
42 * return a pointer to the addr as a sockadd_in.
43 */
44#define IA_SIN(ia) ((struct sockaddr_in *)(&((struct in_ifaddr *)ia)->ia_addr))
45/*
46 * ia_flags
47 */
48#define IFA_ROUTE 0x01 /* routing entry installed */
49
50#ifdef KERNEL
58bca61d
MK
51struct in_ifaddr *in_ifaddr;
52struct in_ifaddr *in_iaonnetof();
53struct ifqueue ipintrq; /* ip packet input queue */
c1c25466 54#endif