Loading...
Select Version
&pagelevel(3)&pagelevel
#include <netdb.h>
Kernighan-Ritchie-C:
void freehostent(ptr);
struct hostent *ptr;
ANSI-C:
void freehostent(struct hostent* ptr);
Description
The freehostent() function releases memory for an object of the type struct hostent which was requested beforehand with the getipnodebyname() or getipnodebyaddr() function.
The ptr parameter points to an object of the type struct hostent.
The hostent structure is declared as follows:
struct hostent { char *h_name; /* socket host name */ char **h_aliases; /* alias list */ int h_addrtype; /* address type */ int h_length; /* length of address (in bytes) */ char **h_addr_list; /* list of addresses for the host */ /* terminated with a null pointer */ };