blob: 9e2d632496787444e8a8d3e0837ccb4c18d029e4 [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
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 Cheng655a7c02013-10-16 16:09:24 -07007#ifndef _UAPI__LINUX_LLC_H
8#define _UAPI__LINUX_LLC_H
9#include <linux/socket.h>
Christopher Ferris525ce912017-07-26 13:12:53 -070010#include <linux/if.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070011#define __LLC_SOCK_SIZE__ 16
Ben Cheng655a7c02013-10-16 16:09:24 -070012struct sockaddr_llc {
Tao Baod7db5942015-01-28 10:07:51 -080013 __kernel_sa_family_t sllc_family;
14 __kernel_sa_family_t sllc_arphrd;
15 unsigned char sllc_test;
Tao Baod7db5942015-01-28 10:07:51 -080016 unsigned char sllc_xid;
17 unsigned char sllc_ua;
18 unsigned char sllc_sap;
19 unsigned char sllc_mac[IFHWADDRLEN];
Tao Baod7db5942015-01-28 10:07:51 -080020 unsigned char __pad[__LLC_SOCK_SIZE__ - sizeof(__kernel_sa_family_t) * 2 - sizeof(unsigned char) * 4 - IFHWADDRLEN];
Ben Cheng655a7c02013-10-16 16:09:24 -070021};
Ben Cheng655a7c02013-10-16 16:09:24 -070022enum llc_sockopts {
Tao Baod7db5942015-01-28 10:07:51 -080023 LLC_OPT_UNKNOWN = 0,
Tao Baod7db5942015-01-28 10:07:51 -080024 LLC_OPT_RETRY,
25 LLC_OPT_SIZE,
26 LLC_OPT_ACK_TMR_EXP,
27 LLC_OPT_P_TMR_EXP,
Tao Baod7db5942015-01-28 10:07:51 -080028 LLC_OPT_REJ_TMR_EXP,
29 LLC_OPT_BUSY_TMR_EXP,
30 LLC_OPT_TX_WIN,
31 LLC_OPT_RX_WIN,
Tao Baod7db5942015-01-28 10:07:51 -080032 LLC_OPT_PKTINFO,
33 LLC_OPT_MAX
Ben Cheng655a7c02013-10-16 16:09:24 -070034};
35#define LLC_OPT_MAX_RETRY 100
36#define LLC_OPT_MAX_SIZE 4196
37#define LLC_OPT_MAX_WIN 127
Ben Cheng655a7c02013-10-16 16:09:24 -070038#define LLC_OPT_MAX_ACK_TMR_EXP 60
39#define LLC_OPT_MAX_P_TMR_EXP 60
40#define LLC_OPT_MAX_REJ_TMR_EXP 60
41#define LLC_OPT_MAX_BUSY_TMR_EXP 60
Ben Cheng655a7c02013-10-16 16:09:24 -070042#define LLC_SAP_NULL 0x00
43#define LLC_SAP_LLC 0x02
44#define LLC_SAP_SNA 0x04
45#define LLC_SAP_PNM 0x0E
Ben Cheng655a7c02013-10-16 16:09:24 -070046#define LLC_SAP_IP 0x06
47#define LLC_SAP_BSPAN 0x42
48#define LLC_SAP_MMS 0x4E
49#define LLC_SAP_8208 0x7E
Ben Cheng655a7c02013-10-16 16:09:24 -070050#define LLC_SAP_3COM 0x80
51#define LLC_SAP_PRO 0x8E
52#define LLC_SAP_SNAP 0xAA
53#define LLC_SAP_BANYAN 0xBC
Ben Cheng655a7c02013-10-16 16:09:24 -070054#define LLC_SAP_IPX 0xE0
55#define LLC_SAP_NETBEUI 0xF0
56#define LLC_SAP_LANMGR 0xF4
57#define LLC_SAP_IMPL 0xF8
Ben Cheng655a7c02013-10-16 16:09:24 -070058#define LLC_SAP_DISC 0xFC
59#define LLC_SAP_OSI 0xFE
60#define LLC_SAP_LAR 0xDC
61#define LLC_SAP_RM 0xD4
Ben Cheng655a7c02013-10-16 16:09:24 -070062#define LLC_SAP_GLOBAL 0xFF
63struct llc_pktinfo {
Tao Baod7db5942015-01-28 10:07:51 -080064 int lpi_ifindex;
65 unsigned char lpi_sap;
66 unsigned char lpi_mac[IFHWADDRLEN];
Ben Cheng655a7c02013-10-16 16:09:24 -070067};
Ben Cheng655a7c02013-10-16 16:09:24 -070068#endif