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

Function udp_notify

freebsd/netinet/udp_usrreq.c:761–776  ·  view source on GitHub ↗

* Notify a udp user of an asynchronous error; just wake up so that they can * collect error status. */

Source from the content-addressed store, hash-verified

759 * collect error status.
760 */
761struct inpcb *
762udp_notify(struct inpcb *inp, int errno)
763{
764
765 INP_WLOCK_ASSERT(inp);
766 if ((errno == EHOSTUNREACH || errno == ENETUNREACH ||
767 errno == EHOSTDOWN) && inp->inp_route.ro_nh) {
768 NH_FREE(inp->inp_route.ro_nh);
769 inp->inp_route.ro_nh = (struct nhop_object *)NULL;
770 }
771
772 inp->inp_socket->so_error = errno;
773 sorwakeup(inp->inp_socket);
774 sowwakeup(inp->inp_socket);
775 return (inp);
776}
777
778#ifdef INET
779static void

Callers 1

udp_common_ctlinputFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected