blob: 4b5074bdc933124584c25e38c6bf6f3aadb027ef [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
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 _UAPI_LINUX_IF_FDDI_H
20#define _UAPI_LINUX_IF_FDDI_H
21#include <linux/types.h>
22#define FDDI_K_ALEN 6
Ben Cheng655a7c02013-10-16 16:09:24 -070023#define FDDI_K_8022_HLEN 16
24#define FDDI_K_SNAP_HLEN 21
25#define FDDI_K_8022_ZLEN 16
26#define FDDI_K_SNAP_ZLEN 21
Ben Cheng655a7c02013-10-16 16:09:24 -070027#define FDDI_K_8022_DLEN 4475
28#define FDDI_K_SNAP_DLEN 4470
29#define FDDI_K_LLC_ZLEN 13
30#define FDDI_K_LLC_LEN 4491
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070031#define FDDI_K_OUI_LEN 3
Christopher Ferris86a48372019-01-10 14:14:59 -080032#define FDDI_FC_K_CLASS_MASK 0x80
33#define FDDI_FC_K_CLASS_SYNC 0x80
34#define FDDI_FC_K_CLASS_ASYNC 0x00
35#define FDDI_FC_K_ALEN_MASK 0x40
36#define FDDI_FC_K_ALEN_48 0x40
37#define FDDI_FC_K_ALEN_16 0x00
38#define FDDI_FC_K_FORMAT_MASK 0x30
39#define FDDI_FC_K_FORMAT_FUTURE 0x30
40#define FDDI_FC_K_FORMAT_IMPLEMENTOR 0x20
41#define FDDI_FC_K_FORMAT_LLC 0x10
42#define FDDI_FC_K_FORMAT_MANAGEMENT 0x00
43#define FDDI_FC_K_CONTROL_MASK 0x0f
Ben Cheng655a7c02013-10-16 16:09:24 -070044#define FDDI_FC_K_VOID 0x00
45#define FDDI_FC_K_NON_RESTRICTED_TOKEN 0x80
46#define FDDI_FC_K_RESTRICTED_TOKEN 0xC0
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070047#define FDDI_FC_K_SMT_MIN 0x41
Ben Cheng655a7c02013-10-16 16:09:24 -070048#define FDDI_FC_K_SMT_MAX 0x4F
49#define FDDI_FC_K_MAC_MIN 0xC1
50#define FDDI_FC_K_MAC_MAX 0xCF
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070051#define FDDI_FC_K_ASYNC_LLC_MIN 0x50
Ben Cheng655a7c02013-10-16 16:09:24 -070052#define FDDI_FC_K_ASYNC_LLC_DEF 0x54
53#define FDDI_FC_K_ASYNC_LLC_MAX 0x5F
54#define FDDI_FC_K_SYNC_LLC_MIN 0xD0
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070055#define FDDI_FC_K_SYNC_LLC_MAX 0xD7
Ben Cheng655a7c02013-10-16 16:09:24 -070056#define FDDI_FC_K_IMPLEMENTOR_MIN 0x60
57#define FDDI_FC_K_IMPLEMENTOR_MAX 0x6F
58#define FDDI_FC_K_RESERVED_MIN 0x70
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070059#define FDDI_FC_K_RESERVED_MAX 0x7F
Ben Cheng655a7c02013-10-16 16:09:24 -070060#define FDDI_EXTENDED_SAP 0xAA
61#define FDDI_UI_CMD 0x03
62struct fddi_8022_1_hdr {
Tao Baod7db5942015-01-28 10:07:51 -080063 __u8 dsap;
64 __u8 ssap;
65 __u8 ctrl;
Ben Cheng655a7c02013-10-16 16:09:24 -070066} __attribute__((packed));
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070067struct fddi_8022_2_hdr {
Tao Baod7db5942015-01-28 10:07:51 -080068 __u8 dsap;
69 __u8 ssap;
70 __u8 ctrl_1;
Tao Baod7db5942015-01-28 10:07:51 -080071 __u8 ctrl_2;
Ben Cheng655a7c02013-10-16 16:09:24 -070072} __attribute__((packed));
Ben Cheng655a7c02013-10-16 16:09:24 -070073struct fddi_snap_hdr {
Tao Baod7db5942015-01-28 10:07:51 -080074 __u8 dsap;
Tao Baod7db5942015-01-28 10:07:51 -080075 __u8 ssap;
76 __u8 ctrl;
77 __u8 oui[FDDI_K_OUI_LEN];
78 __be16 ethertype;
Ben Cheng655a7c02013-10-16 16:09:24 -070079} __attribute__((packed));
80struct fddihdr {
Tao Baod7db5942015-01-28 10:07:51 -080081 __u8 fc;
82 __u8 daddr[FDDI_K_ALEN];
Tao Baod7db5942015-01-28 10:07:51 -080083 __u8 saddr[FDDI_K_ALEN];
84 union {
85 struct fddi_8022_1_hdr llc_8022_1;
86 struct fddi_8022_2_hdr llc_8022_2;
Tao Baod7db5942015-01-28 10:07:51 -080087 struct fddi_snap_hdr llc_snap;
88 } hdr;
Ben Cheng655a7c02013-10-16 16:09:24 -070089} __attribute__((packed));
Ben Cheng655a7c02013-10-16 16:09:24 -070090#endif