/* 
 * fddi_i.h 
 *
 * x-kernel v3.3
 *
 * Copyright (c) 1993,1991,1990,1996  Arizona Board of Regents
 *
 * $Log: fddi_i.h,v $
 * Revision 1.2  1996/01/29 22:14:37  slm
 * Updated copyright and version.
 *
 * Revision 1.1  1995/07/28  22:13:01  slm
 * Initial revision
 *
 * Revision 1.2.1.1  1994/11/12  19:40:12  hkaram
 * New branch
 *
 * Revision 1.2  1993/12/23  02:11:10  menze
 * Removed prototypes for obsolete form of device-protocol interface
 *
 * Revision 1.1  1993/11/13  00:52:01  menze
 * Original version from UMass
 *
 * Based on xkernel/protocols/eth/eth_i.h (DJY)
 */

/*
 * Information shared between the FDDI protocol and the driver
 */

#ifndef fddi_i_h
#define fddi_i_h

#include "llc802_2_host.h"
#include "fddi.h"

extern int tracefddip;

/*
 * range of legal data sizes
 */

#define MIN_FDDI_DATA_SIZE	0

/*
 * Packet Format from RFC 1390 (January 1993)
 *
 * IP datagrams and ARP requests and replies sent on FDDI networks shall
 * be encapsulated within the 802.2 LLC and Sub-Network Access Protocol
 * (SNAP) [12] data link layers and the FDDI MAC and physical layers.
 * The SNAP must be used with an Organization Code indicating that the
 * SNAP header contains the EtherType code (as listed in Assigned
 * Numbers [13]).
 *
 * 802.2 LLC Type 1 communication (which must be implemented by all
 * conforming 802.2 stations) is used exclusively.  All frames must be
 * transmitted in standard 802.2 LLC Type 1 Unnumbered Information
 * format, with the DSAP and the SSAP fields of the 802.2 header set to
 * the assigned global SAP value for SNAP [11].  The 24-bit Organization
 * Code in the SNAP must be zero, and the remaining 16 bits are the
 * EtherType from Assigned Numbers [13] (IP = 2048, ARP = 2054).
 *
 *
 *    ...--------+--------+--------+
 *               MAC Header        |                           FDDI MAC
 *    ...--------+--------+--------+
 *
 *    +--------+--------+--------+
 *    | DSAP=K1| SSAP=K1| Control|                            802.2 LLC
 *    +--------+--------+--------+
 *
 *    +--------+--------+---------+--------+--------+
 *    |Protocol Id or Org Code =K2|    EtherType    |        802.2 SNAP
 *    +--------+--------+---------+--------+--------+
 *
 *    The total length of the LLC Header and the SNAP header is 8
 *    octets.
 *
 *    The K1 value is 170 (decimal).
 *
 *    The K2 value is 0 (zero).
 *
 *    The control value is 3 (Unnumbered Information).
 */

#define FDDI_SNAP_DSAP          170
#define FDDI_SNAP_SSAP          170
#define FDDI_SNAP_CONTROL         3   /* unnumbered information */
#define FDDI_SNAP_ORGCODEPART1    0
#define FDDI_SNAP_ORGCODEPART2    0

typedef struct {
    FDDIhost	     dst;
    FDDIhost	     src;
    llc802_2_Type    llc;
} FDDIhdr;



#endif  /* fddi_i_h */
