/*
 * numtoa - return asciized network numbers store in local array space
 */
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>

#include "lib_strbuf.h"

char *
numtoa(num)
	u_long num;
{
	register u_long netnum;
	register char *buf;

	netnum = ntohl(num);
	LIB_GETBUF(buf);

	(void) sprintf(buf, "%d.%d.%d.%d", (netnum>>24)&0xff,
	    (netnum>>16)&0xff, (netnum>>8)&0xff, netnum&0xff);

	return buf;
}
