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
411 PortRange(WORD basePort = 0, WORD maxPort = 0);
417 unsigned dfltRange = 0,
418 unsigned dfltBase = 0
435 unsigned queueSize = 5,
440 PINDEX numSockets = 1,
442 unsigned queueSize = 5,
505 unsigned queueSize = 5,
512 unsigned queueSize = 5,
600 AddressAndPort & addr
618 AddressAndPort & addr
664 void PrintOn(ostream & strm)
const;
695 virtual void Cancel() = 0;
767 InterfaceTable & table,
787 const char * ifName = NULL
874 QoS(QoSType type = BestEffortQoS);
883 Flow() { memset(
this, 0,
sizeof(*
this)); }
909 #include "msos/ptlib/ipsock.h"
911 #include "unix/ptlib/ipsock.h"
925 operator sockaddr*()
const {
return addr; }
932 void Construct(
const Address & ip, WORD port);
934 sockaddr_storage storage;
940 sockaddr_in6 * addr6;
953 #endif // PTLIB_IPSOCKET_H