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

Function ipsec_getpolicy

freebsd/net/if_ipsec.c:319–338  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

317 vnet_ipsec_uninit, NULL);
318
319static struct secpolicy *
320ipsec_getpolicy(struct ipsec_softc *sc, int dir, sa_family_t af)
321{
322
323 switch (af) {
324#ifdef INET
325 case AF_INET:
326 return (sc->sp[(dir == IPSEC_DIR_INBOUND ? 0: 1)]);
327#endif
328#ifdef INET6
329 case AF_INET6:
330 return (sc->sp[(dir == IPSEC_DIR_INBOUND ? 0: 1)
331#ifdef INET
332 + 2
333#endif
334 ]);
335#endif
336 }
337 return (NULL);
338}
339
340static struct secasindex *
341ipsec_getsaidx(struct ipsec_softc *sc, int dir, sa_family_t af)

Callers 2

ipsec_getsaidxFunction · 0.85
ipsec_transmitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected