0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef _UAPI__LINUX_LLC_H
0015 #define _UAPI__LINUX_LLC_H
0016
0017 #include <linux/socket.h>
0018 #include <linux/if.h> /* For IFHWADDRLEN. */
0019
0020 #define __LLC_SOCK_SIZE__ 16
0021 struct sockaddr_llc {
0022 __kernel_sa_family_t sllc_family;
0023 __kernel_sa_family_t sllc_arphrd;
0024 unsigned char sllc_test;
0025 unsigned char sllc_xid;
0026 unsigned char sllc_ua;
0027 unsigned char sllc_sap;
0028 unsigned char sllc_mac[IFHWADDRLEN];
0029 unsigned char __pad[__LLC_SOCK_SIZE__ -
0030 sizeof(__kernel_sa_family_t) * 2 -
0031 sizeof(unsigned char) * 4 - IFHWADDRLEN];
0032 };
0033
0034
0035 enum llc_sockopts {
0036 LLC_OPT_UNKNOWN = 0,
0037 LLC_OPT_RETRY,
0038 LLC_OPT_SIZE,
0039 LLC_OPT_ACK_TMR_EXP,
0040 LLC_OPT_P_TMR_EXP,
0041 LLC_OPT_REJ_TMR_EXP,
0042 LLC_OPT_BUSY_TMR_EXP,
0043 LLC_OPT_TX_WIN,
0044 LLC_OPT_RX_WIN,
0045 LLC_OPT_PKTINFO,
0046 LLC_OPT_MAX
0047 };
0048
0049 #define LLC_OPT_MAX_RETRY 100
0050 #define LLC_OPT_MAX_SIZE 4196
0051 #define LLC_OPT_MAX_WIN 127
0052 #define LLC_OPT_MAX_ACK_TMR_EXP 60
0053 #define LLC_OPT_MAX_P_TMR_EXP 60
0054 #define LLC_OPT_MAX_REJ_TMR_EXP 60
0055 #define LLC_OPT_MAX_BUSY_TMR_EXP 60
0056
0057
0058 #define LLC_SAP_NULL 0x00
0059 #define LLC_SAP_LLC 0x02
0060 #define LLC_SAP_SNA 0x04
0061 #define LLC_SAP_PNM 0x0E
0062 #define LLC_SAP_IP 0x06
0063 #define LLC_SAP_BSPAN 0x42
0064 #define LLC_SAP_MMS 0x4E
0065 #define LLC_SAP_8208 0x7E
0066 #define LLC_SAP_3COM 0x80
0067 #define LLC_SAP_PRO 0x8E
0068 #define LLC_SAP_SNAP 0xAA
0069 #define LLC_SAP_BANYAN 0xBC
0070 #define LLC_SAP_IPX 0xE0
0071 #define LLC_SAP_NETBEUI 0xF0
0072 #define LLC_SAP_LANMGR 0xF4
0073 #define LLC_SAP_IMPL 0xF8
0074 #define LLC_SAP_DISC 0xFC
0075 #define LLC_SAP_OSI 0xFE
0076 #define LLC_SAP_LAR 0xDC
0077 #define LLC_SAP_RM 0xD4
0078 #define LLC_SAP_GLOBAL 0xFF
0079
0080 struct llc_pktinfo {
0081 int lpi_ifindex;
0082 unsigned char lpi_sap;
0083 unsigned char lpi_mac[IFHWADDRLEN];
0084 };
0085
0086 #endif