Mac Developer Library

Developer

IOMbufDBDMAMemoryCursor Class Reference

Options
Deployment Target:

On This Page
Language:

IOMbufDBDMAMemoryCursor

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


Not Applicable

Objective-C

@import Kernel;

Availability


Available in OS X v10.0 through OS X v10.5.
Not available to 64-bit applications.

An IOMbufMemoryCursor subclass that outputs a vector of IODBDMADescriptors.

  • Generates a DBDMA descriptor list from a given mbuf.

    Declaration

    C++

    UInt32 getPhysicalSegments( mbuf_t packet, struct IODBDMADescriptor *vector, UInt32 numVectorSegments = 0);

    Parameters

    packet

    The mbuf packet.

    vector

    Pointer to an array of IODBDMADescriptor for the output list.

    numVectorSegments

    Maximum number of IODBDMADescriptors accepted.

    Return Value

    Returns the number of segments that were filled in, or 0 if an error occurred.

  • Generates a DBDMA descriptor list from a given mbuf.

    Declaration

    C++

    UInt32 getPhysicalSegmentsWithCoalesce( mbuf_t packet, struct IODBDMADescriptor *vector, UInt32 numVectorSegments = 0);

    Parameters

    packet

    The mbuf packet.

    vector

    Pointer to an array of IODBDMADescriptor for the output list.

    numVectorSegments

    Maximum number of IODBDMADescriptors accepted.

    Return Value

    Returns the number of segments that were filled in, or 0 if an error occurred.

    Discussion

    Generate a DBDMA descriptor list from a given mbuf. Coalesce mbuf chain when the number of elements in the list exceeds numVectorSegments.

  • Factory function that creates and initializes an IOMbufDBDMAMemoryCursor in one operation.

    Declaration

    C++

    static IOMbufDBDMAMemoryCursor * withSpecification( UInt32maxSegmentSize, UInt32maxNumSegments);

    Parameters

    maxSegmentSize

    Maximum allowable size for one segment.

    maxNumSegments

    Maximum number of segments.

    Return Value

    Returns a new mbuf cursor if successfully created and initialized, 0 otherwise.

    Discussion

    See also IOMbufMemoryCursor::initWithSpecification.