From a48d8b4639f36e6fc2d7e87cac92e178674caaa1 Mon Sep 17 00:00:00 2001 From: Max Krasnyansky Date: Fri, 8 Mar 2002 21:10:06 +0000 Subject: Initial revision --- include/l2cap.h | 200 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 200 insertions(+) create mode 100644 include/l2cap.h (limited to 'include/l2cap.h') diff --git a/include/l2cap.h b/include/l2cap.h new file mode 100644 index 00000000..25178401 --- /dev/null +++ b/include/l2cap.h @@ -0,0 +1,200 @@ +/* + BlueZ - Bluetooth protocol stack for Linux + Copyright (C) 2000-2001 Qualcomm Incorporated + + Written 2000,2001 by Maxim Krasnyansky + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation; + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. + IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY + CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, + COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS + SOFTWARE IS DISCLAIMED. +*/ + +/* + * $Id$ + */ + +#ifndef __L2CAP_H +#define __L2CAP_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* L2CAP defaults */ +#define L2CAP_DEFAULT_MTU 672 +#define L2CAP_DEFAULT_FLUSH_TO 0xFFFF + +#define L2CAP_CONN_TIMEOUT (HZ * 40) + +/* L2CAP socket address */ +struct sockaddr_l2 { + sa_family_t l2_family; + unsigned short l2_psm; + bdaddr_t l2_bdaddr; +}; + +/* Socket options */ +#define L2CAP_OPTIONS 0x01 +struct l2cap_options { + uint16_t omtu; + uint16_t imtu; + uint16_t flush_to; +}; + +#define L2CAP_CONNINFO 0x02 +struct l2cap_conninfo { + uint16_t hci_handle; +}; + +#define L2CAP_LM 0x03 +#define L2CAP_LM_MASTER 0x0001 +#define L2CAP_LM_AUTH 0x0002 +#define L2CAP_LM_ENCRYPT 0x0004 +#define L2CAP_LM_TRUSTED 0x0008 + +#define L2CAP_QOS 0x04 +struct l2cap_qos { + uint16_t service_type; + uint32_t token_rate; + uint32_t token_bucket_size; + uint32_t peak_bandwidth; + uint32_t latency; + uint32_t delay_variation; +}; + +#define L2CAP_SERV_NO_TRAFFIC 0x00 +#define L2CAP_SERV_BEST_EFFORT 0x01 +#define L2CAP_SERV_GUARANTEED 0x02 + +/* L2CAP command codes */ +#define L2CAP_COMMAND_REJ 0x01 +#define L2CAP_CONN_REQ 0x02 +#define L2CAP_CONN_RSP 0x03 +#define L2CAP_CONF_REQ 0x04 +#define L2CAP_CONF_RSP 0x05 +#define L2CAP_DISCONN_REQ 0x06 +#define L2CAP_DISCONN_RSP 0x07 +#define L2CAP_ECHO_REQ 0x08 +#define L2CAP_ECHO_RSP 0x09 +#define L2CAP_INFO_REQ 0x0a +#define L2CAP_INFO_RSP 0x0b + +/* L2CAP structures */ +typedef struct { + uint16_t len; + uint16_t cid; +} __attribute__ ((packed)) l2cap_hdr; +#define L2CAP_HDR_SIZE 4 + +typedef struct { + uint8_t code; + uint8_t ident; + uint16_t len; +} __attribute__ ((packed)) l2cap_cmd_hdr; +#define L2CAP_CMD_HDR_SIZE 4 + +typedef struct { + uint16_t reason; +} __attribute__ ((packed)) l2cap_cmd_rej; +#define L2CAP_CMD_REJ_SIZE 2 + +typedef struct { + uint16_t psm; + uint16_t scid; +} __attribute__ ((packed)) l2cap_conn_req; +#define L2CAP_CONN_REQ_SIZE 4 + +typedef struct { + uint16_t dcid; + uint16_t scid; + uint16_t result; + uint16_t status; +} __attribute__ ((packed)) l2cap_conn_rsp; +#define L2CAP_CONN_RSP_SIZE 8 + +/* connect result */ +#define L2CAP_CR_SUCCESS 0x0000 +#define L2CAP_CR_PEND 0x0001 +#define L2CAP_CR_BAD_PSM 0x0002 +#define L2CAP_CR_SEC_BLOCK 0x0003 +#define L2CAP_CR_NO_MEM 0x0004 + +/* connect status */ +#define L2CAP_CS_NO_INFO 0x0000 +#define L2CAP_CS_AUTHEN_PEND 0x0001 +#define L2CAP_CS_AUTHOR_PEND 0x0002 + +typedef struct { + uint16_t dcid; + uint16_t flags; + uint8_t data[0]; +} __attribute__ ((packed)) l2cap_conf_req; +#define L2CAP_CONF_REQ_SIZE 4 + +typedef struct { + uint16_t scid; + uint16_t flags; + uint16_t result; + uint8_t data[0]; +} __attribute__ ((packed)) l2cap_conf_rsp; +#define L2CAP_CONF_RSP_SIZE 6 + +#define L2CAP_CONF_SUCCESS 0x00 +#define L2CAP_CONF_UNACCEPT 0x01 + +typedef struct { + uint8_t type; + uint8_t len; + uint8_t val[0]; +} __attribute__ ((packed)) l2cap_conf_opt; +#define L2CAP_CONF_OPT_SIZE 2 + +#define L2CAP_CONF_MTU 0x01 +#define L2CAP_CONF_FLUSH_TO 0x02 +#define L2CAP_CONF_QOS 0x03 + +#define L2CAP_CONF_MAX_SIZE 22 + +typedef struct { + uint16_t dcid; + uint16_t scid; +} __attribute__ ((packed)) l2cap_disconn_req; +#define L2CAP_DISCONN_REQ_SIZE 4 + +typedef struct { + uint16_t dcid; + uint16_t scid; +} __attribute__ ((packed)) l2cap_disconn_rsp; +#define L2CAP_DISCONN_RSP_SIZE 4 + +typedef struct { + uint16_t type; + uint8_t data[0]; +} __attribute__ ((packed)) l2cap_info_req; +#define L2CAP_INFO_REQ_SIZE 2 + +typedef struct { + uint16_t type; + uint16_t result; + uint8_t data[0]; +} __attribute__ ((packed)) l2cap_info_rsp; +#define L2CAP_INFO_RSP_SIZE 4 + +#ifdef __cplusplus +} +#endif + +#endif /* __L2CAP_H */ -- cgit From 742d032d41631219ddbd39f39b7c70419064acc1 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Wed, 28 May 2003 23:59:55 +0000 Subject: Add definition of LM_RELIABLE flag --- include/l2cap.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/l2cap.h') diff --git a/include/l2cap.h b/include/l2cap.h index 25178401..dec00efc 100644 --- a/include/l2cap.h +++ b/include/l2cap.h @@ -64,6 +64,7 @@ struct l2cap_conninfo { #define L2CAP_LM_AUTH 0x0002 #define L2CAP_LM_ENCRYPT 0x0004 #define L2CAP_LM_TRUSTED 0x0008 +#define L2CAP_LM_RELIABLE 0x0010 #define L2CAP_QOS 0x04 struct l2cap_qos { -- cgit From b45841191f6ab4cc55ccd040a5530c2d08c6ddc6 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 3 Jul 2003 00:06:26 +0000 Subject: Cleanup --- include/l2cap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/l2cap.h') diff --git a/include/l2cap.h b/include/l2cap.h index dec00efc..a5110a24 100644 --- a/include/l2cap.h +++ b/include/l2cap.h @@ -34,7 +34,7 @@ extern "C" { #endif /* L2CAP defaults */ -#define L2CAP_DEFAULT_MTU 672 +#define L2CAP_DEFAULT_MTU 672 #define L2CAP_DEFAULT_FLUSH_TO 0xFFFF #define L2CAP_CONN_TIMEOUT (HZ * 40) @@ -54,7 +54,7 @@ struct l2cap_options { uint16_t flush_to; }; -#define L2CAP_CONNINFO 0x02 +#define L2CAP_CONNINFO 0x02 struct l2cap_conninfo { uint16_t hci_handle; }; -- cgit From 764abe23a0d4ede999f1f34ee0e310c0eeaaff79 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 3 Apr 2004 05:11:38 +0000 Subject: Update copyright information --- include/l2cap.h | 200 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 101 insertions(+), 99 deletions(-) (limited to 'include/l2cap.h') diff --git a/include/l2cap.h b/include/l2cap.h index a5110a24..d06eb800 100644 --- a/include/l2cap.h +++ b/include/l2cap.h @@ -1,28 +1,30 @@ -/* - BlueZ - Bluetooth protocol stack for Linux - Copyright (C) 2000-2001 Qualcomm Incorporated - - Written 2000,2001 by Maxim Krasnyansky - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License version 2 as - published by the Free Software Foundation; - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. - IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY - CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, - COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS - SOFTWARE IS DISCLAIMED. -*/ - /* + * + * BlueZ - Bluetooth protocol stack for Linux + * + * Copyright (C) 2000-2001 Qualcomm Incorporated + * Copyright (C) 2002-2003 Maxim Krasnyansky + * Copyright (C) 2002-2004 Marcel Holtmann + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. + * IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY + * CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, + * COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS + * SOFTWARE IS DISCLAIMED. + * + * * $Id$ */ @@ -37,7 +39,7 @@ extern "C" { #define L2CAP_DEFAULT_MTU 672 #define L2CAP_DEFAULT_FLUSH_TO 0xFFFF -#define L2CAP_CONN_TIMEOUT (HZ * 40) +#define L2CAP_CONN_TIMEOUT (HZ * 40) /* L2CAP socket address */ struct sockaddr_l2 { @@ -81,87 +83,87 @@ struct l2cap_qos { #define L2CAP_SERV_GUARANTEED 0x02 /* L2CAP command codes */ -#define L2CAP_COMMAND_REJ 0x01 -#define L2CAP_CONN_REQ 0x02 -#define L2CAP_CONN_RSP 0x03 -#define L2CAP_CONF_REQ 0x04 -#define L2CAP_CONF_RSP 0x05 -#define L2CAP_DISCONN_REQ 0x06 -#define L2CAP_DISCONN_RSP 0x07 -#define L2CAP_ECHO_REQ 0x08 -#define L2CAP_ECHO_RSP 0x09 -#define L2CAP_INFO_REQ 0x0a -#define L2CAP_INFO_RSP 0x0b +#define L2CAP_COMMAND_REJ 0x01 +#define L2CAP_CONN_REQ 0x02 +#define L2CAP_CONN_RSP 0x03 +#define L2CAP_CONF_REQ 0x04 +#define L2CAP_CONF_RSP 0x05 +#define L2CAP_DISCONN_REQ 0x06 +#define L2CAP_DISCONN_RSP 0x07 +#define L2CAP_ECHO_REQ 0x08 +#define L2CAP_ECHO_RSP 0x09 +#define L2CAP_INFO_REQ 0x0a +#define L2CAP_INFO_RSP 0x0b /* L2CAP structures */ typedef struct { - uint16_t len; - uint16_t cid; -} __attribute__ ((packed)) l2cap_hdr; -#define L2CAP_HDR_SIZE 4 + uint16_t len; + uint16_t cid; +} __attribute__ ((packed)) l2cap_hdr; +#define L2CAP_HDR_SIZE 4 typedef struct { - uint8_t code; - uint8_t ident; - uint16_t len; -} __attribute__ ((packed)) l2cap_cmd_hdr; -#define L2CAP_CMD_HDR_SIZE 4 + uint8_t code; + uint8_t ident; + uint16_t len; +} __attribute__ ((packed)) l2cap_cmd_hdr; +#define L2CAP_CMD_HDR_SIZE 4 typedef struct { - uint16_t reason; -} __attribute__ ((packed)) l2cap_cmd_rej; -#define L2CAP_CMD_REJ_SIZE 2 + uint16_t reason; +} __attribute__ ((packed)) l2cap_cmd_rej; +#define L2CAP_CMD_REJ_SIZE 2 typedef struct { - uint16_t psm; - uint16_t scid; -} __attribute__ ((packed)) l2cap_conn_req; -#define L2CAP_CONN_REQ_SIZE 4 + uint16_t psm; + uint16_t scid; +} __attribute__ ((packed)) l2cap_conn_req; +#define L2CAP_CONN_REQ_SIZE 4 typedef struct { - uint16_t dcid; - uint16_t scid; - uint16_t result; - uint16_t status; -} __attribute__ ((packed)) l2cap_conn_rsp; -#define L2CAP_CONN_RSP_SIZE 8 + uint16_t dcid; + uint16_t scid; + uint16_t result; + uint16_t status; +} __attribute__ ((packed)) l2cap_conn_rsp; +#define L2CAP_CONN_RSP_SIZE 8 /* connect result */ -#define L2CAP_CR_SUCCESS 0x0000 -#define L2CAP_CR_PEND 0x0001 -#define L2CAP_CR_BAD_PSM 0x0002 -#define L2CAP_CR_SEC_BLOCK 0x0003 -#define L2CAP_CR_NO_MEM 0x0004 +#define L2CAP_CR_SUCCESS 0x0000 +#define L2CAP_CR_PEND 0x0001 +#define L2CAP_CR_BAD_PSM 0x0002 +#define L2CAP_CR_SEC_BLOCK 0x0003 +#define L2CAP_CR_NO_MEM 0x0004 /* connect status */ -#define L2CAP_CS_NO_INFO 0x0000 -#define L2CAP_CS_AUTHEN_PEND 0x0001 -#define L2CAP_CS_AUTHOR_PEND 0x0002 +#define L2CAP_CS_NO_INFO 0x0000 +#define L2CAP_CS_AUTHEN_PEND 0x0001 +#define L2CAP_CS_AUTHOR_PEND 0x0002 typedef struct { - uint16_t dcid; - uint16_t flags; - uint8_t data[0]; -} __attribute__ ((packed)) l2cap_conf_req; -#define L2CAP_CONF_REQ_SIZE 4 + uint16_t dcid; + uint16_t flags; + uint8_t data[0]; +} __attribute__ ((packed)) l2cap_conf_req; +#define L2CAP_CONF_REQ_SIZE 4 typedef struct { - uint16_t scid; - uint16_t flags; - uint16_t result; - uint8_t data[0]; -} __attribute__ ((packed)) l2cap_conf_rsp; -#define L2CAP_CONF_RSP_SIZE 6 + uint16_t scid; + uint16_t flags; + uint16_t result; + uint8_t data[0]; +} __attribute__ ((packed)) l2cap_conf_rsp; +#define L2CAP_CONF_RSP_SIZE 6 #define L2CAP_CONF_SUCCESS 0x00 #define L2CAP_CONF_UNACCEPT 0x01 typedef struct { - uint8_t type; - uint8_t len; - uint8_t val[0]; -} __attribute__ ((packed)) l2cap_conf_opt; -#define L2CAP_CONF_OPT_SIZE 2 + uint8_t type; + uint8_t len; + uint8_t val[0]; +} __attribute__ ((packed)) l2cap_conf_opt; +#define L2CAP_CONF_OPT_SIZE 2 #define L2CAP_CONF_MTU 0x01 #define L2CAP_CONF_FLUSH_TO 0x02 @@ -170,29 +172,29 @@ typedef struct { #define L2CAP_CONF_MAX_SIZE 22 typedef struct { - uint16_t dcid; - uint16_t scid; -} __attribute__ ((packed)) l2cap_disconn_req; -#define L2CAP_DISCONN_REQ_SIZE 4 + uint16_t dcid; + uint16_t scid; +} __attribute__ ((packed)) l2cap_disconn_req; +#define L2CAP_DISCONN_REQ_SIZE 4 typedef struct { - uint16_t dcid; - uint16_t scid; -} __attribute__ ((packed)) l2cap_disconn_rsp; -#define L2CAP_DISCONN_RSP_SIZE 4 + uint16_t dcid; + uint16_t scid; +} __attribute__ ((packed)) l2cap_disconn_rsp; +#define L2CAP_DISCONN_RSP_SIZE 4 typedef struct { - uint16_t type; - uint8_t data[0]; -} __attribute__ ((packed)) l2cap_info_req; -#define L2CAP_INFO_REQ_SIZE 2 + uint16_t type; + uint8_t data[0]; +} __attribute__ ((packed)) l2cap_info_req; +#define L2CAP_INFO_REQ_SIZE 2 typedef struct { - uint16_t type; - uint16_t result; - uint8_t data[0]; -} __attribute__ ((packed)) l2cap_info_rsp; -#define L2CAP_INFO_RSP_SIZE 4 + uint16_t type; + uint16_t result; + uint8_t data[0]; +} __attribute__ ((packed)) l2cap_info_rsp; +#define L2CAP_INFO_RSP_SIZE 4 #ifdef __cplusplus } -- cgit From 4f018af0f15901dcda46f6b93ebf9db7c0d1b993 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 9 Jul 2004 19:43:49 +0000 Subject: Add info type and info result definitions --- include/l2cap.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/l2cap.h') diff --git a/include/l2cap.h b/include/l2cap.h index d06eb800..e2fa860e 100644 --- a/include/l2cap.h +++ b/include/l2cap.h @@ -196,6 +196,14 @@ typedef struct { } __attribute__ ((packed)) l2cap_info_rsp; #define L2CAP_INFO_RSP_SIZE 4 +/* info type */ +#define L2CAP_IT_CL_MTU 0x0001 +#define L2CAP_IT_FEAT_MASK 0x0002 + +/* info result */ +#define L2CAP_IR_SUCCESS 0x0000 +#define L2CAP_IR_NOTSUPP 0x0001 + #ifdef __cplusplus } #endif -- cgit From 0c8f74212a5345507db372c9ba78c63000971f89 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 9 Jul 2004 22:30:56 +0000 Subject: Add value for L2CAP_CONF_RFC_MODE --- include/l2cap.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/l2cap.h') diff --git a/include/l2cap.h b/include/l2cap.h index e2fa860e..b5052dcf 100644 --- a/include/l2cap.h +++ b/include/l2cap.h @@ -168,6 +168,7 @@ typedef struct { #define L2CAP_CONF_MTU 0x01 #define L2CAP_CONF_FLUSH_TO 0x02 #define L2CAP_CONF_QOS 0x03 +#define L2CAP_CONF_RFC_MODE 0x04 #define L2CAP_CONF_MAX_SIZE 22 -- cgit From e1650950c01cf268c61b332efbb9b5b3f731a158 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 29 Oct 2004 02:44:56 +0000 Subject: Add RFCOMM socket options --- include/l2cap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/l2cap.h') diff --git a/include/l2cap.h b/include/l2cap.h index b5052dcf..e76f9020 100644 --- a/include/l2cap.h +++ b/include/l2cap.h @@ -48,7 +48,7 @@ struct sockaddr_l2 { bdaddr_t l2_bdaddr; }; -/* Socket options */ +/* L2CAP socket options */ #define L2CAP_OPTIONS 0x01 struct l2cap_options { uint16_t omtu; -- cgit From 5106bfbab293c6168eeb0f036a37efc548a632b4 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 9 Nov 2004 12:46:34 +0000 Subject: Add definition for the SECURE link mode --- include/l2cap.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/l2cap.h') diff --git a/include/l2cap.h b/include/l2cap.h index e76f9020..025d0f66 100644 --- a/include/l2cap.h +++ b/include/l2cap.h @@ -67,6 +67,7 @@ struct l2cap_conninfo { #define L2CAP_LM_ENCRYPT 0x0004 #define L2CAP_LM_TRUSTED 0x0008 #define L2CAP_LM_RELIABLE 0x0010 +#define L2CAP_LM_SECURE 0x0020 #define L2CAP_QOS 0x04 struct l2cap_qos { -- cgit From 984277aa49d35e4033f6c65266096364ac3243ed Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 25 Dec 2004 17:26:06 +0000 Subject: Update socket option definitions --- include/l2cap.h | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'include/l2cap.h') diff --git a/include/l2cap.h b/include/l2cap.h index 025d0f66..6fa155f1 100644 --- a/include/l2cap.h +++ b/include/l2cap.h @@ -54,11 +54,13 @@ struct l2cap_options { uint16_t omtu; uint16_t imtu; uint16_t flush_to; + uint8_t mode; }; #define L2CAP_CONNINFO 0x02 struct l2cap_conninfo { uint16_t hci_handle; + uint8_t dev_class[3]; }; #define L2CAP_LM 0x03 @@ -69,20 +71,6 @@ struct l2cap_conninfo { #define L2CAP_LM_RELIABLE 0x0010 #define L2CAP_LM_SECURE 0x0020 -#define L2CAP_QOS 0x04 -struct l2cap_qos { - uint16_t service_type; - uint32_t token_rate; - uint32_t token_bucket_size; - uint32_t peak_bandwidth; - uint32_t latency; - uint32_t delay_variation; -}; - -#define L2CAP_SERV_NO_TRAFFIC 0x00 -#define L2CAP_SERV_BEST_EFFORT 0x01 -#define L2CAP_SERV_GUARANTEED 0x02 - /* L2CAP command codes */ #define L2CAP_COMMAND_REJ 0x01 #define L2CAP_CONN_REQ 0x02 @@ -156,8 +144,10 @@ typedef struct { } __attribute__ ((packed)) l2cap_conf_rsp; #define L2CAP_CONF_RSP_SIZE 6 -#define L2CAP_CONF_SUCCESS 0x00 -#define L2CAP_CONF_UNACCEPT 0x01 +#define L2CAP_CONF_SUCCESS 0x0000 +#define L2CAP_CONF_UNACCEPT 0x0001 +#define L2CAP_CONF_REJECT 0x0002 +#define L2CAP_CONF_UNKNOWN 0x0003 typedef struct { uint8_t type; @@ -169,6 +159,7 @@ typedef struct { #define L2CAP_CONF_MTU 0x01 #define L2CAP_CONF_FLUSH_TO 0x02 #define L2CAP_CONF_QOS 0x03 +#define L2CAP_CONF_RFC 0x04 #define L2CAP_CONF_RFC_MODE 0x04 #define L2CAP_CONF_MAX_SIZE 22 -- cgit From 8661484ddc5d79689c6a3d1dd41102ca9e89a8cf Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 25 Dec 2004 17:35:34 +0000 Subject: Update connection information definitions --- include/l2cap.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'include/l2cap.h') diff --git a/include/l2cap.h b/include/l2cap.h index 6fa155f1..7029c32c 100644 --- a/include/l2cap.h +++ b/include/l2cap.h @@ -51,16 +51,16 @@ struct sockaddr_l2 { /* L2CAP socket options */ #define L2CAP_OPTIONS 0x01 struct l2cap_options { - uint16_t omtu; - uint16_t imtu; - uint16_t flush_to; - uint8_t mode; + uint16_t omtu; + uint16_t imtu; + uint16_t flush_to; + uint8_t mode; }; #define L2CAP_CONNINFO 0x02 struct l2cap_conninfo { - uint16_t hci_handle; - uint8_t dev_class[3]; + uint16_t hci_handle; + uint8_t dev_class[3]; }; #define L2CAP_LM 0x03 -- cgit From f1d23ac858b0593afe27e6b8e00a55d92804a6bb Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 29 Jan 2005 03:08:19 +0000 Subject: Update the copyright year --- include/l2cap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/l2cap.h') diff --git a/include/l2cap.h b/include/l2cap.h index 7029c32c..1425ab6a 100644 --- a/include/l2cap.h +++ b/include/l2cap.h @@ -4,7 +4,7 @@ * * Copyright (C) 2000-2001 Qualcomm Incorporated * Copyright (C) 2002-2003 Maxim Krasnyansky - * Copyright (C) 2002-2004 Marcel Holtmann + * Copyright (C) 2002-2005 Marcel Holtmann * * * This program is free software; you can redistribute it and/or modify -- cgit From 18cd6ecb4eae48ffdcf6df2bbf5fd828459c6cec Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Wed, 27 Apr 2005 10:49:43 +0000 Subject: Include sys/socket.h in the header files --- include/l2cap.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/l2cap.h') diff --git a/include/l2cap.h b/include/l2cap.h index 1425ab6a..ae88c7a0 100644 --- a/include/l2cap.h +++ b/include/l2cap.h @@ -35,6 +35,8 @@ extern "C" { #endif +#include + /* L2CAP defaults */ #define L2CAP_DEFAULT_MTU 672 #define L2CAP_DEFAULT_FLUSH_TO 0xFFFF -- cgit From c0d524486a50e8366c12c5ebea1a4441e9db46aa Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 29 Oct 2005 19:25:42 +0000 Subject: Big cleanup of CVS relics --- include/l2cap.h | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) (limited to 'include/l2cap.h') diff --git a/include/l2cap.h b/include/l2cap.h index ae88c7a0..616ae75e 100644 --- a/include/l2cap.h +++ b/include/l2cap.h @@ -8,24 +8,19 @@ * * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation; + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. - * IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY - * CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, - * COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS - * SOFTWARE IS DISCLAIMED. + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * - * - * $Id$ */ #ifndef __L2CAP_H -- cgit From 197a2aee34d9a1643cd474f8f167552ca6395d01 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 3 Jan 2006 12:56:09 +0000 Subject: Update copyright information --- include/l2cap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/l2cap.h') diff --git a/include/l2cap.h b/include/l2cap.h index 616ae75e..d2320f46 100644 --- a/include/l2cap.h +++ b/include/l2cap.h @@ -4,7 +4,7 @@ * * Copyright (C) 2000-2001 Qualcomm Incorporated * Copyright (C) 2002-2003 Maxim Krasnyansky - * Copyright (C) 2002-2005 Marcel Holtmann + * Copyright (C) 2002-2006 Marcel Holtmann * * * This program is free software; you can redistribute it and/or modify -- cgit From 25effaf3a661c4de960ebae7125ba56a990ad628 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 13 Jan 2007 17:50:06 +0000 Subject: Update copyright information --- include/l2cap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/l2cap.h') diff --git a/include/l2cap.h b/include/l2cap.h index d2320f46..5c173e28 100644 --- a/include/l2cap.h +++ b/include/l2cap.h @@ -4,7 +4,7 @@ * * Copyright (C) 2000-2001 Qualcomm Incorporated * Copyright (C) 2002-2003 Maxim Krasnyansky - * Copyright (C) 2002-2006 Marcel Holtmann + * Copyright (C) 2002-2007 Marcel Holtmann * * * This program is free software; you can redistribute it and/or modify -- cgit From a2c6ef2451d7677c976beebe7251ed0de9d3d392 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 26 May 2007 19:21:02 +0000 Subject: Remove variable data from information request structure --- include/l2cap.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/l2cap.h') diff --git a/include/l2cap.h b/include/l2cap.h index 5c173e28..49006803 100644 --- a/include/l2cap.h +++ b/include/l2cap.h @@ -175,7 +175,6 @@ typedef struct { typedef struct { uint16_t type; - uint8_t data[0]; } __attribute__ ((packed)) l2cap_info_req; #define L2CAP_INFO_REQ_SIZE 2 -- cgit From 302330d72bbdc03f33090747ae4b13110ec3a9c4 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sun, 16 Sep 2007 10:54:46 +0000 Subject: Add L2CAP mode constants --- include/l2cap.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/l2cap.h') diff --git a/include/l2cap.h b/include/l2cap.h index 49006803..478819ec 100644 --- a/include/l2cap.h +++ b/include/l2cap.h @@ -161,6 +161,10 @@ typedef struct { #define L2CAP_CONF_MAX_SIZE 22 +#define L2CAP_MODE_BASIC 0x00 +#define L2CAP_MODE_RETRANS 0x01 +#define L2CAP_MODE_FLOWCTL 0x02 + typedef struct { uint16_t dcid; uint16_t scid; -- cgit From 7208028266fc19d380ac77c97c46b6f2fdc80e1d Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 2 Feb 2008 03:11:09 +0000 Subject: Update copyright information --- include/l2cap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/l2cap.h') diff --git a/include/l2cap.h b/include/l2cap.h index 478819ec..d54e74d2 100644 --- a/include/l2cap.h +++ b/include/l2cap.h @@ -4,7 +4,7 @@ * * Copyright (C) 2000-2001 Qualcomm Incorporated * Copyright (C) 2002-2003 Maxim Krasnyansky - * Copyright (C) 2002-2007 Marcel Holtmann + * Copyright (C) 2002-2008 Marcel Holtmann * * * This program is free software; you can redistribute it and/or modify -- cgit