Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Driver Overview

Before diving into the specifics of what you need to be do to write a network driver, it may be helpful to see the basic functions which you need to override. These descriptions are meant to give you an idea of what is entailed in creating a very simple network driver.

start

The start function should initialize the device to a working state. It also needs to create a network object and make it visible to the networking stack as an interface.

stop

The stop function must free anything allocated in start and also release the network object created in start.

enable

As mentioned in “Tips on Bringing Up a UNIX Network Driver,” the enable function is run when the system sets the driver’s status to up. This function is also responsible for starting the hardware’s transmit and receive capabilities. It should inform the system about the link status of the hardware.

disable

The disable function releases anything allocated, and stops any functions started in enable.

getHardwareAddress

The getHardwareAddress function returns the MAC address of the network device.

outputPacket

The outputPacket function sends the packet to the hardware for transmission. It will be called from multiple threads, so it needs to be thread-safe.

Each of these functions are described in more depth further in this chapter.



< Previous PageNext Page > Hide TOC


Last updated: 2008-03-11




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice