diff options
author | Guy Harris <guy@alum.mit.edu> | 2017-09-11 11:56:04 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2017-09-11 11:56:04 -0700 |
commit | a8f73cd6ebcdbdc25f4658cb4ee378329979c49d (patch) | |
tree | b1352a58343266c011f95057e2f6aff7fd296968 /pcap/vlan.h | |
parent | ae295ecc4db4521d3da0ce0540fa557892e315b2 (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/vlan.h')
-rw-r--r-- | pcap/vlan.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pcap/vlan.h b/pcap/vlan.h index 021f6129..b29dd73c 100644 --- a/pcap/vlan.h +++ b/pcap/vlan.h @@ -34,9 +34,11 @@ #ifndef lib_pcap_vlan_h #define lib_pcap_vlan_h +#include <pcap/pcap-inttypes.h> + struct vlan_tag { - u_int16_t vlan_tpid; /* ETH_P_8021Q */ - u_int16_t vlan_tci; /* VLAN TCI */ + uint16_t vlan_tpid; /* ETH_P_8021Q */ + uint16_t vlan_tci; /* VLAN TCI */ }; #define VLAN_TAG_LEN 4 |