| 151 | /* pru_accept is EOPNOTSUPP */ |
| 152 | |
| 153 | static int |
| 154 | raw_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 | |
| 172 | static int |
| 173 | raw_ubind(struct socket *so, struct sockaddr *nam, struct thread *td) |
nothing calls this directly
no test coverage detected