if_hippi.h
001:
002:
003:
004:
005:
006:
007:
008:
009:
010: <waltje@uWalt.NL.Mugnet.ORG>
011: <becker@super.org>
012: <alan@lxorguk.ukuu.org.uk>
013: <gw7rrm@eeshack3.swan.ac.uk>
014: <Jes.Sorensen@cern.ch>
015:
016:
017:
018:
019:
020:
021:
022: #ifndef _LINUX_IF_HIPPI_H
023: #define _LINUX_IF_HIPPI_H
024:
025: #include <linux/types.h>
026: #include <asm/byteorder.h>
027:
028:
029:
030:
031:
032: #define HIPPI_ALEN 6
033: #define HIPPI_HLEN sizeof(struct hippi_hdr)
034: #define HIPPI_ZLEN 0
035: #define HIPPI_DATA_LEN 65280
036: #define HIPPI_FRAME_LEN (HIPPI_DATA_LEN + HIPPI_HLEN)
037:
038:
039:
040:
041:
042: #define HIPPI_EXTENDED_SAP 0xAA
043: #define HIPPI_UI_CMD 0x03
044:
045:
046:
047:
048:
049:
050:
051:
052:
053:
054: struct hipnet_statistics {
055: int rx_packets;
056: int tx_packets;
057: int rx_errors;
058: int tx_errors;
059: int rx_dropped;
060: int tx_dropped;
061:
062:
063: int rx_length_errors;
064: int rx_over_errors;
065: int rx_crc_errors;
066: int rx_frame_errors;
067: int rx_fifo_errors;
068: int rx_missed_errors;
069:
070:
071: int tx_aborted_errors;
072: int tx_carrier_errors;
073: int tx_fifo_errors;
074: int tx_heartbeat_errors;
075: int tx_window_errors;
076: };
077:
078:
079: struct hippi_fp_hdr {
080: #if 0
081: __u8 ulp;
082: #if defined (__BIG_ENDIAN_BITFIELD)
083: __u8 d1_data_present:1;
084: __u8 start_d2_burst_boundary:1;
085: __u8 reserved:6;
086: #if 0
087: __u16 reserved1:5;
088: __u16 d1_area_size:8;
089: __u16 d2_offset:3;
090: #endif
091: #elif defined(__LITTLE_ENDIAN_BITFIELD)
092: __u8 reserved:6;
093: __u8 start_d2_burst_boundary:1;
094: __u8 d1_data_present:1;
095: #if 0
096: __u16 d2_offset:3;
097: __u16 d1_area_size:8;
098: __u16 reserved1:5;
099: #endif
100: #else
101: #error "Please fix <asm/byteorder.h>"
102: #endif
103: #else
104: __be32 fixed;
105: #endif
106: __be32 d2_size;
107: } __attribute__((packed));
108:
109: struct hippi_le_hdr {
110: #if defined (__BIG_ENDIAN_BITFIELD)
111: __u8 fc:3;
112: __u8 double_wide:1;
113: __u8 message_type:4;
114: #elif defined(__LITTLE_ENDIAN_BITFIELD)
115: __u8 message_type:4;
116: __u8 double_wide:1;
117: __u8 fc:3;
118: #endif
119: __u8 dest_switch_addr[3];
120: #if defined (__BIG_ENDIAN_BITFIELD)
121: __u8 dest_addr_type:4,
122: src_addr_type:4;
123: #elif defined(__LITTLE_ENDIAN_BITFIELD)
124: __u8 src_addr_type:4,
125: dest_addr_type:4;
126: #endif
127: __u8 src_switch_addr[3];
128: __u16 reserved;
129: __u8 daddr[HIPPI_ALEN];
130: __u16 locally_administered;
131: __u8 saddr[HIPPI_ALEN];
132: } __attribute__((packed));
133:
134: #define HIPPI_OUI_LEN 3
135:
136:
137:
138:
139: struct hippi_snap_hdr {
140: __u8 dsap;
141: __u8 ssap;
142: __u8 ctrl;
143: __u8 oui[HIPPI_OUI_LEN];
144: __be16 ethertype;
145: } __attribute__((packed));
146:
147: struct hippi_hdr {
148: struct hippi_fp_hdr fp;
149: struct hippi_le_hdr le;
150: struct hippi_snap_hdr snap;
151: } __attribute__((packed));
152:
153: #endif
154:
© Andrew Scott 2006 -
2025,
All Rights Reserved