|
|
1.1 root 1: /*
2: * Copyright (c) 1984, 1985, 1986, 1987 Regents of the University of California.
3: * All rights reserved.
4: *
5: * Redistribution is only permitted until one year after the first shipment
6: * of 4.4BSD by the Regents. Otherwise, redistribution and use in source and
7: * binary forms are permitted provided that: (1) source distributions retain
8: * this entire copyright notice and comment, and (2) distributions including
9: * binaries display the following acknowledgement: This product includes
10: * software developed by the University of California, Berkeley and its
11: * contributors'' in the documentation or other materials provided with the
12: * distribution and in all advertising materials mentioning features or use
13: * of this software. Neither the name of the University nor the names of
14: * its contributors may be used to endorse or promote products derived from
15: * this software without specific prior written permission.
16: * THIS SOFTWARE IS PROVIDED AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
17: * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
18: * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
19: *
20: * @(#)ns_if.h 7.6 (Berkeley) 6/28/90
21: */
22:
23: /*
24: * Interface address, xerox version. One of these structures
25: * is allocated for each interface with an internet address.
26: * The ifaddr structure contains the protocol-independent part
27: * of the structure and is assumed to be first.
28: */
29:
30: struct ns_ifaddr {
31: struct ifaddr ia_ifa; /* protocol-independent info */
32: #define ia_ifp ia_ifa.ifa_ifp
33: #define ia_flags ia_ifa.ifa_flags
34: /* union ns_net ia_net; /* network number of interface */
35: #define ia_net ia_addr.sns_addr.x_net
36: struct ns_ifaddr *ia_next; /* next in list of xerox addresses */
37: struct sockaddr_ns ia_addr; /* reserve space for my address */
38: struct sockaddr_ns ia_dstaddr; /* space for my broadcast address */
39: #define ia_broadaddr ia_dstaddr
40: struct sockaddr_ns ia_netmask; /* space for my network mask */
41: };
42:
43: struct ns_aliasreq {
44: char ifra_name[IFNAMSIZ]; /* if name, e.g. "en0" */
45: struct sockaddr_ns ifra_addr;
46: struct sockaddr_ns ifra_broadaddr;
47: #define ifra_dstaddr ifra_broadaddr
48: };
49: /*
50: * Given a pointer to an ns_ifaddr (ifaddr),
51: * return a pointer to the addr as a sockadd_ns.
52: */
53:
54: #define IA_SNS(ia) (&(((struct ns_ifaddr *)(ia))->ia_addr))
55:
56: /* This is not the right place for this but where is? */
57: #define ETHERTYPE_NS 0x0600
58:
59: #ifdef NSIP
60: struct nsip_req {
61: struct sockaddr rq_ns; /* must be ns format destination */
62: struct sockaddr rq_ip; /* must be ip format gateway */
63: short rq_flags;
64: };
65: #endif
66:
67: #ifdef KERNEL
68: struct ns_ifaddr *ns_ifaddr;
69: struct ns_ifaddr *ns_iaonnetof();
70: struct ifqueue nsintrq; /* XNS input packet queue */
71: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.