Merged IPv6 support in the NET module

This commit is contained in:
Paul Bakker
2013-12-17 14:33:42 +01:00
6 changed files with 176 additions and 28 deletions

View File

@@ -101,6 +101,16 @@
* Comment if your system does not support time functions
*/
#define POLARSSL_HAVE_TIME
/**
* \def POLARSSL_HAVE_IPV6
*
* System supports the basic socket interface for IPv6 (RFC 3493),
* specifically getaddrinfo(), freeaddrinfo() and struct sockaddr_storage.
*
* Comment if your system does not support the IPv6 socket interface
*/
#define POLARSSL_HAVE_IPV6
/* \} name SECTION: System support */
/**

View File

@@ -82,9 +82,10 @@ int net_bind( int *fd, const char *bind_ip, int port );
* \param bind_fd Relevant socket
* \param client_fd Will contain the connected client socket
* \param client_ip Will contain the client IP address
* Must be at least 4 bytes, or 16 if IPv6 is supported
*
* \return 0 if successful, POLARSSL_ERR_NET_ACCEPT_FAILED, or
* POLARSSL_ERR_NET_WOULD_BLOCK is bind_fd was set to
* POLARSSL_ERR_NET_WANT_READ is bind_fd was set to
* non-blocking and accept() is blocking.
*/
int net_accept( int bind_fd, int *client_fd, void *client_ip );