My Project
|
A class to represent packets. More...
#include <packet.h>
Public Member Functions | |
Packet () | |
Default constructor. The properties of the packet are set as follows: More... | |
Packet (string, string, int, int, int, int) | |
Constructor which accepts specification for sa(src_addr), da(dst_addr), sp(src_port), dp(dst_port), oct(octects) and pkt(packets) More... | |
string | getSrcAddr () |
Getter for the source addr. More... | |
string | getDstAddr () |
Getter for the destination addr. More... | |
int | getSrcPort () |
Getter for the source port. More... | |
int | getDstPort () |
Getter for the destination port. More... | |
int | getOctects () |
int | getPackets () |
Getter for the packets. More... | |
void | setSrcAddr (string) |
Setter for the src_addr. More... | |
void | setDstAddr (string) |
Setter for the destination addr. More... | |
void | setSrcPort (int) |
Setter for the source port. More... | |
void | setDstPort (int) |
Setter for the destination port. More... | |
void | setOctects (int) |
void | setPackets (int) |
Setter for the packets value. More... | |
void | enable () |
Sets that the packet is enabled to be displayed in GUI. | |
void | disable () |
Sets that the packet is disabled to be displayed in GUI. | |
bool | isEnabled () |
Private Attributes | |
string | src_addr |
string | dst_addr |
int | src_port |
int | dst_port |
int | octects |
int | packets |
bool | enabled |
A class to represent packets.
The class contains two constructurs and various functions for searching and filtering network flow packets.
Packet::Packet | ( | ) |
Default constructor. The properties of the packet are set as follows:
Packet::Packet | ( | string | sa, |
string | da, | ||
int | sp, | ||
int | dp, | ||
int | oct, | ||
int | pkt | ||
) |
Constructor which accepts specification for sa(src_addr), da(dst_addr), sp(src_port), dp(dst_port), oct(octects) and pkt(packets)
sa | source address |
da | destination address |
sp | source port |
dp | destination port |
oct | octects |
pkt | packets |
string Packet::getDstAddr | ( | ) |
Getter for the destination addr.
string Packet::getDstPort | ( | ) |
Getter for the destination port.
string Packet::getPackets | ( | ) |
Getter for the packets.
string Packet::getSrcAddr | ( | ) |
Getter for the source addr.
string Packet::getSrcPort | ( | ) |
Getter for the source port.
void Packet::setDstAddr | ( | string | addr | ) |
Setter for the destination addr.
addr | destination address |
void Packet::setDstPort | ( | int | port | ) |
Setter for the destination port.
port | destination port |
void Packet::setPackets | ( | int | val | ) |
Setter for the packets value.
val | packets |
void Packet::setSrcAddr | ( | string | addr | ) |
Setter for the src_addr.
addr | source address |
void Packet::setSrcPort | ( | int | port | ) |
Setter for the source port.
port | source port |
|
private |
dst_addr destination address (direccion destino)
|
private |
dst_port destination port (puerto destino)
|
private |
enabled in the GUI (disponible en el GUI)
|
private |
octets/bytes value (octetos)
|
private |
packets value (paquetes)
|
private |
src_addr source address (direccion fuente)
|
private |
src_port source port (puerto fuente)