-
-/* GAddress */
-
-// TODO: make GAddress a real class instead of this mix of C and C++
-
-// Represents a socket endpoint, i.e. -- in spite of its name -- not an address
-// but an (address, port) pair
-struct GAddress
-{
- struct sockaddr *m_addr;
- size_t m_len;
-
- GAddressType m_family;
- int m_realfamily;
-
- wxSocketError m_error;
-};
-
-GAddress *GAddress_new();
-GAddress *GAddress_copy(GAddress *address);
-void GAddress_destroy(GAddress *address);
-
-void GAddress_SetFamily(GAddress *address, GAddressType type);
-GAddressType GAddress_GetFamily(GAddress *address);
-
-/* The use of any of the next functions will set the address family to
- * the specific one. For example if you use GAddress_INET_SetHostName,
- * address family will be implicitly set to AF_INET.
- */
-
-wxSocketError GAddress_INET_SetHostName(GAddress *address, const char *hostname);
-wxSocketError GAddress_INET_SetBroadcastAddress(GAddress *address);
-wxSocketError GAddress_INET_SetAnyAddress(GAddress *address);
-wxSocketError GAddress_INET_SetHostAddress(GAddress *address,
- unsigned long hostaddr);
-wxSocketError GAddress_INET_SetPortName(GAddress *address, const char *port,
- const char *protocol);
-wxSocketError GAddress_INET_SetPort(GAddress *address, unsigned short port);
-
-wxSocketError GAddress_INET_GetHostName(GAddress *address, char *hostname,
- size_t sbuf);
-unsigned long GAddress_INET_GetHostAddress(GAddress *address);
-unsigned short GAddress_INET_GetPort(GAddress *address);
-
-wxSocketError _GAddress_translate_from(GAddress *address,
- struct sockaddr *addr, int len);
-wxSocketError _GAddress_translate_to (GAddress *address,
- struct sockaddr **addr, int *len);
-wxSocketError _GAddress_Init_INET(GAddress *address);
-
-#if wxUSE_IPV6
-
-wxSocketError GAddress_INET6_SetHostName(GAddress *address, const char *hostname);
-wxSocketError GAddress_INET6_SetAnyAddress(GAddress *address);
-wxSocketError GAddress_INET6_SetHostAddress(GAddress *address,
- struct in6_addr hostaddr);
-wxSocketError GAddress_INET6_SetPortName(GAddress *address, const char *port,
- const char *protocol);
-wxSocketError GAddress_INET6_SetPort(GAddress *address, unsigned short port);
-
-wxSocketError GAddress_INET6_GetHostName(GAddress *address, char *hostname,
- size_t sbuf);
-wxSocketError GAddress_INET6_GetHostAddress(GAddress *address,struct in6_addr *hostaddr);
-unsigned short GAddress_INET6_GetPort(GAddress *address);
-
-#endif // wxUSE_IPV6
-
-// these functions are available under all platforms but only implemented under
-// Unix ones, elsewhere they just return wxSOCKET_INVADDR
-wxSocketError _GAddress_Init_UNIX(GAddress *address);
-wxSocketError GAddress_UNIX_SetPath(GAddress *address, const char *path);
-wxSocketError GAddress_UNIX_GetPath(GAddress *address, char *path, size_t sbuf);
-