otsdaq  v2_05_02_indev
NetworkConverters.h
1 #ifndef _ots_NetworkConverters_h_
2 #define _ots_NetworkConverters_h_
3 
4 #include <stdint.h>
5 #include <string>
6 
7 namespace ots
8 {
10 {
11  public:
12  NetworkConverters(void);
13  ~NetworkConverters(void);
14 
15  static std::string nameToStringIP(const std::string& value);
16  static std::string stringToNameIP(const std::string& value);
17  static uint32_t stringToNetworkIP(const std::string& value);
18  static std::string networkToStringIP(uint32_t value);
19  static uint32_t stringToUnsignedIP(const std::string& value);
20  static std::string unsignedToStringIP(uint32_t value);
21  static uint32_t unsignedToNetworkIP(uint32_t value);
22  static uint32_t networkToUnsignedIP(uint32_t value);
23 
24  static uint16_t stringToNetworkPort(const std::string& value);
25  static std::string networkToStringPort(uint16_t value);
26  static uint16_t stringToUnsignedPort(const std::string& value);
27  static std::string unsignedToStringPort(uint16_t value);
28  static uint16_t unsignedToNetworkPort(uint16_t value);
29  static uint16_t networkToUnsignedPort(uint16_t value);
30 };
31 
32 } // namespace ots
33 
34 #endif