experimental IPv6 implementation (patch 1771429)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50061 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -163,7 +163,24 @@ GSocketError GAddress_INET_GetHostName(GAddress *address, char *hostname,
|
||||
unsigned long GAddress_INET_GetHostAddress(GAddress *address);
|
||||
unsigned short GAddress_INET_GetPort(GAddress *address);
|
||||
|
||||
/* TODO: Define specific parts (INET6, UNIX) */
|
||||
#if wxUSE_IPV6
|
||||
|
||||
GSocketError GAddress_INET6_SetHostName(GAddress *address, const char *hostname);
|
||||
GSocketError GAddress_INET6_SetAnyAddress(GAddress *address);
|
||||
GSocketError GAddress_INET6_SetHostAddress(GAddress *address,
|
||||
struct in6_addr hostaddr);
|
||||
GSocketError GAddress_INET6_SetPortName(GAddress *address, const char *port,
|
||||
const char *protocol);
|
||||
GSocketError GAddress_INET6_SetPort(GAddress *address, unsigned short port);
|
||||
|
||||
GSocketError GAddress_INET6_GetHostName(GAddress *address, char *hostname,
|
||||
size_t sbuf);
|
||||
GSocketError GAddress_INET6_GetHostAddress(GAddress *address,struct in6_addr *hostaddr);
|
||||
unsigned short GAddress_INET6_GetPort(GAddress *address);
|
||||
|
||||
#endif // wxUSE_IPV6
|
||||
|
||||
/* TODO: Define specific parts (UNIX) */
|
||||
|
||||
GSocketError GAddress_UNIX_SetPath(GAddress *address, const char *path);
|
||||
GSocketError GAddress_UNIX_GetPath(GAddress *address, char *path, size_t sbuf);
|
||||
|
@@ -148,29 +148,15 @@
|
||||
// Unicode support
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// Set wxUSE_UNICODE to 1 to compile wxWidgets in Unicode mode: wxChar will be
|
||||
// defined as wchar_t, wxString will use Unicode internally. If you set this
|
||||
// to 1, you must use wxT() macro for all literal strings in the program.
|
||||
//
|
||||
// Unicode is currently only fully supported under Windows NT/2000/XP
|
||||
// (Windows 9x doesn't support it and the programs compiled in Unicode mode
|
||||
// will not run under 9x -- but see wxUSE_UNICODE_MSLU below).
|
||||
//
|
||||
// Default is 0 (but only because of makefiles)
|
||||
//
|
||||
// Recommended setting: 1
|
||||
// These settings are obsolete: the library is always built in Unicode mode
|
||||
// now, only set wxUSE_UNICODE to 0 to compile legacy code in ANSI mode if
|
||||
// absolutely necessary -- updating it is strongly recommended as the ANSI mode
|
||||
// will disappear completely in future wxWidgets releases.
|
||||
#ifndef wxUSE_UNICODE
|
||||
#define wxUSE_UNICODE 0
|
||||
#define wxUSE_UNICODE 1
|
||||
#endif
|
||||
|
||||
// Setting wxUSE_WCHAR_T to 1 gives you some degree of Unicode support without
|
||||
// compiling the program in Unicode mode. More precisely, it will be possible
|
||||
// to construct wxString from a wide (Unicode) string and convert any wxString
|
||||
// to Unicode.
|
||||
//
|
||||
// Default is 1
|
||||
//
|
||||
// Recommended setting: 1
|
||||
// wxUSE_WCHAR_T is required by wxWidgets now, don't change.
|
||||
#define wxUSE_WCHAR_T 1
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -455,6 +441,17 @@
|
||||
// Set to 1 to use socket classes
|
||||
#define wxUSE_SOCKETS 1
|
||||
|
||||
// Set to 1 to use ipv6 socket classes (requires wxUSE_SOCKETS)
|
||||
//
|
||||
// Notice that currently setting this option under Windows will result in
|
||||
// programs which can only run on recent OS versions (with ws2_32.dll
|
||||
// installed) which is why it is disabled by default.
|
||||
//
|
||||
// Default is 1.
|
||||
//
|
||||
// Recommended setting: 1 if you need IPv6 support
|
||||
#define wxUSE_IPV6 0
|
||||
|
||||
// Set to 1 to enable virtual file systems (required by wxHTML)
|
||||
#define wxUSE_FILESYSTEM 1
|
||||
|
||||
|
@@ -147,29 +147,15 @@
|
||||
// Unicode support
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// Set wxUSE_UNICODE to 1 to compile wxWidgets in Unicode mode: wxChar will be
|
||||
// defined as wchar_t, wxString will use Unicode internally. If you set this
|
||||
// to 1, you must use wxT() macro for all literal strings in the program.
|
||||
//
|
||||
// Unicode is currently only fully supported under Windows NT/2000/XP
|
||||
// (Windows 9x doesn't support it and the programs compiled in Unicode mode
|
||||
// will not run under 9x -- but see wxUSE_UNICODE_MSLU below).
|
||||
//
|
||||
// Default is 0 (but only because of makefiles)
|
||||
//
|
||||
// Recommended setting: 1
|
||||
// These settings are obsolete: the library is always built in Unicode mode
|
||||
// now, only set wxUSE_UNICODE to 0 to compile legacy code in ANSI mode if
|
||||
// absolutely necessary -- updating it is strongly recommended as the ANSI mode
|
||||
// will disappear completely in future wxWidgets releases.
|
||||
#ifndef wxUSE_UNICODE
|
||||
#define wxUSE_UNICODE 0
|
||||
#define wxUSE_UNICODE 1
|
||||
#endif
|
||||
|
||||
// Setting wxUSE_WCHAR_T to 1 gives you some degree of Unicode support without
|
||||
// compiling the program in Unicode mode. More precisely, it will be possible
|
||||
// to construct wxString from a wide (Unicode) string and convert any wxString
|
||||
// to Unicode.
|
||||
//
|
||||
// Default is 1
|
||||
//
|
||||
// Recommended setting: 1
|
||||
// wxUSE_WCHAR_T is required by wxWidgets now, don't change.
|
||||
#define wxUSE_WCHAR_T 1
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -454,6 +440,17 @@
|
||||
// Set to 1 to use socket classes
|
||||
#define wxUSE_SOCKETS 1
|
||||
|
||||
// Set to 1 to use ipv6 socket classes (requires wxUSE_SOCKETS)
|
||||
//
|
||||
// Notice that currently setting this option under Windows will result in
|
||||
// programs which can only run on recent OS versions (with ws2_32.dll
|
||||
// installed) which is why it is disabled by default.
|
||||
//
|
||||
// Default is 1.
|
||||
//
|
||||
// Recommended setting: 1 if you need IPv6 support
|
||||
#define wxUSE_IPV6 0
|
||||
|
||||
// Set to 1 to enable virtual file systems (required by wxHTML)
|
||||
#define wxUSE_FILESYSTEM 1
|
||||
|
||||
|
@@ -147,29 +147,15 @@
|
||||
// Unicode support
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// Set wxUSE_UNICODE to 1 to compile wxWidgets in Unicode mode: wxChar will be
|
||||
// defined as wchar_t, wxString will use Unicode internally. If you set this
|
||||
// to 1, you must use wxT() macro for all literal strings in the program.
|
||||
//
|
||||
// Unicode is currently only fully supported under Windows NT/2000/XP
|
||||
// (Windows 9x doesn't support it and the programs compiled in Unicode mode
|
||||
// will not run under 9x -- but see wxUSE_UNICODE_MSLU below).
|
||||
//
|
||||
// Default is 0 (but only because of makefiles)
|
||||
//
|
||||
// Recommended setting: 1
|
||||
// These settings are obsolete: the library is always built in Unicode mode
|
||||
// now, only set wxUSE_UNICODE to 0 to compile legacy code in ANSI mode if
|
||||
// absolutely necessary -- updating it is strongly recommended as the ANSI mode
|
||||
// will disappear completely in future wxWidgets releases.
|
||||
#ifndef wxUSE_UNICODE
|
||||
#define wxUSE_UNICODE 0
|
||||
#define wxUSE_UNICODE 1
|
||||
#endif
|
||||
|
||||
// Setting wxUSE_WCHAR_T to 1 gives you some degree of Unicode support without
|
||||
// compiling the program in Unicode mode. More precisely, it will be possible
|
||||
// to construct wxString from a wide (Unicode) string and convert any wxString
|
||||
// to Unicode.
|
||||
//
|
||||
// Default is 1
|
||||
//
|
||||
// Recommended setting: 1
|
||||
// wxUSE_WCHAR_T is required by wxWidgets now, don't change.
|
||||
#define wxUSE_WCHAR_T 1
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -454,6 +440,17 @@
|
||||
// Set to 1 to use socket classes
|
||||
#define wxUSE_SOCKETS 1
|
||||
|
||||
// Set to 1 to use ipv6 socket classes (requires wxUSE_SOCKETS)
|
||||
//
|
||||
// Notice that currently setting this option under Windows will result in
|
||||
// programs which can only run on recent OS versions (with ws2_32.dll
|
||||
// installed) which is why it is disabled by default.
|
||||
//
|
||||
// Default is 1.
|
||||
//
|
||||
// Recommended setting: 1 if you need IPv6 support
|
||||
#define wxUSE_IPV6 0
|
||||
|
||||
// Set to 1 to enable virtual file systems (required by wxHTML)
|
||||
#define wxUSE_FILESYSTEM 1
|
||||
|
||||
|
@@ -147,29 +147,15 @@
|
||||
// Unicode support
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// Set wxUSE_UNICODE to 1 to compile wxWidgets in Unicode mode: wxChar will be
|
||||
// defined as wchar_t, wxString will use Unicode internally. If you set this
|
||||
// to 1, you must use wxT() macro for all literal strings in the program.
|
||||
//
|
||||
// Unicode is currently only fully supported under Windows NT/2000/XP
|
||||
// (Windows 9x doesn't support it and the programs compiled in Unicode mode
|
||||
// will not run under 9x -- but see wxUSE_UNICODE_MSLU below).
|
||||
//
|
||||
// Default is 0 (but only because of makefiles)
|
||||
//
|
||||
// Recommended setting: 1
|
||||
// These settings are obsolete: the library is always built in Unicode mode
|
||||
// now, only set wxUSE_UNICODE to 0 to compile legacy code in ANSI mode if
|
||||
// absolutely necessary -- updating it is strongly recommended as the ANSI mode
|
||||
// will disappear completely in future wxWidgets releases.
|
||||
#ifndef wxUSE_UNICODE
|
||||
#define wxUSE_UNICODE 0
|
||||
#define wxUSE_UNICODE 1
|
||||
#endif
|
||||
|
||||
// Setting wxUSE_WCHAR_T to 1 gives you some degree of Unicode support without
|
||||
// compiling the program in Unicode mode. More precisely, it will be possible
|
||||
// to construct wxString from a wide (Unicode) string and convert any wxString
|
||||
// to Unicode.
|
||||
//
|
||||
// Default is 1
|
||||
//
|
||||
// Recommended setting: 1
|
||||
// wxUSE_WCHAR_T is required by wxWidgets now, don't change.
|
||||
#define wxUSE_WCHAR_T 1
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -454,6 +440,17 @@
|
||||
// Set to 1 to use socket classes
|
||||
#define wxUSE_SOCKETS 1
|
||||
|
||||
// Set to 1 to use ipv6 socket classes (requires wxUSE_SOCKETS)
|
||||
//
|
||||
// Notice that currently setting this option under Windows will result in
|
||||
// programs which can only run on recent OS versions (with ws2_32.dll
|
||||
// installed) which is why it is disabled by default.
|
||||
//
|
||||
// Default is 1.
|
||||
//
|
||||
// Recommended setting: 1 if you need IPv6 support
|
||||
#define wxUSE_IPV6 0
|
||||
|
||||
// Set to 1 to enable virtual file systems (required by wxHTML)
|
||||
#define wxUSE_FILESYSTEM 1
|
||||
|
||||
|
@@ -57,6 +57,12 @@
|
||||
#undef __WINDOWS__
|
||||
#endif
|
||||
|
||||
// For IPv6 support, we must include winsock2.h before winsock.h, and
|
||||
// windows.h include winsock.h so do it before including it
|
||||
#if wxUSE_IPV6
|
||||
#include <winsock2.h>
|
||||
#endif
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#if defined(__WXWINCE__) && !defined(__WINDOWS__)
|
||||
@@ -106,3 +112,4 @@ WXDLLEXPORT int wxMSLU_GetSaveFileNameW(void *ofn);
|
||||
|
||||
#endif // _WX_WRAPWIN_H_
|
||||
|
||||
|
||||
|
@@ -147,29 +147,15 @@
|
||||
// Unicode support
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// Set wxUSE_UNICODE to 1 to compile wxWidgets in Unicode mode: wxChar will be
|
||||
// defined as wchar_t, wxString will use Unicode internally. If you set this
|
||||
// to 1, you must use wxT() macro for all literal strings in the program.
|
||||
//
|
||||
// Unicode is currently only fully supported under Windows NT/2000/XP
|
||||
// (Windows 9x doesn't support it and the programs compiled in Unicode mode
|
||||
// will not run under 9x -- but see wxUSE_UNICODE_MSLU below).
|
||||
//
|
||||
// Default is 0 (but only because of makefiles)
|
||||
//
|
||||
// Recommended setting: 1
|
||||
// These settings are obsolete: the library is always built in Unicode mode
|
||||
// now, only set wxUSE_UNICODE to 0 to compile legacy code in ANSI mode if
|
||||
// absolutely necessary -- updating it is strongly recommended as the ANSI mode
|
||||
// will disappear completely in future wxWidgets releases.
|
||||
#ifndef wxUSE_UNICODE
|
||||
#define wxUSE_UNICODE 0
|
||||
#define wxUSE_UNICODE 1
|
||||
#endif
|
||||
|
||||
// Setting wxUSE_WCHAR_T to 1 gives you some degree of Unicode support without
|
||||
// compiling the program in Unicode mode. More precisely, it will be possible
|
||||
// to construct wxString from a wide (Unicode) string and convert any wxString
|
||||
// to Unicode.
|
||||
//
|
||||
// Default is 1
|
||||
//
|
||||
// Recommended setting: 1
|
||||
// wxUSE_WCHAR_T is required by wxWidgets now, don't change.
|
||||
#define wxUSE_WCHAR_T 1
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -454,6 +440,17 @@
|
||||
// Set to 1 to use socket classes
|
||||
#define wxUSE_SOCKETS 1
|
||||
|
||||
// Set to 1 to use ipv6 socket classes (requires wxUSE_SOCKETS)
|
||||
//
|
||||
// Notice that currently setting this option under Windows will result in
|
||||
// programs which can only run on recent OS versions (with ws2_32.dll
|
||||
// installed) which is why it is disabled by default.
|
||||
//
|
||||
// Default is 1.
|
||||
//
|
||||
// Recommended setting: 1 if you need IPv6 support
|
||||
#define wxUSE_IPV6 0
|
||||
|
||||
// Set to 1 to enable virtual file systems (required by wxHTML)
|
||||
#define wxUSE_FILESYSTEM 1
|
||||
|
||||
|
@@ -147,29 +147,15 @@
|
||||
// Unicode support
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// Set wxUSE_UNICODE to 1 to compile wxWidgets in Unicode mode: wxChar will be
|
||||
// defined as wchar_t, wxString will use Unicode internally. If you set this
|
||||
// to 1, you must use wxT() macro for all literal strings in the program.
|
||||
//
|
||||
// Unicode is currently only fully supported under Windows NT/2000/XP
|
||||
// (Windows 9x doesn't support it and the programs compiled in Unicode mode
|
||||
// will not run under 9x -- but see wxUSE_UNICODE_MSLU below).
|
||||
//
|
||||
// Default is 0 (but only because of makefiles)
|
||||
//
|
||||
// Recommended setting: 1
|
||||
// These settings are obsolete: the library is always built in Unicode mode
|
||||
// now, only set wxUSE_UNICODE to 0 to compile legacy code in ANSI mode if
|
||||
// absolutely necessary -- updating it is strongly recommended as the ANSI mode
|
||||
// will disappear completely in future wxWidgets releases.
|
||||
#ifndef wxUSE_UNICODE
|
||||
#define wxUSE_UNICODE 0
|
||||
#define wxUSE_UNICODE 1
|
||||
#endif
|
||||
|
||||
// Setting wxUSE_WCHAR_T to 1 gives you some degree of Unicode support without
|
||||
// compiling the program in Unicode mode. More precisely, it will be possible
|
||||
// to construct wxString from a wide (Unicode) string and convert any wxString
|
||||
// to Unicode.
|
||||
//
|
||||
// Default is 1
|
||||
//
|
||||
// Recommended setting: 1
|
||||
// wxUSE_WCHAR_T is required by wxWidgets now, don't change.
|
||||
#define wxUSE_WCHAR_T 1
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -454,6 +440,17 @@
|
||||
// Set to 1 to use socket classes
|
||||
#define wxUSE_SOCKETS 1
|
||||
|
||||
// Set to 1 to use ipv6 socket classes (requires wxUSE_SOCKETS)
|
||||
//
|
||||
// Notice that currently setting this option under Windows will result in
|
||||
// programs which can only run on recent OS versions (with ws2_32.dll
|
||||
// installed) which is why it is disabled by default.
|
||||
//
|
||||
// Default is 1.
|
||||
//
|
||||
// Recommended setting: 1 if you need IPv6 support
|
||||
#define wxUSE_IPV6 0
|
||||
|
||||
// Set to 1 to enable virtual file systems (required by wxHTML)
|
||||
#define wxUSE_FILESYSTEM 1
|
||||
|
||||
|
@@ -121,13 +121,10 @@ private:
|
||||
|
||||
#if wxUSE_IPV6
|
||||
|
||||
// Experimental Only:
|
||||
//
|
||||
// IPV6 has not yet been implemented in socket layer
|
||||
class WXDLLIMPEXP_NET wxIPV6address : public wxIPaddress {
|
||||
DECLARE_DYNAMIC_CLASS(wxIPV6address)
|
||||
private:
|
||||
struct sockaddr_in6 *m_addr;
|
||||
wxString m_origHostname;
|
||||
public:
|
||||
wxIPV6address();
|
||||
wxIPV6address(const wxIPV6address& other);
|
||||
@@ -137,7 +134,7 @@ public:
|
||||
//
|
||||
// hostname
|
||||
// 3ffe:ffff:0100:f101:0210:a4ff:fee3:9566
|
||||
// compact (base85) Itu&-ZQ82s>J%s99FJXT
|
||||
// compact (base85) Itu&-ZQ82s>J%s99FJXT (depends on platform api)
|
||||
// compressed format ::1
|
||||
// ipv4 mapped ::ffff:1.2.3.4
|
||||
virtual bool Hostname(const wxString& name);
|
||||
|
@@ -436,6 +436,17 @@
|
||||
// Set to 1 to use socket classes
|
||||
#define wxUSE_SOCKETS 1
|
||||
|
||||
// Set to 1 to use ipv6 socket classes (requires wxUSE_SOCKETS)
|
||||
//
|
||||
// Notice that currently setting this option under Windows will result in
|
||||
// programs which can only run on recent OS versions (with ws2_32.dll
|
||||
// installed) which is why it is disabled by default.
|
||||
//
|
||||
// Default is 1.
|
||||
//
|
||||
// Recommended setting: 1 if you need IPv6 support
|
||||
#define wxUSE_IPV6 0
|
||||
|
||||
// Set to 1 to enable virtual file systems (required by wxHTML)
|
||||
#define wxUSE_FILESYSTEM 1
|
||||
|
||||
|
Reference in New Issue
Block a user