FreeBSD/sys/netinet/ip_mroute.c
/*
 * Send a message to the routing daemon on the multicast routing socket.
 */
Send a message to the routing daemon on the multicast routing socket.
Send a message to the routing daemon on the multicast routing socket .
static int
socket_send(struct socket *s, struct mbuf *mm, struct sockaddr_in *src)
{
    if (s) {
	SOCKBUF_LOCK(&s->so_rcv);
	if (sbappendaddr_locked(&s->so_rcv, (struct sockaddr *)src, mm,
	    NULL) != 0) {
	    sorwakeup_locked(s);
	    return 0;
	}
	SOCKBUF_UNLOCK(&s->so_rcv);
    }
    m_freem(mm);
    return -1;
}
static int socket_send ( struct socket * s , struct mbuf * mm , struct sockaddr_in * src ) { if ( s ) { SOCKBUF_LOCK ( & s -> so_rcv ) ; if ( sbappendaddr_locked ( & s -> so_rcv , ( struct sockaddr * ) src , mm , NULL ) != 0 ) { sorwakeup_locked ( s ) ; return 0 ; } SOCKBUF_UNLOCK ( & s -> so_rcv ) ; } m_freem ( mm ) ; return -1 ; }
Send a message to the routing daemon on the multicast routing socket.
Send a message to the routing daemon on the multicast routing socket .