forked from theclam/capshift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcapshift.h
33 lines (28 loc) · 1.11 KB
/
capshift.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#define ADD 1
#define SUBTRACT 2
typedef unsigned int guint32;
typedef unsigned short guint16;
typedef signed int gint32;
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;
typedef struct pcaprec_hdr_s {
guint32 ts_sec; /* timestamp seconds */
guint32 ts_usec; /* timestamp microseconds */
guint32 incl_len; /* number of octets of packet saved in file */
guint32 orig_len; /* actual length of packet */
} pcaprec_hdr_t;
typedef struct params_s {
char *infile;
char *outfile;
guint32 secs;
guint32 usecs;
guint32 sign;
guint32 mode; /* indicate if its a relative or absolate displacement and how to use offset */
} params_t;