Add an independent implementation of addr2ascii(3) and ascii2addr(3)

following the API of the INRIA IPv6 implementation.
This commit is contained in:
Garrett Wollman 1996-06-13 20:45:05 +00:00
parent 117e1bd9ef
commit ffd1512db6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=16352
2 changed files with 11 additions and 3 deletions

View File

@ -31,16 +31,21 @@
* SUCH DAMAGE.
*
* @(#)inet.h 8.1 (Berkeley) 6/2/93
* $Id$
*/
#ifndef _ARPA_INET_H_
#define _ARPA_INET_H_
/* External definitions for functions in inet(3) */
/* External definitions for functions in inet(3), addr2ascii(3) */
#include <sys/cdefs.h>
struct in_addr;
__BEGIN_DECLS
int ascii2addr __P((int, const char *, void *));
char *addr2ascii __P((int, const void *, int, char *));
unsigned long inet_addr __P((const char *));
int inet_aton __P((const char *, struct in_addr *));
unsigned long inet_lnaof __P((struct in_addr));

View File

@ -3,7 +3,8 @@
# machine-independent net sources
.PATH: ${.CURDIR}/${MACHINE}/net ${.CURDIR}/net
SRCS+= gethostbydns.c gethostbyht.c gethostbynis.c gethostnamadr.c \
SRCS+= addr2ascii.c ascii2addr.c \
gethostbydns.c gethostbyht.c gethostbynis.c gethostnamadr.c \
getnetbydns.c getnetbyht.c getnetbynis.c getnetnamadr.c \
getproto.c getprotoent.c getprotoname.c getservbyname.c \
getservbyport.c getservent.c herror.c inet_addr.c inet_lnaof.c \
@ -17,12 +18,14 @@ SRCS+= gethostbydns.c gethostbyht.c gethostbynis.c gethostnamadr.c \
# machine-dependent net sources
.include "${.CURDIR}/${MACHINE}/net/Makefile.inc"
MAN3+= net/byteorder.3 net/ethers.3 net/gethostbyname.3 net/getnetent.3 \
MAN3+= net/addr2ascii.3 \
net/byteorder.3 net/ethers.3 net/gethostbyname.3 net/getnetent.3 \
net/getprotoent.3 net/getservent.3 net/inet.3 net/linkaddr.3 \
net/rcmd.3 net/resolver.3
# not installed: net/ns.3 net/iso_addr.3
MLINKS+=addr2ascii.3 ascii2addr.3
MLINKS+=byteorder.3 htonl.3 byteorder.3 htons.3 byteorder.3 ntohl.3 \
byteorder.3 ntohs.3
MLINKS+=ethers.3 ether_line.3 ethers.3 ether_aton.3 ethers.3 ether_ntoa.3 \