Mac Developer Library

Developer

IONetworkController.h Reference

Options
Deployment Target:

On This Page

IONetworkController.h Reference

Included Headers

  • <IOKit/IOService.h>

  • <IOKit/IOWorkLoop.h>

  • <IOKit/network/IONetworkInterface.h>

  • <IOKit/network/IOKernelDebugger.h>

Data Types

See the Overview section above for header-level documentation.

  • Declaration

    typedef struct { UInt32 alignStart; UInt32 alignLength; UInt32 reserved[6]; } IOPacketBufferConstraints;

    Discussion

    Constraint parameters, specified by a driver, for the data buffer in a packet mbuf. This is observed by allocatePacket() to satisfy the stated requirements.

    Import Statement

Constants

See the Overview section above for header-level documentation.

  • Declaration

    #define kIOActiveMedium "IOActiveMedium" #define kIODefaultMedium "IODefaultMedium" #define kIOFeatures "IOFeatures" #define kIOLinkData "IOLinkData" #define kIOLinkSpeed "IOLinkSpeed" #define kIOLinkStatus "IOLinkStatus" #define kIOMACAddress "IOMACAddress" #define kIOMaxPacketSize "IOMaxPacketSize" #define kIOMediumDictionary "IOMediumDictionary" #define kIOMinPacketSize "IOMinPacketSize" #define kIOModel "IOModel" #define kIONetworkControllerClass "IONetworkController" #define kIONetworkFilterGroup "IONetworkFilterGroup" #define kIOPacketFilters "IOPacketFilters" #define kIORevision "IORevision" #define kIOSelectedMedium "IOSelectedMedium" #define kIOVendor "IOVendor"

    Constants

    • kIOActiveMedium

      The kIOActiveMedium property is a property of IONetworkController objects. It has an OSSymbol value that describes the name of the active medium. This is the name of the medium where an active link has been established. This name can be used as a key into the medium dictionary to gather additional information about the active medium.

    • kIODefaultMedium

      The kIODefaultMedium property is a property of IONetworkController objects. It has an OSString value that describes the name of the default medium. This definition may change or disappear in the future.

    • kIOFeatures

      The kIOFeatures property is a property of IONetworkController objects. It has an OSNumber value that describes generic features defined by IONetworkController that are supported by the network controller.

    • kIOLinkData

      The kIOLinkData property is a property of IONetworkController objects. It has an OSData value that contains additional information describing the active link that was established. Its interpretation is not defined.

    • kIOLinkSpeed

      The kIOLinkSpeed property is a property of IONetworkController objects. It has an OSNumber value that describes the speed of the link established over the active medium in bits per second.

    • kIOLinkStatus

      The kIOLinkStatus property is a property of IONetworkController objects. It has an OSNumber value that describes the current network link status. See IONetworkMedium for the definition of the link status bits.

    • kIOMACAddress

      The kIOMACAddress property is a property of IONetworkController objects. It has an OSData value that describes the hardware MAC (media access controller) address, or station address, of the network controller.

    • kIOMaxPacketSize

      The kIOMaxPacketSize property is a property of IONetworkController objects. It has an OSNumber value that describes the maximum packet size supported by the controller.

    • kIOMediumDictionary

      The kIOMediumDictionary property is a property of IONetworkController objects. It has an OSDictionary value that is a container for the collection of IONetworkMedium objects that represent the media types supported by the network controller. Each entry in the dictionary is a key/value pair consisting of the medium name, and a dictionary value that contains the properties for that medium entry.

    • kIOMinPacketSize

      The kIOMinPacketSize property is a property of IONetworkController objects. It has an OSNumber value that describes the minimum packet size supported by the controller.

    • kIOModel

      The kIOModel property is a property of IONetworkController objects. It has an OSString value that describes the model of the network controller.

    • kIONetworkControllerClass

      The name of the IONetworkController class.

    • kIONetworkFilterGroup

      The name assigned to the standard network filter group.

    • kIOPacketFilters

      The kIOPacketFilters property is a property of IONetworkController objects. It has an OSDictionary value that describes the entire set of packet filters supported by the controller. Each entry in the dictionary is a key/value pair consisting of the filter group name, and an OSNumber describing the set of supported filters for that group.

    • kIORevision

      The kIORevision property is a property of IONetworkController objects. It has an OSString value that describes the revision level of the network controller.

    • kIOSelectedMedium

      The kIOSelectedMedium property is a property of IONetworkController objects. It has an OSSymbol value that describes the name of the current selected medium. This name can be used as a key into the medium dictionary to gather additional information about the selected medium.

    • kIOVendor

      The kIOVendor property is a property of IONetworkController objects. It has an OSString value that describes the vendor of the network controller.

  • Declaration

    extern const OSSymbol * gIONetworkFilterGroup;

    Constants

    • gIONetworkFilterGroup

      gIONetworkFilterGroup is an OSSymbol object that contains the name of the standard network filter group as defined by kIONetworkFilterGroup.

  • Feature flags returned by the getFeatures() method.

    Declaration

    enum { kIONetworkFeatureNoBSDWait = 0x01, kIONetworkFeatureHardwareVlan = 0x02, kIONetworkFeatureSoftwareVlan = 0x04, kIONetworkFeatureMultiPages = 0x08, kIONetworkFeatureTSOIPv4 = 0x10, kIONetworkFeatureTSOIPv6 = 0x20, kIONetworkFeatureTransmitCompletionStatus = 0x40 };

    Constants

    • kIONetworkFeatureNoBSDWait

      Set this bit in the value returned by getFeatures() to disable the automatic wait for "IOBSD" resource by the IONetworkController::start() method.

    • kIONetworkFeatureHardwareVlan

      Set this bit in the value returned by getFeatures() to indicate the controller supports hardware stripping and stuffing of 802.1q vlan tags. If the controller supports this feature it must enable it when initializing so that all received packets delivered to higher layers have the tag stripped. The controller should use setVlanTag() to provide the tag information out of band.

    • kIONetworkFeatureSoftwareVlan

      Set this bit in the value returned by getFeatures() to indicate that the controller can support software based vlan by transmitting and receiving packets 4 bytes longer that normal.

    • kIONetworkFeatureMultiPages

      Set this bit if the driver is capable of handling packets coming down from the network stack that reside in virtually, but not in physically contiguous span of the external mbuf clusters. In this case, the data area of a packet in the external mbuf cluster might cross one or more physical pages that are disjoint, depending on the interface MTU and the packet size. Such a use of larger than system page size clusters by the network stack is done for better system efficiency. Drivers that utilize the IOMbufNaturalMemoryCursor with the getPhysicalSegmentsWithCoalesce interfaces and enumerate the list of vectors should set this flag for possible gain in performance during bulk data transfer.

    • kIONetworkFeatureTSOIPv4

      Set this bit to advertise support for TCP/IPv4 segmentation offload.

    • kIONetworkFeatureTSOIPv6

      Set this bit to advertise support for TCP/IPv6 segmentation offload.

    • kIONetworkFeatureTransmitCompletionStatus

      Set this bit to advertise the capability to report per-packet transmit completion status. See IONetworkInterface::reportTransmitCompletionStatus.

    Discussion

    Feature Flags

  • All standard packet filters.

    Declaration

    enum { kIOPacketFilterUnicast = 0x1, kIOPacketFilterBroadcast = 0x2, kIOPacketFilterMulticast = 0x10, kIOPacketFilterMulticastAll = 0x20, kIOPacketFilterPromiscuous = 0x100, kIOPacketFilterPromiscuousAll = 0x200 };

    Constants

    • kIOPacketFilterUnicast

      Reception of unicast packets.

    • kIOPacketFilterBroadcast

      Reception of broadcast packets.

    • kIOPacketFilterMulticast

      Reception of multicast packets addressed to a set of multicast addresses.

    • kIOPacketFilterMulticastAll

      Reception of all multicast packets.

    • kIOPacketFilterPromiscuous

      Reception of all packets.

    • kIOPacketFilterPromiscuousAll

      Reception of all packets, including bad packets.

    Discussion

    Each filter will allow the reception of certain class of packets depending on its destination MAC address.