version 1.53, 2011/08/31 18:31:03 |
version 1.54, 2011/10/19 01:53:07 |
Line 616 in6_addmulti(struct in6_addr *maddr6, st |
|
Line 616 in6_addmulti(struct in6_addr *maddr6, st |
|
int *errorp, int timer) |
int *errorp, int timer) |
{ |
{ |
struct in6_ifaddr *ia; |
struct in6_ifaddr *ia; |
struct in6_ifreq ifr; |
struct sockaddr_in6 sin6; |
struct in6_multi *in6m; |
struct in6_multi *in6m; |
int s = splsoftnet(); |
int s = splsoftnet(); |
|
|
Line 663 in6_addmulti(struct in6_addr *maddr6, st |
|
Line 663 in6_addmulti(struct in6_addr *maddr6, st |
|
* Ask the network driver to update its multicast reception |
* Ask the network driver to update its multicast reception |
* filter appropriately for the new address. |
* filter appropriately for the new address. |
*/ |
*/ |
sockaddr_in6_init(&ifr.ifr_addr, maddr6, 0, 0, 0); |
sockaddr_in6_init(&sin6, maddr6, 0, 0, 0); |
*errorp = (*ifp->if_ioctl)(ifp, SIOCADDMULTI, &ifr); |
*errorp = if_mcast_op(ifp, SIOCADDMULTI, sin6tosa(&sin6)); |
if (*errorp) { |
if (*errorp) { |
LIST_REMOVE(in6m, in6m_entry); |
LIST_REMOVE(in6m, in6m_entry); |
free(in6m, M_IPMADDR); |
free(in6m, M_IPMADDR); |
Line 700 in6_addmulti(struct in6_addr *maddr6, st |
|
Line 700 in6_addmulti(struct in6_addr *maddr6, st |
|
void |
void |
in6_delmulti(struct in6_multi *in6m) |
in6_delmulti(struct in6_multi *in6m) |
{ |
{ |
struct in6_ifreq ifr; |
struct sockaddr_in6 sin6; |
struct in6_ifaddr *ia; |
struct in6_ifaddr *ia; |
int s = splsoftnet(); |
int s = splsoftnet(); |
|
|
Line 738 in6_delmulti(struct in6_multi *in6m) |
|
Line 738 in6_delmulti(struct in6_multi *in6m) |
|
* Notify the network driver to update its multicast |
* Notify the network driver to update its multicast |
* reception filter. |
* reception filter. |
*/ |
*/ |
sockaddr_in6_init(&ifr.ifr_addr, &in6m->in6m_addr, 0, 0, 0); |
sockaddr_in6_init(&sin6, &in6m->in6m_addr, 0, 0, 0); |
(*in6m->in6m_ifp->if_ioctl)(in6m->in6m_ifp, SIOCDELMULTI, &ifr); |
if_mcast_op(in6m->in6m_ifp, SIOCDELMULTI, sin6tosa(&sin6)); |
callout_destroy(&in6m->in6m_timer_ch); |
callout_destroy(&in6m->in6m_timer_ch); |
free(in6m, M_IPMADDR); |
free(in6m, M_IPMADDR); |
} |
} |