Lines Matching defs:sndsock
304 int sndsock; /* send (udp) socket file descriptor */
523 else if ((sndsock = socket(AF_INET, SOCK_RAW, IPPROTO_RAW)) < 0)
817 if (sndsock < 0) {
824 if (setsockopt(sndsock, SOL_SOCKET, SO_SNDBUF, (char *)&packlen,
831 if (setsockopt(sndsock, IPPROTO_IP, IP_HDRINCL, (char *)&on,
838 if (settos && setsockopt(sndsock, IPPROTO_IP, IP_TOS,
847 (void)setsockopt(sndsock, SOL_SOCKET, SO_DEBUG, (char *)&on,
850 (void)setsockopt(sndsock, SOL_SOCKET, SO_DONTROUTE, (char *)&on,
924 if (bind(sndsock, (struct sockaddr *)from, sizeof(*from)) < 0) {
940 if (connect(sndsock, (struct sockaddr *)&whereto,
973 if (cansandbox && cap_rights_limit(sndsock, &rights) < 0) {
974 Fprintf(stderr, "%s: cap_rights_limit sndsock: %s\n", prog,
987 if (setpolicy(sndsock, "in bypass") < 0)
990 if (setpolicy(sndsock, "out bypass") < 0)
1283 if (setsockopt(sndsock, IPPROTO_IP, IP_TTL,
1291 cc = send(sndsock, (char *)outip, packlen, 0);