int s;
struct sockaddr_in sock_in;
- s = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
+ s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
if (s == -1) {
printf("Failed to open local socket\n");
exit(10);
}
bzero(&sock_in, sizeof(sock_in));
- sock_in.sin_family = PF_INET;
+ sock_in.sin_family = AF_INET;
sock_in.sin_port = htons(port);
inet_aton(addr, &sock_in.sin_addr);
if (bind(s, (struct sockaddr *)&sock_in, sizeof(sock_in)) == -1) {
/* Setup a sockaddr_in for the client we want to notify */
bzero(&sock_cl, sizeof(sock_cl));
- sock_cl.sin_family = PF_INET;
+ sock_cl.sin_family = AF_INET;
sock_cl.sin_port = htons(clientport);
inet_aton(client, &sock_cl.sin_addr);
exit(10);
}
- /* we dont want to wait for any reply */
+ /* we don't want to wait for any reply */
w.tv_sec = 0;
w.tv_usec = 0;
clnt_control(clnt, CLSET_TIMEOUT, (char *)&w);