- h = xgethostbyname(host); /* get the IP addr */
- memcpy(&s_in.sin_addr, h->h_addr, sizeof(s_in.sin_addr));
-
- s_in.sin_port = htons(37); /* find port # */
- if ((tserv = getservbyname("time", "tcp")) != NULL)
- s_in.sin_port = tserv->s_port;
-
- s_in.sin_family = AF_INET;