X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finet6.h;h=cc33e764936e4dbaaa4df8311774f6132407bbff;hb=21c596567e3b6fd794ed6af73d304ce2bc70e58f;hp=f5a7079af2b55eaee5e0132167c84769d6e72d37;hpb=28e7bf7a13656620452e19d017ea5eedf14a8bc5;p=libs%2Fnet.git diff --git a/source/inet6.h b/source/inet6.h index f5a7079..cc33e76 100644 --- a/source/inet6.h +++ b/source/inet6.h @@ -1,12 +1,6 @@ #ifndef MSP_NET_INET6_H_ #define NSP_NET_INET6_H_ -#ifdef WIN32 -#include -#include -#else -#include -#endif #include "sockaddr.h" namespace Msp { @@ -15,25 +9,20 @@ namespace Net { class Inet6Addr: public SockAddr { private: -#ifdef WIN32 - typedef u_short in_port_t; -#endif - - in6_addr addr; - in_port_t port; + unsigned char addr[16]; + unsigned port; public: Inet6Addr(); - Inet6Addr(const sockaddr_in6 &); - Inet6Addr(unsigned char [16], in_port_t); + Inet6Addr(const SysAddr &); virtual Inet6Addr *copy() const { return new Inet6Addr(*this); } + virtual SysAddr to_sys() const; + virtual Family get_family() const { return INET6; } + unsigned get_port() const { return port; } virtual std::string str() const; - - virtual unsigned fill_sockaddr(sockaddr &) const; - virtual unsigned fill_sockaddr(sockaddr_storage &) const; }; } // namespace Net