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

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

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

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

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

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php