
8
Sets the if_version member of the ifnet data structure for this 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:
1
1
Sets the if_baudrate member of the ifnet data structure for this device to the constant ETHER_BANDWIDTH_10MB. The if_baudrate member specifies the line speed.
You can use the following
ETHER_BANDWIDTH_10MB
Ethernet line speed is 10 megabits per second.
The if_ether.h file defines the ETHER_BAND-
WIDTH_10MB constant.
ETHER_BANDWIDTH_100MB
Fast Ethernet line speed is 100 megabits per second.
The if_ether.h file defines the ETHER_BAND-
WIDTH_100MB constant.
FDDI_BANDWIDTH_100MB
FDDI line speed is 100 megabits per second. The if_fddi.h file defines the FDDI_BANDWIDTH_100MB constant.
TRN_BANDWIDTH_4MB
Token Ring line speed is 4 megabits per second. The if_trn.h file defines the TRN_BANDWIDTH_4MB constant.
TRN_BANDWIDTH_16MB
Token Ring line speed is 16 megabits per second. The
if_trn.h file defines the TRN_BANDWIDTH_16MB constant.
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:
1
if_attach(ifp); 2
el_configured ++;
3
1
Calls the attachpfilter( ) routine to inform the packet filter driver about this network driver. The attachpfilter( ) routine is passed a pointer to the ether_driver data structure for this network device driver.