This class provides several methods that can be used by elements that inherits from it in order to manage IP packets.
More...
#include <ipelement.hh>
This class provides several methods that can be used by elements that inherits from it in order to manage IP packets.
◆ packetTotalLength()
| uint16_t IPElement::packetTotalLength |
( |
Packet * |
packet | ) |
const |
|
inline |
Return the length of the IP packet, obtained from the header.
- Parameters
-
- Returns
- The length of the given IP packet, obtained from the IP header
◆ getIPHeaderOffset()
| uint16_t IPElement::getIPHeaderOffset |
( |
Packet * |
packet | ) |
const |
|
inline |
Return the offset in the packet at which the IP header starts.
- Parameters
-
- Returns
- The offset in the packet at which the IP header starts
◆ setPacketTotalLength()
| void IPElement::setPacketTotalLength |
( |
WritablePacket * |
packet, |
|
|
unsigned |
length |
|
) |
| const |
|
inline |
Set the length of the IP packet in the header.
- Parameters
-
| packet | The IP packet |
| length | The new length of the given IP packet |
◆ getDestinationAddress()
| const uint32_t IPElement::getDestinationAddress |
( |
Packet * |
packet | ) |
const |
|
inline |
Return the IP destination address of the packet.
- Parameters
-
- Returns
- The IP destination address of the packet
◆ getSourceAddress()
| const uint32_t IPElement::getSourceAddress |
( |
Packet * |
packet | ) |
const |
|
inline |
Return the IP source address of the packet.
- Parameters
-
- Returns
- The IP source address of the packet
◆ computeIPChecksum()
Recompute the IP checksum of the packet and set it in the IP header.
- Parameters
-
The documentation for this class was generated from the following file: