Mac Developer Library

Developer

IOMbufMemoryCursor Class Reference

Options
Deployment Target:

On This Page
Language:

IOMbufMemoryCursor

A mechanism to convert mbuf chains to physical addresses. More...

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


Not Applicable @import Kernel;

Availability


Available in OS X v10.0 through OS X v10.5.
  • Generates a physical scatter/gather list given a mbuf packet.

    Declaration

    C++

    virtual UInt32 genPhysicalSegments( mbuf_tpacket, void *vector, UInt32maxSegs, booldoCoalesce);

    Parameters

    packet

    The mbuf packet.

    vector

    Void pointer to base of output physical scatter/gather list. Always passed directly onto the OutputSegmentFunc without interpretation by the cursor.

    maxSegs

    Maximum number of segments that can be written to segments array.

    doCoalesce

    Set to true to perform coalescing when the required number of segments exceeds the specified limit, otherwise abort and return 0.

    Return Value

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

    Discussion

    Generates a list of physical segments from the given mbuf.

    Import Statement

  • Returns a count of the total number of mbuf chains coalesced by genPhysicalSegments().

    Declaration

    C++

    UInt32 getAndResetCoalesceCount();

    Return Value

    Returns the coalesce count.

    Discussion

    This method returns a count of the total number of mbuf chains coalesced by genPhysicalSegments(). The counter is then reset to 0.

    Import Statement

  • Primary initializer for the IOMbufMemoryCursor class.

    Declaration

    C++

    virtual bool initWithSpecification( IOMemoryCursor::SegmentFunctionoutSeg, UInt32maxSegmentSize, UInt32maxNumSegments);

    Parameters

    outSeg

    Function to call to output one physical segment.

    maxSegmentSize

    Maximum allowable size for one segment.

    maxNumSegments

    Maximum number of segments.

    Return Value

    Returns true if the inherited classes and this instance initialized successfully.

    Import Statement

Instance Variables

  • Reserved for future use. (Internal use only)

    Declaration

    C++

    ExpansionData *reserved;