| 193 | ***************************************************************/ |
| 194 | |
| 195 | static int |
| 196 | ngc_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 | |
| 209 | static void |
| 210 | ngc_detach(struct socket *so) |
nothing calls this directly
no test coverage detected