ip.h

Go to the documentation of this file.
00001 /**
00002 *
00003 
00004  * INET         An implementation of the TCP/IP protocol suite for the LINUX
00005  *              operating system.  INET is implemented using the  BSD Socket
00006  *              interface as the means of communication with the user level.
00007  *
00008  *              Definitions for the IP protocol.
00009  *
00010  * Version:     @(#)ip.h        1.0.2   04/28/93
00011  *
00012  * Authors:     Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
00013  *
00014  *              This program is free software; you can redistribute it and/or
00015  *              modify it under the terms of the GNU General Public License
00016  *              as published by the Free Software Foundation; either version
00017  *              2 of the License, or (at your option) any later version.
00018 
00019 
00020 */
00021 #ifndef _LINUX_IP_H
00022 #define _LINUX_IP_H
00023 
00024 
00025 #define IPOPT_END       0
00026 #define IPOPT_NOOP      1
00027 #define IPOPT_SEC       130
00028 #define IPOPT_LSRR      131
00029 #define IPOPT_SSRR      137
00030 #define IPOPT_RR        7
00031 #define IPOPT_SID       136
00032 #define IPOPT_TIMESTAMP 68
00033 
00034 
00035 struct timestamp {
00036   unsigned char len;
00037   unsigned char ptr;
00038   union {
00039         unsigned char   flags:4,
00040                         overflow:4;
00041         unsigned char   full_char;
00042   } x;
00043   unsigned long data[9];
00044 };
00045 
00046 
00047 #define MAX_ROUTE       16
00048 
00049 struct route {
00050   char          route_size;
00051   char          pointer;
00052   unsigned long route[MAX_ROUTE];
00053 };
00054 
00055 
00056 struct options {
00057   struct route          record_route;
00058   struct route          loose_route;
00059   struct route          strict_route;
00060   struct timestamp      tstamp;
00061   unsigned short        security;
00062   unsigned short        compartment;
00063   unsigned short        handling;
00064   unsigned short        stream;
00065   unsigned              tcc;
00066 };
00067 
00068 
00069 struct iphdr {
00070   unsigned char         ihl:4,
00071                         version:4;
00072   unsigned char         tos;
00073   unsigned short        tot_len;
00074   unsigned short        id;
00075   unsigned short        frag_off;
00076   unsigned char         ttl;
00077   unsigned char         protocol;
00078   unsigned short        check;
00079   unsigned long         saddr;
00080   unsigned long         daddr;
00081   ///The options start here. 
00082 };
00083 
00084 
00085 #endif  // _LINUX_IP_H 

Generated on Mon May 1 21:47:00 2006 for KernelAPI by  doxygen 1.4.6-5