ethernet_device's add_multi/rem_multi now call into the driver using the ETHER_ADDMULTI/ETHER_REMMULTI ioctls.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20948 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
954038303d
commit
89361fb14e
@ -380,18 +380,36 @@ ethernet_set_media(net_device *device, uint32 media)
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
ethernet_add_multi(struct net_device *device, const sockaddr *address)
|
ethernet_add_multi(struct net_device *_device, const sockaddr *_address)
|
||||||
{
|
{
|
||||||
// TODO: see etherpci driver for details
|
ethernet_device *device = (ethernet_device *)_device;
|
||||||
return EOPNOTSUPP;
|
|
||||||
|
if (_address->sa_family != AF_DLI)
|
||||||
|
return EINVAL;
|
||||||
|
|
||||||
|
const sockaddr_dl *address = (const sockaddr_dl *)_address;
|
||||||
|
if (address->sdl_type != IFT_ETHER)
|
||||||
|
return EINVAL;
|
||||||
|
|
||||||
|
return ioctl(device->fd, ETHER_ADDMULTI, address->sdl_data,
|
||||||
|
address->sdl_alen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
ethernet_rem_multi(struct net_device *device, const sockaddr *address)
|
ethernet_rem_multi(struct net_device *_device, const sockaddr *_address)
|
||||||
{
|
{
|
||||||
// TODO: see etherpci driver for details
|
ethernet_device *device = (ethernet_device *)_device;
|
||||||
return EOPNOTSUPP;
|
|
||||||
|
if (_address->sa_family != AF_DLI)
|
||||||
|
return EINVAL;
|
||||||
|
|
||||||
|
const sockaddr_dl *address = (const sockaddr_dl *)_address;
|
||||||
|
if (address->sdl_type != IFT_ETHER)
|
||||||
|
return EINVAL;
|
||||||
|
|
||||||
|
return ioctl(device->fd, ETHER_REMMULTI, address->sdl_data,
|
||||||
|
address->sdl_alen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user