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

Function tcp_lro_get_th

freebsd/netinet/tcp_lro.c:206–234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204}
205
206static struct tcphdr *
207tcp_lro_get_th(struct lro_entry *le, struct mbuf *m)
208{
209 struct ether_header *eh;
210 struct tcphdr *th = NULL;
211#ifdef INET6
212 struct ip6_hdr *ip6 = NULL; /* Keep compiler happy. */
213#endif
214#ifdef INET
215 struct ip *ip4 = NULL; /* Keep compiler happy. */
216#endif
217
218 eh = mtod(m, struct ether_header *);
219 switch (le->eh_type) {
220#ifdef INET6
221 case ETHERTYPE_IPV6:
222 ip6 = (struct ip6_hdr *)(eh + 1);
223 th = (struct tcphdr *)(ip6 + 1);
224 break;
225#endif
226#ifdef INET
227 case ETHERTYPE_IP:
228 ip4 = (struct ip *)(eh + 1);
229 th = (struct tcphdr *)(ip4 + 1);
230 break;
231#endif
232 }
233 return (th);
234}
235
236void
237tcp_lro_free(struct lro_ctrl *lc)

Callers 1

tcp_lro_condenseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected