ADC Home > Reference Library > Reference > Darwin > Kernel Framework Reference

 


IONetworkController.h

Include:

Path <IOKit/network/IONetworkController.h>

See Also:
Includes:

Overview

IONetworkController subclasses provide support for your hardware. It provides data to an IONetworkController via an IONetworkInterface, which in turn interfaces with the data link interface layer. Commands and packets intended for the controller follow the reverse path.



Classes

IONetworkController

Implements the framework for a generic network controller.



Constants


gIONetworkFilterGroup


extern const OSSymbol * gIONetworkFilterGroup;  
Discussion

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

Typedefs


IOPacketBufferConstraints


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

Starting address byte alignment.

alignLength

Buffer length byte alignment.

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.

Enumerations


NetworkFeatureFlags


Feature flags returned by the getFeatures() method.

enum { 
    kIONetworkFeatureNoBSDWait = 0x01, 
    kIONetworkFeatureHardwareVlan = 0x02, 
    kIONetworkFeatureSoftwareVlan = 0x4, 
    kIONetworkFeatureMultiPages = 0x8 
};  
Constants
kIONetworkFeatureNoBSDWait

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

kIONetworkFeaturesHardwareVlan

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.

kIONetworkFeaturesSoftwareVlan

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.


StandardPacketFilters


All standard packet filters.

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.

#defines


kIOActiveMedium


A property of IONetworkController objects.

#define kIOActiveMedium "IOActiveMedium" 
Discussion

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


A property of IONetworkController objects.

#define kIODefaultMedium "IODefaultMedium" 
Discussion

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


A property of IONetworkController objects.

#define kIOFeatures "IOFeatures" 
Discussion

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


A property of IONetworkController objects.

#define kIOLinkData "IOLinkData" 
Discussion

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


A property of IONetworkController objects.

#define kIOLinkSpeed "IOLinkSpeed" 
Discussion

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


A property of IONetworkController objects.

#define kIOLinkStatus "IOLinkStatus" 
Discussion

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


A property of IONetworkController objects.

#define kIOMACAddress "IOMACAddress" 
Discussion

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


A property of IONetworkController objects.

#define kIOMaxPacketSize "IOMaxPacketSize" 
Discussion

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


A property of IONetworkController objects.

#define kIOMediumDictionary "IOMediumDictionary" 
Discussion

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


A property of IONetworkController objects.

#define kIOMinPacketSize "IOMinPacketSize" 
Discussion

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


A property of IONetworkController objects.

#define kIOModel "IOModel" 
Discussion

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.

#define kIONetworkControllerClass "IONetworkController" 


kIONetworkFilterGroup


The name assigned to the standard network filter group.

#define kIONetworkFilterGroup "IONetworkFilterGroup" 


kIOPacketFilters


A property of IONetworkController objects.

#define kIOPacketFilters "IOPacketFilters" 
Discussion

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


A property of IONetworkController objects.

#define kIORevision "IORevision" 
Discussion

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


kIOSelectedMedium


A property of IONetworkController objects.

#define kIOSelectedMedium "IOSelectedMedium" 
Discussion

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


A property of IONetworkController objects.

#define kIOVendor "IOVendor" 
Discussion

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


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: 2008-12-19