|
EMANE
1.2.1
|
A Packet class that allows upstream processing to strip layer headers as the packet travels up the stack towards the emulation/application boundary (transport). More...
#include <upstreampacket.h>
Public Member Functions | |
| UpstreamPacket (const PacketInfo &info, const void *buf, size_t len) | |
| UpstreamPacket (const PacketInfo &info, const Utils::VectorIO &vectorIO) | |
| UpstreamPacket (const UpstreamPacket &) | |
| UpstreamPacket & | operator= (const UpstreamPacket &pkt) |
| UpstreamPacket (UpstreamPacket &&pkt) | |
| UpstreamPacket & | operator= (UpstreamPacket &&pkt) |
| ~UpstreamPacket () | |
| size_t | strip (size_t size) |
| std::uint16_t | stripLengthPrefixFraming () |
| std::uint32_t | stripLengthPrefixFramingLong () |
| const void * | get () const |
| size_t | length () const |
| const PacketInfo & | getPacketInfo () const |
A Packet class that allows upstream processing to strip layer headers as the packet travels up the stack towards the emulation/application boundary (transport).
Definition at line 52 of file upstreampacket.h.
| EMANE::UpstreamPacket::UpstreamPacket | ( | const PacketInfo & | info, |
| const void * | buf, | ||
| size_t | len | ||
| ) |
Creates an UpstreamPacket instance from a buffer
| info | The PacketInfo to use |
| buf | Pointer to the buffer |
| len | Length of the buffer |
Definition at line 150 of file upstreampacket.cc.
| EMANE::UpstreamPacket::UpstreamPacket | ( | const PacketInfo & | info, |
| const Utils::VectorIO & | vectorIO | ||
| ) |
Creates an UpstreamPacket instance from a Utils::VectorIO
| info | The PacketInfo to use |
| vectorIO | Vectored IO object |
Definition at line 155 of file upstreampacket.cc.
| EMANE::UpstreamPacket::UpstreamPacket | ( | const UpstreamPacket & | pkt | ) |
Creates an UpstreamPacket instance by copying another instance
Definition at line 159 of file upstreampacket.cc.
| EMANE::UpstreamPacket::UpstreamPacket | ( | UpstreamPacket && | pkt | ) |
Creates an UpstreamPacket instance by moving another instance
Definition at line 162 of file upstreampacket.cc.
| EMANE::UpstreamPacket::~UpstreamPacket | ( | ) |
Destroys an UpstreamPacket instance
Definition at line 165 of file upstreampacket.cc.
| const void * EMANE::UpstreamPacket::get | ( | ) | const |
Gets a pointer to the internal buffer holding the message
Pointer to message or 0 if the packet was not combined or if there is no data Definition at line 196 of file upstreampacket.cc.
| const EMANE::PacketInfo & EMANE::UpstreamPacket::getPacketInfo | ( | ) | const |
Gets a reference to the packet information
Definition at line 208 of file upstreampacket.cc.
| size_t EMANE::UpstreamPacket::length | ( | ) | const |
Gets the packet length in bytes
Definition at line 202 of file upstreampacket.cc.
| EMANE::UpstreamPacket & EMANE::UpstreamPacket::operator= | ( | const UpstreamPacket & | pkt | ) |
Sets an UpstreamPacket instance to a copy of another instance
Definition at line 167 of file upstreampacket.cc.
| EMANE::UpstreamPacket & EMANE::UpstreamPacket::operator= | ( | UpstreamPacket && | pkt | ) |
Sets and UpstreamPacket instance by moving another instance
Definition at line 173 of file upstreampacket.cc.
| size_t EMANE::UpstreamPacket::strip | ( | size_t | size | ) |
Removes size bytes from the beginning of a packet. This method is used to remove layer specific headers from a packet after they are processed.
| size | Number of bytes to strip from the head of the packet. |
Definition at line 180 of file upstreampacket.cc.
| std::uint16_t EMANE::UpstreamPacket::stripLengthPrefixFraming | ( | ) |
Removes 2 bytes for the beginning of the packet and returns them as an unsigned 16-bit integer in host byte order.
Definition at line 186 of file upstreampacket.cc.
| std::uint32_t EMANE::UpstreamPacket::stripLengthPrefixFramingLong | ( | ) |
Removes 4 bytes for the beginning of the packet and returns them as an unsigned 32-bit integer in host byte order.
Definition at line 191 of file upstreampacket.cc.