MCPcopy Create free account
hub / github.com/F-Stack/f-stack / in6_delayed_cksum

Function in6_delayed_cksum

freebsd/netinet6/ip6_output.c:199–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197 } while (/*CONSTCOND*/ 0)
198
199void
200in6_delayed_cksum(struct mbuf *m, uint32_t plen, u_short offset)
201{
202 u_short csum;
203
204 csum = in_cksum_skip(m, offset + plen, offset);
205 if (m->m_pkthdr.csum_flags & CSUM_UDP_IPV6 && csum == 0)
206 csum = 0xffff;
207 offset += m->m_pkthdr.csum_data; /* checksum offset */
208
209 if (offset + sizeof(csum) > m->m_len)
210 m_copyback(m, offset, sizeof(csum), (caddr_t)&csum);
211 else
212 *(u_short *)mtodo(m, offset) = csum;
213}
214
215static int
216ip6_output_delayed_csum(struct mbuf *m, struct ifnet *ifp, int csum_flags,

Callers 4

pf_route6Function · 0.85
nat64_do_handle_ip6Function · 0.85
ip6_output.cFile · 0.85
ipsec6_common_outputFunction · 0.85

Calls 2

m_copybackFunction · 0.85
in_cksum_skipFunction · 0.50

Tested by

no test coverage detected