Contents

copyPacket

Allocates a new packet, containing data copied from an existing source packet.

Declaration

virtual mbuf_t copyPacket(
 const mbuf_t m,
 UInt32 size = 0);

Parameters

  • m:

    The source packet.

  • size:

    The number of bytes to copy. If set to 0, then the entire data buffer from the source packet is copied.

Return Value

Returns a new packet containing the same data as the source packet.

Overview

The source packet is not modified by this method.

See Also

Miscellaneous