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

TOMOYO Linux Cross Reference
Linux/include/uapi/linux/if_hippi.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 HIPPI interface.
  8  *
  9  * Version:     @(#)if_hippi.h  1.0.0   05/26/97
 10  *
 11  * Author:      Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
 12  *              Donald Becker, <becker@super.org>
 13  *              Alan Cox, <alan@lxorguk.ukuu.org.uk>
 14  *              Steve Whitehouse, <gw7rrm@eeshack3.swan.ac.uk>
 15  *              Jes Sorensen, <Jes.Sorensen@cern.ch>
 16  *
 17  *              This program is free software; you can redistribute it and/or
 18  *              modify it under the terms of the GNU General Public License
 19  *              as published by the Free Software Foundation; either version
 20  *              2 of the License, or (at your option) any later version.
 21  */
 22  
 23 #ifndef _LINUX_IF_HIPPI_H
 24 #define _LINUX_IF_HIPPI_H
 25 
 26 #include <linux/types.h>
 27 #include <asm/byteorder.h>
 28 
 29 /*
 30  *      HIPPI magic constants.
 31  */
 32 
 33 #define HIPPI_ALEN      6               /* Bytes in one HIPPI hw-addr      */
 34 #define HIPPI_HLEN      sizeof(struct hippi_hdr)
 35 #define HIPPI_ZLEN      0               /* Min. bytes in frame without FCS */
 36 #define HIPPI_DATA_LEN  65280           /* Max. bytes in payload           */
 37 #define HIPPI_FRAME_LEN (HIPPI_DATA_LEN + HIPPI_HLEN)
 38                                         /* Max. bytes in frame without FCS */
 39 
 40 /*
 41  * Define LLC and SNAP constants.
 42  */
 43 #define HIPPI_EXTENDED_SAP      0xAA
 44 #define HIPPI_UI_CMD            0x03
 45 
 46 
 47 /*
 48  *      Do we need to list some sort of ID's here?
 49  */
 50 
 51 /*
 52  *      HIPPI statistics collection data. 
 53  */
 54  
 55 struct hipnet_statistics {
 56         int     rx_packets;             /* total packets received       */
 57         int     tx_packets;             /* total packets transmitted    */
 58         int     rx_errors;              /* bad packets received         */
 59         int     tx_errors;              /* packet transmit problems     */
 60         int     rx_dropped;             /* no space in linux buffers    */
 61         int     tx_dropped;             /* no space available in linux  */
 62 
 63         /* detailed rx_errors: */
 64         int     rx_length_errors;
 65         int     rx_over_errors;         /* receiver ring buff overflow  */
 66         int     rx_crc_errors;          /* recved pkt with crc error    */
 67         int     rx_frame_errors;        /* recv'd frame alignment error */
 68         int     rx_fifo_errors;         /* recv'r fifo overrun          */
 69         int     rx_missed_errors;       /* receiver missed packet       */
 70 
 71         /* detailed tx_errors */
 72         int     tx_aborted_errors;
 73         int     tx_carrier_errors;
 74         int     tx_fifo_errors;
 75         int     tx_heartbeat_errors;
 76         int     tx_window_errors;
 77 };
 78 
 79 
 80 struct hippi_fp_hdr {
 81 #if 0
 82         __u8            ulp;                            /* must contain 4 */
 83 #if defined (__BIG_ENDIAN_BITFIELD)
 84         __u8            d1_data_present:1;              /* must be 1 */
 85         __u8            start_d2_burst_boundary:1;      /* must be zero */
 86         __u8            reserved:6;                     /* must be zero */
 87 #if 0
 88         __u16           reserved1:5;
 89         __u16           d1_area_size:8;                 /* must be 3 */
 90         __u16           d2_offset:3;                    /* must be zero */
 91 #endif
 92 #elif defined(__LITTLE_ENDIAN_BITFIELD)
 93         __u8            reserved:6;                     /* must be zero */
 94         __u8            start_d2_burst_boundary:1;      /* must be zero */
 95         __u8            d1_data_present:1;              /* must be 1 */
 96 #if 0
 97         __u16           d2_offset:3;                    /* must be zero */
 98         __u16           d1_area_size:8;                 /* must be 3 */
 99         __u16           reserved1:5;                    /* must be zero */
100 #endif
101 #else
102 #error  "Please fix <asm/byteorder.h>"
103 #endif
104 #else
105         __be32          fixed;
106 #endif
107         __be32          d2_size;
108 } __attribute__((packed));
109 
110 struct hippi_le_hdr {
111 #if defined (__BIG_ENDIAN_BITFIELD)
112         __u8            fc:3;
113         __u8            double_wide:1;
114         __u8            message_type:4;
115 #elif defined(__LITTLE_ENDIAN_BITFIELD)
116         __u8            message_type:4;
117         __u8            double_wide:1;
118         __u8            fc:3;
119 #endif
120         __u8            dest_switch_addr[3];
121 #if defined (__BIG_ENDIAN_BITFIELD)
122         __u8            dest_addr_type:4,
123                         src_addr_type:4;
124 #elif defined(__LITTLE_ENDIAN_BITFIELD)
125         __u8            src_addr_type:4,
126                         dest_addr_type:4;
127 #endif
128         __u8            src_switch_addr[3];
129         __u16           reserved;
130         __u8            daddr[HIPPI_ALEN];
131         __u16           locally_administered;
132         __u8            saddr[HIPPI_ALEN];
133 } __attribute__((packed));
134 
135 #define HIPPI_OUI_LEN   3
136 /*
137  * Looks like the dsap and ssap fields have been swapped by mistake in
138  * RFC 2067 "IP over HIPPI".
139  */
140 struct hippi_snap_hdr {
141         __u8    dsap;                   /* always 0xAA */
142         __u8    ssap;                   /* always 0xAA */
143         __u8    ctrl;                   /* always 0x03 */
144         __u8    oui[HIPPI_OUI_LEN];     /* organizational universal id (zero)*/
145         __be16  ethertype;              /* packet type ID field */
146 } __attribute__((packed));
147 
148 struct hippi_hdr {
149         struct hippi_fp_hdr     fp;
150         struct hippi_le_hdr     le;
151         struct hippi_snap_hdr   snap;
152 } __attribute__((packed));
153 
154 #endif  /* _LINUX_IF_HIPPI_H */
155 

~ [ 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