|
|
1.1 root 1: /*-
2: * Copyright (c) 1991 The Regents of the University of California.
3: * All rights reserved.
4: *
5: * Redistribution and use in source and binary forms, with or without
6: * modification, are permitted provided that the following conditions
7: * are met:
8: * 1. Redistributions of source code must retain the above copyright
9: * notice, this list of conditions and the following disclaimer.
10: * 2. Redistributions in binary form must reproduce the above copyright
11: * notice, this list of conditions and the following disclaimer in the
12: * documentation and/or other materials provided with the distribution.
13: * 3. All advertising materials mentioning features or use of this software
14: * must display the following acknowledgement:
15: * This product includes software developed by the University of
16: * California, Berkeley and its contributors.
17: * 4. Neither the name of the University nor the names of its contributors
18: * may be used to endorse or promote products derived from this software
19: * without specific prior written permission.
20: *
21: * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24: * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31: * SUCH DAMAGE.
32: *
1.1.1.2 ! root 33: * from: @(#)eonvar.h 7.5 (Berkeley) 5/6/91
! 34: * eonvar.h,v 1.3 1993/05/20 05:27:05 cgd Exp
1.1 root 35: */
36:
1.1.1.2 ! root 37: #ifndef _NETISO_EONVAR_H_
! 38: #define _NETISO_EONVAR_H_
! 39:
1.1 root 40: /***********************************************************
41: Copyright IBM Corporation 1987
42:
43: All Rights Reserved
44:
45: Permission to use, copy, modify, and distribute this software and its
46: documentation for any purpose and without fee is hereby granted,
47: provided that the above copyright notice appear in all copies and that
48: both that copyright notice and this permission notice appear in
49: supporting documentation, and that the name of IBM not be
50: used in advertising or publicity pertaining to distribution of the
51: software without specific, written prior permission.
52:
53: IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
54: ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
55: IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
56: ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
57: WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
58: ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
59: SOFTWARE.
60:
61: ******************************************************************/
62:
63: /*
64: * ARGO Project, Computer Sciences Dept., University of Wisconsin - Madison
65: */
66:
67: #define EON_986_VERSION 0x3
68: #define EON_VERSION 0x1
69:
70: #define EON_CACHESIZE 30
71:
72: #define E_FREE 1
73: #define E_LINK 2
74: #define E_ES 3
75: #define E_IS 4
76:
77:
78: /*
79: * this overlays a sockaddr_iso
80: */
81:
82: struct sockaddr_eon {
83: u_char seon_len; /* Length */
84: u_char seon_family; /* AF_ISO */
85: u_char seon_status; /* overlays session suffixlen */
86: #define EON_ESLINK_UP 0x1
87: #define EON_ESLINK_DOWN 0x2
88: #define EON_ISLINK_UP 0x10
89: #define EON_ISLINK_DOWN 0x20
90: /* no change is neither up or down */
91: u_char seon_pad1; /* 0, overlays tsfxlen */
92: u_char seon_adrlen;
93: u_char seon_afi; /* 47 */
94: u_char seon_idi[2]; /* 0006 */
95: u_char seon_vers; /* 03 */
96: u_char seon_glbnum[2]; /* see RFC 1069 */
97: u_char seon_RDN[2]; /* see RFC 1070 */
98: u_char seon_pad2[3]; /* see RFC 1070 */
99: u_char seon_LAREA[2]; /* see RFC 1070 */
100: u_char seon_pad3[2]; /* see RFC 1070 */
101: /* right now ip addr is aligned -- be careful --
102: * future revisions may have it u_char[4]
103: */
104: u_int seon_ipaddr; /* a.b.c.d */
105: u_char seon_protoid; /* NSEL */
106: };
107:
108: #ifdef EON_TEMPLATE
109: struct sockaddr_eon eon_template = {
110: sizeof (eon_template), AF_ISO, 0, 0, 0x14,
111: 0x47, 0x0, 0x6, 0x3, 0
112: };
113: #endif
114:
115: #define DOWNBITS ( EON_ESLINK_DOWN | EON_ISLINK_DOWN )
116: #define UPBITS ( EON_ESLINK_UP | EON_ISLINK_UP )
117:
118: #define SIOCSEONCORE _IOWR('i',10, struct iso_ifreq) /* EON core member */
119: #define SIOCGEONCORE _IOWR('i',11, struct iso_ifreq) /* EON core member */
120:
121: struct eon_hdr {
122: u_char eonh_vers; /* value 1 */
123: u_char eonh_class; /* address multicast class, below */
124: #define EON_NORMAL_ADDR 0x0
125: #define EON_MULTICAST_ES 0x1
126: #define EON_MULTICAST_IS 0x2
127: #define EON_BROADCAST 0x3
128: u_short eonh_csum; /* osi checksum (choke)*/
129: };
130: struct eon_iphdr {
131: struct ip ei_ip;
132: struct eon_hdr ei_eh;
133: };
134: #define EONIPLEN (sizeof(struct eon_hdr) + sizeof(struct ip))
135:
136: /* stole these 2 fields of the flags for I-am-ES and I-am-IS */
137: #define IFF_ES 0x400
138: #define IFF_IS 0x800
139:
140: struct eon_stat {
141: int es_in_multi_es;
142: int es_in_multi_is;
143: int es_in_broad;
144: int es_in_normal;
145: int es_out_multi_es;
146: int es_out_multi_is;
147: int es_out_broad;
148: int es_out_normal;
149: int es_ipout;
150:
151: int es_icmp[PRC_NCMDS];
152: /* errors */
153: int es_badcsum;
154: int es_badhdr;
155: } eonstat;
156:
157: #undef IncStat
158: #define IncStat(xxx) eonstat.xxx++
159:
160: typedef struct qhdr {
161: struct qhdr *link, *rlink;
162: } *queue_t;
163:
164: struct eon_llinfo {
165: struct qhdr el_qhdr; /* keep all in a list */
166: int el_flags; /* cache valid ? */
167: int el_snpaoffset; /* IP address contained in dst nsap */
168: struct rtentry *el_rt; /* back pointer to parent route */
169: struct eon_iphdr el_ei; /* precomputed portion of hdr */
170: struct route el_iproute; /* if direct route cache IP info */
171: /* if gateway, cache secondary route */
172: };
173: #define el_iphdr el_ei.ei_ip
174: #define el_eonhdr el_ei.ei_eh
1.1.1.2 ! root 175:
! 176: #endif /* !_NETISO_EONVAR_H_ */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.