ADC Home > Reference Library > Reference > Hardware & Drivers > I/O Kit Framework Reference
|
IONetworkLib.h |
Includes: |
This header defines functions you use to open and close connections to IONetworkInterface objects and to read from and write to the buffers of network data objects.
Close the connection to an IONetworkInterface object.
Get the capacity (in bytes) of a network data object.
Get the handle of a network data object with the given name.
Get the packet filters for a given filter group.
Open a connection to an IONetworkInterface object. An IONetworkUserClient object is created to manage the connection.
Read the buffer of a network data object.
Fill the buffer of a network data object with zeroes.
Set the packet filters for a given filter group.
Write to the buffer of a network data object.
IONetworkClose |
Close the connection to an IONetworkInterface object.
IOReturn IONetworkClose( io_connect_t con);
IONetworkGetDataCapacity |
Get the capacity (in bytes) of a network data object.
IOReturn IONetworkGetDataCapacity( io_connect_t conObject, IONDHandle dataHandle, UInt32 *capacityP);
conObject
The connection object.
dataHandle
The handle of a network data object.
capacityP
Upon success, the capacity is written to this address.
kIOReturnSuccess on success, or an error code otherwise.
IONetworkGetDataHandle |
Get the handle of a network data object with the given name.
IOReturn IONetworkGetDataHandle( io_connect_t conObject, const char * dataName, IONDHandle * dataHandleP);
conObject
The connection object.
dataName
The name of the network data object.
dataHandleP
Upon success, the handle is written to this address.
kIOReturnSuccess on success, or an error code otherwise.
IONetworkGetPacketFiltersMask |
Get the packet filters for a given filter group.
IOReturn IONetworkGetPacketFiltersMask( io_connect_t connect, const io_name_t filterGroup, UInt32 * filtersMask, IOOptionBits options );
connect
The connection object returned from IONetworkOpen().
filterGroup
The name of the packet filter group.
filtersMask
Pointer to the return value containing a mask of packet filters.
options
kIONetworkSupportedPacketFilters may be set to fetch the filters that are supported by the hardware.
An IOReturn error code.
A network controller may support a number of packets filters that can accept or reject a type of packet seen on the network. A filter group identifies a set of related filters, such as all filters that will allow a packet to pass upstream based on the destination address encoded within the packet. This function allows an user-space program to get the filtering performed by a given filter group.
IONetworkOpen |
Open a connection to an IONetworkInterface object. An IONetworkUserClient object is created to manage the connection.
IOReturn IONetworkOpen( io_object_t obj, io_connect_t *con);
IONetworkReadData |
Read the buffer of a network data object.
IOReturn IONetworkReadData( io_connect_t conObj, IONDHandle dataHandle, UInt8 *destBuf, UInt32 *inOutSizeP);
conObj
The connection object.
dataHandle
The handle of a network data object.
destBuf
The buffer where the data read shall be written to.
inOutSizeP
Pointer to an integer that the caller must initialize to contain the size of the buffer. This function will overwrite it with the actual number of bytes written to the buffer.
kIOReturnSuccess on success, or an error code otherwise.
IONetworkResetData |
Fill the buffer of a network data object with zeroes.
IOReturn IONetworkResetData( io_connect_t conObject, IONDHandle dataHandle);
conObject
The connection object.
dataHandle
The handle of a network data object.
kIOReturnSuccess on success, or an error code otherwise.
IONetworkSetPacketFiltersMask |
Set the packet filters for a given filter group.
IOReturn IONetworkSetPacketFiltersMask( io_connect_t connect, const io_name_t filterGroup, UInt32 filtersMask, IOOptionBits options );
connect
The connection object returned from IONetworkOpen().
filterGroup
The name of the packet filter group.
filtersMask
A mask of filters to set.
options
No options are currently defined.
An IOReturn error code.
A network controller may support a number of packets filters that can accept or reject a type of packet seen on the network. A filter group identifies a set of related filters, such as all filters that will allow a packet to pass upstream based on the destination address encoded within the packet. This function allows an user-space program to set the filtering performed by a given filter group.
IONetworkWriteData |
Write to the buffer of a network data object.
IOReturn IONetworkWriteData( io_connect_t conObj, IONDHandle dataHandle, UInt8 *srcBuf, UInt32 inSize);
conObj
The connection object.
dataHandle
The handle of a network data object.
srcBuf
The data to write is taken from this buffer.
inSize
The size of the source buffer.
kIOReturnSuccess on success, or an error code otherwise.
IONetworkPacketFilterOptions |
enum { kIONetworkSupportedPacketFilters = 0x0001 };
kIONetworkSupportedPacketFilters
Indicate the filters that are supported by the hardware.
|
Last Updated: 2009-02-23