xref: /freebsd/contrib/libpcap/pcap/bluetooth.h (revision 681ed54caa769e19ddacdf0658fcc5ac5ea7cf3f)
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 
34a8e07101SRui Paulo #ifndef _PCAP_BLUETOOTH_STRUCTS_H__
35a8e07101SRui Paulo #define _PCAP_BLUETOOTH_STRUCTS_H__
36a8e07101SRui Paulo 
37a8e07101SRui Paulo /*
38*681ed54cSXin LI  * Header prepended libpcap to each bluetooth h4 frame,
39a8e07101SRui Paulo  * fields are in network byte order
40a8e07101SRui Paulo  */
41a8e07101SRui Paulo typedef struct _pcap_bluetooth_h4_header {
42a8e07101SRui Paulo 	u_int32_t direction; /* if first bit is set direction is incoming */
43a8e07101SRui Paulo } pcap_bluetooth_h4_header;
44a8e07101SRui Paulo 
45*681ed54cSXin LI /*
46*681ed54cSXin LI  * Header prepended libpcap to each bluetooth linux monitor frame,
47*681ed54cSXin LI  * fields are in network byte order
48*681ed54cSXin LI  */
49*681ed54cSXin LI typedef struct _pcap_bluetooth_linux_monitor_header {
50*681ed54cSXin LI 	u_int16_t adapter_id;
51*681ed54cSXin LI 	u_int16_t opcode;
52*681ed54cSXin LI } pcap_bluetooth_linux_monitor_header;
53*681ed54cSXin LI 
54a8e07101SRui Paulo 
55a8e07101SRui Paulo #endif
56