Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is auto-generated. Modifications will be lost. |
| 3 | * |
| 4 | * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ |
| 5 | * for more information. |
| 6 | */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 7 | #ifndef _LINUX_IF_HIPPI_H |
| 8 | #define _LINUX_IF_HIPPI_H |
| 9 | #include <linux/types.h> |
| 10 | #include <asm/byteorder.h> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 11 | #define HIPPI_ALEN 6 |
| 12 | #define HIPPI_HLEN sizeof(struct hippi_hdr) |
| 13 | #define HIPPI_ZLEN 0 |
| 14 | #define HIPPI_DATA_LEN 65280 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 15 | #define HIPPI_FRAME_LEN (HIPPI_DATA_LEN + HIPPI_HLEN) |
| 16 | #define HIPPI_EXTENDED_SAP 0xAA |
| 17 | #define HIPPI_UI_CMD 0x03 |
| 18 | struct hipnet_statistics { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 19 | int rx_packets; |
| 20 | int tx_packets; |
| 21 | int rx_errors; |
| 22 | int tx_errors; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 23 | int rx_dropped; |
| 24 | int tx_dropped; |
| 25 | int rx_length_errors; |
| 26 | int rx_over_errors; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 27 | int rx_crc_errors; |
| 28 | int rx_frame_errors; |
| 29 | int rx_fifo_errors; |
| 30 | int rx_missed_errors; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 31 | int tx_aborted_errors; |
| 32 | int tx_carrier_errors; |
| 33 | int tx_fifo_errors; |
| 34 | int tx_heartbeat_errors; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 35 | int tx_window_errors; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 36 | }; |
| 37 | struct hippi_fp_hdr { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 38 | __be32 fixed; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 39 | __be32 d2_size; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 40 | } __attribute__((packed)); |
| 41 | struct hippi_le_hdr { |
| 42 | #ifdef __BIG_ENDIAN_BITFIELD |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 43 | __u8 fc : 3; |
| 44 | __u8 double_wide : 1; |
| 45 | __u8 message_type : 4; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 46 | #elif defined(__LITTLE_ENDIAN_BITFIELD) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 47 | __u8 message_type : 4; |
| 48 | __u8 double_wide : 1; |
| 49 | __u8 fc : 3; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 50 | #endif |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 51 | __u8 dest_switch_addr[3]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 52 | #ifdef __BIG_ENDIAN_BITFIELD |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 53 | __u8 dest_addr_type : 4, src_addr_type : 4; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 54 | #elif defined(__LITTLE_ENDIAN_BITFIELD) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 55 | __u8 src_addr_type : 4, dest_addr_type : 4; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 56 | #endif |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 57 | __u8 src_switch_addr[3]; |
| 58 | __u16 reserved; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 59 | __u8 daddr[HIPPI_ALEN]; |
| 60 | __u16 locally_administered; |
| 61 | __u8 saddr[HIPPI_ALEN]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 62 | } __attribute__((packed)); |
| 63 | #define HIPPI_OUI_LEN 3 |
| 64 | struct hippi_snap_hdr { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 65 | __u8 dsap; |
| 66 | __u8 ssap; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 67 | __u8 ctrl; |
| 68 | __u8 oui[HIPPI_OUI_LEN]; |
| 69 | __be16 ethertype; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 70 | } __attribute__((packed)); |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 71 | struct hippi_hdr { |
| 72 | struct hippi_fp_hdr fp; |
| 73 | struct hippi_le_hdr le; |
| 74 | struct hippi_snap_hdr snap; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 75 | } __attribute__((packed)); |
| 76 | #endif |