Lines Matching refs:soc
118 int ch, bsize, soc; in main() local
281 soc = socket(PF_INET, SOCK_DGRAM, 0); in main()
282 if (soc < 0) { in main()
288 if (setsockopt(soc, IPPROTO_IP, IP_RECVIF, &on, sizeof (on))) in main()
293 if (setsockopt(soc, SOL_SOCKET, SO_RCVBUF, in main()
303 trace_loop(argv, soc); in main()
305 query_loop(argv, argc, soc); in main()
327 trace_loop(char *argv[], int soc) in trace_loop() argument
341 if (setsockopt(soc, IPPROTO_UDP, UDP_ANONPRIVBIND, in trace_loop()
347 if (bind(soc, (struct sockaddr *)&myaddr, sizeof (myaddr)) < 0) { in trace_loop()
354 if (out(*argv++, soc) == 0) in trace_loop()
363 query_loop(char *argv[], int argc, int soc) in query_loop() argument
419 while (0 > out(*argv++, soc)) { in query_loop()
433 FD_SET(soc, &bits); in query_loop()
437 cc = select(soc+1, &bits, 0, 0, &delay); in query_loop()
441 cc = recvmsg(soc, &msg, 0); in query_loop()
490 while (*argv != NULL && 0 > out(*argv++, soc)) in query_loop()
516 out(const char *host, int soc) in out() argument
536 if (sendto(soc, &omsg_buf, omsg_len, 0, res->ai_addr, in out()