1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 **************************************************************************** 11 ****************************************************************************/ 12 #ifndef _LINUX_IF_HIPPI_H 13 #define _LINUX_IF_HIPPI_H 14 15 #include <asm/byteorder.h> 16 17 #define HIPPI_ALEN 6 18 #define HIPPI_HLEN sizeof(struct hippi_hdr) 19 #define HIPPI_ZLEN 0 20 #define HIPPI_DATA_LEN 65280 21 #define HIPPI_FRAME_LEN (HIPPI_DATA_LEN + HIPPI_HLEN) 22 23 #define HIPPI_EXTENDED_SAP 0xAA 24 #define HIPPI_UI_CMD 0x03 25 26 struct hipnet_statistics 27 { 28 int rx_packets; 29 int tx_packets; 30 int rx_errors; 31 int tx_errors; 32 int rx_dropped; 33 int tx_dropped; 34 35 int rx_length_errors; 36 int rx_over_errors; 37 int rx_crc_errors; 38 int rx_frame_errors; 39 int rx_fifo_errors; 40 int rx_missed_errors; 41 42 int tx_aborted_errors; 43 int tx_carrier_errors; 44 int tx_fifo_errors; 45 int tx_heartbeat_errors; 46 int tx_window_errors; 47 }; 48 49 struct hippi_fp_hdr 50 { 51 __be32 fixed; 52 __be32 d2_size; 53 } __attribute__ ((packed)); 54 55 struct hippi_le_hdr 56 { 57 #ifdef __BIG_ENDIAN_BITFIELD 58 __u8 fc:3; 59 __u8 double_wide:1; 60 __u8 message_type:4; 61 #elif defined(__LITTLE_ENDIAN_BITFIELD) 62 __u8 message_type:4; 63 __u8 double_wide:1; 64 __u8 fc:3; 65 #endif 66 __u8 dest_switch_addr[3]; 67 #ifdef __BIG_ENDIAN_BITFIELD 68 __u8 dest_addr_type:4, 69 src_addr_type:4; 70 #elif defined(__LITTLE_ENDIAN_BITFIELD) 71 __u8 src_addr_type:4, 72 dest_addr_type:4; 73 #endif 74 __u8 src_switch_addr[3]; 75 __u16 reserved; 76 __u8 daddr[HIPPI_ALEN]; 77 __u16 locally_administered; 78 __u8 saddr[HIPPI_ALEN]; 79 } __attribute__ ((packed)); 80 81 #define HIPPI_OUI_LEN 3 82 83 struct hippi_snap_hdr 84 { 85 __u8 dsap; 86 __u8 ssap; 87 __u8 ctrl; 88 __u8 oui[HIPPI_OUI_LEN]; 89 __be16 ethertype; 90 } __attribute__ ((packed)); 91 92 struct hippi_hdr 93 { 94 struct hippi_fp_hdr fp; 95 struct hippi_le_hdr le; 96 struct hippi_snap_hdr snap; 97 } __attribute__ ((packed)); 98 99 #endif 100