mDNS is kinda fun


I've been writing mDNS and uPNP code this past week. It's kinda fun. I've been using a hacked-up version of pyzeroconf which breaks out the multicast, dns and mdns stuff so that multicast-but-not-zeroconf code can use the same code paths as the zeroconf code. Sample code for doing a basic multi-cast but not mDNS operation is available :) . The mDNS stuff is a little more involved, basically you set up a chain of DNS records: PTR -> SVC -> A and SVC -> TXT and when a client wants to find a service type (PTR) they broadcast the request and anyone who has a PTR for that service-type responds with PTR records (and if they want screwed up hardware to work, the other records too). The samples would be a lot more impressive if we had netifaces installed by default, but they work as long as you specify the IP on which to listen/to which to restrict the multicast.

Comments

  1. Kevin Shah

    Kevin Shah on 11/19/2010 9:43 a.m. #

    for ipv4 or ipv6?

  2. Mike Fletcher

    Mike Fletcher on 11/19/2010 7:36 p.m. #

    Just IPv4 for now.

  3. matthieu526

    matthieu526 on 09/28/2012 4:36 a.m. #

    Hello!

    Is it possible to write mDNS queries in PHP?
    I want to "launch" an mDSN request but just by coding in some programmation language.

Comments are closed.

Pingbacks

Pingbacks are closed.