#define NG_IPADDR_HDR
#include "portab.h"
+#include <assert.h>
#include <sys/socket.h>
#include <netinet/in.h>
#ifdef WANT_IPV6
assert(a->sa.sa_family == AF_INET || a->sa.sa_family == AF_INET6);
if (a->sa.sa_family == AF_INET6)
- return sizeof(a->sin6);
+ return (socklen_t)sizeof(a->sin6);
#endif
assert(a->sin4.sin_family == AF_INET);
- return sizeof(a->sin4);
+ return (socklen_t)sizeof(a->sin4);
}
* init a ng_ipaddr_t object.
* @param addr: pointer to ng_ipaddr_t to initialize.
* @param ip_str: ip address in dotted-decimal (ipv4) or hexadecimal (ipv6) notation
- * if ip_str is NULL it is treated as 0.0.0.0/[::]
* @param port: transport layer port number to use.
*/
GLOBAL bool ng_ipaddr_init PARAMS((ng_ipaddr_t *addr, const char *ip_str, UINT16 port));
#endif
/* -eof- */
-