IOMBufMemoryCursor



Member Functions

genPhysicalSegments

Abstract: Generate a physical scatter/gather list given a mbuf packet.
protected:

virtual UInt genPhysicalSegments(struct mbuf * packet, void * vector, UInt maxSegs, bool doCoalesce);

Generates a list of physical segments from the given mbuf.

Parameters

NameDescription
packetThe mbuf packet.
vectorVoid pointer to base of output physical scatter/gather list. Always passed directly onto the OutputSegmentFunc without interpretation by the cursor.
maxSegsMaximum number of segments that can be written to segments array.
doCoalesceSet to true to perform coalescing when the required number of segments exceeds the specified limit, otherwise abort and return 0.
Result: The number of segments that were filled in is returned, or 0 if an error occurred.

genPhysicalSegments

Abstract: Returns a count of the total number of mbuf chains coalesced by genPhysicalSegments(). The counter is then reset to 0.
public:

UInt getAndResetCoalesceCount();

Result: The coalesce count.

initWithSpecification

Abstract: Primary initializer for the IOMBufMemoryCursor class.
protected:

virtual bool initWithSpecification(OutputSegmentFunc outSeg, UInt maxSegmentSize, UInt maxNumSegments);

Parameters

NameDescription
outSegFunction to call to output one physical segment.
maxSegmentSizeMaximum allowable size for one segment.
maxNumSegmentsMaximum number of segments.
Result: true if the inherited classes and this instance initialized successfully.

© 2000 Apple Computer, Inc. — (Last Updated 2/23/2000)