[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

struct hostent



Hejsa!

Jeg sidder og er ved at lære mig selv lidt *nix netværksprogrammering,
og har lidt problemer. Her er et lille udpluk af koden:

	#define UPDATE_SERVER "freakfoster.dhis.org"
	struct hostent *update_server_ent; 

	if((update_server_ent = gethostbyname(UPDATE_SERVER)) == NULL) {
		printf("Update server lookup failed\n");
    		return;
	}
	printf("Update server IP %s\n", update_server_ent.h_addr);

Problemet er, at jeg ikke kan få lov til at tilgå h_addr_list[0].
gcc melder følgende:

	update.c:45: request for member `h_addr' in something not a structure
or union

Hvad gør jeg galt?

Mvh
//Brix
-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 Name:   Henrik Brix Andersen         Web: http://freakfoster.dhis.org
 E-mail: sslug@sslug  Get Linux: http://www.linux.org
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:08 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *