Revert "Add ipv6 to windows mdns."
This commit is contained in:
parent
bcf3c519de
commit
d083f38f54
|
@ -1,7 +1,6 @@
|
||||||
#include "tinysvcmdns.h"
|
#include "tinysvcmdns.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "mdns.h"
|
|
||||||
#include "mdnsd.h"
|
#include "mdnsd.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,32 +23,6 @@ void TinySVCMDNS::CreateMdnsd(uint32_t ipv4, QString ipv6) {
|
||||||
QString(host + ".local").toUtf8().constData(),
|
QString(host + ".local").toUtf8().constData(),
|
||||||
ipv4);
|
ipv4);
|
||||||
|
|
||||||
// Add entry for ipv4
|
|
||||||
struct rr_entry *a2_e = NULL;
|
|
||||||
a2_e = rr_create_a(create_nlabel(hostname), ipv4);
|
|
||||||
mdnsd_add_rr(mdnsd, a2_e);
|
|
||||||
|
|
||||||
// Add entry for ipv6
|
|
||||||
struct rr_entry *aaaa_e = NULL;
|
|
||||||
|
|
||||||
struct addrinfo hints;
|
|
||||||
memset(&hints, 0, sizeof(hints));
|
|
||||||
hints.ai_family = AF_INET6;
|
|
||||||
hints.ai_flags = AI_NUMERICHOST;
|
|
||||||
struct addrinfo* results;
|
|
||||||
getaddrinfo(
|
|
||||||
ipv6.toStdString().c_str(),
|
|
||||||
NULL,
|
|
||||||
&hints,
|
|
||||||
&results);
|
|
||||||
struct sockaddr_in6* addr = (struct sockaddr_in6*)results->ai_addr;
|
|
||||||
struct in6_addr v6addr = addr->sin6_addr;
|
|
||||||
freeaddrinfo(results);
|
|
||||||
|
|
||||||
aaaa_e = rr_create_aaaa(create_nlabel(hostname), &v6addr);
|
|
||||||
|
|
||||||
mdnsd_add_rr(mdnsd, aaaa_e);
|
|
||||||
|
|
||||||
// Add to the list
|
// Add to the list
|
||||||
mdnsd_.append(mdnsd);
|
mdnsd_.append(mdnsd);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
#include <QList>
|
#include <QList>
|
||||||
|
|
||||||
struct mdnsd;
|
struct mdnsd;
|
||||||
struct rr_entry;
|
|
||||||
|
|
||||||
class TinySVCMDNS : public Zeroconf {
|
class TinySVCMDNS : public Zeroconf {
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Reference in New Issue