Contents

outputPacket

Transmits an output packet.

Declaration

virtual UInt32 outputPacket(
 mbuf_t,
 void *param);

Parameters

  • mbuf_t:

    An mbuf chain containing the output packet to be sent on the network.

  • param:

    A parameter provided by the caller.

Return Value

Returns a return code defined by the caller.

Overview

If an IOOutputQueue was created by createOutputQueue(), then this method will be called by the output queue object. Otherwise, an interface object will call this method directly when it receives an output packet from the data link layer.

There is no upper limit on the number of mbufs, hence the number of memory fragments, in the mbuf chain provided. Drivers must be able to handle cases when the mbuf count might exceed the limit supported by their DMA engines, and perform coalescing to copy the various memory fragments into a lesser number of fragments. This complexity can be hidden from the driver when an IOMbufMemoryCursor is used, which is able to convert an mbuf chain into a physical address scatter-gather list that will not exceed a specified number of physically contiguous memory segments. See IOMbufMemoryCursor.

The implementation in IONetworkController performs no useful action and will drop all packets. A driver must override this method and process the output packet provided. The implementation in the driver must not block, since this may cause the network stack to be reentered from an unsafe point.

See Also

Miscellaneous