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

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