Mac Developer Library

Developer

IOMbufLittleMemoryCursor Class Reference

Options
Deployment Target:

On This Page
Language:

IOMbufLittleMemoryCursor

An IOMbufMemoryCursor subclass that outputs a vector of IOPhysicalSegments in the little endian byte order.

The IOMbufLittleMemoryCursor would be used when the DMA hardware requires a little endian address and length pair. This cursor outputs an array of IOPhysicalSegments that are encoded in little endian format.

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.
  • Generates a little endian physical scatter/gather list from a given mbuf.

    Declaration

    C++

    UInt32 getPhysicalSegments( mbuf_t packet, struct IOMemoryCursor::PhysicalSegment *vector, UInt32 numVectorSegments = 0);

    Parameters

    packet

    The mbuf packet.

    vector

    Pointer to an array of IOPhysicalSegments for the output physical scatter/gather list.

    numVectorSegments

    Maximum number of IOPhysicalSegments accepted.

    Return Value

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

  • Generates a little endian physical scatter/gather list from a given mbuf.

    Declaration

    C++

    UInt32 getPhysicalSegmentsWithCoalesce( mbuf_t packet, struct IOMemoryCursor::PhysicalSegment *vector, UInt32 numVectorSegments = 0);

    Parameters

    packet

    The mbuf packet.

    vector

    Pointer to an array of IOPhysicalSegments for the output physical scatter/gather list.

    numVectorSegments

    Maximum number of IOPhysicalSegments accepted.

    Return Value

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

    Discussion

    Generate a little endian physical scatter/gather list from a given mbuf. Coalesce mbuf chain when the number of segments in the scatter/gather list exceeds numVectorSegments.

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

    Declaration

    C++

    static IOMbufLittleMemoryCursor * 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.