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

Function send_send

freebsd/netinet6/send.c:217–243  ·  view source on GitHub ↗

* 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. */

Source from the content-addressed store, hash-verified

215 * input path.
216 */
217static int
218send_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
239err:
240 if (m != NULL)
241 m_freem(m);
242 return (error);
243}
244
245static void
246send_close(struct socket *so)

Callers

nothing calls this directly

Calls 4

ifnet_byindex_refFunction · 0.85
send_outputFunction · 0.85
if_releFunction · 0.85
m_freemFunction · 0.50

Tested by

no test coverage detected