2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
20 * @APPLE_LICENSE_HEADER_END@
23 * Copyright (c) 1991, 1993
24 * The Regents of the University of California. All rights reserved.
26 * Redistribution and use in source and binary forms, with or without
27 * modification, are permitted provided that the following conditions
29 * 1. Redistributions of source code must retain the above copyright
30 * notice, this list of conditions and the following disclaimer.
31 * 2. Redistributions in binary form must reproduce the above copyright
32 * notice, this list of conditions and the following disclaimer in the
33 * documentation and/or other materials provided with the distribution.
34 * 3. All advertising materials mentioning features or use of this software
35 * must display the following acknowledgement:
36 * This product includes software developed by the University of
37 * California, Berkeley and its contributors.
38 * 4. Neither the name of the University nor the names of its contributors
39 * may be used to endorse or promote products derived from this software
40 * without specific prior written permission.
42 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
43 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
44 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
45 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
46 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
47 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
48 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
49 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
50 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
51 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
54 * @(#)eonvar.h 8.1 (Berkeley) 6/10/93
57 /***********************************************************
58 Copyright IBM Corporation 1987
62 Permission to use, copy, modify, and distribute this software and its
63 documentation for any purpose and without fee is hereby granted,
64 provided that the above copyright notice appear in all copies and that
65 both that copyright notice and this permission notice appear in
66 supporting documentation, and that the name of IBM not be
67 used in advertising or publicity pertaining to distribution of the
68 software without specific, written prior permission.
70 IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
71 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
72 IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
73 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
74 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
75 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
78 ******************************************************************/
81 * ARGO Project, Computer Sciences Dept., University of Wisconsin - Madison
84 #define EON_986_VERSION 0x3
85 #define EON_VERSION 0x1
87 #define EON_CACHESIZE 30
96 * this overlays a sockaddr_iso
100 u_char seon_len
; /* Length */
101 u_char seon_family
; /* AF_ISO */
102 u_char seon_status
; /* overlays session suffixlen */
103 #define EON_ESLINK_UP 0x1
104 #define EON_ESLINK_DOWN 0x2
105 #define EON_ISLINK_UP 0x10
106 #define EON_ISLINK_DOWN 0x20
107 /* no change is neither up or down */
108 u_char seon_pad1
; /* 0, overlays tsfxlen */
110 u_char seon_afi
; /* 47 */
111 u_char seon_idi
[2]; /* 0006 */
112 u_char seon_vers
; /* 03 */
113 u_char seon_glbnum
[2]; /* see RFC 1069 */
114 u_char seon_RDN
[2]; /* see RFC 1070 */
115 u_char seon_pad2
[3]; /* see RFC 1070 */
116 u_char seon_LAREA
[2]; /* see RFC 1070 */
117 u_char seon_pad3
[2]; /* see RFC 1070 */
118 /* right now ip addr is aligned -- be careful --
119 * future revisions may have it u_char[4]
121 u_int seon_ipaddr
; /* a.b.c.d */
122 u_char seon_protoid
; /* NSEL */
126 struct sockaddr_eon eon_template
= {
127 sizeof (eon_template
), AF_ISO
, 0, 0, 0x14,
128 0x47, 0x0, 0x6, 0x3, 0
132 #define DOWNBITS ( EON_ESLINK_DOWN | EON_ISLINK_DOWN )
133 #define UPBITS ( EON_ESLINK_UP | EON_ISLINK_UP )
135 #define SIOCSEONCORE _IOWR('i',10, struct iso_ifreq) /* EON core member */
136 #define SIOCGEONCORE _IOWR('i',11, struct iso_ifreq) /* EON core member */
139 u_char eonh_vers
; /* value 1 */
140 u_char eonh_class
; /* address multicast class, below */
141 #define EON_NORMAL_ADDR 0x0
142 #define EON_MULTICAST_ES 0x1
143 #define EON_MULTICAST_IS 0x2
144 #define EON_BROADCAST 0x3
145 u_short eonh_csum
; /* osi checksum (choke)*/
149 struct eon_hdr ei_eh
;
151 #define EONIPLEN (sizeof(struct eon_hdr) + sizeof(struct ip))
153 /* stole these 2 fields of the flags for I-am-ES and I-am-IS */
168 int es_icmp
[PRC_NCMDS
];
175 #define IncStat(xxx) eonstat.xxx++
177 typedef struct qhdr
{
178 struct qhdr
*link
, *rlink
;
182 struct qhdr el_qhdr
; /* keep all in a list */
183 int el_flags
; /* cache valid ? */
184 int el_snpaoffset
; /* IP address contained in dst nsap */
185 struct rtentry
*el_rt
; /* back pointer to parent route */
186 struct eon_iphdr el_ei
; /* precomputed portion of hdr */
187 struct route el_iproute
; /* if direct route cache IP info */
188 /* if gateway, cache secondary route */
190 #define el_iphdr el_ei.ei_ip
191 #define el_eonhdr el_ei.ei_eh