ADC Home > Reference Library > Reference > Darwin > Kernel Framework Reference

 


IOMbufBigMemoryCursor

Inherits from:
Declared In:

Overview

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

Discussion

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



Functions

getPhysicalSegments

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

getPhysicalSegmentsWithCoalesce

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

withSpecification

Factory function that creates and initializes an IOMbufBigMemoryCursor in one operation.


getPhysicalSegments


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

public

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.


getPhysicalSegmentsWithCoalesce


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

public

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 big endian physical scatter/gather list from a given mbuf. Coalesce mbuf chain when the number of segments in the scatter/gather list exceeds numVectorSegments.


withSpecification


Factory function that creates and initializes an IOMbufBigMemoryCursor in one operation.

public

static IOMbufBigMemoryCursor * withSpecification( UInt32 maxSegmentSize, UInt32 maxNumSegments);
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.


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.

 

Last Updated: 2008-12-19