libtins  3.4
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Tins::TCPIP::StreamIdentifier Struct Reference

Uniquely identifies a stream. More...

#include <stream_identifier.h>

Public Types

typedef std::array< uint8_t, 16 > address_type
 

Public Member Functions

 StreamIdentifier ()
 
 StreamIdentifier (const address_type &client_addr, uint16_t client_port, const address_type &server_addr, uint16_t server_port)
 
bool operator< (const StreamIdentifier &rhs) const
 
bool operator== (const StreamIdentifier &rhs) const
 

Static Public Member Functions

static StreamIdentifier make_identifier (const PDU &packet)
 
static address_type serialize (IPv4Address address)
 
static address_type serialize (const IPv6Address &address)
 

Public Attributes

address_type min_address
 
address_type max_address
 
uint16_t min_address_port
 
uint16_t max_address_port
 

Detailed Description

Uniquely identifies a stream.

This struct is used to track TCP/UDP streams. It keeps track of minimum and maximum addresses/ports in a stream to match packets coming from any of the 2 endpoints into the same object.

This struct implements operator< so it can be used as a key on std::maps

Member Typedef Documentation

typedef std::array<uint8_t, 16> Tins::TCPIP::StreamIdentifier::address_type

The type used to store each endpoint's address

Constructor & Destructor Documentation

Tins::TCPIP::StreamIdentifier::StreamIdentifier ( )

Default constructor

Tins::TCPIP::StreamIdentifier::StreamIdentifier ( const address_type client_addr,
uint16_t  client_port,
const address_type server_addr,
uint16_t  server_port 
)

Constructs a StreamIdentifier

Parameters
client_addrClient's address
client_portPort's port
server_addrServer's address
server_portServer's port

Member Function Documentation

bool Tins::TCPIP::StreamIdentifier::operator< ( const StreamIdentifier rhs) const

Indicates whether this stream identifier is lower than rhs

bool Tins::TCPIP::StreamIdentifier::operator== ( const StreamIdentifier rhs) const

Compares this stream identifier for equality


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