IONetworkUserClient

Inherits from:
Declared In:

Overview

An IOUserClient created by an IONetworkInterface to manage user space requests.



Functions

getNetworkDataCapacity

Get the capacity of an IONetworkData object, described by the size of its data buffer.

getNetworkDataHandle

Return an opaque handle to a provider's IONetworkData object.

readNetworkData

Read the data buffer in an IONetworkData object and copy this data to a destination buffer provided by the caller.

setProperties

Handle a request to set properties from non-kernel clients. This call is propagated to our provider.

writeNetworkData

Write to the data buffer in an IONetworkData object with data from a source buffer provided by the caller.


getNetworkDataCapacity


Get the capacity of an IONetworkData object, described by the size of its data buffer.

protected

IOReturn getNetworkDataCapacity( uint32_t dataHandle, uint64_t *capacity);
Parameters
dataHandle

The handle of an IONetworkData object.

capacity

A pointer to the capacity value returned by this method.

Return Value

kIOReturnSuccess on success, kIOReturnBadArgument if an argument is invalid.


getNetworkDataHandle


Return an opaque handle to a provider's IONetworkData object.

protected

IOReturn getNetworkDataHandle( const char * name, uint32_t * dataHandle, uint32_t nameSize, uint32_t * handleSizeP);
Parameters
name

A C string with the name of the IONetworkData object.

dataHandle

If an IONetworkData object with the given name is found, then a handle is written to this address.

nameSize

The size of the name string, including the final terminating null character.

handleSizeP

The size of the buffer allocated by the caller to store the handle. This should be 4 bytes.

Return Value

kIOReturnSuccess on success, kIOReturnBadArgument if an argument is invalid, or kIOReturnNoMemory if unable to allocate memory.

Discussion

Called to obtain an unique handle that maps to an IONetworkData object. This handle can be later passed to other methods defined in this class to refer to the same object.


readNetworkData


Read the data buffer in an IONetworkData object and copy this data to a destination buffer provided by the caller.

protected

IOReturn readNetworkData( uint32_t dataHandle, void *dstBuffer, uint32_t *dstBufferSize);
Parameters
dataHandle

The handle associated with an IONetworkData object.

dstBuffer

The destination buffer provided by the caller.

dstBufferSize

Pointer to an integer that the caller must initialize to hold the size of the destination buffer. This method will overwrite it with the actual number of bytes written.

Return Value

kIOReturnSuccess on success, kIOReturnBadArgument if an argument is invalid, or an error from IONetworkData::read().


setProperties


Handle a request to set properties from non-kernel clients. This call is propagated to our provider.

protected

virtual IOReturn setProperties( OSObject *properties);
Parameters
properties

An OSObject subclass that describes one or more properties.

Return Value

The return value from the invocation of this method in our provider is returned.


writeNetworkData


Write to the data buffer in an IONetworkData object with data from a source buffer provided by the caller.

protected

IOReturn writeNetworkData( uint32_t dataHandle, void *srcBuffer, uint32_t srcBufferSize);
Parameters
dataHandle

The handle associated with an IONetworkData object.

srcBuffer

The source buffer provided by the caller.

srcBufferSize

The size of the source buffer.

Return Value

kIOReturnSuccess on success, kIOReturnBadArgument if an argument is invalid, or an error from IONetworkData::write().

 

Did this document help you? Yes It's good, but... Not helpful...

 

Last Updated: 2009-10-15