Lines Matching refs:icmp_sock
589 void sock_setbufs(int icmp_sock, int alloc) in sock_setbufs() argument
596 setsockopt(icmp_sock, SOL_SOCKET, SO_SNDBUF, (char *)&sndbuf, sizeof(sndbuf)); in sock_setbufs()
601 setsockopt(icmp_sock, SOL_SOCKET, SO_RCVBUF, (char *)&hold, sizeof(hold)); in sock_setbufs()
602 if (getsockopt(icmp_sock, SOL_SOCKET, SO_RCVBUF, (char *)&hold, &tmplen) == 0) { in sock_setbufs()
608 void sock_setmark(int icmp_sock) { in sock_setmark() argument
614 ret = setsockopt(icmp_sock, SOL_SOCKET, SO_MARK, &mark, sizeof(mark)); in sock_setmark()
629 void setup(int icmp_sock) in setup() argument
650 setsockopt(icmp_sock, SOL_SOCKET, SO_DEBUG, (char *)&hold, sizeof(hold)); in setup()
652 setsockopt(icmp_sock, SOL_SOCKET, SO_DONTROUTE, (char *)&hold, sizeof(hold)); in setup()
657 if (setsockopt(icmp_sock, SOL_SOCKET, SO_TIMESTAMP, &on, sizeof(on))) in setup()
662 sock_setmark(icmp_sock); in setup()
674 setsockopt(icmp_sock, SOL_SOCKET, SO_SNDTIMEO, (char*)&tv, sizeof(tv)); in setup()
680 if (setsockopt(icmp_sock, SOL_SOCKET, SO_RCVTIMEO, (char*)&tv, sizeof(tv))) in setup()
726 void main_loop(int icmp_sock, __u8 *packet, int packlen) in main_loop() argument
792 pset.fd = icmp_sock; in main_loop()
817 cc = recvmsg(icmp_sock, &msg, polling); in main_loop()
845 ioctl(icmp_sock, SIOCGSTAMP, &recv_time)) in main_loop()