MAC Driver Interface (MDI) Network Driver Code Samples

The ndsample package includes the following sample MDI network drivers for UnixWare 7:

3Com 3C503 EtherLink II ISA series (DDI version 7 for Ethernet adapters)

3Com 3C507 EtherLink 16 ISA series (DDI version 8 for Ethernet adapters)

IBM Token-Ring Network Adapter Series (DDI version 7 for Token Ring adapters)

Matrox NS100/1 and Osicom 2300 (DDI version 8 for PCI Ethernet adapters)

A sample multithreaded DDI version 8 MDI driver (shrk) was added to the Sample MDI Network Drivers package in version 7.0.0a. There have been some improvements and bug fixes made to the shrk driver in this release.

For current information about the entire UnixWare/OpenServer Hardware Developers Kit (HDK) release, see the HDK Release Notes.

Note: Documentation references on this page link to the Product Documentation. They are also available on your local system when the baseMAN, HDKdoc, and HDKman packages are installed.

System requirements

The ndsample package has no installation dependencies. The samples can be installed on either UnixWare 7 or OpenServer 5.0.5 although they can only be built and installed on UnixWare 7 systems. The O5ndsampl package contains sample MDI network drivers for OpenServer systems.

The following UnixWare 7 packages must be installed on your system before building and packaging the sample drivers:

Advanced Commands

UDK Optimizing C Compilation System (included with the UDK)

Software Packaging Tools (included with the UDK)

The UnixWare/OpenServer Development Kit (UDK), with the uccs and usoftint packages selected, must be installed on your system before you can create installable packages. See the UDK documentation for more information.


To install the package from:

downloaded files

  1. Log in as root.
  2. Download the package to an installation directory; for example, /tmp.
  3. Use the pkgadd(1M) command to install it by entering:
    pkgadd  -d  /tmp/ndsample

media distribution

  1. Log in as root.
  2. Insert the CD-ROM in the drive
  3. Use the pkgadd(1M) command to install it by entering:
    pkgadd  -d  cdrom1  ndsample

This will place the MDI sample driver files in the /usr/src/hdk/net/mdi directory.


No specific configuration is required.

For more information

More information concerning MDI drivers may be found in Developing MDI network adapter drivers.

See also Network Driver Certification Test Suite for information about testing and debugging your driver.

A README file may be included with the sample drivers in /usr/src/hdk/net/README to provide more information:

This README file contains some of the information
about the ndsample package.

It is loosly organized as follows:
- Building the sample MDI drivers 
- Packaging your drivers

This file is not intended to replace the online documentation or online

Building the sample MDI drivers:

To build the sample MDI drivers that are found under /usr/src/hdk/net/mdi,
you must add "UTSRULES=/usr/src/hdk/net/mdi/uts.rulefile" to your
environment, or run something like the following:

	make -f UTSRULES=/usr/src/hdk/net/mdi/uts.rulefile

Packaging your drivers:

We have provided a simple framework to assist with packaging your
drivers.  To make use of this, you may place your driver source
under a directory called "/usr/src/hdk/net/mdi/driver_prefix",
where driver_prefix is replaced with your driver prefix.  Your makefile
must be called "/usr/src/hdk/net/mdi/driver_prefix/",
and the result of building the all target is a idinstallable DSP under the
"/usr/src/hdk/net/mdi/driver_prefix/" directory.
If you wish to build your driver(s) somewhere besides /usr/src/hdk/net/mdi,
you may use the makefile and change the NETDIR macro.

The file will automatically generate a pkgaddable image for you when the
"pkg" target is built:
	# cd /usr/src/hdk/net/mdi
	# UTSRULES=`pwd`/uts.rulefile make -f pkg
	# pkgtrans -s /usr/src/hdk/net/pkg /tmp/newnics.pkg