Commit | Line | Data |
---|---|---|
8ae0e4b4 | 1 | /* |
240edf1f KS |
2 | * Copyright (c) 1984, 1985, 1986, 1987 Regents of the University of California. |
3 | * All rights reserved. | |
8ae0e4b4 | 4 | * |
dbf0c423 | 5 | * %sccs.include.redist.c% |
240edf1f | 6 | * |
e0737012 | 7 | * @(#)ns_if.h 7.7 (Berkeley) %G% |
8ae0e4b4 | 8 | */ |
c87a037b KS |
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 */ | |
c87a037b | 19 | #define ia_ifp ia_ifa.ifa_ifp |
36a8ed1a | 20 | #define ia_flags ia_ifa.ifa_flags |
4dcdd98e KS |
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 */ | |
c87a037b KS |
26 | }; |
27 | ||
4dcdd98e KS |
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 | }; | |
c87a037b KS |
34 | /* |
35 | * Given a pointer to an ns_ifaddr (ifaddr), | |
36 | * return a pointer to the addr as a sockadd_ns. | |
37 | */ | |
38 | ||
4dcdd98e | 39 | #define IA_SNS(ia) (&(((struct ns_ifaddr *)(ia))->ia_addr)) |
c87a037b KS |
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 | |
58bca61d MK |
53 | struct ns_ifaddr *ns_ifaddr; |
54 | struct ns_ifaddr *ns_iaonnetof(); | |
55 | struct ifqueue nsintrq; /* XNS input packet queue */ | |
c87a037b | 56 | #endif |