fddi.h revision 152296
1139823Simp/*- 27055Sdg * Copyright (c) 1982, 1986, 1993 37055Sdg * The Regents of the University of California. All rights reserved. 421830Sjoerg * Copyright (c) 1995 Matt Thomas (thomas@lkg.dec.com) 521830Sjoerg * All rights reserved. 67055Sdg * 77055Sdg * Redistribution and use in source and binary forms, with or without 87055Sdg * modification, are permitted provided that the following conditions 97055Sdg * are met: 107055Sdg * 1. Redistributions of source code must retain the above copyright 117055Sdg * notice, this list of conditions and the following disclaimer. 127055Sdg * 2. Redistributions in binary form must reproduce the above copyright 137055Sdg * notice, this list of conditions and the following disclaimer in the 147055Sdg * documentation and/or other materials provided with the distribution. 157055Sdg * 3. All advertising materials mentioning features or use of this software 167055Sdg * must display the following acknowledgement: 177055Sdg * This product includes software developed by the University of 187055Sdg * California, Berkeley and its contributors. 197055Sdg * 4. Neither the name of the University nor the names of its contributors 207055Sdg * may be used to endorse or promote products derived from this software 217055Sdg * without specific prior written permission. 227055Sdg * 237055Sdg * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 247055Sdg * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 257055Sdg * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 267055Sdg * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 277055Sdg * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 287055Sdg * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 297055Sdg * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 307055Sdg * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 317055Sdg * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 327055Sdg * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 337055Sdg * SUCH DAMAGE. 347055Sdg * 357055Sdg * @(#)if_fddi.h 8.1 (Berkeley) 6/10/93 3650477Speter * $FreeBSD: head/sys/net/fddi.h 152296 2005-11-11 07:36:14Z ru $ 377055Sdg */ 387055Sdg 397055Sdg#ifndef _NETINET_IF_FDDI_H_ 407055Sdg#define _NETINET_IF_FDDI_H_ 417055Sdg 4221830Sjoerg#define FDDIIPMTU 4352 437055Sdg#define FDDIMTU 4470 447055Sdg#define FDDIMIN 3 457055Sdg 467055Sdg#define FDDIFC_C 0x80 /* 0b10000000 */ 477055Sdg#define FDDIFC_L 0x40 /* 0b01000000 */ 487055Sdg#define FDDIFC_F 0x30 /* 0b00110000 */ 497055Sdg#define FDDIFC_Z 0x0F /* 0b00001111 */ 5093372Smdodd#define FDDIFC_CLFF 0xF0 /* Class/Length/Format bits */ 5193372Smdodd#define FDDIFC_ZZZZ 0x0F /* Control bits */ 527055Sdg 5393372Smdodd/* 5493372Smdodd * FDDI Frame Control values. (48-bit addressing only). 5593372Smdodd */ 5693372Smdodd#define FDDIFC_VOID 0x40 /* Void frame */ 5793372Smdodd#define FDDIFC_NRT 0x80 /* Nonrestricted token */ 5893372Smdodd#define FDDIFC_RT 0xc0 /* Restricted token */ 5993372Smdodd#define FDDIFC_MAC_BEACON 0xc2 /* MAC Beacon frame */ 6093372Smdodd#define FDDIFC_MAC_CLAIM 0xc3 /* MAC Claim frame */ 617055Sdg#define FDDIFC_LLC_ASYNC 0x50 627055Sdg#define FDDIFC_LLC_PRIO0 0 637055Sdg#define FDDIFC_LLC_PRIO1 1 647055Sdg#define FDDIFC_LLC_PRIO2 2 657055Sdg#define FDDIFC_LLC_PRIO3 3 667055Sdg#define FDDIFC_LLC_PRIO4 4 677055Sdg#define FDDIFC_LLC_PRIO5 5 687055Sdg#define FDDIFC_LLC_PRIO6 6 697055Sdg#define FDDIFC_LLC_PRIO7 7 7093372Smdodd#define FDDIFC_LLC_SYNC 0xd0 7193372Smdodd#define FDDIFC_IMP_ASYNC 0x60 /* Implementor Async. */ 7293372Smdodd#define FDDIFC_IMP_SYNC 0xe0 /* Implementor Synch. */ 737055Sdg#define FDDIFC_SMT 0x40 7493372Smdodd#define FDDIFC_SMT_INFO 0x41 /* SMT Info */ 7593372Smdodd#define FDDIFC_SMT_NSA 0x4F /* SMT Next station adrs */ 7693372Smdodd#define FDDIFC_MAC 0xc0 /* MAC frame */ 777055Sdg 7893372Smdodd#define FDDI_ADDR_LEN 6 7993372Smdodd#define FDDI_HDR_LEN (sizeof(struct fddi_header)) 8093372Smdodd 8193372Smdodd/* 8293372Smdodd * Structure of an 100Mb/s FDDI header. 8393372Smdodd */ 8493372Smdoddstruct fddi_header { 8593372Smdodd u_char fddi_fc; 8693372Smdodd u_char fddi_dhost[FDDI_ADDR_LEN]; 8793372Smdodd u_char fddi_shost[FDDI_ADDR_LEN]; 8893372Smdodd}; 8993372Smdodd 9055205Speter#if defined(_KERNEL) 917055Sdg#define fddi_ipmulticast_min ether_ipmulticast_min 927055Sdg#define fddi_ipmulticast_max ether_ipmulticast_max 937055Sdg#define fddi_addmulti ether_addmulti 947055Sdg#define fddi_delmulti ether_delmulti 9521830Sjoerg#define fddi_sprintf ether_sprintf 967055Sdg 9793382Smdodd#define FDDI_BPF_UNSUPPORTED 0 9893382Smdodd#define FDDI_BPF_SUPPORTED 1 997055Sdg 100152296Sruvoid fddi_ifattach(struct ifnet *, const u_int8_t *, int); 10193382Smdoddvoid fddi_ifdetach(struct ifnet *, int); 10293382Smdoddint fddi_ioctl(struct ifnet *, int, caddr_t); 10393382Smdodd 10493372Smdodd#endif /* _KERNEL */ 10593372Smdodd#endif /* _NET_FDDI_H_ */ 106