diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-10-08 18:40:21 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-10-08 20:20:43 +0200 |
commit | db7be4463239a9945ed307d4af55e467a78db984 (patch) | |
tree | 29a7be53e4b9d73e4ad34b4f4bb2b68ae25c41e1 | |
parent | f10c57801adc3f92831e48ed8a9286c26a9ede4a (diff) |
Use enum for PKT_LINK_*
Makes it easier to understand different types and how they relate to
same field.
Change-Id: I1bec4d5d132a1476f9c418502ad808b7c778cee2
-rw-r--r-- | include/osmo-pcap/wireformat.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/include/osmo-pcap/wireformat.h b/include/osmo-pcap/wireformat.h index 3f92ee8..54dce22 100644 --- a/include/osmo-pcap/wireformat.h +++ b/include/osmo-pcap/wireformat.h @@ -26,15 +26,10 @@ #include <inttypes.h> #include <pcap.h> -/* - * Should send an entire pcap header - */ -#define PKT_LINK_HDR 0 - -/* - * Should send one packet... - */ -#define PKT_LINK_DATA 1 +enum OsmoPcapDataType { + PKT_LINK_HDR, /* Should send an entire pcap header */ + PKT_LINK_DATA /* Should send one packet */ +}; struct osmo_pcap_data { uint8_t type; |