ho incontrato il seguente codice snapshot: struct hostent *hp;
hp = my_gethostbyname(localhost);
if (hp == NULL) {
ls_syslog(LOG_ERR, I18N_FUNC_FAIL, fname, "my_gethostbyname()");
re
Ho il seguente pezzo di codice per ottenere il nome host e l'indirizzo IP, #include <stdlib.h>
#include <stdio.h>
#include <netdb.h> /* This is the header file needed for gethostbyname() */
#includ