Declarations Section For A Network Driver - Compaq Tru64 UNIX Installation Manual

Writing network device drivers
Table of Contents

Advertisement

#include <netinet/ip.h>
#include <netinet/ip_var.h>
#include <netinet/if_ether.h>
#include <net/ether_driver.h>
#include <io/common/devdriver.h>
#include <hal/cpuconf.h>
#include <kern/thread.h>
#include <kern/sched_prim.h>
#include <kern/lock.h>
#include <io/dec/eisa/eisa.h>
#include <io/dec/pcmcia/pcmcia.h>
#include <io/dec/pcmcia/cardinfo.h>
#include <io/dec/netif/lan_common.h>
#include <io/dec/netif/if_elreg.h>
Includes the ioctl.h include file, which defines common ioctl com-
1
mands. The ioctl.h file is located in /usr/include/sys/ioctl.h.
Includes the sysconfig.h header file, which defines the constants that
2
all device drivers use during configuration. The sysconfig.h file is
located in /usr/include/sys/sysconfig.h.
Includes the if_ether.h header file, which defines the ether_header
3
data structure. All network drivers typically include this file.
If you are writing the network driver for FDDI media, you also include
the header file if_fddi.h. If you are writing the network driver for
Token Ring media, you also include the header file if_trn.h.
Includes the devdriver.h header file, which defines common device
4
driver data structures and constants. The devdriver.h file is located
in /usr/include/io/common/devdriver.h.
Includes the header file eisa.h, which is associated with the ISA bus.
5
If you are writing the driver to operate on multiple bus architectures,
you must include the bus-specific header file. The if_el device driver
is implemented to operate on two buses: the ISA and the PCMCIA.
Includes the header files pcmcia.h and cardinfo.h, which are
6
associated with the PCMCIA bus.
Includes the lan_common.h file, which contains definitions that all
7
local area network (LAN) device drivers need.
Includes the device register header file. The directory specification you
8
make here depends on where you put the device register header file.

1.2 Declarations Section for a Network Driver

The declarations section for a network device driver contains the following
categories of information:
1–4 Network Device Driver Environment
3
4
5
6
7
8

Advertisement

Table of Contents
loading

Table of Contents