The ethernet_packet class contains function to change the ethernet information in bytes from the ethernet packet header to human readable data types (strings)
More...
#include <ethernet_packet.h>
|
string | mac2string (u_char[]) |
| Function to change the array of bytes representing a Hardware Address to its standard string representation. More...
|
|
The ethernet_packet class contains function to change the ethernet information in bytes from the ethernet packet header to human readable data types (strings)
string ethernet_packet::getEtherDHost |
( |
| ) |
|
Returns the destination HA in string format.
- Returns
- the destination HA in string format
string ethernet_packet::getEtherSHost |
( |
| ) |
|
Returns the source HA in string format.
- Returns
- the source HA in string format
u_short ethernet_packet::getEtherType |
( |
| ) |
|
Returns the Ethernet type.
- Returns
- the Ethernet type.
string ethernet_packet::mac2string |
( |
u_char |
srcmac[] | ) |
|
|
private |
Function to change the array of bytes representing a Hardware Address to its standard string representation.
- Parameters
-
srcmac | array with an Ethernet address |
- Returns
- Ethernet address in string format
void ethernet_packet::setEtherDHost |
( |
u_char |
dhost[] | ) |
|
Receives the array of 6 bytes of a destination host.
- Parameters
-
dhost | destination host Ethernet address |
void ethernet_packet::setEtherSHost |
( |
u_char |
shost[] | ) |
|
Receives the array of 6 bytes of a source host.
- Parameters
-
shost | source host Ethernet address |
void ethernet_packet::setEtherType |
( |
u_short |
type | ) |
|
Set the Ethernet type.
- Parameters
-
Ethernet header / encabezado Ethernet
The documentation for this class was generated from the following files: