--- a/util/Zeroconf.py Mon Aug 21 21:55:18 2017 +0300
+++ b/util/Zeroconf.py Mon Aug 21 22:41:37 2017 +0300
@@ -1,82 +1,78 @@
-""" Multicast DNS Service Discovery for Python, v0.12
- Copyright (C) 2003, Paul Scott-Murphy
-
- This module provides a framework for the use of DNS Service Discovery
- using IP multicast. It has been tested against the JRendezvous
- implementation from <a href="http://strangeberry.com">StrangeBerry</a>,
- and against the mDNSResponder from Mac OS X 10.3.8.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-"""
-
-"""0.12 update - allow selection of binding interface
- typo fix - Thanks A. M. Kuchlingi
- removed all use of word 'Rendezvous' - this is an API change"""
-
-"""0.11 update - correction to comments for addListener method
- support for new record types seen from OS X
- - IPv6 address
- - hostinfo
- ignore unknown DNS record types
- fixes to name decoding
- works alongside other processes using port 5353 (e.g. on Mac OS X)
- tested against Mac OS X 10.3.2's mDNSResponder
- corrections to removal of list entries for service browser"""
-
-"""0.10 update - Jonathon Paisley contributed these corrections:
- always multicast replies, even when query is unicast
- correct a pointer encoding problem
- can now write records in any order
- traceback shown on failure
- better TXT record parsing
- server is now separate from name
- can cancel a service browser
-
- modified some unit tests to accommodate these changes"""
-
-"""0.09 update - remove all records on service unregistration
- fix DOS security problem with readName"""
-
-"""0.08 update - changed licensing to LGPL"""
-
-"""0.07 update - faster shutdown on engine
- pointer encoding of outgoing names
- ServiceBrowser now works
- new unit tests"""
-
-"""0.06 update - small improvements with unit tests
- added defined exception types
- new style objects
- fixed hostname/interface problem
- fixed socket timeout problem
- fixed addServiceListener() typo bug
- using select() for socket reads
- tested on Debian unstable with Python 2.2.2"""
-
-"""0.05 update - ensure case insensitivty on domain names
- support for unicast DNS queries"""
-
-"""0.04 update - added some unit tests
- added __ne__ adjuncts where required
- ensure names end in '.local.'
- timeout on receiving socket for clean shutdown"""
-
-__author__ = "Paul Scott-Murphy"
-__email__ = "paul at scott dash murphy dot com"
-__version__ = "0.12"
+# Multicast DNS Service Discovery for Python, v0.12
+# Copyright (C) 2003, Paul Scott-Murphy
+#
+# This module provides a framework for the use of DNS Service Discovery
+# using IP multicast. It has been tested against the JRendezvous
+# implementation from <a href="http://strangeberry.com">StrangeBerry</a>,
+# and against the mDNSResponder from Mac OS X 10.3.8.
+
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+#
+#
+# 0.12 update - allow selection of binding interface
+# typo fix - Thanks A. M. Kuchlingi
+# removed all use of word 'Rendezvous' - this is an API change
+#
+# 0.11 update - correction to comments for addListener method
+# support for new record types seen from OS X
+# - IPv6 address
+# - hostinfo
+# ignore unknown DNS record types
+# fixes to name decoding
+# works alongside other processes using port 5353 (e.g. on Mac OS X)
+# tested against Mac OS X 10.3.2's mDNSResponder
+# corrections to removal of list entries for service browser
+#
+# 0.10 update - Jonathon Paisley contributed these corrections:
+# always multicast replies, even when query is unicast
+# correct a pointer encoding problem
+# can now write records in any order
+# traceback shown on failure
+# better TXT record parsing
+# server is now separate from name
+# can cancel a service browser
+#
+# modified some unit tests to accommodate these changes
+#
+# 0.09 update - remove all records on service unregistration
+# fix DOS security problem with readName
+#
+# 0.08 update - changed licensing to LGPL
+#
+# 0.07 update - faster shutdown on engine
+# pointer encoding of outgoing names
+# ServiceBrowser now works
+# new unit tests
+#
+# 0.06 update - small improvements with unit tests
+# added defined exception types
+# new style objects
+# fixed hostname/interface problem
+# fixed socket timeout problem
+# fixed addServiceListener() typo bug
+# using select() for socket reads
+# tested on Debian unstable with Python 2.2.2
+#
+# 0.05 update - ensure case insensitivty on domain names
+# support for unicast DNS queries
+#
+# 0.04 update - added some unit tests
+# added __ne__ adjuncts where required
+# ensure names end in '.local.'
+# timeout on receiving socket for clean shutdown
import string
import time
@@ -86,6 +82,12 @@
import select
import traceback
+
+__author__ = "Paul Scott-Murphy"
+__email__ = "paul at scott dash murphy dot com"
+__version__ = "0.12"
+
+
__all__ = ["Zeroconf", "ServiceInfo", "ServiceBrowser"]
# hook for threads