1 /* 2 * Copyright (c) 1984, 1985, 1986, 1987 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 the above copyright notice and this paragraph are 7 * duplicated in all such forms and that any documentation, 8 * advertising materials, and other materials related to such 9 * distribution and use acknowledge that the software was developed 10 * by the University of California, Berkeley. The name of the 11 * University may not be used to endorse or promote products derived 12 * from this software without specific prior written permission. 13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 14 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 15 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 16 * 17 * @(#)ns_if.h 7.3 (Berkeley) 06/29/88 18 */ 19 20 /* 21 * Interface address, xerox version. One of these structures 22 * is allocated for each interface with an internet address. 23 * The ifaddr structure contains the protocol-independent part 24 * of the structure and is assumed to be first. 25 */ 26 27 struct ns_ifaddr { 28 struct ifaddr ia_ifa; /* protocol-independent info */ 29 #define ia_addr ia_ifa.ifa_addr 30 #define ia_broadaddr ia_ifa.ifa_broadaddr 31 #define ia_dstaddr ia_ifa.ifa_dstaddr 32 #define ia_ifp ia_ifa.ifa_ifp 33 union ns_net ia_net; /* network number of interface */ 34 int ia_flags; 35 struct ns_ifaddr *ia_next; /* next in list of internet addresses */ 36 }; 37 38 /* 39 * Given a pointer to an ns_ifaddr (ifaddr), 40 * return a pointer to the addr as a sockadd_ns. 41 */ 42 43 #define IA_SNS(ia) ((struct sockaddr_ns *)(&((struct ns_ifaddr *)ia)->ia_addr)) 44 /* 45 * ia_flags 46 */ 47 #define IFA_ROUTE 0x01 /* routing entry installed */ 48 49 /* This is not the right place for this but where is? */ 50 #define ETHERTYPE_NS 0x0600 51 52 #ifdef NSIP 53 struct nsip_req { 54 struct sockaddr rq_ns; /* must be ns format destination */ 55 struct sockaddr rq_ip; /* must be ip format gateway */ 56 short rq_flags; 57 }; 58 #endif 59 60 #ifdef KERNEL 61 struct ns_ifaddr *ns_ifaddr; 62 struct ns_ifaddr *ns_iaonnetof(); 63 struct ifqueue nsintrq; /* XNS input packet queue */ 64 #endif 65