/* gethostnamadr.c 4.1 83/12/05 */
static char HOSTDB
[] = "/etc/hosts";
static DBM
*db
= (DBM
*)NULL
;
static struct hostent host
;
static char *host_aliases
[MAXALIASES
];
return ((struct hostent
*)NULL
);
key
= dbmfetch(db
, curkey
);
return ((struct hostent
*)NULL
);
naliases
= *(int *)cp
; cp
+= sizeof (int);
for (ap
= host_aliases
; naliases
> 0; naliases
--) {
host
.h_aliases
= host_aliases
;
host
.h_addrtype
= *(int *)cp
; cp
+= sizeof (int);
host
.h_length
= *(int *)cp
; cp
+= sizeof (int);
register struct hostent
*hp
;
if ((db
= ndbmopen(HOSTDB
, O_RDONLY
)) == (DBM
*)0)
return ((struct hostent
*)NULL
);
gethostbyaddr(addr
, length
)
register struct hostent
*hp
;
if ((db
= ndbmopen(HOSTDB
, O_RDONLY
)) == (DBM
*)0)
return ((struct hostent
*)NULL
);