1 /* 2 * INET An implementation of the TCP/IP protocol suite for the LINUX 3 * operating system. INET is implemented using the BSD Socket 4 * interface as the means of communication with the user level. 5 * 6 * Definitions for the IP protocol. 7 * 8 * Version: @(#)ip.h 1.0.2 04/28/93 9 * 10 * Authors: Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> 11 * 12 * This program is free software; you can redistribute it and/or 13 * modify it under the terms of the GNU General Public License 14 * as published by the Free Software Foundation; either version 15 * 2 of the License, or (at your option) any later version. 16 */ 17 #ifndef_LINUX_IP_H 18 #define_LINUX_IP_H 19
20
21 #defineIPOPT_END 0
22 #defineIPOPT_NOOP 1
23 #defineIPOPT_SEC 130
24 #defineIPOPT_LSRR 131
25 #defineIPOPT_SSRR 137
26 #defineIPOPT_RR 7
27 #defineIPOPT_SID 136
28 #defineIPOPT_TIMESTAMP 68
29
30
31 structtimestamp{ 32 unsignedcharlen;
33 unsignedcharptr;
34 union{ 35 unsignedcharflags:4,
36 overflow:4;
37 unsignedcharfull_char;
38 }x;
39 unsignedlongdata[9];
40 };
41
42
43 #defineMAX_ROUTE 16
44
45 structroute{ 46 charroute_size;
47 charpointer;
48 unsignedlongroute[MAX_ROUTE];
49 };
50
51
52 structoptions{ 53 structrouterecord_route;
54 structrouteloose_route;
55 structroutestrict_route;
56 structtimestamptstamp;
57 unsignedshortsecurity;
58 unsignedshortcompartment;
59 unsignedshorthandling;
60 unsignedshortstream;
61 unsignedtcc;
62 };
63
64
65 structiphdr{ 66 unsignedcharihl:4,
67 version:4;
68 unsignedchartos;
69 unsignedshorttot_len;
70 unsignedshortid;
71 unsignedshortfrag_off;
72 unsignedcharttl;
73 unsignedcharprotocol;
74 unsignedshortcheck;
75 unsignedlongsaddr;
76 unsignedlongdaddr;
77 /*The options start here. */ 78 };
79
80
81 #endif/* _LINUX_IP_H */