Myra Canyon  v0.0.1-768
network control
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Myra::FlowTuple Class Referencefinal

A 5-tuple used to identify a network flow. More...

#include "FlowTuple.hpp"

Collaboration diagram for Myra::FlowTuple:

Public Member Functions

 ~FlowTuple (void)
 Destructor. More...
 
FlowTupleclear (void)
 Clear the tuple. More...
 
bool is_a_partial_match_for (const FlowTuple &rhs) const
 Determine if this tuple matches rhs. More...
 
FlowTuplemodify_ports (const std::string &str, const PORT port1, const PORT port2=0)
 Modify one of the AddrPort to give it a different port. More...
 
FlowTuplemodify_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...
 

Detailed Description

A 5-tuple used to identify a network flow.

Constructor & Destructor Documentation

Myra::FlowTuple::~FlowTuple ( void  )

Destructor.

Myra::FlowTuple::FlowTuple ( void  )

Constructor.

Myra::FlowTuple::FlowTuple ( const Myra::PktInfo info)

Constructor.

Here is the call graph for this function:

Member Function Documentation

Myra::FlowTuple & Myra::FlowTuple::clear ( void  )

Clear the tuple.

Here is the call graph for this function:

Here is the caller graph for this function:

bool Myra::FlowTuple::empty ( void  ) const

Determine if the flow tuple is empty.

See also
Myra::FlowTuple::clear()

Here is the caller graph for this function:

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.

Here is the caller graph for this function:

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.

Here is the call graph for this function:

Here is the caller graph for this function:

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.

bool Myra::FlowTuple::operator!= ( const FlowTuple rhs) const
inline

Comparison operator.

bool Myra::FlowTuple::operator< ( const FlowTuple rhs) const
inline

Comparison operator.

bool Myra::FlowTuple::operator<= ( const FlowTuple rhs) const
inline

Comparison operator.

bool Myra::FlowTuple::operator== ( const FlowTuple rhs) const
inline

Comparison operator.

bool Myra::FlowTuple::operator> ( const FlowTuple rhs) const
inline

Comparison operator.

Here is the caller graph for this function:

bool Myra::FlowTuple::operator>= ( const FlowTuple rhs) const
inline

Comparison operator.

Here is the call graph for this function:

std::string Myra::FlowTuple::to_string ( void  ) const

Format the object as a text string (for debug purposes).

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

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.


The documentation for this class was generated from the following files: