TraveSim Adapters  0.1
Protobuf adapters for TraveSim project
configurers_utils.hpp File Reference

Configurers utilitary funtions. More...

#include <string>
#include <sstream>
Include dependency graph for configurers_utils.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 travesim
 

Macros

#define MIN_UNICAST_ADDRESS   "127.0.0.0"
 
#define MAX_UNICAST_ADDRESS   "127.255.255.255"
 
#define MIN_MULTICAST_ADDRESS   "224.0.0.0"
 
#define MAX_MULTICAST_ADDRESS   "239.255.255.255"
 
#define INVALID_ADDRESS   "0.0.0.0"
 

Enumerations

enum  travesim::IPValidation { travesim::VALID, travesim::INVALID_FORMAT, travesim::INVALID_NUMBERS, travesim::OUT_OF_RANGE }
 Type used to validate a IP string. More...
 

Functions

bool travesim::ipv4_string_to_uint (std::string ip_string, uint *ip_uint)
 Converts a IPv4 in a string to a array of unsigned integers, where the most significant byte of the IP address is in the position 0 and the last significant in the position 3. More...
 
IPValidation travesim::check_valid_ip (std::string ip, std::string min_ip, std::string max_ip)
 Checks if a IP is valid and is in the specified range. More...
 
std::string travesim::get_error_msg (IPValidation error)
 Get the error msg based on the validation type. More...
 

Detailed Description

Configurers utilitary funtions.

Author
Lucas Haug lucas.nosp@m..hau.nosp@m.g@thu.nosp@m.nera.nosp@m.tz.or.nosp@m.g
Date
06/2021

Definition in file configurers_utils.hpp.

Macro Definition Documentation

◆ INVALID_ADDRESS

#define INVALID_ADDRESS   "0.0.0.0"

Definition at line 27 of file configurers_utils.hpp.

◆ MAX_MULTICAST_ADDRESS

#define MAX_MULTICAST_ADDRESS   "239.255.255.255"

Definition at line 25 of file configurers_utils.hpp.

◆ MAX_UNICAST_ADDRESS

#define MAX_UNICAST_ADDRESS   "127.255.255.255"

Definition at line 22 of file configurers_utils.hpp.

◆ MIN_MULTICAST_ADDRESS

#define MIN_MULTICAST_ADDRESS   "224.0.0.0"

Definition at line 24 of file configurers_utils.hpp.

◆ MIN_UNICAST_ADDRESS

#define MIN_UNICAST_ADDRESS   "127.0.0.0"

Definition at line 21 of file configurers_utils.hpp.