ADC Home > Reference Library > Reference > Hardware & Drivers > I/O Kit Framework Reference

 


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.

getService

Get the IOService which is the provider of this user client.

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

virtual IOReturn getNetworkDataCapacity( OSSymbol *key, UInt32 *capacity);
Parameters
key

The OSSymbol key 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

virtual IOReturn getNetworkDataHandle( char *name, OSSymbol **handle, IOByteCount nameSize, IOByteCount *handleSizeP);
Parameters
name

A C string with the name of the IONetworkData object.

handle

If an IONetworkData object with the given name is found, then its associated OSSymbol object 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.


getService


Get the IOService which is the provider of this user client.

protected

virtual IOService * getService();
Return Value

Returns the IONetworkInterface that created the user client.


readNetworkData


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

protected

virtual IOReturn readNetworkData( OSSymbol *key, void *dstBuffer, IOByteCount *dstBufferSize);
Parameters
key

The OSSymbol key 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

virtual IOReturn writeNetworkData( OSSymbol *key, void *srcBuffer, IOByteCount srcBufferSize);
Parameters
key

The OSSymbol key 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: 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: 2009-02-23