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

Function raw_uattach

freebsd/net/raw_usrreq.c:153–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151/* pru_accept is EOPNOTSUPP */
152
153static int
154raw_uattach(struct socket *so, int proto, struct thread *td)
155{
156 int error;
157
158 /*
159 * Implementors of raw sockets will already have allocated the PCB,
160 * so it must be non-NULL here.
161 */
162 KASSERT(sotorawcb(so) != NULL, ("raw_uattach: so_pcb == NULL"));
163
164 if (td != NULL) {
165 error = priv_check(td, PRIV_NET_RAW);
166 if (error)
167 return (error);
168 }
169 return (raw_attach(so, proto));
170}
171
172static int
173raw_ubind(struct socket *so, struct sockaddr *nam, struct thread *td)

Callers

nothing calls this directly

Calls 2

raw_attachFunction · 0.85
priv_checkFunction · 0.50

Tested by

no test coverage detected