1*7c478bd9Sstevel@tonic-gate /* 2*7c478bd9Sstevel@tonic-gate * Copyright (c) 1997-1998 by Sun Microsystems, Inc. 3*7c478bd9Sstevel@tonic-gate * All rights reserved. 4*7c478bd9Sstevel@tonic-gate */ 5*7c478bd9Sstevel@tonic-gate 6*7c478bd9Sstevel@tonic-gate /* 7*7c478bd9Sstevel@tonic-gate * Copyright (c) 1985, 1986 Regents of the University of California. 8*7c478bd9Sstevel@tonic-gate * All rights reserved. The Berkeley software License Agreement 9*7c478bd9Sstevel@tonic-gate * specifies the terms and conditions for redistribution. 10*7c478bd9Sstevel@tonic-gate */ 11*7c478bd9Sstevel@tonic-gate 12*7c478bd9Sstevel@tonic-gate /* 13*7c478bd9Sstevel@tonic-gate * Interface address, Internet version. One of these structures 14*7c478bd9Sstevel@tonic-gate * is allocated for each interface with an Internet address. 15*7c478bd9Sstevel@tonic-gate * The ifaddr structure contains the protocol-independent part 16*7c478bd9Sstevel@tonic-gate * of the structure and is assumed to be first. 17*7c478bd9Sstevel@tonic-gate */ 18*7c478bd9Sstevel@tonic-gate 19*7c478bd9Sstevel@tonic-gate #ifndef _NETINET_IN_VAR_H 20*7c478bd9Sstevel@tonic-gate #define _NETINET_IN_VAR_H 21*7c478bd9Sstevel@tonic-gate 22*7c478bd9Sstevel@tonic-gate /* in_var.h 1.3 88/08/19 SMI; from UCB 7.1 6/5/86 */ 23*7c478bd9Sstevel@tonic-gate 24*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 25*7c478bd9Sstevel@tonic-gate extern "C" { 26*7c478bd9Sstevel@tonic-gate #endif 27*7c478bd9Sstevel@tonic-gate 28*7c478bd9Sstevel@tonic-gate struct in_ifaddr { 29*7c478bd9Sstevel@tonic-gate struct ifaddr ia_ifa; /* protocol-independent info */ 30*7c478bd9Sstevel@tonic-gate #define ia_addr ia_ifa.ifa_addr 31*7c478bd9Sstevel@tonic-gate #define ia_broadaddr ia_ifa.ifa_broadaddr 32*7c478bd9Sstevel@tonic-gate #define ia_dstaddr ia_ifa.ifa_dstaddr 33*7c478bd9Sstevel@tonic-gate #define ia_ifp ia_ifa.ifa_ifp 34*7c478bd9Sstevel@tonic-gate ulong_t ia_net; /* network number of interface */ 35*7c478bd9Sstevel@tonic-gate ulong_t ia_netmask; /* mask of net part */ 36*7c478bd9Sstevel@tonic-gate ulong_t ia_subnet; /* subnet number, including net */ 37*7c478bd9Sstevel@tonic-gate ulong_t ia_subnetmask; /* mask of net + subnet */ 38*7c478bd9Sstevel@tonic-gate struct in_addr ia_netbroadcast; /* broadcast addr for (logical) net */ 39*7c478bd9Sstevel@tonic-gate int ia_flags; 40*7c478bd9Sstevel@tonic-gate struct in_ifaddr *ia_next; /* next in list of internet addresses */ 41*7c478bd9Sstevel@tonic-gate }; 42*7c478bd9Sstevel@tonic-gate /* 43*7c478bd9Sstevel@tonic-gate * Given a pointer to an in_ifaddr (ifaddr), 44*7c478bd9Sstevel@tonic-gate * return a pointer to the addr as a sockadd_in. 45*7c478bd9Sstevel@tonic-gate */ 46*7c478bd9Sstevel@tonic-gate #define IA_SIN(ia) ((struct sockaddr_in *)(&((struct in_ifaddr *)ia)->ia_addr)) 47*7c478bd9Sstevel@tonic-gate /* 48*7c478bd9Sstevel@tonic-gate * ia_flags 49*7c478bd9Sstevel@tonic-gate */ 50*7c478bd9Sstevel@tonic-gate #define IFA_ROUTE 0x01 /* routing entry installed */ 51*7c478bd9Sstevel@tonic-gate 52*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 53*7c478bd9Sstevel@tonic-gate } 54*7c478bd9Sstevel@tonic-gate #endif 55*7c478bd9Sstevel@tonic-gate 56*7c478bd9Sstevel@tonic-gate #endif /* _NETINET_IN_VAR_H */ 57