root/include/linux/ip.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   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 #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 };
  63 
  64 
  65 struct iphdr {
  66   unsigned char         ihl:4,
  67                         version:4;
  68   unsigned char         tos;
  69   unsigned short        tot_len;
  70   unsigned short        id;
  71   unsigned short        frag_off;
  72   unsigned char         ttl;
  73   unsigned char         protocol;
  74   unsigned short        check;
  75   unsigned long         saddr;
  76   unsigned long         daddr;
  77   /*The options start here. */
  78 };
  79 
  80 
  81 #endif  /* _LINUX_IP_H */

/* [previous][next][first][last][top][bottom][index][help] */