|
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);
conObjectThe connection object.
dataHandleThe handle of a network data object.
capacityPUpon 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);
conObjectThe connection object.
dataNameThe name of the network data object.
dataHandlePUpon 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 );
connectThe connection object returned from IONetworkOpen().
filterGroupThe name of the packet filter group.
filtersMaskPointer to the return value containing a mask of packet filters.
optionskIONetworkSupportedPacketFilters 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);
conObjThe connection object.
dataHandleThe handle of a network data object.
destBufThe buffer where the data read shall be written to.
inOutSizePPointer 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);
conObjectThe connection object.
dataHandleThe 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 );
connectThe connection object returned from IONetworkOpen().
filterGroupThe name of the packet filter group.
filtersMaskA mask of filters to set.
optionsNo 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);
conObjThe connection object.
dataHandleThe handle of a network data object.
srcBufThe data to write is taken from this buffer.
inSizeThe size of the source buffer.
kIOReturnSuccess on success, or an error code otherwise.
IONetworkPacketFilterOptions |
enum { kIONetworkSupportedPacketFilters = 0x0001 };
kIONetworkSupportedPacketFiltersIndicate the filters that are supported by the hardware.
|
Last Updated: 2009-02-23