diff options
Diffstat (limited to 'sys/netinet/ip_output.c')
-rw-r--r-- | sys/netinet/ip_output.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index fc811fa..16dba61 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -182,7 +182,7 @@ ip_output(struct mbuf *m, struct mbuf *opt, struct route *ro, int flags, ip->ip_v = IPVERSION; ip->ip_hl = hlen >> 2; ip->ip_id = ip_newid(); - V_ipstat.ips_localout++; + IPSTAT_INC(ips_localout); } else { hlen = ip->ip_hl << 2; } @@ -221,7 +221,7 @@ again: if (flags & IP_SENDONES) { if ((ia = ifatoia(ifa_ifwithbroadaddr(sintosa(dst)))) == NULL && (ia = ifatoia(ifa_ifwithdstaddr(sintosa(dst)))) == NULL) { - V_ipstat.ips_noroute++; + IPSTAT_INC(ips_noroute); error = ENETUNREACH; goto bad; } @@ -233,7 +233,7 @@ again: } else if (flags & IP_ROUTETOIF) { if ((ia = ifatoia(ifa_ifwithdstaddr(sintosa(dst)))) == NULL && (ia = ifatoia(ifa_ifwithnet(sintosa(dst)))) == NULL) { - V_ipstat.ips_noroute++; + IPSTAT_INC(ips_noroute); error = ENETUNREACH; goto bad; } @@ -265,7 +265,7 @@ again: inp ? inp->inp_inc.inc_fibnum : M_GETFIB(m)); #endif if (ro->ro_rt == NULL) { - V_ipstat.ips_noroute++; + IPSTAT_INC(ips_noroute); error = EHOSTUNREACH; goto bad; } @@ -322,7 +322,7 @@ again: */ if ((imo == NULL) || (imo->imo_multicast_vif == -1)) { if ((ifp->if_flags & IFF_MULTICAST) == 0) { - V_ipstat.ips_noroute++; + IPSTAT_INC(ips_noroute); error = ENETUNREACH; goto bad; } @@ -420,7 +420,7 @@ again: #endif /* ALTQ */ { error = ENOBUFS; - V_ipstat.ips_odropped++; + IPSTAT_INC(ips_odropped); ifp->if_snd.ifq_drops += (ip->ip_len / ifp->if_mtu + 1); goto bad; } @@ -538,7 +538,7 @@ passout: if ((ntohl(ip->ip_dst.s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET || (ntohl(ip->ip_src.s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET) { if ((ifp->if_flags & IFF_LOOPBACK) == 0) { - V_ipstat.ips_badaddr++; + IPSTAT_INC(ips_badaddr); error = EADDRNOTAVAIL; goto bad; } @@ -602,7 +602,7 @@ passout: /* Balk when DF bit is set or the interface didn't support TSO. */ if ((ip->ip_off & IP_DF) || (m->m_pkthdr.csum_flags & CSUM_TSO)) { error = EMSGSIZE; - V_ipstat.ips_cantfrag++; + IPSTAT_INC(ips_cantfrag); goto bad; } @@ -635,7 +635,7 @@ passout: } if (error == 0) - V_ipstat.ips_fragmented++; + IPSTAT_INC(ips_fragmented); done: if (ro == &iproute && ro->ro_rt) { @@ -671,7 +671,7 @@ ip_fragment(struct ip *ip, struct mbuf **m_frag, int mtu, int nfrags; if (ip->ip_off & IP_DF) { /* Fragmentation not allowed */ - V_ipstat.ips_cantfrag++; + IPSTAT_INC(ips_cantfrag); return EMSGSIZE; } @@ -752,7 +752,7 @@ smart_frag_failure: MGETHDR(m, M_DONTWAIT, MT_DATA); if (m == NULL) { error = ENOBUFS; - V_ipstat.ips_odropped++; + IPSTAT_INC(ips_odropped); goto done; } m->m_flags |= (m0->m_flags & M_MCAST) | M_FRAG; @@ -782,7 +782,7 @@ smart_frag_failure: if (m->m_next == NULL) { /* copy failed */ m_free(m); error = ENOBUFS; /* ??? */ - V_ipstat.ips_odropped++; + IPSTAT_INC(ips_odropped); goto done; } m->m_pkthdr.len = mhlen + len; @@ -798,7 +798,7 @@ smart_frag_failure: *mnext = m; mnext = &m->m_nextpkt; } - V_ipstat.ips_ofragments += nfrags; + IPSTAT_ADD(ips_ofragments, nfrags); /* set first marker for fragment chain */ m0->m_flags |= M_FIRSTFRAG | M_FRAG; |