1 /* 2 * Copyright (c) 1984, 1985, 1986, 1987, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 * 7 * @(#)ns_if.h 8.1 (Berkeley) 06/10/93 8 */ 9 10 /* 11 * Interface address, xerox version. One of these structures 12 * is allocated for each interface with an internet address. 13 * The ifaddr structure contains the protocol-independent part 14 * of the structure and is assumed to be first. 15 */ 16 17 struct ns_ifaddr { 18 struct ifaddr ia_ifa; /* protocol-independent info */ 19 #define ia_ifp ia_ifa.ifa_ifp 20 #define ia_flags ia_ifa.ifa_flags 21 struct ns_ifaddr *ia_next; /* next in list of xerox addresses */ 22 struct sockaddr_ns ia_addr; /* reserve space for my address */ 23 struct sockaddr_ns ia_dstaddr; /* space for my broadcast address */ 24 #define ia_broadaddr ia_dstaddr 25 struct sockaddr_ns ia_netmask; /* space for my network mask */ 26 }; 27 28 struct ns_aliasreq { 29 char ifra_name[IFNAMSIZ]; /* if name, e.g. "en0" */ 30 struct sockaddr_ns ifra_addr; 31 struct sockaddr_ns ifra_broadaddr; 32 #define ifra_dstaddr ifra_broadaddr 33 }; 34 /* 35 * Given a pointer to an ns_ifaddr (ifaddr), 36 * return a pointer to the addr as a sockadd_ns. 37 */ 38 39 #define IA_SNS(ia) (&(((struct ns_ifaddr *)(ia))->ia_addr)) 40 41 /* This is not the right place for this but where is? */ 42 #define ETHERTYPE_NS 0x0600 43 44 #ifdef NSIP 45 struct nsip_req { 46 struct sockaddr rq_ns; /* must be ns format destination */ 47 struct sockaddr rq_ip; /* must be ip format gateway */ 48 short rq_flags; 49 }; 50 #endif 51 52 #ifdef KERNEL 53 struct ns_ifaddr *ns_ifaddr; 54 struct ns_ifaddr *ns_iaonnetof(); 55 struct ifqueue nsintrq; /* XNS input packet queue */ 56 #endif 57