Commit Graph

21 Commits

Author SHA1 Message Date
Martin Garton
bf498197cb Allow timeout to complete
When the timeout it reached, the query can still fail to complete if the
caller isn't consuming the results from the channel.  This change allows
the query to exit in any case.
2016-09-28 20:27:32 +01:00
Asim
d37bec73c9 Fix the udp6 binding error 2016-05-01 19:45:12 +01:00
Asim
f4bad1caf6 Add the probing, announcements and shutdown. Add client Listen which can be used for a watcher 2016-05-01 18:55:42 +01:00
Asim
2963a9d96a We don't care about these messages either 2016-04-30 12:24:37 +01:00
Asim
6304000b09 Strip verbose close message 2016-04-30 12:22:29 +01:00
Asim
28e58969dc use official golang/net https://github.com/hashicorp/mdns/pull/45 2016-04-29 23:37:04 +01:00
Asim
b8712a0af4 Add https://github.com/hashicorp/mdns/pull/50 2016-04-29 23:34:13 +01:00
Michael Stapelberg
83d7e99a21 Expose rr.Txt as []string instead of joining it with “|”.
Joining the different fields into a single string is problematic when
the fields contain the separator character “|” themselves.

As an example, I’ve named my chromecast “Hendrix|test”, and this happens
when I print a ServiceEntry:

ServiceEntry: &{Name:Hendrix|test._googlecast._tcp.local. Host:Hendrix|test.local. AddrV4:10.0.0.184 AddrV6:<nil> Port:8009 Info:id=3fc948dbfebcf5d7ec77d7b043dce81e|ve=04|md=Chromecast Audio|ic=/setup/icon.png|fn=Hendrix|test|ca=4|st=0|bs=FA8FCA928304|rs= Addr:10.0.0.184 hasTXT:true sent:true}

When using strings.Split, I would not correctly parse the fn= field.

With the new InfoFields member, this problem can be avoided entirely.
2015-11-27 17:21:23 +01:00
Patrick Tsai
e4fb98e255 Consider additional section when merging RR for a service entry 2015-03-16 01:38:10 -07:00
Ryan Uber
d83f28beed Switch to fork of go.net 2014-11-03 11:36:47 -08:00
Red Daly
6f752e8251 Refactor client.go.
- Add WantUnicastResponse to allow sending mDNS queries that desire unicast
  responses (see section 5.4 in RFC6762).
- Listen for UDP packets sent to the mDNS multicast addresses ("ipv4:
  224.0.0.251", ipv6: "ff02::fb")
- Fix bug on line 177 of client.go: Ignored error during sendQuery.
- Add TODO comments regarding unimplemented features of mDNS protocol.
- Add error logging statement when DNS packet parsing failed.
2014-10-15 14:49:00 -07:00
Armon Dadgar
f5542c2469 Merge pull request #12 from richtr/improved_dns_srv_formatting
Pull request for issue #4
2014-09-13 15:38:04 -07:00
Armon Dadgar
c4aa495dc0 Merge pull request #10 from richtr/no_recursive_dns
Suppress recursive mDNS queries and query for PTR records only
2014-09-13 15:34:53 -07:00
richtr
a8a4397315 General updates to DNS SRV handling and decreased reliance on IP addressing (use FQDNs where we can) 2014-09-11 14:16:20 +02:00
richtr
256fad4daf Suppress recursive mDNS queries and query for PTR records only 2014-09-11 13:29:21 +02:00
Armon Dadgar
decec489d7 Fixing issue with query flooding 2014-07-10 10:58:39 -07:00
Armon Dadgar
847afc6720 Re-write the name of the service for correct lookups 2014-05-22 10:51:59 -07:00
Armon Dadgar
4cb233f48b Fixing aliasing issues 2014-05-20 11:38:15 -07:00
Armon Dadgar
8be7e3ac4e Client sets the default domain if not provided 2014-02-25 14:19:05 -08:00
Armon Dadgar
9215784091 Adding ability to set multicast query interface 2014-02-25 14:16:06 -08:00
Armon Dadgar
c1e906499b Adding a simple client 2014-01-29 15:57:37 -08:00