include/net/bluetooth/bluetooth.h

Source file repositories/reference/linux-study-clean/include/net/bluetooth/bluetooth.h

File Facts

System
Linux kernel
Corpus path
include/net/bluetooth/bluetooth.h
Extension
.h
Size
16086 bytes
Lines
683
Domain
Networking Core
Bucket
Sockets, Protocols, Packet Path, And Network Policy
Inferred role
Networking Core: implementation source
Status
source implementation candidate

Why This File Exists

Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.

Dependency Surface

Detected Declarations

Annotated Snippet

struct bt_security {
	__u8 level;
	__u8 key_size;
};
#define BT_SECURITY_SDP		0
#define BT_SECURITY_LOW		1
#define BT_SECURITY_MEDIUM	2
#define BT_SECURITY_HIGH	3
#define BT_SECURITY_FIPS	4

#define BT_DEFER_SETUP	7

#define BT_FLUSHABLE	8

#define BT_FLUSHABLE_OFF	0
#define BT_FLUSHABLE_ON		1

#define BT_POWER	9
struct bt_power {
	__u8 force_active;
};
#define BT_POWER_FORCE_ACTIVE_OFF 0
#define BT_POWER_FORCE_ACTIVE_ON  1

#define BT_CHANNEL_POLICY	10

/* BR/EDR only (default policy)
 *   AMP controllers cannot be used.
 *   Channel move requests from the remote device are denied.
 *   If the L2CAP channel is currently using AMP, move the channel to BR/EDR.
 */
#define BT_CHANNEL_POLICY_BREDR_ONLY		0

/* BR/EDR Preferred
 *   Allow use of AMP controllers.
 *   If the L2CAP channel is currently on AMP, move it to BR/EDR.
 *   Channel move requests from the remote device are allowed.
 */
#define BT_CHANNEL_POLICY_BREDR_PREFERRED	1

/* AMP Preferred
 *   Allow use of AMP controllers
 *   If the L2CAP channel is currently on BR/EDR and AMP controller
 *     resources are available, initiate a channel move to AMP.
 *   Channel move requests from the remote device are allowed.
 *   If the L2CAP socket has not been connected yet, try to create
 *     and configure the channel directly on an AMP controller rather
 *     than BR/EDR.
 */
#define BT_CHANNEL_POLICY_AMP_PREFERRED		2

#define BT_VOICE		11
struct bt_voice {
	__u16 setting;
};

#define BT_VOICE_TRANSPARENT			0x0003
#define BT_VOICE_CVSD_16BIT			0x0060
#define BT_VOICE_TRANSPARENT_16BIT		0x0063

#define BT_SNDMTU		12
#define BT_RCVMTU		13
#define BT_PHY			14

#define BT_PHY_BR_1M_1SLOT	BIT(0)
#define BT_PHY_BR_1M_3SLOT	BIT(1)
#define BT_PHY_BR_1M_5SLOT	BIT(2)
#define BT_PHY_EDR_2M_1SLOT	BIT(3)
#define BT_PHY_EDR_2M_3SLOT	BIT(4)
#define BT_PHY_EDR_2M_5SLOT	BIT(5)
#define BT_PHY_EDR_3M_1SLOT	BIT(6)
#define BT_PHY_EDR_3M_3SLOT	BIT(7)
#define BT_PHY_EDR_3M_5SLOT	BIT(8)
#define BT_PHY_LE_1M_TX		BIT(9)
#define BT_PHY_LE_1M_RX		BIT(10)
#define BT_PHY_LE_2M_TX		BIT(11)
#define BT_PHY_LE_2M_RX		BIT(12)
#define BT_PHY_LE_CODED_TX	BIT(13)
#define BT_PHY_LE_CODED_RX	BIT(14)

#define BT_PHY_BREDR_MASK	(BT_PHY_BR_1M_1SLOT | BT_PHY_BR_1M_3SLOT | \
				 BT_PHY_BR_1M_5SLOT | BT_PHY_EDR_2M_1SLOT | \
				 BT_PHY_EDR_2M_3SLOT | BT_PHY_EDR_2M_5SLOT | \
				 BT_PHY_EDR_3M_1SLOT | BT_PHY_EDR_3M_3SLOT | \
				 BT_PHY_EDR_3M_5SLOT)
#define BT_PHY_LE_MASK		(BT_PHY_LE_1M_TX | BT_PHY_LE_1M_RX | \
				 BT_PHY_LE_2M_TX | BT_PHY_LE_2M_RX | \
				 BT_PHY_LE_CODED_TX | BT_PHY_LE_CODED_RX)

#define BT_MODE			15

Annotation

Implementation Notes