12.07.2015 Views

INTRO (9) NetBSD Kernel Developer's Manual INTRO (9) NAME ...

INTRO (9) NetBSD Kernel Developer's Manual INTRO (9) NAME ...

INTRO (9) NetBSD Kernel Developer's Manual INTRO (9) NAME ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ETHERSUBR (9) <strong>NetBSD</strong> <strong>Kernel</strong> Developer’s <strong>Manual</strong> ETHERSUBR (9)<strong>NAME</strong>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 macrosSYNOPSIS#include voidether_ifattach(struct ifnet ∗ifp , uint8_t ∗lla);intether_addmulti(const struct sockaddr ∗sa , struct ethercom ∗ec);intether_delmulti(const struct sockaddr ∗sa , struct ethercom ∗ec);voidETHER_FIRST_MULTI(struct ether_multistep step , struct ethercom ∗ec ,struct ether_multi ∗enm);voidETHER_NEXT_MULTI(struct ether_multistep step , struct ether_multi ∗enm);intETHER_IS_MULTICAST(uint8_t ∗addr);#include voidfddi_ifattach(struct ifnet ∗ifp , uint8_t ∗lla);intfddi_addmulti(const struct sockaddr ∗sa , struct ethercom ∗ec);intfddi_delmulti(const struct sockaddr ∗sa , struct ethercom ∗ec);DESCRIPTIONThe ethersubr functions provide the interface between the ethersubr module and the network driverswhich need Ethernet support. Such drivers must request the ether attribute in their files declaration andcall 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 tosupport IPv4 on your hardware.ether_ifattach()Perform the device-independent, but Ethernet-specific initialization of the interface pointed to byifp.Among other duties, this function creates a record for the link level address in the interface’saddress list and records the link level address pointed to by lla there.Youmust call this function from the driver’s attach function.fddi_ifattach()corresponding function for FDDI devices.<strong>NetBSD</strong> 3.0 March 3, 1997 1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!