IOMBufNaturalMemoryCursor



Member Functions

getPhysicalSegments

Abstract: Generate a cpu natural physical scatter/gather list from a given mbuf.
public:

UInt getPhysicalSegments(struct mbuf * packet, struct IOPhysicalSegment * vector, UInt numVectorSegments = 0);

Parameters

NameDescription
packetThe mbuf packet.
vectorPointer to an array of IOPhysicalSegments for the output physical scatter/gather list.
numVectorSegmentsMaximum number of IOPhysicalSegments accepted.
Result: The number of segments that were filled in is returned, or 0 if an error occurred.

getPhysicalSegmentsWithCoalesce

Abstract: Generate a cpu natural physical scatter/gather list from a given mbuf.
public:

UInt getPhysicalSegmentsWithCoalesce(struct mbuf * packet, struct IOPhysicalSegment * vector, UInt numVectorSegments = 0);

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

Parameters

NameDescription
packetThe mbuf packet.
vectorPointer to an array of IOPhysicalSegments for the output physical scatter/gather list.
numVectorSegmentsMaximum number of IOPhysicalSegments accepted.
Result: The number of segments that were filled in is returned, or 0 if an error occurred.

withSpecification

Abstract: Factory function to create and initialize an IOMBufNaturalMemoryCursor in one operation, see IOMBufMemoryCursor::initWithSpecification.
public:

static IOMBufNaturalMemoryCursor * withSpecification(UInt maxSegmentSize, UInt maxNumSegments);

Parameters

NameDescription
maxSegmentSizeMaximum allowable size for one segment.
maxNumSegmentsMaximum number of segments.
Result: A new mbuf cursor if successfully created and initialized, 0 otherwise.

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