/external/iputils/ |
D | ping.c | 92 int icmp_sock; /* socket file descriptor */ variable 143 icmp_sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_ICMP); in main() 144 if (icmp_sock < 0) { in main() 146 icmp_sock = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP); in main() 163 (setsockopt(icmp_sock, IPPROTO_IP, IP_TOS, in main() 423 if (icmp_sock < 0) { in main() 434 if (ioctl(icmp_sock, SIOCGIFINDEX, &ifr) < 0) { in main() 458 if (setsockopt(icmp_sock, SOL_IP, IP_MTU_DISCOVER, &pmtudisc, sizeof(pmtudisc)) == -1) { in main() 465 bind(icmp_sock, (struct sockaddr*)&source, sizeof(source)) == -1) { in main() 478 if (setsockopt(icmp_sock, SOL_RAW, ICMP_FILTER, (char*)&filt, sizeof(filt)) == -1) in main() [all …]
|
D | ping_common.c | 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() [all …]
|
D | traceroute6.c | 302 int icmp_sock; /* receive (icmp) socket file descriptor */ variable 346 icmp_sock = socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6); in main() 493 if (icmp_sock < 0) { in main() 500 setsockopt(icmp_sock, SOL_IPV6, IPV6_RECVPKTINFO, &on, sizeof(on)); in main() 501 setsockopt(icmp_sock, SOL_IPV6, IPV6_2292PKTINFO, &on, sizeof(on)); in main() 503 setsockopt(icmp_sock, SOL_IPV6, IPV6_PKTINFO, &on, sizeof(on)); in main() 507 setsockopt(icmp_sock, SOL_SOCKET, SO_DEBUG, in main() 510 setsockopt(icmp_sock, SOL_SOCKET, SO_DONTROUTE, in main() 515 if (setsockopt(icmp_sock, SOL_RAW, IPV6_CHECKSUM, &on, sizeof(on)) < 0) { in main() 580 if (bind(icmp_sock, (struct sockaddr *)&saddr, sizeof(saddr)) < 0) { in main() [all …]
|
D | ping6.c | 167 static int icmp_sock; variable 721 icmp_sock = socket(AF_INET6, SOCK_DGRAM, IPPROTO_ICMPV6); in main() 722 if (icmp_sock < 0) { in main() 724 icmp_sock = socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6); in main() 1036 if (icmp_sock < 0) { in main() 1073 if (setsockopt(icmp_sock, SOL_IPV6, IPV6_MTU_DISCOVER, &pmtudisc, sizeof(pmtudisc)) == -1) { in main() 1080 bind(icmp_sock, (struct sockaddr*)&source, sizeof(source)) == -1) { in main() 1097 if (setsockopt(icmp_sock, SOL_IPV6, IPV6_RECVERR, (char *)&hold, sizeof(hold))) { in main() 1106 sock_setbufs(icmp_sock, hold); in main() 1113 err = setsockopt(icmp_sock, SOL_RAW, IPV6_CHECKSUM, in main() [all …]
|
D | ping_common.h | 286 extern void sock_setbufs(int icmp_sock, int alloc); 287 extern void sock_setmark(int icmp_sock); 288 extern void setup(int icmp_sock); 289 extern void main_loop(int icmp_sock, __u8 *buf, int buflen) __attribute__((noreturn));
|
D | RELNOTES | 614 * shadowed icmp_sock in ping6. James Morris <jmorris@@intercode.com.au>
|