The ip_packet class contains the information extracted from a packet received using pcap for packets that are IP/TCP or IP/UDP. We only save src and dst addresses and ports, and type of Transport protocol. The class hinerates the fields hardware address field because every IP packet is part of a ethernet packet. The remaining packet is stored as payload.
Más...
#include <ip_packet.h>
The ip_packet class contains the information extracted from a packet received using pcap for packets that are IP/TCP or IP/UDP. We only save src and dst addresses and ports, and type of Transport protocol. The class hinerates the fields hardware address field because every IP packet is part of a ethernet packet. The remaining packet is stored as payload.
string ip_packet::getIPDAddress |
( |
| ) |
|
Devuelve la dirección IP destino.
- Devuelve
- la direccion IP destino
char ip_packet::getIPProto |
( |
| ) |
|
Devuelve el tipo de protocolo IP.
- Devuelve
- el protocolo IP
string ip_packet::getIPSAddress |
( |
| ) |
|
Devuelve la dirección IP fuente.
- Devuelve
- la direccion IP fuente
string ip_packet::getPayload |
( |
| ) |
|
Devuelve la carga del paquete de IP.
- Devuelve
- la carga del paquete de IP
void ip_packet::setIPDAddress |
( |
string |
addr | ) |
|
Guarda la direccion IP destino en formato de cadena de caracteres.
- Parámetros
-
void ip_packet::setIPDPort |
( |
unsigned short |
port | ) |
|
Guarda el puerto destino.
- Parámetros
-
void ip_packet::setIPProto |
( |
char |
proto | ) |
|
Guarda el protocolo de IP a (TCP|UDP)
- Parámetros
-
proto | numero de protocolo (6 | 17) |
void ip_packet::setIPSAddress |
( |
string |
addr | ) |
|
Guarda la direccion IP fuente en formato de cadena de caracteres.
- Parámetros
-
void ip_packet::setIPSPort |
( |
unsigned short |
port | ) |
|
Guarda el puerto fuente.
- Parámetros
-
void ip_packet::setPayload |
( |
char * |
pl, |
|
|
int |
len |
|
) |
| |
Guarda la carga del paquete de una cadena de caracteres a un string.
- Parámetros
-
pl | la carga del paquete |
len | el largo del paquete |
unsigned short ip_packet::d_port |
|
private |
destination port / puerto destino
source and dest address / direccion fuente y destino
type of transport protocol (TCP|UDP) | tipo de protocolo de transporte (TCP|UDP)
string ip_packet::payload |
|
private |
Data payload (content of the packet) / carga del paquete
unsigned short ip_packet::s_port |
|
private |
source port / puerto fuente
La documentación para esta clase fue generada a partir de los siguientes ficheros: