-
-
-/*
- if(is_numeric(hostname))
- {
-// if ((hp = gethostbyaddr(hostname)) == NULL)
- cerr<<"*** Can't use numeric IP ***\n";
- return -1;
- }
- else
- {
- if ((hp = gethostbyname(hostname)) == NULL)
- return -1;
- };
-
- cout<<"HP->H_ADDR >";
- for(int k=0; k<hp->h_length; k++) cout<<"["<<hp->h_addr[k]<<"]";
- cout<<"<\n";
-
- memset(&sa,0,sizeof(sa));
- memcpy((char *)&sa.sin_addr,hp->h_addr,hp->h_length);
- sa.sin_family= hp->h_addrtype;
- sa.sin_port= htons((u_short)portnum);
-*/
-