1 /* 2 * Copyright (c) 1985, 1986 Regents of the University of California. 3 * All rights reserved. 4 * 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) 12/07/87 13 */ 14 15 /* 16 * Interface address, Internet version. One of these structures 17 * is allocated for each interface with an Internet address. 18 * The ifaddr structure contains the protocol-independent part 19 * of the structure and is assumed to be first. 20 */ 21 struct 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 */ 31 struct in_addr ia_netbroadcast; /* broadcast addr for (logical) net */ 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 46 struct in_ifaddr *in_ifaddr; 47 struct in_ifaddr *in_iaonnetof(); 48 struct ifqueue ipintrq; /* ip packet input queue */ 49 #endif 50