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  */
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 #define HIPPI_EXTENDED_SAP 0xAA
17 #define HIPPI_UI_CMD 0x03
18 struct hipnet_statistics {
19   int rx_packets;
20   int tx_packets;
21   int rx_errors;
22   int tx_errors;
23   int rx_dropped;
24   int tx_dropped;
25   int rx_length_errors;
26   int rx_over_errors;
27   int rx_crc_errors;
28   int rx_frame_errors;
29   int rx_fifo_errors;
30   int rx_missed_errors;
31   int tx_aborted_errors;
32   int tx_carrier_errors;
33   int tx_fifo_errors;
34   int tx_heartbeat_errors;
35   int tx_window_errors;
36 };
37 struct hippi_fp_hdr {
38   __be32 fixed;
39   __be32 d2_size;
40 } __attribute__((packed));
41 struct hippi_le_hdr {
42 #ifdef __BIG_ENDIAN_BITFIELD
43   __u8 fc : 3;
44   __u8 double_wide : 1;
45   __u8 message_type : 4;
46 #elif defined(__LITTLE_ENDIAN_BITFIELD)
47   __u8 message_type : 4;
48   __u8 double_wide : 1;
49   __u8 fc : 3;
50 #endif
51   __u8 dest_switch_addr[3];
52 #ifdef __BIG_ENDIAN_BITFIELD
53   __u8 dest_addr_type : 4, src_addr_type : 4;
54 #elif defined(__LITTLE_ENDIAN_BITFIELD)
55   __u8 src_addr_type : 4, dest_addr_type : 4;
56 #endif
57   __u8 src_switch_addr[3];
58   __u16 reserved;
59   __u8 daddr[HIPPI_ALEN];
60   __u16 locally_administered;
61   __u8 saddr[HIPPI_ALEN];
62 } __attribute__((packed));
63 #define HIPPI_OUI_LEN 3
64 struct hippi_snap_hdr {
65   __u8 dsap;
66   __u8 ssap;
67   __u8 ctrl;
68   __u8 oui[HIPPI_OUI_LEN];
69   __be16 ethertype;
70 } __attribute__((packed));
71 struct hippi_hdr {
72   struct hippi_fp_hdr fp;
73   struct hippi_le_hdr le;
74   struct hippi_snap_hdr snap;
75 } __attribute__((packed));
76 #endif
77