only delete space used by inode, on inode deletion; required
[unix-history] / usr / src / sys / netiso / eonvar.h
CommitLineData
7bcd1bb8
KB
1/*-
2 * Copyright (c) 1991 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * %sccs.include.redist.c%
6 *
7 * @(#)eonvar.h 7.5 (Berkeley) %G%
8 */
9
7e81e5b6
KS
10/***********************************************************
11 Copyright IBM Corporation 1987
12
13 All Rights Reserved
14
15Permission to use, copy, modify, and distribute this software and its
16documentation for any purpose and without fee is hereby granted,
17provided that the above copyright notice appear in all copies and that
18both that copyright notice and this permission notice appear in
19supporting documentation, and that the name of IBM not be
20used in advertising or publicity pertaining to distribution of the
21software without specific, written prior permission.
22
23IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
24ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
25IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
26ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
27WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
28ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
29SOFTWARE.
30
31******************************************************************/
32
33/*
34 * ARGO Project, Computer Sciences Dept., University of Wisconsin - Madison
35 */
36
37#define EON_986_VERSION 0x3
38#define EON_VERSION 0x1
39
40#define EON_CACHESIZE 30
41
42#define E_FREE 1
43#define E_LINK 2
44#define E_ES 3
45#define E_IS 4
46
47
48/*
49 * this overlays a sockaddr_iso
50 */
51
52struct sockaddr_eon {
a50e2bc0
KS
53 u_char seon_len; /* Length */
54 u_char seon_family; /* AF_ISO */
55 u_char seon_status; /* overlays session suffixlen */
7e81e5b6
KS
56#define EON_ESLINK_UP 0x1
57#define EON_ESLINK_DOWN 0x2
58#define EON_ISLINK_UP 0x10
59#define EON_ISLINK_DOWN 0x20
60/* no change is neither up or down */
a50e2bc0
KS
61 u_char seon_pad1; /* 0, overlays tsfxlen */
62 u_char seon_adrlen;
7e81e5b6
KS
63 u_char seon_afi; /* 47 */
64 u_char seon_idi[2]; /* 0006 */
65 u_char seon_vers; /* 03 */
a50e2bc0
KS
66 u_char seon_glbnum[2]; /* see RFC 1069 */
67 u_char seon_RDN[2]; /* see RFC 1070 */
68 u_char seon_pad2[3]; /* see RFC 1070 */
69 u_char seon_LAREA[2]; /* see RFC 1070 */
70 u_char seon_pad3[2]; /* see RFC 1070 */
7e81e5b6
KS
71 /* right now ip addr is aligned -- be careful --
72 * future revisions may have it u_char[4]
73 */
74 u_int seon_ipaddr; /* a.b.c.d */
a50e2bc0 75 u_char seon_protoid; /* NSEL */
7e81e5b6
KS
76};
77
a50e2bc0 78#ifdef EON_TEMPLATE
7e81e5b6 79struct sockaddr_eon eon_template = {
a50e2bc0
KS
80 sizeof (eon_template), AF_ISO, 0, 0, 0x14,
81 0x47, 0x0, 0x6, 0x3, 0
7e81e5b6 82};
a50e2bc0 83#endif
7e81e5b6
KS
84
85#define DOWNBITS ( EON_ESLINK_DOWN | EON_ISLINK_DOWN )
86#define UPBITS ( EON_ESLINK_UP | EON_ISLINK_UP )
87
a50e2bc0
KS
88#define SIOCSEONCORE _IOWR('i',10, struct iso_ifreq) /* EON core member */
89#define SIOCGEONCORE _IOWR('i',11, struct iso_ifreq) /* EON core member */
90
7e81e5b6
KS
91struct eon_hdr {
92 u_char eonh_vers; /* value 1 */
93 u_char eonh_class; /* address multicast class, below */
94#define EON_NORMAL_ADDR 0x0
95#define EON_MULTICAST_ES 0x1
96#define EON_MULTICAST_IS 0x2
97#define EON_BROADCAST 0x3
98 u_short eonh_csum; /* osi checksum (choke)*/
99};
6ffae239
KS
100struct eon_iphdr {
101 struct ip ei_ip;
102 struct eon_hdr ei_eh;
103};
a50e2bc0 104#define EONIPLEN (sizeof(struct eon_hdr) + sizeof(struct ip))
7e81e5b6
KS
105
106/* stole these 2 fields of the flags for I-am-ES and I-am-IS */
107#define IFF_ES 0x400
108#define IFF_IS 0x800
109
110struct eon_stat {
111 int es_in_multi_es;
112 int es_in_multi_is;
113 int es_in_broad;
114 int es_in_normal;
115 int es_out_multi_es;
116 int es_out_multi_is;
117 int es_out_broad;
118 int es_out_normal;
119 int es_ipout;
120
121 int es_icmp[PRC_NCMDS];
122 /* errors */
123 int es_badcsum;
124 int es_badhdr;
125} eonstat;
126
127#undef IncStat
128#define IncStat(xxx) eonstat.xxx++
a50e2bc0
KS
129
130typedef struct qhdr {
131 struct qhdr *link, *rlink;
132} *queue_t;
6ffae239
KS
133
134struct eon_llinfo {
135 struct qhdr el_qhdr; /* keep all in a list */
136 int el_flags; /* cache valid ? */
072a2caf 137 int el_snpaoffset; /* IP address contained in dst nsap */
6ffae239
KS
138 struct rtentry *el_rt; /* back pointer to parent route */
139 struct eon_iphdr el_ei; /* precomputed portion of hdr */
140 struct route el_iproute; /* if direct route cache IP info */
141 /* if gateway, cache secondary route */
142};
143#define el_iphdr el_ei.ei_ip
144#define el_eonhdr el_ei.ei_eh