The FlowExpectation class is used to insert hints that can link future or predicted flows with older existing flows.
More...
#include "FlowExpectation.hpp"

Classes | |
| struct | Record |
Each flow tuple must map to a Record. More... | |
Public Types | |
| typedef std::map< FlowTuple, Record > | TupleRecordMap |
| Map a partial or full flow tuple to a flow expectation record. More... | |
Public Member Functions | |
| ~FlowExpectation (void) | |
| Destructor. More... | |
| FlowExpectation (void) | |
| Constructor. More... | |
| FlowTuple | get_matching_tuple (const PktInfo &info) const |
| Determine if a given packet (usually for a new TCP or UDP flow) has a matching expected flow record. More... | |
| FlowTuple | get_matching_tuple (const FlowTuple &tuple) const |
| Determine if a given tuple (usually for a new TCP or UDP flow) has a matching expected flow record. More... | |
| bool | find_and_apply_record_to_flow (Flow &flow, const FlowTuple &tuple) |
Find and apply apply the appropriate fields (such as related_hash and traffic_types) to flow if a matching record exists for the given tuple. More... | |
| void | add_record (Record record, const FlowTuple &tuple) |
Add (or replace) a record for flows matching tuple. More... | |
| std::size_t | remove_record (const FlowHash hash) |
| Remove records for a given parent flow. This is O(n) since the map is ordered by flow_tuple and not by flow hashes. More... | |
| Record | get_record (const PktInfo &info) const |
| Determine if a record exist, and return a copy. More... | |
| Record | get_record (const FlowTuple &tuple) const |
Public Attributes | |
| TupleRecordMap | tuple_record_map |
| Map of flow tuples (keys) and records (values). More... | |
The FlowExpectation class is used to insert hints that can link future or predicted flows with older existing flows.
| typedef std::map<FlowTuple, Record> Myra::FlowExpectation::TupleRecordMap |
Map a partial or full flow tuple to a flow expectation record.
| Myra::FlowExpectation::~FlowExpectation | ( | void | ) |
Destructor.
| Myra::FlowExpectation::FlowExpectation | ( | void | ) |
Constructor.
Add (or replace) a record for flows matching tuple.


| bool Myra::FlowExpectation::find_and_apply_record_to_flow | ( | Myra::Flow & | flow, |
| const FlowTuple & | tuple | ||
| ) |
Find and apply apply the appropriate fields (such as related_hash and traffic_types) to flow if a matching record exists for the given tuple.
true if a matching record was found. 

| Myra::FlowTuple Myra::FlowExpectation::get_matching_tuple | ( | const PktInfo & | info | ) | const |
Determine if a given packet (usually for a new TCP or UDP flow) has a matching expected flow record.


| Myra::FlowTuple Myra::FlowExpectation::get_matching_tuple | ( | const FlowTuple & | tuple | ) | const |
Determine if a given tuple (usually for a new TCP or UDP flow) has a matching expected flow record.

| Myra::FlowExpectation::Record Myra::FlowExpectation::get_record | ( | const PktInfo & | info | ) | const |
Determine if a record exist, and return a copy.
| Myra::FlowExpectation::Record Myra::FlowExpectation::get_record | ( | const FlowTuple & | tuple | ) | const |
| [in] | tuple | can be either a key into tuple_record_map or can be a flow tuple for which a matching record must be found. |

| size_t Myra::FlowExpectation::remove_record | ( | const FlowHash | hash | ) |
Remove records for a given parent flow. This is O(n) since the map is ordered by flow_tuple and not by flow hashes.
| TupleRecordMap Myra::FlowExpectation::tuple_record_map |
Map of flow tuples (keys) and records (values).