aboutsummaryrefslogtreecommitdiff
path: root/pcap/bluetooth.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-09-11 11:56:04 -0700
committerGuy Harris <guy@alum.mit.edu>2017-09-11 11:56:04 -0700
commita8f73cd6ebcdbdc25f4658cb4ee378329979c49d (patch)
treeb1352a58343266c011f95057e2f6aff7fd296968 /pcap/bluetooth.h
parentae295ecc4db4521d3da0ce0540fa557892e315b2 (diff)
Use C99 {u}intN_t types rather than BSD {u_}intN_t types.
We can get them on any sufficiently modern UN*X, as they provide <inttypes.h>. We can get them with MSVC, by including <inttypes.h> on newer versions or defining them ourselves in older versions. We can get them with various development environments on MS-DOS. Add a pcap/pcap-inttypes.h header file that does what's necessary to get them defined, and include that in the pcap/*.h headers that use those types. Have pcap-types.h only include what's necessary to get u_int defined.
Diffstat (limited to 'pcap/bluetooth.h')
-rw-r--r--pcap/bluetooth.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/pcap/bluetooth.h b/pcap/bluetooth.h
index c5f378ab..15dc5a82 100644
--- a/pcap/bluetooth.h
+++ b/pcap/bluetooth.h
@@ -34,12 +34,14 @@
#ifndef lib_pcap_bluetooth_h
#define lib_pcap_bluetooth_h
+#include <pcap/pcap-inttypes.h>
+
/*
* Header prepended libpcap to each bluetooth h4 frame,
* fields are in network byte order
*/
typedef struct _pcap_bluetooth_h4_header {
- u_int32_t direction; /* if first bit is set direction is incoming */
+ uint32_t direction; /* if first bit is set direction is incoming */
} pcap_bluetooth_h4_header;
/*
@@ -47,9 +49,8 @@ typedef struct _pcap_bluetooth_h4_header {
* fields are in network byte order
*/
typedef struct _pcap_bluetooth_linux_monitor_header {
- u_int16_t adapter_id;
- u_int16_t opcode;
+ uint16_t adapter_id;
+ uint16_t opcode;
} pcap_bluetooth_linux_monitor_header;
-
#endif