Lines Matching refs:addr

285 static err_t dns_lookup_local(const char *hostname, ip_addr_t *addr LWIP_DNS_ADDRTYPE_ARG(u8_t dns_addrtype));
290 static void dns_recv(void *s, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port);
292 static void dns_call_found(u8_t idx, ip_addr_t *addr);
457 entry->addr = init_entry->addr;
482 iterator_fn(entry->name, &entry->addr, iterator_arg);
490 iterator_fn(local_hostlist_static[i].name, &local_hostlist_static[i].addr, iterator_arg);
502 * @param addr the first IP address for the hostname in the local host-list or
511 dns_local_lookup(const char *hostname, ip_addr_t *addr, u8_t dns_addrtype)
514 return dns_lookup_local(hostname, addr LWIP_DNS_ADDRTYPE_ARG(dns_addrtype));
519 dns_lookup_local(const char *hostname, ip_addr_t *addr LWIP_DNS_ADDRTYPE_ARG(u8_t dns_addrtype))
525 LWIP_DNS_ADDRTYPE_MATCH_IP(dns_addrtype, entry->addr)) {
526 if (addr) {
527 ip_addr_copy(*addr, entry->addr);
537 LWIP_DNS_ADDRTYPE_MATCH_IP(dns_addrtype, local_hostlist_static[i].addr)) {
538 if (addr) {
539 ip_addr_copy(*addr, local_hostlist_static[i].addr);
556 * @param addr address for which entries shall be removed from the local host-list
560 dns_local_removehost(const char *hostname, const ip_addr_t *addr)
567 ((addr == NULL) || ip_addr_cmp(&entry->addr, addr))) {
592 * @param addr IP address of the new entry
596 dns_local_addhost(const char *hostname, const ip_addr_t *addr)
612 ip_addr_copy(entry->addr, *addr);
630 * @param addr the hostname's IP address, as u32_t (instead of ip_addr_t to
636 dns_lookup(const char *name, ip_addr_t *addr LWIP_DNS_ADDRTYPE_ARG(u8_t dns_addrtype))
640 if (dns_lookup_local(name, addr LWIP_DNS_ADDRTYPE_ARG(dns_addrtype)) == ERR_OK) {
645 if (DNS_LOOKUP_LOCAL_EXTERN(name, addr, LWIP_DNS_ADDRTYPE_ARG_OR_ZERO(dns_addrtype)) == ERR_OK) {
658 if (addr) {
659 ip_addr_copy(*addr, dns_table[i].ipaddr);
929 local_addr.u_addr.ip4.addr = ipaddr_addr(LOCAL_SERVER_IP);
932 local_addr.addr = ipaddr_addr(LOCAL_SERVER_IP);
1032 * @param addr IP address for the hostname (or NULL on error or memory shortage)
1035 dns_call_found(u8_t idx, ip_addr_t *addr)
1042 if (addr != NULL) {
1044 if (IP_IS_V6_VAL(*addr)) {
1057 (*dns_requests[i].found)(dns_table[idx].name, addr, dns_requests[i].arg);
1064 (*dns_requests[idx].found)(dns_table[idx].name, addr, dns_requests[idx].arg);
1263 dns_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port)
1317 if (addr->type != IPADDR_TYPE_V4 || addr->u_addr.ip4.addr != ipaddr_addr(LOCAL_SERVER_IP) ||
1322 if (addr->addr != ipaddr_addr(LOCAL_SERVER_IP) || port != get_local_udp_server_port()) {
1327 if (!ip_addr_cmp(addr, &dns_servers[entry->server_idx])) {
1332 if (!ip_addr_cmp(addr, &dns_servers[entry->server_idx])) {
1630 * @param addr pointer to a ip_addr_t where to store the address if it is already
1638 dns_gethostbyname(const char *hostname, ip_addr_t *addr, dns_found_callback found,
1641 return dns_gethostbyname_addrtype(hostname, addr, found, callback_arg, LWIP_DNS_ADDRTYPE_DEFAULT);
1648 * @param addr pointer to a ip_addr_t where to store the address if it is already
1659 dns_gethostbyname_addrtype(const char *hostname, ip_addr_t *addr, dns_found_callback found,
1666 /* not initialized or no valid server yet, or invalid addr pointer
1668 if ((addr == NULL) ||
1686 ip_addr_set_loopback(LWIP_DNS_ADDRTYPE_IS_IPV6(dns_addrtype), addr);
1691 /* host name already in octet notation? set ip addr and return ERR_OK */
1692 if (ipaddr_aton(hostname, addr)) {
1694 if ((IP_IS_V6(addr) && (dns_addrtype != LWIP_DNS_ADDRTYPE_IPV4)) ||
1695 (IP_IS_V4(addr) && (dns_addrtype != LWIP_DNS_ADDRTYPE_IPV6)))
1702 if (dns_lookup(hostname, addr LWIP_DNS_ADDRTYPE_ARG(dns_addrtype)) == ERR_OK) {
1714 if (dns_lookup(hostname, addr LWIP_DNS_ADDRTYPE_ARG(fallback)) == ERR_OK) {