update copyright for distribution
[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
KB
5 * Redistribution and use in source and binary forms are permitted
6 * provided that this notice is preserved and that due credit is given
7 * to the University of California at Berkeley. The name of the University
8 * may not be used to endorse or promote products derived from this
9 * software without specific prior written permission. This software
10 * is provided ``as is'' without express or implied warranty.
11 *
12 * @(#)in_var.h 7.2 (Berkeley) %G%
8ae0e4b4 13 */
c1c25466
MK
14
15/*
58bca61d
MK
16 * Interface address, Internet version. One of these structures
17 * is allocated for each interface with an Internet address.
c1c25466
MK
18 * The ifaddr structure contains the protocol-independent part
19 * of the structure and is assumed to be first.
20 */
21struct in_ifaddr {
22 struct ifaddr ia_ifa; /* protocol-independent info */
23#define ia_addr ia_ifa.ifa_addr
24#define ia_broadaddr ia_ifa.ifa_broadaddr
25#define ia_dstaddr ia_ifa.ifa_dstaddr
26#define ia_ifp ia_ifa.ifa_ifp
27 u_long ia_net; /* network number of interface */
28 u_long ia_netmask; /* mask of net part */
29 u_long ia_subnet; /* subnet number, including net */
30 u_long ia_subnetmask; /* mask of net + subnet */
4afb57fa 31 struct in_addr ia_netbroadcast; /* broadcast addr for (logical) net */
c1c25466
MK
32 int ia_flags;
33 struct in_ifaddr *ia_next; /* next in list of internet addresses */
34};
35/*
36 * Given a pointer to an in_ifaddr (ifaddr),
37 * return a pointer to the addr as a sockadd_in.
38 */
39#define IA_SIN(ia) ((struct sockaddr_in *)(&((struct in_ifaddr *)ia)->ia_addr))
40/*
41 * ia_flags
42 */
43#define IFA_ROUTE 0x01 /* routing entry installed */
44
45#ifdef KERNEL
58bca61d
MK
46struct in_ifaddr *in_ifaddr;
47struct in_ifaddr *in_iaonnetof();
48struct ifqueue ipintrq; /* ip packet input queue */
c1c25466 49#endif