Mac Developer Library

Developer

IONetworkInterface.h Reference

Options
Deployment Target:

On This Page

IONetworkInterface.h Reference

Included Headers

  • <IOKit/IOService.h>

  • <IOKit/network/IONetworkData.h>

  • <IOKit/network/IONetworkStats.h>

  • <IOKit/network/IONetworkMedium.h>

  • <net/kpi_interface.h>

Callbacks

  • Declaration

    Objective-C

    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.

    Import Statement

    Objective-C

    #include <IONetworkInterface.h>;

    Availability

    Available in OS X v10.6 and later.

  • Declaration

    Objective-C

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

    Import Statement

    Objective-C

    #include <IONetworkInterface.h>;

    Availability

    Available in OS X v10.6 and later.

Constants

See the Overview section above for header-level documentation.

  • Declaration

    Objective-C

    #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

      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.

    • kIOInterfaceExtraFlags

      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.

    • kIOInterfaceFlags

      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.

    • kIOInterfaceNamePrefix

      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.

    • kIOInterfaceState

      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.

    • kIOInterfaceType

      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.

    • kIOInterfaceUnit

      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.

    • kIOLocation

      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.

    • kIOMaxTransferUnit

      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.

    • kIOMediaAddressLength

      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.

    • kIOMediaHeaderLength

      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.

    • kIONetworkData

      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.

    • kIONetworkInterfaceClass

      kIONetworkInterfaceClass

      The name of the IONetworkInterface class.

      Available in OS X v10.0 and later.

    • kIONetworkNoBSDAttachKey

      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.

    • kIOPrimaryInterface

      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.

  • Declaration

    Objective-C

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

    Constants

    • kIONetworkInterfaceRegisteredState

      kIONetworkInterfaceRegisteredState

      The interface object has registered with the data link layer.

      Available in OS X v10.0 and later.

    • kIONetworkInterfaceOpenedState

      kIONetworkInterfaceOpenedState

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

      Available in OS X v10.0 and later.

    • kIONetworkInterfaceDisabledState

      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.

    Discussion

    Constants used to encode the state of the interface object.