1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
4 * BlueZ - Bluetooth protocol stack for Linux
6 * Copyright (C) 2011-2014 Intel Corporation
7 * Copyright (C) 2002-2010 Marcel Holtmann <marcel@holtmann.org>
12 #define RFCOMM_SABM 0x2f
13 #define RFCOMM_DISC 0x43
14 #define RFCOMM_UA 0x63
15 #define RFCOMM_DM 0x0f
16 #define RFCOMM_UIH 0xef
18 #define RFCOMM_GET_TYPE(control) ((control) & 0xef)
19 #define RFCOMM_GET_DLCI(address) ((address & 0xfc) >> 2)
20 #define RFCOMM_GET_CHANNEL(address) ((address & 0xf8) >> 3)
21 #define RFCOMM_GET_DIR(address) ((address & 0x04) >> 2)
22 #define RFCOMM_TEST_EA(length) ((length & 0x01))
28 } __attribute__((packed));
35 } __attribute__((packed));
37 #define RFCOMM_TEST 0x08
38 #define RFCOMM_FCON 0x28
39 #define RFCOMM_FCOFF 0x18
40 #define RFCOMM_MSC 0x38
41 #define RFCOMM_RPN 0x24
42 #define RFCOMM_RLS 0x14
43 #define RFCOMM_PN 0x20
44 #define RFCOMM_NSC 0x04
46 #define RFCOMM_TEST_CR(type) ((type & 0x02))
47 #define RFCOMM_GET_MCC_TYPE(type) ((type & 0xfc) >> 2)
52 } __attribute__((packed));
57 } __attribute__((packed));
67 } __attribute__((packed));