1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 #ifndef _LINUX_IP_H
18 #define _LINUX_IP_H
19
20
21 #define IPOPT_END 0
22 #define IPOPT_NOOP 1
23 #define IPOPT_SEC 130
24 #define IPOPT_LSRR 131
25 #define IPOPT_SSRR 137
26 #define IPOPT_RR 7
27 #define IPOPT_SID 136
28 #define IPOPT_TIMESTAMP 68
29
30
31 struct timestamp {
32 unsigned char len;
33 unsigned char ptr;
34 union {
35 unsigned char flags:4,
36 overflow:4;
37 unsigned char full_char;
38 } x;
39 unsigned long data[9];
40 };
41
42
43 #define MAX_ROUTE 16
44
45 struct route {
46 char route_size;
47 char pointer;
48 unsigned long route[MAX_ROUTE];
49 };
50
51
52 struct options {
53 struct route record_route;
54 struct route loose_route;
55 struct route strict_route;
56 struct timestamp tstamp;
57 unsigned short security;
58 unsigned short compartment;
59 unsigned short handling;
60 unsigned short stream;
61 unsigned tcc;
62 int option_length;
63 void *option_data;
64 };
65
66
67 struct iphdr {
68 unsigned char ihl:4,
69 version:4;
70 unsigned char tos;
71 unsigned short tot_len;
72 unsigned short id;
73 unsigned short frag_off;
74 unsigned char ttl;
75 unsigned char protocol;
76 unsigned short check;
77 unsigned long saddr;
78 unsigned long daddr;
79
80 };
81
82
83 #endif