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

Function in_gif_input

freebsd/netinet/in_gif.c:309–334  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

307}
308
309static int
310in_gif_input(struct mbuf *m, int off, int proto, void *arg)
311{
312 struct gif_softc *sc = arg;
313 struct ifnet *gifp;
314 struct ip *ip;
315 uint8_t ecn;
316
317 NET_EPOCH_ASSERT();
318 if (sc == NULL) {
319 m_freem(m);
320 KMOD_IPSTAT_INC(ips_nogif);
321 return (IPPROTO_DONE);
322 }
323 gifp = GIF2IFP(sc);
324 if ((gifp->if_flags & IFF_UP) != 0) {
325 ip = mtod(m, struct ip *);
326 ecn = ip->ip_tos;
327 m_adj(m, off);
328 gif_input(m, gifp, proto, ecn);
329 } else {
330 m_freem(m);
331 KMOD_IPSTAT_INC(ips_nogif);
332 }
333 return (IPPROTO_DONE);
334}
335
336static int
337in_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