| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 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 |  ***   To edit the content of this header, modify the corresponding | 
 | 11 |  ***   source file (e.g. under external/kernel-headers/original/) then | 
 | 12 |  ***   run bionic/libc/kernel/tools/update_all.py | 
 | 13 |  *** | 
 | 14 |  ***   Any manual change here will be lost the next time this script will | 
 | 15 |  ***   be run. You've been warned! | 
 | 16 |  *** | 
 | 17 |  **************************************************************************** | 
 | 18 |  ****************************************************************************/ | 
 | 19 | #ifndef _LINUX_IF_HIPPI_H | 
 | 20 | #define _LINUX_IF_HIPPI_H | 
 | 21 | #include <linux/types.h> | 
 | 22 | #include <asm/byteorder.h> | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 23 | #define HIPPI_ALEN 6 | 
 | 24 | #define HIPPI_HLEN sizeof(struct hippi_hdr) | 
 | 25 | #define HIPPI_ZLEN 0 | 
 | 26 | #define HIPPI_DATA_LEN 65280 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 27 | #define HIPPI_FRAME_LEN (HIPPI_DATA_LEN + HIPPI_HLEN) | 
 | 28 | #define HIPPI_EXTENDED_SAP 0xAA | 
 | 29 | #define HIPPI_UI_CMD 0x03 | 
 | 30 | struct hipnet_statistics { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 31 |   int rx_packets; | 
 | 32 |   int tx_packets; | 
 | 33 |   int rx_errors; | 
 | 34 |   int tx_errors; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 35 |   int rx_dropped; | 
 | 36 |   int tx_dropped; | 
 | 37 |   int rx_length_errors; | 
 | 38 |   int rx_over_errors; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 39 |   int rx_crc_errors; | 
 | 40 |   int rx_frame_errors; | 
 | 41 |   int rx_fifo_errors; | 
 | 42 |   int rx_missed_errors; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 43 |   int tx_aborted_errors; | 
 | 44 |   int tx_carrier_errors; | 
 | 45 |   int tx_fifo_errors; | 
 | 46 |   int tx_heartbeat_errors; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 47 |   int tx_window_errors; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 48 | }; | 
 | 49 | struct hippi_fp_hdr { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 50 |   __be32 fixed; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 51 |   __be32 d2_size; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 52 | } __attribute__((packed)); | 
 | 53 | struct hippi_le_hdr { | 
 | 54 | #ifdef __BIG_ENDIAN_BITFIELD | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 55 |   __u8 fc : 3; | 
 | 56 |   __u8 double_wide : 1; | 
 | 57 |   __u8 message_type : 4; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 58 | #elif defined(__LITTLE_ENDIAN_BITFIELD) | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 59 |   __u8 message_type : 4; | 
 | 60 |   __u8 double_wide : 1; | 
 | 61 |   __u8 fc : 3; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 62 | #endif | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 63 |   __u8 dest_switch_addr[3]; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 64 | #ifdef __BIG_ENDIAN_BITFIELD | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 65 |   __u8 dest_addr_type : 4, src_addr_type : 4; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 66 | #elif defined(__LITTLE_ENDIAN_BITFIELD) | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 67 |   __u8 src_addr_type : 4, dest_addr_type : 4; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 68 | #endif | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 69 |   __u8 src_switch_addr[3]; | 
 | 70 |   __u16 reserved; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 71 |   __u8 daddr[HIPPI_ALEN]; | 
 | 72 |   __u16 locally_administered; | 
 | 73 |   __u8 saddr[HIPPI_ALEN]; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 74 | } __attribute__((packed)); | 
 | 75 | #define HIPPI_OUI_LEN 3 | 
 | 76 | struct hippi_snap_hdr { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 77 |   __u8 dsap; | 
 | 78 |   __u8 ssap; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 79 |   __u8 ctrl; | 
 | 80 |   __u8 oui[HIPPI_OUI_LEN]; | 
 | 81 |   __be16 ethertype; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 82 | } __attribute__((packed)); | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 83 | struct hippi_hdr { | 
 | 84 |   struct hippi_fp_hdr fp; | 
 | 85 |   struct hippi_le_hdr le; | 
 | 86 |   struct hippi_snap_hdr snap; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 87 | } __attribute__((packed)); | 
 | 88 | #endif |