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 **************************************************************************** 11 ****************************************************************************/ 12 #ifndef __L2CAP_H 13 #define __L2CAP_H 14 15 #ifdef __cplusplus 16 #endif 17 #include <sys/socket.h> 18 #define L2CAP_DEFAULT_MTU 672 19 #define L2CAP_DEFAULT_FLUSH_TO 0xFFFF 20 #define L2CAP_CONN_TIMEOUT (HZ * 40) 21 #define L2CAP_OPTIONS 0x01 22 #define L2CAP_CONNINFO 0x02 23 #define L2CAP_LM 0x03 24 #define L2CAP_LM_MASTER 0x0001 25 #define L2CAP_LM_AUTH 0x0002 26 #define L2CAP_LM_ENCRYPT 0x0004 27 #define L2CAP_LM_TRUSTED 0x0008 28 #define L2CAP_LM_RELIABLE 0x0010 29 #define L2CAP_LM_SECURE 0x0020 30 #define L2CAP_COMMAND_REJ 0x01 31 #define L2CAP_CONN_REQ 0x02 32 #define L2CAP_CONN_RSP 0x03 33 #define L2CAP_CONF_REQ 0x04 34 #define L2CAP_CONF_RSP 0x05 35 #define L2CAP_DISCONN_REQ 0x06 36 #define L2CAP_DISCONN_RSP 0x07 37 #define L2CAP_ECHO_REQ 0x08 38 #define L2CAP_ECHO_RSP 0x09 39 #define L2CAP_INFO_REQ 0x0a 40 #define L2CAP_INFO_RSP 0x0b 41 #define L2CAP_HDR_SIZE 4 42 #define L2CAP_CMD_HDR_SIZE 4 43 #define L2CAP_CMD_REJ_SIZE 2 44 #define L2CAP_CONN_REQ_SIZE 4 45 #define L2CAP_CONN_RSP_SIZE 8 46 #define L2CAP_CR_SUCCESS 0x0000 47 #define L2CAP_CR_PEND 0x0001 48 #define L2CAP_CR_BAD_PSM 0x0002 49 #define L2CAP_CR_SEC_BLOCK 0x0003 50 #define L2CAP_CR_NO_MEM 0x0004 51 #define L2CAP_CS_NO_INFO 0x0000 52 #define L2CAP_CS_AUTHEN_PEND 0x0001 53 #define L2CAP_CS_AUTHOR_PEND 0x0002 54 #define L2CAP_CONF_REQ_SIZE 4 55 #define L2CAP_CONF_RSP_SIZE 6 56 #define L2CAP_CONF_SUCCESS 0x0000 57 #define L2CAP_CONF_UNACCEPT 0x0001 58 #define L2CAP_CONF_REJECT 0x0002 59 #define L2CAP_CONF_UNKNOWN 0x0003 60 #define L2CAP_CONF_OPT_SIZE 2 61 #define L2CAP_CONF_MTU 0x01 62 #define L2CAP_CONF_FLUSH_TO 0x02 63 #define L2CAP_CONF_QOS 0x03 64 #define L2CAP_CONF_RFC 0x04 65 #define L2CAP_CONF_RFC_MODE 0x04 66 #define L2CAP_CONF_MAX_SIZE 22 67 #define L2CAP_MODE_BASIC 0x00 68 #define L2CAP_MODE_RETRANS 0x01 69 #define L2CAP_MODE_FLOWCTL 0x02 70 #define L2CAP_DISCONN_REQ_SIZE 4 71 #define L2CAP_DISCONN_RSP_SIZE 4 72 #define L2CAP_INFO_REQ_SIZE 2 73 #define L2CAP_INFO_RSP_SIZE 4 74 #define L2CAP_IT_CL_MTU 0x0001 75 #define L2CAP_IT_FEAT_MASK 0x0002 76 #define L2CAP_IR_SUCCESS 0x0000 77 #define L2CAP_IR_NOTSUPP 0x0001 78 #ifdef __cplusplus 79 #endif 80 struct sockaddr_l2 { 81 sa_family_t l2_family; 82 unsigned short l2_psm; 83 bdaddr_t l2_bdaddr; 84 }; 85 #endif 86