Change licensing/use notice.
[unix-history] / usr / src / sys / netns / ns_if.h
CommitLineData
8ae0e4b4 1/*
240edf1f
KS
2 * Copyright (c) 1984, 1985, 1986, 1987 Regents of the University of California.
3 * All rights reserved.
8ae0e4b4 4 *
240edf1f
KS
5 * Redistribution and use in source and binary forms are permitted
6 * provided that this notice is preserved and that due credit is given
7 * to the University of California at Berkeley. The name of the University
8 * may not be used to endorse or promote products derived from this
9 * software without specific prior written permission. This software
10 * is provided ``as is'' without express or implied warranty.
11 *
12 * @(#)ns_if.h 7.2 (Berkeley) %G%
8ae0e4b4 13 */
c87a037b
KS
14
15/*
16 * Interface address, xerox version. One of these structures
17 * is allocated for each interface with an internet address.
18 * The ifaddr structure contains the protocol-independent part
19 * of the structure and is assumed to be first.
20 */
21
22struct ns_ifaddr {
23 struct ifaddr ia_ifa; /* protocol-independent info */
24#define ia_addr ia_ifa.ifa_addr
25#define ia_broadaddr ia_ifa.ifa_broadaddr
26#define ia_dstaddr ia_ifa.ifa_dstaddr
27#define ia_ifp ia_ifa.ifa_ifp
28 union ns_net ia_net; /* network number of interface */
29 int ia_flags;
30 struct ns_ifaddr *ia_next; /* next in list of internet addresses */
31};
32
33/*
34 * Given a pointer to an ns_ifaddr (ifaddr),
35 * return a pointer to the addr as a sockadd_ns.
36 */
37
38#define IA_SNS(ia) ((struct sockaddr_ns *)(&((struct ns_ifaddr *)ia)->ia_addr))
39/*
40 * ia_flags
41 */
42#define IFA_ROUTE 0x01 /* routing entry installed */
43
44/* This is not the right place for this but where is? */
45#define ETHERTYPE_NS 0x0600
46
47#ifdef NSIP
48struct nsip_req {
49 struct sockaddr rq_ns; /* must be ns format destination */
50 struct sockaddr rq_ip; /* must be ip format gateway */
51 short rq_flags;
52};
53#endif
54
55#ifdef KERNEL
58bca61d
MK
56struct ns_ifaddr *ns_ifaddr;
57struct ns_ifaddr *ns_iaonnetof();
58struct ifqueue nsintrq; /* XNS input packet queue */
c87a037b 59#endif