Skip to content

Commit

Permalink
pacp: Update to new struct packing syntax
Browse files Browse the repository at this point in the history
Signed-off-by: Siddharth Chandrasekaran <[email protected]>
  • Loading branch information
sidcha committed Feb 20, 2024
1 parent d447993 commit 5cfbd79
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pcap_gen.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@
#define PCAP_VERSION_MINOR 4
#define PCAP_CACHE_SIZE (1 << 12)

struct pcap_header {
PACK(struct pcap_header {
uint32_t magic_number;
uint16_t version_major;
uint16_t version_minor;
uint32_t this_zone;
int32_t sigfigs;
uint32_t snap_len;
uint32_t link_type;
} __packed;
});

struct pcap_record_header {
PACK(struct pcap_record_header {
uint32_t ts_sec;
uint32_t ts_usec;
uint32_t incl_len;
uint32_t orig_len;
} __packed;
});

pcap_t *pcap_start(char *path, uint32_t max_packet_size, uint32_t link_type)
{
Expand Down

0 comments on commit 5cfbd79

Please sign in to comment.