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

Function in6_gif_input

freebsd/netinet6/in6_gif.c:330–355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

328}
329
330static int
331in6_gif_input(struct mbuf *m, int off, int proto, void *arg)
332{
333 struct gif_softc *sc = arg;
334 struct ifnet *gifp;
335 struct ip6_hdr *ip6;
336 uint8_t ecn;
337
338 NET_EPOCH_ASSERT();
339 if (sc == NULL) {
340 m_freem(m);
341 IP6STAT_INC(ip6s_nogif);
342 return (IPPROTO_DONE);
343 }
344 gifp = GIF2IFP(sc);
345 if ((gifp->if_flags & IFF_UP) != 0) {
346 ip6 = mtod(m, struct ip6_hdr *);
347 ecn = (ntohl(ip6->ip6_flow) >> 20) & 0xff;
348 m_adj(m, off);
349 gif_input(m, gifp, proto, ecn);
350 } else {
351 m_freem(m);
352 IP6STAT_INC(ip6s_nogif);
353 }
354 return (IPPROTO_DONE);
355}
356
357static int
358in6_gif_lookup(const struct mbuf *m, int off, int proto, void **arg)

Callers

nothing calls this directly

Calls 3

m_adjFunction · 0.85
gif_inputFunction · 0.85
m_freemFunction · 0.50

Tested by

no test coverage detected