Lines Matching refs:idx
292 static void dns_call_found(u8_t idx, ip_addr_t *addr);
778 * @param idx the DNS table entry index for which to send a request
782 dns_send(u8_t idx)
792 struct dns_table_entry *entry = &dns_table[idx];
804 dns_call_found(idx, NULL);
996 u8_t idx;
1013 for (i = 0, idx = (u8_t)(dns_last_pcb_idx + 1); i < DNS_MAX_SOURCE_PORTS; i++, idx++) {
1014 if (idx >= DNS_MAX_SOURCE_PORTS) {
1015 idx = 0;
1017 if (dns_pcbs[idx] != NULL) {
1018 dns_last_pcb_idx = idx;
1019 return idx;
1031 * @param idx dns table index of the entry that is resolved or removed
1035 dns_call_found(u8_t idx, ip_addr_t *addr)
1045 LWIP_ASSERT("invalid response", LWIP_DNS_ADDRTYPE_IS_IPV6(dns_table[idx].reqaddrtype));
1046 dns_table[idx].reqaddrtype = LWIP_DNS_ADDRTYPE_IPV6;
1048 LWIP_ASSERT("invalid response", !LWIP_DNS_ADDRTYPE_IS_IPV6(dns_table[idx].reqaddrtype));
1049 dns_table[idx].reqaddrtype = LWIP_DNS_ADDRTYPE_IPV4;
1056 if (dns_requests[i].found && (dns_requests[i].dns_table_idx == idx)) {
1057 (*dns_requests[i].found)(dns_table[idx].name, addr, dns_requests[i].arg);
1063 if (dns_requests[idx].found) {
1064 (*dns_requests[idx].found)(dns_table[idx].name, addr, dns_requests[idx].arg);
1066 dns_requests[idx].found = NULL;
1071 if (i == idx) {
1075 if (dns_table[i].pcb_idx == dns_table[idx].pcb_idx) {
1077 dns_table[idx].pcb_idx = DNS_MAX_SOURCE_PORTS;
1082 if (dns_table[idx].pcb_idx < DNS_MAX_SOURCE_PORTS) {
1084 udp_remove(dns_pcbs[dns_table[idx].pcb_idx]);
1085 dns_pcbs[dns_table[idx].pcb_idx] = NULL;
1086 dns_table[idx].pcb_idx = DNS_MAX_SOURCE_PORTS;
1230 dns_correct_response(u8_t idx, u32_t ttl)
1232 struct dns_table_entry *entry = &dns_table[idx];
1245 dns_call_found(idx, &entry->ipaddr);