Skip to content

Instantly share code, notes, and snippets.

@run
Created September 21, 2015 03:05
Show Gist options
  • Select an option

  • Save run/85ce5605e70e01f04292 to your computer and use it in GitHub Desktop.

Select an option

Save run/85ce5605e70e01f04292 to your computer and use it in GitHub Desktop.

Revisions

  1. Runzhen created this gist Sep 21, 2015.
    9 changes: 9 additions & 0 deletions pcap.c
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    typedef struct pcap_hdr_s {
    guint32 magic_number; /* magic number */
    guint16 version_major; /* major version number */
    guint16 version_minor; /* minor version number */
    gint32 thiszone; /* GMT to local correction */
    guint32 sigfigs; /* accuracy of timestamps */
    guint32 snaplen; /* max length of captured packets, in octets */
    guint32 network; /* data link type */
    } pcap_hdr_t;