mavtables  0.2.1
MAVLink router and firewall.
Classes | Functions
IPAddress.hpp File Reference
#include <ostream>
#include <stdexcept>
#include <string>
#include "DNSLookupError.hpp"
Include dependency graph for IPAddress.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  IPAddress
 

Functions

bool operator== (const IPAddress &lhs, const IPAddress &rhs)
 
bool operator!= (const IPAddress &lhs, const IPAddress &rhs)
 
bool operator< (const IPAddress &lhs, const IPAddress &rhs)
 
bool operator> (const IPAddress &lhs, const IPAddress &rhs)
 
bool operator<= (const IPAddress &lhs, const IPAddress &rhs)
 
bool operator>= (const IPAddress &lhs, const IPAddress &rhs)
 
std::ostream & operator<< (std::ostream &os, const IPAddress &ipaddress)
 
IPAddress dnslookup (const std::string &url)
 

Function Documentation

◆ dnslookup()

IPAddress dnslookup ( const std::string &  url)
related

◆ operator!=()

bool operator!= ( const IPAddress lhs,
const IPAddress rhs 
)
related

◆ operator<()

bool operator< ( const IPAddress lhs,
const IPAddress rhs 
)
related

◆ operator<<()

std::ostream& operator<< ( std::ostream &  os,
const IPAddress ipaddress 
)

Print the IP address to the given output stream.

The format is "<IP Address>" or "<IP Address>:<Port Number>" if the port number is nonzero an "<IP Address>" if the port is 0.

Some examples are:

  • 127.0.0.1
  • 127.0.0.1:14555
  • 183.125.120.42:443
Note
The string constructor IPAddress(std::string) and the output stream operator are inverses and thus:
std::string addr = "127.0.0.1:14555"
str(IPAddress(addr)) == addr
Parameters
osThe output stream to print to.
ipaddressThe IP address to print.
Returns
The output stream.

Definition at line 340 of file IPAddress.cpp.

References to_bytes().

Here is the call graph for this function:

◆ operator<=()

bool operator<= ( const IPAddress lhs,
const IPAddress rhs 
)
related

◆ operator==()

bool operator== ( const IPAddress lhs,
const IPAddress rhs 
)
related

◆ operator>()

bool operator> ( const IPAddress lhs,
const IPAddress rhs 
)
related

◆ operator>=()

bool operator>= ( const IPAddress lhs,
const IPAddress rhs 
)
related