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

    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.

  • Declaration

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

Constants

See the Overview section above for header-level documentation.

  • Declaration

    #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

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

    • kIOInterfaceExtraFlags

      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.

    • kIOInterfaceFlags

      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

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

    • kIOInterfaceState

      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

      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

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

    • kIOLocation

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

    • kIOMaxTransferUnit

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

    • kIOMediaAddressLength

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

    • kIOMediaHeaderLength

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

    • kIONetworkData

      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.

    • kIONetworkNoBSDAttachKey

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

    • kIOPrimaryInterface

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

  • Declaration

    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.