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