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