:i	static char dmp_he_sccs_id[] = "%W% %G%";
:1#include "V.h"
#include "sys_netdb.h"
/*
* Dump a hostent data structure.  Note that we give a symbolic dump of
* the  address,  but  it  may  not  be  in  the  form to which you are
* accustomed.  Note also the paranoia; some applications have  blithly
* called this routine with a null pointer.
*/
dumphostent(hp)
	struct hostent *hp;
{	int  h;
	char*p;
	if (hp) {
:1		P1 "Hostent for \"%s\"",hp->h_name?hp->h_name:unknown D;
		if (hp->h_aliases)
			for (h=0; (p = hp->h_aliases[h]); h++)
:1		P1 "   alias: \"%s\"",p D;
		P1 "    addr: type=%d length=%d \"%s\"",
			hp->h_addrtype,hp->h_length,HexAddr(hp->h_addr,hp->h_length) D;
		P1 "    addr: type=%d length=%d \"%s\"",
			hp->h_addrtype,hp->h_length,DecAddr(hp->h_addr,hp->h_length) D;
	}
}
