lint
[unix-history] / usr / src / sys / netinet / ip_icmp.c
index 705526b..2da7c96 100644 (file)
@@ -1,17 +1,19 @@
-/*     ip_icmp.c       4.18    82/09/12        */
+/*     ip_icmp.c       4.22    82/10/20        */
 
 #include "../h/param.h"
 #include "../h/systm.h"
 #include "../h/mbuf.h"
 #include "../h/protosw.h"
 #include "../h/socket.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
 #include "../h/mbuf.h"
 #include "../h/protosw.h"
 #include "../h/socket.h"
-#include "../net/in.h"
-#include "../net/in_systm.h"
-#include "../net/ip.h"
-#include "../net/ip_icmp.h"
 #include <time.h>
 #include "../h/kernel.h"
 
 #include <time.h>
 #include "../h/kernel.h"
 
+#include "../net/route.h"
+#include "../netinet/in.h"
+#include "../netinet/in_systm.h"
+#include "../netinet/ip.h"
+#include "../netinet/ip_icmp.h"
+
 /*
  * ICMP routines: error generation, receive packet processing, and
  * routines to turnaround packets back to the originator, and
 /*
  * ICMP routines: error generation, receive packet processing, and
  * routines to turnaround packets back to the originator, and
@@ -61,7 +63,7 @@ icmp_error(oip, type, code)
        bcopy((caddr_t)oip, (caddr_t)&icp->icmp_ip, oiplen + 8);
        nip = &icp->icmp_ip;
        nip->ip_len += oiplen;
        bcopy((caddr_t)oip, (caddr_t)&icp->icmp_ip, oiplen + 8);
        nip = &icp->icmp_ip;
        nip->ip_len += oiplen;
-#if vax || pdp11
+#if vax || pdp11 || ns16032
        nip->ip_len = htons((u_short)nip->ip_len);
 #endif
 
        nip->ip_len = htons((u_short)nip->ip_len);
 #endif
 
@@ -143,8 +145,8 @@ icmp_input(m)
                 * Problem with previous datagram; advise
                 * higher level routines.
                 */
                 * Problem with previous datagram; advise
                 * higher level routines.
                 */
-#if vax || pdp11
-               icp->icmp_ip.ip_len = ntohs(icp->icmp_ip.ip_len);
+#if vax || pdp11 || ns16032
+               icp->icmp_ip.ip_len = ntohs((u_short)icp->icmp_ip.ip_len);
 #endif
                if (icmplen < ICMP_ADVLENMIN || icmplen < ICMP_ADVLEN(icp))
                        goto free;
 #endif
                if (icmplen < ICMP_ADVLENMIN || icmplen < ICMP_ADVLEN(icp))
                        goto free;
@@ -227,7 +229,7 @@ icmp_send(ip)
        m->m_len += hlen;
        if (icmpprintfs)
                printf("icmp_send dst %x src %x\n", ip->ip_dst, ip->ip_src);
        m->m_len += hlen;
        if (icmpprintfs)
                printf("icmp_send dst %x src %x\n", ip->ip_dst, ip->ip_src);
-       (void) ip_output(m, 0, 0, 0);
+       (void) ip_output(m, (struct mbuf *)0, (struct route *)0, 0);
 }
 
 n_time
 }
 
 n_time