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

Function ngc_attach

freebsd/netgraph/ng_socket.c:195–207  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

193***************************************************************/
194
195static int
196ngc_attach(struct socket *so, int proto, struct thread *td)
197{
198 struct ngpcb *const pcbp = sotongpcb(so);
199 int error;
200
201 error = priv_check(td, PRIV_NETGRAPH_CONTROL);
202 if (error)
203 return (error);
204 if (pcbp != NULL)
205 return (EISCONN);
206 return (ng_attach_cntl(so));
207}
208
209static void
210ngc_detach(struct socket *so)

Callers

nothing calls this directly

Calls 2

ng_attach_cntlFunction · 0.85
priv_checkFunction · 0.50

Tested by

no test coverage detected