xref: /freebsd/contrib/libpcap/pcap/bluetooth.h (revision b00ab7548b418624b6719ab8a2e8aaeade767a70)
1a8e07101SRui Paulo /*
2a8e07101SRui Paulo  * Copyright (c) 2006 Paolo Abeni (Italy)
3a8e07101SRui Paulo  * All rights reserved.
4a8e07101SRui Paulo  *
5a8e07101SRui Paulo  * Redistribution and use in source and binary forms, with or without
6a8e07101SRui Paulo  * modification, are permitted provided that the following conditions
7a8e07101SRui Paulo  * are met:
8a8e07101SRui Paulo  *
9a8e07101SRui Paulo  * 1. Redistributions of source code must retain the above copyright
10a8e07101SRui Paulo  * notice, this list of conditions and the following disclaimer.
11a8e07101SRui Paulo  * 2. Redistributions in binary form must reproduce the above copyright
12a8e07101SRui Paulo  * notice, this list of conditions and the following disclaimer in the
13a8e07101SRui Paulo  * documentation and/or other materials provided with the distribution.
14a8e07101SRui Paulo  * 3. The name of the author may not be used to endorse or promote
15a8e07101SRui Paulo  * products derived from this software without specific prior written
16a8e07101SRui Paulo  * permission.
17a8e07101SRui Paulo  *
18a8e07101SRui Paulo  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19a8e07101SRui Paulo  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20a8e07101SRui Paulo  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21a8e07101SRui Paulo  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22a8e07101SRui Paulo  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23a8e07101SRui Paulo  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24a8e07101SRui Paulo  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25a8e07101SRui Paulo  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26a8e07101SRui Paulo  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27a8e07101SRui Paulo  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28a8e07101SRui Paulo  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29a8e07101SRui Paulo  *
30a8e07101SRui Paulo  * bluetooth data struct
31a8e07101SRui Paulo  * By Paolo Abeni <paolo.abeni@email.it>
32a8e07101SRui Paulo  */
33a8e07101SRui Paulo 
34ada6f083SXin LI #ifndef lib_pcap_bluetooth_h
35ada6f083SXin LI #define lib_pcap_bluetooth_h
36a8e07101SRui Paulo 
37*b00ab754SHans Petter Selasky #include <pcap/pcap-inttypes.h>
38*b00ab754SHans Petter Selasky 
39a8e07101SRui Paulo /*
40681ed54cSXin LI  * Header prepended libpcap to each bluetooth h4 frame,
41a8e07101SRui Paulo  * fields are in network byte order
42a8e07101SRui Paulo  */
43a8e07101SRui Paulo typedef struct _pcap_bluetooth_h4_header {
44*b00ab754SHans Petter Selasky 	uint32_t direction; /* if first bit is set direction is incoming */
45a8e07101SRui Paulo } pcap_bluetooth_h4_header;
46a8e07101SRui Paulo 
47681ed54cSXin LI /*
48681ed54cSXin LI  * Header prepended libpcap to each bluetooth linux monitor frame,
49681ed54cSXin LI  * fields are in network byte order
50681ed54cSXin LI  */
51681ed54cSXin LI typedef struct _pcap_bluetooth_linux_monitor_header {
52*b00ab754SHans Petter Selasky 	uint16_t adapter_id;
53*b00ab754SHans Petter Selasky 	uint16_t opcode;
54681ed54cSXin LI } pcap_bluetooth_linux_monitor_header;
55681ed54cSXin LI 
56a8e07101SRui Paulo #endif
57