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         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         /*The options start here. */
  98 };
  99 
 100 
 101 #endif  /* _LINUX_IP_H */

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