1 /* SPDX-License-Identifier: GPL-1.0+ WITH Linu << 2 /* 1 /* 3 * IEEE 802.2 User Interface SAPs for Linux, d 2 * IEEE 802.2 User Interface SAPs for Linux, data structures and indicators. 4 * 3 * 5 * Copyright (c) 2001 by Jay Schulist <jschlst 4 * Copyright (c) 2001 by Jay Schulist <jschlst@samba.org> 6 * 5 * 7 * This program can be redistributed or modifi 6 * This program can be redistributed or modified under the terms of the 8 * GNU General Public License as published by 7 * GNU General Public License as published by the Free Software Foundation. 9 * This program is distributed without any war 8 * This program is distributed without any warranty or implied warranty 10 * of merchantability or fitness for a particu 9 * of merchantability or fitness for a particular purpose. 11 * 10 * 12 * See the GNU General Public License for more 11 * See the GNU General Public License for more details. 13 */ 12 */ 14 #ifndef _UAPI__LINUX_LLC_H 13 #ifndef _UAPI__LINUX_LLC_H 15 #define _UAPI__LINUX_LLC_H 14 #define _UAPI__LINUX_LLC_H 16 15 17 #include <linux/socket.h> 16 #include <linux/socket.h> 18 #include <linux/if.h> /* For IFHWADD 17 #include <linux/if.h> /* For IFHWADDRLEN. */ 19 18 20 #define __LLC_SOCK_SIZE__ 16 /* sizeof(sock 19 #define __LLC_SOCK_SIZE__ 16 /* sizeof(sockaddr_llc), word align. */ 21 struct sockaddr_llc { 20 struct sockaddr_llc { 22 __kernel_sa_family_t sllc_family; /* A 21 __kernel_sa_family_t sllc_family; /* AF_LLC */ 23 __kernel_sa_family_t sllc_arphrd; /* A 22 __kernel_sa_family_t sllc_arphrd; /* ARPHRD_ETHER */ 24 unsigned char sllc_test; 23 unsigned char sllc_test; 25 unsigned char sllc_xid; 24 unsigned char sllc_xid; 26 unsigned char sllc_ua; /* UA 25 unsigned char sllc_ua; /* UA data, only for SOCK_STREAM. */ 27 unsigned char sllc_sap; 26 unsigned char sllc_sap; 28 unsigned char sllc_mac[IFHWADDRLEN]; 27 unsigned char sllc_mac[IFHWADDRLEN]; 29 unsigned char __pad[__LLC_SOCK_SIZE_ 28 unsigned char __pad[__LLC_SOCK_SIZE__ - 30 sizeof(__kernel_ 29 sizeof(__kernel_sa_family_t) * 2 - 31 sizeof(unsigned 30 sizeof(unsigned char) * 4 - IFHWADDRLEN]; 32 }; 31 }; 33 32 34 /* sockopt definitions. */ 33 /* sockopt definitions. */ 35 enum llc_sockopts { 34 enum llc_sockopts { 36 LLC_OPT_UNKNOWN = 0, 35 LLC_OPT_UNKNOWN = 0, 37 LLC_OPT_RETRY, /* max retrans 36 LLC_OPT_RETRY, /* max retrans attempts. */ 38 LLC_OPT_SIZE, /* max PDU siz 37 LLC_OPT_SIZE, /* max PDU size (octets). */ 39 LLC_OPT_ACK_TMR_EXP, /* ack expire 38 LLC_OPT_ACK_TMR_EXP, /* ack expire time (secs). */ 40 LLC_OPT_P_TMR_EXP, /* pf cycle ex 39 LLC_OPT_P_TMR_EXP, /* pf cycle expire time (secs). */ 41 LLC_OPT_REJ_TMR_EXP, /* rej sent ex 40 LLC_OPT_REJ_TMR_EXP, /* rej sent expire time (secs). */ 42 LLC_OPT_BUSY_TMR_EXP, /* busy state 41 LLC_OPT_BUSY_TMR_EXP, /* busy state expire time (secs). */ 43 LLC_OPT_TX_WIN, /* tx window s 42 LLC_OPT_TX_WIN, /* tx window size. */ 44 LLC_OPT_RX_WIN, /* rx window s 43 LLC_OPT_RX_WIN, /* rx window size. */ 45 LLC_OPT_PKTINFO, /* ancillary p 44 LLC_OPT_PKTINFO, /* ancillary packet information. */ 46 LLC_OPT_MAX 45 LLC_OPT_MAX 47 }; 46 }; 48 47 49 #define LLC_OPT_MAX_RETRY 100 48 #define LLC_OPT_MAX_RETRY 100 50 #define LLC_OPT_MAX_SIZE 4196 49 #define LLC_OPT_MAX_SIZE 4196 51 #define LLC_OPT_MAX_WIN 127 50 #define LLC_OPT_MAX_WIN 127 52 #define LLC_OPT_MAX_ACK_TMR_EXP 60 51 #define LLC_OPT_MAX_ACK_TMR_EXP 60 53 #define LLC_OPT_MAX_P_TMR_EXP 60 52 #define LLC_OPT_MAX_P_TMR_EXP 60 54 #define LLC_OPT_MAX_REJ_TMR_EXP 60 53 #define LLC_OPT_MAX_REJ_TMR_EXP 60 55 #define LLC_OPT_MAX_BUSY_TMR_EXP 60 54 #define LLC_OPT_MAX_BUSY_TMR_EXP 60 56 55 57 /* LLC SAP types. */ 56 /* LLC SAP types. */ 58 #define LLC_SAP_NULL 0x00 /* NUL 57 #define LLC_SAP_NULL 0x00 /* NULL SAP. */ 59 #define LLC_SAP_LLC 0x02 /* LLC 58 #define LLC_SAP_LLC 0x02 /* LLC Sublayer Management. */ 60 #define LLC_SAP_SNA 0x04 /* SNA 59 #define LLC_SAP_SNA 0x04 /* SNA Path Control. */ 61 #define LLC_SAP_PNM 0x0E /* Pro 60 #define LLC_SAP_PNM 0x0E /* Proway Network Management. */ 62 #define LLC_SAP_IP 0x06 /* TCP 61 #define LLC_SAP_IP 0x06 /* TCP/IP. */ 63 #define LLC_SAP_BSPAN 0x42 /* Bri 62 #define LLC_SAP_BSPAN 0x42 /* Bridge Spanning Tree Proto */ 64 #define LLC_SAP_MMS 0x4E /* Man 63 #define LLC_SAP_MMS 0x4E /* Manufacturing Message Srv. */ 65 #define LLC_SAP_8208 0x7E /* ISO 64 #define LLC_SAP_8208 0x7E /* ISO 8208 */ 66 #define LLC_SAP_3COM 0x80 /* 3CO 65 #define LLC_SAP_3COM 0x80 /* 3COM. */ 67 #define LLC_SAP_PRO 0x8E /* Pro 66 #define LLC_SAP_PRO 0x8E /* Proway Active Station List */ 68 #define LLC_SAP_SNAP 0xAA /* SNA 67 #define LLC_SAP_SNAP 0xAA /* SNAP. */ 69 #define LLC_SAP_BANYAN 0xBC /* Ban 68 #define LLC_SAP_BANYAN 0xBC /* Banyan. */ 70 #define LLC_SAP_IPX 0xE0 /* IPX 69 #define LLC_SAP_IPX 0xE0 /* IPX/SPX. */ 71 #define LLC_SAP_NETBEUI 0xF0 /* Net 70 #define LLC_SAP_NETBEUI 0xF0 /* NetBEUI. */ 72 #define LLC_SAP_LANMGR 0xF4 /* Lan 71 #define LLC_SAP_LANMGR 0xF4 /* LanManager. */ 73 #define LLC_SAP_IMPL 0xF8 /* IMP 72 #define LLC_SAP_IMPL 0xF8 /* IMPL */ 74 #define LLC_SAP_DISC 0xFC /* Dis 73 #define LLC_SAP_DISC 0xFC /* Discovery */ 75 #define LLC_SAP_OSI 0xFE /* OSI 74 #define LLC_SAP_OSI 0xFE /* OSI Network Layers. */ 76 #define LLC_SAP_LAR 0xDC /* LAN 75 #define LLC_SAP_LAR 0xDC /* LAN Address Resolution */ 77 #define LLC_SAP_RM 0xD4 /* Res 76 #define LLC_SAP_RM 0xD4 /* Resource Management */ 78 #define LLC_SAP_GLOBAL 0xFF /* Glo 77 #define LLC_SAP_GLOBAL 0xFF /* Global SAP. */ 79 78 80 struct llc_pktinfo { 79 struct llc_pktinfo { 81 int lpi_ifindex; 80 int lpi_ifindex; 82 unsigned char lpi_sap; 81 unsigned char lpi_sap; 83 unsigned char lpi_mac[IFHWADDRLEN]; 82 unsigned char lpi_mac[IFHWADDRLEN]; 84 }; 83 }; 85 84 86 #endif /* _UAPI__LINUX_LLC_H */ 85 #endif /* _UAPI__LINUX_LLC_H */ 87 86
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.