|
PcapPlusPlus
Next
|
#include <PacketUtils.h>
Public Member Functions | |
| PacketSerializer (ISerializer &serializer) | |
| void | addPacket (const Packet &packet) |
| void | addPacket (const Packet *packet) |
| void | addPackets (const PointerVector< Packet > &packets) |
| void | addPackets (const std::vector< Packet > &packets) |
Serializes a collection of packets into a single array. The array is opened immediately in the constructor and closed when the PacketSerializer is destroyed, so all packets must be added within its lifetime. Not copyable, since copying would either double-write the array or leave one copy's array permanently unclosed.
|
inlineexplicit |
Opens the "packets" array field on the given serializer.
| [in] | serializer | The serializer to write the array into |
| void pcpp::PacketSerializer::addPacket | ( | const Packet & | packet | ) |
Serializes one packet and appends it to the array.
| [in] | packet | The packet to add |
| void pcpp::PacketSerializer::addPacket | ( | const Packet * | packet | ) |
Serializes one packet and appends it to the array.
| [in] | packet | The packet to add |
| void pcpp::PacketSerializer::addPackets | ( | const PointerVector< Packet > & | packets | ) |
Serializes every packet in the vector and appends them to the array, in order.
| [in] | packets | The packets to add |
| void pcpp::PacketSerializer::addPackets | ( | const std::vector< Packet > & | packets | ) |
Serializes every packet in the vector and appends them to the array, in order.
| [in] | packets | The packets to add |