IONetworkInterface.h Reference

Declared in
IONetworkInterface.h

Overview

Included Headers

  • <IOKit/IOService.h>

  • <IOKit/network/IONetworkData.h>

  • <IOKit/network/IONetworkStats.h>

  • <IOKit/network/IONetworkMedium.h>

  • <net/kpi_interface.h>

Callbacks

See the Overview section above for header-level documentation.

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.

Availability
  • Available in OS X v10.6 and later.
Declared In
IONetworkInterface.h

IOOutputAction

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

Parameters
mbuf_t

A packet mbuf.

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().

Availability
  • Available in OS X v10.6 and later.
Declared In
IONetworkInterface.h

Constants

See the Overview section above for header-level documentation.

Miscellaneous Defines

   
#define kIOBuiltin "IOBuiltin"
#define kIOInterfaceExtraFlags "IOInterfaceExtraFlags"
#define kIOInterfaceFlags "IOInterfaceFlags"
#define kIOInterfaceNamePrefix "IOInterfaceNamePrefix"
#define kIOInterfaceState "IOInterfaceState"
#define kIOInterfaceType "IOInterfaceType"
#define kIOInterfaceUnit "IOInterfaceUnit"
#define kIOLocation "IOLocation"
#define kIOMaxTransferUnit "IOMaxTransferUnit"
#define kIOMediaAddressLength "IOMediaAddressLength"
#define kIOMediaHeaderLength "IOMediaHeaderLength"
#define kIONetworkData "IONetworkData"
#define kIONetworkInterfaceClass "IONetworkInterface"
#define kIONetworkNoBSDAttachKey "IONetworkNoBSDAttach"
#define kIOPrimaryInterface "IOPrimaryInterface"
Constants
kIOBuiltin

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

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

Available in OS X v10.3 and later.

Declared in IONetworkInterface.h.

kIOInterfaceExtraFlags

A property of IONetworkInterface objects.

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

Available in OS X v10.0 and later.

Declared in IONetworkInterface.h.

kIOInterfaceFlags

A property of IONetworkInterface objects.

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.

Available in OS X v10.0 and later.

Declared in IONetworkInterface.h.

kIOInterfaceNamePrefix

A property of IONetworkInterface objects.

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

Available in OS X v10.0 and later.

Declared in IONetworkInterface.h.

kIOInterfaceState

A property of IONetworkInterface objects.

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.

Available in OS X v10.0 and later.

Declared in IONetworkInterface.h.

kIOInterfaceType

A property of IONetworkInterface objects.

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.

Available in OS X v10.0 and later.

Declared in IONetworkInterface.h.

kIOInterfaceUnit

A property of IONetworkInterface objects.

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

Available in OS X v10.0 and later.

Declared in IONetworkInterface.h.

kIOLocation

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

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

Available in OS X v10.3 and later.

Declared in IONetworkInterface.h.

kIOMaxTransferUnit

A property of IONetworkInterface objects.

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

Available in OS X v10.0 and later.

Declared in IONetworkInterface.h.

kIOMediaAddressLength

A property of IONetworkInterface objects.

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

Available in OS X v10.0 and later.

Declared in IONetworkInterface.h.

kIOMediaHeaderLength

A property of IONetworkInterface objects.

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

Available in OS X v10.0 and later.

Declared in IONetworkInterface.h.

kIONetworkData

A property of IONetworkInterface objects.

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.

Available in OS X v10.0 and later.

Declared in IONetworkInterface.h.

kIONetworkInterfaceClass

The name of the IONetworkInterface class.

Available in OS X v10.0 and later.

Declared in IONetworkInterface.h.

kIONetworkNoBSDAttachKey

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

Adding a property with this key and the value kOSBooleanTrue before the interface is published will hold off the BSD attach. When the interface is ready to attach to BSD, remove the property and then re-publish the interface by calling registerService().

Available in OS X v10.9 and later.

Declared in IONetworkInterface.h.

kIOPrimaryInterface

A property of IONetworkInterface objects.

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

Available in OS X v10.0 and later.

Declared in IONetworkInterface.h.

InterfaceObjectStates

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

The interface object has registered with the data link layer.

Available in OS X v10.0 and later.

Declared in IONetworkInterface.h.

kIONetworkInterfaceOpenedState

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

Available in OS X v10.0 and later.

Declared in IONetworkInterface.h.

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.

Available in OS X v10.0 and later.

Declared in IONetworkInterface.h.

Discussion

Constants used to encode the state of the interface object.