*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->NetBSD man pages -> ethersubr (9)              
Title
Content
Arch
Section
 

ETHERSUBR(9)

Contents


NAME    [Toc]    [Back]

     ethersubr, ether_ifattach, ether_addmulti, ether_delmulti,
     ETHER_FIRST_MULTI, ETHER_NEXT_MULTI, ETHER_IS_MULTICAST, fddi_ifattach,
     fddi_addmulti, fddi_delmulti - Ethernet and FDDI driver support functions
     and macros

SYNOPSIS    [Toc]    [Back]

     #include <net/if_ether.h>

     void
     ether_ifattach(struct ifnet *ifp, u_int8_t *lla);

     int
     ether_addmulti(struct ifrequest *ifr, struct ethercom *ec);

     int
     ether_delmulti(struct ifrequest *ifr, 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(u_int8_t *addr);

     #include <net/if_fddi.h>

     void
     fddi_ifattach(struct ifnet *ifp, u_int8_t *lla);

     int
     fddi_addmulti(struct ifrequest *ifr, struct ethercom *ec);

     int
     fddi_delmulti(struct ifrequest *ifr, struct ethercom *ec);

DESCRIPTION    [Toc]    [Back]

     The ethersubr functions provide the interface between the ethersubr module
 and the network drivers which need Ethernet support.  Such drivers
     must request the ether attribute in their files declaration and call the
     appropriate functions as specified below.

     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.


     ether_ifattach()
              Perform the device-independent, but Ethernet-specific initialization
 of the interface pointed to by ifp.

              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.

              You must call this function from the driver's attach function.

     fddi_ifattach()
              corresponding function for FDDI devices.

     ether_addmulti()

     ether_delmulti()
              Add (ether_addmulti()) or delete (ether_delmulti()) the address
              described by the ifr 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    [Toc]    [Back]

      
      
     arp(9)

AUTHORS    [Toc]    [Back]

     UCB CSRG (original implementation)
     Ignatios Souvatzis (support for new ARP system)

CODE REFERENCES    [Toc]    [Back]

     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    [Toc]    [Back]

     Rewritten to attach to the new ARP system in NetBSD 1.3.

BSD                              March 3, 1997                             BSD
[ Back ]
 Similar pages
Name OS Title
if_ef FreeBSD pseudo-device driver providing support for multiple ethernet frame types
ef FreeBSD pseudo-device driver providing support for multiple ethernet frame types
fea OpenBSD DEC FDDI controller device driver
fpa OpenBSD DEC FDDI controller device driver
fddipciadmin HP-UX show PCI FDDI interface status, and/or change FDDI attributes
ae OpenBSD Ethernet driver for DP8390-based NuBus Ethernet boards
sn OpenBSD Ethernet driver for SONIC-based Ethernet adapters
mc OpenBSD Ethernet driver for Am79C940 (MACE) on-board Ethernet
rdp FreeBSD Ethernet driver for RealTek RTL 8002 pocket ethernet
el FreeBSD Ethernet driver for 3Com Etherlink 3C501 device driver
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service