From 4f8a22187ea0883b3124d68e8166ac52971e423d Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Sun, 16 Dec 2018 23:52:15 -0600 Subject: [PATCH] Still works! --- include/hexagram/pcapng.h | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/include/hexagram/pcapng.h b/include/hexagram/pcapng.h index ba15cfd..a67f20d 100644 --- a/include/hexagram/pcapng.h +++ b/include/hexagram/pcapng.h @@ -7,7 +7,7 @@ /* * pcapng reader error states */ -enum { +typedef enum { HEXAGRAM_PCAPNG_ERROR_OK = 0, HEXAGRAM_PCAPNG_ERROR_IO = 1, HEXAGRAM_PCAPNG_ERROR_TRUNCATED = 2, @@ -18,14 +18,12 @@ enum { /* * pcapng block option types and structure */ -enum { - HEXAGRAM_PCAPNG_OPTION_END = 0, - HEXAGRAM_PCAPNG_OPTION_COMMENT = 1, - HEXAGRAM_PCAPNG_OPTION_CUSTOM1 = 0x0bac, - HEXAGRAM_PCAPNG_OPTION_CUSTOM2 = 0x0bad, - HEXAGRAM_PCAPNG_OPTION_CUSTOM3 = 0x4bac, - HEXAGRAM_PCAPNG_OPTION_CUSTOM4 = 0x4bad -} hexagram_pcapng_option_type; +#define HEXAGRAM_PCAPNG_OPTION_END 0x0 +#define HEXAGRAM_PCAPNG_OPTION_COMMENT 0x1 +#define HEXAGRAM_PCAPNG_OPTION_CUSTOM1 0x0bac +#define HEXAGRAM_PCAPNG_OPTION_CUSTOM2 0x0bad +#define HEXAGRAM_PCAPNG_OPTION_CUSTOM3 0x4bac +#define HEXAGRAM_PCAPNG_OPTION_CUSTOM4 0x4bad typedef struct _hexagram_pcapng_option { uint16_t code, @@ -35,7 +33,7 @@ typedef struct _hexagram_pcapng_option { /* * pcapng block types and structure */ -enum { +typedef enum { HEXAGRAM_PCAPNG_BLOCK_SECTION = 0x0a0d0d0a, HEXAGRAM_PCAPNG_BLOCK_INTERFACE = 0x1, HEXAGRAM_PCAPNG_BLOCK_PACKET = 0x6 @@ -53,7 +51,7 @@ typedef struct _hexagram_pcapng_block_footer { /* * pcapng section block structure and byte order magic */ -#define HEXAGRAM_PCAPNG_SECTION_BYTEORDER 0x1a2b3c4d +#define HEXAGRAM_PCAPNG_SECTION_MAGIC 0x1a2b3c4d typedef struct _hexagram_pcapng_section { uint32_t magic; @@ -62,7 +60,7 @@ typedef struct _hexagram_pcapng_section { } hexagram_pcapng_section; /* - * pcapng interface block structure + * pcapng interface description block structure */ typedef struct _hexagram_pcapng_interface { uint16_t linktype,