mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-09-13 02:05:43 +00:00
Finish porting MDNS to new netif client data API
This commit is contained in:
parent
c28fb298b7
commit
ee815e4e7a
@ -1170,9 +1170,9 @@ static err_t
|
|||||||
mdns_add_aaaa_answer(struct mdns_outpacket *reply, u16_t cache_flush, struct netif *netif, int addrindex)
|
mdns_add_aaaa_answer(struct mdns_outpacket *reply, u16_t cache_flush, struct netif *netif, int addrindex)
|
||||||
{
|
{
|
||||||
struct mdns_domain host;
|
struct mdns_domain host;
|
||||||
mdns_build_host_domain(&host, netif->mdns);
|
mdns_build_host_domain(&host, (struct mdns_host*)netif->client_data[mdns_netif_client_id]);
|
||||||
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: Responding with AAAA record\n"));
|
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: Responding with AAAA record\n"));
|
||||||
return mdns_add_answer(reply, &host, DNS_RRTYPE_AAAA, DNS_RRCLASS_IN, cache_flush, netif->mdns->dns_ttl, (const u8_t *) netif_ip6_addr(netif, addrindex), sizeof(ip6_addr_t), NULL);
|
return mdns_add_answer(reply, &host, DNS_RRTYPE_AAAA, DNS_RRCLASS_IN, cache_flush, ((struct mdns_host*)netif->client_data[mdns_netif_client_id])->dns_ttl, (const u8_t *) netif_ip6_addr(netif, addrindex), sizeof(ip6_addr_t), NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Write a x.y.z.ip6.arpa -> hostname.local PTR RR to outpacket */
|
/** Write a x.y.z.ip6.arpa -> hostname.local PTR RR to outpacket */
|
||||||
@ -1180,10 +1180,10 @@ static err_t
|
|||||||
mdns_add_hostv6_ptr_answer(struct mdns_outpacket *reply, u16_t cache_flush, struct netif *netif, int addrindex)
|
mdns_add_hostv6_ptr_answer(struct mdns_outpacket *reply, u16_t cache_flush, struct netif *netif, int addrindex)
|
||||||
{
|
{
|
||||||
struct mdns_domain host, revhost;
|
struct mdns_domain host, revhost;
|
||||||
mdns_build_host_domain(&host, netif->mdns);
|
mdns_build_host_domain(&host, (struct mdns_host*)netif->client_data[mdns_netif_client_id]);
|
||||||
mdns_build_reverse_v6_domain(&revhost, netif_ip6_addr(netif, addrindex));
|
mdns_build_reverse_v6_domain(&revhost, netif_ip6_addr(netif, addrindex));
|
||||||
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: Responding with v6 PTR record\n"));
|
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: Responding with v6 PTR record\n"));
|
||||||
return mdns_add_answer(reply, &revhost, DNS_RRTYPE_PTR, DNS_RRCLASS_IN, cache_flush, netif->mdns->dns_ttl, NULL, 0, &host);
|
return mdns_add_answer(reply, &revhost, DNS_RRTYPE_PTR, DNS_RRCLASS_IN, cache_flush, ((struct mdns_host*)netif->client_data[mdns_netif_client_id])->dns_ttl, NULL, 0, &host);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user