ADC Home > Reference Library > Reference > Hardware & Drivers > I/O Kit Framework Reference

 


IONetworkInterface.h

Include:

Path <IOKit/network/IONetworkInterface.h>

See Also:
Includes:

Overview

This interface object acts as a go-between for network controllers and the data link interface layer. It provides the structures that the data link interface layer needs. It also maintains statistic stuctures. These stuctures may be altered by the network controller and are visible outside of the kernel.



Classes

IONetworkInterface

Abstract class that manages the connection between an IONetworkController and the data link interface layer.



Typedefs


BPF_FUNC


typedef int ( *BPF_FUNC)(
    struct ifnet *,
    struct mbuf *);  
Discussion

Prototype for the BPF tap handler. This will disappear when the correct DLIL header file is included.


IOOutputAction


typedef UInt32 (OSObject:: *IOOutputAction)(
    mbuf_t,
    void *param);  
Fields
m

A packet mbuf.

Fields
param

A parameter for the output request.

Discussion

Prototype for an output packet handler that will process all outbound packets sent to the interface from the data link layer. An output handler is registered with the interface by calling registerOutputHandler().

Enumerations


InterfaceObjectStates


enum { 
    kIONetworkInterfaceRegisteredState = 0x1, 
    kIONetworkInterfaceOpenedState = 0x2, 
    kIONetworkInterfaceDisabledState = 0x4 
};  
Constants
kIONetworkInterfaceRegisteredState

The interface object has registered with the data link layer.

kIONetworkInterfaceOpenedState

One or more clients have an open on the interface object.

kIONetworkInterfaceDisabledState

The interface is temporarily unable to service its clients. This will occur when the network controller that is servicing the interface has entered a low power state that renders it unusable.

Discussion

Constants used to encode the state of the interface object.

#defines


kIOBuiltin


kIOBuiltin is a property of IONetworkInterface objects. It has an OSBoolean value.

#define kIOBuiltin "IOBuiltin" 
Discussion

The kIOBuiltin property describes whether the interface is built-in.


kIOInterfaceExtraFlags


A property of IONetworkInterface objects.

#define kIOInterfaceExtraFlags "IOInterfaceExtraFlags" 
Discussion

The kIOInterfaceExtraFlags property has an OSNumber value that specifies the current value of the interface extra flags. The extra flag constants are defined in bsd/net/if.h.


kIOInterfaceFlags


A property of IONetworkInterface objects.

#define kIOInterfaceFlags "IOInterfaceFlags" 
Discussion

The kIOInterfaceFlags property has an OSNumber value that specifies the current value of the interface flags. The flag constants are defined in bsd/net/if.h.


kIOInterfaceNamePrefix


A property of IONetworkInterface objects.

#define kIOInterfaceNamePrefix "IOInterfaceNamePrefix" 
Discussion

The kIOInterfaceNamePrefix property has an OSString value that describes the string prefix for the BSD name assigned to the interface.


kIOInterfaceState


A property of IONetworkInterface objects.

#define kIOInterfaceState "IOInterfaceState" 
Discussion

The kIOInterfaceState property has an OSNumber value that describes the current state of the interface object. This property is not exported to BSD via the ifnet structure.


kIOInterfaceType


A property of IONetworkInterface objects.

#define kIOInterfaceType "IOInterfaceType" 
Discussion

The kIOInterfaceType property has an OSNumber value that specifies the type of network interface that this interface represents. The type constants are defined in bsd/net/if_types.h.


kIOInterfaceUnit


A property of IONetworkInterface objects.

#define kIOInterfaceUnit "IOInterfaceUnit" 
Discussion

The kIOInterfaceUnit property has an OSNumber value that describes the unit number assigned to the interface object.


kIOLocation


kIOLocation is a property of IONetworkInterface objects. It has an OSString value.

#define kIOLocation "IOLocation" 
Discussion

The kIOLocation property describes the physical location of built-in interfaces.


kIOMaxTransferUnit


A property of IONetworkInterface objects.

#define kIOMaxTransferUnit "IOMaxTransferUnit" 
Discussion

The kIOMaxTransferUnit property has an OSNumber value that specifies the maximum transfer unit for the interface in bytes.


kIOMediaAddressLength


A property of IONetworkInterface objects.

#define kIOMediaAddressLength "IOMediaAddressLength" 
Discussion

The kIOMediaAddressLength property has an OSNumber value that specifies the size of the media address in bytes.


kIOMediaHeaderLength


A property of IONetworkInterface objects.

#define kIOMediaHeaderLength "IOMediaHeaderLength" 
Discussion

The kIOMediaHeaderLength property has an OSNumber value that specifies the size of the media header in bytes.


kIONetworkData


A property of IONetworkInterface objects.

#define kIONetworkData "IONetworkData" 
Discussion

The kIONetworkData property has an OSDictionary value and is a container for the set of IONetworkData objects managed by the interface. Each entry in the dictionary is a key/value pair consisting of the network data name, and an OSDictionary describing the contents of the network data.


kIONetworkInterfaceClass


The name of the IONetworkInterface class.

#define kIONetworkInterfaceClass "IONetworkInterface" 


kIOPrimaryInterface


A property of IONetworkInterface objects.

#define kIOPrimaryInterface "IOPrimaryInterface" 
Discussion

The kIOInterfaceNamePrefix property has an OSBoolean value that describes whether the interface is the primary or the built-in network interface.


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.

 

Last Updated: 2009-02-23