1 /* 2 * Copyright (c) 1985 Regents of the University of California. 3 * All rights reserved. The Berkeley software License Agreement 4 * specifies the terms and conditions for redistribution. 5 * 6 * @(#)ns_if.h 6.3 (Berkeley) 02/03/86 7 */ 8 9 /* 10 * Interface address, xerox version. One of these structures 11 * is allocated for each interface with an internet address. 12 * The ifaddr structure contains the protocol-independent part 13 * of the structure and is assumed to be first. 14 */ 15 16 struct ns_ifaddr { 17 struct ifaddr ia_ifa; /* protocol-independent info */ 18 #define ia_addr ia_ifa.ifa_addr 19 #define ia_broadaddr ia_ifa.ifa_broadaddr 20 #define ia_dstaddr ia_ifa.ifa_dstaddr 21 #define ia_ifp ia_ifa.ifa_ifp 22 union ns_net ia_net; /* network number of interface */ 23 int ia_flags; 24 struct ns_ifaddr *ia_next; /* next in list of internet addresses */ 25 }; 26 27 /* 28 * Given a pointer to an ns_ifaddr (ifaddr), 29 * return a pointer to the addr as a sockadd_ns. 30 */ 31 32 #define IA_SNS(ia) ((struct sockaddr_ns *)(&((struct ns_ifaddr *)ia)->ia_addr)) 33 /* 34 * ia_flags 35 */ 36 #define IFA_ROUTE 0x01 /* routing entry installed */ 37 38 /* This is not the right place for this but where is? */ 39 #define ETHERTYPE_NS 0x0600 40 41 #ifdef NSIP 42 struct nsip_req { 43 struct sockaddr rq_ns; /* must be ns format destination */ 44 struct sockaddr rq_ip; /* must be ip format gateway */ 45 short rq_flags; 46 }; 47 #endif 48 49 #ifdef KERNEL 50 extern struct ns_ifaddr *ns_ifaddr; 51 extern struct ns_ifaddr *ns_iaonnetof(); 52 extern struct ifqueue nsintrq; /* XNS input packet queue */ 53 #endif 54