Setting The Baud Rate; Attaching To The Packet Filter And The Network Layer - Compaq Tru64 UNIX Installation Manual

Writing network device drivers
Table of Contents

Advertisement

Sets the if_version member of the ifnet data structure for this
8
device to the string 3Com EtherLink III.

6.7 Setting the Baud Rate

The following code shows how the el_attach( ) routine sets the baud rate:
ifp->if_baudrate = ETHER_BANDWIDTH_10MB;
Sets the if_baudrate member of the ifnet data structure for this
1
device to the constant ETHER_BANDWIDTH_10MB. The if_baudrate
member specifies the line speed.
You can use the following media-specific constants:
ETHER_BANDWIDTH_10MB
ETHER_BANDWIDTH_100MB
FDDI_BANDWIDTH_100MB
TRN_BANDWIDTH_4MB
TRN_BANDWIDTH_16MB

6.8 Attaching to the Packet Filter and the Network Layer

The following code shows how the el_attach( ) routine attaches to the
packet filter and the network layer:
attachpfilter(&(sc->is_ed));
if_attach(ifp);
el_configured ++;
Calls the attachpfilter( ) routine to inform the packet filter driver
1
about this network driver. The attachpfilter( ) routine is passed
a pointer to the ether_driver data structure for this network device
driver.
6–8 Implementing the Autoconfiguration Support Section (attach)
1
Ethernet line speed is 10 megabits per second.
The if_ether.h file defines the ETHER_BAND-
WIDTH_10MB constant.
Fast Ethernet line speed is 100 megabits per second.
The if_ether.h file defines the ETHER_BAND-
WIDTH_100MB constant.
FDDI line speed is 100 megabits per second. The if_fddi.h
file defines the FDDI_BANDWIDTH_100MB constant.
Token Ring line speed is 4 megabits per second. The if_trn.h
file defines the TRN_BANDWIDTH_4MB constant.
Token Ring line speed is 16 megabits per second. The
if_trn.h file defines the TRN_BANDWIDTH_16MB constant.
1
2
3

Advertisement

Table of Contents
loading

Table of Contents