--------------------- PatchSet 5739 Date: 2007/09/24 02:16:51 Author: amosjeffries Branch: squid3-ipv6 Tag: (none) Log: Add .h files for inet_* helpers, missed in previous commit. Members: include/inet_ntop.h:1.1->1.1.2.1 include/inet_pton.h:1.1->1.1.2.1 --- /dev/null Sat Sep 29 00:19:47 2007 +++ squid3/include/inet_ntop.h Sat Sep 29 00:19:47 2007 @@ -0,0 +1,24 @@ +#ifndef _INC_INET_NTOP_H +#define _INC_INET_NTOP_H + +#if HAVE_INET_NTOP + +/* Use the system provided version where possible */ +#define xinet_ntop inet_ntop + +#else + +/* char * + * inet_ntop(af, src, dst, size) + * convert a network format address to presentation format. + * return: + * pointer to presentation format address (`dst'), or NULL (see errno). + * author: + * Paul Vixie, 1996. + */ +const char * +xinet_ntop(int af, const void *src, char *dst, size_t size); + +#endif + +#endif /* _INC_INET_NTOP_H */ --- /dev/null Sat Sep 29 00:19:47 2007 +++ squid3/include/inet_pton.h Sat Sep 29 00:19:47 2007 @@ -0,0 +1,27 @@ +#ifndef _INC_INET_PTON_H +#define _INC_INET_PTON_H + +#if HAVE_INET_PTON + +/* Use the system provided version where possible */ +#define xinet_pton inet_pton + +#else + +/* int + * 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: + * 1 if the address was valid for the specified address family + * 0 if the address wasn't valid (`dst' is untouched in this case) + * -1 if some other error occurred (`dst' is untouched in this case, too) + * author: + * Paul Vixie, 1996. + */ +int +xinet_pton(int af, const char *src, void *dst); + +#endif + +#endif /* _INC_INET_NTOP_H */