simple-socket library 1.5.0
Loading...
Searching...
No Matches
SocketUtils.h
1#ifndef NET_SocketUtils_h__
2#define NET_SocketUtils_h__
3
4#include <cstdint>
5#include <vector>
6#include <string>
7
8namespace NET
9{
17 std::string resolveHostname( const std::string& hostname);
18
28 uint16_t resolveService( const std::string& service, const std::string& protocol = "tcp");
29
31 std::vector<std::string> getNetworkInterfaces();
32
34
38 std::string getInterfaceAddress( std::string_view interface);
39
41
45 void setInterfaceAddress( std::string_view interface, std::string_view address);
46
48
59 std::string getBroadcastAddress( std::string_view interface);
60
62
69 void setBroadcastAddress( std::string_view interface, std::string_view address);
70
72
78 std::string getNetmask( std::string_view interface);
79
81
88 void setNetmask( std::string_view interface, std::string_view address);
89
91
97 std::string getDestinationAddress( std::string_view interface);
98
100
107 void setDestinationAddress( std::string_view interface, std::string_view address);
108
110
115 int getMTU( std::string_view interface);
116
118
124 void setMTU( std::string_view interface, int mtu);
125
127
132 std::string getHardwareAddress( std::string_view interface);
133}
134#endif // NET_SocketUtils_h__