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

Function ip6_pseudo_compute

freebsd/netipsec/xform_tcp.c:152–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150
151#ifdef INET6
152static int
153ip6_pseudo_compute(struct mbuf *m, MD5_CTX *ctx)
154{
155 struct ip6_pseudo {
156 struct in6_addr src, dst;
157 uint32_t len;
158 uint32_t nxt;
159 } ip6p __aligned(4);
160 struct ip6_hdr *ip6;
161
162 ip6 = mtod(m, struct ip6_hdr *);
163 ip6p.src = ip6->ip6_src;
164 ip6p.dst = ip6->ip6_dst;
165 ip6p.len = htonl(m->m_pkthdr.len - sizeof(*ip6)); /* XXX: ext headers */
166 ip6p.nxt = htonl(IPPROTO_TCP);
167 MD5Update(ctx, (char *)&ip6p, sizeof(ip6p));
168 return (sizeof(*ip6));
169}
170#endif
171
172static int

Callers 1

tcp_signature_computeFunction · 0.85

Calls 1

MD5UpdateFunction · 0.85

Tested by

no test coverage detected