simple-socket library 1.1.5

SocketUtils.h

Go to the documentation of this file.
00001 #ifndef NET_SocketUtils_h__
00002 #define NET_SocketUtils_h__
00003 
00004 #include <vector>
00005 #include <string>
00006 
00007 namespace NET
00008 {
00016     std::string resolveHostname( const std::string& hostname);
00017 
00025     unsigned short resolveService( const std::string& service, const std::string& protocol = "tcp");
00026 
00028     std::vector<std::string> getNetworkInterfaces();
00029 
00031     std::string getInterfaceAddress( const std::string& interface);
00032 
00034     void setInterfaceAddress( const std::string& interface, const std::string& address);
00035 
00037 
00045     std::string getBroadcastAddress( const std::string& interface);
00046 
00048     void setBroadcastAddress( const std::string& interface, const std::string& address);
00049 
00051     std::string getNetmask( const std::string& interface);
00052 
00054     void setNetmask( const std::string& interface, const std::string& address);
00055 
00057     std::string getDestinationAddress( const std::string& interface);
00058 
00060     void setDestinationAddress( const std::string& interface, const std::string& address);
00061 
00063     int getMTU( const std::string& interface);
00064 
00066     void setMTU( const std::string& interface, int mtu);
00067 
00069     std::string getHardwareAddress( const std::string& interface, char separationChar = ':');
00070 }
00071 #endif // NET_SocketUtils_h__