i2pd/util.h

34 lines
520 B
C
Raw Normal View History

2014-01-30 07:28:07 +04:00
#ifndef UTIL_H
#define UTIL_H
#include <map>
#include <string>
2014-12-23 05:20:39 +03:00
#include <iostream>
2014-10-31 21:17:52 +03:00
#include <boost/asio.hpp>
#ifdef ANDROID
#include <boost/lexical_cast.hpp>
namespace std
{
template <typename T>
std::string to_string(T value)
{
return boost::lexical_cast<std::string>(value);
}
}
#endif
2014-01-30 07:28:07 +04:00
namespace i2p
{
namespace util
{
2014-10-31 21:17:52 +03:00
namespace net
{
int GetMTU (const boost::asio::ip::address& localAddress);
2016-06-29 18:06:51 +03:00
const boost::asio::ip::address GetInterfaceAddress(const std::string & ifname, bool ipv6=false);
2014-10-31 21:17:52 +03:00
}
2014-01-30 07:28:07 +04:00
}
}
#endif