34 #ifndef PTLIB_IPSOCKET_H
35 #define PTLIB_IPSOCKET_H
45 #ifdef P_KNOCKOUT_WINSOCK2
47 #endif // KNOCKOUT_WINSOCK2
89 Address(PINDEX len,
const BYTE * bytes);
92 Address(BYTE b1, BYTE b2, BYTE b3, BYTE b4);
102 Address(
const in6_addr & addr);
107 Address(
const int ai_family,
const int ai_addrlen,
struct sockaddr *ai_addr);
109 #ifdef __NUCLEUS_NET__
110 Address(
const struct id_struct & addr);
170 bool bracketIPv6 =
false
182 operator in_addr()
const;
186 operator in6_addr()
const;
190 operator DWORD()
const;
289 static void SetDefaultIpAddressFamilyV6();
290 static PBoolean IsIpAddressFamilyV6Supported();
292 static void SetDefaultV6ScopeId(
int scopeId);
293 static int GetDefaultV6ScopeId();
300 int ipAdressFamily=PF_INET
353 unsigned queueSize = 5,
359 unsigned queueSize = 5,
545 static unsigned AsNumeric(
Address addr);
611 virtual void Cancel() = 0;
673 InterfaceTable & table,
690 {
if (!
SetOption(IP_PKTINFO, 1, SOL_IP))
return false; catchReceiveToAddr =
true;
return true; }
695 {
return lastReceiveToAddr; }
698 void SetLastReceiveAddr(
void * addr,
int addrLen)
699 {
if (addrLen ==
sizeof(in_addr)) lastReceiveToAddr = *(in_addr *)addr; }
721 #include "msos/ptlib/ipsock.h"
723 #include "unix/ptlib/ipsock.h"
773 #endif // PTLIB_IPSOCKET_H