Lines Matching defs:sock
118 int sock;
189 sock = socket(AF_INET, SOCK_DGRAM, 0);
190 if (sock < 0) {
194 if ((rc=setsockopt(sock, SOL_SOCKET, SO_BROADCAST, &optval, sizeof(optval))) < 0) {
199 sendto(sock, &msg, msglen, 0, (struct sockaddr *)&bcast, sizeof(bcast));
205 int sock;
240 sock = socket(AF_INET, SOCK_DGRAM, 0);
241 if (sock < 0) {
245 if ((rc=setsockopt(sock, SOL_SOCKET, SO_BROADCAST, &optval, sizeof(optval))) < 0) {
250 sendto(sock, &msg, msglen, 0, (struct sockaddr *)&bcast, sizeof(bcast));