* Returns `dst' (as a const)
* Note:
* - uses no statics
- * - takes a u_char* not an in_addr as input
+ * - takes a unsigned char* not an in_addr as input
*/
-static char *inet_ntop4 (const u_char *src, char *dst, size_t size)
+static char *inet_ntop4 (const unsigned char *src, char *dst, size_t size)
{
#if defined(HAVE_INET_NTOA_R_2_ARGS)
const char *ptr;
/*
* Convert IPv6 binary address into presentation (printable) format.
*/
-static char *inet_ntop6 (const u_char *src, char *dst, size_t size)
+static char *inet_ntop6 (const unsigned char *src, char *dst, size_t size)
{
/*
* Note that int32_t and int16_t need only be "at least" large enough
{
switch (af) {
case AF_INET:
- return inet_ntop4((const u_char*)src, buf, size);
+ return inet_ntop4((const unsigned char*)src, buf, size);
#ifdef ENABLE_IPV6
case AF_INET6:
- return inet_ntop6((const u_char*)src, buf, size);
+ return inet_ntop6((const unsigned char*)src, buf, size);
#endif
default:
SET_ERRNO(EAFNOSUPPORT);
const char *pch;
if ((pch = strchr(digits, ch)) != NULL) {
- u_int val = *tp * 10 + (u_int)(pch - digits);
+ unsigned int val = *tp * 10 + (unsigned int)(pch - digits);
if (val > 255)
return (0);
unsigned char tmp[IN6ADDRSZ], *tp, *endp, *colonp;
const char *xdigits, *curtok;
int ch, saw_xdigit;
- u_int val;
+ unsigned int val;
memset((tp = tmp), 0, IN6ADDRSZ);
endp = tp + IN6ADDRSZ;