aboutsummaryrefslogtreecommitdiff
path: root/dep/include/sockets/Ipv6Address.h
diff options
context:
space:
mode:
Diffstat (limited to 'dep/include/sockets/Ipv6Address.h')
-rw-r--r--dep/include/sockets/Ipv6Address.h104
1 files changed, 52 insertions, 52 deletions
diff --git a/dep/include/sockets/Ipv6Address.h b/dep/include/sockets/Ipv6Address.h
index a0711417956..a3b24b0b092 100644
--- a/dep/include/sockets/Ipv6Address.h
+++ b/dep/include/sockets/Ipv6Address.h
@@ -1,7 +1,7 @@
/**
- ** \file Ipv6Address.h
- ** \date 2006-09-21
- ** \author grymse@alhem.net
+ ** \file Ipv6Address.h
+ ** \date 2006-09-21
+ ** \author grymse@alhem.net
**/
/*
Copyright (C) 2007 Anders Hedstrom
@@ -37,62 +37,62 @@ namespace SOCKETS_NAMESPACE {
/** Ipv6 address implementation.
- \ingroup basic */
+ \ingroup basic */
class Ipv6Address : public SocketAddress
{
public:
- /** Create empty Ipv6 address structure.
- \param port Port number */
- Ipv6Address(port_t port = 0);
- /** Create Ipv6 address structure.
- \param a Socket address in network byte order
- \param port Port number in host byte order */
- Ipv6Address(struct in6_addr& a,port_t port);
- /** Create Ipv6 address structure.
- \param host Hostname to be resolved
- \param port Port number in host byte order */
- Ipv6Address(const std::string& host,port_t port);
- Ipv6Address(struct sockaddr_in6&);
- ~Ipv6Address();
-
- // SocketAddress implementation
-
- operator struct sockaddr *();
- operator socklen_t();
- bool operator==(SocketAddress&);
-
- void SetPort(port_t port);
- port_t GetPort();
-
- void SetAddress(struct sockaddr *sa);
- int GetFamily();
-
- bool IsValid();
- std::auto_ptr<SocketAddress> GetCopy();
-
- /** Convert address struct to text. */
- std::string Convert(bool include_port = false);
- std::string Reverse();
-
- /** Resolve hostname. */
-static bool Resolve(const std::string& hostname,struct in6_addr& a);
- /** Reverse resolve (IP to hostname). */
-static bool Reverse(struct in6_addr& a,std::string& name);
- /** Convert address struct to text. */
-static std::string Convert(struct in6_addr& a,bool mixed = false);
-
- void SetFlowinfo(uint32_t);
- uint32_t GetFlowinfo();
+ /** Create empty Ipv6 address structure.
+ \param port Port number */
+ Ipv6Address(port_t port = 0);
+ /** Create Ipv6 address structure.
+ \param a Socket address in network byte order
+ \param port Port number in host byte order */
+ Ipv6Address(struct in6_addr& a,port_t port);
+ /** Create Ipv6 address structure.
+ \param host Hostname to be resolved
+ \param port Port number in host byte order */
+ Ipv6Address(const std::string& host,port_t port);
+ Ipv6Address(struct sockaddr_in6&);
+ ~Ipv6Address();
+
+ // SocketAddress implementation
+
+ operator struct sockaddr *();
+ operator socklen_t();
+ bool operator==(SocketAddress&);
+
+ void SetPort(port_t port);
+ port_t GetPort();
+
+ void SetAddress(struct sockaddr *sa);
+ int GetFamily();
+
+ bool IsValid();
+ std::auto_ptr<SocketAddress> GetCopy();
+
+ /** Convert address struct to text. */
+ std::string Convert(bool include_port = false);
+ std::string Reverse();
+
+ /** Resolve hostname. */
+static bool Resolve(const std::string& hostname,struct in6_addr& a);
+ /** Reverse resolve (IP to hostname). */
+static bool Reverse(struct in6_addr& a,std::string& name);
+ /** Convert address struct to text. */
+static std::string Convert(struct in6_addr& a,bool mixed = false);
+
+ void SetFlowinfo(uint32_t);
+ uint32_t GetFlowinfo();
#ifndef _WIN32
- void SetScopeId(uint32_t);
- uint32_t GetScopeId();
+ void SetScopeId(uint32_t);
+ uint32_t GetScopeId();
#endif
private:
- Ipv6Address(const Ipv6Address& ) {} // copy constructor
- Ipv6Address& operator=(const Ipv6Address& ) { return *this; } // assignment operator
- struct sockaddr_in6 m_addr;
- bool m_valid;
+ Ipv6Address(const Ipv6Address& ) {} // copy constructor
+ Ipv6Address& operator=(const Ipv6Address& ) { return *this; } // assignment operator
+ struct sockaddr_in6 m_addr;
+ bool m_valid;
};