hostent

    12calore

    2risposta

    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

    6calore

    5risposta

    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