NetSim 1.0.0
An educational network simulation software for students
Loading...
Searching...
No Matches
Public Member Functions | List of all members
NetSim::NATEntry Class Reference

Represents an entry in the NAT table with an IP address and associated port. More...

#include <natentry.h>

Public Member Functions

 NATEntry (const IPAddress &address, const Port &port)
 Constructs a NATEntry with a specified IP address and port.
 
 NATEntry ()=default
 Default constructor.
 
Port port () const
 Retrieves the port associated with this NAT entry.
 
IPAddress address () const
 Retrieves the IP address associated with this NAT entry.
 
bool operator< (const NATEntry &entry) const
 Compares two NAT entries based on their port numbers.
 

Detailed Description

Represents an entry in the NAT table with an IP address and associated port.

The NATEntry class is a data structure representing a NAT table entry. It associates an IP address with a specific port and provides utility functions to access and compare them.

Constructor & Destructor Documentation

◆ NATEntry() [1/2]

NATEntry::NATEntry ( const IPAddress address,
const Port port 
)

Constructs a NATEntry with a specified IP address and port.

Parameters
addressThe IP address associated with this NAT entry.
portThe port associated with this NAT entry.
Here is the call graph for this function:

◆ NATEntry() [2/2]

NetSim::NATEntry::NATEntry ( )
default

Default constructor.

Member Function Documentation

◆ address()

IPAddress NATEntry::address ( ) const

Retrieves the IP address associated with this NAT entry.

Here is the caller graph for this function:

◆ operator<()

bool NATEntry::operator< ( const NATEntry entry) const

Compares two NAT entries based on their port numbers.

Parameters
entryThe NAT entry to compare with.
Returns
True if the current entry's port number is less than the provided entry's port number.
Here is the call graph for this function:

◆ port()

Port NATEntry::port ( ) const

Retrieves the port associated with this NAT entry.

Here is the caller graph for this function:

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