Download INTRO (9) NetBSD Kernel Developer`s Manual INTRO (9

Transcript
ETHERSUBR (9)
NetBSD Kernel Developer’s Manual
ETHERSUBR (9)
ether_addmulti()
ether_delmulti()
Add ( ether_addmulti() ) or delete ( ether_delmulti() ) the address described by the
sa pointer to the Ethernet multicast list belonging to ec.
These functions must be called from the driver’s ioctl function to handle SIOCADDMULTI and
SIOCDELMULTI requests. If they 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.
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.
ether_delmulti() returns, in addition to the above errors, ENXIO if the specified address
can’t be found in the list of multicast addresses.
fddi_addmulti()
fddi_delmulti()
corresponding functions for FDDI devices.
ETHER_NEXT_MULTI()
is a macro to step through all of the ether_multi records, one at a time. The current position is
remembered in step, which the caller must provide.
ETHER_FIRST_MULTI()
must be called to initialize step and get the first record. Both macros return a NULL enm when
there are no remaining records.
ETHER_IS_MULTICAST()
returns 1, if addr points to an Ethernet/FDDI multicast (or broadcast) address. Implemented as
a macro.
SEE ALSO
arp(9)
AUTHORS
UCB CSRG (original implementation)
Ignatios Souvatzis (support for new ARP system)
CODE REFERENCES
Ethernet support functions are declared in 〈net/if_ether.h〉 and defined (if not implemented as macro)
in /usr/src/sys/net/if_ethersubr.c.
FDDI support functions are declared in 〈net/if_fddi.h〉 and defined (if not implemented as macro) in
/usr/src/sys/net/if_fddisubr.c.
HISTORY
Rewritten to attach to the new ARP system in NetBSD 1.3.
NetBSD 3.0
March 3, 1997
2