diff options
author | Andrew Hsieh <andrewhsieh@google.com> | 2013-09-06 18:37:46 +0800 |
---|---|---|
committer | Andrew Hsieh <andrewhsieh@google.com> | 2013-09-06 19:04:40 +0800 |
commit | 6986c6e7f06bb3bdedfc3bb08694da9b1227048c (patch) | |
tree | 5c0f01f1f54d9040100858182232c1fb4134b58f /9/platforms/android-18/arch-mips/usr/include/linux/if_hippi.h | |
parent | 30ee84f92cb832c789366c516fcadb718ccc25e8 (diff) | |
download | prebuilts_ndk-6986c6e7f06bb3bdedfc3bb08694da9b1227048c.zip prebuilts_ndk-6986c6e7f06bb3bdedfc3bb08694da9b1227048c.tar.gz prebuilts_ndk-6986c6e7f06bb3bdedfc3bb08694da9b1227048c.tar.bz2 |
Add NDK r9 part 1/2: platforms/
Change-Id: Ie572e90ffda7f982d931dda1a9f5a0c68953a762
Diffstat (limited to '9/platforms/android-18/arch-mips/usr/include/linux/if_hippi.h')
-rw-r--r-- | 9/platforms/android-18/arch-mips/usr/include/linux/if_hippi.h | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/9/platforms/android-18/arch-mips/usr/include/linux/if_hippi.h b/9/platforms/android-18/arch-mips/usr/include/linux/if_hippi.h new file mode 100644 index 0000000..52d36f6 --- /dev/null +++ b/9/platforms/android-18/arch-mips/usr/include/linux/if_hippi.h @@ -0,0 +1,99 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + **************************************************************************** + ****************************************************************************/ +#ifndef _LINUX_IF_HIPPI_H +#define _LINUX_IF_HIPPI_H + +#include <asm/byteorder.h> + +#define HIPPI_ALEN 6 +#define HIPPI_HLEN sizeof(struct hippi_hdr) +#define HIPPI_ZLEN 0 +#define HIPPI_DATA_LEN 65280 +#define HIPPI_FRAME_LEN (HIPPI_DATA_LEN + HIPPI_HLEN) + +#define HIPPI_EXTENDED_SAP 0xAA +#define HIPPI_UI_CMD 0x03 + +struct hipnet_statistics +{ + int rx_packets; + int tx_packets; + int rx_errors; + int tx_errors; + int rx_dropped; + int tx_dropped; + + int rx_length_errors; + int rx_over_errors; + int rx_crc_errors; + int rx_frame_errors; + int rx_fifo_errors; + int rx_missed_errors; + + int tx_aborted_errors; + int tx_carrier_errors; + int tx_fifo_errors; + int tx_heartbeat_errors; + int tx_window_errors; +}; + +struct hippi_fp_hdr +{ + __be32 fixed; + __be32 d2_size; +} __attribute__ ((packed)); + +struct hippi_le_hdr +{ +#ifdef __BIG_ENDIAN_BITFIELD + __u8 fc:3; + __u8 double_wide:1; + __u8 message_type:4; +#elif defined(__LITTLE_ENDIAN_BITFIELD) + __u8 message_type:4; + __u8 double_wide:1; + __u8 fc:3; +#endif + __u8 dest_switch_addr[3]; +#ifdef __BIG_ENDIAN_BITFIELD + __u8 dest_addr_type:4, + src_addr_type:4; +#elif defined(__LITTLE_ENDIAN_BITFIELD) + __u8 src_addr_type:4, + dest_addr_type:4; +#endif + __u8 src_switch_addr[3]; + __u16 reserved; + __u8 daddr[HIPPI_ALEN]; + __u16 locally_administered; + __u8 saddr[HIPPI_ALEN]; +} __attribute__ ((packed)); + +#define HIPPI_OUI_LEN 3 + +struct hippi_snap_hdr +{ + __u8 dsap; + __u8 ssap; + __u8 ctrl; + __u8 oui[HIPPI_OUI_LEN]; + __be16 ethertype; +} __attribute__ ((packed)); + +struct hippi_hdr +{ + struct hippi_fp_hdr fp; + struct hippi_le_hdr le; + struct hippi_snap_hdr snap; +} __attribute__ ((packed)); + +#endif |