Lines Matching refs:toys
45 #include "toys.h"
117 if (toys.optflags & FLAG_U) {
164 if ((toys.optflags & FLAG_d) && (setsockopt(sock,SOL_SOCKET, SO_DEBUG,
167 if ((toys.optflags & FLAG_r) && (setsockopt(sock, SOL_SOCKET, SO_DONTROUTE,
221 if (probe && (toys.optflags & FLAG_z)) usleep(TT.pause_time * 1000);
270 if (toys.optflags & FLAG_U) {
298 if (!(toys.optflags & FLAG_n)) {
308 if (!(toys.optflags & FLAG_n)) xprintf(")");
312 if (toys.optflags & FLAG_l) xprintf(" (%d)", rcv_pkt->ip_ttl);
313 if (toys.optflags & FLAG_v) {
413 if (!(toys.optflags & FLAG_n)) {
424 if (!(toys.optflags & FLAG_n)) xprintf(")");
428 if (toys.optflags & FLAG_v) {
483 if(!(toys
484 (inet_pton(AF_INET6, toys.optargs[0], &dest)))
485 toys.optflags |= FLAG_6;
488 if (toys.optflags & FLAG_6) TT.istraceroute6 = 1;
489 else TT.istraceroute6 = toys.which->name[10] == '6';
491 if(!TT.istraceroute6 && (toys.optflags & FLAG_g)) {
506 if (toys.optargs[1])
507 TT.msg_len = atolx_range(toys.optargs[1], pack_size, 32768);//max packet size
530 if (toys.optflags & FLAG_U)
534 if (toys.optflags & FLAG_i) bind_to_interface(TT.snd_sock);
536 resolve_addr(toys.optargs[0], AF_INET, ((toys.optflags & FLAG_U) ?
537 SOCK_DGRAM : SOCK_RAW), ((toys.optflags & FLAG_U) ? IPPROTO_UDP :
563 if ((toys.optflags & FLAG_t) &&
568 if ((toys.optflags & FLAG_F) &&
580 if (!(toys.optflags & FLAG_U)) TT.ident |= 0x8000;
581 if (toys.optflags & FLAG_s) {
597 xprintf("traceroute to %s(%s)", toys.optargs[0],
600 if (toys.optflags & FLAG_i) bind_to_interface(TT.snd_sock);
602 resolve_addr(toys.optargs[0], AF_INET6, SOCK_DGRAM, IPPROTO_UDP, &dest);
603 if (toys.optflags & FLAG_s) {
617 if (toys.optflags & FLAG_i) bind_to_interface(p_fd);
634 xprintf("traceroute6 to %s(%s)", toys.optargs[0], addr_str);
637 if (toys.optflags & FLAG_s) xprintf(" from %s",TT.src_ip);