Implementing The Ioctl Section; Network Ioctl Commands - Compaq Tru64 UNIX Installation Manual

Writing network device drivers
Table of Contents

Advertisement

Implementing the ioctl Section

The ioctl section of a network device driver contains the code that implements
a network device driver's ioctl interface. The ioctl interface performs
miscellaneous tasks that have nothing to do with data packet transmission
and reception. Typically, it turns specific features of the hardware on or off.
The el_ioctl( ) routine performs the following tasks:
Determines whether the user has removed the PCMCIA card from the
slot (Section 12.2)
Sets the IPL and obtains the simple lock (Section 12.3)
Recognizes the ioctl command and performs the appropriate
operations. Table 12–1 lists the ioctl commands that network device
drivers must recognize.
Releases the simple lock and resets the IPL (Section 12.17)
Table 12–1: Network ioctl Commands
ioctl Command
Required
SIOCENABLBACK
No
SIOCDISABLBACK
No
SIOCRPHYSADDR
Yes
SIOCSPHYSADDR
Yes
SIOCADDMULTI
Yes
SIOCDELMULTI
Yes
SIOCRDCTRS
Yes
SIOCRDZCTRS
Yes
SIOCSIFADDR
Yes
Description
For More Information
Enables loopback
Section 12.4
mode.
Disables loopback
Section 12.5
mode.
Returns the current
Section 12.6
and default MAC
addresses.
Sets the local MAC
Section 12.7
address.
Adds the device to a
Section 12.8
multicast group.
Removes the device
Section 12.9
from a multicast
group.
Reads counters.
Section 12.10
Reads and zeros
Section 12.10
counters.
Brings up the device. Section 12.11
Implementing the ioctl Section 12–1
12

Advertisement

Table of Contents
loading

Table of Contents