X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/a13c006d7f74a16ea1790b6d1103f2e209c4a217..6e7edb25cc39d3c7a292ffbce29991ab528249e3:/usr/src/sys/netinet/ip_output.c diff --git a/usr/src/sys/netinet/ip_output.c b/usr/src/sys/netinet/ip_output.c index 887de1dbfb..ee21021f4e 100644 --- a/usr/src/sys/netinet/ip_output.c +++ b/usr/src/sys/netinet/ip_output.c @@ -1,15 +1,15 @@ -/* ip_output.c 1.33 82/06/12 */ +/* ip_output.c 1.40 82/10/20 */ #include "../h/param.h" #include "../h/mbuf.h" -#include "../h/mtpr.h" +#include "../vax/mtpr.h" #include "../h/socket.h" #include "../h/socketvar.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/ip.h" -#include "../net/ip_var.h" +#include "../netinet/ip.h" +#include "../netinet/ip_var.h" #include "../net/route.h" #include @@ -27,7 +27,6 @@ ip_output(m, opt, ro, allowbroadcast) struct route iproute; struct sockaddr *dst; -COUNT(IP_OUTPUT); if (opt) /* XXX */ (void) m_free(opt); /* XXX */ /* @@ -54,7 +53,7 @@ COUNT(IP_OUTPUT); */ if (ro == &routetoif) { /* check ifp is AF_INET??? */ - ifp = if_ifonnetof(ip->ip_dst.s_net); + ifp = if_ifonnetof(in_netof(ip->ip_dst)); if (ifp == 0) goto unreachable; goto gotif; @@ -93,7 +92,7 @@ gotif: * If small enough for interface, can just send directly. */ if (ip->ip_len <= ifp->if_mtu) { -#if vax +#if vax || pdp11 || ns16032 ip->ip_len = htons((u_short)ip->ip_len); ip->ip_off = htons((u_short)ip->ip_off); #endif @@ -148,7 +147,7 @@ gotif: mhip->ip_off |= IP_MF; } mhip->ip_len += sizeof (struct ip); -#if vax +#if vax || pdp11 || ns16032 mhip->ip_len = htons((u_short)mhip->ip_len); #endif mh->m_next = m_copy(m, off, len); @@ -157,7 +156,7 @@ gotif: error = ENOBUFS; /* ??? */ goto bad; } -#if vax +#if vax || pdp11 || ns16032 mhip->ip_off = htons((u_short)mhip->ip_off); #endif mhip->ip_sum = 0; @@ -193,7 +192,6 @@ ip_optcopy(ip, jp, off) register u_char *cp, *dp; int opt, optlen, cnt; -COUNT(IP_OPTCOPY); cp = (u_char *)(ip + 1); dp = (u_char *)(jp + 1); cnt = (ip->ip_hl << 2) - sizeof (struct ip);