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:

ifp->if_baudrate = ETHER_BANDWIDTH_10MB;

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 media-specific constants:

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:

attachpfilter(&(sc->is_ed));

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.

6–8Implementing the Autoconfiguration Support Section (attach)

Page 92
Image 92
Compaq AA-RNG2A-TE manual Setting the Baud Rate, Attaching to the Packet Filter and the Network Layer