ETHERSUBR(9) | Kernel Developer's Manual | ETHERSUBR(9) |
void
ether_ifattach(struct ifnet *ifp, uint8_t *lla);
int
ether_addmulti(const struct sockaddr *sa, struct ethercom *ec);
int
ether_delmulti(const struct sockaddr *sa, struct ethercom *ec);
void
ETHER_FIRST_MULTI(struct ether_multistep step, struct ethercom *ec, struct ether_multi *enm);
void
ETHER_NEXT_MULTI(struct ether_multistep step, struct ether_multi *enm);
int
ETHER_IS_MULTICAST(uint8_t *addr);
#include <net/if_fddi.h>
void
fddi_ifattach(struct ifnet *ifp, uint8_t *lla);
int
fddi_addmulti(const struct sockaddr *sa, struct ethercom *ec);
int
fddi_delmulti(const struct sockaddr *sa, struct ethercom *ec);
FDDI drivers must request the "fddi" attribute in their "files" declaration and call the functions tagged with "fddi_" or "FDDI_" instead, where different. Some macros are shared.
Note that you also need the arp(9) stuff to support IPv4 on your hardware.
Among other duties, this function creates a record for the link level address in the interface's address list and records the link level address pointed to by lla there.
This function must be called from the driver's attach function.
These functions must be called from the driver's ioctl function to handle SIOCADDMULTI and SIOCDELMULTI requests. If these return ENETRESET, the hardware multicast filter must be reinitialized.
These functions accept AF_UNSPEC addresses, which are interpreted as Ethernet addresses, or AF_INET addresses. In the latter case, INADDR_ANY is mapped to a range describing all the Ethernet address space reserved for IPv4 multicast addresses.
The ether_addmulti() returns EAFNOSUPPORT if an unsupported address family is specified, EINVAL if a non-multicast address is specified, or ENETRESET if the multicast list really changed and the driver should synchronize its hardware filter with it.
The ether_delmulti() returns, in addition to the above errors, ENXIO if the specified address can't be found in the list of multicast addresses.
Ignatios Souvatzis (support for new ARP system)
FDDI support functions are declared in <net/if_fddi.h> and defined (if not implemented as macro) in sys/net/if_fddisubr.c.
March 3, 1997 | NetBSD 6.1 |