Use enum for PKT_LINK_*

Makes it easier to understand different types and how they relate to
same field.

Change-Id: I1bec4d5d132a1476f9c418502ad808b7c778cee2
This commit is contained in:
Pau Espin 2018-10-08 18:40:21 +02:00
parent f10c57801a
commit db7be44632
1 changed files with 4 additions and 9 deletions

View File

@ -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;