* Send a message to the routing daemon on the multicast routing socket. */
| 1190 | * Send a message to the routing daemon on the multicast routing socket. |
| 1191 | */ |
| 1192 | static int |
| 1193 | socket_send(struct socket *s, struct mbuf *mm, struct sockaddr_in *src) |
| 1194 | { |
| 1195 | if (s) { |
| 1196 | SOCKBUF_LOCK(&s->so_rcv); |
| 1197 | if (sbappendaddr_locked(&s->so_rcv, (struct sockaddr *)src, mm, |
| 1198 | NULL) != 0) { |
| 1199 | sorwakeup_locked(s); |
| 1200 | return 0; |
| 1201 | } |
| 1202 | SOCKBUF_UNLOCK(&s->so_rcv); |
| 1203 | } |
| 1204 | m_freem(mm); |
| 1205 | return -1; |
| 1206 | } |
| 1207 | |
| 1208 | /* |
| 1209 | * IP multicast forwarding function. This function assumes that the packet |
no test coverage detected