Compaq AA-RNG2A-TE Network Card User Manual


 
ether_sprintf(maddr),
sc->is_multi.lan_mtable[j-1].muse);
}
}
lan_build_mclist (mclist_buf, NET_SZ_MCLIST, &sc->is_multi);
5
lan_set_attribute(sc->ehm.current_val, NET_MCLIST_NDX, mclist_buf);
break;
1 Determines whether the cmd argument is SIOCADDMULTI.
2 If the address is broadcast, indicates the presence of another broadcast
user. If the address is multicast, the el_ioctl( ) routine adds the
address to the table. The EtherLink III family does not support any
multicast filtering. Either you receive all multicast addresses or you
do not receive any. The EtherLink III family does special-case the
broadcast address.
3 If the add succeeds and there are no other multicasts enabled,
increments a counter that indicates that the device needs to be reset.
4 If the device is running and multicasts and broadcasts have not already
been enabled, enables them.
5 Builds a text string that lists all currently active multicast addresses,
and sets this list as an enhanced hardware management (EHM)
attribute for this network device.
12.9 Deleting the Device from a Multicast Group
(SIOCDELMULTI ioctl Command)
The following code shows how the el_ioctl( ) routine implements the
SIOCDELMULTI ioctl command to delete a multicast address:
case SIOCDELMULTI:
1
need_reset = 0;
if (bcmp(ifr->ifr_addr.sa_data, etherbroadcastaddr, 6) == 0) {
2
sc->is_broadcast--;
} else {
i = lan_del_multi(&sc->is_multi,
(unsigned char *)ifr->ifr_addr.sa_data);
switch (i) {
case LAN_MULTI_CHANGED:
if (sc->is_multi.lan_nmulti == 0)
need_reset++;
break;
case LAN_MULTI_NOT_CHANGED:
break;
case LAN_MULTI_FAILED:
default:
status = EINVAL;
break;
}
}
if ((ifp->if_flags & IFF_RUNNING) && (need_reset))
el_reset_locked(sc, ifp, unit);
Implementing the ioctl Section 127