* Receive a SeND message from user space to be either send out by the kernel * or, with SeND ICMPv6 options removed, to be further processed by the icmp6 * input path. */
| 215 | * input path. |
| 216 | */ |
| 217 | static int |
| 218 | send_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *nam, |
| 219 | struct mbuf *control, struct thread *td) |
| 220 | { |
| 221 | struct sockaddr_send *sendsrc; |
| 222 | struct ifnet *ifp; |
| 223 | int error; |
| 224 | |
| 225 | KASSERT(V_send_so == so, ("%s: socket %p not send socket %p", |
| 226 | __func__, so, V_send_so)); |
| 227 | |
| 228 | sendsrc = (struct sockaddr_send *)nam; |
| 229 | ifp = ifnet_byindex_ref(sendsrc->send_ifidx); |
| 230 | if (ifp == NULL) { |
| 231 | error = ENETUNREACH; |
| 232 | goto err; |
| 233 | } |
| 234 | |
| 235 | error = send_output(m, ifp, sendsrc->send_direction); |
| 236 | if_rele(ifp); |
| 237 | m = NULL; |
| 238 | |
| 239 | err: |
| 240 | if (m != NULL) |
| 241 | m_freem(m); |
| 242 | return (error); |
| 243 | } |
| 244 | |
| 245 | static void |
| 246 | send_close(struct socket *so) |
nothing calls this directly
no test coverage detected