From 9c48c83701756ba412822c799ccbb0f93447e289 Mon Sep 17 00:00:00 2001 From: Alvaro Saurin Date: Mon, 27 Apr 2015 13:28:47 +0200 Subject: [PATCH] Interfaces for the mDNS client and server --- nameserver/mdns.go | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 nameserver/mdns.go diff --git a/nameserver/mdns.go b/nameserver/mdns.go new file mode 100644 index 00000000..e476fb4f --- /dev/null +++ b/nameserver/mdns.go @@ -0,0 +1,28 @@ +package nameserver + +import "net" + +// A basic mDNS service +type ZoneMDNS interface { + // Start the service + Start(*net.Interface) error + // Stop the service + Stop() error +} + +// A mDNS server +type ZoneMDNSServer interface { + ZoneMDNS + // Return the Zone database used by the server + Zone() Zone +} + +// A mDNS client interface +type ZoneMDNSClient interface { + ZoneMDNS + ZoneLookup + // Perform an insistent lookup for a name + InsistentLookupName(name string) ([]ZoneRecord, error) + // Perform an insistent lookup for a reverse address + InsistentLookupInaddr(inaddr string) ([]ZoneRecord, error) +}