* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <config.h>
-
-#include <errno.h>
-#include <string.h>
+#include "rsync.h"
#define NS_INT16SZ 2
#define NS_INADDRSZ 4
*/
static int inet_pton4(const char *src, unsigned char *dst);
+#ifdef INET6
static int inet_pton6(const char *src, unsigned char *dst);
+#endif
/* int
- * isc_net_pton(af, src, dst)
+ * inet_pton(af, src, dst)
* convert from presentation format (which usually means ASCII printable)
* to network format (which is usually some kind of binary format).
* return:
* Paul Vixie, 1996.
*/
int
-isc_net_pton(af, src, dst)
- int af;
- const char *src;
- void *dst;
+inet_pton(int af,
+ const char *src,
+ void *dst)
{
switch (af) {
case AF_INET:
return (inet_pton4(src, dst));
+#ifdef INET6
case AF_INET6:
return (inet_pton6(src, dst));
+#endif
default:
errno = EAFNOSUPPORT;
return (-1);
* author:
* Paul Vixie, 1996.
*/
+#ifdef INET6
static int
inet_pton6(src, dst)
const char *src;
memcpy(dst, tmp, NS_IN6ADDRSZ);
return (1);
}
+#endif