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

Function ipsec_init_pcbpolicy

freebsd/netipsec/ipsec_pcb.c:153–165  ·  view source on GitHub ↗

Initialize PCB policy. */

Source from the content-addressed store, hash-verified

151
152/* Initialize PCB policy. */
153int
154ipsec_init_pcbpolicy(struct inpcb *inp)
155{
156
157 IPSEC_ASSERT(inp != NULL, ("null inp"));
158 IPSEC_ASSERT(inp->inp_sp == NULL, ("inp_sp already initialized"));
159
160 inp->inp_sp = malloc(sizeof(struct inpcbpolicy), M_IPSEC_INPCB,
161 M_NOWAIT | M_ZERO);
162 if (inp->inp_sp == NULL)
163 return (ENOBUFS);
164 return (0);
165}
166
167/* Delete PCB policy. */
168int

Callers 1

in_pcballocFunction · 0.85

Calls 1

mallocFunction · 0.85

Tested by

no test coverage detected