A 5-tuple used to identify a network flow. More...
#include "FlowTuple.hpp"
Public Member Functions | |
~FlowTuple (void) | |
Destructor. More... | |
FlowTuple & | clear (void) |
Clear the tuple. More... | |
bool | is_a_partial_match_for (const FlowTuple &rhs) const |
Determine if this tuple matches rhs . More... | |
FlowTuple & | modify_ports (const std::string &str, const PORT port1, const PORT port2=0) |
Modify one of the AddrPort to give it a different port. More... | |
FlowTuple & | modify_ports (const IPv4_ADDR addr, const PORT port1, const PORT port2=0) |
Modify one of the AddrPort to give it a different port. More... | |
std::string | to_string (void) const |
Format the object as a text string (for debug purposes). More... | |
bool | empty (void) const |
Determine if the flow tuple is empty. More... | |
FlowTuple (void) | |
Constructor. More... | |
FlowTuple (const Myra::PktInfo &info) | |
Constructor. More... | |
bool | operator< (const FlowTuple &rhs) const |
Comparison operator. More... | |
bool | operator> (const FlowTuple &rhs) const |
Comparison operator. More... | |
bool | operator<= (const FlowTuple &rhs) const |
Comparison operator. More... | |
bool | operator>= (const FlowTuple &rhs) const |
Comparison operator. More... | |
bool | operator== (const FlowTuple &rhs) const |
Comparison operator. More... | |
bool | operator!= (const FlowTuple &rhs) const |
Comparison operator. More... | |
Public Attributes | |
L3_IP::Protocol | protocol |
E.g., TCP or UDP . More... | |
AddrPort | addr_port [2] |
Addresses and ports (in network byte order) which combined with protocol makes up the tuple. More... | |
A 5-tuple used to identify a network flow.
Myra::FlowTuple::~FlowTuple | ( | void | ) |
Destructor.
Myra::FlowTuple::FlowTuple | ( | void | ) |
Constructor.
Myra::FlowTuple::FlowTuple | ( | const Myra::PktInfo & | info | ) |
Constructor.
Myra::FlowTuple & Myra::FlowTuple::clear | ( | void | ) |
Clear the tuple.
bool Myra::FlowTuple::empty | ( | void | ) | const |
Determine if the flow tuple is empty.
bool Myra::FlowTuple::is_a_partial_match_for | ( | const FlowTuple & | rhs | ) | const |
Determine if this tuple matches rhs
.
Address and port fields that are set to zero in lhs
are ignored when trying to match.
Myra::FlowTuple & Myra::FlowTuple::modify_ports | ( | const std::string & | str, |
const PORT | port1, | ||
const PORT | port2 = 0 |
||
) |
Modify one of the AddrPort to give it a different port.
The port number in this case is in host byte order and will need to be converted to network byte order. The address provided must match exactly one of the addr_port
addresses, otherwise there is no way to know which port needs to be modified.
Myra::FlowTuple & Myra::FlowTuple::modify_ports | ( | const IPv4_ADDR | addr, |
const PORT | port1, | ||
const PORT | port2 = 0 |
||
) |
Modify one of the AddrPort to give it a different port.
Both the address and port number in this case are already in network byte order. The address provided must match exactly one of the addr_port
addresses, otherwise there is no way to know which port needs to be modified.
|
inline |
Comparison operator.
|
inline |
Comparison operator.
|
inline |
Comparison operator.
|
inline |
Comparison operator.
|
inline |
Comparison operator.
|
inline |
Comparison operator.
std::string Myra::FlowTuple::to_string | ( | void | ) | const |
Format the object as a text string (for debug purposes).
AddrPort Myra::FlowTuple::addr_port[2] |
Addresses and ports (in network byte order) which combined with protocol makes up the tuple.
L3_IP::Protocol Myra::FlowTuple::protocol |
E.g., TCP
or UDP
.