date and time created 82/12/16 14:38:25 by sam
[unix-history] / usr / src / sys / netinet / ip_var.h
index d72dbd7..e33ba2d 100644 (file)
@@ -1,15 +1,15 @@
-/*     ip_var.h        4.1     81/11/14        */
+/*     ip_var.h        4.6     82/11/13        */
 
 /*
  * Overlay for ip header used by other protocols (tcp, udp).
  */
 struct ipovly {
 
 /*
  * Overlay for ip header used by other protocols (tcp, udp).
  */
 struct ipovly {
-       caddr_t ipo_next, ipo_prev;     /* for protocol sequence q's */
-       u_char  ipo_x1;                 /* (unused) */
-       u_char  ipo_pr;                 /* protocol */
-       short   ipo_len;                /* protocol length */
-       struct  ip_addr ipo_s;          /* source internet address */
-       struct  ip_addr ipo_d;          /* destination internet address */
+       caddr_t ih_next, ih_prev;       /* for protocol sequence q's */
+       u_char  ih_x1;                  /* (unused) */
+       u_char  ih_pr;                  /* protocol */
+       short   ih_len;                 /* protocol length */
+       struct  in_addr ih_src;         /* source internet address */
+       struct  in_addr ih_dst;         /* destination internet address */
 };
 
 /*
 };
 
 /*
@@ -25,11 +25,13 @@ struct ipq {
        u_short ipq_id;                 /* sequence id for reassembly */
        struct  ipasfrag *ipq_next,*ipq_prev;
                                        /* to ip headers of fragments */
        u_short ipq_id;                 /* sequence id for reassembly */
        struct  ipasfrag *ipq_next,*ipq_prev;
                                        /* to ip headers of fragments */
-       struct  ip_addr ipq_src,ipq_dst;
+       struct  in_addr ipq_src,ipq_dst;
 };
 
 /*
  * Ip header, when holding a fragment.
 };
 
 /*
  * Ip header, when holding a fragment.
+ *
+ * Note: ipf_next must be at same offset as ipq_next above
  */
 struct ipasfrag {
        u_char  ip_hl:4,
  */
 struct ipasfrag {
        u_char  ip_hl:4,
@@ -41,11 +43,17 @@ struct      ipasfrag {
        u_char  ip_ttl;
        u_char  ip_p;
        u_short ip_sum;
        u_char  ip_ttl;
        u_char  ip_p;
        u_short ip_sum;
-       struct  ipf *ipf_next;          /* next fragment */
-       struct  ipf *ipf_prev;          /* previous fragment */
+       struct  ipasfrag *ipf_next;     /* next fragment */
+       struct  ipasfrag *ipf_prev;     /* previous fragment */
+};
+
+struct ipstat {
+       int     ips_badsum;             /* checksum bad */
+       int     ips_tooshort;           /* packet too short */
 };
 
 #ifdef KERNEL
 };
 
 #ifdef KERNEL
+struct ipstat  ipstat;
 struct ipq     ipq;                    /* ip reass. queue */
 struct ipq     *ip_freef();
 u_short        ip_id;                          /* ip packet ctr, for ids */
 struct ipq     ipq;                    /* ip reass. queue */
 struct ipq     *ip_freef();
 u_short        ip_id;                          /* ip packet ctr, for ids */