Lines Matching defs:query
80 #define MULTICAST_TTL1 64 /* Default TTL for multicast query/response */
85 u_long qtime; /* Time query was issued */
91 struct tr_query q; /* Query/response header */
123 * Query/response parameters, all initialized to zero and set later
126 u_int32_t qsrc = 0; /* Source address in the query */
127 u_int32_t qgrp = 0; /* Group address in the query */
128 u_int32_t qdst = 0; /* Destination (receiver) address in query */
129 u_char qno = 0; /* Max number of hops to query */
131 int qttl = 0; /* TTL for the query packet */
397 struct tr_query *query, *rquery;
424 query = (struct tr_query *)(send_buf + MIN_IP_HEADER_LEN + IGMP_MINLEN);
425 query->tr_raddr = raddr ? raddr : multicast ? resp_cast : lcl_addr;
426 query->tr_rttl = rttl ? rttl :
427 IN_MULTICAST(ntohl(query->tr_raddr)) ? get_ttl(save) : UNICAST_TTL;
428 query->tr_src = qsrc;
429 query->tr_dst = qdst;
434 query->tr_raddr = resp_cast;
435 if (rttl == 0) query->tr_rttl = get_ttl(save);
438 query->tr_rttl += MULTICAST_TTL_INC;
439 if (query->tr_rttl > MULTICAST_TTL_MAX)
440 query->tr_rttl = MULTICAST_TTL_MAX;
448 query->tr_qid = arc4random() >> 8;
451 * Set timer to calculate delays, then send query
550 * Ignore responses that don't match query.
553 if (rquery->tr_qid != query->tr_qid) continue;
582 rquery->tr_raddr = query->tr_raddr; /* Insure these are */
583 rquery->tr_rttl = query->tr_rttl; /* as we sent them */
1132 printf(" Receiver Query Source\n\n");
1224 case 'q': /* Number of query retries */
1232 case 'g': /* Last-hop gateway (dest of query) */
1238 case 't': /* TTL for query packet */
1402 * query since by definition the last-hop router will be a member.
1419 * Try a query at the requested number of hops or MAXHOPS if unspecified.
1438 * If the initial query was successful, print it. Otherwise, if
1439 * the query max hop count is the default of zero, loop starting
1476 * trace query. This should be safe for mrouted versions 3.3