| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 1 | /**************************************************************************** | 
|  | 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_LLC_H | 
|  | 20 | #define _UAPI__LINUX_LLC_H | 
|  | 21 | #include <linux/socket.h> | 
| Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 22 | #include <linux/if.h> | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 23 | #define __LLC_SOCK_SIZE__ 16 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 24 | struct sockaddr_llc { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 25 | __kernel_sa_family_t sllc_family; | 
|  | 26 | __kernel_sa_family_t sllc_arphrd; | 
|  | 27 | unsigned char sllc_test; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 28 | unsigned char sllc_xid; | 
|  | 29 | unsigned char sllc_ua; | 
|  | 30 | unsigned char sllc_sap; | 
|  | 31 | unsigned char sllc_mac[IFHWADDRLEN]; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 32 | unsigned char __pad[__LLC_SOCK_SIZE__ - sizeof(__kernel_sa_family_t) * 2 - sizeof(unsigned char) * 4 - IFHWADDRLEN]; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 33 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 34 | enum llc_sockopts { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 35 | LLC_OPT_UNKNOWN = 0, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 36 | LLC_OPT_RETRY, | 
|  | 37 | LLC_OPT_SIZE, | 
|  | 38 | LLC_OPT_ACK_TMR_EXP, | 
|  | 39 | LLC_OPT_P_TMR_EXP, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 40 | LLC_OPT_REJ_TMR_EXP, | 
|  | 41 | LLC_OPT_BUSY_TMR_EXP, | 
|  | 42 | LLC_OPT_TX_WIN, | 
|  | 43 | LLC_OPT_RX_WIN, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 44 | LLC_OPT_PKTINFO, | 
|  | 45 | LLC_OPT_MAX | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 46 | }; | 
|  | 47 | #define LLC_OPT_MAX_RETRY 100 | 
|  | 48 | #define LLC_OPT_MAX_SIZE 4196 | 
|  | 49 | #define LLC_OPT_MAX_WIN 127 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 50 | #define LLC_OPT_MAX_ACK_TMR_EXP 60 | 
|  | 51 | #define LLC_OPT_MAX_P_TMR_EXP 60 | 
|  | 52 | #define LLC_OPT_MAX_REJ_TMR_EXP 60 | 
|  | 53 | #define LLC_OPT_MAX_BUSY_TMR_EXP 60 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 54 | #define LLC_SAP_NULL 0x00 | 
|  | 55 | #define LLC_SAP_LLC 0x02 | 
|  | 56 | #define LLC_SAP_SNA 0x04 | 
|  | 57 | #define LLC_SAP_PNM 0x0E | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 58 | #define LLC_SAP_IP 0x06 | 
|  | 59 | #define LLC_SAP_BSPAN 0x42 | 
|  | 60 | #define LLC_SAP_MMS 0x4E | 
|  | 61 | #define LLC_SAP_8208 0x7E | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 62 | #define LLC_SAP_3COM 0x80 | 
|  | 63 | #define LLC_SAP_PRO 0x8E | 
|  | 64 | #define LLC_SAP_SNAP 0xAA | 
|  | 65 | #define LLC_SAP_BANYAN 0xBC | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 66 | #define LLC_SAP_IPX 0xE0 | 
|  | 67 | #define LLC_SAP_NETBEUI 0xF0 | 
|  | 68 | #define LLC_SAP_LANMGR 0xF4 | 
|  | 69 | #define LLC_SAP_IMPL 0xF8 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 70 | #define LLC_SAP_DISC 0xFC | 
|  | 71 | #define LLC_SAP_OSI 0xFE | 
|  | 72 | #define LLC_SAP_LAR 0xDC | 
|  | 73 | #define LLC_SAP_RM 0xD4 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 74 | #define LLC_SAP_GLOBAL 0xFF | 
|  | 75 | struct llc_pktinfo { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 76 | int lpi_ifindex; | 
|  | 77 | unsigned char lpi_sap; | 
|  | 78 | unsigned char lpi_mac[IFHWADDRLEN]; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 79 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 80 | #endif |