From db7be4463239a9945ed307d4af55e467a78db984 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Mon, 8 Oct 2018 18:40:21 +0200 Subject: [PATCH] Use enum for PKT_LINK_* Makes it easier to understand different types and how they relate to same field. Change-Id: I1bec4d5d132a1476f9c418502ad808b7c778cee2 --- include/osmo-pcap/wireformat.h | 13 ++++--------- 1 file 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 #include -/* - * 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;