BSD 4_3 release
[unix-history] / usr / src / sys / netinet / ip.h
index 2860905..17d93e4 100644 (file)
@@ -1,4 +1,10 @@
-/*     ip.h    6.1     83/07/29        */
+/*
+ * Copyright (c) 1982, 1986 Regents of the University of California.
+ * All rights reserved.  The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ *
+ *     @(#)ip.h        7.1 (Berkeley) 6/5/86
+ */
 
 /*
  * Definitions for internet protocol version 4.
 
 /*
  * Definitions for internet protocol version 4.
@@ -34,13 +40,13 @@ struct ip {
  * Definitions for options.
  */
 #define        IPOPT_COPIED(o)         ((o)&0x80)
  * Definitions for options.
  */
 #define        IPOPT_COPIED(o)         ((o)&0x80)
-#define        IPOPT_CLASS(o)          ((o)&0x40)
-#define        IPOPT_NUMBER(o)         ((o)&0x3f)
+#define        IPOPT_CLASS(o)          ((o)&0x60)
+#define        IPOPT_NUMBER(o)         ((o)&0x1f)
 
 #define        IPOPT_CONTROL           0x00
 
 #define        IPOPT_CONTROL           0x00
-#define        IPOPT_RESERVED1         0x10
-#define        IPOPT_DEBMEAS           0x20
-#define        IPOPT_RESERVED2         0x30
+#define        IPOPT_RESERVED1         0x20
+#define        IPOPT_DEBMEAS           0x40
+#define        IPOPT_RESERVED2         0x60
 
 #define        IPOPT_EOL               0               /* end of option list */
 #define        IPOPT_NOP               1               /* no operation */
 
 #define        IPOPT_EOL               0               /* end of option list */
 #define        IPOPT_NOP               1               /* no operation */
@@ -52,6 +58,14 @@ struct ip {
 #define        IPOPT_SATID             136             /* satnet id */
 #define        IPOPT_SSRR              137             /* strict source route */
 
 #define        IPOPT_SATID             136             /* satnet id */
 #define        IPOPT_SSRR              137             /* strict source route */
 
+/*
+ * Offsets to fields in options other than EOL and NOP.
+ */
+#define        IPOPT_OPTVAL            0               /* option ID */
+#define        IPOPT_OLEN              1               /* option length */
+#define IPOPT_OFFSET           2               /* offset within option */
+#define        IPOPT_MINOFF            4               /* min value of above */
+
 /*
  * Time stamp option structure.
  */
 /*
  * Time stamp option structure.
  */
@@ -89,4 +103,6 @@ struct       ip_timestamp {
  */
 #define        MAXTTL          255             /* maximum time to live (seconds) */
 #define        IPFRAGTTL       15              /* time to live for frag chains */
  */
 #define        MAXTTL          255             /* maximum time to live (seconds) */
 #define        IPFRAGTTL       15              /* time to live for frag chains */
-#define        IPTTLDEC        5               /* subtracted when forwarding */
+#define        IPTTLDEC        1               /* subtracted when forwarding */
+
+#define        IP_MSS          576             /* default maximum segment size */