198524Sfenner/* 298524Sfenner * Copyright (c) 1982, 1986, 1993 398524Sfenner * The Regents of the University of California. All rights reserved. 498524Sfenner * 598524Sfenner * Redistribution and use in source and binary forms, with or without 698524Sfenner * modification, are permitted provided that the following conditions 798524Sfenner * are met: 898524Sfenner * 1. Redistributions of source code must retain the above copyright 998524Sfenner * notice, this list of conditions and the following disclaimer. 1098524Sfenner * 2. Redistributions in binary form must reproduce the above copyright 1198524Sfenner * notice, this list of conditions and the following disclaimer in the 1298524Sfenner * documentation and/or other materials provided with the distribution. 1398524Sfenner * 3. All advertising materials mentioning features or use of this software 1498524Sfenner * must display the following acknowledgement: 1598524Sfenner * This product includes software developed by the University of 1698524Sfenner * California, Berkeley and its contributors. 1798524Sfenner * 4. Neither the name of the University nor the names of its contributors 1898524Sfenner * may be used to endorse or promote products derived from this software 1998524Sfenner * without specific prior written permission. 2098524Sfenner * 2198524Sfenner * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2298524Sfenner * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2398524Sfenner * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2498524Sfenner * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2598524Sfenner * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2698524Sfenner * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2798524Sfenner * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2898524Sfenner * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2998524Sfenner * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3098524Sfenner * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3198524Sfenner * SUCH DAMAGE. 3298524Sfenner * 33190207Srpaulo * @(#) $Id: arcnet.h,v 1.3 2003-01-23 09:05:37 guy Exp $ (LBL) 3498524Sfenner * 3598524Sfenner * from: NetBSD: if_arc.h,v 1.13 1999/11/19 20:41:19 thorpej Exp 3698524Sfenner */ 3798524Sfenner 3898524Sfenner/* 39127668Sbms * Structure of a 2.5MB/s Arcnet header on the BSDs, 4098524Sfenner * as given to interface code. 4198524Sfenner */ 4298524Sfennerstruct arc_header { 4398524Sfenner u_int8_t arc_shost; 4498524Sfenner u_int8_t arc_dhost; 4598524Sfenner u_int8_t arc_type; 4698524Sfenner /* 4798524Sfenner * only present for newstyle encoding with LL fragmentation. 4898524Sfenner * Don't use sizeof(anything), use ARC_HDR{,NEW}LEN instead. 4998524Sfenner */ 5098524Sfenner u_int8_t arc_flag; 5198524Sfenner u_int16_t arc_seqid; 5298524Sfenner 5398524Sfenner /* 5498524Sfenner * only present in exception packets (arc_flag == 0xff) 5598524Sfenner */ 5698524Sfenner u_int8_t arc_type2; /* same as arc_type */ 5798524Sfenner u_int8_t arc_flag2; /* real flag value */ 5898524Sfenner u_int16_t arc_seqid2; /* real seqid value */ 59127668Sbms}; 6098524Sfenner 6198524Sfenner#define ARC_HDRLEN 3 6298524Sfenner#define ARC_HDRNEWLEN 6 6398524Sfenner#define ARC_HDRNEWLEN_EXC 10 6498524Sfenner 6598524Sfenner/* RFC 1051 */ 6698524Sfenner#define ARCTYPE_IP_OLD 240 /* IP protocol */ 6798524Sfenner#define ARCTYPE_ARP_OLD 241 /* address resolution protocol */ 6898524Sfenner 6998524Sfenner/* RFC 1201 */ 7098524Sfenner#define ARCTYPE_IP 212 /* IP protocol */ 7198524Sfenner#define ARCTYPE_ARP 213 /* address resolution protocol */ 7298524Sfenner#define ARCTYPE_REVARP 214 /* reverse addr resolution protocol */ 7398524Sfenner 7498524Sfenner#define ARCTYPE_ATALK 221 /* Appletalk */ 7598524Sfenner#define ARCTYPE_BANIAN 247 /* Banyan Vines */ 7698524Sfenner#define ARCTYPE_IPX 250 /* Novell IPX */ 7798524Sfenner 7898524Sfenner#define ARCTYPE_INET6 0xc4 /* IPng */ 7998524Sfenner#define ARCTYPE_DIAGNOSE 0x80 /* as per ANSI/ATA 878.1 */ 80127668Sbms 81127668Sbms/* 82127668Sbms * Structure of a 2.5MB/s Arcnet header on Linux. Linux has 83127668Sbms * an extra "offset" field when given to interface code, and 84127668Sbms * never presents packets that look like exception frames. 85127668Sbms */ 86127668Sbmsstruct arc_linux_header { 87127668Sbms u_int8_t arc_shost; 88127668Sbms u_int8_t arc_dhost; 89127668Sbms u_int16_t arc_offset; 90127668Sbms u_int8_t arc_type; 91127668Sbms /* 92127668Sbms * only present for newstyle encoding with LL fragmentation. 93127668Sbms * Don't use sizeof(anything), use ARC_LINUX_HDR{,NEW}LEN 94127668Sbms * instead. 95127668Sbms */ 96127668Sbms u_int8_t arc_flag; 97127668Sbms u_int16_t arc_seqid; 98127668Sbms}; 99127668Sbms 100127668Sbms#define ARC_LINUX_HDRLEN 5 101127668Sbms#define ARC_LINUX_HDRNEWLEN 8 102