Lines Matching refs:soc
120 int ch, bsize, soc;
283 soc = socket(PF_INET, SOCK_DGRAM, 0);
284 if (soc < 0) {
290 if (setsockopt(soc, IPPROTO_IP, IP_RECVIF, &on, sizeof (on)))
295 if (setsockopt(soc, SOL_SOCKET, SO_RCVBUF,
305 trace_loop(argv, soc);
307 query_loop(argv, argc, soc);
329 trace_loop(char *argv[], int soc)
343 if (setsockopt(soc, IPPROTO_UDP, UDP_ANONPRIVBIND,
349 if (bind(soc, (struct sockaddr *)&myaddr, sizeof (myaddr)) < 0) {
356 if (out(*argv++, soc) == 0)
365 query_loop(char *argv[], int argc, int soc)
421 while (0 > out(*argv++, soc)) {
435 FD_SET(soc, &bits);
439 cc = select(soc+1, &bits, 0, 0, &delay);
443 cc = recvmsg(soc, &msg, 0);
492 while (*argv != NULL && 0 > out(*argv++, soc))
518 out(const char *host, int soc)
538 if (sendto(soc, &omsg_buf, omsg_len, 0, res->ai_addr,