~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Linux/include/linux/if_arcnet.h

Version: ~ [ 2.4.0 ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * INET         An implementation of the TCP/IP protocol suite for the LINUX
  3  *              operating system.  INET is implemented using the  BSD Socket
  4  *              interface as the means of communication with the user level.
  5  *
  6  *              Global definitions for the ARCnet interface.
  7  *
  8  * Authors:     David Woodhouse and Avery Pennarun
  9  *
 10  *              This program is free software; you can redistribute it and/or
 11  *              modify it under the terms of the GNU General Public License
 12  *              as published by the Free Software Foundation; either version
 13  *              2 of the License, or (at your option) any later version.
 14  */
 15 
 16 #ifndef _LINUX_IF_ARCNET_H
 17 #define _LINUX_IF_ARCNET_H
 18 
 19 #include <linux/if_ether.h>
 20 
 21 
 22 /*
 23  *    These are the defined ARCnet Protocol ID's.
 24  */
 25 
 26 /* RFC1201 Protocol ID's */
 27 #define ARC_P_IP                212     /* 0xD4 */
 28 #define ARC_P_ARP               213     /* 0xD5 */
 29 #define ARC_P_RARP              214     /* 0xD6 */
 30 #define ARC_P_IPX               250     /* 0xFA */
 31 #define ARC_P_NOVELL_EC         236     /* 0xEC */
 32 
 33 /* Old RFC1051 Protocol ID's */
 34 #define ARC_P_IP_RFC1051        240     /* 0xF0 */
 35 #define ARC_P_ARP_RFC1051       241     /* 0xF1 */
 36 
 37 /* MS LanMan/WfWg "NDIS" encapsulation */
 38 #define ARC_P_ETHER             232     /* 0xE8 */
 39 
 40 /* Unsupported/indirectly supported protocols */
 41 #define ARC_P_DATAPOINT_BOOT    0       /* very old Datapoint equipment */
 42 #define ARC_P_DATAPOINT_MOUNT   1
 43 #define ARC_P_POWERLAN_BEACON   8       /* Probably ATA-Netbios related */
 44 #define ARC_P_POWERLAN_BEACON2  243     /* 0xF3 */
 45 #define ARC_P_LANSOFT           251     /* 0xFB - what is this? */
 46 #define ARC_P_ATALK             0xDD
 47 
 48 /*
 49  * The RFC1201-specific components of an arcnet packet header.
 50  */
 51 struct arc_rfc1201
 52 {
 53     uint8_t  proto;             /* protocol ID field - varies           */
 54     uint8_t  split_flag;        /* for use with split packets           */
 55     uint16_t sequence;          /* sequence number                      */
 56     uint8_t  payload[0];        /* space remaining in packet (504 bytes)*/
 57 };
 58 #define RFC1201_HDR_SIZE 4
 59 
 60 
 61 /*
 62  * The RFC1051-specific components.
 63  */
 64 struct arc_rfc1051
 65 {
 66     uint8_t proto;              /* ARC_P_RFC1051_ARP/RFC1051_IP */
 67     uint8_t payload[0];         /* 507 bytes                    */
 68 };
 69 #define RFC1051_HDR_SIZE 1
 70 
 71 
 72 /*
 73  * The ethernet-encap-specific components.  We have a real ethernet header
 74  * and some data.
 75  */
 76 struct arc_eth_encap
 77 {
 78     uint8_t proto;              /* Always ARC_P_ETHER                   */
 79     struct ethhdr eth;          /* standard ethernet header (yuck!)     */
 80     uint8_t payload[0];         /* 493 bytes                            */
 81 };
 82 #define ETH_ENCAP_HDR_SIZE 14
 83 
 84 
 85 /*
 86  * The data needed by the actual arcnet hardware.
 87  *
 88  * Now, in the real arcnet hardware, the third and fourth bytes are the
 89  * 'offset' specification instead of the length, and the soft data is at
 90  * the _end_ of the 512-byte buffer.  We hide this complexity inside the
 91  * driver.
 92  */
 93 struct arc_hardware
 94 {
 95     uint8_t  source,            /* source ARCnet - filled in automagically */
 96              dest,              /* destination ARCnet - 0 for broadcast    */
 97              offset[2];         /* offset bytes (some weird semantics)     */
 98 };
 99 #define ARC_HDR_SIZE 4
100 
101 /*
102  * This is an ARCnet frame header, as seen by the kernel (and userspace,
103  * when you do a raw packet capture).
104  */
105 struct archdr
106 {
107     /* hardware requirements */
108     struct arc_hardware hard;
109      
110     /* arcnet encapsulation-specific bits */
111     union {
112         struct arc_rfc1201   rfc1201;
113         struct arc_rfc1051   rfc1051;
114         struct arc_eth_encap eth_encap;
115         uint8_t raw[0];         /* 508 bytes                            */
116     } soft;
117 };
118 
119 #endif                          /* _LINUX_IF_ARCNET_H */
120 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.