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 u8 len;
33 u8 ptr;
34 union {
35 #if defined(__i386__)
36 u8 flags:4,
37 overflow:4;
38 #elif defined(__mc68000__)
39 u8 overflow:4,
40 flags:4;
41 #elif defined(__alpha__)
42 u8 flags:4,
43 overflow:4;
44 #else
45 #error "Adjust this structure to match your CPU"
46 #endif
47 u8 full_char;
48 } x;
49 u32 data[9];
50 };
51
52
53 #define MAX_ROUTE 16
54
55 struct route {
56 char route_size;
57 char pointer;
58 unsigned long route[MAX_ROUTE];
59 };
60
61
62 struct options {
63 struct route record_route;
64 struct route loose_route;
65 struct route strict_route;
66 struct timestamp tstamp;
67 unsigned short security;
68 unsigned short compartment;
69 unsigned short handling;
70 unsigned short stream;
71 unsigned tcc;
72 };
73
74
75 struct iphdr {
76 #if defined(__i386__)
77 u8 ihl:4,
78 version:4;
79 #elif defined (__mc68000__)
80 u8 version:4,
81 ihl:4;
82 #elif defined (__alpha__)
83 u8 ihl:4,
84 version:4;
85 #else
86 #error "Adjust this structure to match your CPU"
87 #endif
88 u8 tos;
89 u16 tot_len;
90 u16 id;
91 u16 frag_off;
92 u8 ttl;
93 u8 protocol;
94 u16 check;
95 u32 saddr;
96 u32 daddr;
97
98 };
99
100
101 #endif