summaryrefslogtreecommitdiffstats
path: root/libtorrent/include/libtorrent/socket.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'libtorrent/include/libtorrent/socket.hpp')
-rw-r--r--libtorrent/include/libtorrent/socket.hpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/libtorrent/include/libtorrent/socket.hpp b/libtorrent/include/libtorrent/socket.hpp
index d4cc9bdb0..98f5d8151 100644
--- a/libtorrent/include/libtorrent/socket.hpp
+++ b/libtorrent/include/libtorrent/socket.hpp
@@ -213,6 +213,22 @@ namespace libtorrent
int m_value;
};
+#ifdef TORRENT_WINDOWS
+ struct v6_protection_level
+ {
+ v6_protection_level(int level): m_value(level) {}
+ template<class Protocol>
+ int level(Protocol const&) const { return IPPROTO_IPV6; }
+ template<class Protocol>
+ int name(Protocol const&) const { return IPV6_PROTECTION_LEVEL; }
+ template<class Protocol>
+ int const* data(Protocol const&) const { return &m_value; }
+ template<class Protocol>
+ size_t size(Protocol const&) const { return sizeof(m_value); }
+ int m_value;
+ };
+#endif
+
struct type_of_service
{
type_of_service(char val): m_value(val) {}