make tags for header file too
[unix-history] / usr / src / sys / netiso / iso_var.h
CommitLineData
d8b9f99a
KS
1/***********************************************************
2 Copyright IBM Corporation 1987
3
4 All Rights Reserved
5
6Permission to use, copy, modify, and distribute this software and its
7documentation for any purpose and without fee is hereby granted,
8provided that the above copyright notice appear in all copies and that
9both that copyright notice and this permission notice appear in
10supporting documentation, and that the name of IBM not be
11used in advertising or publicity pertaining to distribution of the
12software without specific, written prior permission.
13
14IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
15ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
16IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
17ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
18WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
19ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
20SOFTWARE.
21
22******************************************************************/
a50e2bc0
KS
23/*
24 * Modifications,
25 * Copyright (c) 1988 Regents of the University of California.
26 * All rights reserved.
27 *
28 * Redistribution and use in source and binary forms are permitted
29 * provided that the above copyright notice and this paragraph are
30 * duplicated in all such forms and that any documentation,
31 * advertising materials, and other materials related to such
32 * distribution and use acknowledge that the software was developed
33 * by the University of California, Berkeley. The name of the
34 * University may not be used to endorse or promote products derived
35 * from this software without specific prior written permission.
36 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
37 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
38 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
39 *
40 * @(#)iso_var.h 7.2 (Berkeley) %G%
41 */
d8b9f99a
KS
42
43/*
44 * ARGO Project, Computer Sciences Dept., University of Wisconsin - Madison
45 */
a50e2bc0
KS
46/* $Header: iso_var.h,v 4.2 88/06/29 15:00:08 hagens Exp $
47 * $Source: /usr/argo/sys/netiso/RCS/iso_var.h,v $
48 */
d8b9f99a
KS
49
50/*
51 * Interface address, iso version. One of these structures is
52 * allocated for each interface with an osi address. The ifaddr
53 * structure conatins the protocol-independent part
54 * of the structure, and is assumed to be first.
55 */
56struct iso_ifaddr {
57 struct ifaddr ia_ifa; /* protocol-independent info */
a50e2bc0 58#define ia_ifp ia_ifa.ifa_ifp
d8b9f99a 59 int ia_flags;
a50e2bc0 60 int ia_snpaoffset;
d8b9f99a 61 struct iso_ifaddr *ia_next; /* next in list of iso addresses */
a50e2bc0
KS
62 struct sockaddr_iso ia_addr; /* reserve space for interface name */
63 struct sockaddr_iso ia_dstaddr; /* reserve space for broadcast addr */
64#define ia_broadaddr ia_dstaddr
65 struct sockaddr_iso ia_sockmask; /* reserve space for general netmask */
66};
67
68struct iso_aliasreq {
69 char ifra_name[IFNAMSIZ]; /* if name, e.g. "en0" */
70 struct sockaddr_iso ifra_addr;
71 struct sockaddr_iso ifra_dstaddr;
72 struct sockaddr_iso ifra_mask;
73 int ifra_snpaoffset;
74};
75
76struct iso_ifreq {
77 char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */
78 struct sockaddr_iso ifr_Addr;
d8b9f99a 79};
d8b9f99a
KS
80
81/*
82 * Given a pointer to an iso_ifaddr (ifaddr),
83 * return a pointer to the addr as a sockaddr_iso
84 */
a50e2bc0
KS
85/*
86#define IA_SIS(ia) ((struct sockaddr_iso *)(ia.ia_ifa->ifa_addr))
87 * works if sockaddr_iso becomes variable sized.
88 */
89#define IA_SIS(ia) (&(((struct iso_ifaddr *)ia)->ia_addr))
90
91#define SIOCDIFADDR_ISO _IOW('i',25, struct iso_ifreq) /* delete IF addr */
92#define SIOCAIFADDR_ISO _IOW('i',26, struct iso_aliasreq)/* add/chg IFalias */
93#define SIOCGIFADDR_ISO _IOWR('i',33, struct iso_ifreq) /* get ifnet address */
94#define SIOCGIFDSTADDR_ISO _IOWR('i',34, struct iso_ifreq) /* get dst address */
95#define SIOCGIFNETMASK_ISO _IOWR('i',37, struct iso_ifreq) /* get dst address */
96
97#ifndef IFA_ROUTE
98#define IFA_ROUTE 0x01 /* routing entry installed */
99#endif
100
101/* ISO arp IOCTL data structures */
102struct arpreq_iso {
103 int arp_flags; /* flags */
104 struct sockaddr_iso arp_pa; /* protocol address */
105 struct sockaddr arp_ha; /* hardware address */
106};
107
108#define SIOCSISOMAP _IOW('a',30, struct arpreq_iso) /* set arp entry */
109#define SIOCGISOMAP _IOWR('a',38, struct arpreq_iso)/* get arp entry */
110#define SIOCDISOMAP _IOW('a',31, struct arpreq_iso) /* delete arp entry */
111/*
112 * This stuff should go in if.h or if_llc.h or someplace else,
113 * but for now . . .
114 */
d8b9f99a 115
a50e2bc0
KS
116struct llc_etherhdr {
117 char dst[6];
118 char src[6];
119 char len[2];
120 char llc_dsap;
121 char llc_ssap;
122 char llc_ui_byte;
123};
d8b9f99a 124
a50e2bc0
KS
125struct snpa_hdr {
126 struct ifnet *snh_ifp;
127 char snh_dhost[6];
128 char snh_shost[6];
129 short snh_flags;
130};
d8b9f99a
KS
131#ifdef KERNEL
132struct iso_ifaddr *iso_ifaddr; /* linked list of iso address ifaces */
a50e2bc0 133struct iso_ifaddr *iso_localifa(); /* linked list of iso address ifaces */
d8b9f99a
KS
134struct ifqueue clnlintrq; /* clnl packet input queue */
135#endif KERNEL