Commit | Line | Data |
---|---|---|
7bcd1bb8 KB |
1 | /*- |
2 | * Copyright (c) 1988, 1991 The Regents of the University of California. | |
3 | * All rights reserved. | |
4 | * | |
5 | * %sccs.include.redist.c% | |
6 | * | |
7 | * @(#)iso_var.h 7.5 (Berkeley) %G% | |
8 | */ | |
9 | ||
d8b9f99a KS |
10 | /*********************************************************** |
11 | Copyright IBM Corporation 1987 | |
12 | ||
13 | All Rights Reserved | |
14 | ||
15 | Permission to use, copy, modify, and distribute this software and its | |
16 | documentation for any purpose and without fee is hereby granted, | |
17 | provided that the above copyright notice appear in all copies and that | |
18 | both that copyright notice and this permission notice appear in | |
19 | supporting documentation, and that the name of IBM not be | |
20 | used in advertising or publicity pertaining to distribution of the | |
21 | software without specific, written prior permission. | |
22 | ||
23 | IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING | |
24 | ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL | |
25 | IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR | |
26 | ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, | |
27 | WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, | |
28 | ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS | |
29 | SOFTWARE. | |
30 | ||
31 | ******************************************************************/ | |
32 | ||
33 | /* | |
34 | * ARGO Project, Computer Sciences Dept., University of Wisconsin - Madison | |
35 | */ | |
a50e2bc0 KS |
36 | /* $Header: iso_var.h,v 4.2 88/06/29 15:00:08 hagens Exp $ |
37 | * $Source: /usr/argo/sys/netiso/RCS/iso_var.h,v $ | |
38 | */ | |
d8b9f99a KS |
39 | |
40 | /* | |
41 | * Interface address, iso version. One of these structures is | |
42 | * allocated for each interface with an osi address. The ifaddr | |
43 | * structure conatins the protocol-independent part | |
44 | * of the structure, and is assumed to be first. | |
45 | */ | |
46 | struct iso_ifaddr { | |
47 | struct ifaddr ia_ifa; /* protocol-independent info */ | |
a50e2bc0 | 48 | #define ia_ifp ia_ifa.ifa_ifp |
0400a592 | 49 | #define ia_flags ia_ifa.ifa_flags |
a50e2bc0 | 50 | int ia_snpaoffset; |
d8b9f99a | 51 | struct iso_ifaddr *ia_next; /* next in list of iso addresses */ |
a50e2bc0 KS |
52 | struct sockaddr_iso ia_addr; /* reserve space for interface name */ |
53 | struct sockaddr_iso ia_dstaddr; /* reserve space for broadcast addr */ | |
54 | #define ia_broadaddr ia_dstaddr | |
55 | struct sockaddr_iso ia_sockmask; /* reserve space for general netmask */ | |
56 | }; | |
57 | ||
58 | struct iso_aliasreq { | |
59 | char ifra_name[IFNAMSIZ]; /* if name, e.g. "en0" */ | |
60 | struct sockaddr_iso ifra_addr; | |
61 | struct sockaddr_iso ifra_dstaddr; | |
62 | struct sockaddr_iso ifra_mask; | |
63 | int ifra_snpaoffset; | |
64 | }; | |
65 | ||
66 | struct iso_ifreq { | |
67 | char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */ | |
68 | struct sockaddr_iso ifr_Addr; | |
d8b9f99a | 69 | }; |
d8b9f99a KS |
70 | |
71 | /* | |
72 | * Given a pointer to an iso_ifaddr (ifaddr), | |
73 | * return a pointer to the addr as a sockaddr_iso | |
74 | */ | |
a50e2bc0 KS |
75 | /* |
76 | #define IA_SIS(ia) ((struct sockaddr_iso *)(ia.ia_ifa->ifa_addr)) | |
77 | * works if sockaddr_iso becomes variable sized. | |
78 | */ | |
79 | #define IA_SIS(ia) (&(((struct iso_ifaddr *)ia)->ia_addr)) | |
80 | ||
81 | #define SIOCDIFADDR_ISO _IOW('i',25, struct iso_ifreq) /* delete IF addr */ | |
82 | #define SIOCAIFADDR_ISO _IOW('i',26, struct iso_aliasreq)/* add/chg IFalias */ | |
83 | #define SIOCGIFADDR_ISO _IOWR('i',33, struct iso_ifreq) /* get ifnet address */ | |
84 | #define SIOCGIFDSTADDR_ISO _IOWR('i',34, struct iso_ifreq) /* get dst address */ | |
85 | #define SIOCGIFNETMASK_ISO _IOWR('i',37, struct iso_ifreq) /* get dst address */ | |
86 | ||
a50e2bc0 KS |
87 | /* |
88 | * This stuff should go in if.h or if_llc.h or someplace else, | |
89 | * but for now . . . | |
90 | */ | |
d8b9f99a | 91 | |
a50e2bc0 KS |
92 | struct llc_etherhdr { |
93 | char dst[6]; | |
94 | char src[6]; | |
95 | char len[2]; | |
96 | char llc_dsap; | |
97 | char llc_ssap; | |
98 | char llc_ui_byte; | |
99 | }; | |
d8b9f99a | 100 | |
a50e2bc0 KS |
101 | struct snpa_hdr { |
102 | struct ifnet *snh_ifp; | |
103 | char snh_dhost[6]; | |
104 | char snh_shost[6]; | |
105 | short snh_flags; | |
106 | }; | |
d8b9f99a KS |
107 | #ifdef KERNEL |
108 | struct iso_ifaddr *iso_ifaddr; /* linked list of iso address ifaces */ | |
a50e2bc0 | 109 | struct iso_ifaddr *iso_localifa(); /* linked list of iso address ifaces */ |
d8b9f99a KS |
110 | struct ifqueue clnlintrq; /* clnl packet input queue */ |
111 | #endif KERNEL |