diff options
author | andre <andre@FreeBSD.org> | 2005-11-02 13:46:32 +0000 |
---|---|---|
committer | andre <andre@FreeBSD.org> | 2005-11-02 13:46:32 +0000 |
commit | 0df84f5a83def3e1548e39bb43b0c177d50265fa (patch) | |
tree | 7cfb57b5672b497ffd3064153c31cb0a738e8f19 /sys/netinet | |
parent | 728b935c7f99f10947da6d54873e625c1a7a69c7 (diff) | |
download | FreeBSD-src-0df84f5a83def3e1548e39bb43b0c177d50265fa.zip FreeBSD-src-0df84f5a83def3e1548e39bb43b0c177d50265fa.tar.gz |
Retire MT_HEADER mbuf type and change its users to use MT_DATA.
Having an additional MT_HEADER mbuf type is superfluous and redundant
as nothing depends on it. It only adds a layer of confusion. The
distinction between header mbuf's and data mbuf's is solely done
through the m->m_flags M_PKTHDR flag.
Non-native code is not changed in this commit. For compatibility
MT_HEADER is mapped to MT_DATA.
Sponsored by: TCP/IP Optimization Fundraise 2005
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/igmp.c | 2 | ||||
-rw-r--r-- | sys/netinet/ip_fw2.c | 2 | ||||
-rw-r--r-- | sys/netinet/ip_icmp.c | 4 | ||||
-rw-r--r-- | sys/netinet/ip_mroute.c | 8 | ||||
-rw-r--r-- | sys/netinet/ip_output.c | 4 | ||||
-rw-r--r-- | sys/netinet/tcp_output.c | 4 | ||||
-rw-r--r-- | sys/netinet/tcp_subr.c | 4 | ||||
-rw-r--r-- | sys/netinet/tcp_syncache.c | 2 | ||||
-rw-r--r-- | sys/netinet/tcp_timewait.c | 4 |
9 files changed, 17 insertions, 17 deletions
diff --git a/sys/netinet/igmp.c b/sys/netinet/igmp.c index 8612a23..ea93c2e 100644 --- a/sys/netinet/igmp.c +++ b/sys/netinet/igmp.c @@ -462,7 +462,7 @@ igmp_sendpkt(struct in_multi *inm, int type, unsigned long addr) IN_MULTI_LOCK_ASSERT(); - MGETHDR(m, M_DONTWAIT, MT_HEADER); + MGETHDR(m, M_DONTWAIT, MT_DATA); if (m == NULL) return; diff --git a/sys/netinet/ip_fw2.c b/sys/netinet/ip_fw2.c index 4061596..4e37273 100644 --- a/sys/netinet/ip_fw2.c +++ b/sys/netinet/ip_fw2.c @@ -1559,7 +1559,7 @@ send_pkt(struct ipfw_flow_id *id, u_int32_t seq, u_int32_t ack, int flags) struct ip *ip; struct tcphdr *tcp; - MGETHDR(m, M_DONTWAIT, MT_HEADER); + MGETHDR(m, M_DONTWAIT, MT_DATA); if (m == 0) return (NULL); m->m_pkthdr.rcvif = (struct ifnet *)0; diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c index 00b2341..ec74c33 100644 --- a/sys/netinet/ip_icmp.c +++ b/sys/netinet/ip_icmp.c @@ -183,7 +183,7 @@ icmp_error(n, type, code, dest, mtu) /* * First, formulate icmp message */ - MGETHDR(m, M_DONTWAIT, MT_HEADER); + MGETHDR(m, M_DONTWAIT, MT_DATA); if (m == NULL) goto freeit; #ifdef MAC @@ -719,7 +719,7 @@ match: */ cp = (u_char *) (ip + 1); if ((opts = ip_srcroute(m)) == 0 && - (opts = m_gethdr(M_DONTWAIT, MT_HEADER))) { + (opts = m_gethdr(M_DONTWAIT, MT_DATA))) { opts->m_len = sizeof(struct in_addr); mtod(opts, struct in_addr *)->s_addr = 0; } diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c index 078d098..7fc0296 100644 --- a/sys/netinet/ip_mroute.c +++ b/sys/netinet/ip_mroute.c @@ -1900,7 +1900,7 @@ encap_send(struct ip *ip, struct vif *vifp, struct mbuf *m) * new mbuf so we can modify it. Try to fill the new * mbuf since if we don't the ethernet driver will. */ - MGETHDR(mb_copy, M_DONTWAIT, MT_HEADER); + MGETHDR(mb_copy, M_DONTWAIT, MT_DATA); if (mb_copy == NULL) return; #ifdef MAC @@ -2715,7 +2715,7 @@ bw_upcalls_send(void) * Allocate a new mbuf, initialize it with the header and * the payload for the pending calls. */ - MGETHDR(m, M_DONTWAIT, MT_HEADER); + MGETHDR(m, M_DONTWAIT, MT_DATA); if (m == NULL) { log(LOG_WARNING, "bw_upcalls_send: cannot allocate mbuf\n"); return; @@ -3055,7 +3055,7 @@ pim_register_send_upcall(struct ip *ip, struct vif *vifp, /* * Add a new mbuf with an upcall header */ - MGETHDR(mb_first, M_DONTWAIT, MT_HEADER); + MGETHDR(mb_first, M_DONTWAIT, MT_DATA); if (mb_first == NULL) { m_freem(mb_copy); return ENOBUFS; @@ -3115,7 +3115,7 @@ pim_register_send_rp(struct ip *ip, struct vif *vifp, /* * Add a new mbuf with the encapsulating header */ - MGETHDR(mb_first, M_DONTWAIT, MT_HEADER); + MGETHDR(mb_first, M_DONTWAIT, MT_DATA); if (mb_first == NULL) { m_freem(mb_copy); return ENOBUFS; diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index eac1955..0e210ac 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -941,7 +941,7 @@ smart_frag_failure: struct mbuf *m; int mhlen = sizeof (struct ip); - MGETHDR(m, M_DONTWAIT, MT_HEADER); + MGETHDR(m, M_DONTWAIT, MT_DATA); if (m == NULL) { error = ENOBUFS; ipstat.ips_odropped++; @@ -1067,7 +1067,7 @@ ip_insertoptions(m, opt, phlen) if (p->ipopt_dst.s_addr) ip->ip_dst = p->ipopt_dst; if (m->m_flags & M_EXT || m->m_data - optlen < m->m_pktdat) { - MGETHDR(n, M_DONTWAIT, MT_HEADER); + MGETHDR(n, M_DONTWAIT, MT_DATA); if (n == NULL) { *phlen = 0; return (m); diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 6bfaa41..e377bdf 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -747,7 +747,7 @@ send: m->m_len += hdrlen; m->m_data -= hdrlen; #else - MGETHDR(m, M_DONTWAIT, MT_HEADER); + MGETHDR(m, M_DONTWAIT, MT_DATA); if (m == NULL) { SOCKBUF_UNLOCK(&so->so_snd); error = ENOBUFS; @@ -800,7 +800,7 @@ send: else tcpstat.tcps_sndwinup++; - MGETHDR(m, M_DONTWAIT, MT_HEADER); + MGETHDR(m, M_DONTWAIT, MT_DATA); if (m == NULL) { error = ENOBUFS; goto out; diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 144070c..9267ea2 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -446,7 +446,7 @@ tcp_respond(tp, ipgen, th, m, ack, seq, flags) } } if (m == NULL) { - m = m_gethdr(M_DONTWAIT, MT_HEADER); + m = m_gethdr(M_DONTWAIT, MT_DATA); if (m == NULL) return; tlen = 0; @@ -1794,7 +1794,7 @@ tcp_twrespond(struct tcptw *tw, int flags) INP_LOCK_ASSERT(inp); - m = m_gethdr(M_DONTWAIT, MT_HEADER); + m = m_gethdr(M_DONTWAIT, MT_DATA); if (m == NULL) return (ENOBUFS); m->m_data += max_linkhdr; diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index a14a855..c92f922 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -1072,7 +1072,7 @@ syncache_respond(sc, m) if (m) m_freem(m); - m = m_gethdr(M_DONTWAIT, MT_HEADER); + m = m_gethdr(M_DONTWAIT, MT_DATA); if (m == NULL) return (ENOBUFS); m->m_data += max_linkhdr; diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c index 144070c..9267ea2 100644 --- a/sys/netinet/tcp_timewait.c +++ b/sys/netinet/tcp_timewait.c @@ -446,7 +446,7 @@ tcp_respond(tp, ipgen, th, m, ack, seq, flags) } } if (m == NULL) { - m = m_gethdr(M_DONTWAIT, MT_HEADER); + m = m_gethdr(M_DONTWAIT, MT_DATA); if (m == NULL) return; tlen = 0; @@ -1794,7 +1794,7 @@ tcp_twrespond(struct tcptw *tw, int flags) INP_LOCK_ASSERT(inp); - m = m_gethdr(M_DONTWAIT, MT_HEADER); + m = m_gethdr(M_DONTWAIT, MT_DATA); if (m == NULL) return (ENOBUFS); m->m_data += max_linkhdr; |