34 #ifndef PTLIB_IPSOCKET_H
35 #define PTLIB_IPSOCKET_H
78 Address(PINDEX len,
const BYTE * bytes,
int scope = 0);
81 Address(BYTE b1, BYTE b2, BYTE b3, BYTE b4);
92 Address(
const in6_addr & addr,
int scope);
97 Address(
const int ai_family,
const int ai_addrlen,
struct sockaddr *ai_addr);
99 #ifdef __NUCLEUS_NET__
100 Address(
const struct id_struct & addr);
109 Address & AssignIPV6(
const in6_addr & addr,
int scope);
127 bool EqualIPV6(in6_addr & addr,
int scope)
const;
128 bool NotEqualIPV6(in6_addr & addr,
int scope)
const {
return !EqualIPV6(addr, scope); }
163 bool bracketIPv6 =
false,
164 bool excludeScope =
false
176 operator in_addr()
const;
180 operator in6_addr()
const;
182 int GetIPV6Scope()
const {
return m_scope6; }
186 operator DWORD()
const;
238 bool IsV4Mapped()
const;
241 bool IsLinkLocal()
const;
244 bool IsSiteLocal()
const;
288 WORD defaultPort = 0,
289 char separator =
':',
290 const char * proto = NULL
294 WORD defaultPort = 0,
298 struct sockaddr *ai_addr,
304 WORD defaultPort = 0,
305 char separator =
':',
306 const char * proto = NULL
376 static void SetDefaultIpAddressFamilyV6();
377 static PBoolean IsIpAddressFamilyV6Supported();
401 int ipAdressFamily=PF_INET
454 unsigned queueSize = 5,
461 unsigned queueSize = 5,
615 void PrintOn(ostream & strm)
const;
646 virtual void Cancel() = 0;
718 InterfaceTable & table,
819 QoS(QoSType type = BestEffortQoS);
828 Flow() { memset(
this, 0,
sizeof(*
this)); }
854 #include "msos/ptlib/ipsock.h"
856 #include "unix/ptlib/ipsock.h"
870 operator sockaddr*()
const {
return addr; }
877 void Construct(
const Address & ip, WORD port);
879 sockaddr_storage storage;
885 sockaddr_in6 * addr6;
898 #endif // PTLIB_IPSOCKET_H