localize header files
[unix-history] / usr / src / sys / netinet / ip_input.c
index fc3efea..cf9864f 100644 (file)
@@ -1,18 +1,19 @@
-/*     ip_input.c      1.46    82/07/24        */
+/*     ip_input.c      1.51    82/10/09        */
 
 #include "../h/param.h"
 #include "../h/systm.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
-#include "../h/clock.h"
 #include "../h/mbuf.h"
 #include "../h/protosw.h"
 #include "../h/socket.h"
 #include "../h/mbuf.h"
 #include "../h/protosw.h"
 #include "../h/socket.h"
-#include "../net/in.h"
-#include "../net/in_systm.h"
+#include "../netinet/in.h"
+#include "../netinet/in_systm.h"
 #include "../net/if.h"
 #include "../net/if.h"
-#include "../net/ip.h"                 /* belongs before in.h */
-#include "../net/ip_var.h"
-#include "../net/ip_icmp.h"
-#include "../net/tcp.h"
+#include "../netinet/ip.h"                     /* belongs before in.h */
+#include "../netinet/ip_var.h"
+#include "../netinet/ip_icmp.h"
+#include "../netinet/tcp.h"
+#include <time.h>
+#include "../h/kernel.h"
 #include <errno.h>
 
 u_char ip_protox[IPPROTO_MAX];
 #include <errno.h>
 
 u_char ip_protox[IPPROTO_MAX];
@@ -38,7 +39,7 @@ ip_init()
                    pr->pr_protocol && pr->pr_protocol != IPPROTO_RAW)
                        ip_protox[pr->pr_protocol] = pr - protosw;
        ipq.next = ipq.prev = &ipq;
                    pr->pr_protocol && pr->pr_protocol != IPPROTO_RAW)
                        ip_protox[pr->pr_protocol] = pr - protosw;
        ipq.next = ipq.prev = &ipq;
-       ip_id = time & 0xffff;
+       ip_id = time.tv_sec & 0xffff;
        ipintrq.ifq_maxlen = ipqmaxlen;
        ifinet = if_ifwithaf(AF_INET);
 }
        ipintrq.ifq_maxlen = ipqmaxlen;
        ifinet = if_ifwithaf(AF_INET);
 }
@@ -232,7 +233,6 @@ ip_reass(ip, fp)
        if (fp == 0) {
                if ((t = m_get(M_WAIT)) == NULL)
                        goto dropfrag;
        if (fp == 0) {
                if ((t = m_get(M_WAIT)) == NULL)
                        goto dropfrag;
-               t->m_off = MMINOFF;
                fp = mtod(t, struct ipq *);
                insque(fp, &ipq);
                fp->ipq_ttl = IPFRAGTTL;
                fp = mtod(t, struct ipq *);
                insque(fp, &ipq);
                fp->ipq_ttl = IPFRAGTTL;
@@ -618,7 +618,7 @@ ip_forward(ip)
         * Save at most 64 bytes of the packet in case
         * we need to generate an ICMP message to the src.
         */
         * Save at most 64 bytes of the packet in case
         * we need to generate an ICMP message to the src.
         */
-       mcopy = m_copy(dtom(ip), 0, min(ip->ip_len, 64));
+       mcopy = m_copy(dtom(ip), 0, imin(ip->ip_len, 64));
        ip_stripoptions(ip, mopt);
 
        /* last 0 here means no directed broadcast */
        ip_stripoptions(ip, mopt);
 
        /* last 0 here means no directed broadcast */