Project import
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..e03fbfa
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,177 @@
+#
+#    Copyright (c) 2010-2011 Nest, Inc.
+#    All rights reserved.
+#
+#    This document is the property of Nest. It is considered
+#    confidential and proprietary information.
+#
+#    This document may not be reproduced or transmitted in any form,
+#    in whole or in part, without the express written permission of
+#    Nest.
+#
+#    Description:
+#      This file is the makefile for the Avahi ZeroConf (aka Bonjour)
+#      multicast DNS (mDNS) Service Discovery (SD) software.
+#
+
+BuildConfigSpecialized	:= No
+BuildProductSpecialized	:= No
+
+include pre.mak
+
+PackageName		:= avahi
+
+PackageExtension	:= tar.gz
+PackageSeparator	:= -
+
+PackagePatchArgs	:= -p1
+
+PackageArchive		:= $(PackageName).$(PackageExtension)
+PackageSourceDir	:= $(PackageName)$(PackageSeparator)$(PackageVersion)/
+
+PackageBuildMakefile	= $(call GenerateBuildPaths,Makefile)
+
+CleanPaths		+= $(PackageLicenseFile)
+
+DbusDir			:= sw/tps/dbus
+DbusIncDir		:= $(call GenerateResultPaths,$(DbusDir),usr/include/dbus-1.0)
+DbusArchIncDir		:= $(call GenerateResultPaths,$(DbusDir),usr/lib/dbus-1.0/include)
+DbusLibDir		:= $(call GenerateResultPaths,$(DbusDir),usr/lib)
+
+ExpatDir		:= sw/tps/expat
+ExpatIncDir		= $(call GenerateResultPaths,$(ExpatDir),usr/include)
+ExpatLibDir		= $(call GenerateResultPaths,$(ExpatDir),usr/lib)
+
+LibCapDir		:= sw/tps/libcap
+LibCapIncDir		= $(call GenerateResultPaths,$(LibCapDir),usr/include)
+LibCapLibDir		= $(call GenerateResultPaths,$(LibCapDir),lib)
+
+LibDaemonDir		:= sw/tps/libdaemon
+LibDaemonIncDir		= $(call GenerateResultPaths,$(LibDaemonDir),usr/include)
+LibDaemonLibDir		= $(call GenerateResultPaths,$(LibDaemonDir),usr/lib)
+
+all: $(PackageDefaultGoal)
+
+# Generate the package license contents.
+
+$(PackageSourceDir)/LICENSE: source
+
+$(PackageLicenseFile): $(PackageSourceDir)/LICENSE
+	$(copy-result)
+
+# Extract the source from the archive and apply patches, if any.
+
+$(PackageSourceDir): $(PackageArchive) $(PackagePatchPaths)
+	$(expand-and-patch-package)
+
+# Prepare the sources.
+
+.PHONY: source
+source: | $(PackageSourceDir)
+
+# Patch the sources, if necessary.
+
+.PHONY: patch
+patch: source
+
+# Generate the package build makefile.
+
+$(PackageBuildMakefile): | $(PackageSourceDir) $(BuildDirectory)
+	$(Verbose)cd $(BuildDirectory) && \
+	$(CURDIR)/$(PackageSourceDir)/configure \
+	CC="$(CC)" CXX="$(CXX)" AR=$(AR) RANLIB=$(RANLIB) STRIP=$(STRIP) \
+	INSTALL="$(INSTALL) $(INSTALLFLAGS)" \
+	CPPFLAGS="-I$(ExpatIncDir) -I$(LibCapIncDir)" \
+	LDFLAGS="-L$(ExpatLibDir) -L$(LibCapLibDir)" \
+	DBUS_CFLAGS="-I$(DbusIncDir) -I$(DbusArchIncDir)" \
+	DBUS_LIBS="-L$(DbusLibDir) -ldbus-1" \
+	DBUS_VERSION=$(shell cat $(BuildRoot)/$(DbusDir)/dbus.version) \
+	LIBDAEMON_CFLAGS="-I$(LibDaemonIncDir)" \
+	LIBDAEMON_LIBS="-L$(LibDaemonLibDir) -ldaemon" \
+	--build=$(HostTuple) \
+	--host=$(TargetTuple) \
+	--disable-autoipd \
+	--disable-gdbm \
+	--disable-glib \
+	--disable-gobject \
+	--disable-gtk \
+	--disable-gtk3 \
+	--disable-manpages \
+	--disable-mono \
+	--disable-monodoc \
+	--disable-python \
+	--disable-qt3 \
+	--disable-qt4 \
+	--enable-dbus \
+	--enable-libdaemon \
+	--with-distro=none \
+	--with-xml=expat \
+	--prefix=/usr \
+	--sysconfdir=/etc \
+	--localstatedir=/var
+
+# Configure the source for building.
+#
+# Avahi uses and, in fact, requires pkg-config to set-up LDFLAGS and
+# CFLAGS for LIBDAEMON even though these are explicitly provided on
+# the configure command line above as prescribed in the "how to
+# configure WITHOUT pkg-config" instructions.
+#
+# Unfortunately, some site Linux systems are quite old and have a
+# version of pkg-config that avahi refuses to work with.
+# Consequently, we place $(HostBinDir) first in the path to ensure
+# that the project-local version of pkg-config is detected and used
+# rather than a host- or site-local version.
+
+configure: PATH := $(HostBinDir):$(PATH)
+
+.PHONY: configure
+configure: source $(PackageBuildMakefile)
+
+# Build the source.
+#
+# We have to unset MAKEFLAGS since they confuse the package build otherwise.
+
+.PHONY: build
+build: configure
+	$(Verbose)unset MAKEFLAGS && \
+	$(MAKE) $(JOBSFLAG) -C $(BuildDirectory) all
+
+# Stage the build to a temporary installation area.
+#
+# We have to unset MAKEFLAGS since they confuse the package build otherwise.
+#
+# We explictly remove 'libavahi-core.la' and 'libavahi-common.la'
+# because some packages that depend on these libraries use libtool. If
+# libtool finds a '*.la' file for a library, it uses the value of
+# 'libdir=<dir>' it finds. In our case, since '--prefix=/usr' this
+# value is '/usr/lib'. It then resolves '-lavahi-core' or
+# '-lavahi-common' to '/usr/lib/libavahi-core.so' and
+# '/usr/lib/libavahi-common.so', respectively. In a cross-compilation
+# environment, this is likely to be neither the right architecture nor
+# the right version to link against. In short, we lose.
+#
+# We could also handle this by removing DESTDIR and setting the prefix
+# to $(ResultDirectory); however, that results in libtool hard-coding
+# $(ResultDirectory) as the RPATH in the linked executables which is
+# NOT what we want either. We lose again.
+#
+# By removing the '*.la' file, we win by ensuring neither a misdirected
+# link nor an RPATH.
+
+.PHONY: stage
+stage: build | $(ResultDirectory)
+	$(Verbose)unset MAKEFLAGS && \
+	$(MAKE) $(JOBSFLAG) -C $(BuildDirectory) DESTDIR=$(ResultDirectory) install
+	$(Verbose)$(RM) $(RMFLAGS) $(call GenerateResultPaths,,usr/lib/libavahi-common.la usr/lib/libavahi-core.la usr/lib/libavahi-client.la)
+
+
+clean:
+	$(Verbose)$(RM) $(RMFLAGS) -r $(PackageSourceDir)
+	$(Verbose)$(RM) $(RMFLAGS) -r $(BuildDirectory)
+	$(Verbose)$(RM) $(RMFLAGS) -r $(ResultDirectory)
+
+include post.mak
+
+
+
diff --git a/avahi-0.6.31/ABOUT-NLS b/avahi-0.6.31/ABOUT-NLS
new file mode 100644
index 0000000..b1de1b6
--- /dev/null
+++ b/avahi-0.6.31/ABOUT-NLS
@@ -0,0 +1,1282 @@
+1 Notes on the Free Translation Project
+***************************************
+
+Free software is going international!  The Free Translation Project is
+a way to get maintainers of free software, translators, and users all
+together, so that free software will gradually become able to speak many
+languages.  A few packages already provide translations for their
+messages.
+
+   If you found this `ABOUT-NLS' file inside a distribution, you may
+assume that the distributed package does use GNU `gettext' internally,
+itself available at your nearest GNU archive site.  But you do _not_
+need to install GNU `gettext' prior to configuring, installing or using
+this package with messages translated.
+
+   Installers will find here some useful hints.  These notes also
+explain how users should proceed for getting the programs to use the
+available translations.  They tell how people wanting to contribute and
+work on translations can contact the appropriate team.
+
+1.1 INSTALL Matters
+===================
+
+Some packages are "localizable" when properly installed; the programs
+they contain can be made to speak your own native language.  Most such
+packages use GNU `gettext'.  Other packages have their own ways to
+internationalization, predating GNU `gettext'.
+
+   By default, this package will be installed to allow translation of
+messages.  It will automatically detect whether the system already
+provides the GNU `gettext' functions.  Installers may use special
+options at configuration time for changing the default behaviour.  The
+command:
+
+     ./configure --disable-nls
+
+will _totally_ disable translation of messages.
+
+   When you already have GNU `gettext' installed on your system and run
+configure without an option for your new package, `configure' will
+probably detect the previously built and installed `libintl' library
+and will decide to use it.  If not, you may have to to use the
+`--with-libintl-prefix' option to tell `configure' where to look for it.
+
+   Internationalized packages usually have many `po/LL.po' files, where
+LL gives an ISO 639 two-letter code identifying the language.  Unless
+translations have been forbidden at `configure' time by using the
+`--disable-nls' switch, all available translations are installed
+together with the package.  However, the environment variable `LINGUAS'
+may be set, prior to configuration, to limit the installed set.
+`LINGUAS' should then contain a space separated list of two-letter
+codes, stating which languages are allowed.
+
+1.2 Using This Package
+======================
+
+As a user, if your language has been installed for this package, you
+only have to set the `LANG' environment variable to the appropriate
+`LL_CC' combination.  If you happen to have the `LC_ALL' or some other
+`LC_xxx' environment variables set, you should unset them before
+setting `LANG', otherwise the setting of `LANG' will not have the
+desired effect.  Here `LL' is an ISO 639 two-letter language code, and
+`CC' is an ISO 3166 two-letter country code.  For example, let's
+suppose that you speak German and live in Germany.  At the shell
+prompt, merely execute `setenv LANG de_DE' (in `csh'),
+`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
+This can be done from your `.login' or `.profile' file, once and for
+all.
+
+   You might think that the country code specification is redundant.
+But in fact, some languages have dialects in different countries.  For
+example, `de_AT' is used for Austria, and `pt_BR' for Brazil.  The
+country code serves to distinguish the dialects.
+
+   The locale naming convention of `LL_CC', with `LL' denoting the
+language and `CC' denoting the country, is the one use on systems based
+on GNU libc.  On other systems, some variations of this scheme are
+used, such as `LL' or `LL_CC.ENCODING'.  You can get the list of
+locales supported by your system for your language by running the
+command `locale -a | grep '^LL''.
+
+   Not all programs have translations for all languages.  By default, an
+English message is shown in place of a nonexistent translation.  If you
+understand other languages, you can set up a priority list of languages.
+This is done through a different environment variable, called
+`LANGUAGE'.  GNU `gettext' gives preference to `LANGUAGE' over `LANG'
+for the purpose of message handling, but you still need to have `LANG'
+set to the primary language; this is required by other parts of the
+system libraries.  For example, some Swedish users who would rather
+read translations in German than English for when Swedish is not
+available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
+
+   Special advice for Norwegian users: The language code for Norwegian
+bokma*l changed from `no' to `nb' recently (in 2003).  During the
+transition period, while some message catalogs for this language are
+installed under `nb' and some older ones under `no', it's recommended
+for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and
+older translations are used.
+
+   In the `LANGUAGE' environment variable, but not in the `LANG'
+environment variable, `LL_CC' combinations can be abbreviated as `LL'
+to denote the language's main dialect.  For example, `de' is equivalent
+to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
+(Portuguese as spoken in Portugal) in this context.
+
+1.3 Translating Teams
+=====================
+
+For the Free Translation Project to be a success, we need interested
+people who like their own language and write it well, and who are also
+able to synergize with other translators speaking the same language.
+Each translation team has its own mailing list.  The up-to-date list of
+teams can be found at the Free Translation Project's homepage,
+`http://translationproject.org/', in the "Teams" area.
+
+   If you'd like to volunteer to _work_ at translating messages, you
+should become a member of the translating team for your own language.
+The subscribing address is _not_ the same as the list itself, it has
+`-request' appended.  For example, speakers of Swedish can send a
+message to `sv-request@li.org', having this message body:
+
+     subscribe
+
+   Keep in mind that team members are expected to participate
+_actively_ in translations, or at solving translational difficulties,
+rather than merely lurking around.  If your team does not exist yet and
+you want to start one, or if you are unsure about what to do or how to
+get started, please write to `coordinator@translationproject.org' to
+reach the coordinator for all translator teams.
+
+   The English team is special.  It works at improving and uniformizing
+the terminology in use.  Proven linguistic skills are praised more than
+programming skills, here.
+
+1.4 Available Packages
+======================
+
+Languages are not equally supported in all packages.  The following
+matrix shows the current state of internationalization, as of June
+2010.  The matrix shows, in regard of each package, for which languages
+PO files have been submitted to translation coordination, with a
+translation percentage of at least 50%.
+
+     Ready PO files       af am an ar as ast az be be@latin bg bn_IN bs ca
+                        +--------------------------------------------------+
+     a2ps               |                       []                      [] |
+     aegis              |                                                  |
+     ant-phone          |                                                  |
+     anubis             |                                                  |
+     aspell             |                []                             [] |
+     bash               |                                                  |
+     bfd                |                                                  |
+     bibshelf           |                []                                |
+     binutils           |                                                  |
+     bison              |                                                  |
+     bison-runtime      |                []                                |
+     bluez-pin          | []             []                                |
+     bombono-dvd        |                                                  |
+     buzztard           |                                                  |
+     cflow              |                                                  |
+     clisp              |                                                  |
+     coreutils          |                                   []          [] |
+     cpio               |                                                  |
+     cppi               |                                                  |
+     cpplib             |                                               [] |
+     cryptsetup         |                                                  |
+     dfarc              |                                                  |
+     dialog             |                             []                [] |
+     dico               |                                                  |
+     diffutils          |                                               [] |
+     dink               |                                                  |
+     doodle             |                                                  |
+     e2fsprogs          |                                               [] |
+     enscript           |                                               [] |
+     exif               |                                                  |
+     fetchmail          |                                               [] |
+     findutils          |                                   []             |
+     flex               |                                               [] |
+     freedink           |                                                  |
+     gas                |                                                  |
+     gawk               |                []                             [] |
+     gcal               |                                               [] |
+     gcc                |                                                  |
+     gettext-examples   | []             []                 []          [] |
+     gettext-runtime    |                                   []          [] |
+     gettext-tools      |                                   []          [] |
+     gip                |                                   []             |
+     gjay               |                                                  |
+     gliv               |                                   []             |
+     glunarclock        |                []                 []             |
+     gnubiff            |                                                  |
+     gnucash            |                                               [] |
+     gnuedu             |                                                  |
+     gnulib             |                                                  |
+     gnunet             |                                                  |
+     gnunet-gtk         |                                                  |
+     gnutls             |                                                  |
+     gold               |                                                  |
+     gpe-aerial         |                                                  |
+     gpe-beam           |                                                  |
+     gpe-bluetooth      |                                                  |
+     gpe-calendar       |                                                  |
+     gpe-clock          |                []                                |
+     gpe-conf           |                                                  |
+     gpe-contacts       |                                                  |
+     gpe-edit           |                                                  |
+     gpe-filemanager    |                                                  |
+     gpe-go             |                                                  |
+     gpe-login          |                                                  |
+     gpe-ownerinfo      |                []                                |
+     gpe-package        |                                                  |
+     gpe-sketchbook     |                                                  |
+     gpe-su             |                []                                |
+     gpe-taskmanager    |                []                                |
+     gpe-timesheet      |                []                                |
+     gpe-today          |                []                                |
+     gpe-todo           |                                                  |
+     gphoto2            |                                                  |
+     gprof              |                                   []             |
+     gpsdrive           |                                                  |
+     gramadoir          |                                                  |
+     grep               |                                                  |
+     grub               |                []                             [] |
+     gsasl              |                                                  |
+     gss                |                                                  |
+     gst-plugins-bad    |                                   []             |
+     gst-plugins-base   |                                   []             |
+     gst-plugins-good   |                                   []             |
+     gst-plugins-ugly   |                                   []             |
+     gstreamer          | []                                []          [] |
+     gtick              |                                                  |
+     gtkam              |                       []                         |
+     gtkorphan          |                                   []             |
+     gtkspell           | []             []     []                         |
+     gutenprint         |                                                  |
+     hello              |                                   []             |
+     help2man           |                                                  |
+     hylafax            |                                                  |
+     idutils            |                                                  |
+     indent             |                                   []          [] |
+     iso_15924          |                                                  |
+     iso_3166           | []          []        []          []  []   [] [] |
+     iso_3166_2         |                                                  |
+     iso_4217           |                                                  |
+     iso_639            |             [] []     []              []         |
+     iso_639_3          |                                                  |
+     jwhois             |                                                  |
+     kbd                |                                                  |
+     keytouch           |                                               [] |
+     keytouch-editor    |                                                  |
+     keytouch-keyboa... |                                               [] |
+     klavaro            |          []                                      |
+     latrine            |                                                  |
+     ld                 |                                   []             |
+     leafpad            |                                   []          [] |
+     libc               |                                   []          [] |
+     libexif            |                       ()                         |
+     libextractor       |                                                  |
+     libgnutls          |                                                  |
+     libgpewidget       |                                                  |
+     libgpg-error       |                                                  |
+     libgphoto2         |                                                  |
+     libgphoto2_port    |                                                  |
+     libgsasl           |                                                  |
+     libiconv           |                                   []             |
+     libidn             |                                                  |
+     lifelines          |                                                  |
+     liferea            |                             []                [] |
+     lilypond           |                                                  |
+     linkdr             |          []                                      |
+     lordsawar          |                                                  |
+     lprng              |                                                  |
+     lynx               |                                               [] |
+     m4                 |                                                  |
+     mailfromd          |                                                  |
+     mailutils          |                                                  |
+     make               |                                                  |
+     man-db             |                                                  |
+     man-db-manpages    |                                                  |
+     minicom            |                                                  |
+     mkisofs            |                                                  |
+     myserver           |                                                  |
+     nano               |                                   []          [] |
+     opcodes            |                                                  |
+     parted             |                                                  |
+     pies               |                                                  |
+     popt               |                                                  |
+     psmisc             |                                                  |
+     pspp               |                                               [] |
+     pwdutils           |                                                  |
+     radius             |                                               [] |
+     recode             |                       []                      [] |
+     rosegarden         |                                                  |
+     rpm                |                                                  |
+     rush               |                                                  |
+     sarg               |                                                  |
+     screem             |                                                  |
+     scrollkeeper       |                    [] []                      [] |
+     sed                |                []                             [] |
+     sharutils          |                                   []          [] |
+     shishi             |                                                  |
+     skencil            |                                                  |
+     solfege            |                                                  |
+     solfege-manual     |                                                  |
+     soundtracker       |                                                  |
+     sp                 |                                                  |
+     sysstat            |                                                  |
+     tar                |                                   []             |
+     texinfo            |                                                  |
+     tin                |                                                  |
+     unicode-han-tra... |                                                  |
+     unicode-transla... |                                                  |
+     util-linux-ng      |                                               [] |
+     vice               |                                                  |
+     vmm                |                                                  |
+     vorbis-tools       |                                                  |
+     wastesedge         |                                                  |
+     wdiff              |                                                  |
+     wget               |                       []                      [] |
+     wyslij-po          |                                                  |
+     xchat              |                []     []          []          [] |
+     xdg-user-dirs      | []    []    [] []     []    []    []  []      [] |
+     xkeyboard-config   |                                   []          [] |
+                        +--------------------------------------------------+
+                          af am an ar as ast az be be@latin bg bn_IN bs ca
+                           6  0  1  2  3 19   1 10     3    28   3    1 38
+
+                          crh cs da  de  el en en_GB en_ZA eo es et eu fa
+                        +-------------------------------------------------+
+     a2ps               |     [] []  []  []     []            [] []       |
+     aegis              |        []  []                       []          |
+     ant-phone          |        []  ()                                   |
+     anubis             |        []  []                                   |
+     aspell             |     [] []  []         []            []          |
+     bash               |     []                           [] []          |
+     bfd                |                                     []          |
+     bibshelf           |        []  []                       []          |
+     binutils           |                                     []          |
+     bison              |            []  []                               |
+     bison-runtime      |        []  []  []                      []       |
+     bluez-pin          |     [] []  []  []                [] []          |
+     bombono-dvd        |        []                                       |
+     buzztard           |     [] []  []                                   |
+     cflow              |        []  []                                   |
+     clisp              |        []  []     []                []          |
+     coreutils          |     [] []  []                          []       |
+     cpio               |                                                 |
+     cppi               |                                                 |
+     cpplib             |        []  []                       []          |
+     cryptsetup         |            []                                   |
+     dfarc              |        []  []                       []          |
+     dialog             |        []  []                    [] []    []    |
+     dico               |                                                 |
+     diffutils          |     [] []  []  []                [] []          |
+     dink               |        []  []                       []          |
+     doodle             |            []                                   |
+     e2fsprogs          |     []     []                       []          |
+     enscript           |        []  []         []                        |
+     exif               |     () []  []                                   |
+     fetchmail          |     [] []  ()  []     []            []          |
+     findutils          |     [] []  []                                   |
+     flex               |            []                       []          |
+     freedink           |        []  []                       []          |
+     gas                |                                     []          |
+     gawk               |        []  []                       []          |
+     gcal               |                                     []          |
+     gcc                |            []                       []          |
+     gettext-examples   |            []  []                [] []          |
+     gettext-runtime    |        []  []                    [] []          |
+     gettext-tools      |            []                       []    []    |
+     gip                |        []  []                       []    []    |
+     gjay               |            []                                   |
+     gliv               |     [] []  []                                   |
+     glunarclock        |        []  []                                   |
+     gnubiff            |            ()                                   |
+     gnucash            |     []     ()  ()     ()            ()          |
+     gnuedu             |        []                           []          |
+     gnulib             |            []                       []          |
+     gnunet             |                                                 |
+     gnunet-gtk         |        []                                       |
+     gnutls             |     []     []                                   |
+     gold               |                                     []          |
+     gpe-aerial         |     [] []  []                       []          |
+     gpe-beam           |     [] []  []                       []          |
+     gpe-bluetooth      |        []  []                                   |
+     gpe-calendar       |        []                                       |
+     gpe-clock          |     [] []  []                       []          |
+     gpe-conf           |     [] []  []                                   |
+     gpe-contacts       |        []  []                       []          |
+     gpe-edit           |        []  []                                   |
+     gpe-filemanager    |        []  []                       []          |
+     gpe-go             |     [] []  []                       []          |
+     gpe-login          |        []  []                                   |
+     gpe-ownerinfo      |     [] []  []                       []          |
+     gpe-package        |        []  []                       []          |
+     gpe-sketchbook     |     [] []  []                       []          |
+     gpe-su             |     [] []  []                       []          |
+     gpe-taskmanager    |     [] []  []                       []          |
+     gpe-timesheet      |     [] []  []                       []          |
+     gpe-today          |     [] []  []                       []          |
+     gpe-todo           |        []  []                       []          |
+     gphoto2            |     [] []  ()         []            []    []    |
+     gprof              |        []  []                       []          |
+     gpsdrive           |        []                           [] []       |
+     gramadoir          |        []  []                    []             |
+     grep               |     []                                          |
+     grub               |        []  []                                   |
+     gsasl              |            []                                   |
+     gss                |                                                 |
+     gst-plugins-bad    |     [] []  []                       []    []    |
+     gst-plugins-base   |     [] []  []                       []    []    |
+     gst-plugins-good   |     [] []  []  []                   []    []    |
+     gst-plugins-ugly   |     [] []  []  []                   []    []    |
+     gstreamer          |     [] []  []                       []    []    |
+     gtick              |        []  ()                    []             |
+     gtkam              |     [] []  ()                    [] []          |
+     gtkorphan          |     [] []  []                    []             |
+     gtkspell           |     [] []  []  []                [] []    []    |
+     gutenprint         |        []  []         []                        |
+     hello              |        []  []                    [] []          |
+     help2man           |            []                                   |
+     hylafax            |            []                       []          |
+     idutils            |        []  []                                   |
+     indent             |     [] []  []                    [] [] [] []    |
+     iso_15924          |        []      ()                [] []          |
+     iso_3166           | []  [] []  []  ()                [] [] [] ()    |
+     iso_3166_2         |                ()                               |
+     iso_4217           |     [] []  []  ()                   [] []       |
+     iso_639            | []  [] []  []  ()                [] []          |
+     iso_639_3          | []                                              |
+     jwhois             |                                     []          |
+     kbd                |     [] []  []  []                   []          |
+     keytouch           |        []  []                                   |
+     keytouch-editor    |        []  []                                   |
+     keytouch-keyboa... |        []                                       |
+     klavaro            |     [] []  []                    []             |
+     latrine            |        []  ()                                   |
+     ld                 |        []                           []          |
+     leafpad            |     [] []  []  []                   []    []    |
+     libc               |     [] []  []                       []          |
+     libexif            |        []  []         ()                        |
+     libextractor       |                                                 |
+     libgnutls          |     []                                          |
+     libgpewidget       |        []  []                                   |
+     libgpg-error       |     []     []                                   |
+     libgphoto2         |        []  ()                                   |
+     libgphoto2_port    |        []  ()                             []    |
+     libgsasl           |                                                 |
+     libiconv           |     [] []  []                    []    []       |
+     libidn             |     []     []                    []             |
+     lifelines          |        []  ()                                   |
+     liferea            |     []     []  []                   []    []    |
+     lilypond           |     []     []                       []          |
+     linkdr             |        []  []                       []          |
+     lordsawar          |        []                                       |
+     lprng              |                                                 |
+     lynx               |     [] []  []                          []       |
+     m4                 |     [] []  []  []                               |
+     mailfromd          |                                                 |
+     mailutils          |                                     []          |
+     make               |        []  []                       []          |
+     man-db             |                                                 |
+     man-db-manpages    |                                                 |
+     minicom            |     [] []  []                       []          |
+     mkisofs            |                                                 |
+     myserver           |                                                 |
+     nano               |            []                       []    []    |
+     opcodes            |            []                       []          |
+     parted             |     []     []                                   |
+     pies               |                                                 |
+     popt               |     [] []  []                    [] []          |
+     psmisc             |     []     []                             []    |
+     pspp               |                                     []          |
+     pwdutils           |        []                                       |
+     radius             |                                     []          |
+     recode             |     [] []  []  []                [] []          |
+     rosegarden         |     ()     ()                       ()          |
+     rpm                |        []  []                       []          |
+     rush               |                                                 |
+     sarg               |                                                 |
+     screem             |                                                 |
+     scrollkeeper       |     [] []  []         []            []          |
+     sed                |     []     []  []                [] [] []       |
+     sharutils          |        []  []                       [] []       |
+     shishi             |                                                 |
+     skencil            |        []  ()                       []          |
+     solfege            |            []                    []    []       |
+     solfege-manual     |                                  []    []       |
+     soundtracker       |        []  []                       []          |
+     sp                 |            []                                   |
+     sysstat            |        []  []                             []    |
+     tar                |     []     []                          [] []    |
+     texinfo            |            []                    [] []          |
+     tin                |            []                          []       |
+     unicode-han-tra... |                                                 |
+     unicode-transla... |                                                 |
+     util-linux-ng      |     [] []  []                       []          |
+     vice               |        ()  ()                                   |
+     vmm                |            []                                   |
+     vorbis-tools       |     []                           []             |
+     wastesedge         |        []                                       |
+     wdiff              |            []                       []          |
+     wget               |     []     []                          []       |
+     wyslij-po          |                                                 |
+     xchat              |     []     []  []                   [] []       |
+     xdg-user-dirs      | []  [] []  []  []                [] [] [] []    |
+     xkeyboard-config   | []  [] []  []                    [] []          |
+                        +-------------------------------------------------+
+                          crh cs da  de  el en en_GB en_ZA eo es et eu fa
+                           5  64 105 117 18  1   8     0   28 89 18 19  0
+
+                          fi  fr  ga gl gu he hi hr hu hy id  is it ja ka kn
+                        +----------------------------------------------------+
+     a2ps               | []  []                          []        []       |
+     aegis              |     []                                 []          |
+     ant-phone          |     []                                 []          |
+     anubis             | []  []                          []     []          |
+     aspell             |     []  []                      []     []          |
+     bash               | []  []                          []        []       |
+     bfd                | []  []                          []                 |
+     bibshelf           | []  []  []                      []     []          |
+     binutils           | []  []                          []                 |
+     bison              | []  []  []                      []                 |
+     bison-runtime      | []  []  []                      []     [] []       |
+     bluez-pin          | []  []  []                [] [] []  []    []       |
+     bombono-dvd        | []                                                 |
+     buzztard           |                                 []                 |
+     cflow              | []      []                      []                 |
+     clisp              |     []                                             |
+     coreutils          |     []  []                []    []     []          |
+     cpio               | []  []  []                      []                 |
+     cppi               | []  []                                             |
+     cpplib             | []  []                          []                 |
+     cryptsetup         |     []                          []     []          |
+     dfarc              | []  []                                 []          |
+     dialog             |     []  [] []                   []  [] [] []       |
+     dico               |                                                    |
+     diffutils          | []  []  [] []    []       []    []     [] []       |
+     dink               |     []                                             |
+     doodle             |         []                             []          |
+     e2fsprogs          |     []                          []                 |
+     enscript           |     []  []             []       []                 |
+     exif               | []  []                          []  [] [] []       |
+     fetchmail          |     []                          []     [] []       |
+     findutils          | []  []  []                []    []     []          |
+     flex               | []  []  []                                         |
+     freedink           | []  []                          []                 |
+     gas                |     []                          []                 |
+     gawk               |     []  []       []             []     () []       |
+     gcal               |     []                                             |
+     gcc                |                                 []                 |
+     gettext-examples   | []  []  []                []    []     [] []       |
+     gettext-runtime    | []  []  []                      []     [] []       |
+     gettext-tools      |     []                          []     [] []       |
+     gip                | []  []  [] []                   []        []       |
+     gjay               | []                                                 |
+     gliv               | []  ()                                             |
+     glunarclock        | []      []                []    []                 |
+     gnubiff            |     ()                          []     ()          |
+     gnucash            | ()  ()           ()       ()           () []       |
+     gnuedu             |     []                                 []          |
+     gnulib             | []  []  []                []           [] []       |
+     gnunet             |                                                    |
+     gnunet-gtk         |     []                                             |
+     gnutls             |     []                                 []          |
+     gold               | []                              []                 |
+     gpe-aerial         | []  []                          []                 |
+     gpe-beam           | []  []                          []        []       |
+     gpe-bluetooth      | []                              []     [] []       |
+     gpe-calendar       | []                                        []       |
+     gpe-clock          | []  []                    []    []        []       |
+     gpe-conf           | []  []                          []        []       |
+     gpe-contacts       | []  []                          []        []       |
+     gpe-edit           | []                              []        []       |
+     gpe-filemanager    | []                        []    []        []       |
+     gpe-go             | []  []                    []    []        []       |
+     gpe-login          | []                              []        []       |
+     gpe-ownerinfo      | []  []                    []    []        []       |
+     gpe-package        | []                              []        []       |
+     gpe-sketchbook     | []  []                          []        []       |
+     gpe-su             | []  []     []             []    []        []       |
+     gpe-taskmanager    | []  []                    []    []        []       |
+     gpe-timesheet      | []  []  []                      []        []       |
+     gpe-today          | []  []  [] []             []    []        []       |
+     gpe-todo           | []                              []        []       |
+     gphoto2            | []  []                    []    []     [] []       |
+     gprof              | []  []  []                      []                 |
+     gpsdrive           |            []                   []     []          |
+     gramadoir          |     []  []                      []                 |
+     grep               | []                                     []          |
+     grub               | []                        []    []     []          |
+     gsasl              | []  []  []                      []     []          |
+     gss                | []  []  []                      []     []          |
+     gst-plugins-bad    | []  []                    []    []     [] []       |
+     gst-plugins-base   | []  []                    []    []     [] []       |
+     gst-plugins-good   | []  []                    []    []     [] []       |
+     gst-plugins-ugly   | []  []                    []    []     [] []       |
+     gstreamer          | []  []                    []    []     []          |
+     gtick              | []  []  []                      []     []          |
+     gtkam              |     []                    []    []     [] []       |
+     gtkorphan          |     []                          []     []          |
+     gtkspell           | []  []  [] []             [] [] []     [] []       |
+     gutenprint         | []  []                    []           []          |
+     hello              | []      []                      []                 |
+     help2man           | []  []                                             |
+     hylafax            |                                 []                 |
+     idutils            | []  []  []                []    []     []          |
+     indent             | []  []  [] []             []    []     [] []       |
+     iso_15924          | []  ()                          []     []          |
+     iso_3166           | []  ()  [] [] [] [] [] [] []    []     [] []       |
+     iso_3166_2         |     ()                    []    []     []          |
+     iso_4217           | []  ()                    []    []     [] []       |
+     iso_639            | []  ()  []    []          []    []     [] []    [] |
+     iso_639_3          |     ()                                 []       [] |
+     jwhois             | []  []                    []    []     []          |
+     kbd                |     []                          []                 |
+     keytouch           | []  []  []                []    []     []          |
+     keytouch-editor    | []      []                []    []     []          |
+     keytouch-keyboa... | []      []                []    []     []          |
+     klavaro            |            []             []                       |
+     latrine            | []                              []     []          |
+     ld                 | []  []  []                      []                 |
+     leafpad            | []  []  []       []       []    []     [] ()       |
+     libc               | []  []     []                   []        []       |
+     libexif            |                                        []          |
+     libextractor       |                                                    |
+     libgnutls          |     []                                 []          |
+     libgpewidget       | []      []                      []        []       |
+     libgpg-error       |     []                                 []          |
+     libgphoto2         |     []                                 [] []       |
+     libgphoto2_port    |     []                                 [] []       |
+     libgsasl           | []  []  []                      []     []          |
+     libiconv           | []  []  []                      []     [] []       |
+     libidn             | []  []                          []     []          |
+     lifelines          |     ()                                             |
+     liferea            |     []                    []           [] []       |
+     lilypond           | []  []                                             |
+     linkdr             | []               []    [] []           []          |
+     lordsawar          |                                                    |
+     lprng              |                                 []                 |
+     lynx               |     []                    []    []     [] []       |
+     m4                 | []  []  [] []                   []        []       |
+     mailfromd          |                                                    |
+     mailutils          |     []                          []                 |
+     make               | []  []  [] []    []    []       []     [] []       |
+     man-db             |                                 []     []          |
+     man-db-manpages    |                                 []                 |
+     minicom            | []  []                    []    []        []       |
+     mkisofs            | []  []                          []     []          |
+     myserver           |                                                    |
+     nano               | []  []  [] []             []           []          |
+     opcodes            | []  []  []                      []                 |
+     parted             |     []                          []     [] []       |
+     pies               |                                                    |
+     popt               | []  []  [] []             []    []  [] [] []       |
+     psmisc             | []  []                          []                 |
+     pspp               |                                                    |
+     pwdutils           |     []                          []                 |
+     radius             |     []                          []                 |
+     recode             | []  []  [] []    []       []    []     []          |
+     rosegarden         | ()  ()                          ()     () ()       |
+     rpm                |                                 []        []       |
+     rush               |                                                    |
+     sarg               |     []                                             |
+     screem             |                                        [] []       |
+     scrollkeeper       | []                        []    []     []          |
+     sed                | []  []  [] []             []    []     [] []       |
+     sharutils          | []  []  []                []    []     [] []       |
+     shishi             |     []                                             |
+     skencil            |     []                                             |
+     solfege            | []  []     []                          []          |
+     solfege-manual     |     []     []                                      |
+     soundtracker       |     []                                 []          |
+     sp                 |     []                                    ()       |
+     sysstat            | []  []                          []     [] []       |
+     tar                | []  []  []                []    []     [] []       |
+     texinfo            |     []                          []     [] []       |
+     tin                |     []                                             |
+     unicode-han-tra... |                                                    |
+     unicode-transla... |     []  []                                         |
+     util-linux-ng      | []  []                    []    []     [] []       |
+     vice               |     ()                    ()           ()          |
+     vmm                |     []                                             |
+     vorbis-tools       |                                 []                 |
+     wastesedge         |     ()                                 ()          |
+     wdiff              | []                                                 |
+     wget               | []  []  []             [] []    []     [] []       |
+     wyslij-po          | []  []                          []                 |
+     xchat              | []  []        []    []    []    []     [] []    [] |
+     xdg-user-dirs      | []  []  [] [] [] [] []    []    []  [] [] []    [] |
+     xkeyboard-config   | []  []                    []    []     []          |
+                        +----------------------------------------------------+
+                          fi  fr  ga gl gu he hi hr hu hy id  is it ja ka kn
+                          105 121 53 20  4  8  3  5 53  2 120  5 84 67  0  4
+
+                          ko ku ky lg lt lv mk ml mn mr ms mt nb nds ne
+                        +-----------------------------------------------+
+     a2ps               |                               []              |
+     aegis              |                                               |
+     ant-phone          |                                               |
+     anubis             |                               []    []        |
+     aspell             |                         []                    |
+     bash               |                                               |
+     bfd                |                                               |
+     bibshelf           |                []             []              |
+     binutils           |                                               |
+     bison              |                               []              |
+     bison-runtime      |       []    [] []             []    []        |
+     bluez-pin          |    [] []    [] []             []              |
+     bombono-dvd        |                                               |
+     buzztard           |                                               |
+     cflow              |                                               |
+     clisp              |                                               |
+     coreutils          |          []                                   |
+     cpio               |                                               |
+     cppi               |                                               |
+     cpplib             |                                               |
+     cryptsetup         |                                               |
+     dfarc              |                   []                          |
+     dialog             |    []       [] []             []    []        |
+     dico               |                                               |
+     diffutils          |                []             []              |
+     dink               |                                               |
+     doodle             |                                               |
+     e2fsprogs          |                                               |
+     enscript           |                                               |
+     exif               |                []                             |
+     fetchmail          |                                               |
+     findutils          |                                               |
+     flex               |                                               |
+     freedink           |                                     []        |
+     gas                |                                               |
+     gawk               |                                               |
+     gcal               |                                               |
+     gcc                |                                               |
+     gettext-examples   |       []       []             [] []           |
+     gettext-runtime    | []                                            |
+     gettext-tools      | []                                            |
+     gip                |                []             []              |
+     gjay               |                                               |
+     gliv               |                                               |
+     glunarclock        |                []                             |
+     gnubiff            |                                               |
+     gnucash            | ()          ()                      ()     () |
+     gnuedu             |                                               |
+     gnulib             |                                               |
+     gnunet             |                                               |
+     gnunet-gtk         |                                               |
+     gnutls             |                               []              |
+     gold               |                                               |
+     gpe-aerial         |                []                             |
+     gpe-beam           |                []                             |
+     gpe-bluetooth      |                []                []           |
+     gpe-calendar       |                []                             |
+     gpe-clock          | []    []       []             [] []           |
+     gpe-conf           | []             []                             |
+     gpe-contacts       | []             []                             |
+     gpe-edit           |                []                             |
+     gpe-filemanager    | []             []                             |
+     gpe-go             | []             []                []           |
+     gpe-login          |                []                             |
+     gpe-ownerinfo      |                []             []              |
+     gpe-package        | []             []                             |
+     gpe-sketchbook     | []             []                             |
+     gpe-su             | []    []       []             [] [] []        |
+     gpe-taskmanager    | [] [] []       []             [] []           |
+     gpe-timesheet      |                []             []              |
+     gpe-today          |       []       []             [] []           |
+     gpe-todo           |                []                   []        |
+     gphoto2            |                                               |
+     gprof              |                               []              |
+     gpsdrive           |                                               |
+     gramadoir          |                                               |
+     grep               |                                               |
+     grub               |                                               |
+     gsasl              |                                               |
+     gss                |                                               |
+     gst-plugins-bad    |             [] []                [] []        |
+     gst-plugins-base   |             [] []                             |
+     gst-plugins-good   |                []                []           |
+     gst-plugins-ugly   |             [] []             [] [] []        |
+     gstreamer          |                                               |
+     gtick              |                                               |
+     gtkam              |                                     []        |
+     gtkorphan          |                []                      []     |
+     gtkspell           |       []    [] []       []    []    [] []     |
+     gutenprint         |                                               |
+     hello              | []             []             []              |
+     help2man           |                                               |
+     hylafax            |                                               |
+     idutils            |                                               |
+     indent             |                                               |
+     iso_15924          |             [] []                             |
+     iso_3166           | [] []       () [] [] []    []       []        |
+     iso_3166_2         |                                               |
+     iso_4217           |             []                      []        |
+     iso_639            |                      []    []                 |
+     iso_639_3          |                            []                 |
+     jwhois             |                []                             |
+     kbd                |                                               |
+     keytouch           |                []                             |
+     keytouch-editor    |                []                             |
+     keytouch-keyboa... |                []                             |
+     klavaro            |                                     []        |
+     latrine            |                []                             |
+     ld                 |                                               |
+     leafpad            | []          [] []                             |
+     libc               | []                                            |
+     libexif            |                                               |
+     libextractor       |                                               |
+     libgnutls          |                               []              |
+     libgpewidget       |                []             []              |
+     libgpg-error       |                                               |
+     libgphoto2         |                                               |
+     libgphoto2_port    |                                               |
+     libgsasl           |                                               |
+     libiconv           |                                               |
+     libidn             |                                               |
+     lifelines          |                                               |
+     liferea            |                                               |
+     lilypond           |                                               |
+     linkdr             |                                               |
+     lordsawar          |                                               |
+     lprng              |                                               |
+     lynx               |                                               |
+     m4                 |                                               |
+     mailfromd          |                                               |
+     mailutils          |                                               |
+     make               | []                                            |
+     man-db             |                                               |
+     man-db-manpages    |                                               |
+     minicom            |                                     []        |
+     mkisofs            |                                               |
+     myserver           |                                               |
+     nano               |                               []    []        |
+     opcodes            |                                               |
+     parted             |                                               |
+     pies               |                                               |
+     popt               | []             []                   []        |
+     psmisc             |                                               |
+     pspp               |                                               |
+     pwdutils           |                                               |
+     radius             |                                               |
+     recode             |                                               |
+     rosegarden         |                                               |
+     rpm                |                                               |
+     rush               |                                               |
+     sarg               |                                               |
+     screem             |                                               |
+     scrollkeeper       |                                     []     [] |
+     sed                |                                               |
+     sharutils          |                                               |
+     shishi             |                                               |
+     skencil            |                                               |
+     solfege            |                                     []        |
+     solfege-manual     |                                               |
+     soundtracker       |                                               |
+     sp                 |                                               |
+     sysstat            |                []                             |
+     tar                |       []                                      |
+     texinfo            |                                     []        |
+     tin                |                                               |
+     unicode-han-tra... |                                               |
+     unicode-transla... |                                               |
+     util-linux-ng      |                                               |
+     vice               |                                               |
+     vmm                |                                               |
+     vorbis-tools       |                                               |
+     wastesedge         |                                               |
+     wdiff              |                                               |
+     wget               |             []                                |
+     wyslij-po          |                                               |
+     xchat              | []             [] []                          |
+     xdg-user-dirs      | [] []       [] [] []       []       [] []     |
+     xkeyboard-config   | []    []    []                                |
+                        +-----------------------------------------------+
+                          ko ku ky lg lt lv mk ml mn mr ms mt nb nds ne
+                          20  5 10  1 13 48  4  2  2  4 24 10 20  3   1
+
+                          nl  nn or pa pl  ps pt pt_BR ro ru rw sk sl sq sr
+                        +---------------------------------------------------+
+     a2ps               | []           []     []  []   [] []       []    [] |
+     aegis              | []                      []      []                |
+     ant-phone          |                         []   []                   |
+     anubis             | []           []                 []                |
+     aspell             | []                           [] []    [] []       |
+     bash               | []                                    []          |
+     bfd                |                                 []                |
+     bibshelf           | []  []                                            |
+     binutils           |                                 []    []          |
+     bison              | []           []                 []                |
+     bison-runtime      | []           []     []  []   [] []       []       |
+     bluez-pin          | []           []         []   [] []    [] []    [] |
+     bombono-dvd        |     []                          ()                |
+     buzztard           | []  []                                            |
+     cflow              |              []                                   |
+     clisp              | []                              []                |
+     coreutils          | []           []     []  []      []       []       |
+     cpio               | []           []                 []                |
+     cppi               |              []                                   |
+     cpplib             | []                                                |
+     cryptsetup         | []                                                |
+     dfarc              |              []                                   |
+     dialog             | []           []         []      []                |
+     dico               |              []                                   |
+     diffutils          | []           []         []   [] []             [] |
+     dink               | ()                                                |
+     doodle             | []                                          []    |
+     e2fsprogs          | []           []                                   |
+     enscript           | []                      []   [] []       []       |
+     exif               | []           []              [] ()    []          |
+     fetchmail          | []           []                 []          []    |
+     findutils          | []           []     []          []       []       |
+     flex               | []           []         []   [] []                |
+     freedink           | []           []                                   |
+     gas                |                                                   |
+     gawk               | []           []         []   []                   |
+     gcal               |                                                   |
+     gcc                |                                                [] |
+     gettext-examples   | []           []     []       [] []    [] []    [] |
+     gettext-runtime    | []  []       []     []       [] []    [] []    [] |
+     gettext-tools      |              []              [] []    [] []    [] |
+     gip                | []           []                 []    []       [] |
+     gjay               |                                                   |
+     gliv               | []           []         []   [] []    []          |
+     glunarclock        | []                      []   []       []       [] |
+     gnubiff            | []                           ()                   |
+     gnucash            | []           ()         ()      ()                |
+     gnuedu             | []                                                |
+     gnulib             | []           []                 []       []       |
+     gnunet             |                                                   |
+     gnunet-gtk         |                                                   |
+     gnutls             | []           []                                   |
+     gold               |                                                   |
+     gpe-aerial         | []                  []  []   [] []       []    [] |
+     gpe-beam           | []                  []  []   [] []       []    [] |
+     gpe-bluetooth      | []                      []                        |
+     gpe-calendar       |                         []      []       []    [] |
+     gpe-clock          | []                  []  []   [] []    [] []    [] |
+     gpe-conf           | []                  []  []   [] []    [] []       |
+     gpe-contacts       |                         []   [] []       []    [] |
+     gpe-edit           | []           []                          []       |
+     gpe-filemanager    | []                              []       []       |
+     gpe-go             | []           []         []   [] []    [] []    [] |
+     gpe-login          | []                      []                        |
+     gpe-ownerinfo      | []                  []  []   [] []    [] []    [] |
+     gpe-package        | []                                       []       |
+     gpe-sketchbook     | []                  []  []   [] []       []    [] |
+     gpe-su             | []                  []  []   [] []    [] []    [] |
+     gpe-taskmanager    | []                  []  []   [] []    [] []    [] |
+     gpe-timesheet      | []                  []  []   [] []    [] []    [] |
+     gpe-today          | []                  []  []   [] []    [] []    [] |
+     gpe-todo           | []                      []      []       []    [] |
+     gphoto2            | []        [] []         []   [] []    []       [] |
+     gprof              | []                      []   []                   |
+     gpsdrive           | []                              []                |
+     gramadoir          | []                                    []          |
+     grep               | []           []                 []    []          |
+     grub               | []           []                 []                |
+     gsasl              | []           []                       []       [] |
+     gss                |              []              []       []          |
+     gst-plugins-bad    | []           []         []      []    []    []    |
+     gst-plugins-base   | []           []         []      []    []          |
+     gst-plugins-good   | []           []         []      []    []          |
+     gst-plugins-ugly   | []           []         []      []    [] []       |
+     gstreamer          | []           []         []      []    []          |
+     gtick              | []                              []    []          |
+     gtkam              | []        [] []         []      []    []          |
+     gtkorphan          | []                                                |
+     gtkspell           | []           []     []  []   [] []    [] [] [] [] |
+     gutenprint         | []                              []                |
+     hello              | []           []                       [] []       |
+     help2man           |              []                 []                |
+     hylafax            | []                                                |
+     idutils            | []           []         []   [] []                |
+     indent             | []           []         []   [] []    []       [] |
+     iso_15924          | []           []                 []       []       |
+     iso_3166           | []  [] [] [] []     ()  []   [] [] [] [] [] [] [] |
+     iso_3166_2         | []           []                          []       |
+     iso_4217           | []  []       []     []          [] []    []    [] |
+     iso_639            | []     [] [] []                 [] [] [] []    [] |
+     iso_639_3          |        [] []                                      |
+     jwhois             | []           []         []   []                   |
+     kbd                | []           []              []                   |
+     keytouch           | []           []                       []          |
+     keytouch-editor    | []           []                       []          |
+     keytouch-keyboa... | []           []                       []          |
+     klavaro            | []                      []                        |
+     latrine            |              []                 []                |
+     ld                 |                                                   |
+     leafpad            | []  []       []     []  []      []    [] []    [] |
+     libc               | []           []                 []    []          |
+     libexif            | []           []         ()            []          |
+     libextractor       |                                                   |
+     libgnutls          | []           []                                   |
+     libgpewidget       | []           []                          []       |
+     libgpg-error       |              []              []                   |
+     libgphoto2         | []           []                                   |
+     libgphoto2_port    | []           []         []      []    []          |
+     libgsasl           | []           []              []       []       [] |
+     libiconv           | []           []                       [] []    [] |
+     libidn             | []           []                                   |
+     lifelines          | []           []                                   |
+     liferea            | []           []     []  []   [] ()    ()    []    |
+     lilypond           | []                                                |
+     linkdr             | []                  []          []                |
+     lordsawar          |                                                   |
+     lprng              |              []                                   |
+     lynx               | []                      []      []                |
+     m4                 | []           []         []   [] []                |
+     mailfromd          |              []                                   |
+     mailutils          |              []                                   |
+     make               | []           []         []      []                |
+     man-db             | []           []                 []                |
+     man-db-manpages    | []           []                 []                |
+     minicom            |              []         []   [] []                |
+     mkisofs            | []           []                 []                |
+     myserver           |                                                   |
+     nano               | []           []         []      []                |
+     opcodes            | []                           []                   |
+     parted             | []           []                 []    []          |
+     pies               |              []                                   |
+     popt               | []           []     []          []                |
+     psmisc             | []           []                 []                |
+     pspp               | []                      []                        |
+     pwdutils           |              []                                   |
+     radius             | []           []                 []                |
+     recode             | []           []     []  []   [] []    [] []       |
+     rosegarden         |              ()                 ()                |
+     rpm                | []           []     []                            |
+     rush               | []           []                                   |
+     sarg               |                                                   |
+     screem             |                                                   |
+     scrollkeeper       | []  []       []              [] []    []    [] [] |
+     sed                | []           []     []  []   [] []    [] []    [] |
+     sharutils          | []           []                 []             [] |
+     shishi             |              []                                   |
+     skencil            |                     []  []                        |
+     solfege            | []           []         []      []                |
+     solfege-manual     | []           []         []                        |
+     soundtracker       |                                       []          |
+     sp                 |                                                   |
+     sysstat            | []           []         []      []                |
+     tar                | []           []                 []       []       |
+     texinfo            | []           []              [] []                |
+     tin                |                                 []                |
+     unicode-han-tra... |                                                   |
+     unicode-transla... |                                                   |
+     util-linux-ng      | []           []         []      []       []       |
+     vice               | []                                                |
+     vmm                | []                                                |
+     vorbis-tools       | []           []                                   |
+     wastesedge         | []                                                |
+     wdiff              | []           []                                   |
+     wget               | []           []     []  []      []    [] []       |
+     wyslij-po          | []  []       []                                   |
+     xchat              | []        [] []     []          []    [] [] [] [] |
+     xdg-user-dirs      | []  [] [] [] []  [] []  []   [] []    [] [] [] [] |
+     xkeyboard-config   | []           []                 []                |
+                        +---------------------------------------------------+
+                          nl  nn or pa pl  ps pt pt_BR ro ru rw sk sl sq sr
+                          135 10  4  7 105  1 29  62   47 91  3 54 46  9 37
+
+                          sv  sw ta te tg th tr uk vi  wa zh_CN zh_HK zh_TW
+                        +---------------------------------------------------+
+     a2ps               | []              [] [] [] []                       | 27
+     aegis              |                          []                       |  9
+     ant-phone          | []                 []    []      []               |  9
+     anubis             | []                 [] [] []                       | 15
+     aspell             |                       [] []  []                   | 20
+     bash               | []                    [] []                       | 12
+     bfd                |                          []                       |  6
+     bibshelf           | []                       []      []               | 16
+     binutils           |                       [] []                       |  8
+     bison              | []                       []                       | 12
+     bison-runtime      | []              []    [] []      []          []   | 29
+     bluez-pin          | []              [] [] [] []  []  []          []   | 37
+     bombono-dvd        |                          []                       |  4
+     buzztard           |                          []                       |  7
+     cflow              |                       [] []      []               |  9
+     clisp              |                                                   | 10
+     coreutils          | []                    [] []      []               | 22
+     cpio               | []                 [] [] []      []          []   | 13
+     cppi               |                       [] []                       |  5
+     cpplib             | []                 [] [] []      []          []   | 14
+     cryptsetup         | []                       []                       |  7
+     dfarc              |                          []                       |  9
+     dialog             | []  []          []       []  []  []          []   | 30
+     dico               |                       []                          |  2
+     diffutils          | []                 [] [] []      []          []   | 30
+     dink               |                                                   |  4
+     doodle             | []                       []                       |  7
+     e2fsprogs          | []                 []    []                       | 11
+     enscript           | []                 [] [] []                       | 17
+     exif               | []                       []      []               | 16
+     fetchmail          |                    []    []      []               | 17
+     findutils          | []                 [] [] []      []               | 20
+     flex               | []                 []    []                  []   | 15
+     freedink           |                          []                       | 10
+     gas                |                    []                             |  4
+     gawk               | []                 []    []      []               | 18
+     gcal               | []                 []                             |  5
+     gcc                | []                 []            []               |  7
+     gettext-examples   | []                 [] [] []      []    []    []   | 34
+     gettext-runtime    | []                 [] [] []      []    []    []   | 29
+     gettext-tools      | []                 [] [] []      []          []   | 22
+     gip                | []                       []      []          []   | 22
+     gjay               |                          []                       |  3
+     gliv               | []                 []    []                       | 14
+     glunarclock        | []                       []  []  []          []   | 19
+     gnubiff            | []                       []                       |  4
+     gnucash            |                    () [] ()      []          ()   | 10
+     gnuedu             |                          []                  []   |  7
+     gnulib             | []                    [] []      []               | 16
+     gnunet             |                          []                       |  1
+     gnunet-gtk         | []                 []    []                       |  5
+     gnutls             | []                       []      []               | 10
+     gold               |                          []                       |  4
+     gpe-aerial         | []                       []      []               | 18
+     gpe-beam           | []                       []      []               | 19
+     gpe-bluetooth      | []                       []      []               | 13
+     gpe-calendar       | []                       []  []  []               | 12
+     gpe-clock          | []                 []    []  []  []               | 28
+     gpe-conf           | []                       []  []  []               | 20
+     gpe-contacts       | []                       []      []               | 17
+     gpe-edit           | []                       []      []               | 12
+     gpe-filemanager    | []                       []  []  []               | 16
+     gpe-go             | []                 []    []  []  []               | 25
+     gpe-login          | []                       []      []               | 11
+     gpe-ownerinfo      | []                 []    []      []          []   | 25
+     gpe-package        | []                       []      []               | 13
+     gpe-sketchbook     | []                       []      []               | 20
+     gpe-su             | []                 []    []  []  []               | 30
+     gpe-taskmanager    | []                 []    []  []  []               | 29
+     gpe-timesheet      | []                 []    []      []          []   | 25
+     gpe-today          | []                 []    []  []  []          []   | 30
+     gpe-todo           | []                       []  []  []               | 17
+     gphoto2            | []                    [] []      []          []   | 24
+     gprof              | []                 []    []                       | 15
+     gpsdrive           | []                       []      []               | 11
+     gramadoir          | []                       []      []               | 11
+     grep               |                 []       []      []               | 10
+     grub               | []                       []      []               | 14
+     gsasl              | []                       []      []          []   | 14
+     gss                | []                       []      []               | 11
+     gst-plugins-bad    | []                 []    []      []               | 26
+     gst-plugins-base   | []                 [] [] []      []               | 24
+     gst-plugins-good   | []                 []    []      []               | 24
+     gst-plugins-ugly   | []                 [] [] []      []               | 29
+     gstreamer          | []                    [] []      []               | 22
+     gtick              |                       [] []      []               | 13
+     gtkam              | []                       []      []               | 20
+     gtkorphan          | []                       []      []               | 14
+     gtkspell           | []              [] [] [] []  []  []    []    []   | 45
+     gutenprint         | []                                                | 10
+     hello              | []              [] []    []      []          []   | 21
+     help2man           | []                       []                       |  7
+     hylafax            |                          []                       |  5
+     idutils            | []                 []    []      []               | 17
+     indent             | []                 [] [] []      []          []   | 30
+     iso_15924          |                 ()    [] ()      []          []   | 16
+     iso_3166           | []        []    () [] [] ()  []  []    []    ()   | 53
+     iso_3166_2         |                 ()    [] ()      []               |  9
+     iso_4217           | []              () [] [] ()      []    []         | 26
+     iso_639            | []     [] []    ()    [] ()  []  []    []    []   | 38
+     iso_639_3          |        []                ()                       |  8
+     jwhois             | []                 []    []      []          []   | 16
+     kbd                | []                 [] [] []      []               | 15
+     keytouch           | []                       []      []               | 16
+     keytouch-editor    | []                       []      []               | 14
+     keytouch-keyboa... | []                       []      []               | 14
+     klavaro            |                          []                       | 11
+     latrine            |                    []    []      []               | 10
+     ld                 | []                 []    []                  []   | 11
+     leafpad            | []                 [] [] []      []          []   | 33
+     libc               | []                 []    []      []          []   | 21
+     libexif            |                          []      ()               |  7
+     libextractor       |                          []                       |  1
+     libgnutls          | []                       []      []               |  9
+     libgpewidget       | []                       []      []               | 14
+     libgpg-error       | []                       []      []               |  9
+     libgphoto2         |                       [] []                       |  8
+     libgphoto2_port    | []                    [] []                  []   | 14
+     libgsasl           | []                       []      []               | 13
+     libiconv           | []                       []  []  []               | 21
+     libidn             | ()                       []      []               | 11
+     lifelines          | []                                                |  4
+     liferea            | []                 []            []               | 21
+     lilypond           |                          []                       |  7
+     linkdr             | []                 []    []      []          []   | 17
+     lordsawar          |                                                   |  1
+     lprng              |                          []                       |  3
+     lynx               | []                 [] [] []                       | 17
+     m4                 | []                       []      []          []   | 19
+     mailfromd          |                       [] []                       |  3
+     mailutils          |                          []                       |  5
+     make               | []                 []    []      []               | 21
+     man-db             | []                       []      []               |  8
+     man-db-manpages    |                                                   |  4
+     minicom            | []                       []                       | 16
+     mkisofs            |                          []      []               |  9
+     myserver           |                                                   |  0
+     nano               | []                       []      []          []   | 21
+     opcodes            | []                 []    []                       | 11
+     parted             | []                 [] [] []                  []   | 15
+     pies               |                       [] []                       |  3
+     popt               | []              [] []    []      []          []   | 27
+     psmisc             | []                       []                       | 11
+     pspp               |                                                   |  4
+     pwdutils           | []                       []                       |  6
+     radius             |                       [] []                       |  9
+     recode             | []                 []    []      []               | 28
+     rosegarden         | ()                                                |  0
+     rpm                | []                       []                  []   | 11
+     rush               |                       [] []                       |  4
+     sarg               |                                                   |  1
+     screem             |                          []                       |  3
+     scrollkeeper       | []                 [] [] []                  []   | 27
+     sed                | []                 []    []      []          []   | 30
+     sharutils          | []                 []    []      []          []   | 22
+     shishi             |                          []                       |  3
+     skencil            | []                       []                       |  7
+     solfege            | []                 []    []      []               | 16
+     solfege-manual     |                    []                             |  8
+     soundtracker       | []                 []    []                       |  9
+     sp                 |                    []                             |  3
+     sysstat            |                          []      []               | 15
+     tar                | []                 [] [] []      []          []   | 23
+     texinfo            | []                 [] [] []      []               | 17
+     tin                |                                                   |  4
+     unicode-han-tra... |                                                   |  0
+     unicode-transla... |                                                   |  2
+     util-linux-ng      | []                 [] [] []                       | 20
+     vice               | ()                 ()                             |  1
+     vmm                |                          []                       |  4
+     vorbis-tools       |                          []                       |  6
+     wastesedge         |                                                   |  2
+     wdiff              | []                       []                       |  7
+     wget               | []                 []    []      []          []   | 26
+     wyslij-po          |                       [] []                       |  8
+     xchat              | []              []    [] []      []          []   | 36
+     xdg-user-dirs      | []     [] []    [] [] [] []      []    []    []   | 63
+     xkeyboard-config   | []                    [] []                       | 22
+                        +---------------------------------------------------+
+       85 teams           sv  sw ta te tg th tr uk vi  wa zh_CN zh_HK zh_TW
+      178 domains         119  1  3  3  0 10 65 51 155 17  98     7    41    2618
+
+   Some counters in the preceding matrix are higher than the number of
+visible blocks let us expect.  This is because a few extra PO files are
+used for implementing regional variants of languages, or language
+dialects.
+
+   For a PO file in the matrix above to be effective, the package to
+which it applies should also have been internationalized and
+distributed as such by its maintainer.  There might be an observable
+lag between the mere existence a PO file and its wide availability in a
+distribution.
+
+   If June 2010 seems to be old, you may fetch a more recent copy of
+this `ABOUT-NLS' file on most GNU archive sites.  The most up-to-date
+matrix with full percentage details can be found at
+`http://translationproject.org/extra/matrix.html'.
+
+1.5 Using `gettext' in new packages
+===================================
+
+If you are writing a freely available program and want to
+internationalize it you are welcome to use GNU `gettext' in your
+package.  Of course you have to respect the GNU Library General Public
+License which covers the use of the GNU `gettext' library.  This means
+in particular that even non-free programs can use `libintl' as a shared
+library, whereas only free software can use `libintl' as a static
+library or use modified versions of `libintl'.
+
+   Once the sources are changed appropriately and the setup can handle
+the use of `gettext' the only thing missing are the translations.  The
+Free Translation Project is also available for packages which are not
+developed inside the GNU project.  Therefore the information given above
+applies also for every other Free Software Project.  Contact
+`coordinator@translationproject.org' to make the `.pot' files available
+to the translation teams.
+
diff --git a/avahi-0.6.31/ChangeLog b/avahi-0.6.31/ChangeLog
new file mode 100644
index 0000000..73491c3
--- /dev/null
+++ b/avahi-0.6.31/ChangeLog
@@ -0,0 +1,5 @@
+2010-10-04  gettextize  <bug-gnu-gettext@gnu.org>
+
+	* Makefile.am (EXTRA_DIST): Add config.rpath.
+	* configure.ac (AC_CONFIG_FILES): Add po/Makefile.in.
+
diff --git a/avahi-0.6.31/LICENSE b/avahi-0.6.31/LICENSE
new file mode 100644
index 0000000..2d2d780
--- /dev/null
+++ b/avahi-0.6.31/LICENSE
@@ -0,0 +1,510 @@
+
+                  GNU LESSER GENERAL PUBLIC LICENSE
+                       Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+	51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+                            Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations
+below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it
+becomes a de-facto standard.  To achieve this, non-free programs must
+be allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+                  GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control
+compilation and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at least
+    three years, to give the same user the materials specified in
+    Subsection 6a, above, for a charge no more than the cost of
+    performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply, and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License
+may add an explicit geographical distribution limitation excluding those
+countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+                            NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+                     END OF TERMS AND CONDITIONS
+
+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms
+of the ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.
+It is safest to attach them to the start of each source file to most
+effectively convey the exclusion of warranty; and each file should
+have at least the "copyright" line and a pointer to where the full
+notice is found.
+
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or
+your school, if any, to sign a "copyright disclaimer" for the library,
+if necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James
+  Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
+
+
diff --git a/avahi-0.6.31/Makefile.am b/avahi-0.6.31/Makefile.am
new file mode 100644
index 0000000..8234d69
--- /dev/null
+++ b/avahi-0.6.31/Makefile.am
@@ -0,0 +1,243 @@
+# This file is part of avahi.
+#
+# avahi 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 of the
+# License, or (at your option) any later version.
+#
+# avahi 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 General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+ACLOCAL_AMFLAGS = -I common
+
+include $(srcdir)/common/doxygen.mk
+
+EXTRA_DIST = \
+	autogen.sh \
+	bootstrap.sh \
+	LICENSE \
+	$(DX_CONFIG) \
+	docs/INSTALL \
+	docs/TODO \
+	docs/NEWS \
+	docs/README \
+	docs/DBUS-API \
+	docs/AUTHORS \
+	docs/HACKING \
+	docs/API-CHANGES-0.6 \
+	docs/COMPAT-LAYERS \
+	docs/MALLOC \
+	docs/overview.dia \
+	docs/server-states.dia \
+	docs/avahi-poll.dia \
+	avahi-core.pc.in \
+	avahi-client.pc.in \
+	avahi-glib.pc.in \
+	avahi-gobject.pc.in \
+	avahi-qt3.pc.in \
+	avahi-qt4.pc.in \
+	avahi-sharp.pc.in \
+	avahi-ui-sharp.pc.in \
+	avahi-compat-libdns_sd.pc.in \
+	avahi-compat-howl.pc.in \
+	avahi-ui.pc.in \
+	avahi-ui-gtk3.pc.in \
+	doxygen_to_devhelp.xsl \
+        common/introspection.m4
+
+SUBDIRS = \
+	common \
+	avahi-common \
+	avahi-core \
+	avahi-qt \
+	avahi-client \
+	avahi-glib \
+	avahi-gobject \
+	avahi-discover-standalone \
+	avahi-daemon \
+	avahi-sharp \
+	initscript \
+	avahi-dnsconfd \
+	avahi-utils \
+	avahi-python \
+	examples \
+	man \
+	tests \
+	service-type-database \
+	avahi-compat-libdns_sd \
+	avahi-compat-howl \
+	avahi-autoipd \
+	avahi-ui \
+	avahi-ui-sharp \
+	po
+
+DX_INPUT = \
+	$(srcdir)/avahi-common/address.h \
+	$(srcdir)/avahi-common/malloc.h \
+	$(srcdir)/avahi-common/strlst.h \
+	$(srcdir)/avahi-common/alternative.h \
+	$(srcdir)/avahi-common/defs.h \
+	$(srcdir)/avahi-common/error.h \
+	$(srcdir)/avahi-common/domain.h \
+	$(srcdir)/avahi-common/watch.h \
+	$(srcdir)/avahi-common/simple-watch.h \
+	$(srcdir)/avahi-common/thread-watch.h
+
+DX_EXAMPLE_PATH = $(srcdir)/examples
+DX_EXAMPLE_PATTERNS = *.c
+
+if HAVE_QT3
+DX_INPUT += \
+	$(srcdir)/avahi-qt/qt-watch.h
+else
+if HAVE_QT4
+DX_INPUT += \
+	$(srcdir)/avahi-qt/qt-watch.h
+endif
+endif
+
+if HAVE_GLIB
+DX_INPUT += \
+	$(srcdir)/avahi-glib/glib-watch.h \
+	$(srcdir)/avahi-glib/glib-malloc.h
+
+if HAVE_GOBJECT
+if HAVE_DBUS
+DX_INPUT += \
+	$(srcdir)/avahi-gobject/ga-client.h \
+	$(srcdir)/avahi-gobject/ga-entry-group.h \
+	$(srcdir)/avahi-gobject/ga-enums.h \
+	$(srcdir)/avahi-gobject/ga-error.h \
+	$(srcdir)/avahi-gobject/ga-record-browser.h \
+	$(srcdir)/avahi-gobject/ga-service-browser.h \
+	$(srcdir)/avahi-gobject/ga-service-resolver.h
+endif
+endif
+endif
+
+if HAVE_DBUS
+DX_INPUT += \
+	$(srcdir)/avahi-client/client.h \
+	$(srcdir)/avahi-client/lookup.h \
+	$(srcdir)/avahi-client/publish.h
+endif
+
+if HAVE_DBUS
+if HAVE_GTK
+DX_INPUT += \
+	$(srcdir)/avahi-ui/avahi-ui.h
+endif
+endif
+
+if ENABLE_CORE_DOCS
+DX_INPUT += \
+	$(srcdir)/avahi-core/core.h \
+	$(srcdir)/avahi-core/lookup.h \
+	$(srcdir)/avahi-core/publish.h \
+	$(srcdir)/avahi-core/rr.h \
+	$(srcdir)/avahi-core/log.h
+endif
+
+if HAVE_GTK
+DX_INPUT += \
+	$(srcdir)/avahi-ui/avahi-ui.h
+endif
+
+pkgconfigdir = $(libdir)/pkgconfig
+
+%.pc: %.pc.in
+	$(AM_V_GEN)sed -e 's,@prefix\@,$(prefix),g' \
+	    -e 's,@libdir\@,$(libdir),g' \
+	    -e 's,@HOWL_COMPAT_VERSION\@,$(HOWL_COMPAT_VERSION),g' \
+	    -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' $< > $@
+
+pkgconfig_DATA = avahi-core.pc
+CLEANFILES = avahi-core.pc
+
+if HAVE_DBUS
+pkgconfig_DATA += avahi-client.pc
+CLEANFILES += avahi-client.pc
+
+if ENABLE_COMPAT_HOWL
+pkgconfig_DATA += avahi-compat-howl.pc
+CLEANFILES += avahi-compat-howl.pc
+endif
+
+if ENABLE_COMPAT_LIBDNS_SD
+pkgconfig_DATA += avahi-compat-libdns_sd.pc
+CLEANFILES += avahi-compat-libdns_sd.pc
+endif
+
+if HAVE_MONO
+pkgconfig_DATA += avahi-sharp.pc avahi-ui-sharp.pc
+CLEANFILES += avahi-sharp.pc avahi-ui-sharp.pc
+endif
+
+endif
+
+if HAVE_GLIB
+pkgconfig_DATA += avahi-glib.pc
+CLEANFILES += avahi-glib.pc
+
+if HAVE_GOBJECT
+pkgconfig_DATA += avahi-gobject.pc
+CLEANFILES += avahi-gobject.pc
+endif
+endif
+
+if HAVE_GTK
+if HAVE_DBUS
+pkgconfig_DATA += avahi-ui.pc
+CLEANFILES += avahi-ui.pc
+endif
+endif
+
+if HAVE_GTK3
+if HAVE_DBUS
+pkgconfig_DATA += avahi-ui-gtk3.pc
+CLEANFILES += avahi-ui-gtk3.pc
+endif
+endif
+
+if HAVE_QT3
+pkgconfig_DATA += avahi-qt3.pc
+CLEANFILES += avahi-qt3.pc
+endif
+
+if HAVE_QT4
+pkgconfig_DATA += avahi-qt4.pc
+CLEANFILES += avahi-qt4.pc
+endif
+
+CLEANFILES += avahi.devhelp
+
+avahi.devhelp: doxygen-run
+	xsltproc -o $@ doxygen_to_devhelp.xsl doxygen/xml/index.xml
+
+MOSTLYCLEANFILES = $(DX_CLEANFILES)
+
+DISTCHECK_CONFIGURE_FLAGS = \
+	--disable-monodoc \
+	--enable-introspection \
+	--with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
+
+homepage:
+	$(MAKE) -C man
+	scp avahi-daemon/*.xml avahi-daemon/introspect.dtd avahi-daemon/introspect.xsl\
+	    man/*.xml man/xmltoman.dtd man/xmltoman.xsl \
+	    tango:www/avahi.org/tree/download/
+	scp avahi-$(PACKAGE_VERSION).tar.gz tango:www/avahi.org/tree/download/
+	rm -rf doxygen
+	$(MAKE) doxygen-run
+	ssh tango rm -rf www/avahi.org/tree/download/doxygen
+	scp -r doxygen/html tango:www/avahi.org/tree/download/doxygen
+
+DISTCLEANFILES = \
+	po/.intltool-merge-cache
diff --git a/avahi-0.6.31/Makefile.in b/avahi-0.6.31/Makefile.in
new file mode 100644
index 0000000..3dc71c9
--- /dev/null
+++ b/avahi-0.6.31/Makefile.in
@@ -0,0 +1,1228 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# This file is part of avahi.
+#
+# avahi 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 of the
+# License, or (at your option) any later version.
+#
+# avahi 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 General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+# Copyright (C) 2004 Oren Ben-Kiki
+# This file is distributed under the same terms as the Automake macro files.
+
+# Generate automatic documentation using Doxygen. Goals and variables values
+# are controlled by the various DX_COND_??? conditionals set by autoconf.
+#
+# The provided goals are:
+# doxygen-doc: Generate all doxygen documentation.
+# doxygen-run: Run doxygen, which will generate some of the documentation
+#              (HTML, CHM, CHI, MAN, RTF, XML) but will not do the post
+#              processing required for the rest of it (PS, PDF, and some MAN).
+# doxygen-man: Rename some doxygen generated man pages.
+# doxygen-ps: Generate doxygen PostScript documentation.
+# doxygen-pdf: Generate doxygen PDF documentation.
+#
+# Note that by default these are not integrated into the automake goals. If
+# doxygen is used to generate man pages, you can achieve this integration by
+# setting man3_MANS to the list of man pages generated and then adding the
+# dependency:
+#
+#   $(man3_MANS): doxygen-doc
+#
+# This will cause make to run doxygen and generate all the documentation.
+#
+# The following variable is intended for use in Makefile.am:
+#
+# DX_CLEANFILES = everything to clean.
+#
+# This is usually added to MOSTLYCLEANFILES.
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in $(srcdir)/common/doxygen.mk \
+	$(srcdir)/config.h.in $(top_srcdir)/configure ABOUT-NLS \
+	ChangeLog compile config.guess config.rpath config.sub depcomp \
+	install-sh ltmain.sh missing py-compile
+@HAVE_QT3_TRUE@am__append_1 = \
+@HAVE_QT3_TRUE@	$(srcdir)/avahi-qt/qt-watch.h
+
+@HAVE_QT3_FALSE@@HAVE_QT4_TRUE@am__append_2 = \
+@HAVE_QT3_FALSE@@HAVE_QT4_TRUE@	$(srcdir)/avahi-qt/qt-watch.h
+
+@HAVE_GLIB_TRUE@am__append_3 = \
+@HAVE_GLIB_TRUE@	$(srcdir)/avahi-glib/glib-watch.h \
+@HAVE_GLIB_TRUE@	$(srcdir)/avahi-glib/glib-malloc.h
+
+@HAVE_DBUS_TRUE@@HAVE_GLIB_TRUE@@HAVE_GOBJECT_TRUE@am__append_4 = \
+@HAVE_DBUS_TRUE@@HAVE_GLIB_TRUE@@HAVE_GOBJECT_TRUE@	$(srcdir)/avahi-gobject/ga-client.h \
+@HAVE_DBUS_TRUE@@HAVE_GLIB_TRUE@@HAVE_GOBJECT_TRUE@	$(srcdir)/avahi-gobject/ga-entry-group.h \
+@HAVE_DBUS_TRUE@@HAVE_GLIB_TRUE@@HAVE_GOBJECT_TRUE@	$(srcdir)/avahi-gobject/ga-enums.h \
+@HAVE_DBUS_TRUE@@HAVE_GLIB_TRUE@@HAVE_GOBJECT_TRUE@	$(srcdir)/avahi-gobject/ga-error.h \
+@HAVE_DBUS_TRUE@@HAVE_GLIB_TRUE@@HAVE_GOBJECT_TRUE@	$(srcdir)/avahi-gobject/ga-record-browser.h \
+@HAVE_DBUS_TRUE@@HAVE_GLIB_TRUE@@HAVE_GOBJECT_TRUE@	$(srcdir)/avahi-gobject/ga-service-browser.h \
+@HAVE_DBUS_TRUE@@HAVE_GLIB_TRUE@@HAVE_GOBJECT_TRUE@	$(srcdir)/avahi-gobject/ga-service-resolver.h
+
+@HAVE_DBUS_TRUE@am__append_5 = \
+@HAVE_DBUS_TRUE@	$(srcdir)/avahi-client/client.h \
+@HAVE_DBUS_TRUE@	$(srcdir)/avahi-client/lookup.h \
+@HAVE_DBUS_TRUE@	$(srcdir)/avahi-client/publish.h
+
+@HAVE_DBUS_TRUE@@HAVE_GTK_TRUE@am__append_6 = \
+@HAVE_DBUS_TRUE@@HAVE_GTK_TRUE@	$(srcdir)/avahi-ui/avahi-ui.h
+
+@ENABLE_CORE_DOCS_TRUE@am__append_7 = \
+@ENABLE_CORE_DOCS_TRUE@	$(srcdir)/avahi-core/core.h \
+@ENABLE_CORE_DOCS_TRUE@	$(srcdir)/avahi-core/lookup.h \
+@ENABLE_CORE_DOCS_TRUE@	$(srcdir)/avahi-core/publish.h \
+@ENABLE_CORE_DOCS_TRUE@	$(srcdir)/avahi-core/rr.h \
+@ENABLE_CORE_DOCS_TRUE@	$(srcdir)/avahi-core/log.h
+
+@HAVE_GTK_TRUE@am__append_8 = \
+@HAVE_GTK_TRUE@	$(srcdir)/avahi-ui/avahi-ui.h
+
+@HAVE_DBUS_TRUE@am__append_9 = avahi-client.pc
+@HAVE_DBUS_TRUE@am__append_10 = avahi-client.pc
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@am__append_11 = avahi-compat-howl.pc
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@am__append_12 = avahi-compat-howl.pc
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@am__append_13 = avahi-compat-libdns_sd.pc
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@am__append_14 = avahi-compat-libdns_sd.pc
+@HAVE_DBUS_TRUE@@HAVE_MONO_TRUE@am__append_15 = avahi-sharp.pc avahi-ui-sharp.pc
+@HAVE_DBUS_TRUE@@HAVE_MONO_TRUE@am__append_16 = avahi-sharp.pc avahi-ui-sharp.pc
+@HAVE_GLIB_TRUE@am__append_17 = avahi-glib.pc
+@HAVE_GLIB_TRUE@am__append_18 = avahi-glib.pc
+@HAVE_GLIB_TRUE@@HAVE_GOBJECT_TRUE@am__append_19 = avahi-gobject.pc
+@HAVE_GLIB_TRUE@@HAVE_GOBJECT_TRUE@am__append_20 = avahi-gobject.pc
+@HAVE_DBUS_TRUE@@HAVE_GTK_TRUE@am__append_21 = avahi-ui.pc
+@HAVE_DBUS_TRUE@@HAVE_GTK_TRUE@am__append_22 = avahi-ui.pc
+@HAVE_DBUS_TRUE@@HAVE_GTK3_TRUE@am__append_23 = avahi-ui-gtk3.pc
+@HAVE_DBUS_TRUE@@HAVE_GTK3_TRUE@am__append_24 = avahi-ui-gtk3.pc
+@HAVE_QT3_TRUE@am__append_25 = avahi-qt3.pc
+@HAVE_QT3_TRUE@am__append_26 = avahi-qt3.pc
+@HAVE_QT4_TRUE@am__append_27 = avahi-qt4.pc
+@HAVE_QT4_TRUE@am__append_28 = avahi-qt4.pc
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/common/acx_pthread.m4 \
+	$(top_srcdir)/common/gcc_stack_protect.m4 \
+	$(top_srcdir)/common/gcc_visibility.m4 \
+	$(top_srcdir)/common/intltool.m4 \
+	$(top_srcdir)/common/introspection.m4 \
+	$(top_srcdir)/common/libtool.m4 \
+	$(top_srcdir)/common/ltoptions.m4 \
+	$(top_srcdir)/common/ltsugar.m4 \
+	$(top_srcdir)/common/ltversion.m4 \
+	$(top_srcdir)/common/lt~obsolete.m4 \
+	$(top_srcdir)/common/nls.m4 $(top_srcdir)/common/python.m4 \
+	$(top_srcdir)/acinclude.m4 $(top_srcdir)/common/doxygen.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN   " $@;
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-dvi-recursive install-exec-recursive \
+	install-html-recursive install-info-recursive \
+	install-pdf-recursive install-ps-recursive install-recursive \
+	installcheck-recursive installdirs-recursive pdf-recursive \
+	ps-recursive uninstall-recursive
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
+DATA = $(pkgconfig_DATA)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+	distdir dist dist-all distcheck
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+  if test -d "$(distdir)"; then \
+    find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+      && rm -rf "$(distdir)" \
+      || { sleep 5 && rm -rf "$(distdir)"; }; \
+  else :; fi
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+  | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AVAHI_AUTOIPD_GROUP = @AVAHI_AUTOIPD_GROUP@
+AVAHI_AUTOIPD_USER = @AVAHI_AUTOIPD_USER@
+AVAHI_GROUP = @AVAHI_GROUP@
+AVAHI_PRIV_ACCESS_GROUP = @AVAHI_PRIV_ACCESS_GROUP@
+AVAHI_USER = @AVAHI_USER@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
+DBUS_SYSTEM_BUS_DEFAULT_ADDRESS = @DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@
+DBUS_SYS_DIR = @DBUS_SYS_DIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+DX_CONFIG = @DX_CONFIG@
+DX_DOCDIR = @DX_DOCDIR@
+DX_DOT = @DX_DOT@
+DX_DOXYGEN = @DX_DOXYGEN@
+DX_DVIPS = @DX_DVIPS@
+DX_EGREP = @DX_EGREP@
+DX_ENV = @DX_ENV@
+DX_FLAG_chi = @DX_FLAG_chi@
+DX_FLAG_chm = @DX_FLAG_chm@
+DX_FLAG_doc = @DX_FLAG_doc@
+DX_FLAG_dot = @DX_FLAG_dot@
+DX_FLAG_html = @DX_FLAG_html@
+DX_FLAG_man = @DX_FLAG_man@
+DX_FLAG_pdf = @DX_FLAG_pdf@
+DX_FLAG_ps = @DX_FLAG_ps@
+DX_FLAG_rtf = @DX_FLAG_rtf@
+DX_FLAG_xml = @DX_FLAG_xml@
+DX_HHC = @DX_HHC@
+DX_LATEX = @DX_LATEX@
+DX_MAKEINDEX = @DX_MAKEINDEX@
+DX_PDFLATEX = @DX_PDFLATEX@
+DX_PERL = @DX_PERL@
+DX_PROJECT = @DX_PROJECT@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GACUTIL = @GACUTIL@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB20_CFLAGS = @GLIB20_CFLAGS@
+GLIB20_LIBS = @GLIB20_LIBS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GOBJECT_CFLAGS = @GOBJECT_CFLAGS@
+GOBJECT_LIBS = @GOBJECT_LIBS@
+GREP = @GREP@
+GTK20_CFLAGS = @GTK20_CFLAGS@
+GTK20_LIBS = @GTK20_LIBS@
+GTK30_CFLAGS = @GTK30_CFLAGS@
+GTK30_LIBS = @GTK30_LIBS@
+HOWL_COMPAT_VERSION = @HOWL_COMPAT_VERSION@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
+INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
+INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
+INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
+INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
+INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
+INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBAVAHI_CLIENT_VERSION_INFO = @LIBAVAHI_CLIENT_VERSION_INFO@
+LIBAVAHI_COMMON_VERSION_INFO = @LIBAVAHI_COMMON_VERSION_INFO@
+LIBAVAHI_COMPAT_HOWL_VERSION_INFO = @LIBAVAHI_COMPAT_HOWL_VERSION_INFO@
+LIBAVAHI_COMPAT_LIBDNS_SD_VERSION_INFO = @LIBAVAHI_COMPAT_LIBDNS_SD_VERSION_INFO@
+LIBAVAHI_CORE_VERSION_INFO = @LIBAVAHI_CORE_VERSION_INFO@
+LIBAVAHI_GLIB_VERSION_INFO = @LIBAVAHI_GLIB_VERSION_INFO@
+LIBAVAHI_GOBJECT_VERSION_INFO = @LIBAVAHI_GOBJECT_VERSION_INFO@
+LIBAVAHI_QT3_VERSION_INFO = @LIBAVAHI_QT3_VERSION_INFO@
+LIBAVAHI_QT4_VERSION_INFO = @LIBAVAHI_QT4_VERSION_INFO@
+LIBAVAHI_UI_VERSION_INFO = @LIBAVAHI_UI_VERSION_INFO@
+LIBDAEMON_CFLAGS = @LIBDAEMON_CFLAGS@
+LIBDAEMON_LIBS = @LIBDAEMON_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MCS = @MCS@
+MDASSEMBLER = @MDASSEMBLER@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MOC_QT3 = @MOC_QT3@
+MOC_QT4 = @MOC_QT4@
+MONODOCER = @MONODOCER@
+MONODOC_CFLAGS = @MONODOC_CFLAGS@
+MONODOC_DIR = @MONODOC_DIR@
+MONODOC_LIBS = @MONODOC_LIBS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+QT3_CFLAGS = @QT3_CFLAGS@
+QT3_LIBS = @QT3_LIBS@
+QT4_CFLAGS = @QT4_CFLAGS@
+QT4_LIBS = @QT4_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STOW = @STOW@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+VISIBILITY_HIDDEN_CFLAGS = @VISIBILITY_HIDDEN_CFLAGS@
+XGETTEXT = @XGETTEXT@
+XML_CFLAGS = @XML_CFLAGS@
+XML_LIBS = @XML_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+avahi_runtime_dir = @avahi_runtime_dir@
+avahi_socket = @avahi_socket@
+avahilocaledir = @avahilocaledir@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+have_pkg_config = @have_pkg_config@
+have_xmltoman = @have_xmltoman@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+interfacesdir = @interfacesdir@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+systemdsystemunitdir = @systemdsystemunitdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+ACLOCAL_AMFLAGS = -I common
+@DX_COND_doc_TRUE@@DX_COND_html_TRUE@DX_CLEAN_HTML = @DX_DOCDIR@/html
+@DX_COND_chm_TRUE@@DX_COND_doc_TRUE@DX_CLEAN_CHM = @DX_DOCDIR@/chm
+@DX_COND_chi_TRUE@@DX_COND_chm_TRUE@@DX_COND_doc_TRUE@DX_CLEAN_CHI = @DX_DOCDIR@/@PACKAGE@.chi
+@DX_COND_doc_TRUE@@DX_COND_man_TRUE@DX_CLEAN_MAN = @DX_DOCDIR@/man
+@DX_COND_doc_TRUE@@DX_COND_rtf_TRUE@DX_CLEAN_RTF = @DX_DOCDIR@/rtf
+@DX_COND_doc_TRUE@@DX_COND_xml_TRUE@DX_CLEAN_XML = @DX_DOCDIR@/xml
+@DX_COND_doc_TRUE@@DX_COND_ps_TRUE@DX_CLEAN_PS = @DX_DOCDIR@/@PACKAGE@.ps
+@DX_COND_doc_TRUE@@DX_COND_ps_TRUE@DX_PS_GOAL = doxygen-ps
+@DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@DX_CLEAN_PDF = @DX_DOCDIR@/@PACKAGE@.pdf
+@DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@DX_PDF_GOAL = doxygen-pdf
+@DX_COND_doc_TRUE@@DX_COND_latex_TRUE@DX_CLEAN_LATEX = @DX_DOCDIR@/latex
+@DX_COND_doc_TRUE@DX_CLEANFILES = \
+@DX_COND_doc_TRUE@    @DX_DOCDIR@/@PACKAGE@.tag \
+@DX_COND_doc_TRUE@    -r \
+@DX_COND_doc_TRUE@    $(DX_CLEAN_HTML) \
+@DX_COND_doc_TRUE@    $(DX_CLEAN_CHM) \
+@DX_COND_doc_TRUE@    $(DX_CLEAN_CHI) \
+@DX_COND_doc_TRUE@    $(DX_CLEAN_MAN) \
+@DX_COND_doc_TRUE@    $(DX_CLEAN_RTF) \
+@DX_COND_doc_TRUE@    $(DX_CLEAN_XML) \
+@DX_COND_doc_TRUE@    $(DX_CLEAN_PS) \
+@DX_COND_doc_TRUE@    $(DX_CLEAN_PDF) \
+@DX_COND_doc_TRUE@    $(DX_CLEAN_LATEX)
+
+EXTRA_DIST = \
+	autogen.sh \
+	bootstrap.sh \
+	LICENSE \
+	$(DX_CONFIG) \
+	docs/INSTALL \
+	docs/TODO \
+	docs/NEWS \
+	docs/README \
+	docs/DBUS-API \
+	docs/AUTHORS \
+	docs/HACKING \
+	docs/API-CHANGES-0.6 \
+	docs/COMPAT-LAYERS \
+	docs/MALLOC \
+	docs/overview.dia \
+	docs/server-states.dia \
+	docs/avahi-poll.dia \
+	avahi-core.pc.in \
+	avahi-client.pc.in \
+	avahi-glib.pc.in \
+	avahi-gobject.pc.in \
+	avahi-qt3.pc.in \
+	avahi-qt4.pc.in \
+	avahi-sharp.pc.in \
+	avahi-ui-sharp.pc.in \
+	avahi-compat-libdns_sd.pc.in \
+	avahi-compat-howl.pc.in \
+	avahi-ui.pc.in \
+	avahi-ui-gtk3.pc.in \
+	doxygen_to_devhelp.xsl \
+        common/introspection.m4
+
+SUBDIRS = \
+	common \
+	avahi-common \
+	avahi-core \
+	avahi-qt \
+	avahi-client \
+	avahi-glib \
+	avahi-gobject \
+	avahi-discover-standalone \
+	avahi-daemon \
+	avahi-sharp \
+	initscript \
+	avahi-dnsconfd \
+	avahi-utils \
+	avahi-python \
+	examples \
+	man \
+	tests \
+	service-type-database \
+	avahi-compat-libdns_sd \
+	avahi-compat-howl \
+	avahi-autoipd \
+	avahi-ui \
+	avahi-ui-sharp \
+	po
+
+DX_INPUT = $(srcdir)/avahi-common/address.h \
+	$(srcdir)/avahi-common/malloc.h \
+	$(srcdir)/avahi-common/strlst.h \
+	$(srcdir)/avahi-common/alternative.h \
+	$(srcdir)/avahi-common/defs.h $(srcdir)/avahi-common/error.h \
+	$(srcdir)/avahi-common/domain.h $(srcdir)/avahi-common/watch.h \
+	$(srcdir)/avahi-common/simple-watch.h \
+	$(srcdir)/avahi-common/thread-watch.h $(am__append_1) \
+	$(am__append_2) $(am__append_3) $(am__append_4) \
+	$(am__append_5) $(am__append_6) $(am__append_7) \
+	$(am__append_8)
+DX_EXAMPLE_PATH = $(srcdir)/examples
+DX_EXAMPLE_PATTERNS = *.c
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = avahi-core.pc $(am__append_9) $(am__append_11) \
+	$(am__append_13) $(am__append_15) $(am__append_17) \
+	$(am__append_19) $(am__append_21) $(am__append_23) \
+	$(am__append_25) $(am__append_27)
+CLEANFILES = avahi-core.pc $(am__append_10) $(am__append_12) \
+	$(am__append_14) $(am__append_16) $(am__append_18) \
+	$(am__append_20) $(am__append_22) $(am__append_24) \
+	$(am__append_26) $(am__append_28) avahi.devhelp
+MOSTLYCLEANFILES = $(DX_CLEANFILES)
+DISTCHECK_CONFIGURE_FLAGS = \
+	--disable-monodoc \
+	--enable-introspection \
+	--with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
+
+DISTCLEANFILES = \
+	po/.intltool-merge-cache
+
+all: config.h
+	$(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+am--refresh: Makefile
+	@:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(srcdir)/common/doxygen.mk $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+	      $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    echo ' $(SHELL) ./config.status'; \
+	    $(SHELL) ./config.status;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+	esac;
+$(srcdir)/common/doxygen.mk:
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	$(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	$(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+config.h: stamp-h1
+	@if test ! -f $@; then rm -f stamp-h1; else :; fi
+	@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
+
+stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+	@rm -f stamp-h1
+	cd $(top_builddir) && $(SHELL) ./config.status config.h
+$(srcdir)/config.h.in:  $(am__configure_deps) 
+	($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+	rm -f stamp-h1
+	touch $@
+
+distclean-hdr:
+	-rm -f config.h stamp-h1
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool config.lt
+install-pkgconfigDATA: $(pkgconfig_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
+	@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
+	done
+
+uninstall-pkgconfigDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@fail= failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+	@fail= failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	$(am__remove_distdir)
+	test -d "$(distdir)" || mkdir "$(distdir)"
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(MKDIR_P) "$(distdir)/$$subdir" \
+	    || exit 1; \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+	    $(am__relativize); \
+	    new_distdir=$$reldir; \
+	    dir1=$$subdir; dir2="$(top_distdir)"; \
+	    $(am__relativize); \
+	    new_top_distdir=$$reldir; \
+	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+	    ($(am__cd) $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$new_top_distdir" \
+	        distdir="$$new_distdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+		am__skip_mode_fix=: \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+	-test -n "$(am__skip_mode_fix)" \
+	|| find "$(distdir)" -type d ! -perm -755 \
+		-exec chmod u+rwx,go+rx {} \; -o \
+	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+	|| chmod -R a+r "$(distdir)"
+dist-gzip: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+dist-bzip2: distdir
+	tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+	$(am__remove_distdir)
+
+dist-lzip: distdir
+	tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
+	$(am__remove_distdir)
+
+dist-lzma: distdir
+	tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+	$(am__remove_distdir)
+
+dist-xz: distdir
+	tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
+	$(am__remove_distdir)
+
+dist-tarZ: distdir
+	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+	$(am__remove_distdir)
+
+dist-shar: distdir
+	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+	$(am__remove_distdir)
+
+dist-zip: distdir
+	-rm -f $(distdir).zip
+	zip -rq $(distdir).zip $(distdir)
+	$(am__remove_distdir)
+
+dist dist-all: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+	case '$(DIST_ARCHIVES)' in \
+	*.tar.gz*) \
+	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+	*.tar.bz2*) \
+	  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+	*.tar.lzma*) \
+	  lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+	*.tar.lz*) \
+	  lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
+	*.tar.xz*) \
+	  xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+	*.tar.Z*) \
+	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+	*.shar.gz*) \
+	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+	*.zip*) \
+	  unzip $(distdir).zip ;;\
+	esac
+	chmod -R a-w $(distdir); chmod a+w $(distdir)
+	mkdir $(distdir)/_build
+	mkdir $(distdir)/_inst
+	chmod a-w $(distdir)
+	test -d $(distdir)/_build || exit 0; \
+	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+	  && am__cwd=`pwd` \
+	  && $(am__cd) $(distdir)/_build \
+	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+	    $(AM_DISTCHECK_CONFIGURE_FLAGS) \
+	    $(DISTCHECK_CONFIGURE_FLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
+	  && $(MAKE) $(AM_MAKEFLAGS) check \
+	  && $(MAKE) $(AM_MAKEFLAGS) install \
+	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+	        distuninstallcheck \
+	  && chmod -R a-w "$$dc_install_base" \
+	  && ({ \
+	       (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+	            distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
+	  && rm -rf "$$dc_destdir" \
+	  && $(MAKE) $(AM_MAKEFLAGS) dist \
+	  && rm -rf $(DIST_ARCHIVES) \
+	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+	  && cd "$$am__cwd" \
+	  || exit 1
+	$(am__remove_distdir)
+	@(echo "$(distdir) archives ready for distribution: "; \
+	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+	  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+	@test -n '$(distuninstallcheck_dir)' || { \
+	  echo 'ERROR: trying to run $@ with an empty' \
+	       '$$(distuninstallcheck_dir)' >&2; \
+	  exit 1; \
+	}; \
+	$(am__cd) '$(distuninstallcheck_dir)' || { \
+	  echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+	  exit 1; \
+	}; \
+	test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
+	   || { echo "ERROR: files left after uninstall:" ; \
+	        if test -n "$(DESTDIR)"; then \
+	          echo "  (check DESTDIR support)"; \
+	        fi ; \
+	        $(distuninstallcheck_listfiles) ; \
+	        exit 1; } >&2
+distcleancheck: distclean
+	@if test '$(srcdir)' = . ; then \
+	  echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+	  exit 1 ; \
+	fi
+	@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+	  || { echo "ERROR: files left in build directory after distclean:" ; \
+	       $(distcleancheck_listfiles) ; \
+	       exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(DATA) config.h
+installdirs: installdirs-recursive
+installdirs-am:
+	for dir in "$(DESTDIR)$(pkgconfigdir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+	-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-hdr \
+	distclean-libtool distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-pkgconfigDATA
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -rf $(top_srcdir)/autom4te.cache
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-pkgconfigDATA
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
+	ctags-recursive install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+	all all-am am--refresh check check-am clean clean-generic \
+	clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
+	dist-gzip dist-lzip dist-lzma dist-shar dist-tarZ dist-xz \
+	dist-zip distcheck distclean distclean-generic distclean-hdr \
+	distclean-libtool distclean-tags distcleancheck distdir \
+	distuninstallcheck dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-pkgconfigDATA install-ps \
+	install-ps-am install-strip installcheck installcheck-am \
+	installdirs installdirs-am maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+	uninstall uninstall-am uninstall-pkgconfigDATA
+
+
+@DX_COND_doc_TRUE@@DX_COND_ps_TRUE@doxygen-ps: @DX_DOCDIR@/@PACKAGE@.ps
+
+@DX_COND_doc_TRUE@@DX_COND_ps_TRUE@@DX_DOCDIR@/@PACKAGE@.ps: @DX_DOCDIR@/@PACKAGE@.tag
+@DX_COND_doc_TRUE@@DX_COND_ps_TRUE@	cd @DX_DOCDIR@/latex; \
+@DX_COND_doc_TRUE@@DX_COND_ps_TRUE@	rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \
+@DX_COND_doc_TRUE@@DX_COND_ps_TRUE@	$(DX_LATEX) refman.tex; \
+@DX_COND_doc_TRUE@@DX_COND_ps_TRUE@	$(MAKEINDEX_PATH) refman.idx; \
+@DX_COND_doc_TRUE@@DX_COND_ps_TRUE@	$(DX_LATEX) refman.tex; \
+@DX_COND_doc_TRUE@@DX_COND_ps_TRUE@	countdown=5; \
+@DX_COND_doc_TRUE@@DX_COND_ps_TRUE@	while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \
+@DX_COND_doc_TRUE@@DX_COND_ps_TRUE@	                  refman.log > /dev/null 2>&1 \
+@DX_COND_doc_TRUE@@DX_COND_ps_TRUE@	   && test $$countdown -gt 0; do \
+@DX_COND_doc_TRUE@@DX_COND_ps_TRUE@	    $(DX_LATEX) refman.tex; \
+@DX_COND_doc_TRUE@@DX_COND_ps_TRUE@	    countdown=`expr $$countdown - 1`; \
+@DX_COND_doc_TRUE@@DX_COND_ps_TRUE@	done; \
+@DX_COND_doc_TRUE@@DX_COND_ps_TRUE@	$(DX_DVIPS) -o ../@PACKAGE@.ps refman.dvi
+
+@DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@doxygen-pdf: @DX_DOCDIR@/@PACKAGE@.pdf
+
+@DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@@DX_DOCDIR@/@PACKAGE@.pdf: @DX_DOCDIR@/@PACKAGE@.tag
+@DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@	cd @DX_DOCDIR@/latex; \
+@DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@	rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \
+@DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@	$(DX_PDFLATEX) refman.tex; \
+@DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@	$(DX_MAKEINDEX) refman.idx; \
+@DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@	$(DX_PDFLATEX) refman.tex; \
+@DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@	countdown=5; \
+@DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@	while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \
+@DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@	                  refman.log > /dev/null 2>&1 \
+@DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@	   && test $$countdown -gt 0; do \
+@DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@	    $(DX_PDFLATEX) refman.tex; \
+@DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@	    countdown=`expr $$countdown - 1`; \
+@DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@	done; \
+@DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@	mv refman.pdf ../@PACKAGE@.pdf
+
+@DX_COND_doc_TRUE@.PHONY: doxygen-run doxygen-doc $(DX_PS_GOAL) $(DX_PDF_GOAL)
+
+@DX_COND_doc_TRUE@.INTERMEDIATE: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL)
+
+@DX_COND_doc_TRUE@doxygen-run: @DX_DOCDIR@/@PACKAGE@.tag
+
+@DX_COND_doc_TRUE@doxygen-doc: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL)
+
+@DX_COND_doc_TRUE@@DX_DOCDIR@/@PACKAGE@.tag: $(DX_CONFIG) $(pkginclude_HEADERS) $(DX_INPUT) $(DX_EXAMPLE_PATH)/$(DX_EXAMPLE_PATTERNS)
+@DX_COND_doc_TRUE@	rm -rf @DX_DOCDIR@
+@DX_COND_doc_TRUE@	INPUT='$(DX_INPUT)' EXAMPLE_PATH='$(DX_EXAMPLE_PATH)' EXAMPLE_PATTERNS='$(DX_EXAMPLE_PATTERNS)' \
+@DX_COND_doc_TRUE@	$(DX_ENV) $(DX_DOXYGEN) $(srcdir)/$(DX_CONFIG)
+
+%.pc: %.pc.in
+	$(AM_V_GEN)sed -e 's,@prefix\@,$(prefix),g' \
+	    -e 's,@libdir\@,$(libdir),g' \
+	    -e 's,@HOWL_COMPAT_VERSION\@,$(HOWL_COMPAT_VERSION),g' \
+	    -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' $< > $@
+
+avahi.devhelp: doxygen-run
+	xsltproc -o $@ doxygen_to_devhelp.xsl doxygen/xml/index.xml
+
+homepage:
+	$(MAKE) -C man
+	scp avahi-daemon/*.xml avahi-daemon/introspect.dtd avahi-daemon/introspect.xsl\
+	    man/*.xml man/xmltoman.dtd man/xmltoman.xsl \
+	    tango:www/avahi.org/tree/download/
+	scp avahi-$(PACKAGE_VERSION).tar.gz tango:www/avahi.org/tree/download/
+	rm -rf doxygen
+	$(MAKE) doxygen-run
+	ssh tango rm -rf www/avahi.org/tree/download/doxygen
+	scp -r doxygen/html tango:www/avahi.org/tree/download/doxygen
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/avahi-0.6.31/README b/avahi-0.6.31/README
new file mode 100644
index 0000000..832874c
--- /dev/null
+++ b/avahi-0.6.31/README
@@ -0,0 +1,34 @@
+AVAHI SERVICE DISCOVERY SUITE
+
+WEB SITE:
+	http://avahi.org/
+
+GIT:
+	git://git.0pointer.de/avahi.git
+
+GITWEB:
+	http://git.0pointer.de/?p=avahi.git;a=summary
+
+MAILING LIST:
+	http://lists.freedesktop.org/mailman/listinfo/avahi
+
+GIT COMMITS MAILING LIST:
+	https://tango.0pointer.de/mailman/listinfo/avahi-commits
+
+TRAC TICKET CHANGES MAILING LIST:
+	https://tango.0pointer.de/mailman/listinfo/avahi-tickets
+
+IRC:
+	#avahi on irc.freenode.org
+
+CIA:
+	http://cia.navi.cx/stats/project/avahi
+
+FRESHMEAT:
+	http://freshmeat.net/projects/avahi/
+
+OHLOH:
+	http://www.ohloh.net/projects/avahi/
+
+AUTHORS:
+	Several
diff --git a/avahi-0.6.31/acinclude.m4 b/avahi-0.6.31/acinclude.m4
new file mode 100644
index 0000000..4d07999
--- /dev/null
+++ b/avahi-0.6.31/acinclude.m4
@@ -0,0 +1 @@
+sinclude(common/doxygen.m4)
\ No newline at end of file
diff --git a/avahi-0.6.31/aclocal.m4 b/avahi-0.6.31/aclocal.m4
new file mode 100644
index 0000000..8bc1093
--- /dev/null
+++ b/avahi-0.6.31/aclocal.m4
@@ -0,0 +1,1893 @@
+# generated automatically by aclocal 1.11.3 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
+You have another version of autoconf.  It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
+
+# Copyright (C) 1995-2002 Free Software Foundation, Inc.
+# Copyright (C) 2001-2003,2004 Red Hat, Inc.
+#
+# This file is free software, distributed under the terms of the GNU
+# General Public License.  As a special exception to the GNU General
+# Public License, this file may be distributed as part of a program
+# that contains a configuration script generated by Autoconf, under
+# the same distribution terms as the rest of that program.
+#
+# This file can be copied and used freely without restrictions.  It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+#
+# Macro to add for using GNU gettext.
+# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
+#
+# Modified to never use included libintl. 
+# Owen Taylor <otaylor@redhat.com>, 12/15/1998
+#
+# Major rework to remove unused code
+# Owen Taylor <otaylor@redhat.com>, 12/11/2002
+#
+# Added better handling of ALL_LINGUAS from GNU gettext version 
+# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
+#
+# Modified to require ngettext
+# Matthias Clasen <mclasen@redhat.com> 08/06/2004
+#
+# We need this here as well, since someone might use autoconf-2.5x
+# to configure GLib then an older version to configure a package
+# using AM_GLIB_GNU_GETTEXT
+AC_PREREQ(2.53)
+
+dnl
+dnl We go to great lengths to make sure that aclocal won't 
+dnl try to pull in the installed version of these macros
+dnl when running aclocal in the glib directory.
+dnl
+m4_copy([AC_DEFUN],[glib_DEFUN])
+m4_copy([AC_REQUIRE],[glib_REQUIRE])
+dnl
+dnl At the end, if we're not within glib, we'll define the public
+dnl definitions in terms of our private definitions.
+dnl
+
+# GLIB_LC_MESSAGES
+#--------------------
+glib_DEFUN([GLIB_LC_MESSAGES],
+  [AC_CHECK_HEADERS([locale.h])
+    if test $ac_cv_header_locale_h = yes; then
+    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
+      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
+       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
+    if test $am_cv_val_LC_MESSAGES = yes; then
+      AC_DEFINE(HAVE_LC_MESSAGES, 1,
+        [Define if your <locale.h> file defines LC_MESSAGES.])
+    fi
+  fi])
+
+# GLIB_PATH_PROG_WITH_TEST
+#----------------------------
+dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
+[# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL(ac_cv_path_$1,
+[case "[$]$1" in
+  /*)
+  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+  ;;
+  *)
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in ifelse([$5], , $PATH, [$5]); do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      if [$3]; then
+	ac_cv_path_$1="$ac_dir/$ac_word"
+	break
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+  ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
+  AC_MSG_RESULT([$]$1)
+else
+  AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
+
+# GLIB_WITH_NLS
+#-----------------
+glib_DEFUN([GLIB_WITH_NLS],
+  dnl NLS is obligatory
+  [USE_NLS=yes
+    AC_SUBST(USE_NLS)
+
+    gt_cv_have_gettext=no
+
+    CATOBJEXT=NONE
+    XGETTEXT=:
+    INTLLIBS=
+
+    AC_CHECK_HEADER(libintl.h,
+     [gt_cv_func_dgettext_libintl="no"
+      libintl_extra_libs=""
+
+      #
+      # First check in libc
+      #
+      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
+        [AC_TRY_LINK([
+#include <libintl.h>
+],
+         [return !ngettext ("","", 1)],
+	  gt_cv_func_ngettext_libc=yes,
+          gt_cv_func_ngettext_libc=no)
+        ])
+  
+      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
+	      AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
+        	[AC_TRY_LINK([
+#include <libintl.h>
+],
+	          [return !dgettext ("","")],
+		  gt_cv_func_dgettext_libc=yes,
+	          gt_cv_func_dgettext_libc=no)
+        	])
+      fi
+  
+      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
+        AC_CHECK_FUNCS(bind_textdomain_codeset)
+      fi
+
+      #
+      # If we don't have everything we want, check in libintl
+      #
+      if test "$gt_cv_func_dgettext_libc" != "yes" \
+	 || test "$gt_cv_func_ngettext_libc" != "yes" \
+         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
+        
+        AC_CHECK_LIB(intl, bindtextdomain,
+	    [AC_CHECK_LIB(intl, ngettext,
+		    [AC_CHECK_LIB(intl, dgettext,
+			          gt_cv_func_dgettext_libintl=yes)])])
+
+	if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
+	  AC_MSG_CHECKING([if -liconv is needed to use gettext])
+	  AC_MSG_RESULT([])
+  	  AC_CHECK_LIB(intl, ngettext,
+          	[AC_CHECK_LIB(intl, dcgettext,
+		       [gt_cv_func_dgettext_libintl=yes
+			libintl_extra_libs=-liconv],
+			:,-liconv)],
+		:,-liconv)
+        fi
+
+        #
+        # If we found libintl, then check in it for bind_textdomain_codeset();
+        # we'll prefer libc if neither have bind_textdomain_codeset(),
+        # and both have dgettext and ngettext
+        #
+        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
+          glib_save_LIBS="$LIBS"
+          LIBS="$LIBS -lintl $libintl_extra_libs"
+          unset ac_cv_func_bind_textdomain_codeset
+          AC_CHECK_FUNCS(bind_textdomain_codeset)
+          LIBS="$glib_save_LIBS"
+
+          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
+            gt_cv_func_dgettext_libc=no
+          else
+            if test "$gt_cv_func_dgettext_libc" = "yes" \
+		&& test "$gt_cv_func_ngettext_libc" = "yes"; then
+              gt_cv_func_dgettext_libintl=no
+            fi
+          fi
+        fi
+      fi
+
+      if test "$gt_cv_func_dgettext_libc" = "yes" \
+	|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
+        gt_cv_have_gettext=yes
+      fi
+  
+      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
+        INTLLIBS="-lintl $libintl_extra_libs"
+      fi
+  
+      if test "$gt_cv_have_gettext" = "yes"; then
+	AC_DEFINE(HAVE_GETTEXT,1,
+	  [Define if the GNU gettext() function is already present or preinstalled.])
+	GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+	  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
+	if test "$MSGFMT" != "no"; then
+          glib_save_LIBS="$LIBS"
+          LIBS="$LIBS $INTLLIBS"
+	  AC_CHECK_FUNCS(dcgettext)
+	  MSGFMT_OPTS=
+	  AC_MSG_CHECKING([if msgfmt accepts -c])
+	  GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
+msgid ""
+msgstr ""
+"Content-Type: text/plain; charset=UTF-8\n"
+"Project-Id-Version: test 1.0\n"
+"PO-Revision-Date: 2007-02-15 12:01+0100\n"
+"Last-Translator: test <foo@bar.xx>\n"
+"Language-Team: C <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Transfer-Encoding: 8bit\n"
+], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
+	  AC_SUBST(MSGFMT_OPTS)
+	  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+	  GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+	    [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+	  AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
+			 return _nl_msg_cat_cntr],
+	    [CATOBJEXT=.gmo 
+             DATADIRNAME=share],
+	    [case $host in
+	    *-*-solaris*)
+	    dnl On Solaris, if bind_textdomain_codeset is in libc,
+	    dnl GNU format message catalog is always supported,
+            dnl since both are added to the libc all together.
+	    dnl Hence, we'd like to go with DATADIRNAME=share and
+	    dnl and CATOBJEXT=.gmo in this case.
+            AC_CHECK_FUNC(bind_textdomain_codeset,
+	      [CATOBJEXT=.gmo 
+               DATADIRNAME=share],
+	      [CATOBJEXT=.mo
+               DATADIRNAME=lib])
+	    ;;
+	    *-*-openbsd*)
+	    CATOBJEXT=.mo
+            DATADIRNAME=share
+	    ;;
+	    *)
+	    CATOBJEXT=.mo
+            DATADIRNAME=lib
+	    ;;
+	    esac])
+          LIBS="$glib_save_LIBS"
+	  INSTOBJEXT=.mo
+	else
+	  gt_cv_have_gettext=no
+	fi
+      fi
+    ])
+
+    if test "$gt_cv_have_gettext" = "yes" ; then
+      AC_DEFINE(ENABLE_NLS, 1,
+        [always defined to indicate that i18n is enabled])
+    fi
+
+    dnl Test whether we really found GNU xgettext.
+    if test "$XGETTEXT" != ":"; then
+      dnl If it is not GNU xgettext we define it as : so that the
+      dnl Makefiles still can work.
+      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+        : ;
+      else
+        AC_MSG_RESULT(
+	  [found xgettext program is not GNU xgettext; ignore it])
+        XGETTEXT=":"
+      fi
+    fi
+
+    # We need to process the po/ directory.
+    POSUB=po
+
+    AC_OUTPUT_COMMANDS(
+      [case "$CONFIG_FILES" in *po/Makefile.in*)
+        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
+      esac])
+
+    dnl These rules are solely for the distribution goal.  While doing this
+    dnl we only have to keep exactly one list of the available catalogs
+    dnl in configure.ac.
+    for lang in $ALL_LINGUAS; do
+      GMOFILES="$GMOFILES $lang.gmo"
+      POFILES="$POFILES $lang.po"
+    done
+
+    dnl Make all variables we use known to autoconf.
+    AC_SUBST(CATALOGS)
+    AC_SUBST(CATOBJEXT)
+    AC_SUBST(DATADIRNAME)
+    AC_SUBST(GMOFILES)
+    AC_SUBST(INSTOBJEXT)
+    AC_SUBST(INTLLIBS)
+    AC_SUBST(PO_IN_DATADIR_TRUE)
+    AC_SUBST(PO_IN_DATADIR_FALSE)
+    AC_SUBST(POFILES)
+    AC_SUBST(POSUB)
+  ])
+
+# AM_GLIB_GNU_GETTEXT
+# -------------------
+# Do checks necessary for use of gettext. If a suitable implementation 
+# of gettext is found in either in libintl or in the C library,
+# it will set INTLLIBS to the libraries needed for use of gettext
+# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
+# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
+# on various variables needed by the Makefile.in.in installed by 
+# glib-gettextize.
+dnl
+glib_DEFUN([GLIB_GNU_GETTEXT],
+  [AC_REQUIRE([AC_PROG_CC])dnl
+   AC_REQUIRE([AC_HEADER_STDC])dnl
+   
+   GLIB_LC_MESSAGES
+   GLIB_WITH_NLS
+
+   if test "$gt_cv_have_gettext" = "yes"; then
+     if test "x$ALL_LINGUAS" = "x"; then
+       LINGUAS=
+     else
+       AC_MSG_CHECKING(for catalogs to be installed)
+       NEW_LINGUAS=
+       for presentlang in $ALL_LINGUAS; do
+         useit=no
+         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
+           desiredlanguages="$LINGUAS"
+         else
+           desiredlanguages="$ALL_LINGUAS"
+         fi
+         for desiredlang in $desiredlanguages; do
+ 	   # Use the presentlang catalog if desiredlang is
+           #   a. equal to presentlang, or
+           #   b. a variant of presentlang (because in this case,
+           #      presentlang can be used as a fallback for messages
+           #      which are not translated in the desiredlang catalog).
+           case "$desiredlang" in
+             "$presentlang"*) useit=yes;;
+           esac
+         done
+         if test $useit = yes; then
+           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
+         fi
+       done
+       LINGUAS=$NEW_LINGUAS
+       AC_MSG_RESULT($LINGUAS)
+     fi
+
+     dnl Construct list of names of catalog files to be constructed.
+     if test -n "$LINGUAS"; then
+       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+     fi
+   fi
+
+   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
+   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
+   dnl Try to locate is.
+   MKINSTALLDIRS=
+   if test -n "$ac_aux_dir"; then
+     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
+   fi
+   if test -z "$MKINSTALLDIRS"; then
+     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+   fi
+   AC_SUBST(MKINSTALLDIRS)
+
+   dnl Generate list of files to be processed by xgettext which will
+   dnl be included in po/Makefile.
+   test -d po || mkdir po
+   if test "x$srcdir" != "x."; then
+     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
+       posrcprefix="$srcdir/"
+     else
+       posrcprefix="../$srcdir/"
+     fi
+   else
+     posrcprefix="../"
+   fi
+   rm -f po/POTFILES
+   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
+	< $srcdir/po/POTFILES.in > po/POTFILES
+  ])
+
+# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
+# -------------------------------
+# Define VARIABLE to the location where catalog files will
+# be installed by po/Makefile.
+glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
+[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
+glib_save_prefix="$prefix"
+glib_save_exec_prefix="$exec_prefix"
+glib_save_datarootdir="$datarootdir"
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+test "x$exec_prefix" = xNONE && exec_prefix=$prefix
+datarootdir=`eval echo "${datarootdir}"`
+if test "x$CATOBJEXT" = "x.mo" ; then
+  localedir=`eval echo "${libdir}/locale"`
+else
+  localedir=`eval echo "${datadir}/locale"`
+fi
+prefix="$glib_save_prefix"
+exec_prefix="$glib_save_exec_prefix"
+datarootdir="$glib_save_datarootdir"
+AC_DEFINE_UNQUOTED($1, "$localedir",
+  [Define the location where the catalogs will be installed])
+])
+
+dnl
+dnl Now the definitions that aclocal will find
+dnl
+ifdef(glib_configure_ac,[],[
+AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
+AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
+])dnl
+
+# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
+# 
+# Create a temporary file with TEST-FILE as its contents and pass the
+# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
+# 0 and perform ACTION-IF-FAIL for any other exit status.
+AC_DEFUN([GLIB_RUN_PROG],
+[cat >conftest.foo <<_ACEOF
+$2
+_ACEOF
+if AC_RUN_LOG([$1 conftest.foo]); then
+  m4_ifval([$3], [$3], [:])
+m4_ifvaln([$4], [else $4])dnl
+echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
+sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
+fi])
+
+
+# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
+# serial 1 (pkg-config-0.24)
+# 
+# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program 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
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
+AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
+AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+	_pkg_min_version=m4_default([$1], [0.9.0])
+	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+		AC_MSG_RESULT([yes])
+	else
+		AC_MSG_RESULT([no])
+		PKG_CONFIG=""
+	fi
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
+
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# Check to see whether a particular set of modules exists.  Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+# only at the first occurence in configure.ac, so if the first place
+# it's called might be skipped (such as if it is within an "if", you
+# have to call PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+  m4_default([$2], [:])
+m4_ifvaln([$3], [else
+  $3])dnl
+fi])
+
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$$1"; then
+    pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+    PKG_CHECK_EXISTS([$3],
+                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+		     [pkg_failed=yes])
+ else
+    pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
+
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
+
+
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+#
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+   	AC_MSG_RESULT([no])
+        _PKG_SHORT_ERRORS_SUPPORTED
+        if test $_pkg_short_errors_supported = yes; then
+	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
+        else 
+	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+	m4_default([$4], [AC_MSG_ERROR(
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT])
+        ])
+elif test $pkg_failed = untried; then
+     	AC_MSG_RESULT([no])
+	m4_default([$4], [AC_MSG_FAILURE(
+[The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])
+        ])
+else
+	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+        AC_MSG_RESULT([yes])
+	$3
+fi[]dnl
+])# PKG_CHECK_MODULES
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
+# Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.11'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version.  Point them to the right macro.
+m4_if([$1], [1.11.3], [],
+      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too.  Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.11.3])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL                                            -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 9
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
+# 2010, 2011 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 12
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
+       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                   [depcc="$$1"   am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+               [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_$1_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+  fi
+  am__universal=false
+  m4_case([$1], [CC],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac],
+    [CXX],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac])
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_$1_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+  am__nodep='_no'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
+])
+
+# Generate code to set up dependency tracking.              -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+#serial 5
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`AS_DIRNAME("$mf")`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`AS_DIRNAME(["$file"])`
+      AS_MKDIR_P([$dirpart/$fdir])
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake.                             -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 16
+
+# This macro actually does too much.  Some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.62])dnl
+dnl Autoconf wants to disallow AM_ names.  We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+  fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+			     [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+		  [_AM_DEPENDENCIES(CC)],
+		  [define([AC_PROG_CC],
+			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+		  [_AM_DEPENDENCIES(CXX)],
+		  [define([AC_PROG_CXX],
+			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+		  [_AM_DEPENDENCIES(OBJC)],
+		  [define([AC_PROG_OBJC],
+			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
+
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
+# Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot.  For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Check to see how 'make' treats includes.	            -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 6
+
+# AM_PROG_CC_C_O
+# --------------
+# Like AC_PROG_CC_C_O, but changed for automake.
+AC_DEFUN([AM_PROG_CC_C_O],
+[AC_REQUIRE([AC_PROG_CC_C_O])dnl
+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
+   # Losing compiler, so override with the script.
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
+fi
+dnl Make sure AC_PROG_CC is never called again, or it will override our
+dnl setting of CC.
+m4_define([AC_PROG_CC],
+          [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
+])
+
+# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 6
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
+# Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+  [[\\/$]]* | ?:[[\\/]]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling.                     -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
+# Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# --------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009,
+# 2011 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# ---------------------------------------------------------------------------
+# Adds support for distributing Python modules and packages.  To
+# install modules, copy them to $(pythondir), using the python_PYTHON
+# automake variable.  To install a package with the same name as the
+# automake package, install to $(pkgpythondir), or use the
+# pkgpython_PYTHON automake variable.
+#
+# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
+# locations to install python extension modules (shared libraries).
+# Another macro is required to find the appropriate flags to compile
+# extension modules.
+#
+# If your package is configured with a different prefix to python,
+# users will have to add the install directory to the PYTHONPATH
+# environment variable, or create a .pth file (see the python
+# documentation for details).
+#
+# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
+# cause an error if the version of python installed on the system
+# doesn't meet the requirement.  MINIMUM-VERSION should consist of
+# numbers and dots only.
+AC_DEFUN([AM_PATH_PYTHON],
+ [
+  dnl Find a Python interpreter.  Python versions prior to 2.0 are not
+  dnl supported. (2.0 was released on October 16, 2000).
+  m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
+[python python2 python3 python3.2 python3.1 python3.0 python2.7 dnl
+ python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0])
+
+  AC_ARG_VAR([PYTHON], [the Python interpreter])
+
+  m4_if([$1],[],[
+    dnl No version check is needed.
+    # Find any Python interpreter.
+    if test -z "$PYTHON"; then
+      AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
+    fi
+    am_display_PYTHON=python
+  ], [
+    dnl A version check is needed.
+    if test -n "$PYTHON"; then
+      # If the user set $PYTHON, use it and don't search something else.
+      AC_MSG_CHECKING([whether $PYTHON version >= $1])
+      AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
+			      [AC_MSG_RESULT(yes)],
+			      [AC_MSG_ERROR(too old)])
+      am_display_PYTHON=$PYTHON
+    else
+      # Otherwise, try each interpreter until we find one that satisfies
+      # VERSION.
+      AC_CACHE_CHECK([for a Python interpreter with version >= $1],
+	[am_cv_pathless_PYTHON],[
+	for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
+	  test "$am_cv_pathless_PYTHON" = none && break
+	  AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
+	done])
+      # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
+      if test "$am_cv_pathless_PYTHON" = none; then
+	PYTHON=:
+      else
+        AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
+      fi
+      am_display_PYTHON=$am_cv_pathless_PYTHON
+    fi
+  ])
+
+  if test "$PYTHON" = :; then
+  dnl Run any user-specified action, or abort.
+    m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
+  else
+
+  dnl Query Python for its version number.  Getting [:3] seems to be
+  dnl the best way to do this; it's what "site.py" does in the standard
+  dnl library.
+
+  AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
+    [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
+  AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
+
+  dnl Use the values of $prefix and $exec_prefix for the corresponding
+  dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX.  These are made
+  dnl distinct variables so they can be overridden if need be.  However,
+  dnl general consensus is that you shouldn't need this ability.
+
+  AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
+  AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
+
+  dnl At times (like when building shared libraries) you may want
+  dnl to know which OS platform Python thinks this is.
+
+  AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
+    [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
+  AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
+
+
+  dnl Set up 4 directories:
+
+  dnl pythondir -- where to install python scripts.  This is the
+  dnl   site-packages directory, not the python standard library
+  dnl   directory like in previous automake betas.  This behavior
+  dnl   is more consistent with lispdir.m4 for example.
+  dnl Query distutils for this directory.
+  AC_CACHE_CHECK([for $am_display_PYTHON script directory],
+    [am_cv_python_pythondir],
+    [if test "x$prefix" = xNONE
+     then
+       am_py_prefix=$ac_default_prefix
+     else
+       am_py_prefix=$prefix
+     fi
+     am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null`
+     case $am_cv_python_pythondir in
+     $am_py_prefix*)
+       am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
+       am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
+       ;;
+     *)
+       case $am_py_prefix in
+         /usr|/System*) ;;
+         *)
+	  am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
+	  ;;
+       esac
+       ;;
+     esac
+    ])
+  AC_SUBST([pythondir], [$am_cv_python_pythondir])
+
+  dnl pkgpythondir -- $PACKAGE directory under pythondir.  Was
+  dnl   PYTHON_SITE_PACKAGE in previous betas, but this naming is
+  dnl   more consistent with the rest of automake.
+
+  AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
+
+  dnl pyexecdir -- directory for installing python extension modules
+  dnl   (shared libraries)
+  dnl Query distutils for this directory.
+  AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
+    [am_cv_python_pyexecdir],
+    [if test "x$exec_prefix" = xNONE
+     then
+       am_py_exec_prefix=$am_py_prefix
+     else
+       am_py_exec_prefix=$exec_prefix
+     fi
+     am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null`
+     case $am_cv_python_pyexecdir in
+     $am_py_exec_prefix*)
+       am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
+       am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
+       ;;
+     *)
+       case $am_py_exec_prefix in
+         /usr|/System*) ;;
+         *)
+	   am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
+	   ;;
+       esac
+       ;;
+     esac
+    ])
+  AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
+
+  dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
+
+  AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
+
+  dnl Run any user-specified action.
+  $2
+  fi
+
+])
+
+
+# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
+# ---------------------------------------------------------------------------
+# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
+# Run ACTION-IF-FALSE otherwise.
+# This test uses sys.hexversion instead of the string equivalent (first
+# word of sys.version), in order to cope with versions such as 2.2c1.
+# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
+AC_DEFUN([AM_PYTHON_CHECK_VERSION],
+ [prog="import sys
+# split strings by '.' and convert to numeric.  Append some zeros
+# because we need at least 4 digits for the hex conversion.
+# map returns an iterator in Python 3.0 and a list in 2.x
+minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
+minverhex = 0
+# xrange is not present in Python 3.0 and range returns an iterator
+for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
+sys.exit(sys.hexversion < minverhex)"
+  AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
+
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# AM_RUN_LOG(COMMAND)
+# -------------------
+# Run COMMAND, save the exit status in ac_status, and log it.
+# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
+AC_DEFUN([AM_RUN_LOG],
+[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
+   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   (exit $ac_status); }])
+
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[[\\\"\#\$\&\'\`$am_lf]]*)
+    AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
+    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+   if test "$[*]" = "X"; then
+      # -L didn't work.
+      set X `ls -t "$srcdir/configure" conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
+   fi
+
+   test "$[2]" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2009, 2011  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# (`yes' being less verbose, `no' or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules],
+[  --enable-silent-rules          less verbose build output (undo: `make V=1')
+  --disable-silent-rules         verbose build output (undo: `make V=0')])
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no)  AM_DEFAULT_VERBOSITY=1;;
+*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+dnl
+dnl A few `make' implementations (e.g., NonStop OS and NextStep)
+dnl do not support nested variable expansions.
+dnl See automake bug#9928 and bug#10237.
+am_make=${MAKE-make}
+AC_CACHE_CHECK([whether $am_make supports nested variables],
+   [am_cv_make_support_nested_variables],
+   [if AS_ECHO([['TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+	@$(TRUE)
+.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
+  am_cv_make_support_nested_variables=yes
+else
+  am_cv_make_support_nested_variables=no
+fi])
+if test $am_cv_make_support_nested_variables = yes; then
+  dnl Using `$V' instead of `$(V)' breaks IRIX make.
+  AM_V='$(V)'
+  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+  AM_V=$AM_DEFAULT_VERBOSITY
+  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AC_SUBST([AM_V])dnl
+AM_SUBST_NOTMAKE([AM_V])dnl
+AC_SUBST([AM_DEFAULT_V])dnl
+AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
+
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# --------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball.                            -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+#     tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+#     $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.  Yes, it's still used
+# in the wild :-(  We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
+m4_if([$1], [v7],
+     [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+     [m4_case([$1], [ustar],, [pax],,
+              [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+  case $_am_tool in
+  gnutar)
+    for _am_tar in tar gnutar gtar;
+    do
+      AM_RUN_LOG([$_am_tar --version]) && break
+    done
+    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+    am__untar="$_am_tar -xf -"
+    ;;
+  plaintar)
+    # Must skip GNU tar: if it does not support --format= it doesn't create
+    # ustar tarball either.
+    (tar --version) >/dev/null 2>&1 && continue
+    am__tar='tar chf - "$$tardir"'
+    am__tar_='tar chf - "$tardir"'
+    am__untar='tar xf -'
+    ;;
+  pax)
+    am__tar='pax -L -x $1 -w "$$tardir"'
+    am__tar_='pax -L -x $1 -w "$tardir"'
+    am__untar='pax -r'
+    ;;
+  cpio)
+    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+    am__untar='cpio -i -H $1 -d'
+    ;;
+  none)
+    am__tar=false
+    am__tar_=false
+    am__untar=false
+    ;;
+  esac
+
+  # If the value was cached, stop now.  We just wanted to have am__tar
+  # and am__untar set.
+  test -n "${am_cv_prog_tar_$1}" && break
+
+  # tar/untar a dummy directory, and stop if the command works
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  echo GrepMe > conftest.dir/file
+  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+  rm -rf conftest.dir
+  if test -s conftest.tar; then
+    AM_RUN_LOG([$am__untar <conftest.tar])
+    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+  fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+m4_include([common/acx_pthread.m4])
+m4_include([common/gcc_stack_protect.m4])
+m4_include([common/gcc_visibility.m4])
+m4_include([common/intltool.m4])
+m4_include([common/introspection.m4])
+m4_include([common/libtool.m4])
+m4_include([common/ltoptions.m4])
+m4_include([common/ltsugar.m4])
+m4_include([common/ltversion.m4])
+m4_include([common/lt~obsolete.m4])
+m4_include([common/nls.m4])
+m4_include([common/python.m4])
+m4_include([acinclude.m4])
diff --git a/avahi-0.6.31/autogen.sh b/avahi-0.6.31/autogen.sh
new file mode 100755
index 0000000..2c68a6c
--- /dev/null
+++ b/avahi-0.6.31/autogen.sh
@@ -0,0 +1,77 @@
+#!/bin/bash
+
+# This file is part of avahi.
+#
+# avahi 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 of the
+# License, or (at your option) any later version.
+#
+# avahi 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 General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+AM_VERSION=1.11
+AC_VERSION=2.63
+
+run_versioned() {
+    local P
+    local V
+
+    V=$(echo "$2" | sed -e 's,\.,,g')
+
+    if [ -e "`which $1$V 2> /dev/null`" ] ; then
+        P="$1$V"
+    else
+        if [ -e "`which $1-$2 2> /dev/null`" ] ; then
+            P="$1-$2"
+        else
+            P="$1"
+        fi
+    fi
+
+    shift 2
+    "$P" "$@"
+}
+
+set -ex
+
+if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then
+    cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit && \
+    chmod +x .git/hooks/pre-commit && \
+    echo "Activated pre-commit hook."
+fi
+
+if [ "x$1" = "xam" ] ; then
+    run_versioned automake "$AM_VERSION" -a -c --foreign
+    ./config.status
+else 
+    rm -rf autom4te.cache
+    rm -f config.cache
+
+    rm -f Makefile.am~ configure.ac~
+    # Evil, evil, evil, evil hack
+    sed 's/read dummy/\#/' `which gettextize` | sh -s -- --copy --force
+    test -f Makefile.am~ && mv Makefile.am~ Makefile.am
+    test -f configure.ac~ && mv configure.ac~ configure.ac
+
+    test "x$LIBTOOLIZE" = "x" && LIBTOOLIZE=libtoolize
+
+    intltoolize --copy --force --automake
+    "$LIBTOOLIZE" -c --force
+    run_versioned aclocal "$AM_VERSION" -I common
+    run_versioned autoconf "$AC_VERSION" -Wall
+    run_versioned autoheader "$AC_VERSION"
+    run_versioned automake "$AM_VERSION" -a -c --foreign
+
+    if test "x$NOCONFIGURE" = "x"; then
+        ./configure "$@"
+        make clean
+    fi
+fi
diff --git a/avahi-0.6.31/avahi-autoipd/Makefile.am b/avahi-0.6.31/avahi-autoipd/Makefile.am
new file mode 100644
index 0000000..263e991
--- /dev/null
+++ b/avahi-0.6.31/avahi-autoipd/Makefile.am
@@ -0,0 +1,94 @@
+# This file is part of avahi.
+#
+# avahi 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 of the
+# License, or (at your option) any later version.
+#
+# avahi 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 General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+if ENABLE_AUTOIPD
+if HAVE_LIBDAEMON
+
+pkgsysconfdir=$(sysconfdir)/avahi
+
+AM_CFLAGS= \
+	-I$(top_srcdir)
+
+# This cool debug trap works on i386/gcc only
+AM_CFLAGS+='-DDEBUG_TRAP=__asm__("int $$3")' \
+	-DAVAHI_RUNTIME_DIR=\"$(avahi_runtime_dir)/\" \
+	-DAVAHI_IPCONF_SCRIPT=\"$(pkgsysconfdir)/avahi-autoipd.action\" \
+	-DAVAHI_IPDATA_DIR=\"$(localstatedir)/lib/avahi-autoipd\"
+
+sbin_PROGRAMS = avahi-autoipd
+
+avahi_autoipd_SOURCES = \
+	main.c main.h \
+	 ../avahi-daemon/setproctitle.c  ../avahi-daemon/setproctitle.h \
+	iface.h	\
+	../avahi-common/malloc.h ../avahi-common/malloc.c \
+	../avahi-common/timeval.h ../avahi-common/timeval.c
+
+avahi_autoipd_CFLAGS = $(AM_CFLAGS) $(LIBDAEMON_CFLAGS)
+avahi_autoipd_LDADD = $(AM_LDADD) $(LIBDAEMON_LIBS)
+
+if TARGET_FREEBSD
+avahi_autoipd_SOURCES += iface-bsd.c
+avahi_autoipd_LDADD += -lpcap
+else
+avahi_autoipd_SOURCES += iface-linux.c
+endif
+
+nodist_pkgsysconf_SCRIPTS = avahi-autoipd.action
+
+if TARGET_FREEBSD
+avahi-autoipd.action: avahi-autoipd.action.bsd
+	$(AM_V_GEN)cp $< $@
+else
+avahi-autoipd.action: avahi-autoipd.action.linux
+	$(AM_V_GEN)cp $< $@
+endif
+
+if TARGET_DEBIAN
+
+noinst_SCRIPTS = dhclient-enter-hook dhclient-exit-hook
+
+dhclient-enter-hook: dhclient-enter-hook.in
+	$(AM_V_GEN)sed -e 's,@sbindir\@,$(sbindir),g' $< > $@ && \
+	chmod +x $@
+
+dhclient-exit-hook: dhclient-exit-hook.in
+	$(AM_V_GEN)sed -e 's,@sbindir\@,$(sbindir),g' $< > $@ && \
+	chmod +x $@
+
+BUILD = dhclient-exit-hook dhclient-enter-hook
+
+dhcliententerdir = $(sysconfdir)/dhcp/dhclient-enter-hooks.d
+dhclientexitdir = $(sysconfdir)/dhcp/dhclient-exit-hooks.d
+
+install-exec-hook: dhclient-exit-hook dhclient-enter-hook
+	$(mkdir_p) $(DESTDIR)$(dhcliententerdir) $(DESTDIR)$(dhclientexitdir)
+	$(INSTALL) dhclient-enter-hook $(DESTDIR)$(dhcliententerdir)/avahi-autoipd
+	$(INSTALL) dhclient-exit-hook $(DESTDIR)$(dhclientexitdir)/avahi-autoipd
+
+uninstall-hook:
+	rm -f $(DESTDIR)$(dhcliententerdir)/avahi-autoipd $(DESTDIR)$(dhclientexitdir)/avahi-autoipd
+
+endif
+
+
+endif
+endif
+
+EXTRA_DIST = dhclient-enter-hook.in dhclient-exit-hook.in avahi-autoipd.action.linux avahi-autoipd.action.bsd
+
+CLEANFILES = dhclient-enter-hook dhclient-exit-hook avahi-autoipd.action
diff --git a/avahi-0.6.31/avahi-autoipd/Makefile.in b/avahi-0.6.31/avahi-autoipd/Makefile.in
new file mode 100644
index 0000000..77f8caa
--- /dev/null
+++ b/avahi-0.6.31/avahi-autoipd/Makefile.in
@@ -0,0 +1,919 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# This file is part of avahi.
+#
+# avahi 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 of the
+# License, or (at your option) any later version.
+#
+# avahi 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 General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@sbin_PROGRAMS = avahi-autoipd$(EXEEXT)
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@@TARGET_FREEBSD_TRUE@am__append_1 = iface-bsd.c
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@@TARGET_FREEBSD_TRUE@am__append_2 = -lpcap
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@@TARGET_FREEBSD_FALSE@am__append_3 = iface-linux.c
+subdir = avahi-autoipd
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/common/acx_pthread.m4 \
+	$(top_srcdir)/common/gcc_stack_protect.m4 \
+	$(top_srcdir)/common/gcc_visibility.m4 \
+	$(top_srcdir)/common/intltool.m4 \
+	$(top_srcdir)/common/introspection.m4 \
+	$(top_srcdir)/common/libtool.m4 \
+	$(top_srcdir)/common/ltoptions.m4 \
+	$(top_srcdir)/common/ltsugar.m4 \
+	$(top_srcdir)/common/ltversion.m4 \
+	$(top_srcdir)/common/lt~obsolete.m4 \
+	$(top_srcdir)/common/nls.m4 $(top_srcdir)/common/python.m4 \
+	$(top_srcdir)/acinclude.m4 $(top_srcdir)/common/doxygen.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(pkgsysconfdir)"
+PROGRAMS = $(sbin_PROGRAMS)
+am__avahi_autoipd_SOURCES_DIST = main.c main.h \
+	../avahi-daemon/setproctitle.c ../avahi-daemon/setproctitle.h \
+	iface.h ../avahi-common/malloc.h ../avahi-common/malloc.c \
+	../avahi-common/timeval.h ../avahi-common/timeval.c \
+	iface-bsd.c iface-linux.c
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@@TARGET_FREEBSD_TRUE@am__objects_1 = avahi_autoipd-iface-bsd.$(OBJEXT)
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@@TARGET_FREEBSD_FALSE@am__objects_2 = avahi_autoipd-iface-linux.$(OBJEXT)
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@am_avahi_autoipd_OBJECTS = avahi_autoipd-main.$(OBJEXT) \
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@	avahi_autoipd-setproctitle.$(OBJEXT) \
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@	avahi_autoipd-malloc.$(OBJEXT) \
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@	avahi_autoipd-timeval.$(OBJEXT) \
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@	$(am__objects_1) \
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@	$(am__objects_2)
+avahi_autoipd_OBJECTS = $(am_avahi_autoipd_OBJECTS)
+am__DEPENDENCIES_1 =
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@avahi_autoipd_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@	$(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+avahi_autoipd_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(avahi_autoipd_CFLAGS) \
+	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+SCRIPTS = $(nodist_pkgsysconf_SCRIPTS) $(noinst_SCRIPTS)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC    " $@;
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(avahi_autoipd_SOURCES)
+DIST_SOURCES = $(am__avahi_autoipd_SOURCES_DIST)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AVAHI_AUTOIPD_GROUP = @AVAHI_AUTOIPD_GROUP@
+AVAHI_AUTOIPD_USER = @AVAHI_AUTOIPD_USER@
+AVAHI_GROUP = @AVAHI_GROUP@
+AVAHI_PRIV_ACCESS_GROUP = @AVAHI_PRIV_ACCESS_GROUP@
+AVAHI_USER = @AVAHI_USER@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
+DBUS_SYSTEM_BUS_DEFAULT_ADDRESS = @DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@
+DBUS_SYS_DIR = @DBUS_SYS_DIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+DX_CONFIG = @DX_CONFIG@
+DX_DOCDIR = @DX_DOCDIR@
+DX_DOT = @DX_DOT@
+DX_DOXYGEN = @DX_DOXYGEN@
+DX_DVIPS = @DX_DVIPS@
+DX_EGREP = @DX_EGREP@
+DX_ENV = @DX_ENV@
+DX_FLAG_chi = @DX_FLAG_chi@
+DX_FLAG_chm = @DX_FLAG_chm@
+DX_FLAG_doc = @DX_FLAG_doc@
+DX_FLAG_dot = @DX_FLAG_dot@
+DX_FLAG_html = @DX_FLAG_html@
+DX_FLAG_man = @DX_FLAG_man@
+DX_FLAG_pdf = @DX_FLAG_pdf@
+DX_FLAG_ps = @DX_FLAG_ps@
+DX_FLAG_rtf = @DX_FLAG_rtf@
+DX_FLAG_xml = @DX_FLAG_xml@
+DX_HHC = @DX_HHC@
+DX_LATEX = @DX_LATEX@
+DX_MAKEINDEX = @DX_MAKEINDEX@
+DX_PDFLATEX = @DX_PDFLATEX@
+DX_PERL = @DX_PERL@
+DX_PROJECT = @DX_PROJECT@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GACUTIL = @GACUTIL@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB20_CFLAGS = @GLIB20_CFLAGS@
+GLIB20_LIBS = @GLIB20_LIBS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GOBJECT_CFLAGS = @GOBJECT_CFLAGS@
+GOBJECT_LIBS = @GOBJECT_LIBS@
+GREP = @GREP@
+GTK20_CFLAGS = @GTK20_CFLAGS@
+GTK20_LIBS = @GTK20_LIBS@
+GTK30_CFLAGS = @GTK30_CFLAGS@
+GTK30_LIBS = @GTK30_LIBS@
+HOWL_COMPAT_VERSION = @HOWL_COMPAT_VERSION@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
+INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
+INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
+INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
+INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
+INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
+INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBAVAHI_CLIENT_VERSION_INFO = @LIBAVAHI_CLIENT_VERSION_INFO@
+LIBAVAHI_COMMON_VERSION_INFO = @LIBAVAHI_COMMON_VERSION_INFO@
+LIBAVAHI_COMPAT_HOWL_VERSION_INFO = @LIBAVAHI_COMPAT_HOWL_VERSION_INFO@
+LIBAVAHI_COMPAT_LIBDNS_SD_VERSION_INFO = @LIBAVAHI_COMPAT_LIBDNS_SD_VERSION_INFO@
+LIBAVAHI_CORE_VERSION_INFO = @LIBAVAHI_CORE_VERSION_INFO@
+LIBAVAHI_GLIB_VERSION_INFO = @LIBAVAHI_GLIB_VERSION_INFO@
+LIBAVAHI_GOBJECT_VERSION_INFO = @LIBAVAHI_GOBJECT_VERSION_INFO@
+LIBAVAHI_QT3_VERSION_INFO = @LIBAVAHI_QT3_VERSION_INFO@
+LIBAVAHI_QT4_VERSION_INFO = @LIBAVAHI_QT4_VERSION_INFO@
+LIBAVAHI_UI_VERSION_INFO = @LIBAVAHI_UI_VERSION_INFO@
+LIBDAEMON_CFLAGS = @LIBDAEMON_CFLAGS@
+LIBDAEMON_LIBS = @LIBDAEMON_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MCS = @MCS@
+MDASSEMBLER = @MDASSEMBLER@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MOC_QT3 = @MOC_QT3@
+MOC_QT4 = @MOC_QT4@
+MONODOCER = @MONODOCER@
+MONODOC_CFLAGS = @MONODOC_CFLAGS@
+MONODOC_DIR = @MONODOC_DIR@
+MONODOC_LIBS = @MONODOC_LIBS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+QT3_CFLAGS = @QT3_CFLAGS@
+QT3_LIBS = @QT3_LIBS@
+QT4_CFLAGS = @QT4_CFLAGS@
+QT4_LIBS = @QT4_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STOW = @STOW@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+VISIBILITY_HIDDEN_CFLAGS = @VISIBILITY_HIDDEN_CFLAGS@
+XGETTEXT = @XGETTEXT@
+XML_CFLAGS = @XML_CFLAGS@
+XML_LIBS = @XML_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+avahi_runtime_dir = @avahi_runtime_dir@
+avahi_socket = @avahi_socket@
+avahilocaledir = @avahilocaledir@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+have_pkg_config = @have_pkg_config@
+have_xmltoman = @have_xmltoman@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+interfacesdir = @interfacesdir@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+systemdsystemunitdir = @systemdsystemunitdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@pkgsysconfdir = $(sysconfdir)/avahi
+
+# This cool debug trap works on i386/gcc only
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@AM_CFLAGS = -I$(top_srcdir) \
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@	'-DDEBUG_TRAP=__asm__("int \
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@	$$3")' \
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@	-DAVAHI_RUNTIME_DIR=\"$(avahi_runtime_dir)/\" \
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@	-DAVAHI_IPCONF_SCRIPT=\"$(pkgsysconfdir)/avahi-autoipd.action\" \
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@	-DAVAHI_IPDATA_DIR=\"$(localstatedir)/lib/avahi-autoipd\"
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@avahi_autoipd_SOURCES =  \
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@	main.c main.h \
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@	../avahi-daemon/setproctitle.c \
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@	../avahi-daemon/setproctitle.h \
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@	iface.h \
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@	../avahi-common/malloc.h \
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@	../avahi-common/malloc.c \
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@	../avahi-common/timeval.h \
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@	../avahi-common/timeval.c \
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@	$(am__append_1) \
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@	$(am__append_3)
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@avahi_autoipd_CFLAGS = $(AM_CFLAGS) $(LIBDAEMON_CFLAGS)
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@avahi_autoipd_LDADD =  \
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@	$(AM_LDADD) \
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@	$(LIBDAEMON_LIBS) \
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@	$(am__append_2)
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@nodist_pkgsysconf_SCRIPTS = avahi-autoipd.action
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@@TARGET_DEBIAN_TRUE@noinst_SCRIPTS = dhclient-enter-hook dhclient-exit-hook
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@@TARGET_DEBIAN_TRUE@BUILD = dhclient-exit-hook dhclient-enter-hook
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@@TARGET_DEBIAN_TRUE@dhcliententerdir = $(sysconfdir)/dhcp/dhclient-enter-hooks.d
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@@TARGET_DEBIAN_TRUE@dhclientexitdir = $(sysconfdir)/dhcp/dhclient-exit-hooks.d
+EXTRA_DIST = dhclient-enter-hook.in dhclient-exit-hook.in avahi-autoipd.action.linux avahi-autoipd.action.bsd
+CLEANFILES = dhclient-enter-hook dhclient-exit-hook avahi-autoipd.action
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign avahi-autoipd/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign avahi-autoipd/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-sbinPROGRAMS: $(sbin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
+	@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-sbinPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sbindir)" && rm -f $$files
+
+clean-sbinPROGRAMS:
+	@list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+avahi-autoipd$(EXEEXT): $(avahi_autoipd_OBJECTS) $(avahi_autoipd_DEPENDENCIES) $(EXTRA_avahi_autoipd_DEPENDENCIES) 
+	@rm -f avahi-autoipd$(EXEEXT)
+	$(AM_V_CCLD)$(avahi_autoipd_LINK) $(avahi_autoipd_OBJECTS) $(avahi_autoipd_LDADD) $(LIBS)
+install-nodist_pkgsysconfSCRIPTS: $(nodist_pkgsysconf_SCRIPTS)
+	@$(NORMAL_INSTALL)
+	test -z "$(pkgsysconfdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgsysconfdir)"
+	@list='$(nodist_pkgsysconf_SCRIPTS)'; test -n "$(pkgsysconfdir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n' \
+	    -e 'h;s|.*|.|' \
+	    -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+	      if (++n[d] == $(am__install_max)) { \
+		print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+	    else { print "f", d "/" $$4, $$1 } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	     if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	     test -z "$$files" || { \
+	       echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(pkgsysconfdir)$$dir'"; \
+	       $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(pkgsysconfdir)$$dir" || exit $$?; \
+	     } \
+	; done
+
+uninstall-nodist_pkgsysconfSCRIPTS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(nodist_pkgsysconf_SCRIPTS)'; test -n "$(pkgsysconfdir)" || exit 0; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	       sed -e 's,.*/,,;$(transform)'`; \
+	dir='$(DESTDIR)$(pkgsysconfdir)'; $(am__uninstall_files_from_dir)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avahi_autoipd-iface-bsd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avahi_autoipd-iface-linux.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avahi_autoipd-main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avahi_autoipd-malloc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avahi_autoipd-setproctitle.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avahi_autoipd-timeval.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+avahi_autoipd-main.o: main.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_autoipd_CFLAGS) $(CFLAGS) -MT avahi_autoipd-main.o -MD -MP -MF $(DEPDIR)/avahi_autoipd-main.Tpo -c -o avahi_autoipd-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_autoipd-main.Tpo $(DEPDIR)/avahi_autoipd-main.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='main.c' object='avahi_autoipd-main.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_autoipd_CFLAGS) $(CFLAGS) -c -o avahi_autoipd-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c
+
+avahi_autoipd-main.obj: main.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_autoipd_CFLAGS) $(CFLAGS) -MT avahi_autoipd-main.obj -MD -MP -MF $(DEPDIR)/avahi_autoipd-main.Tpo -c -o avahi_autoipd-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_autoipd-main.Tpo $(DEPDIR)/avahi_autoipd-main.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='main.c' object='avahi_autoipd-main.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_autoipd_CFLAGS) $(CFLAGS) -c -o avahi_autoipd-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi`
+
+avahi_autoipd-setproctitle.o: ../avahi-daemon/setproctitle.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_autoipd_CFLAGS) $(CFLAGS) -MT avahi_autoipd-setproctitle.o -MD -MP -MF $(DEPDIR)/avahi_autoipd-setproctitle.Tpo -c -o avahi_autoipd-setproctitle.o `test -f '../avahi-daemon/setproctitle.c' || echo '$(srcdir)/'`../avahi-daemon/setproctitle.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_autoipd-setproctitle.Tpo $(DEPDIR)/avahi_autoipd-setproctitle.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../avahi-daemon/setproctitle.c' object='avahi_autoipd-setproctitle.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_autoipd_CFLAGS) $(CFLAGS) -c -o avahi_autoipd-setproctitle.o `test -f '../avahi-daemon/setproctitle.c' || echo '$(srcdir)/'`../avahi-daemon/setproctitle.c
+
+avahi_autoipd-setproctitle.obj: ../avahi-daemon/setproctitle.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_autoipd_CFLAGS) $(CFLAGS) -MT avahi_autoipd-setproctitle.obj -MD -MP -MF $(DEPDIR)/avahi_autoipd-setproctitle.Tpo -c -o avahi_autoipd-setproctitle.obj `if test -f '../avahi-daemon/setproctitle.c'; then $(CYGPATH_W) '../avahi-daemon/setproctitle.c'; else $(CYGPATH_W) '$(srcdir)/../avahi-daemon/setproctitle.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_autoipd-setproctitle.Tpo $(DEPDIR)/avahi_autoipd-setproctitle.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../avahi-daemon/setproctitle.c' object='avahi_autoipd-setproctitle.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_autoipd_CFLAGS) $(CFLAGS) -c -o avahi_autoipd-setproctitle.obj `if test -f '../avahi-daemon/setproctitle.c'; then $(CYGPATH_W) '../avahi-daemon/setproctitle.c'; else $(CYGPATH_W) '$(srcdir)/../avahi-daemon/setproctitle.c'; fi`
+
+avahi_autoipd-malloc.o: ../avahi-common/malloc.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_autoipd_CFLAGS) $(CFLAGS) -MT avahi_autoipd-malloc.o -MD -MP -MF $(DEPDIR)/avahi_autoipd-malloc.Tpo -c -o avahi_autoipd-malloc.o `test -f '../avahi-common/malloc.c' || echo '$(srcdir)/'`../avahi-common/malloc.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_autoipd-malloc.Tpo $(DEPDIR)/avahi_autoipd-malloc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../avahi-common/malloc.c' object='avahi_autoipd-malloc.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_autoipd_CFLAGS) $(CFLAGS) -c -o avahi_autoipd-malloc.o `test -f '../avahi-common/malloc.c' || echo '$(srcdir)/'`../avahi-common/malloc.c
+
+avahi_autoipd-malloc.obj: ../avahi-common/malloc.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_autoipd_CFLAGS) $(CFLAGS) -MT avahi_autoipd-malloc.obj -MD -MP -MF $(DEPDIR)/avahi_autoipd-malloc.Tpo -c -o avahi_autoipd-malloc.obj `if test -f '../avahi-common/malloc.c'; then $(CYGPATH_W) '../avahi-common/malloc.c'; else $(CYGPATH_W) '$(srcdir)/../avahi-common/malloc.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_autoipd-malloc.Tpo $(DEPDIR)/avahi_autoipd-malloc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../avahi-common/malloc.c' object='avahi_autoipd-malloc.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_autoipd_CFLAGS) $(CFLAGS) -c -o avahi_autoipd-malloc.obj `if test -f '../avahi-common/malloc.c'; then $(CYGPATH_W) '../avahi-common/malloc.c'; else $(CYGPATH_W) '$(srcdir)/../avahi-common/malloc.c'; fi`
+
+avahi_autoipd-timeval.o: ../avahi-common/timeval.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_autoipd_CFLAGS) $(CFLAGS) -MT avahi_autoipd-timeval.o -MD -MP -MF $(DEPDIR)/avahi_autoipd-timeval.Tpo -c -o avahi_autoipd-timeval.o `test -f '../avahi-common/timeval.c' || echo '$(srcdir)/'`../avahi-common/timeval.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_autoipd-timeval.Tpo $(DEPDIR)/avahi_autoipd-timeval.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../avahi-common/timeval.c' object='avahi_autoipd-timeval.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_autoipd_CFLAGS) $(CFLAGS) -c -o avahi_autoipd-timeval.o `test -f '../avahi-common/timeval.c' || echo '$(srcdir)/'`../avahi-common/timeval.c
+
+avahi_autoipd-timeval.obj: ../avahi-common/timeval.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_autoipd_CFLAGS) $(CFLAGS) -MT avahi_autoipd-timeval.obj -MD -MP -MF $(DEPDIR)/avahi_autoipd-timeval.Tpo -c -o avahi_autoipd-timeval.obj `if test -f '../avahi-common/timeval.c'; then $(CYGPATH_W) '../avahi-common/timeval.c'; else $(CYGPATH_W) '$(srcdir)/../avahi-common/timeval.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_autoipd-timeval.Tpo $(DEPDIR)/avahi_autoipd-timeval.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../avahi-common/timeval.c' object='avahi_autoipd-timeval.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_autoipd_CFLAGS) $(CFLAGS) -c -o avahi_autoipd-timeval.obj `if test -f '../avahi-common/timeval.c'; then $(CYGPATH_W) '../avahi-common/timeval.c'; else $(CYGPATH_W) '$(srcdir)/../avahi-common/timeval.c'; fi`
+
+avahi_autoipd-iface-bsd.o: iface-bsd.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_autoipd_CFLAGS) $(CFLAGS) -MT avahi_autoipd-iface-bsd.o -MD -MP -MF $(DEPDIR)/avahi_autoipd-iface-bsd.Tpo -c -o avahi_autoipd-iface-bsd.o `test -f 'iface-bsd.c' || echo '$(srcdir)/'`iface-bsd.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_autoipd-iface-bsd.Tpo $(DEPDIR)/avahi_autoipd-iface-bsd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='iface-bsd.c' object='avahi_autoipd-iface-bsd.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_autoipd_CFLAGS) $(CFLAGS) -c -o avahi_autoipd-iface-bsd.o `test -f 'iface-bsd.c' || echo '$(srcdir)/'`iface-bsd.c
+
+avahi_autoipd-iface-bsd.obj: iface-bsd.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_autoipd_CFLAGS) $(CFLAGS) -MT avahi_autoipd-iface-bsd.obj -MD -MP -MF $(DEPDIR)/avahi_autoipd-iface-bsd.Tpo -c -o avahi_autoipd-iface-bsd.obj `if test -f 'iface-bsd.c'; then $(CYGPATH_W) 'iface-bsd.c'; else $(CYGPATH_W) '$(srcdir)/iface-bsd.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_autoipd-iface-bsd.Tpo $(DEPDIR)/avahi_autoipd-iface-bsd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='iface-bsd.c' object='avahi_autoipd-iface-bsd.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_autoipd_CFLAGS) $(CFLAGS) -c -o avahi_autoipd-iface-bsd.obj `if test -f 'iface-bsd.c'; then $(CYGPATH_W) 'iface-bsd.c'; else $(CYGPATH_W) '$(srcdir)/iface-bsd.c'; fi`
+
+avahi_autoipd-iface-linux.o: iface-linux.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_autoipd_CFLAGS) $(CFLAGS) -MT avahi_autoipd-iface-linux.o -MD -MP -MF $(DEPDIR)/avahi_autoipd-iface-linux.Tpo -c -o avahi_autoipd-iface-linux.o `test -f 'iface-linux.c' || echo '$(srcdir)/'`iface-linux.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_autoipd-iface-linux.Tpo $(DEPDIR)/avahi_autoipd-iface-linux.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='iface-linux.c' object='avahi_autoipd-iface-linux.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_autoipd_CFLAGS) $(CFLAGS) -c -o avahi_autoipd-iface-linux.o `test -f 'iface-linux.c' || echo '$(srcdir)/'`iface-linux.c
+
+avahi_autoipd-iface-linux.obj: iface-linux.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_autoipd_CFLAGS) $(CFLAGS) -MT avahi_autoipd-iface-linux.obj -MD -MP -MF $(DEPDIR)/avahi_autoipd-iface-linux.Tpo -c -o avahi_autoipd-iface-linux.obj `if test -f 'iface-linux.c'; then $(CYGPATH_W) 'iface-linux.c'; else $(CYGPATH_W) '$(srcdir)/iface-linux.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_autoipd-iface-linux.Tpo $(DEPDIR)/avahi_autoipd-iface-linux.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='iface-linux.c' object='avahi_autoipd-iface-linux.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_autoipd_CFLAGS) $(CFLAGS) -c -o avahi_autoipd-iface-linux.obj `if test -f 'iface-linux.c'; then $(CYGPATH_W) 'iface-linux.c'; else $(CYGPATH_W) '$(srcdir)/iface-linux.c'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(SCRIPTS)
+installdirs:
+	for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(pkgsysconfdir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+@ENABLE_AUTOIPD_FALSE@install-exec-hook:
+@HAVE_LIBDAEMON_FALSE@install-exec-hook:
+@TARGET_DEBIAN_FALSE@install-exec-hook:
+@ENABLE_AUTOIPD_FALSE@uninstall-hook:
+@HAVE_LIBDAEMON_FALSE@uninstall-hook:
+@TARGET_DEBIAN_FALSE@uninstall-hook:
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-nodist_pkgsysconfSCRIPTS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-sbinPROGRAMS
+	@$(NORMAL_INSTALL)
+	$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-nodist_pkgsysconfSCRIPTS \
+	uninstall-sbinPROGRAMS
+	@$(NORMAL_INSTALL)
+	$(MAKE) $(AM_MAKEFLAGS) uninstall-hook
+.MAKE: install-am install-exec-am install-strip uninstall-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-sbinPROGRAMS ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-exec-hook \
+	install-html install-html-am install-info install-info-am \
+	install-man install-nodist_pkgsysconfSCRIPTS install-pdf \
+	install-pdf-am install-ps install-ps-am install-sbinPROGRAMS \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am uninstall-hook \
+	uninstall-nodist_pkgsysconfSCRIPTS uninstall-sbinPROGRAMS
+
+
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@@TARGET_FREEBSD_TRUE@avahi-autoipd.action: avahi-autoipd.action.bsd
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@@TARGET_FREEBSD_TRUE@	$(AM_V_GEN)cp $< $@
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@@TARGET_FREEBSD_FALSE@avahi-autoipd.action: avahi-autoipd.action.linux
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@@TARGET_FREEBSD_FALSE@	$(AM_V_GEN)cp $< $@
+
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@@TARGET_DEBIAN_TRUE@dhclient-enter-hook: dhclient-enter-hook.in
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@@TARGET_DEBIAN_TRUE@	$(AM_V_GEN)sed -e 's,@sbindir\@,$(sbindir),g' $< > $@ && \
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@@TARGET_DEBIAN_TRUE@	chmod +x $@
+
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@@TARGET_DEBIAN_TRUE@dhclient-exit-hook: dhclient-exit-hook.in
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@@TARGET_DEBIAN_TRUE@	$(AM_V_GEN)sed -e 's,@sbindir\@,$(sbindir),g' $< > $@ && \
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@@TARGET_DEBIAN_TRUE@	chmod +x $@
+
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@@TARGET_DEBIAN_TRUE@install-exec-hook: dhclient-exit-hook dhclient-enter-hook
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@@TARGET_DEBIAN_TRUE@	$(mkdir_p) $(DESTDIR)$(dhcliententerdir) $(DESTDIR)$(dhclientexitdir)
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@@TARGET_DEBIAN_TRUE@	$(INSTALL) dhclient-enter-hook $(DESTDIR)$(dhcliententerdir)/avahi-autoipd
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@@TARGET_DEBIAN_TRUE@	$(INSTALL) dhclient-exit-hook $(DESTDIR)$(dhclientexitdir)/avahi-autoipd
+
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@@TARGET_DEBIAN_TRUE@uninstall-hook:
+@ENABLE_AUTOIPD_TRUE@@HAVE_LIBDAEMON_TRUE@@TARGET_DEBIAN_TRUE@	rm -f $(DESTDIR)$(dhcliententerdir)/avahi-autoipd $(DESTDIR)$(dhclientexitdir)/avahi-autoipd
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/avahi-0.6.31/avahi-autoipd/avahi-autoipd.action.bsd b/avahi-0.6.31/avahi-autoipd/avahi-autoipd.action.bsd
new file mode 100755
index 0000000..06084fb
--- /dev/null
+++ b/avahi-0.6.31/avahi-autoipd/avahi-autoipd.action.bsd
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+# This file is part of avahi.
+# 
+# avahi 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 of the
+# License, or (at your option) any later version.
+#
+# avahi 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 General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+set -e
+
+# Command line arguments:
+#   $1 event that happened:
+#          BIND:     Successfully claimed address
+#          CONFLICT: An IP address conflict happened
+#          UNBIND:   The IP address is no longer needed
+#          STOP:     The daemon is terminating
+#   $2 interface name
+#   $3 IP adddress
+
+# We have the BSD ifconfig tool
+
+case "$1" in
+BIND)
+    ifconfig "$2" "$3"/16
+    ;;
+
+CONFLICT|STOP|UNBIND)
+    ifconfig "$2" "$3"/16 delete
+    ;;
+
+*)
+    echo "Unknown event $1" >&2
+    exit 1
+    ;;
+esac
+
+exit 0
diff --git a/avahi-0.6.31/avahi-autoipd/avahi-autoipd.action.linux b/avahi-0.6.31/avahi-autoipd/avahi-autoipd.action.linux
new file mode 100755
index 0000000..c2db994
--- /dev/null
+++ b/avahi-0.6.31/avahi-autoipd/avahi-autoipd.action.linux
@@ -0,0 +1,87 @@
+#!/bin/sh
+
+# This file is part of avahi.
+#
+# avahi 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 of the
+# License, or (at your option) any later version.
+#
+# avahi 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 General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+set -e
+
+# Command line arguments:
+#   $1 event that happened:
+#          BIND:     Successfully claimed address
+#          CONFLICT: An IP address conflict happened
+#          UNBIND:   The IP address is no longer needed
+#          STOP:     The daemon is terminating
+#   $2 interface name
+#   $3 IP adddress
+
+PATH="$PATH:/usr/bin:/usr/sbin:/bin:/sbin"
+
+# Use a different metric for each interface, so that we can set
+# identical routes to multiple interfaces.
+
+METRIC=$((1000 + `cat "/sys/class/net/$2/ifindex" 2>/dev/null || echo 0`))
+
+if [ -x /bin/ip -o -x /sbin/ip ] ; then
+
+    # We have the Linux ip tool from the iproute package
+
+    case "$1" in
+        BIND)
+            ip addr add "$3"/16 brd 169.254.255.255 label "$2:avahi" scope link dev "$2"
+            ip route add default dev "$2" metric "$METRIC" scope link ||:
+            ;;
+
+        CONFLICT|UNBIND|STOP)
+            ip route del default dev "$2" metric "$METRIC" scope link ||:
+            ip addr del "$3"/16 brd 169.254.255.255 label "$2:avahi" scope link dev "$2"
+            ;;
+
+        *)
+            echo "Unknown event $1" >&2
+            exit 1
+            ;;
+    esac
+
+elif [ -x /bin/ifconfig -o -x /sbin/ifconfig ] ; then
+
+    # We have the old ifconfig tool
+
+    case "$1" in
+        BIND)
+            ifconfig "$2:avahi" inet "$3" netmask 255.255.0.0 broadcast 169.254.255.255 up
+            route add default dev "$2:avahi" metric "$METRIC" ||:
+            ;;
+
+        CONFLICT|STOP|UNBIND)
+            route del default dev "$2:avahi" metric "$METRIC" ||:
+            ifconfig "$2:avahi" down
+            ;;
+
+        *)
+            echo "Unknown event $1" >&2
+            exit 1
+            ;;
+    esac
+
+else
+
+    echo "No network configuration tool found." >&2
+    exit 1
+
+fi
+
+exit 0
diff --git a/avahi-0.6.31/avahi-autoipd/dhclient-enter-hook.in b/avahi-0.6.31/avahi-autoipd/dhclient-enter-hook.in
new file mode 100755
index 0000000..a746856
--- /dev/null
+++ b/avahi-0.6.31/avahi-autoipd/dhclient-enter-hook.in
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+# This file is part of avahi.
+# 
+# avahi 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 of the
+# License, or (at your option) any later version.
+#
+# avahi 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 General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+case "$reason" in
+    MEDIUM|ARPCHECK|ARPSEND|NBI)
+        ;;
+
+    PREINIT|BOUND|RENEW|REBIND|REBOOT|STOP|RELEASE)
+        @sbindir@/avahi-autoipd -k $interface 2> /dev/null
+        ;;
+    
+    EXPIRE|FAIL|TIMEOUT)
+        # Starting avahi-autoipd is left for the exit hook
+        ;;
+esac
diff --git a/avahi-0.6.31/avahi-autoipd/dhclient-exit-hook.in b/avahi-0.6.31/avahi-autoipd/dhclient-exit-hook.in
new file mode 100755
index 0000000..379cb46
--- /dev/null
+++ b/avahi-0.6.31/avahi-autoipd/dhclient-exit-hook.in
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+# This file is part of avahi.
+#
+# avahi 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 of the
+# License, or (at your option) any later version.
+#
+# avahi 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 General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+case "$reason" in
+    MEDIUM|ARPCHECK|ARPSEND|NBI)
+        ;;
+
+    PREINIT|BOUND|RENEW|REBIND|REBOOT|STOP|RELEASE)
+        # Stopping avahi-autoipd is left for the enter hook
+        ;;
+
+    EXPIRE|FAIL|TIMEOUT)
+        @sbindir@/avahi-autoipd -wD $interface 2> /dev/null
+        ;;
+esac
diff --git a/avahi-0.6.31/avahi-autoipd/iface-bsd.c b/avahi-0.6.31/avahi-autoipd/iface-bsd.c
new file mode 100644
index 0000000..6a1085c
--- /dev/null
+++ b/avahi-0.6.31/avahi-autoipd/iface-bsd.c
@@ -0,0 +1,440 @@
+/* rcs tags go here */
+/* Original author: Bruce M. Simpson <bms@FreeBSD.org> */
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/sysctl.h>
+
+#include <net/if.h>
+#include <net/route.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+#include <stdarg.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <string.h>
+
+#include <unistd.h>
+
+#include <libdaemon/dlog.h>
+
+#include <avahi-common/llist.h>
+#include <avahi-common/malloc.h>
+
+#include "iface.h"
+
+#ifndef IN_LINKLOCAL
+#define IN_LINKLOCAL(i) (((u_int32_t)(i) & (0xffff0000)) == (0xa9fe0000))
+#endif
+
+#ifndef elementsof
+#define elementsof(array)       (sizeof(array)/sizeof(array[0]))
+#endif
+
+#ifndef so_set_nonblock
+#define so_set_nonblock(s, val) \
+        do {                                            \
+                int __flags;                            \
+                __flags = fcntl((s), F_GETFL);          \
+                if (__flags == -1)                      \
+                        break;                          \
+                if (val != 0)                           \
+                        __flags |= O_NONBLOCK;          \
+                else                                    \
+                        __flags &= ~O_NONBLOCK;         \
+                (void)fcntl((s), F_SETFL, __flags);     \
+        } while (0)
+#endif
+
+#define MAX_RTMSG_SIZE 2048
+
+struct rtm_dispinfo {
+        u_char          *di_buf;
+        ssize_t          di_buflen;
+        ssize_t          di_len;
+};
+
+union rtmunion {
+        struct rt_msghdr                 rtm;
+        struct if_msghdr                 ifm;
+        struct ifa_msghdr                ifam;
+        struct ifma_msghdr               ifmam;
+        struct if_announcemsghdr         ifan;
+};
+typedef union rtmunion rtmunion_t;
+
+struct Address;
+typedef struct Address Address;
+
+struct Address {
+        in_addr_t       address;
+        AVAHI_LLIST_FIELDS(Address, addresses);
+};
+
+static int rtm_dispatch(void);
+static int rtm_dispatch_newdeladdr(struct rtm_dispinfo *di);
+static int rtm_dispatch_ifannounce(struct rtm_dispinfo *di);
+static struct sockaddr *next_sa(struct sockaddr *sa);
+
+static int fd = -1;
+static int ifindex = -1;
+static AVAHI_LLIST_HEAD(Address, addresses) = NULL;
+
+int
+iface_init(int idx)
+{
+
+        fd = socket(PF_ROUTE, SOCK_RAW, AF_INET);
+        if (fd == -1) {
+                daemon_log(LOG_ERR, "socket(PF_ROUTE): %s", strerror(errno));
+                return (-1);
+        }
+
+        so_set_nonblock(fd, 1);
+
+        ifindex = idx;
+
+        return (fd);
+}
+
+int
+iface_get_initial_state(State *state)
+{
+        int                      mib[6];
+        char                    *buf;
+        struct if_msghdr        *ifm;
+        struct ifa_msghdr       *ifam;
+        char                    *lim;
+        char                    *next;
+        struct sockaddr         *sa;
+        size_t                   len;
+        int                      naddrs;
+
+        assert(state != NULL);
+        assert(fd != -1);
+
+        naddrs = 0;
+
+        mib[0] = CTL_NET;
+        mib[1] = PF_ROUTE;
+        mib[2] = 0;
+        mib[3] = 0;
+        mib[4] = NET_RT_IFLIST;
+        mib[5] = ifindex;
+
+        if (sysctl(mib, elementsof(mib), NULL, &len, NULL, 0) != 0) {
+                daemon_log(LOG_ERR, "sysctl(NET_RT_IFLIST): %s",
+                    strerror(errno));
+                return (-1);
+        }
+
+        buf = malloc(len);
+        if (buf == NULL) {
+                daemon_log(LOG_ERR, "malloc(%d): %s", len, strerror(errno));
+                return (-1);
+        }
+
+        if (sysctl(mib, elementsof(mib), buf, &len, NULL, 0) != 0) {
+                daemon_log(LOG_ERR, "sysctl(NET_RT_IFLIST): %s",
+                    strerror(errno));
+                free(buf);
+                return (-1);
+        }
+
+        lim = buf + len;
+        for (next = buf; next < lim; next += ifm->ifm_msglen) {
+                ifm = (struct if_msghdr *)next;
+                if (ifm->ifm_type == RTM_NEWADDR) {
+                        ifam = (struct ifa_msghdr *)next;
+                        sa = (struct sockaddr *)(ifam + 1);
+                        if (sa->sa_family != AF_INET)
+                                continue;
+                        ++naddrs;
+                }
+        }
+        free(buf);
+
+        *state = (naddrs > 0) ? STATE_SLEEPING : STATE_START;
+
+        return (0);
+}
+
+int
+iface_process(Event *event)
+{
+        int routable;
+
+        assert(fd != -1);
+
+        routable = !!addresses;
+
+        if (rtm_dispatch() == -1)
+                return (-1);
+
+        if (routable && !addresses)
+                *event = EVENT_ROUTABLE_ADDR_UNCONFIGURED;
+        else if (!routable && addresses)
+                *event = EVENT_ROUTABLE_ADDR_CONFIGURED;
+
+        return (0);
+}
+
+void
+iface_done(void)
+{
+        Address *a;
+
+        if (fd != -1) {
+                close(fd);
+                fd = -1;
+        }
+
+        while ((a = addresses) != NULL) {
+                AVAHI_LLIST_REMOVE(Address, addresses, addresses, a);
+                avahi_free(a);
+        }
+}
+
+/*
+ * Dispatch kernel routing socket messages.
+ */
+static int
+rtm_dispatch(void)
+{
+        struct msghdr mh;
+        struct iovec iov[1];
+        struct rt_msghdr *rtm;
+        struct rtm_dispinfo *di;
+        ssize_t len;
+        int retval;
+
+        di = malloc(sizeof(*di));
+        if (di == NULL) {
+                daemon_log(LOG_ERR, "malloc(%d): %s", sizeof(*di),
+                    strerror(errno));
+                return (-1);
+        }
+        di->di_buflen = MAX_RTMSG_SIZE;
+        di->di_buf = calloc(MAX_RTMSG_SIZE, 1);
+        if (di->di_buf == NULL) {
+                free(di);
+                daemon_log(LOG_ERR, "calloc(%d): %s", MAX_RTMSG_SIZE,
+                    strerror(errno));
+                return (-1);
+        }
+
+        memset(&mh, 0, sizeof(mh));
+        iov[0].iov_base = di->di_buf;
+        iov[0].iov_len = di->di_buflen;
+        mh.msg_iov = iov;
+        mh.msg_iovlen = 1;
+
+        retval = 0;
+        for (;;) {
+                len = recvmsg(fd, &mh, MSG_DONTWAIT);
+                if (len == -1) {
+                        if (errno == EWOULDBLOCK)
+                                break;
+                        else {
+                                daemon_log(LOG_ERR, "recvmsg(): %s",
+                                    strerror(errno));
+                                retval = -1;
+                                break;
+                        }
+                }
+
+                rtm = (void *)di->di_buf;
+                if (rtm->rtm_version != RTM_VERSION) {
+                        daemon_log(LOG_ERR,
+                            "unknown routing socket message (version %d)\n",
+                            rtm->rtm_version);
+                        /* this is non-fatal; just ignore it for now. */
+                        continue;
+                }
+
+                switch (rtm->rtm_type) {
+                case RTM_NEWADDR:
+                case RTM_DELADDR:
+                        retval = rtm_dispatch_newdeladdr(di);
+                        break;
+                case RTM_IFANNOUNCE:
+                        retval = rtm_dispatch_ifannounce(di);
+                        break;
+                default:
+                        daemon_log(LOG_DEBUG, "%s: rtm_type %d ignored", __func__, rtm->rtm_type);
+                        break;
+                }
+
+                /*
+                 * If we got an error; assume our position on the call
+                 * stack is enclosed by a level-triggered event loop,
+                 * and signal the error condition.
+                 */
+                if (retval != 0)
+                        break;
+        }
+        free(di->di_buf);
+        free(di);
+
+        return (retval);
+}
+
+/* handle link coming or going away */
+static int
+rtm_dispatch_ifannounce(struct rtm_dispinfo *di)
+{
+        rtmunion_t *rtm = (void *)di->di_buf;
+
+        assert(rtm->rtm.rtm_type == RTM_IFANNOUNCE);
+
+        daemon_log(LOG_DEBUG, "%s: IFANNOUNCE for ifindex %d",
+            __func__, rtm->ifan.ifan_index);
+
+        switch (rtm->ifan.ifan_what) {
+        case IFAN_ARRIVAL:
+                if (rtm->ifan.ifan_index == ifindex) {
+                        daemon_log(LOG_ERR,
+"RTM_IFANNOUNCE IFAN_ARRIVAL, for ifindex %d, which we already manage.",
+                            ifindex);
+                        return (-1);
+                }
+                break;
+        case IFAN_DEPARTURE:
+                if (rtm->ifan.ifan_index == ifindex) {
+                        daemon_log(LOG_ERR, "Interface vanished.");
+                        return (-1);
+                }
+                break;
+        default:
+                /* ignore */
+                break;
+        }
+
+        return (0);
+}
+
+static struct sockaddr *
+next_sa(struct sockaddr *sa)
+{
+        void            *p;
+        size_t           sa_size;
+
+#ifdef SA_SIZE
+        sa_size = SA_SIZE(sa);
+#else
+        /* This is not foolproof, kernel may round. */
+        sa_size = sa->sa_len;
+        if (sa_size < sizeof(u_long))
+                sa_size = sizeof(u_long);
+#endif
+
+        p = ((char *)sa) + sa_size;
+
+        return (struct sockaddr *)p;
+}
+
+/* handle address coming or going away */
+static int
+rtm_dispatch_newdeladdr(struct rtm_dispinfo *di)
+{
+        Address                 *ap;
+        struct ifa_msghdr       *ifam;
+        struct sockaddr         *sa;
+        struct sockaddr_in      *sin;
+        int                     link_local;
+
+/* macro to skip to next RTA; has side-effects */
+#define SKIPRTA(ifamsgp, rta, sa)                                       \
+        do {                                                            \
+                if ((ifamsgp)->ifam_addrs & (rta))                      \
+                        (sa) = next_sa((sa));                           \
+        } while (0)
+
+        ifam = &((rtmunion_t *)di->di_buf)->ifam;
+
+        assert(ifam->ifam_type == RTM_NEWADDR ||
+               ifam->ifam_type == RTM_DELADDR);
+
+        daemon_log(LOG_DEBUG, "%s: %s for iface %d (%s)", __func__,
+            ifam->ifam_type == RTM_NEWADDR ? "NEWADDR" : "DELADDR",
+            ifam->ifam_index, (ifam->ifam_index == ifindex) ? "ours" : "not ours");
+
+        if (ifam->ifam_index != ifindex)
+                return (0);
+
+        if (!(ifam->ifam_addrs & RTA_IFA)) {
+                daemon_log(LOG_ERR, "ifa msg has no RTA_IFA.");
+                return (0);
+        }
+
+        /* skip over rtmsg padding correctly */
+        sa = (struct sockaddr *)(ifam + 1);
+        SKIPRTA(ifam, RTA_DST, sa);
+        SKIPRTA(ifam, RTA_GATEWAY, sa);
+        SKIPRTA(ifam, RTA_NETMASK, sa);
+        SKIPRTA(ifam, RTA_GENMASK, sa);
+        SKIPRTA(ifam, RTA_IFP, sa);
+
+        /*
+         * sa now points to RTA_IFA sockaddr; we are only interested
+         * in updates for routable addresses.
+         */
+        if (sa->sa_family != AF_INET) {
+                daemon_log(LOG_DEBUG, "%s: RTA_IFA family not AF_INET (=%d)", __func__, sa->sa_family);
+                return (0);
+        }
+
+        sin = (struct sockaddr_in *)sa;
+        link_local = IN_LINKLOCAL(ntohl(sin->sin_addr.s_addr));
+
+        daemon_log(LOG_DEBUG, "%s: %s for %s (%s)", __func__,
+            ifam->ifam_type == RTM_NEWADDR ? "NEWADDR" : "DELADDR",
+            inet_ntoa(sin->sin_addr), link_local ? "link local" : "routable");
+
+        if (link_local)
+                return (0);
+
+        for (ap = addresses; ap; ap = ap->addresses_next) {
+                if (ap->address == sin->sin_addr.s_addr)
+                        break;
+        }
+        if (ifam->ifam_type == RTM_DELADDR && ap != NULL) {
+                AVAHI_LLIST_REMOVE(Address, addresses, addresses, ap);
+                avahi_free(ap);
+        }
+        if (ifam->ifam_type == RTM_NEWADDR && ap == NULL) {
+                ap = avahi_new(Address, 1);
+                ap->address = sin->sin_addr.s_addr;
+                AVAHI_LLIST_PREPEND(Address, addresses, addresses, ap);
+        }
+
+        return (0);
+#undef SKIPRTA
+}
diff --git a/avahi-0.6.31/avahi-autoipd/iface-linux.c b/avahi-0.6.31/avahi-autoipd/iface-linux.c
new file mode 100644
index 0000000..83e9e41
--- /dev/null
+++ b/avahi-0.6.31/avahi-autoipd/iface-linux.c
@@ -0,0 +1,332 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <sys/socket.h>
+#include <errno.h>
+#include <string.h>
+#include <unistd.h>
+#include <arpa/inet.h>
+
+#include <linux/types.h>
+#include <linux/netlink.h>
+#include <linux/rtnetlink.h>
+#include <linux/if.h>
+#include <linux/if_arp.h>
+
+#include <libdaemon/dlog.h>
+
+#include <avahi-common/llist.h>
+#include <avahi-common/malloc.h>
+
+#ifndef IFLA_RTA
+#include <linux/if_addr.h>
+#define IFLA_RTA(r)  ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg))))
+#endif
+
+#ifndef IFA_RTA
+#include <linux/if_addr.h>
+#define IFA_RTA(r)  ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg))))
+#endif
+
+#include "iface.h"
+
+static int fd = -1;
+static int ifindex = -1;
+
+typedef struct Address Address;
+
+struct Address {
+    uint32_t address;
+    AVAHI_LLIST_FIELDS(Address, addresses);
+};
+
+AVAHI_LLIST_HEAD(Address, addresses) = NULL;
+
+int iface_init(int i) {
+    struct sockaddr_nl addr;
+    int on = 1;
+
+    if ((fd = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE)) < 0) {
+        daemon_log(LOG_ERR, "socket(PF_NETLINK): %s", strerror(errno));
+        goto fail;
+    }
+
+    memset(&addr, 0, sizeof(addr));
+    addr.nl_family = AF_NETLINK;
+    addr.nl_groups =  RTMGRP_LINK|RTMGRP_IPV4_IFADDR;
+    addr.nl_pid = getpid();
+
+    if (bind(fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
+        daemon_log(LOG_ERR, "bind(): %s", strerror(errno));
+        goto fail;
+    }
+
+    if (setsockopt(fd, SOL_SOCKET, SO_PASSCRED, &on, sizeof(on)) < 0) {
+        daemon_log(LOG_ERR, "SO_PASSCRED: %s", strerror(errno));
+        goto fail;
+    }
+
+    ifindex = i;
+
+    return fd;
+
+fail:
+    if (fd >= 0) {
+        close(fd);
+        fd = -1;
+    }
+
+    return -1;
+}
+
+static int process_nlmsg(struct nlmsghdr *n) {
+    assert(n);
+
+    if (n->nlmsg_type == RTM_NEWLINK || n->nlmsg_type == RTM_DELLINK) {
+        /* A link appeared or was removed */
+
+        struct ifinfomsg *ifi;
+        ifi = NLMSG_DATA(n);
+
+        if (ifi->ifi_family != AF_UNSPEC || (int) ifi->ifi_index != ifindex)
+            return 0;
+
+        if (n->nlmsg_type == RTM_DELLINK) {
+            daemon_log(LOG_ERR, "Interface vanished.");
+            return -1;
+        }
+
+        assert(n->nlmsg_type == RTM_NEWLINK);
+
+        if ((ifi->ifi_flags & IFF_LOOPBACK) ||
+            (ifi->ifi_flags & IFF_NOARP) ||
+            ifi->ifi_type != ARPHRD_ETHER) {
+            daemon_log(LOG_ERR, "Interface not suitable.");
+            return -1;
+        }
+
+    } else if (n->nlmsg_type == RTM_NEWADDR || n->nlmsg_type == RTM_DELADDR) {
+
+        /* An address was added or removed */
+
+        struct rtattr *a = NULL;
+        struct ifaddrmsg *ifa;
+        int l;
+        uint32_t address = 0;
+        Address *i;
+
+        ifa = NLMSG_DATA(n);
+
+        if (ifa->ifa_family != AF_INET || (int) ifa->ifa_index != ifindex)
+            return 0;
+
+        l = NLMSG_PAYLOAD(n, sizeof(*ifa));
+        a = IFLA_RTA(ifa);
+
+        while(RTA_OK(a, l)) {
+
+            switch(a->rta_type) {
+                case IFA_LOCAL:
+                case IFA_ADDRESS:
+                    assert(RTA_PAYLOAD(a) == 4);
+                    memcpy(&address, RTA_DATA(a), sizeof(uint32_t));
+                    break;
+            }
+
+            a = RTA_NEXT(a, l);
+        }
+
+        if (!address || is_ll_address(address))
+            return 0;
+
+        for (i = addresses; i; i = i->addresses_next)
+            if (i->address == address)
+                break;
+
+        if (n->nlmsg_type == RTM_DELADDR && i) {
+            AVAHI_LLIST_REMOVE(Address, addresses, addresses, i);
+            avahi_free(i);
+        } if (n->nlmsg_type == RTM_NEWADDR && !i) {
+            i = avahi_new(Address, 1);
+            i->address = address;
+            AVAHI_LLIST_PREPEND(Address, addresses, addresses, i);
+        }
+    }
+
+    return 0;
+}
+
+static int process_response(int wait_for_done, unsigned seq) {
+    assert(fd >= 0);
+
+    do {
+        size_t bytes;
+        ssize_t r;
+        char replybuf[8*1024];
+        char cred_msg[CMSG_SPACE(sizeof(struct ucred))];
+        struct msghdr msghdr;
+        struct cmsghdr *cmsghdr;
+        struct ucred *ucred;
+        struct iovec iov;
+        struct nlmsghdr *p = (struct nlmsghdr *) replybuf;
+
+        memset(&iov, 0, sizeof(iov));
+        iov.iov_base = replybuf;
+ 	iov.iov_len = sizeof(replybuf);
+
+        memset(&msghdr, 0, sizeof(msghdr));
+        msghdr.msg_name = (void*) NULL;
+        msghdr.msg_namelen = 0;
+        msghdr.msg_iov = &iov;
+        msghdr.msg_iovlen = 1;
+        msghdr.msg_control = cred_msg;
+        msghdr.msg_controllen = sizeof(cred_msg);
+ 	msghdr.msg_flags = 0;
+
+        if ((r = recvmsg(fd, &msghdr, 0)) < 0) {
+            daemon_log(LOG_ERR, "recvmsg() failed: %s", strerror(errno));
+            return -1;
+        }
+
+        if (!(cmsghdr = CMSG_FIRSTHDR(&msghdr)) || cmsghdr->cmsg_type != SCM_CREDENTIALS) {
+            daemon_log(LOG_WARNING, "No sender credentials received, ignoring data.");
+            return -1;
+        }
+
+        ucred = (struct ucred*) CMSG_DATA(cmsghdr);
+
+        if (ucred->uid != 0)
+            return -1;
+
+        bytes = (size_t) r;
+
+        for (; bytes > 0; p = NLMSG_NEXT(p, bytes)) {
+
+            if (!NLMSG_OK(p, bytes) || bytes < sizeof(struct nlmsghdr) || bytes < p->nlmsg_len) {
+                daemon_log(LOG_ERR, "Netlink packet too small.");
+                return -1;
+            }
+
+            if (p->nlmsg_type == NLMSG_DONE && wait_for_done && p->nlmsg_seq == seq && (pid_t) p->nlmsg_pid == getpid())
+                return 0;
+
+            if (p->nlmsg_type == NLMSG_ERROR) {
+                struct nlmsgerr *e = (struct nlmsgerr *) NLMSG_DATA (p);
+
+                if (e->error) {
+                    daemon_log(LOG_ERR, "Netlink error: %s", strerror(-e->error));
+                    return -1;
+                }
+            }
+
+            if (process_nlmsg(p) < 0)
+                return -1;
+        }
+    } while (wait_for_done);
+
+    return 0;
+}
+
+int iface_get_initial_state(State *state) {
+    struct nlmsghdr *n;
+    struct ifinfomsg *ifi;
+    struct ifaddrmsg *ifa;
+    uint8_t req[1024];
+    int seq = 0;
+
+    assert(fd >= 0);
+    assert(state);
+
+    memset(&req, 0, sizeof(req));
+    n = (struct nlmsghdr*) req;
+    n->nlmsg_len = NLMSG_LENGTH(sizeof(*ifi));
+    n->nlmsg_type = RTM_GETLINK;
+    n->nlmsg_seq = seq;
+    n->nlmsg_flags = NLM_F_REQUEST|NLM_F_DUMP;
+    n->nlmsg_pid = 0;
+
+    ifi = NLMSG_DATA(n);
+    ifi->ifi_family = AF_UNSPEC;
+    ifi->ifi_change = -1;
+
+    if (send(fd, n, n->nlmsg_len, 0) < 0) {
+        daemon_log(LOG_ERR, "send(): %s", strerror(errno));
+        return -1;
+    }
+
+    if (process_response(1, 0) < 0)
+        return -1;
+
+    n->nlmsg_type = RTM_GETADDR;
+    n->nlmsg_len = NLMSG_LENGTH(sizeof(*ifa));
+    n->nlmsg_seq = ++seq;
+
+    ifa = NLMSG_DATA(n);
+    ifa->ifa_family = AF_INET;
+    ifa->ifa_index = ifindex;
+
+    if (send(fd, n, n->nlmsg_len, 0) < 0) {
+        daemon_log(LOG_ERR, "send(): %s", strerror(errno));
+        return -1;
+    }
+
+    if (process_response(1, seq) < 0)
+        return -1;
+
+    *state = addresses ? STATE_SLEEPING : STATE_START;
+
+    return 0;
+}
+
+int iface_process(Event *event) {
+    int b;
+    assert(fd >= 0);
+
+    b = !!addresses;
+
+    if (process_response(0, 0) < 0)
+        return -1;
+
+    if (b && !addresses)
+        *event = EVENT_ROUTABLE_ADDR_UNCONFIGURED;
+    else if (!b && addresses)
+        *event = EVENT_ROUTABLE_ADDR_CONFIGURED;
+
+    return 0;
+}
+
+void iface_done(void) {
+    Address *a;
+
+    if (fd >= 0) {
+        close(fd);
+        fd = -1;
+    }
+
+    while ((a = addresses)) {
+        AVAHI_LLIST_REMOVE(Address, addresses, addresses, a);
+        avahi_free(a);
+    }
+}
+
+
diff --git a/avahi-0.6.31/avahi-autoipd/iface.h b/avahi-0.6.31/avahi-autoipd/iface.h
new file mode 100644
index 0000000..95c97fd
--- /dev/null
+++ b/avahi-0.6.31/avahi-autoipd/iface.h
@@ -0,0 +1,45 @@
+#ifndef fooavahiifacehfoo
+#define fooavahiifacehfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#include <inttypes.h>
+
+#include "main.h"
+
+/* Subscribe to network configuration changes. The only events we are
+ * interested in are when routable addresses are removed/added to the
+ * monitored interface and when our monitored interface disappears. */
+
+
+/* Return a valid fd that we listen on for events */
+int iface_init(int ifindex);
+
+/* Process events */
+int iface_process(Event *event);
+void iface_done(void);
+
+/* Deduce the initial state of our state machine. If a routable
+ * address is configured for the interface, *state should be set to
+ * STATE_SLEEPING, otherwise STATE_START */
+
+int iface_get_initial_state(State *state);
+
+#endif
diff --git a/avahi-0.6.31/avahi-autoipd/main.c b/avahi-0.6.31/avahi-autoipd/main.c
new file mode 100644
index 0000000..a1bddb2
--- /dev/null
+++ b/avahi-0.6.31/avahi-autoipd/main.c
@@ -0,0 +1,1714 @@
+/***
+    This file is part of avahi.
+
+    avahi 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.
+
+    avahi 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 avahi; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+    USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <sys/wait.h>
+#ifdef __FreeBSD__
+#include <sys/sysctl.h>
+#endif
+
+#ifdef __linux__
+#include <netpacket/packet.h>
+#endif
+#include <net/ethernet.h>
+#include <net/if.h>
+#ifdef __FreeBSD__
+#include <net/if_dl.h>
+#include <net/route.h>
+#endif
+#include <arpa/inet.h>
+
+#include <assert.h>
+#include <errno.h>
+#include <inttypes.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <signal.h>
+#include <string.h>
+#include <time.h>
+#include <getopt.h>
+
+#include <grp.h>
+#include <poll.h>
+#include <pwd.h>
+#include <unistd.h>
+
+#ifndef __linux__
+#include <pcap.h>
+
+/* Old versions of PCAP defined it as D_IN */
+#ifndef PCAP_D_IN
+#define PCAP_D_IN D_IN
+#endif
+
+#endif
+
+#include <avahi-common/malloc.h>
+#include <avahi-common/timeval.h>
+#include <avahi-daemon/setproctitle.h>
+
+#include <libdaemon/dfork.h>
+#include <libdaemon/dsignal.h>
+#include <libdaemon/dlog.h>
+#include <libdaemon/dpid.h>
+#include <libdaemon/dexec.h>
+
+#include "main.h"
+#include "iface.h"
+
+/* An implementation of RFC 3927 */
+
+/* Constants from the RFC */
+#define PROBE_WAIT 1
+#define PROBE_NUM 3
+#define PROBE_MIN 1
+#define PROBE_MAX 2
+#define ANNOUNCE_WAIT 2
+#define ANNOUNCE_NUM 2
+#define ANNOUNCE_INTERVAL 2
+#define MAX_CONFLICTS 10
+#define RATE_LIMIT_INTERVAL 60
+#define DEFEND_INTERVAL 10
+
+#define IPV4LL_NETWORK 0xA9FE0000L
+#define IPV4LL_NETMASK 0xFFFF0000L
+#define IPV4LL_HOSTMASK 0x0000FFFFL
+#define IPV4LL_BROADCAST 0xA9FEFFFFL
+
+#define ETHER_ADDRLEN 6
+#define ETHER_HDR_SIZE (2+2*ETHER_ADDRLEN)
+#define ARP_PACKET_SIZE (8+4+4+2*ETHER_ADDRLEN)
+
+typedef enum ArpOperation {
+    ARP_REQUEST = 1,
+    ARP_RESPONSE = 2
+} ArpOperation;
+
+typedef struct ArpPacketInfo {
+    ArpOperation operation;
+
+    uint32_t sender_ip_address, target_ip_address;
+    uint8_t sender_hw_address[ETHER_ADDRLEN], target_hw_address[ETHER_ADDRLEN];
+} ArpPacketInfo;
+
+typedef struct ArpPacket {
+    uint8_t *ether_header;
+    uint8_t *ether_payload;
+} ArpPacket;
+
+static State state = STATE_START;
+static int n_iteration = 0;
+static int n_conflict = 0;
+
+static char *interface_name = NULL;
+static char *pid_file_name = NULL;
+static uint32_t start_address = 0;
+static char *argv0 = NULL;
+static int daemonize = 0;
+static int wait_for_address = 0;
+static int use_syslog = 0;
+static int debug = 0;
+static int modify_proc_title = 1;
+static int force_bind = 0;
+#ifdef HAVE_CHROOT
+static int no_chroot = 0;
+#endif
+static int no_drop_root = 0;
+static int wrote_pid_file = 0;
+static char *action_script = NULL;
+
+static enum {
+    DAEMON_RUN,
+    DAEMON_KILL,
+    DAEMON_REFRESH,
+    DAEMON_VERSION,
+    DAEMON_HELP,
+    DAEMON_CHECK
+} command = DAEMON_RUN;
+
+typedef enum CalloutEvent {
+    CALLOUT_BIND,
+    CALLOUT_CONFLICT,
+    CALLOUT_UNBIND,
+    CALLOUT_STOP,
+    CALLOUT_MAX
+} CalloutEvent;
+
+static const char * const callout_event_table[CALLOUT_MAX] = {
+    [CALLOUT_BIND] = "BIND",
+    [CALLOUT_CONFLICT] = "CONFLICT",
+    [CALLOUT_UNBIND] = "UNBIND",
+    [CALLOUT_STOP] = "STOP"
+};
+
+typedef struct CalloutEventInfo {
+    CalloutEvent event;
+    uint32_t address;
+    int ifindex;
+} CalloutEventInfo;
+
+#define RANDOM_DEVICE "/dev/urandom"
+
+#define DEBUG(x)                                \
+    do {                                        \
+        if (debug) {                            \
+            x;                                  \
+        }                                       \
+    } while (0)
+
+static void init_rand_seed(void) {
+    int fd;
+    unsigned seed = 0;
+
+    /* Try to initialize seed from /dev/urandom, to make it a little
+     * less predictable, and to make sure that multiple machines
+     * booted at the same time choose different random seeds.  */
+    if ((fd = open(RANDOM_DEVICE, O_RDONLY)) >= 0) {
+        read(fd, &seed, sizeof(seed));
+        close(fd);
+    }
+
+    /* If the initialization failed by some reason, we add the time to the seed */
+    seed ^= (unsigned) time(NULL);
+
+    srand(seed);
+}
+
+static uint32_t pick_addr(uint32_t old_addr) {
+    uint32_t addr;
+
+    do {
+        unsigned r = (unsigned) rand();
+
+        /* Reduce to 16 bits */
+        while (r > 0xFFFF)
+            r = (r >> 16) ^ (r & 0xFFFF);
+
+        addr = htonl(IPV4LL_NETWORK | (uint32_t) r);
+
+    } while (addr == old_addr || !is_ll_address(addr));
+
+    return addr;
+}
+
+static int load_address(const char *fn, uint32_t *addr) {
+    FILE *f;
+    unsigned a, b, c, d;
+
+    assert(fn);
+    assert(addr);
+
+    if (!(f = fopen(fn, "r"))) {
+
+        if (errno == ENOENT) {
+            *addr = 0;
+            return 0;
+        }
+
+        daemon_log(LOG_ERR, "fopen() failed: %s", strerror(errno));
+        goto fail;
+    }
+
+    if (fscanf(f, "%u.%u.%u.%u\n", &a, &b, &c, &d) != 4) {
+        daemon_log(LOG_ERR, "Parse failure");
+        goto fail;
+    }
+
+    fclose(f);
+
+    *addr = htonl((a << 24) | (b << 16) | (c << 8) | d);
+    return 0;
+
+fail:
+    if (f)
+        fclose(f);
+
+    return -1;
+}
+
+static int save_address(const char *fn, uint32_t addr) {
+    FILE *f;
+    char buf[32];
+    mode_t u;
+
+    assert(fn);
+
+    u = umask(0033);
+    if (!(f = fopen(fn, "w"))) {
+        daemon_log(LOG_ERR, "fopen() failed: %s", strerror(errno));
+        goto fail;
+    }
+    umask(u);
+
+    fprintf(f, "%s\n", inet_ntop(AF_INET, &addr, buf, sizeof (buf)));
+    fclose(f);
+
+    return 0;
+
+fail:
+    if (f)
+        fclose(f);
+
+    umask(u);
+
+    return -1;
+}
+
+/*
+ * Allocate a buffer with two pointers in front, one of which is
+ * guaranteed to point ETHER_HDR_SIZE bytes into it.
+ */
+static ArpPacket* packet_new(size_t packet_len) {
+    ArpPacket *p;
+    uint8_t *b;
+
+    assert(packet_len > 0);
+
+#ifdef __linux__
+    b = avahi_new0(uint8_t, sizeof(struct ArpPacket) + packet_len);
+    p = (ArpPacket*) b;
+    p->ether_header = NULL;
+    p->ether_payload = b + sizeof(struct ArpPacket);
+
+#else
+    b = avahi_new0(uint8_t, sizeof(struct ArpPacket) + ETHER_HDR_SIZE + packet_len);
+    p = (ArpPacket*) b;
+    p->ether_header = b + sizeof(struct ArpPacket);
+    p->ether_payload = b + sizeof(struct ArpPacket) + ETHER_HDR_SIZE;
+#endif
+
+    return p;
+}
+
+static ArpPacket* packet_new_with_info(const ArpPacketInfo *info, size_t *packet_len) {
+    ArpPacket *p = NULL;
+    uint8_t *r;
+
+    assert(info);
+    assert(info->operation == ARP_REQUEST || info->operation == ARP_RESPONSE);
+    assert(packet_len != NULL);
+
+    *packet_len = ARP_PACKET_SIZE;
+    p = packet_new(*packet_len);
+    r = p->ether_payload;
+
+    r[1] = 1; /* HTYPE */
+    r[2] = 8; /* PTYPE */
+    r[4] = ETHER_ADDRLEN; /* HLEN */
+    r[5] = 4; /* PLEN */
+    r[7] = (uint8_t) info->operation;
+
+    memcpy(r+8, info->sender_hw_address, ETHER_ADDRLEN);
+    memcpy(r+14, &info->sender_ip_address, 4);
+    memcpy(r+18, info->target_hw_address, ETHER_ADDRLEN);
+    memcpy(r+24, &info->target_ip_address, 4);
+
+    return p;
+}
+
+static ArpPacket *packet_new_probe(uint32_t ip_address, const uint8_t*hw_address, size_t *packet_len) {
+    ArpPacketInfo info;
+
+    memset(&info, 0, sizeof(info));
+    info.operation = ARP_REQUEST;
+    memcpy(info.sender_hw_address, hw_address, ETHER_ADDRLEN);
+    info.target_ip_address = ip_address;
+
+    return packet_new_with_info(&info, packet_len);
+}
+
+static ArpPacket *packet_new_announcement(uint32_t ip_address, const uint8_t* hw_address, size_t *packet_len) {
+    ArpPacketInfo info;
+
+    memset(&info, 0, sizeof(info));
+    info.operation = ARP_REQUEST;
+    memcpy(info.sender_hw_address, hw_address, ETHER_ADDRLEN);
+    info.target_ip_address = ip_address;
+    info.sender_ip_address = ip_address;
+
+    return packet_new_with_info(&info, packet_len);
+}
+
+static int packet_parse(const ArpPacket *packet, size_t packet_len, ArpPacketInfo *info) {
+    const uint8_t *p;
+
+    assert(packet);
+    p = (uint8_t *)packet->ether_payload;
+    assert(p);
+
+    if (packet_len < ARP_PACKET_SIZE)
+        return -1;
+
+    /* Check HTYPE and PTYPE */
+    if (p[0] != 0 || p[1] != 1 || p[2] != 8 || p[3] != 0)
+        return -1;
+
+    /* Check HLEN, PLEN, OPERATION */
+    if (p[4] != ETHER_ADDRLEN || p[5] != 4 || p[6] != 0 || (p[7] != 1 && p[7] != 2))
+        return -1;
+
+    info->operation = p[7];
+    memcpy(info->sender_hw_address, p+8, ETHER_ADDRLEN);
+    memcpy(&info->sender_ip_address, p+14, 4);
+    memcpy(info->target_hw_address, p+18, ETHER_ADDRLEN);
+    memcpy(&info->target_ip_address, p+24, 4);
+
+    return 0;
+}
+
+static void set_state(State st, int reset_counter, uint32_t address) {
+    static const char* const state_table[] = {
+        [STATE_START] = "START",
+        [STATE_WAITING_PROBE] = "WAITING_PROBE",
+        [STATE_PROBING] = "PROBING",
+        [STATE_WAITING_ANNOUNCE] = "WAITING_ANNOUNCE",
+        [STATE_ANNOUNCING] = "ANNOUNCING",
+        [STATE_RUNNING] = "RUNNING",
+        [STATE_SLEEPING] = "SLEEPING"
+    };
+    char buf[64];
+
+    assert(st < STATE_MAX);
+
+    if (st == state && !reset_counter) {
+        n_iteration++;
+        DEBUG(daemon_log(LOG_DEBUG, "State iteration %s-%i", state_table[state], n_iteration));
+    } else {
+        DEBUG(daemon_log(LOG_DEBUG, "State transition %s-%i -> %s-0", state_table[state], n_iteration, state_table[st]));
+        state = st;
+        n_iteration = 0;
+    }
+
+    if (state == STATE_SLEEPING)
+        avahi_set_proc_title(argv0, "%s: [%s] sleeping", argv0, interface_name);
+    else if (state == STATE_ANNOUNCING)
+        avahi_set_proc_title(argv0, "%s: [%s] announcing %s", argv0, interface_name, inet_ntop(AF_INET, &address, buf, sizeof(buf)));
+    else if (state == STATE_RUNNING)
+        avahi_set_proc_title(argv0, "%s: [%s] bound %s", argv0, interface_name, inet_ntop(AF_INET, &address, buf, sizeof(buf)));
+    else
+        avahi_set_proc_title(argv0, "%s: [%s] probing %s", argv0, interface_name, inet_ntop(AF_INET, &address, buf, sizeof(buf)));
+}
+
+static int interface_up(int iface) {
+    int fd = -1;
+    struct ifreq ifreq;
+
+    if ((fd = socket(PF_INET, SOCK_DGRAM, 0)) < 0) {
+        daemon_log(LOG_ERR, "socket() failed: %s", strerror(errno));
+        goto fail;
+    }
+
+    memset(&ifreq, 0, sizeof(ifreq));
+    if (!if_indextoname(iface, ifreq.ifr_name)) {
+        daemon_log(LOG_ERR, "if_indextoname() failed: %s", strerror(errno));
+        goto fail;
+    }
+
+    if (ioctl(fd, SIOCGIFFLAGS, &ifreq) < 0) {
+        daemon_log(LOG_ERR, "SIOCGIFFLAGS failed: %s", strerror(errno));
+        goto fail;
+    }
+
+    ifreq.ifr_flags |= IFF_UP;
+
+    if (ioctl(fd, SIOCSIFFLAGS, &ifreq) < 0) {
+        daemon_log(LOG_ERR, "SIOCSIFFLAGS failed: %s", strerror(errno));
+        goto fail;
+    }
+
+    close(fd);
+
+    return 0;
+
+fail:
+    if (fd >= 0)
+        close(fd);
+
+    return -1;
+}
+
+#ifdef __linux__
+
+/* Linux 'packet socket' specific implementation */
+
+static int open_socket(int iface, uint8_t *hw_address) {
+    int fd = -1;
+    struct sockaddr_ll sa;
+    socklen_t sa_len;
+
+    if (interface_up(iface) < 0)
+        goto fail;
+
+    if ((fd = socket(PF_PACKET, SOCK_DGRAM, 0)) < 0) {
+        daemon_log(LOG_ERR, "socket() failed: %s", strerror(errno));
+        goto fail;
+    }
+
+    memset(&sa, 0, sizeof(sa));
+    sa.sll_family = AF_PACKET;
+    sa.sll_protocol = htons(ETH_P_ARP);
+    sa.sll_ifindex = iface;
+
+    if (bind(fd, (struct sockaddr*) &sa, sizeof(sa)) < 0) {
+        daemon_log(LOG_ERR, "bind() failed: %s", strerror(errno));
+        goto fail;
+    }
+
+    sa_len = sizeof(sa);
+    if (getsockname(fd, (struct sockaddr*) &sa, &sa_len) < 0) {
+        daemon_log(LOG_ERR, "getsockname() failed: %s", strerror(errno));
+        goto fail;
+    }
+
+    if (sa.sll_halen != ETHER_ADDRLEN) {
+        daemon_log(LOG_ERR, "getsockname() returned invalid hardware address.");
+        goto fail;
+    }
+
+    memcpy(hw_address, sa.sll_addr, ETHER_ADDRLEN);
+
+    return fd;
+
+fail:
+    if (fd >= 0)
+        close(fd);
+
+    return -1;
+}
+
+static int send_packet(int fd, int iface, ArpPacket *packet, size_t packet_len) {
+    struct sockaddr_ll sa;
+
+    assert(fd >= 0);
+    assert(packet);
+    assert(packet_len > 0);
+
+    memset(&sa, 0, sizeof(sa));
+    sa.sll_family = AF_PACKET;
+    sa.sll_protocol = htons(ETH_P_ARP);
+    sa.sll_ifindex = iface;
+    sa.sll_halen = ETHER_ADDRLEN;
+    memset(sa.sll_addr, 0xFF, ETHER_ADDRLEN);
+
+    if (sendto(fd, packet->ether_payload, packet_len, 0, (struct sockaddr*) &sa, sizeof(sa)) < 0) {
+        daemon_log(LOG_ERR, "sendto() failed: %s", strerror(errno));
+        return -1;
+    }
+
+    return 0;
+}
+
+static int recv_packet(int fd, ArpPacket **packet, size_t *packet_len) {
+    int s;
+    struct sockaddr_ll sa;
+    socklen_t sa_len;
+    ssize_t r;
+
+    assert(fd >= 0);
+    assert(packet);
+    assert(packet_len);
+
+    *packet = NULL;
+
+    if (ioctl(fd, FIONREAD, &s) < 0) {
+        daemon_log(LOG_ERR, "FIONREAD failed: %s", strerror(errno));
+        goto fail;
+    }
+
+    if (s <= 0)
+        s = 4096;
+
+    *packet = packet_new(s);
+
+    sa_len = sizeof(sa);
+    if ((r = recvfrom(fd, (*packet)->ether_payload, s, 0, (struct sockaddr*) &sa, &sa_len)) < 0) {
+        daemon_log(LOG_ERR, "recvfrom() failed: %s", strerror(errno));
+        goto fail;
+    }
+
+    *packet_len = (size_t) r;
+
+    return 0;
+
+fail:
+    if (*packet) {
+        avahi_free(*packet);
+        *packet = NULL;
+    }
+
+    return -1;
+}
+
+static void close_socket(int fd) {
+    close(fd);
+}
+
+#else /* !__linux__ */
+/* PCAP-based implementation */
+
+static pcap_t *__pp;
+static char __pcap_errbuf[PCAP_ERRBUF_SIZE];
+static uint8_t __lladdr[ETHER_ADDRLEN];
+
+#ifndef elementsof
+#define elementsof(array)       (sizeof(array)/sizeof(array[0]))
+#endif
+
+static int __get_ether_addr(int ifindex, u_char *lladdr) {
+    int mib[6];
+    char *buf;
+    struct if_msghdr *ifm;
+    char *lim;
+    char *next;
+    struct sockaddr_dl *sdl;
+    size_t len;
+
+    mib[0] = CTL_NET;
+    mib[1] = PF_ROUTE;
+    mib[2] = 0;
+    mib[3] = 0;
+    mib[4] = NET_RT_IFLIST;
+    mib[5] = ifindex;
+
+    if (sysctl(mib, elementsof(mib), NULL, &len, NULL, 0) != 0) {
+        daemon_log(LOG_ERR, "sysctl(NET_RT_IFLIST): %s",
+                   strerror(errno));
+        return -1;
+    }
+
+    buf = avahi_malloc(len);
+    if (sysctl(mib, elementsof(mib), buf, &len, NULL, 0) != 0) {
+        daemon_log(LOG_ERR, "sysctl(NET_RT_IFLIST): %s",
+                   strerror(errno));
+        free(buf);
+        return -1;
+    }
+
+    lim = buf + len;
+    for (next = buf; next < lim; next += ifm->ifm_msglen) {
+        ifm = (struct if_msghdr *)next;
+        if (ifm->ifm_type == RTM_IFINFO) {
+            sdl = (struct sockaddr_dl *)(ifm + 1);
+            memcpy(lladdr, LLADDR(sdl), ETHER_ADDRLEN);
+        }
+    }
+    avahi_free(buf);
+
+    return 0;
+}
+
+#define PCAP_TIMEOUT 500 /* 0.5s */
+
+static int open_socket(int iface, uint8_t *hw_address) {
+    struct bpf_program bpf;
+    char *filter;
+    char ifname[IFNAMSIZ];
+    pcap_t *pp;
+    int err;
+    int fd;
+
+    assert(__pp == NULL);
+
+    if (interface_up(iface) < 0)
+        return -1;
+
+    if (__get_ether_addr(iface, __lladdr) == -1)
+        return -1;
+
+    if (if_indextoname(iface, ifname) == NULL)
+        return -1;
+
+    /*
+     * Using a timeout for BPF is fairly portable across BSDs. On most
+     * modern versions, using the timeout/nonblock/poll method results in
+     * fairly sane behavior, with the timeout only coming into play during
+     * the next_ex() call itself (so, for us, that's only when there's
+     * data). On older versions, it may result in a PCAP_TIMEOUT busy-wait
+     * on some versions, though, as the poll() may terminate at the
+     * PCAP_TIMEOUT instead of the poll() timeout.
+     */
+    pp = pcap_open_live(ifname, 1500, 0, PCAP_TIMEOUT, __pcap_errbuf);
+    if (pp == NULL) {
+        return (-1);
+    }
+    err = pcap_set_datalink(pp, DLT_EN10MB);
+    if (err == -1) {
+        daemon_log(LOG_ERR, "pcap_set_datalink: %s", pcap_geterr(pp));
+        pcap_close(pp);
+        return (-1);
+    }
+    err = pcap_setdirection(pp, PCAP_D_IN);
+    if (err == -1) {
+        daemon_log(LOG_ERR, "pcap_setdirection: %s", pcap_geterr(pp));
+        pcap_close(pp);
+        return (-1);
+    }
+
+    fd = pcap_get_selectable_fd(pp);
+    if (fd == -1) {
+        pcap_close(pp);
+        return (-1);
+    }
+
+    /*
+     * Using setnonblock is a portability stop-gap. Using the timeout in
+     * combination with setnonblock will ensure on most BSDs that the
+     * next_ex call returns in a timely fashion.
+     */
+    err = pcap_setnonblock(pp, 1, __pcap_errbuf);
+    if (err == -1) {
+        pcap_close(pp);
+        return (-1);
+    }
+
+    filter = avahi_strdup_printf("arp and (ether dst ff:ff:ff:ff:ff:ff or "
+                                 "%02x:%02x:%02x:%02x:%02x:%02x)",
+                                 __lladdr[0], __lladdr[1],
+                                 __lladdr[2], __lladdr[3],
+                                 __lladdr[4], __lladdr[5]);
+    DEBUG(daemon_log(LOG_DEBUG, "Using pcap filter '%s'", filter));
+
+    err = pcap_compile(pp, &bpf, filter, 1, 0);
+    avahi_free(filter);
+    if (err == -1) {
+        daemon_log(LOG_ERR, "pcap_compile: %s", pcap_geterr(pp));
+        pcap_close(pp);
+        return (-1);
+    }
+    err = pcap_setfilter(pp, &bpf);
+    if (err == -1) {
+        daemon_log(LOG_ERR, "pcap_setfilter: %s", pcap_geterr(pp));
+        pcap_close(pp);
+        return (-1);
+    }
+    pcap_freecode(&bpf);
+
+    /* Stash pcap-specific context away. */
+    memcpy(hw_address, __lladdr, ETHER_ADDRLEN);
+    __pp = pp;
+
+    return (fd);
+}
+
+static void close_socket(int fd AVAHI_GCC_UNUSED) {
+    assert(__pp != NULL);
+    pcap_close(__pp);
+    __pp = NULL;
+}
+
+/*
+ * We trick avahi into allocating sizeof(packet) + sizeof(ether_header),
+ * and prepend the required ethernet header information before sending.
+ */
+static int send_packet(int fd AVAHI_GCC_UNUSED, int iface AVAHI_GCC_UNUSED, ArpPacket *packet, size_t packet_len) {
+    struct ether_header *eh;
+
+    assert(__pp != NULL);
+    assert(packet != NULL);
+
+    eh = (struct ether_header *)packet->ether_header;
+    memset(eh->ether_dhost, 0xFF, ETHER_ADDRLEN);
+    memcpy(eh->ether_shost, __lladdr, ETHER_ADDRLEN);
+    eh->ether_type = htons(0x0806);
+
+    return (pcap_inject(__pp, (void *)eh, packet_len + sizeof(*eh)));
+}
+
+static int recv_packet(int fd AVAHI_GCC_UNUSED, ArpPacket **packet, size_t *packet_len) {
+    struct pcap_pkthdr *ph;
+    u_char *pd;
+    ArpPacket *ap;
+    int err;
+    int retval;
+
+    assert(__pp != NULL);
+    assert(packet != NULL);
+    assert(packet_len != NULL);
+
+    *packet = NULL;
+    *packet_len = 0;
+    retval = -1;
+
+    err = pcap_next_ex(__pp, &ph, (const u_char **)&pd);
+    if (err == 1 && ph->caplen <= ph->len) {
+        ap = packet_new(ph->caplen);
+        memcpy(ap->ether_header, pd, ph->caplen);
+        *packet = ap;
+        *packet_len = (ph->caplen - sizeof(struct ether_header));
+        retval = 0;
+    } else if (err >= 0) {
+        /*
+         * err == 1: Just drop bogus packets (>1500 for an arp packet!?)
+         * on the floor.
+         *
+         * err == 0: We might have had traffic on the pcap fd that
+         * didn't match the filter, in which case we'll get 0 packets.
+         */
+        retval = 0;
+    } else
+        daemon_log(LOG_ERR, "pcap_next_ex(%d): %s",
+                   err, pcap_geterr(__pp));
+
+    return (retval);
+}
+#endif /* __linux__ */
+
+int is_ll_address(uint32_t addr) {
+    return
+        ((ntohl(addr) & IPV4LL_NETMASK) == IPV4LL_NETWORK) &&
+        ((ntohl(addr) & 0x0000FF00) != 0x0000) &&
+        ((ntohl(addr) & 0x0000FF00) != 0xFF00);
+}
+
+static struct timeval *elapse_time(struct timeval *tv, unsigned msec, unsigned jitter) {
+    assert(tv);
+
+    gettimeofday(tv, NULL);
+
+    if (msec)
+        avahi_timeval_add(tv, (AvahiUsec) msec*1000);
+
+    if (jitter)
+        avahi_timeval_add(tv, (AvahiUsec) (jitter*1000.0*rand()/(RAND_MAX+1.0)));
+
+    return tv;
+}
+
+static FILE* fork_dispatcher(void) {
+    FILE *ret;
+    int fds[2];
+    pid_t pid;
+
+    if (pipe(fds) < 0) {
+        daemon_log(LOG_ERR, "pipe() failed: %s", strerror(errno));
+        goto fail;
+    }
+
+    if ((pid = fork()) < 0)
+        goto fail;
+    else if (pid == 0) {
+        FILE *f = NULL;
+        int r = 1;
+
+        /* Please note that the signal pipe is not closed at this
+         * point, signals will thus be dispatched in the main
+         * process. */
+
+        daemon_retval_done();
+
+        avahi_set_proc_title(argv0, "%s: [%s] callout dispatcher", argv0, interface_name);
+
+        close(fds[1]);
+
+        if (!(f = fdopen(fds[0], "r"))) {
+            daemon_log(LOG_ERR, "fdopen() failed: %s", strerror(errno));
+            goto dispatcher_fail;
+        }
+
+        for (;;) {
+            CalloutEventInfo info;
+            char name[IFNAMSIZ], buf[64];
+            int k;
+
+            if (fread(&info, sizeof(info), 1, f) != 1) {
+                if (feof(f))
+                    break;
+
+                daemon_log(LOG_ERR, "fread() failed: %s", strerror(errno));
+                goto dispatcher_fail;
+            }
+
+            assert(info.event <= CALLOUT_MAX);
+
+            if (!if_indextoname(info.ifindex, name)) {
+                daemon_log(LOG_ERR, "if_indextoname() failed: %s", strerror(errno));
+                continue;
+            }
+
+            if (daemon_exec("/", &k,
+                            action_script, action_script,
+                            callout_event_table[info.event],
+                            name,
+                            inet_ntop(AF_INET, &info.address, buf, sizeof(buf)), NULL) < 0) {
+
+                daemon_log(LOG_ERR, "Failed to run script: %s", strerror(errno));
+                continue;
+            }
+
+            if (k != 0)
+                daemon_log(LOG_WARNING, "Script execution failed with return value %i", k);
+        }
+
+        r = 0;
+
+    dispatcher_fail:
+
+        if (f)
+            fclose(f);
+
+#ifdef HAVE_CHROOT
+        /* If the main process is trapped inside a chroot() we have to
+         * remove the PID file for it */
+
+        if (!no_chroot && wrote_pid_file)
+            daemon_pid_file_remove();
+#endif
+
+        _exit(r);
+    }
+
+    /* parent */
+
+    close(fds[0]);
+    fds[0] = -1;
+
+    if (!(ret = fdopen(fds[1], "w"))) {
+        daemon_log(LOG_ERR, "fdopen() failed: %s", strerror(errno));
+        goto fail;
+    }
+
+    return ret;
+
+fail:
+    if (fds[0] >= 0)
+        close(fds[0]);
+    if (fds[1] >= 0)
+        close(fds[1]);
+
+    return NULL;
+}
+
+static int do_callout(FILE *f, CalloutEvent event, int iface, uint32_t addr) {
+    CalloutEventInfo info;
+    char buf[64], ifname[IFNAMSIZ];
+
+    daemon_log(LOG_INFO, "Callout %s, address %s on interface %s",
+               callout_event_table[event],
+               inet_ntop(AF_INET, &addr, buf, sizeof(buf)),
+               if_indextoname(iface, ifname));
+
+    info.event = event;
+    info.ifindex = iface;
+    info.address = addr;
+
+    if (fwrite(&info, sizeof(info), 1, f) != 1 || fflush(f) != 0) {
+        daemon_log(LOG_ERR, "Failed to write callout event: %s", strerror(errno));
+        return -1;
+    }
+
+    return 0;
+}
+
+#define set_env(key, value) putenv(avahi_strdup_printf("%s=%s", (key), (value)))
+
+static int drop_privs(void) {
+    struct passwd *pw;
+    struct group * gr;
+    int r;
+    mode_t u;
+
+    pw = NULL;
+    gr = NULL;
+
+    /* Get user/group ID */
+
+    if (!no_drop_root) {
+
+        if (!(pw = getpwnam(AVAHI_AUTOIPD_USER))) {
+            daemon_log(LOG_ERR, "Failed to find user '"AVAHI_AUTOIPD_USER"'.");
+            return -1;
+        }
+
+        if (!(gr = getgrnam(AVAHI_AUTOIPD_GROUP))) {
+            daemon_log(LOG_ERR, "Failed to find group '"AVAHI_AUTOIPD_GROUP"'.");
+            return -1;
+        }
+
+        daemon_log(LOG_INFO, "Found user '"AVAHI_AUTOIPD_USER"' (UID %lu) and group '"AVAHI_AUTOIPD_GROUP"' (GID %lu).", (unsigned long) pw->pw_uid, (unsigned long) gr->gr_gid);
+    }
+
+    /* Create directory */
+    u = umask(0000);
+    r = mkdir(AVAHI_IPDATA_DIR, 0755);
+    umask(u);
+
+    if (r < 0 && errno != EEXIST) {
+        daemon_log(LOG_ERR, "mkdir(\""AVAHI_IPDATA_DIR"\"): %s", strerror(errno));
+        return -1;
+    }
+
+    /* Convey working directory */
+
+    if (!no_drop_root) {
+        struct stat st;
+
+        chown(AVAHI_IPDATA_DIR, pw->pw_uid, gr->gr_gid);
+
+        if (stat(AVAHI_IPDATA_DIR, &st) < 0) {
+            daemon_log(LOG_ERR, "stat(): %s\n", strerror(errno));
+            return -1;
+        }
+
+        if (!S_ISDIR(st.st_mode) || st.st_uid != pw->pw_uid || st.st_gid != gr->gr_gid) {
+            daemon_log(LOG_ERR, "Failed to create runtime directory "AVAHI_IPDATA_DIR".");
+            return -1;
+        }
+    }
+
+#ifdef HAVE_CHROOT
+
+    if (!no_chroot) {
+        if (chroot(AVAHI_IPDATA_DIR) < 0) {
+            daemon_log(LOG_ERR, "Failed to chroot(): %s", strerror(errno));
+            return -1;
+        }
+
+        daemon_log(LOG_INFO, "Successfully called chroot().");
+        chdir("/");
+
+        /* Since we are now trapped inside a chroot we cannot remove
+         * the pid file anymore, the helper process will do that for us. */
+        wrote_pid_file = 0;
+    }
+
+#endif
+
+    if (!no_drop_root) {
+
+        if (initgroups(AVAHI_AUTOIPD_USER, gr->gr_gid) != 0) {
+            daemon_log(LOG_ERR, "Failed to change group list: %s", strerror(errno));
+            return -1;
+        }
+
+#if defined(HAVE_SETRESGID)
+        r = setresgid(gr->gr_gid, gr->gr_gid, gr->gr_gid);
+#elif defined(HAVE_SETEGID)
+        if ((r = setgid(gr->gr_gid)) >= 0)
+            r = setegid(gr->gr_gid);
+#elif defined(HAVE_SETREGID)
+        r = setregid(gr->gr_gid, gr->gr_gid);
+#else
+#error "No API to drop privileges"
+#endif
+
+        if (r < 0) {
+            daemon_log(LOG_ERR, "Failed to change GID: %s", strerror(errno));
+            return -1;
+        }
+
+#if defined(HAVE_SETRESUID)
+        r = setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid);
+#elif defined(HAVE_SETEUID)
+        if ((r = setuid(pw->pw_uid)) >= 0)
+            r = seteuid(pw->pw_uid);
+#elif defined(HAVE_SETREUID)
+        r = setreuid(pw->pw_uid, pw->pw_uid);
+#else
+#error "No API to drop privileges"
+#endif
+
+        if (r < 0) {
+            daemon_log(LOG_ERR, "Failed to change UID: %s", strerror(errno));
+            return -1;
+        }
+
+        set_env("USER", pw->pw_name);
+        set_env("LOGNAME", pw->pw_name);
+        set_env("HOME", pw->pw_dir);
+
+        daemon_log(LOG_INFO, "Successfully dropped root privileges.");
+    }
+
+    return 0;
+}
+
+static int loop(int iface, uint32_t addr) {
+    enum {
+        FD_ARP,
+        FD_IFACE,
+        FD_SIGNAL,
+        FD_MAX
+    };
+
+    int fd = -1, ret = -1;
+    struct timeval next_wakeup;
+    int next_wakeup_valid = 0;
+    char buf[64];
+    ArpPacket *in_packet = NULL;
+    size_t in_packet_len = 0;
+    ArpPacket *out_packet = NULL;
+    size_t out_packet_len;
+    uint8_t hw_address[ETHER_ADDRLEN];
+    struct pollfd pollfds[FD_MAX];
+    int iface_fd = -1;
+    Event event = EVENT_NULL;
+    int retval_sent = !daemonize;
+    State st;
+    FILE *dispatcher = NULL;
+    char *address_fn = NULL;
+    const char *p;
+
+    daemon_signal_init(SIGINT, SIGTERM, SIGCHLD, SIGHUP, 0);
+
+    if (!(dispatcher = fork_dispatcher()))
+        goto fail;
+
+    if ((fd = open_socket(iface, hw_address)) < 0)
+        goto fail;
+
+    if ((iface_fd = iface_init(iface)) < 0)
+        goto fail;
+
+    if (drop_privs() < 0)
+        goto fail;
+
+    if (force_bind)
+        st = STATE_START;
+    else if (iface_get_initial_state(&st) < 0)
+        goto fail;
+
+#ifdef HAVE_CHROOT
+    if (!no_chroot)
+        p = "";
+    else
+#endif
+        p = AVAHI_IPDATA_DIR;
+
+    address_fn = avahi_strdup_printf(
+            "%s/%02x:%02x:%02x:%02x:%02x:%02x", p,
+            hw_address[0], hw_address[1],
+            hw_address[2], hw_address[3],
+            hw_address[4], hw_address[5]);
+
+    if (!addr)
+        load_address(address_fn, &addr);
+
+    if (addr && !is_ll_address(addr)) {
+        daemon_log(LOG_WARNING, "Requested address %s is not from IPv4LL range 169.254/16 or a reserved address, ignoring.", inet_ntop(AF_INET, &addr, buf, sizeof(buf)));
+        addr = 0;
+    }
+
+    if (!addr) {
+        int i;
+        uint32_t a = 1;
+
+        for (i = 0; i < ETHER_ADDRLEN; i++)
+            a += hw_address[i]*i;
+
+        a = (a % 0xFE00) + 0x0100;
+
+        addr = htonl(IPV4LL_NETWORK | (uint32_t) a);
+    }
+
+    assert(is_ll_address(addr));
+
+    set_state(st, 1, addr);
+
+    daemon_log(LOG_INFO, "Starting with address %s", inet_ntop(AF_INET, &addr, buf, sizeof(buf)));
+
+    if (state == STATE_SLEEPING)
+        daemon_log(LOG_INFO, "Routable address already assigned, sleeping.");
+
+    if (!retval_sent && (!wait_for_address || state == STATE_SLEEPING)) {
+        daemon_retval_send(0);
+        retval_sent = 1;
+    }
+
+    memset(pollfds, 0, sizeof(pollfds));
+    pollfds[FD_ARP].fd = fd;
+    pollfds[FD_ARP].events = POLLIN;
+    pollfds[FD_IFACE].fd = iface_fd;
+    pollfds[FD_IFACE].events = POLLIN;
+    pollfds[FD_SIGNAL].fd = daemon_signal_fd();
+    pollfds[FD_SIGNAL].events = POLLIN;
+
+    for (;;) {
+        int r, timeout;
+        AvahiUsec usec;
+
+        if (state == STATE_START) {
+
+            /* First, wait a random time */
+            set_state(STATE_WAITING_PROBE, 1, addr);
+
+            elapse_time(&next_wakeup, 0, PROBE_WAIT*1000);
+            next_wakeup_valid = 1;
+
+        } else if ((state == STATE_WAITING_PROBE && event == EVENT_TIMEOUT) ||
+                   (state == STATE_PROBING && event == EVENT_TIMEOUT && n_iteration < PROBE_NUM-2)) {
+
+            /* Send a probe */
+            out_packet = packet_new_probe(addr, hw_address, &out_packet_len);
+            set_state(STATE_PROBING, 0, addr);
+
+            elapse_time(&next_wakeup, PROBE_MIN*1000, (PROBE_MAX-PROBE_MIN)*1000);
+            next_wakeup_valid = 1;
+
+        } else if (state == STATE_PROBING && event == EVENT_TIMEOUT && n_iteration >= PROBE_NUM-2) {
+
+            /* Send the last probe */
+            out_packet = packet_new_probe(addr, hw_address, &out_packet_len);
+            set_state(STATE_WAITING_ANNOUNCE, 1, addr);
+
+            elapse_time(&next_wakeup, ANNOUNCE_WAIT*1000, 0);
+            next_wakeup_valid = 1;
+
+        } else if ((state == STATE_WAITING_ANNOUNCE && event == EVENT_TIMEOUT) ||
+                   (state == STATE_ANNOUNCING && event == EVENT_TIMEOUT && n_iteration < ANNOUNCE_NUM-1)) {
+
+            /* Send announcement packet */
+            out_packet = packet_new_announcement(addr, hw_address, &out_packet_len);
+            set_state(STATE_ANNOUNCING, 0, addr);
+
+            elapse_time(&next_wakeup, ANNOUNCE_INTERVAL*1000, 0);
+            next_wakeup_valid = 1;
+
+            if (n_iteration == 0) {
+                if (do_callout(dispatcher, CALLOUT_BIND, iface, addr) < 0)
+                    goto fail;
+
+                n_conflict = 0;
+            }
+
+        } else if ((state == STATE_ANNOUNCING && event == EVENT_TIMEOUT && n_iteration >= ANNOUNCE_NUM-1)) {
+
+            daemon_log(LOG_INFO, "Successfully claimed IP address %s", inet_ntop(AF_INET, &addr, buf, sizeof(buf)));
+            set_state(STATE_RUNNING, 0, addr);
+
+            next_wakeup_valid = 0;
+
+            save_address(address_fn, addr);
+
+            if (!retval_sent) {
+                daemon_retval_send(0);
+                retval_sent = 1;
+            }
+
+        } else if (event == EVENT_PACKET) {
+            ArpPacketInfo info;
+
+            assert(in_packet);
+
+            if (packet_parse(in_packet, in_packet_len, &info) < 0)
+                daemon_log(LOG_WARNING, "Failed to parse incoming ARP packet.");
+            else {
+                int conflict = 0;
+
+                if (info.sender_ip_address == addr) {
+
+                    if (memcmp(hw_address, info.sender_hw_address, ETHER_ADDRLEN)) {
+                        /* Normal conflict */
+                        conflict = 1;
+                        daemon_log(LOG_INFO, "Received conflicting normal ARP packet.");
+                    } else
+                        daemon_log(LOG_DEBUG, "Received ARP packet back on source interface. Ignoring.");
+
+                } else if (state == STATE_WAITING_PROBE || state == STATE_PROBING || state == STATE_WAITING_ANNOUNCE) {
+                    /* Probe conflict */
+                    conflict = info.target_ip_address == addr && memcmp(hw_address, info.sender_hw_address, ETHER_ADDRLEN);
+
+                    if (conflict)
+                        daemon_log(LOG_INFO, "Received conflicting probe ARP packet.");
+                }
+
+                if (conflict) {
+
+                    if (state == STATE_RUNNING || state == STATE_ANNOUNCING)
+                        if (do_callout(dispatcher, CALLOUT_CONFLICT, iface, addr) < 0)
+                            goto fail;
+
+                    /* Pick a new address */
+                    addr = pick_addr(addr);
+
+                    daemon_log(LOG_INFO, "Trying address %s", inet_ntop(AF_INET, &addr, buf, sizeof(buf)));
+
+                    n_conflict++;
+
+                    set_state(STATE_WAITING_PROBE, 1, addr);
+
+                    if (n_conflict >= MAX_CONFLICTS) {
+                        daemon_log(LOG_WARNING, "Got too many conflicts, rate limiting new probes.");
+                        elapse_time(&next_wakeup, RATE_LIMIT_INTERVAL*1000, PROBE_WAIT*1000);
+                    } else
+                        elapse_time(&next_wakeup, 0, PROBE_WAIT*1000);
+
+                    next_wakeup_valid = 1;
+                } else
+                    DEBUG(daemon_log(LOG_DEBUG, "Ignoring irrelevant ARP packet."));
+            }
+
+        } else if (event == EVENT_ROUTABLE_ADDR_CONFIGURED && !force_bind) {
+
+            daemon_log(LOG_INFO, "A routable address has been configured.");
+
+            if (state == STATE_RUNNING || state == STATE_ANNOUNCING)
+                if (do_callout(dispatcher, CALLOUT_UNBIND, iface, addr) < 0)
+                    goto fail;
+
+            if (!retval_sent) {
+                daemon_retval_send(0);
+                retval_sent = 1;
+            }
+
+            set_state(STATE_SLEEPING, 1, addr);
+            next_wakeup_valid = 0;
+
+        } else if (event == EVENT_ROUTABLE_ADDR_UNCONFIGURED && state == STATE_SLEEPING && !force_bind) {
+
+            daemon_log(LOG_INFO, "No longer a routable address configured, restarting probe process.");
+
+            set_state(STATE_WAITING_PROBE, 1, addr);
+
+            elapse_time(&next_wakeup, 0, PROBE_WAIT*1000);
+            next_wakeup_valid = 1;
+
+        } else if (event == EVENT_REFRESH_REQUEST && state == STATE_RUNNING) {
+
+            /* The user requested a reannouncing of the address by a SIGHUP */
+            daemon_log(LOG_INFO, "Reannouncing address.");
+
+            /* Send announcement packet */
+            out_packet = packet_new_announcement(addr, hw_address, &out_packet_len);
+            set_state(STATE_ANNOUNCING, 1, addr);
+
+            elapse_time(&next_wakeup, ANNOUNCE_INTERVAL*1000, 0);
+            next_wakeup_valid = 1;
+        }
+
+        if (out_packet) {
+            DEBUG(daemon_log(LOG_DEBUG, "sending..."));
+
+            if (send_packet(fd, iface, out_packet, out_packet_len) < 0)
+                goto fail;
+
+            avahi_free(out_packet);
+            out_packet = NULL;
+        }
+
+        if (in_packet) {
+            avahi_free(in_packet);
+            in_packet = NULL;
+        }
+
+        event = EVENT_NULL;
+        timeout = -1;
+
+        if (next_wakeup_valid) {
+            usec = avahi_age(&next_wakeup);
+            timeout = usec < 0 ? (int) (-usec/1000) : 0;
+        }
+
+        DEBUG(daemon_log(LOG_DEBUG, "sleeping %ims", timeout));
+
+        while ((r = poll(pollfds, FD_MAX, timeout)) < 0 && errno == EINTR)
+            ;
+
+        if (r < 0) {
+            daemon_log(LOG_ERR, "poll() failed: %s", strerror(r));
+            goto fail;
+        } else if (r == 0) {
+            event = EVENT_TIMEOUT;
+            next_wakeup_valid = 0;
+        } else {
+
+
+            if (pollfds[FD_ARP].revents) {
+
+                if (pollfds[FD_ARP].revents == POLLERR) {
+                    /* The interface is probably down, let's recreate our socket */
+
+                    close_socket(fd);
+
+                    if ((fd = open_socket(iface, hw_address)) < 0)
+                        goto fail;
+
+                    pollfds[FD_ARP].fd = fd;
+
+                } else {
+
+                    assert(pollfds[FD_ARP].revents == POLLIN);
+
+                    if (recv_packet(fd, &in_packet, &in_packet_len) < 0)
+                        goto fail;
+
+                    if (in_packet)
+                        event = EVENT_PACKET;
+                }
+            }
+
+            if (event == EVENT_NULL &&
+                pollfds[FD_IFACE].revents) {
+
+                assert(pollfds[FD_IFACE].revents == POLLIN);
+
+                if (iface_process(&event) < 0)
+                    goto fail;
+            }
+
+            if (event == EVENT_NULL &&
+                pollfds[FD_SIGNAL].revents) {
+
+                int sig;
+                assert(pollfds[FD_SIGNAL].revents == POLLIN);
+
+                if ((sig = daemon_signal_next()) <= 0) {
+                    daemon_log(LOG_ERR, "daemon_signal_next() failed");
+                    goto fail;
+                }
+
+                switch(sig) {
+                    case SIGINT:
+                    case SIGTERM:
+                        daemon_log(LOG_INFO, "Got %s, quitting.", sig == SIGINT ? "SIGINT" : "SIGTERM");
+                        ret = 0;
+                        goto fail;
+
+                    case SIGCHLD:
+                        waitpid(-1, NULL, WNOHANG);
+                        break;
+
+                    case SIGHUP:
+                        event = EVENT_REFRESH_REQUEST;
+                        break;
+                }
+
+            }
+        }
+    }
+
+    ret = 0;
+
+fail:
+
+    if (state == STATE_RUNNING || state == STATE_ANNOUNCING)
+        do_callout(dispatcher, CALLOUT_STOP, iface, addr);
+
+    avahi_free(out_packet);
+    avahi_free(in_packet);
+
+    if (fd >= 0)
+        close_socket(fd);
+
+    if (iface_fd >= 0)
+        iface_done();
+
+    if (daemonize && !retval_sent)
+        daemon_retval_send(ret);
+
+    if (dispatcher)
+        fclose(dispatcher);
+
+    if (address_fn)
+        avahi_free(address_fn);
+
+    return ret;
+}
+
+
+static void help(FILE *f, const char *a0) {
+    fprintf(f,
+            "%s [options] INTERFACE\n"
+            "    -h --help           Show this help\n"
+            "    -D --daemonize      Daemonize after startup\n"
+            "    -s --syslog         Write log messages to syslog(3) instead of STDERR\n"
+            "    -k --kill           Kill a running daemon\n"
+            "    -r --refresh        Request a running daemon refresh its IP address\n"
+            "    -c --check          Return 0 if a daemon is already running\n"
+            "    -V --version        Show version\n"
+            "    -S --start=ADDRESS  Start with this address from the IPv4LL range\n"
+            "                        169.254.0.0/16\n"
+            "    -t --script=script  Action script to run (defaults to\n"
+            "                        "AVAHI_IPCONF_SCRIPT")\n"
+            "    -w --wait           Wait until an address has been acquired before\n"
+            "                        daemonizing\n"
+            "       --force-bind     Assign an IPv4LL address even if a routable address\n"
+            "                        is already assigned\n"
+            "       --no-drop-root   Don't drop privileges\n"
+#ifdef HAVE_CHROOT
+            "       --no-chroot      Don't chroot()\n"
+#endif
+            "       --no-proc-title  Don't modify process title\n"
+            "       --debug          Increase verbosity\n",
+            a0);
+}
+
+static int parse_command_line(int argc, char *argv[]) {
+    int c;
+
+    enum {
+        OPTION_NO_PROC_TITLE = 256,
+        OPTION_FORCE_BIND,
+        OPTION_DEBUG,
+        OPTION_NO_DROP_ROOT,
+#ifdef HAVE_CHROOT
+        OPTION_NO_CHROOT
+#endif
+    };
+
+    static const struct option long_options[] = {
+        { "help",          no_argument,       NULL, 'h' },
+        { "daemonize",     no_argument,       NULL, 'D' },
+        { "syslog",        no_argument,       NULL, 's' },
+        { "kill",          no_argument,       NULL, 'k' },
+        { "refresh",       no_argument,       NULL, 'r' },
+        { "check",         no_argument,       NULL, 'c' },
+        { "version",       no_argument,       NULL, 'V' },
+        { "start",         required_argument, NULL, 'S' },
+        { "script",        required_argument, NULL, 't' },
+        { "wait",          no_argument,       NULL, 'w' },
+        { "force-bind",    no_argument,       NULL, OPTION_FORCE_BIND },
+        { "no-drop-root",  no_argument,       NULL, OPTION_NO_DROP_ROOT },
+#ifdef HAVE_CHROOT
+        { "no-chroot",     no_argument,       NULL, OPTION_NO_CHROOT },
+#endif
+        { "no-proc-title", no_argument,       NULL, OPTION_NO_PROC_TITLE },
+        { "debug",         no_argument,       NULL, OPTION_DEBUG },
+        { NULL, 0, NULL, 0 }
+    };
+
+    while ((c = getopt_long(argc, argv, "hDskrcVS:t:w", long_options, NULL)) >= 0) {
+
+        switch(c) {
+            case 's':
+                use_syslog = 1;
+                break;
+            case 'h':
+                command = DAEMON_HELP;
+                break;
+            case 'D':
+                daemonize = 1;
+                break;
+            case 'k':
+                command = DAEMON_KILL;
+                break;
+            case 'V':
+                command = DAEMON_VERSION;
+                break;
+            case 'r':
+                command = DAEMON_REFRESH;
+                break;
+            case 'c':
+                command = DAEMON_CHECK;
+                break;
+            case 'S':
+
+                if ((start_address = inet_addr(optarg)) == (uint32_t) -1) {
+                    fprintf(stderr, "Failed to parse IP address '%s'.", optarg);
+                    return -1;
+                }
+                break;
+            case 't':
+                avahi_free(action_script);
+                action_script = avahi_strdup(optarg);
+                break;
+            case 'w':
+                wait_for_address = 1;
+                break;
+
+            case OPTION_NO_PROC_TITLE:
+                modify_proc_title = 0;
+                break;
+
+            case OPTION_DEBUG:
+                debug = 1;
+                break;
+
+            case OPTION_FORCE_BIND:
+                force_bind = 1;
+                break;
+
+            case OPTION_NO_DROP_ROOT:
+                no_drop_root = 1;
+                break;
+
+#ifdef HAVE_CHROOT
+            case OPTION_NO_CHROOT:
+                no_chroot = 1;
+                break;
+#endif
+
+            default:
+                return -1;
+        }
+    }
+
+    if (command == DAEMON_RUN ||
+        command == DAEMON_KILL ||
+        command == DAEMON_REFRESH ||
+        command == DAEMON_CHECK) {
+
+        if (optind >= argc) {
+            fprintf(stderr, "Missing interface name.\n");
+            return -1;
+        }
+
+        interface_name = avahi_strdup(argv[optind++]);
+    }
+
+    if (optind != argc) {
+        fprintf(stderr, "Too many arguments\n");
+        return -1;
+    }
+
+    if (!action_script)
+        action_script = avahi_strdup(AVAHI_IPCONF_SCRIPT);
+
+    return 0;
+}
+
+static const char* pid_file_proc(void) {
+    return pid_file_name;
+}
+
+int main(int argc, char*argv[]) {
+    int r = 1;
+    char *log_ident = NULL;
+
+    signal(SIGPIPE, SIG_IGN);
+
+    if ((argv0 = strrchr(argv[0], '/')))
+        argv0 = avahi_strdup(argv0 + 1);
+    else
+        argv0 = avahi_strdup(argv[0]);
+
+    daemon_log_ident = argv0;
+
+    if (parse_command_line(argc, argv) < 0)
+        goto finish;
+
+    if (modify_proc_title)
+        avahi_init_proc_title(argc, argv);
+
+    daemon_log_ident = log_ident = avahi_strdup_printf("%s(%s)", argv0, interface_name);
+    daemon_pid_file_proc = pid_file_proc;
+    pid_file_name = avahi_strdup_printf(AVAHI_RUNTIME_DIR"/avahi-autoipd.%s.pid", interface_name);
+
+    if (command == DAEMON_RUN) {
+        pid_t pid;
+        int ifindex;
+
+        init_rand_seed();
+
+        if ((ifindex = if_nametoindex(interface_name)) <= 0) {
+            daemon_log(LOG_ERR, "Failed to get index for interface name '%s': %s", interface_name, strerror(errno));
+            goto finish;
+        }
+
+        if (getuid() != 0) {
+            daemon_log(LOG_ERR, "This program is intended to be run as root.");
+            goto finish;
+        }
+
+        if ((pid = daemon_pid_file_is_running()) >= 0) {
+            daemon_log(LOG_ERR, "Daemon already running on PID %u", pid);
+            goto finish;
+        }
+
+        if (daemonize) {
+            daemon_retval_init();
+
+            if ((pid = daemon_fork()) < 0)
+                goto finish;
+            else if (pid != 0) {
+                int ret;
+                /** Parent **/
+
+                if ((ret = daemon_retval_wait(20)) < 0) {
+                    daemon_log(LOG_ERR, "Could not receive return value from daemon process.");
+                    goto finish;
+                }
+
+                r = ret;
+                goto finish;
+            }
+
+            /* Child */
+        }
+
+        if (use_syslog || daemonize)
+            daemon_log_use = DAEMON_LOG_SYSLOG;
+
+        chdir("/");
+
+        if (daemon_pid_file_create() < 0) {
+            daemon_log(LOG_ERR, "Failed to create PID file: %s", strerror(errno));
+
+            if (daemonize)
+                daemon_retval_send(1);
+            goto finish;
+        } else
+            wrote_pid_file = 1;
+
+        avahi_set_proc_title(argv0, "%s: [%s] starting up", argv0, interface_name);
+
+        if (loop(ifindex, start_address) < 0)
+            goto finish;
+
+        r = 0;
+    } else if (command == DAEMON_HELP) {
+        help(stdout, argv0);
+
+        r = 0;
+    } else if (command == DAEMON_VERSION) {
+        printf("%s "PACKAGE_VERSION"\n", argv0);
+
+        r = 0;
+    } else if (command == DAEMON_KILL) {
+        if (daemon_pid_file_kill_wait(SIGTERM, 5) < 0) {
+            daemon_log(LOG_WARNING, "Failed to kill daemon: %s", strerror(errno));
+            goto finish;
+        }
+
+        r = 0;
+    } else if (command == DAEMON_REFRESH) {
+        if (daemon_pid_file_kill(SIGHUP) < 0) {
+            daemon_log(LOG_WARNING, "Failed to kill daemon: %s", strerror(errno));
+            goto finish;
+        }
+
+        r = 0;
+    } else if (command == DAEMON_CHECK)
+        r = (daemon_pid_file_is_running() >= 0) ? 0 : 1;
+
+
+finish:
+
+    if (daemonize)
+        daemon_retval_done();
+
+    if (wrote_pid_file)
+        daemon_pid_file_remove();
+
+    avahi_free(log_ident);
+    avahi_free(pid_file_name);
+    avahi_free(argv0);
+    avahi_free(interface_name);
+    avahi_free(action_script);
+
+    return r;
+}
diff --git a/avahi-0.6.31/avahi-autoipd/main.h b/avahi-0.6.31/avahi-autoipd/main.h
new file mode 100644
index 0000000..cc02df7
--- /dev/null
+++ b/avahi-0.6.31/avahi-autoipd/main.h
@@ -0,0 +1,45 @@
+#ifndef fooavahimainhfoo
+#define fooavahimainhfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+typedef enum Event {
+    EVENT_NULL,
+    EVENT_PACKET,
+    EVENT_TIMEOUT,
+    EVENT_ROUTABLE_ADDR_CONFIGURED,
+    EVENT_ROUTABLE_ADDR_UNCONFIGURED,
+    EVENT_REFRESH_REQUEST
+} Event;
+
+typedef enum State {
+    STATE_START,
+    STATE_WAITING_PROBE,
+    STATE_PROBING,
+    STATE_WAITING_ANNOUNCE,
+    STATE_ANNOUNCING,
+    STATE_RUNNING,
+    STATE_SLEEPING,
+    STATE_MAX
+} State;
+
+int is_ll_address(uint32_t addr);
+
+#endif
diff --git a/avahi-0.6.31/avahi-client.pc.in b/avahi-0.6.31/avahi-client.pc.in
new file mode 100644
index 0000000..65ee8d8
--- /dev/null
+++ b/avahi-0.6.31/avahi-client.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=${prefix}
+libdir=@libdir@
+includedir=${prefix}/include
+
+Name: avahi-client
+Description: Avahi Multicast DNS Responder (Client Support)
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir} -lavahi-common -lavahi-client
+Cflags: -D_REENTRANT -I${includedir}
diff --git a/avahi-0.6.31/avahi-client/Makefile.am b/avahi-0.6.31/avahi-client/Makefile.am
new file mode 100644
index 0000000..f11b11d
--- /dev/null
+++ b/avahi-0.6.31/avahi-client/Makefile.am
@@ -0,0 +1,83 @@
+# This file is part of avahi.
+#
+# avahi 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 of the
+# License, or (at your option) any later version.
+#
+# avahi 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 General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+AM_CFLAGS=-I$(top_srcdir)
+
+# This cool debug trap works on i386/gcc only
+AM_CFLAGS+='-DDEBUG_TRAP=__asm__("int $$3")'
+
+if HAVE_DBUS
+
+avahi_clientincludedir=$(includedir)/avahi-client
+avahi_clientinclude_HEADERS = client.h lookup.h publish.h
+
+noinst_HEADERS = internal.h
+
+if ENABLE_TESTS
+
+noinst_PROGRAMS = \
+	client-test \
+	srv-test \
+	xdg-config-test \
+	rr-test \
+	check-nss-test
+
+endif
+
+lib_LTLIBRARIES = libavahi-client.la
+
+libavahi_client_la_SOURCES = \
+	client.c client.h \
+	entrygroup.c \
+	browser.c \
+	resolver.c \
+	publish.h lookup.h \
+	xdg-config.c xdg-config.h \
+	check-nss.c \
+	../avahi-common/dbus.c ../avahi-common/dbus.h \
+	../avahi-common/dbus-watch-glue.c ../avahi-common/dbus-watch-glue.h
+
+libavahi_client_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS) -DDBUS_SYSTEM_BUS_DEFAULT_ADDRESS=\"$(DBUS_SYSTEM_BUS_DEFAULT_ADDRESS)\"
+libavahi_client_la_LIBADD = $(AM_LDADD) $(DBUS_LIBS) ../avahi-common/libavahi-common.la
+libavahi_client_la_LDFLAGS = $(AM_LDFLAGS)  -version-info $(LIBAVAHI_CLIENT_VERSION_INFO)
+
+client_test_SOURCES = client-test.c
+client_test_CFLAGS = $(AM_CFLAGS)
+client_test_LDADD = $(AM_LDADD) libavahi-client.la ../avahi-common/libavahi-common.la
+
+srv_test_SOURCES = srv-test.c
+srv_test_CFLAGS = $(AM_CFLAGS)
+srv_test_LDADD = $(AM_LDADD) libavahi-client.la ../avahi-common/libavahi-common.la
+
+rr_test_SOURCES = rr-test.c
+rr_test_CFLAGS = $(AM_CFLAGS)
+rr_test_LDADD = $(AM_LDADD) libavahi-client.la ../avahi-common/libavahi-common.la
+
+xdg_config_test_SOURCES = xdg-config-test.c xdg-config.c xdg-config.h
+xdg_config_test_CFLAGS = $(AM_CFLAGS)
+xdg_config_test_LDADD = $(AM_LDADD)
+
+check_nss_test_SOURCES = check-nss.c check-nss-test.c client.h
+check_nss_test_CFLAGS = $(AM_CFLAGS)
+check_nss_test_LDADD = $(AM_LDADD)
+
+if HAVE_DLOPEN
+check_nss_test_LDADD += -ldl
+libavahi_client_la_LIBADD += -ldl
+endif
+
+endif
diff --git a/avahi-0.6.31/avahi-client/Makefile.in b/avahi-0.6.31/avahi-client/Makefile.in
new file mode 100644
index 0000000..62e8340
--- /dev/null
+++ b/avahi-0.6.31/avahi-client/Makefile.in
@@ -0,0 +1,1041 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# This file is part of avahi.
+#
+# avahi 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 of the
+# License, or (at your option) any later version.
+#
+# avahi 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 General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@ENABLE_TESTS_TRUE@@HAVE_DBUS_TRUE@noinst_PROGRAMS =  \
+@ENABLE_TESTS_TRUE@@HAVE_DBUS_TRUE@	client-test$(EXEEXT) \
+@ENABLE_TESTS_TRUE@@HAVE_DBUS_TRUE@	srv-test$(EXEEXT) \
+@ENABLE_TESTS_TRUE@@HAVE_DBUS_TRUE@	xdg-config-test$(EXEEXT) \
+@ENABLE_TESTS_TRUE@@HAVE_DBUS_TRUE@	rr-test$(EXEEXT) \
+@ENABLE_TESTS_TRUE@@HAVE_DBUS_TRUE@	check-nss-test$(EXEEXT)
+@HAVE_DBUS_TRUE@@HAVE_DLOPEN_TRUE@am__append_1 = -ldl
+@HAVE_DBUS_TRUE@@HAVE_DLOPEN_TRUE@am__append_2 = -ldl
+subdir = avahi-client
+DIST_COMMON = $(am__avahi_clientinclude_HEADERS_DIST) \
+	$(am__noinst_HEADERS_DIST) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/common/acx_pthread.m4 \
+	$(top_srcdir)/common/gcc_stack_protect.m4 \
+	$(top_srcdir)/common/gcc_visibility.m4 \
+	$(top_srcdir)/common/intltool.m4 \
+	$(top_srcdir)/common/introspection.m4 \
+	$(top_srcdir)/common/libtool.m4 \
+	$(top_srcdir)/common/ltoptions.m4 \
+	$(top_srcdir)/common/ltsugar.m4 \
+	$(top_srcdir)/common/ltversion.m4 \
+	$(top_srcdir)/common/lt~obsolete.m4 \
+	$(top_srcdir)/common/nls.m4 $(top_srcdir)/common/python.m4 \
+	$(top_srcdir)/acinclude.m4 $(top_srcdir)/common/doxygen.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+am__installdirs = "$(DESTDIR)$(libdir)" \
+	"$(DESTDIR)$(avahi_clientincludedir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+@HAVE_DBUS_TRUE@libavahi_client_la_DEPENDENCIES =  \
+@HAVE_DBUS_TRUE@	$(am__DEPENDENCIES_1) \
+@HAVE_DBUS_TRUE@	../avahi-common/libavahi-common.la \
+@HAVE_DBUS_TRUE@	$(am__DEPENDENCIES_1)
+am__libavahi_client_la_SOURCES_DIST = client.c client.h entrygroup.c \
+	browser.c resolver.c publish.h lookup.h xdg-config.c \
+	xdg-config.h check-nss.c ../avahi-common/dbus.c \
+	../avahi-common/dbus.h ../avahi-common/dbus-watch-glue.c \
+	../avahi-common/dbus-watch-glue.h
+@HAVE_DBUS_TRUE@am_libavahi_client_la_OBJECTS =  \
+@HAVE_DBUS_TRUE@	libavahi_client_la-client.lo \
+@HAVE_DBUS_TRUE@	libavahi_client_la-entrygroup.lo \
+@HAVE_DBUS_TRUE@	libavahi_client_la-browser.lo \
+@HAVE_DBUS_TRUE@	libavahi_client_la-resolver.lo \
+@HAVE_DBUS_TRUE@	libavahi_client_la-xdg-config.lo \
+@HAVE_DBUS_TRUE@	libavahi_client_la-check-nss.lo \
+@HAVE_DBUS_TRUE@	libavahi_client_la-dbus.lo \
+@HAVE_DBUS_TRUE@	libavahi_client_la-dbus-watch-glue.lo
+libavahi_client_la_OBJECTS = $(am_libavahi_client_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+libavahi_client_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(libavahi_client_la_CFLAGS) $(CFLAGS) \
+	$(libavahi_client_la_LDFLAGS) $(LDFLAGS) -o $@
+@HAVE_DBUS_TRUE@am_libavahi_client_la_rpath = -rpath $(libdir)
+PROGRAMS = $(noinst_PROGRAMS)
+am__check_nss_test_SOURCES_DIST = check-nss.c check-nss-test.c \
+	client.h
+@HAVE_DBUS_TRUE@am_check_nss_test_OBJECTS =  \
+@HAVE_DBUS_TRUE@	check_nss_test-check-nss.$(OBJEXT) \
+@HAVE_DBUS_TRUE@	check_nss_test-check-nss-test.$(OBJEXT)
+check_nss_test_OBJECTS = $(am_check_nss_test_OBJECTS)
+@HAVE_DBUS_TRUE@check_nss_test_DEPENDENCIES = $(am__DEPENDENCIES_1)
+check_nss_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(check_nss_test_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \
+	$@
+am__client_test_SOURCES_DIST = client-test.c
+@HAVE_DBUS_TRUE@am_client_test_OBJECTS =  \
+@HAVE_DBUS_TRUE@	client_test-client-test.$(OBJEXT)
+client_test_OBJECTS = $(am_client_test_OBJECTS)
+@HAVE_DBUS_TRUE@client_test_DEPENDENCIES = libavahi-client.la \
+@HAVE_DBUS_TRUE@	../avahi-common/libavahi-common.la
+client_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(client_test_CFLAGS) \
+	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am__rr_test_SOURCES_DIST = rr-test.c
+@HAVE_DBUS_TRUE@am_rr_test_OBJECTS = rr_test-rr-test.$(OBJEXT)
+rr_test_OBJECTS = $(am_rr_test_OBJECTS)
+@HAVE_DBUS_TRUE@rr_test_DEPENDENCIES = libavahi-client.la \
+@HAVE_DBUS_TRUE@	../avahi-common/libavahi-common.la
+rr_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(rr_test_CFLAGS) \
+	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am__srv_test_SOURCES_DIST = srv-test.c
+@HAVE_DBUS_TRUE@am_srv_test_OBJECTS = srv_test-srv-test.$(OBJEXT)
+srv_test_OBJECTS = $(am_srv_test_OBJECTS)
+@HAVE_DBUS_TRUE@srv_test_DEPENDENCIES = libavahi-client.la \
+@HAVE_DBUS_TRUE@	../avahi-common/libavahi-common.la
+srv_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(srv_test_CFLAGS) \
+	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am__xdg_config_test_SOURCES_DIST = xdg-config-test.c xdg-config.c \
+	xdg-config.h
+@HAVE_DBUS_TRUE@am_xdg_config_test_OBJECTS =  \
+@HAVE_DBUS_TRUE@	xdg_config_test-xdg-config-test.$(OBJEXT) \
+@HAVE_DBUS_TRUE@	xdg_config_test-xdg-config.$(OBJEXT)
+xdg_config_test_OBJECTS = $(am_xdg_config_test_OBJECTS)
+xdg_config_test_DEPENDENCIES =
+xdg_config_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(xdg_config_test_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+	-o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC    " $@;
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(libavahi_client_la_SOURCES) $(check_nss_test_SOURCES) \
+	$(client_test_SOURCES) $(rr_test_SOURCES) $(srv_test_SOURCES) \
+	$(xdg_config_test_SOURCES)
+DIST_SOURCES = $(am__libavahi_client_la_SOURCES_DIST) \
+	$(am__check_nss_test_SOURCES_DIST) \
+	$(am__client_test_SOURCES_DIST) $(am__rr_test_SOURCES_DIST) \
+	$(am__srv_test_SOURCES_DIST) \
+	$(am__xdg_config_test_SOURCES_DIST)
+am__avahi_clientinclude_HEADERS_DIST = client.h lookup.h publish.h
+am__noinst_HEADERS_DIST = internal.h
+HEADERS = $(avahi_clientinclude_HEADERS) $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AVAHI_AUTOIPD_GROUP = @AVAHI_AUTOIPD_GROUP@
+AVAHI_AUTOIPD_USER = @AVAHI_AUTOIPD_USER@
+AVAHI_GROUP = @AVAHI_GROUP@
+AVAHI_PRIV_ACCESS_GROUP = @AVAHI_PRIV_ACCESS_GROUP@
+AVAHI_USER = @AVAHI_USER@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
+DBUS_SYSTEM_BUS_DEFAULT_ADDRESS = @DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@
+DBUS_SYS_DIR = @DBUS_SYS_DIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+DX_CONFIG = @DX_CONFIG@
+DX_DOCDIR = @DX_DOCDIR@
+DX_DOT = @DX_DOT@
+DX_DOXYGEN = @DX_DOXYGEN@
+DX_DVIPS = @DX_DVIPS@
+DX_EGREP = @DX_EGREP@
+DX_ENV = @DX_ENV@
+DX_FLAG_chi = @DX_FLAG_chi@
+DX_FLAG_chm = @DX_FLAG_chm@
+DX_FLAG_doc = @DX_FLAG_doc@
+DX_FLAG_dot = @DX_FLAG_dot@
+DX_FLAG_html = @DX_FLAG_html@
+DX_FLAG_man = @DX_FLAG_man@
+DX_FLAG_pdf = @DX_FLAG_pdf@
+DX_FLAG_ps = @DX_FLAG_ps@
+DX_FLAG_rtf = @DX_FLAG_rtf@
+DX_FLAG_xml = @DX_FLAG_xml@
+DX_HHC = @DX_HHC@
+DX_LATEX = @DX_LATEX@
+DX_MAKEINDEX = @DX_MAKEINDEX@
+DX_PDFLATEX = @DX_PDFLATEX@
+DX_PERL = @DX_PERL@
+DX_PROJECT = @DX_PROJECT@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GACUTIL = @GACUTIL@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB20_CFLAGS = @GLIB20_CFLAGS@
+GLIB20_LIBS = @GLIB20_LIBS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GOBJECT_CFLAGS = @GOBJECT_CFLAGS@
+GOBJECT_LIBS = @GOBJECT_LIBS@
+GREP = @GREP@
+GTK20_CFLAGS = @GTK20_CFLAGS@
+GTK20_LIBS = @GTK20_LIBS@
+GTK30_CFLAGS = @GTK30_CFLAGS@
+GTK30_LIBS = @GTK30_LIBS@
+HOWL_COMPAT_VERSION = @HOWL_COMPAT_VERSION@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
+INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
+INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
+INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
+INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
+INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
+INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBAVAHI_CLIENT_VERSION_INFO = @LIBAVAHI_CLIENT_VERSION_INFO@
+LIBAVAHI_COMMON_VERSION_INFO = @LIBAVAHI_COMMON_VERSION_INFO@
+LIBAVAHI_COMPAT_HOWL_VERSION_INFO = @LIBAVAHI_COMPAT_HOWL_VERSION_INFO@
+LIBAVAHI_COMPAT_LIBDNS_SD_VERSION_INFO = @LIBAVAHI_COMPAT_LIBDNS_SD_VERSION_INFO@
+LIBAVAHI_CORE_VERSION_INFO = @LIBAVAHI_CORE_VERSION_INFO@
+LIBAVAHI_GLIB_VERSION_INFO = @LIBAVAHI_GLIB_VERSION_INFO@
+LIBAVAHI_GOBJECT_VERSION_INFO = @LIBAVAHI_GOBJECT_VERSION_INFO@
+LIBAVAHI_QT3_VERSION_INFO = @LIBAVAHI_QT3_VERSION_INFO@
+LIBAVAHI_QT4_VERSION_INFO = @LIBAVAHI_QT4_VERSION_INFO@
+LIBAVAHI_UI_VERSION_INFO = @LIBAVAHI_UI_VERSION_INFO@
+LIBDAEMON_CFLAGS = @LIBDAEMON_CFLAGS@
+LIBDAEMON_LIBS = @LIBDAEMON_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MCS = @MCS@
+MDASSEMBLER = @MDASSEMBLER@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MOC_QT3 = @MOC_QT3@
+MOC_QT4 = @MOC_QT4@
+MONODOCER = @MONODOCER@
+MONODOC_CFLAGS = @MONODOC_CFLAGS@
+MONODOC_DIR = @MONODOC_DIR@
+MONODOC_LIBS = @MONODOC_LIBS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+QT3_CFLAGS = @QT3_CFLAGS@
+QT3_LIBS = @QT3_LIBS@
+QT4_CFLAGS = @QT4_CFLAGS@
+QT4_LIBS = @QT4_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STOW = @STOW@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+VISIBILITY_HIDDEN_CFLAGS = @VISIBILITY_HIDDEN_CFLAGS@
+XGETTEXT = @XGETTEXT@
+XML_CFLAGS = @XML_CFLAGS@
+XML_LIBS = @XML_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+avahi_runtime_dir = @avahi_runtime_dir@
+avahi_socket = @avahi_socket@
+avahilocaledir = @avahilocaledir@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+have_pkg_config = @have_pkg_config@
+have_xmltoman = @have_xmltoman@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+interfacesdir = @interfacesdir@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+systemdsystemunitdir = @systemdsystemunitdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# This cool debug trap works on i386/gcc only
+AM_CFLAGS = -I$(top_srcdir) '-DDEBUG_TRAP=__asm__("int $$3")'
+@HAVE_DBUS_TRUE@avahi_clientincludedir = $(includedir)/avahi-client
+@HAVE_DBUS_TRUE@avahi_clientinclude_HEADERS = client.h lookup.h publish.h
+@HAVE_DBUS_TRUE@noinst_HEADERS = internal.h
+@HAVE_DBUS_TRUE@lib_LTLIBRARIES = libavahi-client.la
+@HAVE_DBUS_TRUE@libavahi_client_la_SOURCES = \
+@HAVE_DBUS_TRUE@	client.c client.h \
+@HAVE_DBUS_TRUE@	entrygroup.c \
+@HAVE_DBUS_TRUE@	browser.c \
+@HAVE_DBUS_TRUE@	resolver.c \
+@HAVE_DBUS_TRUE@	publish.h lookup.h \
+@HAVE_DBUS_TRUE@	xdg-config.c xdg-config.h \
+@HAVE_DBUS_TRUE@	check-nss.c \
+@HAVE_DBUS_TRUE@	../avahi-common/dbus.c ../avahi-common/dbus.h \
+@HAVE_DBUS_TRUE@	../avahi-common/dbus-watch-glue.c ../avahi-common/dbus-watch-glue.h
+
+@HAVE_DBUS_TRUE@libavahi_client_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS) -DDBUS_SYSTEM_BUS_DEFAULT_ADDRESS=\"$(DBUS_SYSTEM_BUS_DEFAULT_ADDRESS)\"
+@HAVE_DBUS_TRUE@libavahi_client_la_LIBADD = $(AM_LDADD) $(DBUS_LIBS) \
+@HAVE_DBUS_TRUE@	../avahi-common/libavahi-common.la \
+@HAVE_DBUS_TRUE@	$(am__append_2)
+@HAVE_DBUS_TRUE@libavahi_client_la_LDFLAGS = $(AM_LDFLAGS)  -version-info $(LIBAVAHI_CLIENT_VERSION_INFO)
+@HAVE_DBUS_TRUE@client_test_SOURCES = client-test.c
+@HAVE_DBUS_TRUE@client_test_CFLAGS = $(AM_CFLAGS)
+@HAVE_DBUS_TRUE@client_test_LDADD = $(AM_LDADD) libavahi-client.la ../avahi-common/libavahi-common.la
+@HAVE_DBUS_TRUE@srv_test_SOURCES = srv-test.c
+@HAVE_DBUS_TRUE@srv_test_CFLAGS = $(AM_CFLAGS)
+@HAVE_DBUS_TRUE@srv_test_LDADD = $(AM_LDADD) libavahi-client.la ../avahi-common/libavahi-common.la
+@HAVE_DBUS_TRUE@rr_test_SOURCES = rr-test.c
+@HAVE_DBUS_TRUE@rr_test_CFLAGS = $(AM_CFLAGS)
+@HAVE_DBUS_TRUE@rr_test_LDADD = $(AM_LDADD) libavahi-client.la ../avahi-common/libavahi-common.la
+@HAVE_DBUS_TRUE@xdg_config_test_SOURCES = xdg-config-test.c xdg-config.c xdg-config.h
+@HAVE_DBUS_TRUE@xdg_config_test_CFLAGS = $(AM_CFLAGS)
+@HAVE_DBUS_TRUE@xdg_config_test_LDADD = $(AM_LDADD)
+@HAVE_DBUS_TRUE@check_nss_test_SOURCES = check-nss.c check-nss-test.c client.h
+@HAVE_DBUS_TRUE@check_nss_test_CFLAGS = $(AM_CFLAGS)
+@HAVE_DBUS_TRUE@check_nss_test_LDADD = $(AM_LDADD) $(am__append_1)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign avahi-client/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign avahi-client/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	list2=; for p in $$list; do \
+	  if test -f $$p; then \
+	    list2="$$list2 $$p"; \
+	  else :; fi; \
+	done; \
+	test -z "$$list2" || { \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+	}
+
+uninstall-libLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	for p in $$list; do \
+	  $(am__strip_dir) \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+	done
+
+clean-libLTLIBRARIES:
+	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libavahi-client.la: $(libavahi_client_la_OBJECTS) $(libavahi_client_la_DEPENDENCIES) $(EXTRA_libavahi_client_la_DEPENDENCIES) 
+	$(AM_V_CCLD)$(libavahi_client_la_LINK) $(am_libavahi_client_la_rpath) $(libavahi_client_la_OBJECTS) $(libavahi_client_la_LIBADD) $(LIBS)
+
+clean-noinstPROGRAMS:
+	@list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+check-nss-test$(EXEEXT): $(check_nss_test_OBJECTS) $(check_nss_test_DEPENDENCIES) $(EXTRA_check_nss_test_DEPENDENCIES) 
+	@rm -f check-nss-test$(EXEEXT)
+	$(AM_V_CCLD)$(check_nss_test_LINK) $(check_nss_test_OBJECTS) $(check_nss_test_LDADD) $(LIBS)
+client-test$(EXEEXT): $(client_test_OBJECTS) $(client_test_DEPENDENCIES) $(EXTRA_client_test_DEPENDENCIES) 
+	@rm -f client-test$(EXEEXT)
+	$(AM_V_CCLD)$(client_test_LINK) $(client_test_OBJECTS) $(client_test_LDADD) $(LIBS)
+rr-test$(EXEEXT): $(rr_test_OBJECTS) $(rr_test_DEPENDENCIES) $(EXTRA_rr_test_DEPENDENCIES) 
+	@rm -f rr-test$(EXEEXT)
+	$(AM_V_CCLD)$(rr_test_LINK) $(rr_test_OBJECTS) $(rr_test_LDADD) $(LIBS)
+srv-test$(EXEEXT): $(srv_test_OBJECTS) $(srv_test_DEPENDENCIES) $(EXTRA_srv_test_DEPENDENCIES) 
+	@rm -f srv-test$(EXEEXT)
+	$(AM_V_CCLD)$(srv_test_LINK) $(srv_test_OBJECTS) $(srv_test_LDADD) $(LIBS)
+xdg-config-test$(EXEEXT): $(xdg_config_test_OBJECTS) $(xdg_config_test_DEPENDENCIES) $(EXTRA_xdg_config_test_DEPENDENCIES) 
+	@rm -f xdg-config-test$(EXEEXT)
+	$(AM_V_CCLD)$(xdg_config_test_LINK) $(xdg_config_test_OBJECTS) $(xdg_config_test_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_nss_test-check-nss-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_nss_test-check-nss.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/client_test-client-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_client_la-browser.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_client_la-check-nss.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_client_la-client.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_client_la-dbus-watch-glue.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_client_la-dbus.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_client_la-entrygroup.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_client_la-resolver.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_client_la-xdg-config.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rr_test-rr-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srv_test-srv-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xdg_config_test-xdg-config-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xdg_config_test-xdg-config.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+libavahi_client_la-client.lo: client.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_client_la_CFLAGS) $(CFLAGS) -MT libavahi_client_la-client.lo -MD -MP -MF $(DEPDIR)/libavahi_client_la-client.Tpo -c -o libavahi_client_la-client.lo `test -f 'client.c' || echo '$(srcdir)/'`client.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_client_la-client.Tpo $(DEPDIR)/libavahi_client_la-client.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='client.c' object='libavahi_client_la-client.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_client_la_CFLAGS) $(CFLAGS) -c -o libavahi_client_la-client.lo `test -f 'client.c' || echo '$(srcdir)/'`client.c
+
+libavahi_client_la-entrygroup.lo: entrygroup.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_client_la_CFLAGS) $(CFLAGS) -MT libavahi_client_la-entrygroup.lo -MD -MP -MF $(DEPDIR)/libavahi_client_la-entrygroup.Tpo -c -o libavahi_client_la-entrygroup.lo `test -f 'entrygroup.c' || echo '$(srcdir)/'`entrygroup.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_client_la-entrygroup.Tpo $(DEPDIR)/libavahi_client_la-entrygroup.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='entrygroup.c' object='libavahi_client_la-entrygroup.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_client_la_CFLAGS) $(CFLAGS) -c -o libavahi_client_la-entrygroup.lo `test -f 'entrygroup.c' || echo '$(srcdir)/'`entrygroup.c
+
+libavahi_client_la-browser.lo: browser.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_client_la_CFLAGS) $(CFLAGS) -MT libavahi_client_la-browser.lo -MD -MP -MF $(DEPDIR)/libavahi_client_la-browser.Tpo -c -o libavahi_client_la-browser.lo `test -f 'browser.c' || echo '$(srcdir)/'`browser.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_client_la-browser.Tpo $(DEPDIR)/libavahi_client_la-browser.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='browser.c' object='libavahi_client_la-browser.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_client_la_CFLAGS) $(CFLAGS) -c -o libavahi_client_la-browser.lo `test -f 'browser.c' || echo '$(srcdir)/'`browser.c
+
+libavahi_client_la-resolver.lo: resolver.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_client_la_CFLAGS) $(CFLAGS) -MT libavahi_client_la-resolver.lo -MD -MP -MF $(DEPDIR)/libavahi_client_la-resolver.Tpo -c -o libavahi_client_la-resolver.lo `test -f 'resolver.c' || echo '$(srcdir)/'`resolver.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_client_la-resolver.Tpo $(DEPDIR)/libavahi_client_la-resolver.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='resolver.c' object='libavahi_client_la-resolver.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_client_la_CFLAGS) $(CFLAGS) -c -o libavahi_client_la-resolver.lo `test -f 'resolver.c' || echo '$(srcdir)/'`resolver.c
+
+libavahi_client_la-xdg-config.lo: xdg-config.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_client_la_CFLAGS) $(CFLAGS) -MT libavahi_client_la-xdg-config.lo -MD -MP -MF $(DEPDIR)/libavahi_client_la-xdg-config.Tpo -c -o libavahi_client_la-xdg-config.lo `test -f 'xdg-config.c' || echo '$(srcdir)/'`xdg-config.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_client_la-xdg-config.Tpo $(DEPDIR)/libavahi_client_la-xdg-config.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xdg-config.c' object='libavahi_client_la-xdg-config.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_client_la_CFLAGS) $(CFLAGS) -c -o libavahi_client_la-xdg-config.lo `test -f 'xdg-config.c' || echo '$(srcdir)/'`xdg-config.c
+
+libavahi_client_la-check-nss.lo: check-nss.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_client_la_CFLAGS) $(CFLAGS) -MT libavahi_client_la-check-nss.lo -MD -MP -MF $(DEPDIR)/libavahi_client_la-check-nss.Tpo -c -o libavahi_client_la-check-nss.lo `test -f 'check-nss.c' || echo '$(srcdir)/'`check-nss.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_client_la-check-nss.Tpo $(DEPDIR)/libavahi_client_la-check-nss.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='check-nss.c' object='libavahi_client_la-check-nss.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_client_la_CFLAGS) $(CFLAGS) -c -o libavahi_client_la-check-nss.lo `test -f 'check-nss.c' || echo '$(srcdir)/'`check-nss.c
+
+libavahi_client_la-dbus.lo: ../avahi-common/dbus.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_client_la_CFLAGS) $(CFLAGS) -MT libavahi_client_la-dbus.lo -MD -MP -MF $(DEPDIR)/libavahi_client_la-dbus.Tpo -c -o libavahi_client_la-dbus.lo `test -f '../avahi-common/dbus.c' || echo '$(srcdir)/'`../avahi-common/dbus.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_client_la-dbus.Tpo $(DEPDIR)/libavahi_client_la-dbus.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../avahi-common/dbus.c' object='libavahi_client_la-dbus.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_client_la_CFLAGS) $(CFLAGS) -c -o libavahi_client_la-dbus.lo `test -f '../avahi-common/dbus.c' || echo '$(srcdir)/'`../avahi-common/dbus.c
+
+libavahi_client_la-dbus-watch-glue.lo: ../avahi-common/dbus-watch-glue.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_client_la_CFLAGS) $(CFLAGS) -MT libavahi_client_la-dbus-watch-glue.lo -MD -MP -MF $(DEPDIR)/libavahi_client_la-dbus-watch-glue.Tpo -c -o libavahi_client_la-dbus-watch-glue.lo `test -f '../avahi-common/dbus-watch-glue.c' || echo '$(srcdir)/'`../avahi-common/dbus-watch-glue.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_client_la-dbus-watch-glue.Tpo $(DEPDIR)/libavahi_client_la-dbus-watch-glue.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../avahi-common/dbus-watch-glue.c' object='libavahi_client_la-dbus-watch-glue.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_client_la_CFLAGS) $(CFLAGS) -c -o libavahi_client_la-dbus-watch-glue.lo `test -f '../avahi-common/dbus-watch-glue.c' || echo '$(srcdir)/'`../avahi-common/dbus-watch-glue.c
+
+check_nss_test-check-nss.o: check-nss.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_nss_test_CFLAGS) $(CFLAGS) -MT check_nss_test-check-nss.o -MD -MP -MF $(DEPDIR)/check_nss_test-check-nss.Tpo -c -o check_nss_test-check-nss.o `test -f 'check-nss.c' || echo '$(srcdir)/'`check-nss.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/check_nss_test-check-nss.Tpo $(DEPDIR)/check_nss_test-check-nss.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='check-nss.c' object='check_nss_test-check-nss.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_nss_test_CFLAGS) $(CFLAGS) -c -o check_nss_test-check-nss.o `test -f 'check-nss.c' || echo '$(srcdir)/'`check-nss.c
+
+check_nss_test-check-nss.obj: check-nss.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_nss_test_CFLAGS) $(CFLAGS) -MT check_nss_test-check-nss.obj -MD -MP -MF $(DEPDIR)/check_nss_test-check-nss.Tpo -c -o check_nss_test-check-nss.obj `if test -f 'check-nss.c'; then $(CYGPATH_W) 'check-nss.c'; else $(CYGPATH_W) '$(srcdir)/check-nss.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/check_nss_test-check-nss.Tpo $(DEPDIR)/check_nss_test-check-nss.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='check-nss.c' object='check_nss_test-check-nss.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_nss_test_CFLAGS) $(CFLAGS) -c -o check_nss_test-check-nss.obj `if test -f 'check-nss.c'; then $(CYGPATH_W) 'check-nss.c'; else $(CYGPATH_W) '$(srcdir)/check-nss.c'; fi`
+
+check_nss_test-check-nss-test.o: check-nss-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_nss_test_CFLAGS) $(CFLAGS) -MT check_nss_test-check-nss-test.o -MD -MP -MF $(DEPDIR)/check_nss_test-check-nss-test.Tpo -c -o check_nss_test-check-nss-test.o `test -f 'check-nss-test.c' || echo '$(srcdir)/'`check-nss-test.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/check_nss_test-check-nss-test.Tpo $(DEPDIR)/check_nss_test-check-nss-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='check-nss-test.c' object='check_nss_test-check-nss-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_nss_test_CFLAGS) $(CFLAGS) -c -o check_nss_test-check-nss-test.o `test -f 'check-nss-test.c' || echo '$(srcdir)/'`check-nss-test.c
+
+check_nss_test-check-nss-test.obj: check-nss-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_nss_test_CFLAGS) $(CFLAGS) -MT check_nss_test-check-nss-test.obj -MD -MP -MF $(DEPDIR)/check_nss_test-check-nss-test.Tpo -c -o check_nss_test-check-nss-test.obj `if test -f 'check-nss-test.c'; then $(CYGPATH_W) 'check-nss-test.c'; else $(CYGPATH_W) '$(srcdir)/check-nss-test.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/check_nss_test-check-nss-test.Tpo $(DEPDIR)/check_nss_test-check-nss-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='check-nss-test.c' object='check_nss_test-check-nss-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_nss_test_CFLAGS) $(CFLAGS) -c -o check_nss_test-check-nss-test.obj `if test -f 'check-nss-test.c'; then $(CYGPATH_W) 'check-nss-test.c'; else $(CYGPATH_W) '$(srcdir)/check-nss-test.c'; fi`
+
+client_test-client-test.o: client-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(client_test_CFLAGS) $(CFLAGS) -MT client_test-client-test.o -MD -MP -MF $(DEPDIR)/client_test-client-test.Tpo -c -o client_test-client-test.o `test -f 'client-test.c' || echo '$(srcdir)/'`client-test.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/client_test-client-test.Tpo $(DEPDIR)/client_test-client-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='client-test.c' object='client_test-client-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(client_test_CFLAGS) $(CFLAGS) -c -o client_test-client-test.o `test -f 'client-test.c' || echo '$(srcdir)/'`client-test.c
+
+client_test-client-test.obj: client-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(client_test_CFLAGS) $(CFLAGS) -MT client_test-client-test.obj -MD -MP -MF $(DEPDIR)/client_test-client-test.Tpo -c -o client_test-client-test.obj `if test -f 'client-test.c'; then $(CYGPATH_W) 'client-test.c'; else $(CYGPATH_W) '$(srcdir)/client-test.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/client_test-client-test.Tpo $(DEPDIR)/client_test-client-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='client-test.c' object='client_test-client-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(client_test_CFLAGS) $(CFLAGS) -c -o client_test-client-test.obj `if test -f 'client-test.c'; then $(CYGPATH_W) 'client-test.c'; else $(CYGPATH_W) '$(srcdir)/client-test.c'; fi`
+
+rr_test-rr-test.o: rr-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rr_test_CFLAGS) $(CFLAGS) -MT rr_test-rr-test.o -MD -MP -MF $(DEPDIR)/rr_test-rr-test.Tpo -c -o rr_test-rr-test.o `test -f 'rr-test.c' || echo '$(srcdir)/'`rr-test.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/rr_test-rr-test.Tpo $(DEPDIR)/rr_test-rr-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='rr-test.c' object='rr_test-rr-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rr_test_CFLAGS) $(CFLAGS) -c -o rr_test-rr-test.o `test -f 'rr-test.c' || echo '$(srcdir)/'`rr-test.c
+
+rr_test-rr-test.obj: rr-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rr_test_CFLAGS) $(CFLAGS) -MT rr_test-rr-test.obj -MD -MP -MF $(DEPDIR)/rr_test-rr-test.Tpo -c -o rr_test-rr-test.obj `if test -f 'rr-test.c'; then $(CYGPATH_W) 'rr-test.c'; else $(CYGPATH_W) '$(srcdir)/rr-test.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/rr_test-rr-test.Tpo $(DEPDIR)/rr_test-rr-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='rr-test.c' object='rr_test-rr-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rr_test_CFLAGS) $(CFLAGS) -c -o rr_test-rr-test.obj `if test -f 'rr-test.c'; then $(CYGPATH_W) 'rr-test.c'; else $(CYGPATH_W) '$(srcdir)/rr-test.c'; fi`
+
+srv_test-srv-test.o: srv-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(srv_test_CFLAGS) $(CFLAGS) -MT srv_test-srv-test.o -MD -MP -MF $(DEPDIR)/srv_test-srv-test.Tpo -c -o srv_test-srv-test.o `test -f 'srv-test.c' || echo '$(srcdir)/'`srv-test.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/srv_test-srv-test.Tpo $(DEPDIR)/srv_test-srv-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='srv-test.c' object='srv_test-srv-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(srv_test_CFLAGS) $(CFLAGS) -c -o srv_test-srv-test.o `test -f 'srv-test.c' || echo '$(srcdir)/'`srv-test.c
+
+srv_test-srv-test.obj: srv-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(srv_test_CFLAGS) $(CFLAGS) -MT srv_test-srv-test.obj -MD -MP -MF $(DEPDIR)/srv_test-srv-test.Tpo -c -o srv_test-srv-test.obj `if test -f 'srv-test.c'; then $(CYGPATH_W) 'srv-test.c'; else $(CYGPATH_W) '$(srcdir)/srv-test.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/srv_test-srv-test.Tpo $(DEPDIR)/srv_test-srv-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='srv-test.c' object='srv_test-srv-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(srv_test_CFLAGS) $(CFLAGS) -c -o srv_test-srv-test.obj `if test -f 'srv-test.c'; then $(CYGPATH_W) 'srv-test.c'; else $(CYGPATH_W) '$(srcdir)/srv-test.c'; fi`
+
+xdg_config_test-xdg-config-test.o: xdg-config-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdg_config_test_CFLAGS) $(CFLAGS) -MT xdg_config_test-xdg-config-test.o -MD -MP -MF $(DEPDIR)/xdg_config_test-xdg-config-test.Tpo -c -o xdg_config_test-xdg-config-test.o `test -f 'xdg-config-test.c' || echo '$(srcdir)/'`xdg-config-test.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/xdg_config_test-xdg-config-test.Tpo $(DEPDIR)/xdg_config_test-xdg-config-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xdg-config-test.c' object='xdg_config_test-xdg-config-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdg_config_test_CFLAGS) $(CFLAGS) -c -o xdg_config_test-xdg-config-test.o `test -f 'xdg-config-test.c' || echo '$(srcdir)/'`xdg-config-test.c
+
+xdg_config_test-xdg-config-test.obj: xdg-config-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdg_config_test_CFLAGS) $(CFLAGS) -MT xdg_config_test-xdg-config-test.obj -MD -MP -MF $(DEPDIR)/xdg_config_test-xdg-config-test.Tpo -c -o xdg_config_test-xdg-config-test.obj `if test -f 'xdg-config-test.c'; then $(CYGPATH_W) 'xdg-config-test.c'; else $(CYGPATH_W) '$(srcdir)/xdg-config-test.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/xdg_config_test-xdg-config-test.Tpo $(DEPDIR)/xdg_config_test-xdg-config-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xdg-config-test.c' object='xdg_config_test-xdg-config-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdg_config_test_CFLAGS) $(CFLAGS) -c -o xdg_config_test-xdg-config-test.obj `if test -f 'xdg-config-test.c'; then $(CYGPATH_W) 'xdg-config-test.c'; else $(CYGPATH_W) '$(srcdir)/xdg-config-test.c'; fi`
+
+xdg_config_test-xdg-config.o: xdg-config.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdg_config_test_CFLAGS) $(CFLAGS) -MT xdg_config_test-xdg-config.o -MD -MP -MF $(DEPDIR)/xdg_config_test-xdg-config.Tpo -c -o xdg_config_test-xdg-config.o `test -f 'xdg-config.c' || echo '$(srcdir)/'`xdg-config.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/xdg_config_test-xdg-config.Tpo $(DEPDIR)/xdg_config_test-xdg-config.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xdg-config.c' object='xdg_config_test-xdg-config.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdg_config_test_CFLAGS) $(CFLAGS) -c -o xdg_config_test-xdg-config.o `test -f 'xdg-config.c' || echo '$(srcdir)/'`xdg-config.c
+
+xdg_config_test-xdg-config.obj: xdg-config.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdg_config_test_CFLAGS) $(CFLAGS) -MT xdg_config_test-xdg-config.obj -MD -MP -MF $(DEPDIR)/xdg_config_test-xdg-config.Tpo -c -o xdg_config_test-xdg-config.obj `if test -f 'xdg-config.c'; then $(CYGPATH_W) 'xdg-config.c'; else $(CYGPATH_W) '$(srcdir)/xdg-config.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/xdg_config_test-xdg-config.Tpo $(DEPDIR)/xdg_config_test-xdg-config.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='xdg-config.c' object='xdg_config_test-xdg-config.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xdg_config_test_CFLAGS) $(CFLAGS) -c -o xdg_config_test-xdg-config.obj `if test -f 'xdg-config.c'; then $(CYGPATH_W) 'xdg-config.c'; else $(CYGPATH_W) '$(srcdir)/xdg-config.c'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+install-avahi_clientincludeHEADERS: $(avahi_clientinclude_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(avahi_clientincludedir)" || $(MKDIR_P) "$(DESTDIR)$(avahi_clientincludedir)"
+	@list='$(avahi_clientinclude_HEADERS)'; test -n "$(avahi_clientincludedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(avahi_clientincludedir)'"; \
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(avahi_clientincludedir)" || exit $$?; \
+	done
+
+uninstall-avahi_clientincludeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(avahi_clientinclude_HEADERS)'; test -n "$(avahi_clientincludedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(avahi_clientincludedir)'; $(am__uninstall_files_from_dir)
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(avahi_clientincludedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+	clean-noinstPROGRAMS mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-avahi_clientincludeHEADERS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-avahi_clientincludeHEADERS \
+	uninstall-libLTLIBRARIES
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS ctags \
+	distclean distclean-compile distclean-generic \
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am \
+	install-avahi_clientincludeHEADERS install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-libLTLIBRARIES install-man install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am \
+	uninstall-avahi_clientincludeHEADERS uninstall-libLTLIBRARIES
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/avahi-0.6.31/avahi-client/browser.c b/avahi-0.6.31/avahi-client/browser.c
new file mode 100644
index 0000000..c978d94
--- /dev/null
+++ b/avahi-0.6.31/avahi-client/browser.c
@@ -0,0 +1,1025 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include <dbus/dbus.h>
+
+#include <avahi-client/client.h>
+#include <avahi-common/dbus.h>
+#include <avahi-common/llist.h>
+#include <avahi-common/error.h>
+#include <avahi-common/malloc.h>
+#include <avahi-common/domain.h>
+
+#include "client.h"
+#include "internal.h"
+#include "xdg-config.h"
+
+static void parse_environment(AvahiDomainBrowser *b) {
+    char buf[AVAHI_DOMAIN_NAME_MAX*3], *e, *t, *p;
+
+    assert(b);
+
+    if (!(e = getenv("AVAHI_BROWSE_DOMAINS")))
+        return;
+
+    snprintf(buf, sizeof(buf), "%s", e);
+
+    for (t = strtok_r(buf, ":", &p); t; t = strtok_r(NULL, ":", &p)) {
+        char domain[AVAHI_DOMAIN_NAME_MAX];
+        if (avahi_normalize_name(t, domain, sizeof(domain)))
+            b->static_browse_domains = avahi_string_list_add(b->static_browse_domains, domain);
+    }
+}
+
+static void parse_domain_file(AvahiDomainBrowser *b) {
+    FILE *f;
+    char buf[AVAHI_DOMAIN_NAME_MAX];
+
+    assert(b);
+
+    if (!(f = avahi_xdg_config_open("avahi/browse-domains")))
+        return;
+
+
+    while (fgets(buf, sizeof(buf)-1, f)) {
+        char domain[AVAHI_DOMAIN_NAME_MAX];
+        buf[strcspn(buf, "\n\r")] = 0;
+
+        if (avahi_normalize_name(buf, domain, sizeof(domain)))
+            b->static_browse_domains = avahi_string_list_add(b->static_browse_domains, domain);
+    }
+}
+
+static void domain_browser_ref(AvahiDomainBrowser *db) {
+    assert(db);
+    assert(db->ref >= 1);
+    db->ref++;
+}
+
+static void defer_timeout_callback(AvahiTimeout *t, void *userdata) {
+    AvahiDomainBrowser *db = userdata;
+    AvahiStringList *l;
+    assert(t);
+
+    db->client->poll_api->timeout_free(db->defer_timeout);
+    db->defer_timeout = NULL;
+
+    domain_browser_ref(db);
+
+    for (l = db->static_browse_domains; l; l = l->next) {
+
+        if (db->ref <= 1)
+            break;
+
+        db->callback(db, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, AVAHI_BROWSER_NEW, (char*) l->text, AVAHI_LOOKUP_RESULT_STATIC, db->userdata);
+    }
+
+    avahi_domain_browser_free(db);
+}
+
+AvahiDomainBrowser* avahi_domain_browser_new(
+    AvahiClient *client,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    const char *domain,
+    AvahiDomainBrowserType btype,
+    AvahiLookupFlags flags,
+    AvahiDomainBrowserCallback callback,
+    void *userdata) {
+
+    AvahiDomainBrowser *db = NULL;
+    DBusMessage *message = NULL, *reply = NULL;
+    DBusError error;
+    char *path;
+    int32_t i_interface, i_protocol, bt;
+    uint32_t u_flags;
+
+    assert(client);
+    assert(callback);
+
+    dbus_error_init (&error);
+
+    if (!avahi_client_is_connected(client)) {
+        avahi_client_set_errno(client, AVAHI_ERR_BAD_STATE);
+        goto fail;
+    }
+
+    if (!domain)
+        domain = "";
+
+    if (!(db = avahi_new (AvahiDomainBrowser, 1))) {
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    db->ref = 1;
+    db->client = client;
+    db->callback = callback;
+    db->userdata = userdata;
+    db->path = NULL;
+    db->interface = interface;
+    db->protocol = protocol;
+    db->static_browse_domains = NULL;
+    db->defer_timeout = NULL;
+
+    AVAHI_LLIST_PREPEND(AvahiDomainBrowser, domain_browsers, client->domain_browsers, db);
+
+    if (!(client->flags & AVAHI_CLIENT_IGNORE_USER_CONFIG)) {
+        parse_environment(db);
+        parse_domain_file(db);
+    }
+
+    db->static_browse_domains = avahi_string_list_reverse(db->static_browse_domains);
+
+    if (!(message = dbus_message_new_method_call (AVAHI_DBUS_NAME, AVAHI_DBUS_PATH_SERVER, AVAHI_DBUS_INTERFACE_SERVER, "DomainBrowserNew"))) {
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    i_interface = (int32_t) interface;
+    i_protocol = (int32_t) protocol;
+    u_flags = (uint32_t) flags;
+    bt = btype;
+
+    if (!(dbus_message_append_args(
+              message,
+              DBUS_TYPE_INT32, &i_interface,
+              DBUS_TYPE_INT32, &i_protocol,
+              DBUS_TYPE_STRING, &domain,
+              DBUS_TYPE_INT32, &bt,
+              DBUS_TYPE_UINT32, &u_flags,
+              DBUS_TYPE_INVALID))) {
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    if (!(reply = dbus_connection_send_with_reply_and_block (client->bus, message, -1, &error)) ||
+        dbus_error_is_set(&error)) {
+        avahi_client_set_errno(client, AVAHI_ERR_DBUS_ERROR);
+        goto fail;
+    }
+
+    if (!dbus_message_get_args (reply, &error, DBUS_TYPE_OBJECT_PATH, &path, DBUS_TYPE_INVALID) ||
+        dbus_error_is_set(&error) ||
+        !path) {
+        avahi_client_set_errno(client, AVAHI_ERR_DBUS_ERROR);
+        goto fail;
+    }
+
+    if (!(db->path = avahi_strdup(path))) {
+
+        /* FIXME: We don't remove the object on the server side */
+
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    if (db->static_browse_domains && btype == AVAHI_DOMAIN_BROWSER_BROWSE) {
+        struct timeval tv = { 0, 0 };
+
+        if (!(db->defer_timeout = client->poll_api->timeout_new(client->poll_api, &tv, defer_timeout_callback, db))) {
+            avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+            goto fail;
+        }
+    }
+
+    dbus_message_unref(message);
+    dbus_message_unref(reply);
+
+    return db;
+
+fail:
+
+    if (dbus_error_is_set(&error)) {
+        avahi_client_set_dbus_error(client, &error);
+        dbus_error_free(&error);
+    }
+
+    if (db)
+        avahi_domain_browser_free(db);
+
+    if (message)
+        dbus_message_unref(message);
+
+    if (reply)
+        dbus_message_unref(reply);
+
+    return NULL;
+}
+
+AvahiClient* avahi_domain_browser_get_client (AvahiDomainBrowser *b) {
+    assert(b);
+    return b->client;
+}
+
+int avahi_domain_browser_free (AvahiDomainBrowser *b) {
+    AvahiClient *client;
+    int r = AVAHI_OK;
+
+    assert(b);
+    assert(b->ref >= 1);
+
+    if (--(b->ref) >= 1)
+        return AVAHI_OK;
+
+    client = b->client;
+
+    if (b->path && avahi_client_is_connected(b->client))
+        r = avahi_client_simple_method_call(client, b->path, AVAHI_DBUS_INTERFACE_DOMAIN_BROWSER, "Free");
+
+    AVAHI_LLIST_REMOVE(AvahiDomainBrowser, domain_browsers, client->domain_browsers, b);
+
+    if (b->defer_timeout)
+        b->client->poll_api->timeout_free(b->defer_timeout);
+
+    avahi_string_list_free(b->static_browse_domains);
+    avahi_free(b->path);
+    avahi_free(b);
+
+    return r;
+}
+
+DBusHandlerResult avahi_domain_browser_event (AvahiClient *client, AvahiBrowserEvent event, DBusMessage *message) {
+    AvahiDomainBrowser *db = NULL;
+    DBusError error;
+    const char *path;
+    char *domain = NULL;
+    int32_t interface, protocol;
+    uint32_t flags = 0;
+    AvahiStringList *l;
+
+    assert(client);
+    assert(message);
+
+    dbus_error_init (&error);
+
+    if (!(path = dbus_message_get_path(message)))
+        goto fail;
+
+    for (db = client->domain_browsers; db; db = db->domain_browsers_next)
+        if (strcmp (db->path, path) == 0)
+            break;
+
+    if (!db)
+        goto fail;
+
+    interface = db->interface;
+    protocol = db->protocol;
+
+    switch (event) {
+        case AVAHI_BROWSER_NEW:
+        case AVAHI_BROWSER_REMOVE:
+
+            if (!dbus_message_get_args(
+                    message, &error,
+                    DBUS_TYPE_INT32, &interface,
+                    DBUS_TYPE_INT32, &protocol,
+                    DBUS_TYPE_STRING, &domain,
+                    DBUS_TYPE_UINT32, &flags,
+                    DBUS_TYPE_INVALID) ||
+                dbus_error_is_set (&error)) {
+                fprintf(stderr, "Failed to parse browser event.\n");
+                goto fail;
+            }
+
+            break;
+
+        case AVAHI_BROWSER_CACHE_EXHAUSTED:
+        case AVAHI_BROWSER_ALL_FOR_NOW:
+            break;
+
+        case AVAHI_BROWSER_FAILURE: {
+            char *etxt;
+
+            if (!dbus_message_get_args(
+                    message, &error,
+                    DBUS_TYPE_STRING, &etxt,
+                    DBUS_TYPE_INVALID) ||
+                dbus_error_is_set (&error)) {
+                fprintf(stderr, "Failed to parse browser event.\n");
+                goto fail;
+            }
+
+            avahi_client_set_errno(db->client, avahi_error_dbus_to_number(etxt));
+            break;
+        }
+    }
+
+    if (domain)
+        for (l = db->static_browse_domains; l; l = l->next)
+            if (avahi_domain_equal((char*) l->text, domain)) {
+                /* We had this entry already in the static entries */
+                return DBUS_HANDLER_RESULT_HANDLED;
+            }
+
+    db->callback(db, (AvahiIfIndex) interface, (AvahiProtocol) protocol, event, domain, (AvahiLookupResultFlags) flags, db->userdata);
+
+    return DBUS_HANDLER_RESULT_HANDLED;
+
+fail:
+    dbus_error_free (&error);
+    return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
+
+/* AvahiServiceTypeBrowser */
+
+AvahiServiceTypeBrowser* avahi_service_type_browser_new(
+    AvahiClient *client,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    const char *domain,
+    AvahiLookupFlags flags,
+    AvahiServiceTypeBrowserCallback callback,
+    void *userdata) {
+
+    AvahiServiceTypeBrowser *b = NULL;
+    DBusMessage *message = NULL, *reply = NULL;
+    DBusError error;
+    char *path;
+    int32_t i_interface, i_protocol;
+    uint32_t u_flags;
+
+    assert(client);
+    assert(callback);
+
+    dbus_error_init(&error);
+
+    if (!avahi_client_is_connected(client)) {
+        avahi_client_set_errno(client, AVAHI_ERR_BAD_STATE);
+        goto fail;
+    }
+
+    if (!domain)
+        domain = "";
+
+    if (!(b = avahi_new(AvahiServiceTypeBrowser, 1))) {
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    b->client = client;
+    b->callback = callback;
+    b->userdata = userdata;
+    b->path = NULL;
+    b->domain = NULL;
+    b->interface = interface;
+    b->protocol = protocol;
+
+    AVAHI_LLIST_PREPEND(AvahiServiceTypeBrowser, service_type_browsers, client->service_type_browsers, b);
+
+    if (domain[0])
+        if (!(b->domain = avahi_strdup(domain))) {
+            avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+            goto fail;
+        }
+
+    if (!(message = dbus_message_new_method_call (AVAHI_DBUS_NAME, AVAHI_DBUS_PATH_SERVER, AVAHI_DBUS_INTERFACE_SERVER, "ServiceTypeBrowserNew"))) {
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    i_interface = (int32_t) interface;
+    i_protocol = (int32_t) protocol;
+    u_flags = (uint32_t) flags;
+
+    if (!dbus_message_append_args(
+            message,
+            DBUS_TYPE_INT32, &i_interface,
+            DBUS_TYPE_INT32, &i_protocol,
+            DBUS_TYPE_STRING, &domain,
+            DBUS_TYPE_UINT32, &u_flags,
+            DBUS_TYPE_INVALID)) {
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    if (!(reply = dbus_connection_send_with_reply_and_block (client->bus, message, -1, &error)) ||
+        dbus_error_is_set(&error)) {
+        avahi_client_set_errno(client, AVAHI_ERR_DBUS_ERROR);
+        goto fail;
+    }
+
+    if (!dbus_message_get_args (reply, &error, DBUS_TYPE_OBJECT_PATH, &path, DBUS_TYPE_INVALID) ||
+        dbus_error_is_set(&error) ||
+        !path) {
+        avahi_client_set_errno(client, AVAHI_ERR_DBUS_ERROR);
+        goto fail;
+    }
+
+    if (!(b->path = avahi_strdup(path))) {
+
+        /* FIXME: We don't remove the object on the server side */
+
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    dbus_message_unref(message);
+    dbus_message_unref(reply);
+
+    return b;
+
+fail:
+
+    if (dbus_error_is_set(&error)) {
+        avahi_client_set_dbus_error(client, &error);
+        dbus_error_free(&error);
+    }
+
+    if (b)
+        avahi_service_type_browser_free(b);
+
+    if (message)
+        dbus_message_unref(message);
+
+    if (reply)
+        dbus_message_unref(reply);
+
+    return NULL;
+}
+
+AvahiClient* avahi_service_type_browser_get_client (AvahiServiceTypeBrowser *b) {
+    assert(b);
+    return b->client;
+}
+
+int avahi_service_type_browser_free (AvahiServiceTypeBrowser *b) {
+    AvahiClient *client;
+    int r = AVAHI_OK;
+
+    assert(b);
+    client = b->client;
+
+    if (b->path && avahi_client_is_connected(b->client))
+        r = avahi_client_simple_method_call(client, b->path, AVAHI_DBUS_INTERFACE_SERVICE_TYPE_BROWSER, "Free");
+
+    AVAHI_LLIST_REMOVE(AvahiServiceTypeBrowser, service_type_browsers, b->client->service_type_browsers, b);
+
+    avahi_free(b->path);
+    avahi_free(b->domain);
+    avahi_free(b);
+    return r;
+}
+
+DBusHandlerResult avahi_service_type_browser_event (AvahiClient *client, AvahiBrowserEvent event, DBusMessage *message) {
+    AvahiServiceTypeBrowser *b = NULL;
+    DBusError error;
+    const char *path;
+    char *domain, *type = NULL;
+    int32_t interface, protocol;
+    uint32_t flags = 0;
+
+    assert(client);
+    assert(message);
+
+    dbus_error_init (&error);
+
+    if (!(path = dbus_message_get_path(message)))
+        goto fail;
+
+    for (b = client->service_type_browsers; b; b = b->service_type_browsers_next)
+        if (strcmp (b->path, path) == 0)
+            break;
+
+    if (!b)
+        goto fail;
+
+    domain = b->domain;
+    interface = b->interface;
+    protocol = b->protocol;
+
+    switch (event) {
+        case AVAHI_BROWSER_NEW:
+        case AVAHI_BROWSER_REMOVE:
+            if (!dbus_message_get_args(
+                    message, &error,
+                    DBUS_TYPE_INT32, &interface,
+                    DBUS_TYPE_INT32, &protocol,
+                    DBUS_TYPE_STRING, &type,
+                    DBUS_TYPE_STRING, &domain,
+                    DBUS_TYPE_UINT32, &flags,
+                    DBUS_TYPE_INVALID) ||
+                dbus_error_is_set(&error)) {
+                fprintf(stderr, "Failed to parse browser event.\n");
+                goto fail;
+            }
+            break;
+
+        case AVAHI_BROWSER_CACHE_EXHAUSTED:
+        case AVAHI_BROWSER_ALL_FOR_NOW:
+            break;
+
+        case AVAHI_BROWSER_FAILURE: {
+            char *etxt;
+
+            if (!dbus_message_get_args(
+                    message, &error,
+                    DBUS_TYPE_STRING, &etxt,
+                    DBUS_TYPE_INVALID) ||
+                dbus_error_is_set (&error)) {
+                fprintf(stderr, "Failed to parse browser event.\n");
+                goto fail;
+            }
+
+            avahi_client_set_errno(b->client, avahi_error_dbus_to_number(etxt));
+            break;
+        }
+    }
+
+    b->callback(b, (AvahiIfIndex) interface, (AvahiProtocol) protocol, event, type, domain, (AvahiLookupResultFlags) flags, b->userdata);
+
+    return DBUS_HANDLER_RESULT_HANDLED;
+
+fail:
+    dbus_error_free (&error);
+    return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
+
+/* AvahiServiceBrowser */
+
+AvahiServiceBrowser* avahi_service_browser_new(
+    AvahiClient *client,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    const char *type,
+    const char *domain,
+    AvahiLookupFlags flags,
+    AvahiServiceBrowserCallback callback,
+    void *userdata) {
+
+    AvahiServiceBrowser *b = NULL;
+    DBusMessage *message = NULL, *reply = NULL;
+    DBusError error;
+    char *path;
+    int32_t i_protocol, i_interface;
+    uint32_t u_flags;
+
+    assert(client);
+    assert(type);
+    assert(callback);
+
+    dbus_error_init(&error);
+
+    if (!avahi_client_is_connected(client)) {
+        avahi_client_set_errno(client, AVAHI_ERR_BAD_STATE);
+        goto fail;
+    }
+
+    if (!domain)
+        domain = "";
+
+    if (!(b = avahi_new(AvahiServiceBrowser, 1))) {
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    b->client = client;
+    b->callback = callback;
+    b->userdata = userdata;
+    b->path = NULL;
+    b->type = b->domain = NULL;
+    b->interface = interface;
+    b->protocol = protocol;
+
+    AVAHI_LLIST_PREPEND(AvahiServiceBrowser, service_browsers, client->service_browsers, b);
+
+    if (!(b->type = avahi_strdup(type))) {
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    if (domain && domain[0])
+        if (!(b->domain = avahi_strdup(domain))) {
+            avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+            goto fail;
+        }
+
+    if (!(message = dbus_message_new_method_call (AVAHI_DBUS_NAME, AVAHI_DBUS_PATH_SERVER, AVAHI_DBUS_INTERFACE_SERVER, "ServiceBrowserNew"))) {
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    i_interface = (int32_t) interface;
+    i_protocol = (int32_t) protocol;
+    u_flags = (uint32_t) flags;
+
+    if (!dbus_message_append_args(
+            message,
+            DBUS_TYPE_INT32, &i_interface,
+            DBUS_TYPE_INT32, &i_protocol,
+            DBUS_TYPE_STRING, &type,
+            DBUS_TYPE_STRING, &domain,
+            DBUS_TYPE_UINT32, &u_flags,
+            DBUS_TYPE_INVALID)) {
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    if (!(reply = dbus_connection_send_with_reply_and_block (client->bus, message, -1, &error)) ||
+        dbus_error_is_set(&error)) {
+        avahi_client_set_errno(client, AVAHI_ERR_DBUS_ERROR);
+        goto fail;
+    }
+
+    if (!dbus_message_get_args (reply, &error, DBUS_TYPE_OBJECT_PATH, &path, DBUS_TYPE_INVALID) ||
+        dbus_error_is_set(&error) ||
+        !path) {
+        avahi_client_set_errno(client, AVAHI_ERR_DBUS_ERROR);
+        goto fail;
+    }
+
+    if (!(b->path = avahi_strdup(path))) {
+
+        /* FIXME: We don't remove the object on the server side */
+
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    dbus_message_unref(message);
+    dbus_message_unref(reply);
+
+    return b;
+
+fail:
+    if (dbus_error_is_set(&error)) {
+        avahi_client_set_dbus_error(client, &error);
+        dbus_error_free(&error);
+    }
+
+    if (b)
+        avahi_service_browser_free(b);
+
+    if (message)
+        dbus_message_unref(message);
+
+    if (reply)
+        dbus_message_unref(reply);
+
+    return NULL;
+}
+
+AvahiClient* avahi_service_browser_get_client (AvahiServiceBrowser *b) {
+    assert(b);
+    return b->client;
+}
+
+int avahi_service_browser_free (AvahiServiceBrowser *b) {
+    AvahiClient *client;
+    int r = AVAHI_OK;
+
+    assert(b);
+    client = b->client;
+
+    if (b->path && avahi_client_is_connected(b->client))
+        r = avahi_client_simple_method_call(client, b->path, AVAHI_DBUS_INTERFACE_SERVICE_BROWSER, "Free");
+
+    AVAHI_LLIST_REMOVE(AvahiServiceBrowser, service_browsers, b->client->service_browsers, b);
+
+    avahi_free(b->path);
+    avahi_free(b->type);
+    avahi_free(b->domain);
+    avahi_free(b);
+    return r;
+}
+
+DBusHandlerResult avahi_service_browser_event(AvahiClient *client, AvahiBrowserEvent event, DBusMessage *message) {
+    AvahiServiceBrowser *b = NULL;
+    DBusError error;
+    const char *path;
+    char *name = NULL, *type, *domain;
+    int32_t interface, protocol;
+    uint32_t flags = 0;
+
+    dbus_error_init (&error);
+
+    if (!(path = dbus_message_get_path(message)))
+        goto fail;
+
+    for (b = client->service_browsers; b; b = b->service_browsers_next)
+        if (strcmp (b->path, path) == 0)
+            break;
+
+    if (!b)
+        goto fail;
+
+    type = b->type;
+    domain = b->domain;
+    interface = b->interface;
+    protocol = b->protocol;
+
+    switch (event) {
+        case AVAHI_BROWSER_NEW:
+        case AVAHI_BROWSER_REMOVE:
+
+            if (!dbus_message_get_args (
+                    message, &error,
+                    DBUS_TYPE_INT32, &interface,
+                    DBUS_TYPE_INT32, &protocol,
+                    DBUS_TYPE_STRING, &name,
+                    DBUS_TYPE_STRING, &type,
+                    DBUS_TYPE_STRING, &domain,
+                    DBUS_TYPE_UINT32, &flags,
+                    DBUS_TYPE_INVALID) ||
+                dbus_error_is_set(&error)) {
+                fprintf(stderr, "Failed to parse browser event.\n");
+                goto fail;
+            }
+            break;
+
+        case AVAHI_BROWSER_CACHE_EXHAUSTED:
+        case AVAHI_BROWSER_ALL_FOR_NOW:
+            break;
+
+        case AVAHI_BROWSER_FAILURE: {
+            char *etxt;
+
+            if (!dbus_message_get_args(
+                    message, &error,
+                    DBUS_TYPE_STRING, &etxt,
+                    DBUS_TYPE_INVALID) ||
+                dbus_error_is_set (&error)) {
+                fprintf(stderr, "Failed to parse browser event.\n");
+                goto fail;
+            }
+
+            avahi_client_set_errno(b->client, avahi_error_dbus_to_number(etxt));
+            break;
+        }
+    }
+
+    b->callback(b, (AvahiIfIndex) interface, (AvahiProtocol) protocol, event, name, type, domain, (AvahiLookupResultFlags) flags, b->userdata);
+
+    return DBUS_HANDLER_RESULT_HANDLED;
+
+fail:
+    dbus_error_free (&error);
+    return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
+
+/* AvahiRecordBrowser */
+
+AvahiRecordBrowser* avahi_record_browser_new(
+    AvahiClient *client,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    const char *name,
+    uint16_t clazz,
+    uint16_t type,
+    AvahiLookupFlags flags,
+    AvahiRecordBrowserCallback callback,
+    void *userdata) {
+
+    AvahiRecordBrowser *b = NULL;
+    DBusMessage *message = NULL, *reply = NULL;
+    DBusError error;
+    char *path;
+    int32_t i_protocol, i_interface;
+    uint32_t u_flags;
+
+    assert(client);
+    assert(name);
+    assert(callback);
+
+    dbus_error_init(&error);
+
+    if (!avahi_client_is_connected(client)) {
+        avahi_client_set_errno(client, AVAHI_ERR_BAD_STATE);
+        goto fail;
+    }
+
+    if (!(b = avahi_new(AvahiRecordBrowser, 1))) {
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    b->client = client;
+    b->callback = callback;
+    b->userdata = userdata;
+    b->path = NULL;
+    b->name = NULL;
+    b->clazz = clazz;
+    b->type = type;
+    b->interface = interface;
+    b->protocol = protocol;
+
+    AVAHI_LLIST_PREPEND(AvahiRecordBrowser, record_browsers, client->record_browsers, b);
+
+    if (!(b->name = avahi_strdup(name))) {
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    if (!(message = dbus_message_new_method_call(AVAHI_DBUS_NAME, AVAHI_DBUS_PATH_SERVER, AVAHI_DBUS_INTERFACE_SERVER, "RecordBrowserNew"))) {
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    i_interface = (int32_t) interface;
+    i_protocol = (int32_t) protocol;
+    u_flags = (uint32_t) flags;
+
+    if (!dbus_message_append_args(
+            message,
+            DBUS_TYPE_INT32, &i_interface,
+            DBUS_TYPE_INT32, &i_protocol,
+            DBUS_TYPE_STRING, &name,
+            DBUS_TYPE_UINT16, &clazz,
+            DBUS_TYPE_UINT16, &type,
+            DBUS_TYPE_UINT32, &u_flags,
+            DBUS_TYPE_INVALID)) {
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    if (!(reply = dbus_connection_send_with_reply_and_block (client->bus, message, -1, &error)) ||
+        dbus_error_is_set(&error)) {
+        avahi_client_set_errno(client, AVAHI_ERR_DBUS_ERROR);
+        goto fail;
+    }
+
+    if (!dbus_message_get_args (reply, &error, DBUS_TYPE_OBJECT_PATH, &path, DBUS_TYPE_INVALID) ||
+        dbus_error_is_set(&error) ||
+        !path) {
+        avahi_client_set_errno(client, AVAHI_ERR_DBUS_ERROR);
+        goto fail;
+    }
+
+    if (!(b->path = avahi_strdup(path))) {
+
+        /* FIXME: We don't remove the object on the server side */
+
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    dbus_message_unref(message);
+    dbus_message_unref(reply);
+
+    return b;
+
+fail:
+    if (dbus_error_is_set(&error)) {
+        avahi_client_set_dbus_error(client, &error);
+        dbus_error_free(&error);
+    }
+
+    if (b)
+        avahi_record_browser_free(b);
+
+    if (message)
+        dbus_message_unref(message);
+
+    if (reply)
+        dbus_message_unref(reply);
+
+    return NULL;
+}
+
+AvahiClient* avahi_record_browser_get_client (AvahiRecordBrowser *b) {
+    assert(b);
+    return b->client;
+}
+
+int avahi_record_browser_free (AvahiRecordBrowser *b) {
+    AvahiClient *client;
+    int r = AVAHI_OK;
+
+    assert(b);
+    client = b->client;
+
+    if (b->path && avahi_client_is_connected(b->client))
+        r = avahi_client_simple_method_call(client, b->path, AVAHI_DBUS_INTERFACE_RECORD_BROWSER, "Free");
+
+    AVAHI_LLIST_REMOVE(AvahiRecordBrowser, record_browsers, b->client->record_browsers, b);
+
+    avahi_free(b->path);
+    avahi_free(b->name);
+    avahi_free(b);
+    return r;
+}
+
+DBusHandlerResult avahi_record_browser_event(AvahiClient *client, AvahiBrowserEvent event, DBusMessage *message) {
+    AvahiRecordBrowser *b = NULL;
+    DBusError error;
+    const char *path;
+    char *name;
+    int32_t interface, protocol;
+    uint32_t flags = 0;
+    uint16_t clazz, type;
+    void *rdata = NULL;
+    int rdata_size = 0;
+
+    dbus_error_init (&error);
+
+    if (!(path = dbus_message_get_path(message)))
+        goto fail;
+
+    for (b = client->record_browsers; b; b = b->record_browsers_next)
+        if (strcmp (b->path, path) == 0)
+            break;
+
+    if (!b)
+        goto fail;
+
+    interface = b->interface;
+    protocol = b->protocol;
+    clazz = b->clazz;
+    type = b->type;
+    name = b->name;
+
+    switch (event) {
+        case AVAHI_BROWSER_NEW:
+        case AVAHI_BROWSER_REMOVE: {
+            DBusMessageIter iter, sub;
+            int j;
+
+            if (!dbus_message_get_args (
+                    message, &error,
+                    DBUS_TYPE_INT32, &interface,
+                    DBUS_TYPE_INT32, &protocol,
+                    DBUS_TYPE_STRING, &name,
+                    DBUS_TYPE_UINT16, &clazz,
+                    DBUS_TYPE_UINT16, &type,
+                    DBUS_TYPE_INVALID) ||
+                dbus_error_is_set(&error)) {
+                fprintf(stderr, "Failed to parse browser event.\n");
+                goto fail;
+            }
+
+
+            dbus_message_iter_init(message, &iter);
+
+            for (j = 0; j < 5; j++)
+                dbus_message_iter_next(&iter);
+
+            if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_ARRAY ||
+                dbus_message_iter_get_element_type(&iter) != DBUS_TYPE_BYTE)
+                goto fail;
+
+            dbus_message_iter_recurse(&iter, &sub);
+            dbus_message_iter_get_fixed_array(&sub, &rdata, &rdata_size);
+
+            dbus_message_iter_next(&iter);
+
+            if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_UINT32)
+                goto fail;
+
+            dbus_message_iter_get_basic(&iter, &flags);
+
+            break;
+        }
+
+        case AVAHI_BROWSER_CACHE_EXHAUSTED:
+        case AVAHI_BROWSER_ALL_FOR_NOW:
+            break;
+
+        case AVAHI_BROWSER_FAILURE: {
+            char *etxt;
+
+            if (!dbus_message_get_args(
+                    message, &error,
+                    DBUS_TYPE_STRING, &etxt,
+                    DBUS_TYPE_INVALID) ||
+                dbus_error_is_set (&error)) {
+                fprintf(stderr, "Failed to parse browser event.\n");
+                goto fail;
+            }
+
+            avahi_client_set_errno(b->client, avahi_error_dbus_to_number(etxt));
+            break;
+        }
+    }
+
+    b->callback(b, (AvahiIfIndex) interface, (AvahiProtocol) protocol, event, name, clazz, type, rdata, (size_t) rdata_size, (AvahiLookupResultFlags) flags, b->userdata);
+
+    return DBUS_HANDLER_RESULT_HANDLED;
+
+fail:
+    dbus_error_free (&error);
+    return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
diff --git a/avahi-0.6.31/avahi-client/check-nss-test.c b/avahi-0.6.31/avahi-client/check-nss-test.c
new file mode 100644
index 0000000..7c15500
--- /dev/null
+++ b/avahi-0.6.31/avahi-client/check-nss-test.c
@@ -0,0 +1,31 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+
+#include <avahi-client/client.h>
+
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
+    printf("NSS Support available: %s\n", avahi_nss_support() ? "yes" : "no");
+    return 0;
+}
diff --git a/avahi-0.6.31/avahi-client/check-nss.c b/avahi-0.6.31/avahi-client/check-nss.c
new file mode 100644
index 0000000..ea266c4
--- /dev/null
+++ b/avahi-0.6.31/avahi-client/check-nss.c
@@ -0,0 +1,55 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifdef HAVE_DLOPEN
+#include <dlfcn.h>
+#endif
+#include <stdlib.h>
+
+#include "client.h"
+
+int avahi_nss_support(void) {
+    int b = 0;
+
+#ifdef HAVE_DLOPEN
+    static const char * const libs[] = {
+        "libnss_mdns.so.2",
+        "libnss_mdns4.so.2",
+        "libnss_mdns6.so.2",
+        NULL };
+
+    const char * const *l;
+
+    for (l = libs; *l; l++) {
+        void *dl;
+
+        if ((dl = dlopen(*l, RTLD_LAZY))) {
+            b = 1;
+            dlclose(dl);
+            break;
+        }
+    }
+#endif
+
+    return b;
+}
diff --git a/avahi-0.6.31/avahi-client/client-test.c b/avahi-0.6.31/avahi-client/client-test.c
new file mode 100644
index 0000000..7d04a6a
--- /dev/null
+++ b/avahi-0.6.31/avahi-client/client-test.c
@@ -0,0 +1,328 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <assert.h>
+
+#include <avahi-client/client.h>
+#include <avahi-client/lookup.h>
+#include <avahi-client/publish.h>
+
+#include <avahi-common/error.h>
+#include <avahi-common/simple-watch.h>
+#include <avahi-common/malloc.h>
+#include <avahi-common/timeval.h>
+
+static const AvahiPoll *poll_api = NULL;
+static AvahiSimplePoll *simple_poll = NULL;
+
+static void avahi_client_callback (AvahiClient *c, AvahiClientState state, void *userdata) {
+    printf ("CLIENT: Callback on %p, state -> %d, data -> %s\n", (void*) c, state, (char*)userdata);
+}
+
+static void avahi_entry_group_callback (AvahiEntryGroup *g, AvahiEntryGroupState state, void *userdata) {
+    printf ("ENTRY-GROUP: Callback on %p, state -> %d, data -> %s\n", (void*) g, state, (char*)userdata);
+}
+
+static void avahi_entry_group2_callback (AvahiEntryGroup *g, AvahiEntryGroupState state, void *userdata) {
+    printf ("ENTRY-GROUP2: Callback on %p, state -> %d, data -> %s\n", (void*) g, state, (char*)userdata);
+}
+
+static void avahi_domain_browser_callback(
+    AvahiDomainBrowser *b,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiBrowserEvent event,
+    const char *domain,
+    AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+    void *userdata) {
+
+    printf ("DOMAIN-BROWSER: Callback on %p, interface (%d), protocol (%d), event (%d), domain (%s), data (%s)\n", (void*) b, interface, protocol, event, domain ? domain : "NULL", (char*)userdata);
+}
+
+static void avahi_service_resolver_callback(
+    AvahiServiceResolver *r,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiResolverEvent event,
+    const char *name,
+    const char *type,
+    const char *domain,
+    const char *host_name,
+    const AvahiAddress *a,
+    uint16_t port,
+    AvahiStringList *txt,
+    AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+    void *userdata) {
+
+    char addr[64];
+    char *txtr;
+    if (event == AVAHI_RESOLVER_FAILURE) {
+        printf ("SERVICE-RESOLVER: ServiceResolver %p timed out (%s %s)\n", (void*) r, name, type);
+        return;
+    }
+    avahi_address_snprint (addr, sizeof (addr), a);
+    txtr = avahi_string_list_to_string (txt);
+    printf ("SERVICE-RESOLVER: Callback on ServiceResolver, interface (%d), protocol (%d), event (%d), name (%s), type (%s), domain (%s), host_name (%s), address (%s), port (%d), txtdata (%s), data(%s)\n", interface, protocol, event, name, type, domain, host_name, addr, port, txtr, (char*)userdata);
+    avahi_free(txtr);
+}
+
+static void avahi_service_browser_callback (
+    AvahiServiceBrowser *b,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiBrowserEvent event,
+    const char *name,
+    const char *type,
+    const char *domain,
+    AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+    void *userdata) {
+
+    AvahiServiceResolver *sr;
+
+    printf ("SERVICE-BROWSER: Callback on %p, interface (%d), protocol (%d), event (%d), name (%s), type (%s), domain (%s), data (%s)\n", (void*) b, interface, protocol, event, name ? name : "NULL", type, domain ? domain : "NULL", (char*)userdata);
+
+    if (b && name)
+    {
+        sr = avahi_service_resolver_new (avahi_service_browser_get_client (b), interface, protocol, name, type, domain, AVAHI_PROTO_UNSPEC, 0, avahi_service_resolver_callback, (char*) "xxXXxx");
+        printf("New service resolver %p\n", (void*) sr);
+    }
+}
+
+static void avahi_service_type_browser_callback (
+    AvahiServiceTypeBrowser *b,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiBrowserEvent event,
+    const char *type,
+    const char *domain,
+    AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+    void *userdata) {
+
+    printf ("SERVICE-TYPE-BROWSER: Callback on %p, interface (%d), protocol (%d), event (%d), type (%s), domain (%s), data (%s)\n", (void*) b, interface, protocol, event, type ? type : "NULL", domain ? domain : "NULL", (char*)userdata);
+}
+
+static void avahi_address_resolver_callback (
+    AVAHI_GCC_UNUSED AvahiAddressResolver *r,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiResolverEvent event,
+    const AvahiAddress *address,
+    const char *name,
+    AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+    void *userdata) {
+
+    char addr[64];
+    if (event == AVAHI_RESOLVER_FAILURE) {
+        printf ("ADDRESS-RESOLVER: Callback on AddressResolver, timed out.\n");
+        return;
+    }
+    avahi_address_snprint (addr, sizeof (addr), address);
+    printf ("ADDRESS-RESOLVER: Callback on AddressResolver, interface (%d), protocol (%d), even (%d), address (%s), name (%s), data(%s)\n", interface, protocol, event, addr, name, (char*) userdata);
+}
+
+static void avahi_host_name_resolver_callback (
+    AvahiHostNameResolver *r,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiResolverEvent event,
+    const char *name,
+    const AvahiAddress *a,
+    AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+    void *userdata) {
+
+    AvahiClient *client;
+    AvahiAddressResolver *ar;
+    char addr[64];
+
+    if (event == AVAHI_RESOLVER_FAILURE) {
+        printf ("HOST-NAME-RESOLVER: Callback on HostNameResolver, timed out.\n");
+        return;
+    }
+    client = avahi_host_name_resolver_get_client (r);
+ar = avahi_address_resolver_new(client, interface, protocol, a, 0, avahi_address_resolver_callback, (char*) "omghai6u");
+    if (ar)
+    {
+        printf ("Succesfully created address resolver object\n");
+    } else {
+        printf ("Failed to create AddressResolver\n");
+    }
+    avahi_address_snprint (addr, sizeof (addr), a);
+    printf ("HOST-NAME-RESOLVER: Callback on HostNameResolver, interface (%d), protocol (%d), event (%d), name (%s), address (%s), data (%s)\n", interface, protocol, event, name, addr, (char*)userdata);
+}
+static void test_free_domain_browser(AVAHI_GCC_UNUSED AvahiTimeout *timeout, void* userdata)
+{
+    AvahiServiceBrowser *b = userdata;
+    printf ("Freeing domain browser\n");
+    avahi_service_browser_free (b);
+}
+
+static void test_free_entry_group (AVAHI_GCC_UNUSED AvahiTimeout *timeout, void* userdata)
+{
+    AvahiEntryGroup *g = userdata;
+    printf ("Freeing entry group\n");
+    avahi_entry_group_free (g);
+}
+
+static void test_entry_group_reset (AVAHI_GCC_UNUSED AvahiTimeout *timeout, void* userdata)
+{
+    AvahiEntryGroup *g = userdata;
+
+    printf ("Resetting entry group\n");
+    avahi_entry_group_reset (g);
+
+    avahi_entry_group_add_service (g, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "Lathiat's Site", "_http._tcp", NULL, NULL, 80, "foo=bar2", NULL);
+
+    avahi_entry_group_commit (g);
+}
+
+static void test_entry_group_update(AVAHI_GCC_UNUSED AvahiTimeout *timeout, void* userdata) {
+    AvahiEntryGroup *g = userdata;
+
+    printf ("Updating entry group\n");
+
+    avahi_entry_group_update_service_txt(g, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "Lathiat's Site", "_http._tcp", NULL, "foo=bar3", NULL);
+}
+
+static void terminate(AVAHI_GCC_UNUSED AvahiTimeout *timeout, AVAHI_GCC_UNUSED void *userdata) {
+
+    avahi_simple_poll_quit(simple_poll);
+}
+
+int main (AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
+    AvahiClient *avahi;
+    AvahiEntryGroup *group, *group2;
+    AvahiDomainBrowser *domain;
+    AvahiServiceBrowser *sb;
+    AvahiServiceTypeBrowser *st;
+    AvahiHostNameResolver *hnr;
+    AvahiAddress *aar;
+    const char *ret;
+    int error;
+    uint32_t cookie;
+    struct timeval tv;
+    AvahiAddress a;
+
+    simple_poll = avahi_simple_poll_new();
+    poll_api = avahi_simple_poll_get(simple_poll);
+
+    if (!(avahi = avahi_client_new(poll_api, 0, avahi_client_callback, (char*) "omghai2u", &error))) {
+        fprintf(stderr, "Client failed: %s\n", avahi_strerror(error));
+        goto fail;
+    }
+
+    printf("State: %i\n", avahi_client_get_state(avahi));
+
+    ret = avahi_client_get_version_string (avahi);
+    printf("Avahi Server Version: %s (Error Return: %s)\n", ret, ret ? "OK" : avahi_strerror(avahi_client_errno(avahi)));
+
+    ret = avahi_client_get_host_name (avahi);
+    printf("Host Name: %s (Error Return: %s)\n", ret, ret ? "OK" : avahi_strerror(avahi_client_errno(avahi)));
+
+    ret = avahi_client_get_domain_name (avahi);
+    printf("Domain Name: %s (Error Return: %s)\n", ret, ret ? "OK" : avahi_strerror(avahi_client_errno(avahi)));
+
+    ret = avahi_client_get_host_name_fqdn (avahi);
+    printf("FQDN: %s (Error Return: %s)\n", ret, ret ? "OK" : avahi_strerror(avahi_client_errno(avahi)));
+
+    cookie = avahi_client_get_local_service_cookie(avahi);
+    printf("Local service cookie: %u (Error Return: %s)\n", cookie, cookie != AVAHI_SERVICE_COOKIE_INVALID ? "OK" : avahi_strerror(avahi_client_errno(avahi)));
+
+    group = avahi_entry_group_new(avahi, avahi_entry_group_callback, (char*) "omghai");
+    printf("Creating entry group: %s\n", group ? "OK" : avahi_strerror(avahi_client_errno (avahi)));
+
+    assert(group);
+
+    printf("Sucessfully created entry group %p\n", (void*) group);
+
+    printf("%s\n", avahi_strerror(avahi_entry_group_add_service (group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "Lathiat's Site", "_http._tcp", NULL, NULL, 80, "foo=bar", NULL)));
+    printf("add_record: %d\n", avahi_entry_group_add_record (group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "TestX", 0x01, 0x10, 120, "\5booya", 6));
+
+    avahi_entry_group_commit (group);
+
+    domain = avahi_domain_browser_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, NULL, AVAHI_DOMAIN_BROWSER_BROWSE, 0, avahi_domain_browser_callback, (char*) "omghai3u");
+
+    if (domain == NULL)
+        printf ("Failed to create domain browser object\n");
+    else
+        printf ("Sucessfully created domain browser %p\n", (void*) domain);
+
+    st = avahi_service_type_browser_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, NULL, 0, avahi_service_type_browser_callback, (char*) "omghai3u");
+    if (st == NULL)
+        printf ("Failed to create service type browser object\n");
+    else
+        printf ("Sucessfully created service type browser %p\n", (void*) st);
+
+    sb = avahi_service_browser_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, "_http._tcp", NULL, 0, avahi_service_browser_callback, (char*) "omghai3u");
+    if (sb == NULL)
+        printf ("Failed to create service browser object\n");
+    else
+        printf ("Sucessfully created service browser %p\n", (void*) sb);
+
+    hnr = avahi_host_name_resolver_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, "ecstasy.local", AVAHI_PROTO_UNSPEC, 0, avahi_host_name_resolver_callback, (char*) "omghai4u");
+    if (hnr == NULL)
+        printf ("Failed to create hostname resolver object\n");
+    else
+        printf ("Successfully created hostname resolver object\n");
+
+    aar = avahi_address_parse ("224.0.0.251", AVAHI_PROTO_UNSPEC, &a);
+    if (aar == NULL) {
+        printf ("failed to create address object\n");
+    } else {
+        group2 = avahi_entry_group_new (avahi, avahi_entry_group2_callback, (char*) "omghai222");
+        if ((error = avahi_entry_group_add_address (group2, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "test-mdns.local.", aar)) < 0)
+        {
+            printf ("*** failed to add address to entry group: %s\n", avahi_strerror (error));
+            avahi_entry_group_free (group2);
+        } else {
+            printf ("*** success, added address\n");
+            avahi_entry_group_commit (group2);
+        }
+    }
+
+    avahi_elapse_time(&tv, 8000, 0);
+    poll_api->timeout_new(poll_api, &tv, test_entry_group_reset, group);
+    avahi_elapse_time(&tv, 15000, 0);
+    poll_api->timeout_new(poll_api, &tv, test_entry_group_update, group);
+    avahi_elapse_time(&tv, 20000, 0);
+    poll_api->timeout_new(poll_api, &tv, test_free_entry_group, group);
+    avahi_elapse_time(&tv, 25000, 0);
+    poll_api->timeout_new(poll_api, &tv, test_free_domain_browser, sb);
+
+    avahi_elapse_time(&tv, 30000, 0);
+    poll_api->timeout_new(poll_api, &tv, terminate, NULL);
+
+    avahi_simple_poll_loop(simple_poll);
+
+    printf("terminating...\n");
+
+fail:
+
+    if (avahi)
+        avahi_client_free (avahi);
+
+    if (simple_poll)
+        avahi_simple_poll_free(simple_poll);
+
+    return 0;
+}
diff --git a/avahi-0.6.31/avahi-client/client.c b/avahi-0.6.31/avahi-client/client.c
new file mode 100644
index 0000000..70cc35d
--- /dev/null
+++ b/avahi-0.6.31/avahi-client/client.c
@@ -0,0 +1,958 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include <dbus/dbus.h>
+
+#include <avahi-common/dbus.h>
+#include <avahi-common/llist.h>
+#include <avahi-common/error.h>
+#include <avahi-common/dbus.h>
+#include <avahi-common/malloc.h>
+#include <avahi-common/dbus-watch-glue.h>
+#include <avahi-common/i18n.h>
+
+#include "client.h"
+#include "internal.h"
+
+#define AVAHI_CLIENT_DBUS_API_SUPPORTED ((uint32_t) 0x0201)
+
+static int init_server(AvahiClient *client, int *ret_error);
+
+int avahi_client_set_errno (AvahiClient *client, int error) {
+    assert(client);
+
+    return client->error = error;
+}
+
+int avahi_client_set_dbus_error(AvahiClient *client, DBusError *error) {
+    assert(client);
+    assert(error);
+
+    return avahi_client_set_errno(client, avahi_error_dbus_to_number(error->name));
+}
+
+static void client_set_state(AvahiClient *client, AvahiClientState state) {
+    assert(client);
+
+    if (client->state == state)
+        return;
+
+    client->state = state;
+
+    switch (client->state) {
+        case AVAHI_CLIENT_FAILURE:
+            if (client->bus) {
+#ifdef HAVE_DBUS_CONNECTION_CLOSE
+                dbus_connection_close(client->bus);
+#else
+                dbus_connection_disconnect(client->bus);
+#endif
+                dbus_connection_unref(client->bus);
+                client->bus = NULL;
+            }
+
+            /* Fall through */
+
+        case AVAHI_CLIENT_S_COLLISION:
+        case AVAHI_CLIENT_S_REGISTERING:
+
+            /* Clear cached strings */
+            avahi_free(client->host_name);
+            avahi_free(client->host_name_fqdn);
+            avahi_free(client->domain_name);
+
+            client->host_name =  NULL;
+            client->host_name_fqdn = NULL;
+            client->domain_name = NULL;
+            break;
+
+        case AVAHI_CLIENT_S_RUNNING:
+        case AVAHI_CLIENT_CONNECTING:
+            break;
+
+    }
+
+    if (client->callback)
+        client->callback (client, state, client->userdata);
+}
+
+static DBusHandlerResult filter_func(DBusConnection *bus, DBusMessage *message, void *userdata) {
+    AvahiClient *client = userdata;
+    DBusError error;
+
+    assert(bus);
+    assert(message);
+
+    dbus_error_init(&error);
+
+/*     fprintf(stderr, "dbus: interface=%s, path=%s, member=%s\n", */
+/*             dbus_message_get_interface (message), */
+/*             dbus_message_get_path (message), */
+/*             dbus_message_get_member (message)); */
+
+    if (dbus_message_is_signal(message, DBUS_INTERFACE_LOCAL, "Disconnected")) {
+
+        /* The DBUS server died or kicked us */
+        avahi_client_set_errno(client, AVAHI_ERR_DISCONNECTED);
+        goto fail;
+
+    } else if (dbus_message_is_signal(message, DBUS_INTERFACE_DBUS, "NameAcquired")) {
+
+        /* Ignore this message */
+
+    } else if (dbus_message_is_signal(message, DBUS_INTERFACE_DBUS, "NameOwnerChanged")) {
+        char *name, *old, *new;
+
+        if (!dbus_message_get_args(
+                  message, &error,
+                  DBUS_TYPE_STRING, &name,
+                  DBUS_TYPE_STRING, &old,
+                  DBUS_TYPE_STRING, &new,
+                  DBUS_TYPE_INVALID) || dbus_error_is_set(&error)) {
+
+            fprintf(stderr, "WARNING: Failed to parse NameOwnerChanged signal: %s\n", error.message);
+            avahi_client_set_errno(client, AVAHI_ERR_DBUS_ERROR);
+            goto fail;
+        }
+
+        if (strcmp(name, AVAHI_DBUS_NAME) == 0) {
+
+            if (old[0] &&
+                avahi_client_is_connected(client)) {
+
+                /* Regardless if the server lost its name or
+                 * if the name was transfered: our services are no longer
+                 * available, so we disconnect ourselves */
+                avahi_client_set_errno(client, AVAHI_ERR_DISCONNECTED);
+                goto fail;
+
+            } else if (client->state == AVAHI_CLIENT_CONNECTING && (!old || *old == 0)) {
+                int ret;
+
+                /* Server appeared */
+
+                if ((ret = init_server(client, NULL)) < 0) {
+                    avahi_client_set_errno(client, ret);
+                    goto fail;
+                }
+            }
+        }
+
+    } else if (!avahi_client_is_connected(client)) {
+
+        /* Ignore messages we get in unconnected state */
+
+    } else if (dbus_message_is_signal (message, AVAHI_DBUS_INTERFACE_SERVER, "StateChanged")) {
+        int32_t state;
+        char *e = NULL;
+        int c;
+
+        if (!dbus_message_get_args(
+                  message, &error,
+                  DBUS_TYPE_INT32, &state,
+                  DBUS_TYPE_STRING, &e,
+                  DBUS_TYPE_INVALID) || dbus_error_is_set (&error)) {
+
+            fprintf(stderr, "WARNING: Failed to parse Server.StateChanged signal: %s\n", error.message);
+            avahi_client_set_errno(client, AVAHI_ERR_DBUS_ERROR);
+            goto fail;
+        }
+
+        if ((c = avahi_error_dbus_to_number(e)) != AVAHI_OK)
+            avahi_client_set_errno(client, c);
+
+        client_set_state(client, (AvahiClientState) state);
+
+    } else if (dbus_message_is_signal (message, AVAHI_DBUS_INTERFACE_ENTRY_GROUP, "StateChanged")) {
+        const char *path;
+        AvahiEntryGroup *g;
+        path = dbus_message_get_path(message);
+
+        for (g = client->groups; g; g = g->groups_next)
+            if (strcmp(g->path, path) == 0)
+                break;
+
+        if (g) {
+            int32_t state;
+            char *e;
+            int c;
+
+            if (!dbus_message_get_args(
+                      message, &error,
+                      DBUS_TYPE_INT32, &state,
+                      DBUS_TYPE_STRING, &e,
+                      DBUS_TYPE_INVALID) ||
+                dbus_error_is_set(&error)) {
+
+                fprintf(stderr, "WARNING: Failed to parse EntryGroup.StateChanged signal: %s\n", error.message);
+                avahi_client_set_errno(client, AVAHI_ERR_DBUS_ERROR);
+                goto fail;
+            }
+
+            if ((c = avahi_error_dbus_to_number(e)) != AVAHI_OK)
+                avahi_client_set_errno(client, c);
+
+            avahi_entry_group_set_state(g, state);
+        }
+
+    } else if (dbus_message_is_signal(message, AVAHI_DBUS_INTERFACE_DOMAIN_BROWSER, "ItemNew"))
+        return avahi_domain_browser_event(client, AVAHI_BROWSER_NEW, message);
+    else if (dbus_message_is_signal (message, AVAHI_DBUS_INTERFACE_DOMAIN_BROWSER, "ItemRemove"))
+        return avahi_domain_browser_event(client, AVAHI_BROWSER_REMOVE, message);
+    else if (dbus_message_is_signal (message, AVAHI_DBUS_INTERFACE_DOMAIN_BROWSER, "CacheExhausted"))
+        return avahi_domain_browser_event(client, AVAHI_BROWSER_CACHE_EXHAUSTED, message);
+    else if (dbus_message_is_signal (message, AVAHI_DBUS_INTERFACE_DOMAIN_BROWSER, "AllForNow"))
+        return avahi_domain_browser_event(client, AVAHI_BROWSER_ALL_FOR_NOW, message);
+    else if (dbus_message_is_signal (message, AVAHI_DBUS_INTERFACE_DOMAIN_BROWSER, "Failure"))
+        return avahi_domain_browser_event(client, AVAHI_BROWSER_FAILURE, message);
+
+    else if (dbus_message_is_signal(message, AVAHI_DBUS_INTERFACE_SERVICE_TYPE_BROWSER, "ItemNew"))
+        return avahi_service_type_browser_event (client, AVAHI_BROWSER_NEW, message);
+    else if (dbus_message_is_signal(message, AVAHI_DBUS_INTERFACE_SERVICE_TYPE_BROWSER, "ItemRemove"))
+        return avahi_service_type_browser_event (client, AVAHI_BROWSER_REMOVE, message);
+    else if (dbus_message_is_signal(message, AVAHI_DBUS_INTERFACE_SERVICE_TYPE_BROWSER, "CacheExhausted"))
+        return avahi_service_type_browser_event (client, AVAHI_BROWSER_CACHE_EXHAUSTED, message);
+    else if (dbus_message_is_signal(message, AVAHI_DBUS_INTERFACE_SERVICE_TYPE_BROWSER, "AllForNow"))
+        return avahi_service_type_browser_event (client, AVAHI_BROWSER_ALL_FOR_NOW, message);
+    else if (dbus_message_is_signal(message, AVAHI_DBUS_INTERFACE_SERVICE_TYPE_BROWSER, "Failure"))
+        return avahi_service_type_browser_event (client, AVAHI_BROWSER_FAILURE, message);
+
+    else if (dbus_message_is_signal(message, AVAHI_DBUS_INTERFACE_SERVICE_BROWSER, "ItemNew"))
+        return avahi_service_browser_event (client, AVAHI_BROWSER_NEW, message);
+    else if (dbus_message_is_signal(message, AVAHI_DBUS_INTERFACE_SERVICE_BROWSER, "ItemRemove"))
+        return avahi_service_browser_event (client, AVAHI_BROWSER_REMOVE, message);
+    else if (dbus_message_is_signal(message, AVAHI_DBUS_INTERFACE_SERVICE_BROWSER, "CacheExhausted"))
+        return avahi_service_browser_event (client, AVAHI_BROWSER_CACHE_EXHAUSTED, message);
+    else if (dbus_message_is_signal(message, AVAHI_DBUS_INTERFACE_SERVICE_BROWSER, "AllForNow"))
+        return avahi_service_browser_event (client, AVAHI_BROWSER_ALL_FOR_NOW, message);
+    else if (dbus_message_is_signal(message, AVAHI_DBUS_INTERFACE_SERVICE_BROWSER, "Failure"))
+        return avahi_service_browser_event (client, AVAHI_BROWSER_FAILURE, message);
+
+    else if (dbus_message_is_signal(message, AVAHI_DBUS_INTERFACE_SERVICE_RESOLVER, "Found"))
+        return avahi_service_resolver_event (client, AVAHI_RESOLVER_FOUND, message);
+    else if (dbus_message_is_signal(message, AVAHI_DBUS_INTERFACE_SERVICE_RESOLVER, "Failure"))
+        return avahi_service_resolver_event (client, AVAHI_RESOLVER_FAILURE, message);
+
+    else if (dbus_message_is_signal(message, AVAHI_DBUS_INTERFACE_HOST_NAME_RESOLVER, "Found"))
+        return avahi_host_name_resolver_event (client, AVAHI_RESOLVER_FOUND, message);
+    else if (dbus_message_is_signal(message, AVAHI_DBUS_INTERFACE_HOST_NAME_RESOLVER, "Failure"))
+        return avahi_host_name_resolver_event (client, AVAHI_RESOLVER_FAILURE, message);
+
+    else if (dbus_message_is_signal(message, AVAHI_DBUS_INTERFACE_ADDRESS_RESOLVER, "Found"))
+        return avahi_address_resolver_event (client, AVAHI_RESOLVER_FOUND, message);
+    else if (dbus_message_is_signal(message, AVAHI_DBUS_INTERFACE_ADDRESS_RESOLVER, "Failure"))
+        return avahi_address_resolver_event (client, AVAHI_RESOLVER_FAILURE, message);
+
+    else if (dbus_message_is_signal(message, AVAHI_DBUS_INTERFACE_RECORD_BROWSER, "ItemNew"))
+        return avahi_record_browser_event (client, AVAHI_BROWSER_NEW, message);
+    else if (dbus_message_is_signal(message, AVAHI_DBUS_INTERFACE_RECORD_BROWSER, "ItemRemove"))
+        return avahi_record_browser_event (client, AVAHI_BROWSER_REMOVE, message);
+    else if (dbus_message_is_signal(message, AVAHI_DBUS_INTERFACE_RECORD_BROWSER, "CacheExhausted"))
+        return avahi_record_browser_event (client, AVAHI_BROWSER_CACHE_EXHAUSTED, message);
+    else if (dbus_message_is_signal(message, AVAHI_DBUS_INTERFACE_RECORD_BROWSER, "AllForNow"))
+        return avahi_record_browser_event (client, AVAHI_BROWSER_ALL_FOR_NOW, message);
+    else if (dbus_message_is_signal(message, AVAHI_DBUS_INTERFACE_RECORD_BROWSER, "Failure"))
+        return avahi_record_browser_event (client, AVAHI_BROWSER_FAILURE, message);
+
+    else {
+
+        fprintf(stderr, "WARNING: Unhandled message: interface=%s, path=%s, member=%s\n",
+               dbus_message_get_interface(message),
+               dbus_message_get_path(message),
+               dbus_message_get_member(message));
+
+        return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+    }
+
+    return DBUS_HANDLER_RESULT_HANDLED;
+
+fail:
+
+    if (dbus_error_is_set(&error)) {
+        avahi_client_set_errno(client, avahi_error_dbus_to_number(error.name));
+        dbus_error_free(&error);
+    }
+
+    client_set_state(client, AVAHI_CLIENT_FAILURE);
+
+    return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
+
+static int get_server_state(AvahiClient *client, int *ret_error) {
+    DBusMessage *message = NULL, *reply = NULL;
+    DBusError error;
+    int32_t state;
+    int e = AVAHI_ERR_NO_MEMORY;
+
+    assert(client);
+
+    dbus_error_init(&error);
+
+    if (!(message = dbus_message_new_method_call(AVAHI_DBUS_NAME, AVAHI_DBUS_PATH_SERVER, AVAHI_DBUS_INTERFACE_SERVER, "GetState")))
+        goto fail;
+
+    reply = dbus_connection_send_with_reply_and_block (client->bus, message, -1, &error);
+
+    if (!reply || dbus_error_is_set (&error))
+        goto fail;
+
+    if (!dbus_message_get_args(reply, &error, DBUS_TYPE_INT32, &state, DBUS_TYPE_INVALID) ||
+        dbus_error_is_set (&error))
+        goto fail;
+
+    client_set_state(client, (AvahiClientState) state);
+
+    dbus_message_unref(message);
+    dbus_message_unref(reply);
+
+    return AVAHI_OK;
+
+fail:
+    if (dbus_error_is_set(&error)) {
+        e = avahi_error_dbus_to_number (error.name);
+        dbus_error_free(&error);
+    }
+
+    if (ret_error)
+        *ret_error = e;
+
+    if (message)
+        dbus_message_unref(message);
+    if (reply)
+        dbus_message_unref(reply);
+
+    return e;
+}
+
+static int check_version(AvahiClient *client, int *ret_error) {
+    DBusMessage *message = NULL, *reply  = NULL;
+    DBusError error;
+    uint32_t version;
+    int e = AVAHI_ERR_NO_MEMORY;
+
+    assert(client);
+
+    dbus_error_init(&error);
+
+    if (!(message = dbus_message_new_method_call(AVAHI_DBUS_NAME, AVAHI_DBUS_PATH_SERVER, AVAHI_DBUS_INTERFACE_SERVER, "GetAPIVersion")))
+        goto fail;
+
+    reply = dbus_connection_send_with_reply_and_block (client->bus, message, -1, &error);
+
+    if (!reply || dbus_error_is_set (&error)) {
+        char *version_str;
+
+        if (!dbus_error_is_set(&error) || strcmp(error.name, DBUS_ERROR_UNKNOWN_METHOD))
+            goto fail;
+
+        /* If the method GetAPIVersion is not known, we look if
+         * GetVersionString matches "avahi 0.6" which is the only
+         * version we support which doesn't have GetAPIVersion() .*/
+
+        dbus_message_unref(message);
+        if (reply) dbus_message_unref(reply);
+        dbus_error_free(&error);
+
+        if (!(message = dbus_message_new_method_call(AVAHI_DBUS_NAME, AVAHI_DBUS_PATH_SERVER, AVAHI_DBUS_INTERFACE_SERVER, "GetVersionString")))
+            goto fail;
+
+        reply = dbus_connection_send_with_reply_and_block (client->bus, message, -1, &error);
+
+        if (!reply || dbus_error_is_set (&error))
+            goto fail;
+
+        if (!dbus_message_get_args (reply, &error, DBUS_TYPE_STRING, &version_str, DBUS_TYPE_INVALID) ||
+            dbus_error_is_set (&error))
+            goto fail;
+
+        version = strcmp(version_str, "avahi 0.6") == 0 ? 0x0201 : 0x0000;
+
+    } else {
+
+        if (!dbus_message_get_args (reply, &error, DBUS_TYPE_UINT32, &version, DBUS_TYPE_INVALID) ||
+            dbus_error_is_set(&error))
+            goto fail;
+    }
+
+    /*fprintf(stderr, "API Version 0x%04x\n", version);*/
+
+    if ((version & 0xFF00) != (AVAHI_CLIENT_DBUS_API_SUPPORTED & 0xFF00) ||
+        (version & 0x00FF) < (AVAHI_CLIENT_DBUS_API_SUPPORTED & 0x00FF)) {
+        e = AVAHI_ERR_VERSION_MISMATCH;
+        goto fail;
+    }
+
+    dbus_message_unref(message);
+    dbus_message_unref(reply);
+
+    return AVAHI_OK;
+
+fail:
+    if (dbus_error_is_set(&error)) {
+        e = avahi_error_dbus_to_number (error.name);
+        dbus_error_free(&error);
+    }
+
+    if (ret_error)
+        *ret_error = e;
+
+    if (message)
+        dbus_message_unref(message);
+    if (reply)
+        dbus_message_unref(reply);
+
+    return e;
+}
+
+static int init_server(AvahiClient *client, int *ret_error) {
+    int r;
+
+    if ((r = check_version(client, ret_error)) < 0)
+        return r;
+
+    if ((r = get_server_state(client, ret_error)) < 0)
+        return r;
+
+    return AVAHI_OK;
+}
+
+/* This function acts like dbus_bus_get but creates a private
+ * connection instead.  */
+static DBusConnection* avahi_dbus_bus_get(DBusError *error) {
+    DBusConnection *c;
+
+#ifdef HAVE_DBUS_BUS_GET_PRIVATE
+    if (!(c = dbus_bus_get_private(DBUS_BUS_SYSTEM, error)))
+        return NULL;
+
+    dbus_connection_set_exit_on_disconnect(c, FALSE);
+#else
+    const char *a;
+
+    if (!(a = getenv("DBUS_SYSTEM_BUS_ADDRESS")) || !*a)
+        a = DBUS_SYSTEM_BUS_DEFAULT_ADDRESS;
+
+    if (!(c = dbus_connection_open_private(a, error)))
+        return NULL;
+
+    dbus_connection_set_exit_on_disconnect(c, FALSE);
+
+    if (!dbus_bus_register(c, error)) {
+#ifdef HAVE_DBUS_CONNECTION_CLOSE
+        dbus_connection_close(c);
+#else
+        dbus_connection_disconnect(c);
+#endif
+        dbus_connection_unref(c);
+        return NULL;
+    }
+#endif
+
+    return c;
+}
+
+AvahiClient *avahi_client_new(const AvahiPoll *poll_api, AvahiClientFlags flags, AvahiClientCallback callback, void *userdata, int *ret_error) {
+    AvahiClient *client = NULL;
+    DBusError error;
+    DBusMessage *message = NULL, *reply = NULL;
+
+    avahi_init_i18n();
+
+    dbus_error_init(&error);
+
+    if (!(client = avahi_new(AvahiClient, 1))) {
+        if (ret_error)
+            *ret_error = AVAHI_ERR_NO_MEMORY;
+        goto fail;
+    }
+
+    client->poll_api = poll_api;
+    client->error = AVAHI_OK;
+    client->callback = callback;
+    client->userdata = userdata;
+    client->state = (AvahiClientState) -1;
+    client->flags = flags;
+
+    client->host_name = NULL;
+    client->host_name_fqdn = NULL;
+    client->domain_name = NULL;
+    client->version_string = NULL;
+    client->local_service_cookie_valid = 0;
+
+    AVAHI_LLIST_HEAD_INIT(AvahiEntryGroup, client->groups);
+    AVAHI_LLIST_HEAD_INIT(AvahiDomainBrowser, client->domain_browsers);
+    AVAHI_LLIST_HEAD_INIT(AvahiServiceBrowser, client->service_browsers);
+    AVAHI_LLIST_HEAD_INIT(AvahiServiceTypeBrowser, client->service_type_browsers);
+    AVAHI_LLIST_HEAD_INIT(AvahiServiceResolver, client->service_resolvers);
+    AVAHI_LLIST_HEAD_INIT(AvahiHostNameResolver, client->host_name_resolvers);
+    AVAHI_LLIST_HEAD_INIT(AvahiAddressResolver, client->address_resolvers);
+    AVAHI_LLIST_HEAD_INIT(AvahiRecordBrowser, client->record_browsers);
+
+    if (!(client->bus = avahi_dbus_bus_get(&error)) || dbus_error_is_set(&error)) {
+        if (ret_error)
+            *ret_error = AVAHI_ERR_DBUS_ERROR;
+        goto fail;
+    }
+
+    if (avahi_dbus_connection_glue(client->bus, poll_api) < 0) {
+        if (ret_error)
+            *ret_error = AVAHI_ERR_NO_MEMORY; /* Not optimal */
+        goto fail;
+    }
+
+    if (!dbus_connection_add_filter(client->bus, filter_func, client, NULL)) {
+        if (ret_error)
+            *ret_error = AVAHI_ERR_NO_MEMORY;
+        goto fail;
+    }
+
+    dbus_bus_add_match(
+        client->bus,
+        "type='signal', "
+        "interface='" AVAHI_DBUS_INTERFACE_SERVER "', "
+        "sender='" AVAHI_DBUS_NAME "', "
+        "path='" AVAHI_DBUS_PATH_SERVER "'",
+        &error);
+
+    if (dbus_error_is_set(&error))
+        goto fail;
+
+    dbus_bus_add_match (
+        client->bus,
+        "type='signal', "
+        "interface='" DBUS_INTERFACE_DBUS "', "
+        "sender='" DBUS_SERVICE_DBUS "', "
+        "path='" DBUS_PATH_DBUS "'",
+        &error);
+
+    if (dbus_error_is_set(&error))
+        goto fail;
+
+    dbus_bus_add_match(
+        client->bus,
+        "type='signal', "
+        "interface='" DBUS_INTERFACE_LOCAL "'",
+        &error);
+
+    if (dbus_error_is_set(&error))
+        goto fail;
+
+    if (!(message = dbus_message_new_method_call(AVAHI_DBUS_NAME, AVAHI_DBUS_PATH_SERVER, "org.freedesktop.DBus.Peer", "Ping")))
+        goto fail;
+
+    reply = dbus_connection_send_with_reply_and_block (client->bus, message, -1, &error);
+
+    if (!reply || dbus_error_is_set (&error)) {
+        /* We free the error so its not set, that way the fail target
+         * will return the NO_DAEMON error rather than a DBUS error */
+        dbus_error_free(&error);
+
+        if (!(flags & AVAHI_CLIENT_NO_FAIL)) {
+
+            if (ret_error)
+                *ret_error = AVAHI_ERR_NO_DAEMON;
+
+            goto fail;
+        }
+
+        /* The user doesn't want this call to fail if the daemon is not
+         * available, so let's return succesfully */
+        client_set_state(client, AVAHI_CLIENT_CONNECTING);
+
+    } else {
+
+        if (init_server(client, ret_error) < 0)
+            goto fail;
+    }
+
+    dbus_message_unref(message);
+
+    if (reply)
+        dbus_message_unref(reply);
+
+    return client;
+
+fail:
+
+    if (message)
+        dbus_message_unref(message);
+    if (reply)
+        dbus_message_unref(reply);
+
+    if (client)
+        avahi_client_free(client);
+
+    if (dbus_error_is_set(&error)) {
+
+        if (ret_error) {
+            if (strcmp(error.name, DBUS_ERROR_FILE_NOT_FOUND) == 0)
+                /* DBUS returns this error when the DBUS daemon is not running */
+                *ret_error = AVAHI_ERR_NO_DAEMON;
+            else
+                *ret_error = avahi_error_dbus_to_number(error.name);
+        }
+
+        dbus_error_free(&error);
+    }
+
+    return NULL;
+}
+
+void avahi_client_free(AvahiClient *client) {
+    assert(client);
+
+    if (client->bus)
+        /* Disconnect in advance, so that the free() functions won't
+         * issue needless server calls */
+#ifdef HAVE_DBUS_CONNECTION_CLOSE
+        dbus_connection_close(client->bus);
+#else
+        dbus_connection_disconnect(client->bus);
+#endif
+
+    while (client->groups)
+        avahi_entry_group_free(client->groups);
+
+    while (client->domain_browsers)
+        avahi_domain_browser_free(client->domain_browsers);
+
+    while (client->service_browsers)
+        avahi_service_browser_free(client->service_browsers);
+
+    while (client->service_type_browsers)
+        avahi_service_type_browser_free(client->service_type_browsers);
+
+    while (client->service_resolvers)
+        avahi_service_resolver_free(client->service_resolvers);
+
+    while (client->host_name_resolvers)
+        avahi_host_name_resolver_free(client->host_name_resolvers);
+
+    while (client->address_resolvers)
+        avahi_address_resolver_free(client->address_resolvers);
+
+    while (client->record_browsers)
+        avahi_record_browser_free(client->record_browsers);
+
+    if (client->bus)
+        dbus_connection_unref(client->bus);
+
+    avahi_free(client->version_string);
+    avahi_free(client->host_name);
+    avahi_free(client->host_name_fqdn);
+    avahi_free(client->domain_name);
+
+    avahi_free(client);
+}
+
+static char* avahi_client_get_string_reply_and_block (AvahiClient *client, const char *method, const char *param) {
+    DBusMessage *message = NULL, *reply = NULL;
+    DBusError error;
+    char *ret, *n;
+
+    assert(client);
+    assert(method);
+
+    dbus_error_init (&error);
+
+    if (!(message = dbus_message_new_method_call (AVAHI_DBUS_NAME, AVAHI_DBUS_PATH_SERVER, AVAHI_DBUS_INTERFACE_SERVER, method))) {
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    if (param) {
+        if (!dbus_message_append_args (message, DBUS_TYPE_STRING, &param, DBUS_TYPE_INVALID)) {
+            avahi_client_set_errno (client, AVAHI_ERR_NO_MEMORY);
+            goto fail;
+        }
+    }
+
+    reply = dbus_connection_send_with_reply_and_block (client->bus, message, -1, &error);
+
+    if (!reply || dbus_error_is_set (&error))
+        goto fail;
+
+    if (!dbus_message_get_args (reply, &error, DBUS_TYPE_STRING, &ret, DBUS_TYPE_INVALID) ||
+        dbus_error_is_set (&error))
+        goto fail;
+
+    if (!(n = avahi_strdup(ret))) {
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    dbus_message_unref(message);
+    dbus_message_unref(reply);
+
+    return n;
+
+fail:
+
+    if (message)
+        dbus_message_unref(message);
+    if (reply)
+        dbus_message_unref(reply);
+
+    if (dbus_error_is_set(&error)) {
+        avahi_client_set_dbus_error(client, &error);
+        dbus_error_free(&error);
+    }
+
+    return NULL;
+}
+
+const char* avahi_client_get_version_string(AvahiClient *client) {
+    assert(client);
+
+    if (!avahi_client_is_connected(client)) {
+        avahi_client_set_errno(client, AVAHI_ERR_BAD_STATE);
+        return NULL;
+    }
+
+    if (!client->version_string)
+        client->version_string = avahi_client_get_string_reply_and_block(client, "GetVersionString", NULL);
+
+    return client->version_string;
+}
+
+const char* avahi_client_get_domain_name(AvahiClient *client) {
+    assert(client);
+
+    if (!avahi_client_is_connected(client)) {
+        avahi_client_set_errno(client, AVAHI_ERR_BAD_STATE);
+        return NULL;
+    }
+
+    if (!client->domain_name)
+        client->domain_name = avahi_client_get_string_reply_and_block(client, "GetDomainName", NULL);
+
+    return client->domain_name;
+}
+
+const char* avahi_client_get_host_name(AvahiClient *client) {
+    assert(client);
+
+    if (!avahi_client_is_connected(client)) {
+        avahi_client_set_errno(client, AVAHI_ERR_BAD_STATE);
+        return NULL;
+    }
+
+    if (!client->host_name)
+        client->host_name = avahi_client_get_string_reply_and_block(client, "GetHostName", NULL);
+
+    return client->host_name;
+}
+
+const char* avahi_client_get_host_name_fqdn (AvahiClient *client) {
+    assert(client);
+
+    if (!avahi_client_is_connected(client)) {
+        avahi_client_set_errno(client, AVAHI_ERR_BAD_STATE);
+        return NULL;
+    }
+
+    if (!client->host_name_fqdn)
+        client->host_name_fqdn = avahi_client_get_string_reply_and_block(client, "GetHostNameFqdn", NULL);
+
+    return client->host_name_fqdn;
+}
+
+AvahiClientState avahi_client_get_state(AvahiClient *client) {
+    assert(client);
+
+    return client->state;
+}
+
+int avahi_client_errno(AvahiClient *client) {
+    assert(client);
+
+    return client->error;
+}
+
+/* Just for internal use */
+int avahi_client_simple_method_call(AvahiClient *client, const char *path, const char *interface, const char *method) {
+    DBusMessage *message = NULL, *reply = NULL;
+    DBusError error;
+    int r = AVAHI_OK;
+
+    dbus_error_init(&error);
+
+    assert(client);
+    assert(path);
+    assert(interface);
+    assert(method);
+
+    if (!(message = dbus_message_new_method_call(AVAHI_DBUS_NAME, path, interface, method))) {
+        r = avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    if (!(reply = dbus_connection_send_with_reply_and_block(client->bus, message, -1, &error)) ||
+        dbus_error_is_set (&error)) {
+        r = avahi_client_set_errno(client, AVAHI_ERR_DBUS_ERROR);
+        goto fail;
+    }
+
+    if (!dbus_message_get_args(reply, &error, DBUS_TYPE_INVALID) ||
+        dbus_error_is_set (&error)) {
+        r = avahi_client_set_errno(client, AVAHI_ERR_DBUS_ERROR);
+        goto fail;
+    }
+
+    dbus_message_unref(message);
+    dbus_message_unref(reply);
+
+    return AVAHI_OK;
+
+fail:
+    if (dbus_error_is_set(&error)) {
+        r = avahi_client_set_dbus_error(client, &error);
+        dbus_error_free(&error);
+    }
+
+    if (message)
+        dbus_message_unref(message);
+
+    if (reply)
+        dbus_message_unref(reply);
+
+    return r;
+}
+
+uint32_t avahi_client_get_local_service_cookie(AvahiClient *client) {
+    DBusMessage *message = NULL, *reply = NULL;
+    DBusError error;
+    assert(client);
+
+    if (!avahi_client_is_connected(client)) {
+        avahi_client_set_errno(client, AVAHI_ERR_BAD_STATE);
+        return AVAHI_SERVICE_COOKIE_INVALID;
+    }
+
+    if (client->local_service_cookie_valid)
+        return client->local_service_cookie;
+
+    dbus_error_init (&error);
+
+    if (!(message = dbus_message_new_method_call(AVAHI_DBUS_NAME, AVAHI_DBUS_PATH_SERVER, AVAHI_DBUS_INTERFACE_SERVER, "GetLocalServiceCookie"))) {
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    reply = dbus_connection_send_with_reply_and_block (client->bus, message, -1, &error);
+
+    if (!reply || dbus_error_is_set (&error))
+        goto fail;
+
+    if (!dbus_message_get_args (reply, &error, DBUS_TYPE_UINT32, &client->local_service_cookie, DBUS_TYPE_INVALID) ||
+        dbus_error_is_set (&error))
+        goto fail;
+
+    dbus_message_unref(message);
+    dbus_message_unref(reply);
+
+    client->local_service_cookie_valid = 1;
+    return client->local_service_cookie;
+
+fail:
+
+    if (message)
+        dbus_message_unref(message);
+    if (reply)
+        dbus_message_unref(reply);
+
+    if (dbus_error_is_set(&error)) {
+        avahi_client_set_dbus_error(client, &error);
+        dbus_error_free(&error);
+    }
+
+    return AVAHI_SERVICE_COOKIE_INVALID;
+}
+
+int avahi_client_is_connected(AvahiClient *client) {
+    assert(client);
+
+    return
+        client->bus &&
+        dbus_connection_get_is_connected(client->bus) &&
+        (client->state == AVAHI_CLIENT_S_RUNNING || client->state == AVAHI_CLIENT_S_REGISTERING || client->state == AVAHI_CLIENT_S_COLLISION);
+}
+
+int avahi_client_set_host_name(AvahiClient* client, const char *name) {
+    DBusMessage *message = NULL, *reply = NULL;
+    DBusError error;
+
+    assert(client);
+
+    if (!avahi_client_is_connected(client))
+        return avahi_client_set_errno(client, AVAHI_ERR_BAD_STATE);
+
+    dbus_error_init (&error);
+
+    if (!(message = dbus_message_new_method_call (AVAHI_DBUS_NAME, AVAHI_DBUS_PATH_SERVER, AVAHI_DBUS_INTERFACE_SERVER, "SetHostName"))) {
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    if (!dbus_message_append_args (message, DBUS_TYPE_STRING, &name, DBUS_TYPE_INVALID)) {
+        avahi_client_set_errno (client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    reply = dbus_connection_send_with_reply_and_block(client->bus, message, -1, &error);
+
+    if (!reply || dbus_error_is_set (&error))
+        goto fail;
+
+    if (!dbus_message_get_args(reply, &error, DBUS_TYPE_INVALID) ||
+        dbus_error_is_set (&error))
+        goto fail;
+
+    dbus_message_unref(message);
+    dbus_message_unref(reply);
+
+    avahi_free(client->host_name);
+    client->host_name = NULL;
+    avahi_free(client->host_name_fqdn);
+    client->host_name_fqdn = NULL;
+
+    return 0;
+
+fail:
+
+    if (message)
+        dbus_message_unref(message);
+    if (reply)
+        dbus_message_unref(reply);
+
+    if (dbus_error_is_set(&error)) {
+        avahi_client_set_dbus_error(client, &error);
+        dbus_error_free(&error);
+    }
+
+    return client->error;
+}
diff --git a/avahi-0.6.31/avahi-client/client.h b/avahi-0.6.31/avahi-client/client.h
new file mode 100644
index 0000000..1039da5
--- /dev/null
+++ b/avahi-0.6.31/avahi-client/client.h
@@ -0,0 +1,117 @@
+#ifndef fooclienthfoo
+#define fooclienthfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#include <inttypes.h>
+
+#include <avahi-common/cdecl.h>
+#include <avahi-common/address.h>
+#include <avahi-common/strlst.h>
+#include <avahi-common/defs.h>
+#include <avahi-common/watch.h>
+#include <avahi-common/gccmacro.h>
+
+/** \file client.h Definitions and functions for the client API over D-Bus */
+
+AVAHI_C_DECL_BEGIN
+
+/** A connection context */
+typedef struct AvahiClient AvahiClient;
+
+/** States of a client object, a superset of AvahiServerState */
+typedef enum {
+    AVAHI_CLIENT_S_REGISTERING = AVAHI_SERVER_REGISTERING,  /**< Server state: REGISTERING */
+    AVAHI_CLIENT_S_RUNNING = AVAHI_SERVER_RUNNING,          /**< Server state: RUNNING */
+    AVAHI_CLIENT_S_COLLISION = AVAHI_SERVER_COLLISION,      /**< Server state: COLLISION */
+    AVAHI_CLIENT_FAILURE = 100,                             /**< Some kind of error happened on the client side */
+    AVAHI_CLIENT_CONNECTING = 101                           /**< We're still connecting. This state is only entered when AVAHI_CLIENT_NO_FAIL has been passed to avahi_client_new() and the daemon is not yet available. */
+} AvahiClientState;
+
+typedef enum {
+    AVAHI_CLIENT_IGNORE_USER_CONFIG = 1, /**< Don't read user configuration */
+    AVAHI_CLIENT_NO_FAIL = 2        /**< Don't fail if the daemon is not available when avahi_client_new() is called, instead enter AVAHI_CLIENT_CONNECTING state and wait for the daemon to appear */
+} AvahiClientFlags;
+
+/** The function prototype for the callback of an AvahiClient */
+typedef void (*AvahiClientCallback) (
+    AvahiClient *s,
+    AvahiClientState state /**< The new state of the client */,
+    void* userdata /**< The user data that was passed to avahi_client_new() */);
+
+/** @{ \name Construction and destruction */
+
+/** Creates a new client instance */
+AvahiClient* avahi_client_new (
+    const AvahiPoll *poll_api /**< The abstract event loop API to use */,
+    AvahiClientFlags flags /**< Some flags to modify the behaviour of  the client library */,
+    AvahiClientCallback callback /**< A callback that is called whenever the state of the client changes. This may be NULL. Please note that this function is called for the first time from within the avahi_client_new() context! Thus, in the callback you should not make use of global variables that are initialized only after your call to avahi_client_new(). A common mistake is to store the AvahiClient pointer returned by avahi_client_new() in a global variable and assume that this global variable already contains the valid pointer when the callback is called for the first time. A work-around for this is to always use the AvahiClient pointer passed to the callback function instead of the global pointer.  */,
+    void *userdata /**< Some arbitrary user data pointer that will be passed to the callback function */,
+    int *error /**< If creation of the client fails, this integer will contain the error cause. May be NULL if you aren't interested in the reason why avahi_client_new() failed. */);
+
+/** Free a client instance. This will automatically free all
+ * associated browser, resolve and entry group objects. All pointers
+ * to such objects become invalid! */
+void avahi_client_free(AvahiClient *client);
+
+/** @} */
+
+/** @{ \name Properties */
+
+/** Get the version of the server */
+const char* avahi_client_get_version_string (AvahiClient*);
+
+/** Get host name */
+const char* avahi_client_get_host_name (AvahiClient*);
+
+/** Set host name. \since 0.6.13 */
+int avahi_client_set_host_name(AvahiClient*, const char *name);
+
+/** Get domain name */
+const char* avahi_client_get_domain_name (AvahiClient*);
+
+/** Get FQDN domain name */
+const char* avahi_client_get_host_name_fqdn (AvahiClient*);
+
+/** Get state */
+AvahiClientState avahi_client_get_state(AvahiClient *client);
+
+/** @{ \name Error Handling */
+
+/** Get the last error number. See avahi_strerror() for converting this error code into a human readable string. */
+int avahi_client_errno (AvahiClient*);
+
+/** @} */
+
+/** \cond fulldocs */
+/** Return the local service cookie. returns AVAHI_SERVICE_COOKIE_INVALID on failure. */
+uint32_t avahi_client_get_local_service_cookie(AvahiClient *client);
+/** \endcond */
+
+/** @{ \name Libc NSS Support */
+
+/** Return 1 if gethostbyname() supports mDNS lookups, 0 otherwise. \since 0.6.5 */
+int avahi_nss_support(void);
+
+/** @} */
+
+AVAHI_C_DECL_END
+
+#endif
diff --git a/avahi-0.6.31/avahi-client/entrygroup.c b/avahi-0.6.31/avahi-client/entrygroup.c
new file mode 100644
index 0000000..d809d60
--- /dev/null
+++ b/avahi-0.6.31/avahi-client/entrygroup.c
@@ -0,0 +1,890 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include <dbus/dbus.h>
+
+#include <avahi-client/client.h>
+#include <avahi-common/dbus.h>
+#include <avahi-common/llist.h>
+#include <avahi-common/error.h>
+#include <avahi-common/malloc.h>
+
+#include "client.h"
+#include "internal.h"
+
+void avahi_entry_group_set_state(AvahiEntryGroup *group, AvahiEntryGroupState state) {
+    assert(group);
+
+    if (group->state_valid && group->state == state)
+        return;
+
+    group->state = state;
+    group->state_valid = 1;
+
+    if (group->callback)
+        group->callback(group, state, group->userdata);
+}
+
+static int retrieve_state(AvahiEntryGroup *group) {
+    DBusMessage *message = NULL, *reply = NULL;
+    DBusError error;
+    int r = AVAHI_OK;
+    int32_t state;
+    AvahiClient *client;
+
+    dbus_error_init(&error);
+
+    assert(group);
+    client = group->client;
+
+    if (!(message = dbus_message_new_method_call(AVAHI_DBUS_NAME, group->path, AVAHI_DBUS_INTERFACE_ENTRY_GROUP, "GetState"))) {
+        r = avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    if (!(reply = dbus_connection_send_with_reply_and_block(client->bus, message, -1, &error)) ||
+        dbus_error_is_set (&error)) {
+        r = avahi_client_set_errno(client, AVAHI_ERR_DBUS_ERROR);
+        goto fail;
+    }
+
+    if (!dbus_message_get_args(reply, &error, DBUS_TYPE_INT32, &state, DBUS_TYPE_INVALID) ||
+        dbus_error_is_set (&error)) {
+        r = avahi_client_set_errno(client, AVAHI_ERR_DBUS_ERROR);
+        goto fail;
+    }
+
+    dbus_message_unref(message);
+    dbus_message_unref(reply);
+
+    return state;
+
+fail:
+    if (dbus_error_is_set(&error)) {
+        r = avahi_client_set_dbus_error(client, &error);
+        dbus_error_free(&error);
+    }
+
+    if (message)
+        dbus_message_unref(message);
+
+    if (reply)
+        dbus_message_unref(reply);
+
+    return r;
+}
+
+AvahiEntryGroup* avahi_entry_group_new (AvahiClient *client, AvahiEntryGroupCallback callback, void *userdata) {
+    AvahiEntryGroup *group = NULL;
+    DBusMessage *message = NULL, *reply = NULL;
+    DBusError error;
+    char *path;
+    int state;
+
+    assert(client);
+
+    dbus_error_init (&error);
+
+    if (!avahi_client_is_connected(client)) {
+        avahi_client_set_errno(client, AVAHI_ERR_BAD_STATE);
+        goto fail;
+    }
+
+    if (!(group = avahi_new(AvahiEntryGroup, 1))) {
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    group->client = client;
+    group->callback = callback;
+    group->userdata = userdata;
+    group->state_valid = 0;
+    group->path = NULL;
+    AVAHI_LLIST_PREPEND(AvahiEntryGroup, groups, client->groups, group);
+
+    if (!(message = dbus_message_new_method_call(
+              AVAHI_DBUS_NAME,
+              AVAHI_DBUS_PATH_SERVER,
+              AVAHI_DBUS_INTERFACE_SERVER,
+              "EntryGroupNew"))) {
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    if (!(reply = dbus_connection_send_with_reply_and_block (client->bus, message, -1, &error)) ||
+        dbus_error_is_set (&error)) {
+        avahi_client_set_errno (client, AVAHI_ERR_DBUS_ERROR);
+        goto fail;
+    }
+
+    if (!dbus_message_get_args(reply, &error, DBUS_TYPE_OBJECT_PATH, &path, DBUS_TYPE_INVALID) ||
+        dbus_error_is_set (&error)) {
+        avahi_client_set_errno (client, AVAHI_ERR_DBUS_ERROR);
+        goto fail;
+    }
+
+    if (!(group->path = avahi_strdup (path))) {
+
+        /* FIXME: We don't remove the object on the server side */
+
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    if ((state = retrieve_state(group)) < 0) {
+        avahi_client_set_errno(client, state);
+        goto fail;
+    }
+
+    avahi_entry_group_set_state(group, (AvahiEntryGroupState) state);
+
+    dbus_message_unref(message);
+    dbus_message_unref(reply);
+
+    return group;
+
+fail:
+    if (dbus_error_is_set(&error)) {
+        avahi_client_set_dbus_error(client, &error);
+        dbus_error_free(&error);
+    }
+
+    if (group)
+        avahi_entry_group_free(group);
+
+    if (message)
+        dbus_message_unref(message);
+
+    if (reply)
+        dbus_message_unref(reply);
+
+    return NULL;
+}
+
+static int entry_group_simple_method_call(AvahiEntryGroup *group, const char *method) {
+    DBusMessage *message = NULL, *reply = NULL;
+    DBusError error;
+    int r = AVAHI_OK;
+    AvahiClient *client;
+
+    dbus_error_init(&error);
+
+    assert(group);
+    client = group->client;
+
+    if (!(message = dbus_message_new_method_call(AVAHI_DBUS_NAME, group->path, AVAHI_DBUS_INTERFACE_ENTRY_GROUP, method))) {
+        r = avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    if (!(reply = dbus_connection_send_with_reply_and_block(client->bus, message, -1, &error)) ||
+        dbus_error_is_set (&error)) {
+        r = avahi_client_set_errno(client, AVAHI_ERR_DBUS_ERROR);
+        goto fail;
+    }
+
+    if (!dbus_message_get_args(reply, &error, DBUS_TYPE_INVALID) ||
+        dbus_error_is_set (&error)) {
+        r = avahi_client_set_errno(client, AVAHI_ERR_DBUS_ERROR);
+        goto fail;
+    }
+
+    dbus_message_unref(message);
+    dbus_message_unref(reply);
+
+    return AVAHI_OK;
+
+fail:
+    if (dbus_error_is_set(&error)) {
+        r = avahi_client_set_dbus_error(client, &error);
+        dbus_error_free(&error);
+    }
+
+    if (message)
+        dbus_message_unref(message);
+
+    if (reply)
+        dbus_message_unref(reply);
+
+    return r;
+}
+
+int avahi_entry_group_free(AvahiEntryGroup *group) {
+    AvahiClient *client = group->client;
+    int r = AVAHI_OK;
+
+    assert(group);
+
+    if (group->path && avahi_client_is_connected(client))
+        r = entry_group_simple_method_call(group, "Free");
+
+    AVAHI_LLIST_REMOVE(AvahiEntryGroup, groups, client->groups, group);
+
+    avahi_free(group->path);
+    avahi_free(group);
+
+    return r;
+}
+
+int avahi_entry_group_commit(AvahiEntryGroup *group) {
+    int ret;
+    assert(group);
+
+    if (!group->path || !avahi_client_is_connected(group->client))
+        return avahi_client_set_errno(group->client, AVAHI_ERR_BAD_STATE);
+
+    if ((ret = entry_group_simple_method_call(group, "Commit")) < 0)
+        return ret;
+
+    group->state_valid = 0;
+    return ret;
+}
+
+int avahi_entry_group_reset(AvahiEntryGroup *group) {
+    int ret;
+    assert(group);
+
+    if (!group->path || !avahi_client_is_connected(group->client))
+        return avahi_client_set_errno(group->client, AVAHI_ERR_BAD_STATE);
+
+    if ((ret = entry_group_simple_method_call(group, "Reset")) < 0)
+        return ret;
+
+    group->state_valid = 0;
+    return ret;
+}
+
+int avahi_entry_group_get_state (AvahiEntryGroup *group) {
+    assert (group);
+
+    if (group->state_valid)
+        return group->state;
+
+    return retrieve_state(group);
+}
+
+AvahiClient* avahi_entry_group_get_client (AvahiEntryGroup *group) {
+    assert(group);
+
+    return group->client;
+}
+
+int avahi_entry_group_is_empty (AvahiEntryGroup *group) {
+    DBusMessage *message = NULL, *reply = NULL;
+    DBusError error;
+    int r = AVAHI_OK;
+    int b;
+    AvahiClient *client;
+
+    assert(group);
+    client = group->client;
+
+    if (!group->path || !avahi_client_is_connected(group->client))
+        return avahi_client_set_errno(group->client, AVAHI_ERR_BAD_STATE);
+
+    dbus_error_init(&error);
+
+    if (!(message = dbus_message_new_method_call(AVAHI_DBUS_NAME, group->path, AVAHI_DBUS_INTERFACE_ENTRY_GROUP, "IsEmpty"))) {
+        r = avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    if (!(reply = dbus_connection_send_with_reply_and_block(client->bus, message, -1, &error)) ||
+        dbus_error_is_set (&error)) {
+        r = avahi_client_set_errno(client, AVAHI_ERR_DBUS_ERROR);
+        goto fail;
+    }
+
+    if (!dbus_message_get_args(reply, &error, DBUS_TYPE_BOOLEAN, &b, DBUS_TYPE_INVALID) ||
+        dbus_error_is_set (&error)) {
+        r = avahi_client_set_errno(client, AVAHI_ERR_DBUS_ERROR);
+        goto fail;
+    }
+
+    dbus_message_unref(message);
+    dbus_message_unref(reply);
+
+    return !!b;
+
+fail:
+    if (dbus_error_is_set(&error)) {
+        r = avahi_client_set_dbus_error(client, &error);
+        dbus_error_free(&error);
+    }
+
+    if (message)
+        dbus_message_unref(message);
+
+    if (reply)
+        dbus_message_unref(reply);
+
+    return r;
+}
+
+static int append_rdata(DBusMessage *message, const void *rdata, size_t size) {
+    DBusMessageIter iter, sub;
+
+    assert(message);
+
+    dbus_message_iter_init_append(message, &iter);
+
+    if (!(dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY, DBUS_TYPE_BYTE_AS_STRING, &sub)) ||
+        !(dbus_message_iter_append_fixed_array(&sub, DBUS_TYPE_BYTE, &rdata, size)) ||
+        !(dbus_message_iter_close_container(&iter, &sub)))
+        return -1;
+
+    return 0;
+}
+
+static int append_string_list(DBusMessage *message, AvahiStringList *txt) {
+    DBusMessageIter iter, sub;
+    int r = -1;
+    AvahiStringList *p;
+
+    assert(message);
+
+    dbus_message_iter_init_append(message, &iter);
+
+    /* Reverse the string list, so that we can pass it in-order to the server */
+    txt = avahi_string_list_reverse(txt);
+
+    if (!dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY, "ay", &sub))
+        goto fail;
+
+    /* Assemble the AvahiStringList into an Array of Array of Bytes to send over dbus */
+    for (p = txt; p != NULL; p = p->next) {
+        DBusMessageIter sub2;
+        const uint8_t *data = p->text;
+
+        if (!(dbus_message_iter_open_container(&sub, DBUS_TYPE_ARRAY, "y", &sub2)) ||
+            !(dbus_message_iter_append_fixed_array(&sub2, DBUS_TYPE_BYTE, &data, p->size)) ||
+            !(dbus_message_iter_close_container(&sub, &sub2)))
+            goto fail;
+    }
+
+    if (!dbus_message_iter_close_container(&iter, &sub))
+        goto fail;
+
+    r = 0;
+
+fail:
+
+    /* Reverse the string list to the original state */
+    txt = avahi_string_list_reverse(txt);
+
+    return r;
+}
+
+int avahi_entry_group_add_service_strlst(
+    AvahiEntryGroup *group,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiPublishFlags flags,
+    const char *name,
+    const char *type,
+    const char *domain,
+    const char *host,
+    uint16_t port,
+    AvahiStringList *txt) {
+
+    DBusMessage *message = NULL, *reply = NULL;
+    int r = AVAHI_OK;
+    DBusError error;
+    AvahiClient *client;
+    int32_t i_interface, i_protocol;
+    uint32_t u_flags;
+
+    assert(group);
+    assert(name);
+    assert(type);
+
+    client = group->client;
+
+    if (!group->path || !avahi_client_is_connected(group->client))
+        return avahi_client_set_errno(group->client, AVAHI_ERR_BAD_STATE);
+
+    if (!domain)
+        domain = "";
+
+    if (!host)
+        host = "";
+
+    dbus_error_init(&error);
+
+    if (!(message = dbus_message_new_method_call (AVAHI_DBUS_NAME, group->path, AVAHI_DBUS_INTERFACE_ENTRY_GROUP, "AddService"))) {
+        r = avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    i_interface = (int32_t) interface;
+    i_protocol = (int32_t) protocol;
+    u_flags = (uint32_t) flags;
+
+    if (!dbus_message_append_args(
+            message,
+            DBUS_TYPE_INT32, &i_interface,
+            DBUS_TYPE_INT32, &i_protocol,
+            DBUS_TYPE_UINT32, &u_flags,
+            DBUS_TYPE_STRING, &name,
+            DBUS_TYPE_STRING, &type,
+            DBUS_TYPE_STRING, &domain,
+            DBUS_TYPE_STRING, &host,
+            DBUS_TYPE_UINT16, &port,
+            DBUS_TYPE_INVALID) ||
+        append_string_list(message, txt) < 0) {
+        r = avahi_client_set_errno(group->client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    if (!(reply = dbus_connection_send_with_reply_and_block(client->bus, message, -1, &error)) ||
+        dbus_error_is_set (&error)) {
+        r = avahi_client_set_errno(client, AVAHI_ERR_DBUS_ERROR);
+        goto fail;
+    }
+
+    if (!dbus_message_get_args(reply, &error, DBUS_TYPE_INVALID) ||
+        dbus_error_is_set (&error)) {
+        r = avahi_client_set_errno(client, AVAHI_ERR_DBUS_ERROR);
+        goto fail;
+    }
+
+    dbus_message_unref(message);
+    dbus_message_unref(reply);
+
+    return AVAHI_OK;
+
+fail:
+
+    if (dbus_error_is_set(&error)) {
+        r = avahi_client_set_dbus_error(client, &error);
+        dbus_error_free(&error);
+    }
+
+    if (message)
+        dbus_message_unref(message);
+
+    if (reply)
+        dbus_message_unref(reply);
+
+    return r;
+}
+
+int avahi_entry_group_add_service(
+    AvahiEntryGroup *group,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiPublishFlags flags,
+    const char *name,
+    const char *type,
+    const char *domain,
+    const char *host,
+    uint16_t port,
+    ...) {
+
+    va_list va;
+    int r;
+    AvahiStringList *txt;
+
+    assert(group);
+
+    va_start(va, port);
+    txt = avahi_string_list_new_va(va);
+    r = avahi_entry_group_add_service_strlst(group, interface, protocol, flags, name, type, domain, host, port, txt);
+    avahi_string_list_free(txt);
+    va_end(va);
+    return r;
+}
+
+int avahi_entry_group_add_service_subtype(
+    AvahiEntryGroup *group,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiPublishFlags flags,
+    const char *name,
+    const char *type,
+    const char *domain,
+    const char *subtype) {
+
+    DBusMessage *message = NULL, *reply = NULL;
+    int r = AVAHI_OK;
+    DBusError error;
+    AvahiClient *client;
+    int32_t i_interface, i_protocol;
+    uint32_t u_flags;
+
+    assert(group);
+    assert(name);
+    assert(type);
+    assert(subtype);
+
+    client = group->client;
+
+    if (!group->path || !avahi_client_is_connected(group->client))
+        return avahi_client_set_errno(group->client, AVAHI_ERR_BAD_STATE);
+
+    if (!domain)
+        domain = "";
+
+    dbus_error_init(&error);
+
+    if (!(message = dbus_message_new_method_call (AVAHI_DBUS_NAME, group->path, AVAHI_DBUS_INTERFACE_ENTRY_GROUP, "AddServiceSubtype"))) {
+        r = avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    i_interface = (int32_t) interface;
+    i_protocol = (int32_t) protocol;
+    u_flags = (uint32_t) flags;
+
+    if (!dbus_message_append_args(
+            message,
+            DBUS_TYPE_INT32, &i_interface,
+            DBUS_TYPE_INT32, &i_protocol,
+            DBUS_TYPE_UINT32, &u_flags,
+            DBUS_TYPE_STRING, &name,
+            DBUS_TYPE_STRING, &type,
+            DBUS_TYPE_STRING, &domain,
+            DBUS_TYPE_STRING, &subtype,
+            DBUS_TYPE_INVALID)) {
+        r = avahi_client_set_errno(group->client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    if (!(reply = dbus_connection_send_with_reply_and_block(client->bus, message, -1, &error)) ||
+        dbus_error_is_set (&error)) {
+        r = avahi_client_set_errno(client, AVAHI_ERR_DBUS_ERROR);
+        goto fail;
+    }
+
+    if (!dbus_message_get_args(reply, &error, DBUS_TYPE_INVALID) ||
+        dbus_error_is_set (&error)) {
+        r = avahi_client_set_errno(client, AVAHI_ERR_DBUS_ERROR);
+        goto fail;
+    }
+
+    dbus_message_unref(message);
+    dbus_message_unref(reply);
+
+    return AVAHI_OK;
+
+fail:
+
+    if (dbus_error_is_set(&error)) {
+        r = avahi_client_set_dbus_error(client, &error);
+        dbus_error_free(&error);
+    }
+
+    if (message)
+        dbus_message_unref(message);
+
+    if (reply)
+        dbus_message_unref(reply);
+
+    return r;
+
+}
+
+int avahi_entry_group_update_service_txt(
+    AvahiEntryGroup *group,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiPublishFlags flags,
+    const char *name,
+    const char *type,
+    const char *domain,
+    ...) {
+
+    va_list va;
+    int r;
+    AvahiStringList *txt;
+
+    va_start(va, domain);
+    txt = avahi_string_list_new_va(va);
+    r = avahi_entry_group_update_service_txt_strlst(group, interface, protocol, flags, name, type, domain, txt);
+    avahi_string_list_free(txt);
+    va_end(va);
+    return r;
+}
+
+int avahi_entry_group_update_service_txt_strlst(
+    AvahiEntryGroup *group,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiPublishFlags flags,
+    const char *name,
+    const char *type,
+    const char *domain,
+    AvahiStringList *txt) {
+
+    DBusMessage *message = NULL, *reply = NULL;
+    int r = AVAHI_OK;
+    DBusError error;
+    AvahiClient *client;
+    int32_t i_interface, i_protocol;
+    uint32_t u_flags;
+
+    assert(group);
+    assert(name);
+    assert(type);
+
+    client = group->client;
+
+    if (!group->path || !avahi_client_is_connected(group->client))
+        return avahi_client_set_errno(group->client, AVAHI_ERR_BAD_STATE);
+
+    if (!domain)
+        domain = "";
+
+    dbus_error_init(&error);
+
+    if (!(message = dbus_message_new_method_call (AVAHI_DBUS_NAME, group->path, AVAHI_DBUS_INTERFACE_ENTRY_GROUP, "UpdateServiceTxt"))) {
+        r = avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    i_interface = (int32_t) interface;
+    i_protocol = (int32_t) protocol;
+    u_flags = (uint32_t) flags;
+
+    if (!dbus_message_append_args(
+            message,
+            DBUS_TYPE_INT32, &i_interface,
+            DBUS_TYPE_INT32, &i_protocol,
+            DBUS_TYPE_UINT32, &u_flags,
+            DBUS_TYPE_STRING, &name,
+            DBUS_TYPE_STRING, &type,
+            DBUS_TYPE_STRING, &domain,
+            DBUS_TYPE_INVALID) ||
+        append_string_list(message, txt) < 0) {
+        r = avahi_client_set_errno(group->client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    if (!(reply = dbus_connection_send_with_reply_and_block(client->bus, message, -1, &error)) ||
+        dbus_error_is_set (&error)) {
+        r = avahi_client_set_errno(client, AVAHI_ERR_DBUS_ERROR);
+        goto fail;
+    }
+
+    if (!dbus_message_get_args(reply, &error, DBUS_TYPE_INVALID) ||
+        dbus_error_is_set (&error)) {
+        r = avahi_client_set_errno(client, AVAHI_ERR_DBUS_ERROR);
+        goto fail;
+    }
+
+    dbus_message_unref(message);
+    dbus_message_unref(reply);
+
+    return AVAHI_OK;
+
+fail:
+
+    if (dbus_error_is_set(&error)) {
+        r = avahi_client_set_dbus_error(client, &error);
+        dbus_error_free(&error);
+    }
+
+    if (message)
+        dbus_message_unref(message);
+
+    if (reply)
+        dbus_message_unref(reply);
+
+    return r;
+}
+
+/** Add a host/address pair */
+int avahi_entry_group_add_address(
+    AvahiEntryGroup *group,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiPublishFlags flags,
+    const char *name,
+    const AvahiAddress *a) {
+
+    DBusMessage *message = NULL, *reply = NULL;
+    int r = AVAHI_OK;
+    DBusError error;
+    AvahiClient *client;
+    int32_t i_interface, i_protocol;
+    uint32_t u_flags;
+    char s_address[AVAHI_ADDRESS_STR_MAX];
+    char *p_address = s_address;
+
+    assert(name);
+
+    client = group->client;
+
+    if (!group->path || !avahi_client_is_connected(group->client))
+        return avahi_client_set_errno(group->client, AVAHI_ERR_BAD_STATE);
+
+    dbus_error_init(&error);
+
+    if (!(message = dbus_message_new_method_call (AVAHI_DBUS_NAME, group->path, AVAHI_DBUS_INTERFACE_ENTRY_GROUP, "AddAddress"))) {
+        r = avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    i_interface = (int32_t) interface;
+    i_protocol = (int32_t) protocol;
+    u_flags = (uint32_t) flags;
+
+    if (!avahi_address_snprint (s_address, sizeof (s_address), a))
+    {
+        r = avahi_client_set_errno(client, AVAHI_ERR_INVALID_ADDRESS);
+        goto fail;
+    }
+
+    if (!dbus_message_append_args(
+            message,
+            DBUS_TYPE_INT32, &i_interface,
+            DBUS_TYPE_INT32, &i_protocol,
+            DBUS_TYPE_UINT32, &u_flags,
+            DBUS_TYPE_STRING, &name,
+            DBUS_TYPE_STRING, &p_address,
+            DBUS_TYPE_INVALID)) {
+        r = avahi_client_set_errno(group->client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    if (!(reply = dbus_connection_send_with_reply_and_block(client->bus, message, -1, &error)) ||
+        dbus_error_is_set (&error)) {
+        r = avahi_client_set_errno(client, AVAHI_ERR_DBUS_ERROR);
+        goto fail;
+    }
+
+    if (!dbus_message_get_args(reply, &error, DBUS_TYPE_INVALID) ||
+        dbus_error_is_set (&error)) {
+        r = avahi_client_set_errno(client, AVAHI_ERR_DBUS_ERROR);
+        goto fail;
+    }
+
+    dbus_message_unref(message);
+    dbus_message_unref(reply);
+
+    return AVAHI_OK;
+
+fail:
+
+    if (dbus_error_is_set(&error)) {
+        r = avahi_client_set_dbus_error(client, &error);
+        dbus_error_free(&error);
+    }
+
+    if (message)
+        dbus_message_unref(message);
+
+    if (reply)
+        dbus_message_unref(reply);
+
+    return r;
+}
+
+/** Add an arbitrary record */
+int avahi_entry_group_add_record(
+    AvahiEntryGroup *group,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiPublishFlags flags,
+    const char *name,
+    uint16_t clazz,
+    uint16_t type,
+    uint32_t ttl,
+    const void *rdata,
+    size_t size) {
+
+    DBusMessage *message = NULL, *reply = NULL;
+    int r = AVAHI_OK;
+    DBusError error;
+    AvahiClient *client;
+    int32_t i_interface, i_protocol;
+    uint32_t u_flags;
+
+    assert(name);
+
+    client = group->client;
+
+    if (!group->path || !avahi_client_is_connected(group->client))
+        return avahi_client_set_errno(group->client, AVAHI_ERR_BAD_STATE);
+
+    dbus_error_init(&error);
+
+    if (!(message = dbus_message_new_method_call (AVAHI_DBUS_NAME, group->path, AVAHI_DBUS_INTERFACE_ENTRY_GROUP, "AddRecord"))) {
+        r = avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    i_interface = (int32_t) interface;
+    i_protocol = (int32_t) protocol;
+    u_flags = (uint32_t) flags;
+
+    if (!dbus_message_append_args(
+            message,
+            DBUS_TYPE_INT32, &i_interface,
+            DBUS_TYPE_INT32, &i_protocol,
+            DBUS_TYPE_UINT32, &u_flags,
+            DBUS_TYPE_STRING, &name,
+            DBUS_TYPE_UINT16, &clazz,
+            DBUS_TYPE_UINT16, &type,
+            DBUS_TYPE_UINT32, &ttl,
+            DBUS_TYPE_INVALID) || append_rdata(message, rdata, size) < 0) {
+        r = avahi_client_set_errno(group->client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    if (!(reply = dbus_connection_send_with_reply_and_block(client->bus, message, -1, &error)) ||
+        dbus_error_is_set (&error)) {
+        r = avahi_client_set_errno(client, AVAHI_ERR_DBUS_ERROR);
+        goto fail;
+    }
+
+    if (!dbus_message_get_args(reply, &error, DBUS_TYPE_INVALID) ||
+        dbus_error_is_set (&error)) {
+        r = avahi_client_set_errno(client, AVAHI_ERR_DBUS_ERROR);
+        goto fail;
+    }
+
+    dbus_message_unref(message);
+    dbus_message_unref(reply);
+
+    return AVAHI_OK;
+
+fail:
+
+    if (dbus_error_is_set(&error)) {
+        r = avahi_client_set_dbus_error(client, &error);
+        dbus_error_free(&error);
+    }
+
+    if (message)
+        dbus_message_unref(message);
+
+    if (reply)
+        dbus_message_unref(reply);
+
+    return r;
+}
diff --git a/avahi-0.6.31/avahi-client/internal.h b/avahi-0.6.31/avahi-client/internal.h
new file mode 100644
index 0000000..e5f3beb
--- /dev/null
+++ b/avahi-0.6.31/avahi-client/internal.h
@@ -0,0 +1,172 @@
+#ifndef foointernalhfoo
+#define foointernalhfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#include <dbus/dbus.h>
+
+#include "client.h"
+#include "lookup.h"
+#include "publish.h"
+
+struct AvahiClient {
+    const AvahiPoll *poll_api;
+    DBusConnection *bus;
+    int error;
+    AvahiClientState state;
+    AvahiClientFlags flags;
+
+    /* Cache for some seldom changing server data */
+    char *version_string, *host_name, *host_name_fqdn, *domain_name;
+    uint32_t local_service_cookie;
+    int local_service_cookie_valid;
+
+    AvahiClientCallback callback;
+    void *userdata;
+
+    AVAHI_LLIST_HEAD(AvahiEntryGroup, groups);
+    AVAHI_LLIST_HEAD(AvahiDomainBrowser, domain_browsers);
+    AVAHI_LLIST_HEAD(AvahiServiceBrowser, service_browsers);
+    AVAHI_LLIST_HEAD(AvahiServiceTypeBrowser, service_type_browsers);
+    AVAHI_LLIST_HEAD(AvahiServiceResolver, service_resolvers);
+    AVAHI_LLIST_HEAD(AvahiHostNameResolver, host_name_resolvers);
+    AVAHI_LLIST_HEAD(AvahiAddressResolver, address_resolvers);
+    AVAHI_LLIST_HEAD(AvahiRecordBrowser, record_browsers);
+};
+
+struct AvahiEntryGroup {
+    char *path;
+    AvahiEntryGroupState state;
+    int state_valid;
+    AvahiClient *client;
+    AvahiEntryGroupCallback callback;
+    void *userdata;
+    AVAHI_LLIST_FIELDS(AvahiEntryGroup, groups);
+};
+
+struct AvahiDomainBrowser {
+    int ref;
+
+    char *path;
+    AvahiClient *client;
+    AvahiDomainBrowserCallback callback;
+    void *userdata;
+    AVAHI_LLIST_FIELDS(AvahiDomainBrowser, domain_browsers);
+
+    AvahiIfIndex interface;
+    AvahiProtocol protocol;
+
+    AvahiTimeout *defer_timeout;
+
+    AvahiStringList *static_browse_domains;
+};
+
+struct AvahiServiceBrowser {
+    char *path;
+    AvahiClient *client;
+    AvahiServiceBrowserCallback callback;
+    void *userdata;
+    AVAHI_LLIST_FIELDS(AvahiServiceBrowser, service_browsers);
+
+    char *type, *domain;
+    AvahiIfIndex interface;
+    AvahiProtocol protocol;
+};
+
+struct AvahiServiceTypeBrowser {
+    char *path;
+    AvahiClient *client;
+    AvahiServiceTypeBrowserCallback callback;
+    void *userdata;
+    AVAHI_LLIST_FIELDS(AvahiServiceTypeBrowser, service_type_browsers);
+
+    char *domain;
+    AvahiIfIndex interface;
+    AvahiProtocol protocol;
+};
+
+struct AvahiServiceResolver {
+    char *path;
+    AvahiClient *client;
+    AvahiServiceResolverCallback callback;
+    void *userdata;
+    AVAHI_LLIST_FIELDS(AvahiServiceResolver, service_resolvers);
+
+    char *name, *type, *domain;
+    AvahiIfIndex interface;
+    AvahiProtocol protocol;
+};
+
+struct AvahiHostNameResolver {
+    char *path;
+    AvahiClient *client;
+    AvahiHostNameResolverCallback callback;
+    void *userdata;
+    AVAHI_LLIST_FIELDS(AvahiHostNameResolver, host_name_resolvers);
+
+    char *host_name;
+    AvahiIfIndex interface;
+    AvahiProtocol protocol;
+};
+
+struct AvahiAddressResolver {
+    char *path;
+    AvahiClient *client;
+    AvahiAddressResolverCallback callback;
+    void *userdata;
+    AVAHI_LLIST_FIELDS(AvahiAddressResolver, address_resolvers);
+
+    AvahiAddress address;
+    AvahiIfIndex interface;
+    AvahiProtocol protocol;
+};
+
+struct AvahiRecordBrowser {
+    char *path;
+    AvahiClient *client;
+    AvahiRecordBrowserCallback callback;
+    void *userdata;
+    AVAHI_LLIST_FIELDS(AvahiRecordBrowser, record_browsers);
+
+    char *name;
+    uint16_t clazz, type;
+    AvahiIfIndex interface;
+    AvahiProtocol protocol;
+};
+
+int avahi_client_set_errno (AvahiClient *client, int error);
+int avahi_client_set_dbus_error(AvahiClient *client, DBusError *error);
+
+void avahi_entry_group_set_state(AvahiEntryGroup *group, AvahiEntryGroupState state);
+
+DBusHandlerResult avahi_domain_browser_event (AvahiClient *client, AvahiBrowserEvent event, DBusMessage *message);
+DBusHandlerResult avahi_service_type_browser_event (AvahiClient *client, AvahiBrowserEvent event, DBusMessage *message);
+DBusHandlerResult avahi_service_browser_event (AvahiClient *client, AvahiBrowserEvent event, DBusMessage *message);
+DBusHandlerResult avahi_record_browser_event(AvahiClient *client, AvahiBrowserEvent event, DBusMessage *message);
+
+DBusHandlerResult avahi_service_resolver_event (AvahiClient *client, AvahiResolverEvent event, DBusMessage *message);
+DBusHandlerResult avahi_host_name_resolver_event (AvahiClient *client, AvahiResolverEvent event, DBusMessage *message);
+DBusHandlerResult avahi_address_resolver_event (AvahiClient *client, AvahiResolverEvent event, DBusMessage *message);
+
+int avahi_client_simple_method_call(AvahiClient *client, const char *path, const char *interface, const char *method);
+
+int avahi_client_is_connected(AvahiClient *client);
+
+#endif
diff --git a/avahi-0.6.31/avahi-client/lookup.h b/avahi-0.6.31/avahi-client/lookup.h
new file mode 100644
index 0000000..52407f4
--- /dev/null
+++ b/avahi-0.6.31/avahi-client/lookup.h
@@ -0,0 +1,314 @@
+#ifndef fooclientlookuphfoo
+#define fooclientlookuphfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#include <inttypes.h>
+
+#include <avahi-common/cdecl.h>
+#include <avahi-common/address.h>
+#include <avahi-common/strlst.h>
+#include <avahi-common/defs.h>
+#include <avahi-common/watch.h>
+#include <avahi-common/gccmacro.h>
+
+#include <avahi-client/client.h>
+
+/** \file avahi-client/lookup.h Lookup Client API */
+
+/** \example client-browse-services.c Example how to browse for DNS-SD
+ * services using the client interface to avahi-daemon. */
+
+AVAHI_C_DECL_BEGIN
+
+/** @{ \name Domain Browser */
+
+/** A domain browser object */
+typedef struct AvahiDomainBrowser AvahiDomainBrowser;
+
+/** The function prototype for the callback of an AvahiDomainBrowser */
+typedef void (*AvahiDomainBrowserCallback) (
+    AvahiDomainBrowser *b,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiBrowserEvent event,
+    const char *domain,
+    AvahiLookupResultFlags flags,
+    void *userdata);
+
+/** Browse for domains on the local network */
+AvahiDomainBrowser* avahi_domain_browser_new (
+    AvahiClient *client,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    const char *domain,
+    AvahiDomainBrowserType btype,
+    AvahiLookupFlags flags,
+    AvahiDomainBrowserCallback callback,
+    void *userdata);
+
+/** Get the parent client of an AvahiDomainBrowser object */
+AvahiClient* avahi_domain_browser_get_client (AvahiDomainBrowser *);
+
+/** Cleans up and frees an AvahiDomainBrowser object */
+int avahi_domain_browser_free (AvahiDomainBrowser *);
+
+/** @} */
+
+/** @{ \name Service Browser */
+
+/** A service browser object */
+typedef struct AvahiServiceBrowser AvahiServiceBrowser;
+
+/** The function prototype for the callback of an AvahiServiceBrowser */
+typedef void (*AvahiServiceBrowserCallback) (
+    AvahiServiceBrowser *b,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiBrowserEvent event,
+    const char *name,
+    const char *type,
+    const char *domain,
+    AvahiLookupResultFlags flags,
+    void *userdata);
+
+/** Browse for services of a type on the network. In most cases you
+ * probably want to pass AVAHI_IF_UNSPEC and AVAHI_PROTO_UNSPED in
+ * interface, resp. protocol to browse on all local networks. The
+ * specified callback will be called whenever a new service appears
+ * or is removed from the network. Please note that events may be
+ * collapsed to minimize traffic (i.e. a REMOVED followed by a NEW for
+ * the same service data is dropped because redundant). If you want to
+ * subscribe to service data changes, you should use
+ * avahi_service_resolver_new() and keep it open, in which case you
+ * will be notified via AVAHI_RESOLVE_FOUND everytime the service data
+ * changes. */
+AvahiServiceBrowser* avahi_service_browser_new (
+    AvahiClient *client,
+    AvahiIfIndex interface,     /**< In most cases pass AVAHI_IF_UNSPEC here */
+    AvahiProtocol protocol,     /**< In most cases pass AVAHI_PROTO_UNSPEC here */
+    const char *type,           /**< A service type such as "_http._tcp" */
+    const char *domain,         /**< A domain to browse in. In most cases you want to pass NULL here for the default domain (usually ".local") */
+    AvahiLookupFlags flags,
+    AvahiServiceBrowserCallback callback,
+    void *userdata);
+
+/** Get the parent client of an AvahiServiceBrowser object */
+AvahiClient* avahi_service_browser_get_client (AvahiServiceBrowser *);
+
+/** Cleans up and frees an AvahiServiceBrowser object */
+int avahi_service_browser_free (AvahiServiceBrowser *);
+
+/** @} */
+
+/** \cond fulldocs */
+/** A service type browser object */
+typedef struct AvahiServiceTypeBrowser AvahiServiceTypeBrowser;
+
+/** The function prototype for the callback of an AvahiServiceTypeBrowser */
+typedef void (*AvahiServiceTypeBrowserCallback) (
+    AvahiServiceTypeBrowser *b,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiBrowserEvent event,
+    const char *type,
+    const char *domain,
+    AvahiLookupResultFlags flags,
+    void *userdata);
+
+/** Browse for service types on the local network */
+AvahiServiceTypeBrowser* avahi_service_type_browser_new (
+    AvahiClient *client,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    const char *domain,
+    AvahiLookupFlags flags,
+    AvahiServiceTypeBrowserCallback callback,
+    void *userdata);
+
+/** Get the parent client of an AvahiServiceTypeBrowser object */
+AvahiClient* avahi_service_type_browser_get_client (AvahiServiceTypeBrowser *);
+
+/** Cleans up and frees an AvahiServiceTypeBrowser object */
+int avahi_service_type_browser_free (AvahiServiceTypeBrowser *);
+
+/** \endcond */
+
+/** @{ \name Service Resolver */
+
+/** A service resolver object */
+typedef struct AvahiServiceResolver AvahiServiceResolver;
+
+/** The function prototype for the callback of an AvahiServiceResolver */
+typedef void (*AvahiServiceResolverCallback) (
+    AvahiServiceResolver *r,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiResolverEvent event,
+    const char *name,
+    const char *type,
+    const char *domain,
+    const char *host_name,
+    const AvahiAddress *a,
+    uint16_t port,
+    AvahiStringList *txt,
+    AvahiLookupResultFlags flags,
+    void *userdata);
+
+/** Create a new service resolver object. Please make sure to pass all
+ * the service data you received via avahi_service_browser_new()'s
+ * callback function, especially interface and protocol. The protocol
+ * argument specifies the protocol (IPv4 or IPv6) to use as transport
+ * for the queries which are sent out by this resolver. The
+ * aprotocol argument specifies the adress family (IPv4 or IPv6) of
+ * the address of the service we are looking for. Generally, on
+ * "protocol" you should only pass what was supplied to you as
+ * parameter to your AvahiServiceBrowserCallback. In "aprotocol" you
+ * should pass what your application code can deal with when
+ * connecting to the service. Or, more technically speaking: protocol
+ * specifies if the mDNS queries should be sent as UDP/IPv4
+ * resp. UDP/IPv6 packets. aprotocol specifies whether the query is for a A
+ * resp. AAAA resource record. */
+AvahiServiceResolver * avahi_service_resolver_new(
+    AvahiClient *client,
+    AvahiIfIndex interface,   /**< Pass the interface argument you received in AvahiServiceBrowserCallback here. */
+    AvahiProtocol protocol,   /**< Pass the protocol argument you received in AvahiServiceBrowserCallback here. */
+    const char *name,         /**< Pass the name argument you received in AvahiServiceBrowserCallback here. */
+    const char *type,         /**< Pass the type argument you received in AvahiServiceBrowserCallback here. */
+    const char *domain,       /**< Pass the domain argument you received in AvahiServiceBrowserCallback here. */
+    AvahiProtocol aprotocol,  /**< The desired address family of the service address to resolve. AVAHI_PROTO_UNSPEC if your application can deal with both IPv4 and IPv6 */
+    AvahiLookupFlags flags,
+    AvahiServiceResolverCallback callback,
+    void *userdata);
+
+/** Get the parent client of an AvahiServiceResolver object */
+AvahiClient* avahi_service_resolver_get_client (AvahiServiceResolver *);
+
+/** Free a service resolver object */
+int avahi_service_resolver_free(AvahiServiceResolver *r);
+
+/** @} */
+
+/** \cond fulldocs */
+/** A service resolver object */
+typedef struct AvahiHostNameResolver AvahiHostNameResolver;
+
+/** The function prototype for the callback of an AvahiHostNameResolver */
+typedef void (*AvahiHostNameResolverCallback) (
+    AvahiHostNameResolver *r,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiResolverEvent event,
+    const char *name,
+    const AvahiAddress *a,
+    AvahiLookupResultFlags flags,
+    void *userdata);
+
+/** Create a new hostname resolver object */
+AvahiHostNameResolver * avahi_host_name_resolver_new(
+    AvahiClient *client,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    const char *name,
+    AvahiProtocol aprotocol,
+    AvahiLookupFlags flags,
+    AvahiHostNameResolverCallback callback,
+    void *userdata);
+
+/** Get the parent client of an AvahiHostNameResolver object */
+AvahiClient* avahi_host_name_resolver_get_client (AvahiHostNameResolver *);
+
+/** Free a hostname resolver object */
+int avahi_host_name_resolver_free(AvahiHostNameResolver *r);
+
+/** An address resolver object */
+typedef struct AvahiAddressResolver AvahiAddressResolver;
+
+/** The function prototype for the callback of an AvahiAddressResolver */
+typedef void (*AvahiAddressResolverCallback) (
+    AvahiAddressResolver *r,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiResolverEvent event,
+    const AvahiAddress *a,
+    const char *name,
+    AvahiLookupResultFlags flags,
+    void *userdata);
+
+/** Create a new address resolver object from an AvahiAddress object */
+AvahiAddressResolver* avahi_address_resolver_new(
+    AvahiClient *client,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    const AvahiAddress *a,
+    AvahiLookupFlags flags,
+    AvahiAddressResolverCallback callback,
+    void *userdata);
+
+/** Get the parent client of an AvahiAddressResolver object */
+AvahiClient* avahi_address_resolver_get_client (AvahiAddressResolver *);
+
+/** Free a AvahiAddressResolver resolver object */
+int avahi_address_resolver_free(AvahiAddressResolver *r);
+
+/** \endcond */
+
+/** @{ \name Record Browser */
+
+/** A record browser object */
+typedef struct AvahiRecordBrowser AvahiRecordBrowser;
+
+/** The function prototype for the callback of an AvahiRecordBrowser */
+typedef void (*AvahiRecordBrowserCallback) (
+    AvahiRecordBrowser *b,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiBrowserEvent event,
+    const char *name,
+    uint16_t clazz,
+    uint16_t type,
+    const void *rdata,
+    size_t size,
+    AvahiLookupResultFlags flags,
+    void *userdata);
+
+/** Browse for records of a type on the local network */
+AvahiRecordBrowser* avahi_record_browser_new(
+    AvahiClient *client,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    const char *name,
+    uint16_t clazz,
+    uint16_t type,
+    AvahiLookupFlags flags,
+    AvahiRecordBrowserCallback callback,
+    void *userdata);
+
+/** Get the parent client of an AvahiRecordBrowser object */
+AvahiClient* avahi_record_browser_get_client(AvahiRecordBrowser *);
+
+/** Cleans up and frees an AvahiRecordBrowser object */
+int avahi_record_browser_free(AvahiRecordBrowser *);
+
+/** @} */
+
+AVAHI_C_DECL_END
+
+#endif
diff --git a/avahi-0.6.31/avahi-client/publish.h b/avahi-0.6.31/avahi-client/publish.h
new file mode 100644
index 0000000..ea731f2
--- /dev/null
+++ b/avahi-0.6.31/avahi-client/publish.h
@@ -0,0 +1,172 @@
+#ifndef fooclientpublishhfoo
+#define fooclientpublishhfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#include <inttypes.h>
+
+#include <avahi-common/cdecl.h>
+#include <avahi-common/address.h>
+#include <avahi-common/strlst.h>
+#include <avahi-common/defs.h>
+#include <avahi-common/watch.h>
+#include <avahi-common/gccmacro.h>
+
+#include <avahi-client/client.h>
+
+/** \file avahi-client/publish.h Publishing Client API */
+
+/** \example client-publish-service.c Example how to register a DNS-SD
+ * service using the client interface to avahi-daemon. It behaves like a network
+ * printer registering both an IPP and a BSD LPR service. */
+
+AVAHI_C_DECL_BEGIN
+
+/** An entry group object */
+typedef struct AvahiEntryGroup AvahiEntryGroup;
+
+/** The function prototype for the callback of an AvahiEntryGroup */
+typedef void (*AvahiEntryGroupCallback) (
+    AvahiEntryGroup *g,
+    AvahiEntryGroupState state /**< The new state of the entry group */,
+    void* userdata /* The arbitrary user data pointer originally passed to avahi_entry_group_new()*/);
+
+/** @{ \name Construction and destruction */
+
+/** Create a new AvahiEntryGroup object */
+AvahiEntryGroup* avahi_entry_group_new(
+    AvahiClient* c,
+    AvahiEntryGroupCallback callback /**< This callback is called whenever the state of this entry group changes. May not be NULL. Please note that this function is called for the first time from within the avahi_entry_group_new() context! Thus, in the callback you should not make use of global variables that are initialized only after your call to avahi_entry_group_new(). A common mistake is to store the AvahiEntryGroup pointer returned by avahi_entry_group_new() in a global variable and assume that this global variable already contains the valid pointer when the callback is called for the first time. A work-around for this is to always use the AvahiEntryGroup pointer passed to the callback function instead of the global pointer. */,
+    void *userdata /**< This arbitrary user data pointer will be passed to the callback functon */);
+
+/** Clean up and free an AvahiEntryGroup object */
+int avahi_entry_group_free (AvahiEntryGroup *);
+
+/** @} */
+
+/** @{ \name State */
+
+/** Commit an AvahiEntryGroup. The entries in the entry group are now registered on the network. Commiting empty entry groups is considered an error. */
+int avahi_entry_group_commit (AvahiEntryGroup*);
+
+/** Reset an AvahiEntryGroup. This takes effect immediately. */
+int avahi_entry_group_reset (AvahiEntryGroup*);
+
+/** Get an AvahiEntryGroup's state */
+int avahi_entry_group_get_state (AvahiEntryGroup*);
+
+/** Check if an AvahiEntryGroup is empty */
+int avahi_entry_group_is_empty (AvahiEntryGroup*);
+
+/** Get an AvahiEntryGroup's owning client instance */
+AvahiClient* avahi_entry_group_get_client (AvahiEntryGroup*);
+
+/** @} */
+
+/** @{ \name Adding and updating entries */
+
+/** Add a service. Takes a variable NULL terminated list of TXT record strings as last arguments. Please note that this service is not announced on the network before avahi_entry_group_commit() is called. */
+int avahi_entry_group_add_service(
+    AvahiEntryGroup *group,
+    AvahiIfIndex interface /**< The interface this service shall be announced on. We recommend to pass AVAHI_IF_UNSPEC here, to announce on all interfaces. */,
+    AvahiProtocol protocol /**< The protocol this service shall be announced with, i.e. MDNS over IPV4 or MDNS over IPV6. We recommend to pass AVAHI_PROTO_UNSPEC here, to announce this service on all protocols the daemon supports. */,
+    AvahiPublishFlags flags /**< Usually 0, unless you know what you do */,
+    const char *name        /**< The name for the new service. Must be valid service name. i.e. a string shorter than 63 characters and valid UTF-8. May not be NULL. */,
+    const char *type        /**< The service type for the new service, such as _http._tcp. May not be NULL. */,
+    const char *domain      /**< The domain to register this domain in. We recommend to pass NULL here, to let the daemon decide */,
+    const char *host        /**< The host this services is residing on. We recommend to pass NULL here, the daemon will than automatically insert the local host name in that case */,
+    uint16_t port           /**< The IP port number of this service */,
+    ...) AVAHI_GCC_SENTINEL;
+
+/** Add a service, takes an AvahiStringList for TXT records. Arguments have the same meaning as for avahi_entry_group_add_service(). */
+int avahi_entry_group_add_service_strlst(
+    AvahiEntryGroup *group,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiPublishFlags flags,
+    const char *name,
+    const char *type,
+    const char *domain,
+    const char *host,
+    uint16_t port,
+    AvahiStringList *txt /**< The TXT data for this service. You may free this object after calling this function, it is not referenced any further */);
+
+/** Add a subtype for a service. The service should already be existent in the entry group. You may add as many subtypes for a service as you wish. */
+int avahi_entry_group_add_service_subtype(
+    AvahiEntryGroup *group,
+    AvahiIfIndex interface /**< The interface this subtype shall be announced on. This should match the value passed for the original avahi_entry_group_add_service() call. */,
+    AvahiProtocol protocol /**< The protocol this subtype shall be announced with. This should match the value passed for the original avahi_entry_group_add_service() call. */,
+    AvahiPublishFlags flags  /**< Only != 0 if you really know what you do */,
+    const char *name         /**< The name of the service, as passed to avahi_entry_group_add_service(). May not be NULL. */,
+    const char *type         /**< The type of the service, as passed to avahi_entry_group_add_service(). May not be NULL. */,
+    const char *domain       /**< The domain this service resides is, as passed to avahi_entry_group_add_service(). May be NULL. */,
+    const char *subtype /**< The new subtype to register for the specified service. May not be NULL. */);
+
+/** Update a TXT record for an existing service. The service should already be existent in the entry group. */
+int avahi_entry_group_update_service_txt(
+    AvahiEntryGroup *g,
+    AvahiIfIndex interface   /**< The interface this service is announced on. This should match the value passed to the original avahi_entry_group_add_service() call. */,
+    AvahiProtocol protocol   /**< The protocol this service is announced with. This should match the value passed to the original avahi_entry_group_add_service() call. */,
+    AvahiPublishFlags flags  /**< Only != 0 if you really know what you do */,
+    const char *name         /**< The name of the service, as passed to avahi_entry_group_add_service(). May not be NULL. */,
+    const char *type         /**< The type of the service, as passed to avahi_entry_group_add_service(). May not be NULL. */,
+    const char *domain       /**< The domain this service resides is, as passed to avahi_entry_group_add_service(). May be NULL. */,
+    ...) AVAHI_GCC_SENTINEL;
+
+/** Update a TXT record for an existing service. Similar to avahi_entry_group_update_service_txt() but takes an AvahiStringList for the TXT strings, instead of a NULL terminated list of arguments. */
+int avahi_entry_group_update_service_txt_strlst(
+    AvahiEntryGroup *g,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiPublishFlags flags,
+    const char *name,
+    const char *type,
+    const char *domain,
+    AvahiStringList *strlst);
+
+/** \cond fulldocs */
+/** Add a host/address pair */
+int avahi_entry_group_add_address(
+    AvahiEntryGroup *group,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiPublishFlags flags,
+    const char *name /**< The FDQN of the new hostname to register */,
+    const AvahiAddress *a /**< The address this host name shall map to */);
+/** \endcond */
+
+/** Add an arbitrary record. I hope you know what you do. */
+int avahi_entry_group_add_record(
+    AvahiEntryGroup *group,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiPublishFlags flags,
+    const char *name,
+    uint16_t clazz,
+    uint16_t type,
+    uint32_t ttl,
+    const void *rdata,
+    size_t size);
+
+/** @} */
+
+AVAHI_C_DECL_END
+
+#endif
diff --git a/avahi-0.6.31/avahi-client/resolver.c b/avahi-0.6.31/avahi-client/resolver.c
new file mode 100644
index 0000000..6ee15e9
--- /dev/null
+++ b/avahi-0.6.31/avahi-client/resolver.c
@@ -0,0 +1,778 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include <dbus/dbus.h>
+
+#include <avahi-client/client.h>
+#include <avahi-common/dbus.h>
+#include <avahi-common/llist.h>
+#include <avahi-common/error.h>
+#include <avahi-common/malloc.h>
+
+#include "client.h"
+#include "internal.h"
+
+/* AvahiServiceResolver implementation */
+
+DBusHandlerResult avahi_service_resolver_event (AvahiClient *client, AvahiResolverEvent event, DBusMessage *message) {
+    AvahiServiceResolver *r = NULL;
+    DBusError error;
+    const char *path;
+    AvahiStringList *strlst = NULL;
+
+    assert(client);
+    assert(message);
+
+    dbus_error_init (&error);
+
+    if (!(path = dbus_message_get_path(message)))
+        goto fail;
+
+    for (r = client->service_resolvers; r; r = r->service_resolvers_next)
+        if (strcmp (r->path, path) == 0)
+            break;
+
+    if (!r)
+        goto fail;
+
+    switch (event) {
+        case AVAHI_RESOLVER_FOUND: {
+            int j;
+            int32_t interface, protocol, aprotocol;
+            uint32_t flags;
+            char *name, *type, *domain, *host, *address;
+            uint16_t port;
+            DBusMessageIter iter, sub;
+            AvahiAddress a;
+
+            if (!dbus_message_get_args(
+                    message, &error,
+                    DBUS_TYPE_INT32, &interface,
+                    DBUS_TYPE_INT32, &protocol,
+                    DBUS_TYPE_STRING, &name,
+                    DBUS_TYPE_STRING, &type,
+                    DBUS_TYPE_STRING, &domain,
+                    DBUS_TYPE_STRING, &host,
+                    DBUS_TYPE_INT32, &aprotocol,
+                    DBUS_TYPE_STRING, &address,
+                    DBUS_TYPE_UINT16, &port,
+                    DBUS_TYPE_INVALID) ||
+                dbus_error_is_set (&error)) {
+
+                fprintf(stderr, "Failed to parse resolver event.\n");
+                goto fail;
+            }
+
+            dbus_message_iter_init(message, &iter);
+
+            for (j = 0; j < 9; j++)
+                dbus_message_iter_next(&iter);
+
+            if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_ARRAY ||
+                dbus_message_iter_get_element_type(&iter) != DBUS_TYPE_ARRAY) {
+                fprintf(stderr, "Error parsing service resolving message\n");
+                goto fail;
+            }
+
+            strlst = NULL;
+            dbus_message_iter_recurse(&iter, &sub);
+
+            for (;;) {
+                DBusMessageIter sub2;
+                int at;
+                const uint8_t *k;
+                int n;
+
+                if ((at = dbus_message_iter_get_arg_type(&sub)) == DBUS_TYPE_INVALID)
+                    break;
+
+                assert(at == DBUS_TYPE_ARRAY);
+
+                if (dbus_message_iter_get_element_type(&sub) != DBUS_TYPE_BYTE) {
+                    fprintf(stderr, "Error parsing service resolving message\n");
+                    goto fail;
+                }
+
+                dbus_message_iter_recurse(&sub, &sub2);
+
+                k = NULL; n = 0;
+                dbus_message_iter_get_fixed_array(&sub2, &k, &n);
+                if (k && n > 0)
+                    strlst = avahi_string_list_add_arbitrary(strlst, k, n);
+
+                dbus_message_iter_next(&sub);
+            }
+
+            dbus_message_iter_next(&iter);
+
+            if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_UINT32) {
+                fprintf(stderr, "Failed to parse resolver event.\n");
+                goto fail;
+            }
+
+            dbus_message_iter_get_basic(&iter, &flags);
+
+            assert(address);
+
+            if (address[0] == 0)
+                address = NULL;
+	    else
+            	avahi_address_parse(address, (AvahiProtocol) aprotocol, &a);
+
+            r->callback(r, (AvahiIfIndex) interface, (AvahiProtocol) protocol, AVAHI_RESOLVER_FOUND, name, type, domain, host, address ? &a : NULL, port, strlst, (AvahiLookupResultFlags) flags, r->userdata);
+
+            avahi_string_list_free(strlst);
+            break;
+        }
+
+        case AVAHI_RESOLVER_FAILURE: {
+            char *etxt;
+
+            if (!dbus_message_get_args(
+                    message, &error,
+                    DBUS_TYPE_STRING, &etxt,
+                    DBUS_TYPE_INVALID) ||
+                dbus_error_is_set (&error)) {
+                fprintf(stderr, "Failed to parse resolver event.\n");
+                goto fail;
+            }
+
+            avahi_client_set_errno(r->client, avahi_error_dbus_to_number(etxt));
+            r->callback(r, r->interface, r->protocol, event, r->name, r->type, r->domain, NULL, NULL, 0, NULL, 0, r->userdata);
+            break;
+        }
+    }
+
+    return DBUS_HANDLER_RESULT_HANDLED;
+
+
+fail:
+    dbus_error_free (&error);
+    avahi_string_list_free(strlst);
+    return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
+
+AvahiServiceResolver * avahi_service_resolver_new(
+    AvahiClient *client,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    const char *name,
+    const char *type,
+    const char *domain,
+    AvahiProtocol aprotocol,
+    AvahiLookupFlags flags,
+    AvahiServiceResolverCallback callback,
+    void *userdata) {
+
+    DBusError error;
+    AvahiServiceResolver *r = NULL;
+    DBusMessage *message = NULL, *reply = NULL;
+    int32_t i_interface, i_protocol, i_aprotocol;
+    uint32_t u_flags;
+    char *path;
+
+    assert(client);
+    assert(type);
+
+    if (!domain)
+        domain = "";
+
+    if (!name)
+        name = "";
+
+    dbus_error_init (&error);
+
+    if (!avahi_client_is_connected(client)) {
+        avahi_client_set_errno(client, AVAHI_ERR_BAD_STATE);
+        goto fail;
+    }
+
+    if (!(r = avahi_new(AvahiServiceResolver, 1))) {
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    r->client = client;
+    r->callback = callback;
+    r->userdata = userdata;
+    r->path = NULL;
+    r->name = r->type = r->domain = NULL;
+    r->interface = interface;
+    r->protocol = protocol;
+
+    AVAHI_LLIST_PREPEND(AvahiServiceResolver, service_resolvers, client->service_resolvers, r);
+
+    if (name && name[0])
+        if (!(r->name = avahi_strdup(name))) {
+            avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+            goto fail;
+        }
+
+    if (!(r->type = avahi_strdup(type))) {
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    if (domain && domain[0])
+        if (!(r->domain = avahi_strdup(domain))) {
+            avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+            goto fail;
+        }
+
+
+    if (!(message = dbus_message_new_method_call(AVAHI_DBUS_NAME, AVAHI_DBUS_PATH_SERVER, AVAHI_DBUS_INTERFACE_SERVER, "ServiceResolverNew"))) {
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    i_interface = (int32_t) interface;
+    i_protocol = (int32_t) protocol;
+    i_aprotocol = (int32_t) aprotocol;
+    u_flags = (uint32_t) flags;
+
+    if (!(dbus_message_append_args(
+              message,
+              DBUS_TYPE_INT32, &i_interface,
+              DBUS_TYPE_INT32, &i_protocol,
+              DBUS_TYPE_STRING, &name,
+              DBUS_TYPE_STRING, &type,
+              DBUS_TYPE_STRING, &domain,
+              DBUS_TYPE_INT32, &i_aprotocol,
+              DBUS_TYPE_UINT32, &u_flags,
+              DBUS_TYPE_INVALID))) {
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    if (!(reply = dbus_connection_send_with_reply_and_block(client->bus, message, -1, &error)) ||
+        dbus_error_is_set(&error)) {
+        avahi_client_set_errno(client, AVAHI_ERR_DBUS_ERROR);
+        goto fail;
+    }
+
+    if (!dbus_message_get_args (reply, &error, DBUS_TYPE_OBJECT_PATH, &path, DBUS_TYPE_INVALID) ||
+        dbus_error_is_set(&error) ||
+        !path) {
+        avahi_client_set_errno(client, AVAHI_ERR_DBUS_ERROR);
+        goto fail;
+    }
+
+    if (!(r->path = avahi_strdup(path))) {
+
+        /* FIXME: We don't remove the object on the server side */
+
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+
+    dbus_message_unref(message);
+    dbus_message_unref(reply);
+
+    return r;
+
+fail:
+
+    if (dbus_error_is_set(&error)) {
+        avahi_client_set_dbus_error(client, &error);
+        dbus_error_free(&error);
+    }
+
+    if (r)
+        avahi_service_resolver_free(r);
+
+    if (message)
+        dbus_message_unref(message);
+
+    if (reply)
+        dbus_message_unref(reply);
+
+    return NULL;
+
+}
+
+AvahiClient* avahi_service_resolver_get_client (AvahiServiceResolver *r) {
+    assert (r);
+
+    return r->client;
+}
+
+int avahi_service_resolver_free(AvahiServiceResolver *r) {
+    AvahiClient *client;
+    int ret = AVAHI_OK;
+
+    assert(r);
+    client = r->client;
+
+    if (r->path && avahi_client_is_connected(client))
+        ret = avahi_client_simple_method_call(client, r->path, AVAHI_DBUS_INTERFACE_SERVICE_RESOLVER, "Free");
+
+    AVAHI_LLIST_REMOVE(AvahiServiceResolver, service_resolvers, client->service_resolvers, r);
+
+    avahi_free(r->path);
+    avahi_free(r->name);
+    avahi_free(r->type);
+    avahi_free(r->domain);
+    avahi_free(r);
+
+    return ret;
+}
+
+/* AvahiHostNameResolver implementation */
+
+DBusHandlerResult avahi_host_name_resolver_event (AvahiClient *client, AvahiResolverEvent event, DBusMessage *message) {
+    AvahiHostNameResolver *r = NULL;
+    DBusError error;
+    const char *path;
+
+    assert(client);
+    assert(message);
+
+    dbus_error_init (&error);
+
+    if (!(path = dbus_message_get_path(message)))
+        goto fail;
+
+    for (r = client->host_name_resolvers; r; r = r->host_name_resolvers_next)
+        if (strcmp (r->path, path) == 0)
+            break;
+
+    if (!r)
+        goto fail;
+
+    switch (event) {
+        case AVAHI_RESOLVER_FOUND: {
+            int32_t interface, protocol, aprotocol;
+            uint32_t flags;
+            char *name, *address;
+            AvahiAddress a;
+
+            if (!dbus_message_get_args(
+                    message, &error,
+                    DBUS_TYPE_INT32, &interface,
+                    DBUS_TYPE_INT32, &protocol,
+                    DBUS_TYPE_STRING, &name,
+                    DBUS_TYPE_INT32, &aprotocol,
+                    DBUS_TYPE_STRING, &address,
+                    DBUS_TYPE_UINT32, &flags,
+                    DBUS_TYPE_INVALID) ||
+                dbus_error_is_set (&error)) {
+                fprintf(stderr, "Failed to parse resolver event.\n");
+                goto fail;
+            }
+
+            assert(address);
+            if (!avahi_address_parse(address, (AvahiProtocol) aprotocol, &a)) {
+                fprintf(stderr, "Failed to parse address\n");
+                goto fail;
+            }
+
+            r->callback(r, (AvahiIfIndex) interface, (AvahiProtocol) protocol, AVAHI_RESOLVER_FOUND, name, &a, (AvahiLookupResultFlags) flags, r->userdata);
+            break;
+        }
+
+        case AVAHI_RESOLVER_FAILURE: {
+            char *etxt;
+
+            if (!dbus_message_get_args(
+                    message, &error,
+                    DBUS_TYPE_STRING, &etxt,
+                    DBUS_TYPE_INVALID) ||
+                dbus_error_is_set (&error)) {
+                fprintf(stderr, "Failed to parse resolver event.\n");
+                goto fail;
+            }
+
+            avahi_client_set_errno(r->client, avahi_error_dbus_to_number(etxt));
+            r->callback(r, r->interface, r->protocol, event, r->host_name, NULL, 0, r->userdata);
+            break;
+        }
+    }
+
+    return DBUS_HANDLER_RESULT_HANDLED;
+
+fail:
+    dbus_error_free (&error);
+    return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
+
+
+AvahiHostNameResolver * avahi_host_name_resolver_new(
+    AvahiClient *client,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    const char *name,
+    AvahiProtocol aprotocol,
+    AvahiLookupFlags flags,
+    AvahiHostNameResolverCallback callback,
+    void *userdata) {
+
+    DBusError error;
+    AvahiHostNameResolver *r = NULL;
+    DBusMessage *message = NULL, *reply = NULL;
+    int32_t i_interface, i_protocol, i_aprotocol;
+    uint32_t u_flags;
+    char *path;
+
+    assert(client);
+    assert(name);
+
+    dbus_error_init (&error);
+
+    if (!avahi_client_is_connected(client)) {
+        avahi_client_set_errno(client, AVAHI_ERR_BAD_STATE);
+        goto fail;
+    }
+
+    if (!(r = avahi_new(AvahiHostNameResolver, 1))) {
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    r->client = client;
+    r->callback = callback;
+    r->userdata = userdata;
+    r->path = NULL;
+    r->interface = interface;
+    r->protocol = protocol;
+    r->host_name = NULL;
+
+    AVAHI_LLIST_PREPEND(AvahiHostNameResolver, host_name_resolvers, client->host_name_resolvers, r);
+
+    if (!(r->host_name = avahi_strdup(name))) {
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    if (!(message = dbus_message_new_method_call(AVAHI_DBUS_NAME, AVAHI_DBUS_PATH_SERVER, AVAHI_DBUS_INTERFACE_SERVER, "HostNameResolverNew"))) {
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    i_interface = (int32_t) interface;
+    i_protocol = (int32_t) protocol;
+    i_aprotocol = (int32_t) aprotocol;
+    u_flags = (uint32_t) flags;
+
+    if (!(dbus_message_append_args(
+              message,
+              DBUS_TYPE_INT32, &i_interface,
+              DBUS_TYPE_INT32, &i_protocol,
+              DBUS_TYPE_STRING, &name,
+              DBUS_TYPE_INT32, &i_aprotocol,
+              DBUS_TYPE_UINT32, &u_flags,
+              DBUS_TYPE_INVALID))) {
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    if (!(reply = dbus_connection_send_with_reply_and_block(client->bus, message, -1, &error)) ||
+        dbus_error_is_set(&error)) {
+        avahi_client_set_errno(client, AVAHI_ERR_DBUS_ERROR);
+        goto fail;
+    }
+
+    if (!dbus_message_get_args (reply, &error, DBUS_TYPE_OBJECT_PATH, &path, DBUS_TYPE_INVALID) ||
+        dbus_error_is_set(&error) ||
+        !path) {
+        avahi_client_set_errno(client, AVAHI_ERR_DBUS_ERROR);
+        goto fail;
+    }
+
+    if (!(r->path = avahi_strdup(path))) {
+
+        /* FIXME: We don't remove the object on the server side */
+
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    dbus_message_unref(message);
+    dbus_message_unref(reply);
+
+    return r;
+
+fail:
+
+    if (dbus_error_is_set(&error)) {
+        avahi_client_set_dbus_error(client, &error);
+        dbus_error_free(&error);
+    }
+
+    if (r)
+        avahi_host_name_resolver_free(r);
+
+    if (message)
+        dbus_message_unref(message);
+
+    if (reply)
+        dbus_message_unref(reply);
+
+    return NULL;
+
+}
+
+int avahi_host_name_resolver_free(AvahiHostNameResolver *r) {
+    int ret = AVAHI_OK;
+    AvahiClient *client;
+
+    assert(r);
+    client = r->client;
+
+    if (r->path && avahi_client_is_connected(client))
+        ret = avahi_client_simple_method_call(client, r->path, AVAHI_DBUS_INTERFACE_HOST_NAME_RESOLVER, "Free");
+
+    AVAHI_LLIST_REMOVE(AvahiHostNameResolver, host_name_resolvers, client->host_name_resolvers, r);
+
+    avahi_free(r->path);
+    avahi_free(r->host_name);
+    avahi_free(r);
+
+    return ret;
+}
+
+AvahiClient* avahi_host_name_resolver_get_client (AvahiHostNameResolver *r) {
+    assert (r);
+
+    return r->client;
+}
+
+/* AvahiAddressResolver implementation */
+
+DBusHandlerResult avahi_address_resolver_event (AvahiClient *client, AvahiResolverEvent event, DBusMessage *message) {
+    AvahiAddressResolver *r = NULL;
+    DBusError error;
+    const char *path;
+
+    assert(client);
+    assert(message);
+
+    dbus_error_init (&error);
+
+    if (!(path = dbus_message_get_path(message)))
+        goto fail;
+
+    for (r = client->address_resolvers; r; r = r->address_resolvers_next)
+        if (strcmp (r->path, path) == 0)
+            break;
+
+    if (!r)
+        goto fail;
+
+    switch (event) {
+        case AVAHI_RESOLVER_FOUND: {
+            int32_t interface, protocol, aprotocol;
+            uint32_t flags;
+            char *name, *address;
+            AvahiAddress a;
+
+            if (!dbus_message_get_args(
+                    message, &error,
+                    DBUS_TYPE_INT32, &interface,
+                    DBUS_TYPE_INT32, &protocol,
+                    DBUS_TYPE_INT32, &aprotocol,
+                    DBUS_TYPE_STRING, &address,
+                    DBUS_TYPE_STRING, &name,
+                    DBUS_TYPE_UINT32, &flags,
+                    DBUS_TYPE_INVALID) ||
+                dbus_error_is_set (&error)) {
+                fprintf(stderr, "Failed to parse resolver event.\n");
+                goto fail;
+            }
+
+            assert(address);
+            if (!avahi_address_parse(address, (AvahiProtocol) aprotocol, &a)) {
+                fprintf(stderr, "Failed to parse address\n");
+                goto fail;
+            }
+
+            r->callback(r, (AvahiIfIndex) interface, (AvahiProtocol) protocol, AVAHI_RESOLVER_FOUND, &a, name, (AvahiLookupResultFlags) flags, r->userdata);
+            break;
+        }
+
+        case AVAHI_RESOLVER_FAILURE: {
+            char *etxt;
+
+            if (!dbus_message_get_args(
+                    message, &error,
+                    DBUS_TYPE_STRING, &etxt,
+                    DBUS_TYPE_INVALID) ||
+                dbus_error_is_set (&error)) {
+                fprintf(stderr, "Failed to parse resolver event.\n");
+                goto fail;
+            }
+
+            avahi_client_set_errno(r->client, avahi_error_dbus_to_number(etxt));
+            r->callback(r, r->interface, r->protocol, event, &r->address, NULL, 0, r->userdata);
+            break;
+        }
+    }
+
+    return DBUS_HANDLER_RESULT_HANDLED;
+
+fail:
+    dbus_error_free (&error);
+    return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
+
+AvahiAddressResolver * avahi_address_resolver_new(
+    AvahiClient *client,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    const AvahiAddress *a,
+    AvahiLookupFlags flags,
+    AvahiAddressResolverCallback callback,
+    void *userdata) {
+
+    DBusError error;
+    AvahiAddressResolver *r = NULL;
+    DBusMessage *message = NULL, *reply = NULL;
+    int32_t i_interface, i_protocol;
+    uint32_t u_flags;
+    char *path;
+    char addr[AVAHI_ADDRESS_STR_MAX], *address = addr;
+
+    assert(client);
+    assert(a);
+
+    dbus_error_init (&error);
+
+    if (!avahi_address_snprint (addr, sizeof(addr), a)) {
+        avahi_client_set_errno(client, AVAHI_ERR_INVALID_ADDRESS);
+        return NULL;
+    }
+
+    if (!avahi_client_is_connected(client)) {
+        avahi_client_set_errno(client, AVAHI_ERR_BAD_STATE);
+        goto fail;
+    }
+
+    if (!(r = avahi_new(AvahiAddressResolver, 1))) {
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    r->client = client;
+    r->callback = callback;
+    r->userdata = userdata;
+    r->path = NULL;
+    r->interface = interface;
+    r->protocol = protocol;
+    r->address = *a;
+
+    AVAHI_LLIST_PREPEND(AvahiAddressResolver, address_resolvers, client->address_resolvers, r);
+
+    if (!(message = dbus_message_new_method_call(AVAHI_DBUS_NAME, AVAHI_DBUS_PATH_SERVER, AVAHI_DBUS_INTERFACE_SERVER, "AddressResolverNew"))) {
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    i_interface = (int32_t) interface;
+    i_protocol = (int32_t) protocol;
+    u_flags = (uint32_t) flags;
+
+    if (!(dbus_message_append_args(
+              message,
+              DBUS_TYPE_INT32, &i_interface,
+              DBUS_TYPE_INT32, &i_protocol,
+              DBUS_TYPE_STRING, &address,
+              DBUS_TYPE_UINT32, &u_flags,
+              DBUS_TYPE_INVALID))) {
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    if (!(reply = dbus_connection_send_with_reply_and_block(client->bus, message, -1, &error)) ||
+        dbus_error_is_set(&error)) {
+        avahi_client_set_errno(client, AVAHI_ERR_DBUS_ERROR);
+        goto fail;
+    }
+
+    if (!dbus_message_get_args (reply, &error, DBUS_TYPE_OBJECT_PATH, &path, DBUS_TYPE_INVALID) ||
+        dbus_error_is_set(&error) ||
+        !path) {
+        avahi_client_set_errno(client, AVAHI_ERR_DBUS_ERROR);
+        goto fail;
+    }
+
+    if (!(r->path = avahi_strdup(path))) {
+
+        /* FIXME: We don't remove the object on the server side */
+
+        avahi_client_set_errno(client, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    dbus_message_unref(message);
+    dbus_message_unref(reply);
+
+    return r;
+
+fail:
+
+    if (dbus_error_is_set(&error)) {
+        avahi_client_set_dbus_error(client, &error);
+        dbus_error_free(&error);
+    }
+
+    if (r)
+        avahi_address_resolver_free(r);
+
+    if (message)
+        dbus_message_unref(message);
+
+    if (reply)
+        dbus_message_unref(reply);
+
+    return NULL;
+
+}
+
+AvahiClient* avahi_address_resolver_get_client (AvahiAddressResolver *r) {
+    assert (r);
+
+    return r->client;
+}
+
+int avahi_address_resolver_free(AvahiAddressResolver *r) {
+    AvahiClient *client;
+    int ret = AVAHI_OK;
+
+    assert(r);
+    client = r->client;
+
+    if (r->path && avahi_client_is_connected(client))
+        ret = avahi_client_simple_method_call(client, r->path, AVAHI_DBUS_INTERFACE_ADDRESS_RESOLVER, "Free");
+
+    AVAHI_LLIST_REMOVE(AvahiAddressResolver, address_resolvers, client->address_resolvers, r);
+
+    avahi_free(r->path);
+    avahi_free(r);
+
+    return ret;
+}
+
diff --git a/avahi-0.6.31/avahi-client/rr-test.c b/avahi-0.6.31/avahi-client/rr-test.c
new file mode 100644
index 0000000..0402585
--- /dev/null
+++ b/avahi-0.6.31/avahi-client/rr-test.c
@@ -0,0 +1,111 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <assert.h>
+
+#include <avahi-client/client.h>
+#include <avahi-client/lookup.h>
+#include <avahi-common/error.h>
+#include <avahi-common/simple-watch.h>
+#include <avahi-common/malloc.h>
+
+static void hexdump(const void* p, size_t size) {
+    const uint8_t *c = p;
+    assert(p);
+
+    printf("Dumping %lu bytes from %p:\n", (unsigned long) size, p);
+
+    while (size > 0) {
+        unsigned i;
+
+        for (i = 0; i < 16; i++) {
+            if (i < size)
+                printf("%02x ", c[i]);
+            else
+                printf("   ");
+        }
+
+        for (i = 0; i < 16; i++) {
+            if (i < size)
+                printf("%c", c[i] >= 32 && c[i] < 127 ? c[i] : '.');
+            else
+                printf(" ");
+        }
+
+        printf("\n");
+
+        c += 16;
+
+        if (size <= 16)
+            break;
+
+        size -= 16;
+    }
+}
+
+static void callback(
+    AVAHI_GCC_UNUSED AvahiRecordBrowser *r,
+    AVAHI_GCC_UNUSED AvahiIfIndex interface,
+    AVAHI_GCC_UNUSED AvahiProtocol protocol,
+    AvahiBrowserEvent event,
+    const char *name,
+    uint16_t clazz,
+    uint16_t type,
+    const void *rdata,
+    size_t rdata_size,
+    AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+    AVAHI_GCC_UNUSED void *userdata) {
+
+    fprintf(stderr, "%i name=%s class=%u type=%u\n", event, name, clazz, type);
+
+    if (rdata)
+        hexdump(rdata, rdata_size);
+}
+
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
+
+    AvahiSimplePoll *simple_poll;
+    const AvahiPoll *poll_api;
+    AvahiClient *client;
+    AvahiRecordBrowser *r;
+
+    simple_poll = avahi_simple_poll_new();
+    assert(simple_poll);
+
+    poll_api = avahi_simple_poll_get(simple_poll);
+    assert(poll_api);
+
+    client = avahi_client_new(poll_api, 0, NULL, NULL, NULL);
+    assert(client);
+
+    r = avahi_record_browser_new(client, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, "ecstasy.local", AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_HINFO, 0, callback, simple_poll);
+    assert(r);
+
+    avahi_simple_poll_loop(simple_poll);
+
+    avahi_client_free(client);
+    avahi_simple_poll_free(simple_poll);
+
+    return 0;
+}
diff --git a/avahi-0.6.31/avahi-client/srv-test.c b/avahi-0.6.31/avahi-client/srv-test.c
new file mode 100644
index 0000000..650bd77
--- /dev/null
+++ b/avahi-0.6.31/avahi-client/srv-test.c
@@ -0,0 +1,76 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <assert.h>
+
+#include <avahi-client/client.h>
+#include <avahi-client/lookup.h>
+#include <avahi-common/error.h>
+#include <avahi-common/simple-watch.h>
+#include <avahi-common/malloc.h>
+
+static void callback(
+    AVAHI_GCC_UNUSED AvahiServiceResolver *r,
+    AVAHI_GCC_UNUSED AvahiIfIndex interface,
+    AVAHI_GCC_UNUSED AvahiProtocol protocol,
+    AvahiResolverEvent event,
+    const char *name,
+    const char *type,
+    const char *domain,
+    const char *host_name,
+    AVAHI_GCC_UNUSED const AvahiAddress *a,
+    AVAHI_GCC_UNUSED uint16_t port,
+    AVAHI_GCC_UNUSED AvahiStringList *txt,
+    AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+    AVAHI_GCC_UNUSED void *userdata) {
+
+    fprintf(stderr, "%i name=%s type=%s domain=%s host=%s\n", event, name, type, domain, host_name);
+}
+
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
+
+    AvahiSimplePoll *simple_poll;
+    const AvahiPoll *poll_api;
+    AvahiClient *client;
+    AvahiServiceResolver *r;
+
+    simple_poll = avahi_simple_poll_new();
+    assert(simple_poll);
+
+    poll_api = avahi_simple_poll_get(simple_poll);
+    assert(poll_api);
+
+    client = avahi_client_new(poll_api, 0, NULL, NULL, NULL);
+    assert(client);
+
+    r = avahi_service_resolver_new(client, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, NULL, "_domain._udp", "0pointer.de", AVAHI_PROTO_UNSPEC, AVAHI_LOOKUP_NO_TXT, callback, simple_poll);
+    assert(r);
+
+    avahi_simple_poll_loop(simple_poll);
+
+    avahi_client_free(client);
+    avahi_simple_poll_free(simple_poll);
+
+    return 0;
+}
diff --git a/avahi-0.6.31/avahi-client/xdg-config-test.c b/avahi-0.6.31/avahi-client/xdg-config-test.c
new file mode 100644
index 0000000..a7ee63e
--- /dev/null
+++ b/avahi-0.6.31/avahi-client/xdg-config-test.c
@@ -0,0 +1,38 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <avahi-common/gccmacro.h>
+
+#include "xdg-config.h"
+
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
+
+    FILE *f;
+
+    f = avahi_xdg_config_open("foo");
+
+    if (f)
+        fclose(f);
+
+    return 0;
+}
diff --git a/avahi-0.6.31/avahi-client/xdg-config.c b/avahi-0.6.31/avahi-client/xdg-config.c
new file mode 100644
index 0000000..fc65016
--- /dev/null
+++ b/avahi-0.6.31/avahi-client/xdg-config.c
@@ -0,0 +1,68 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <assert.h>
+#include <limits.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+
+#include "xdg-config.h"
+
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
+FILE *avahi_xdg_config_open(const char *filename) {
+    FILE *f;
+    const char *e, *d;
+    char fn[PATH_MAX], *p = NULL, buf[2048], *s = NULL;
+
+    assert(filename);
+
+    if ((e = getenv("XDG_CONFIG_HOME")) && *e)
+        snprintf(p = fn, sizeof(fn), "%s/%s", e, filename);
+    else if ((e = getenv("HOME")) && *e)
+        snprintf(p = fn, sizeof(fn), "%s/.config/%s", e, filename);
+
+    if (p) {
+        if ((f = fopen(p, "r")))
+            return f;
+        else if (errno != ENOENT)
+            return NULL;
+    }
+
+    if (!(d = getenv("XDG_CONFIG_DIRS")) || !*d)
+        d = "/etc/xdg";
+
+    snprintf(buf, sizeof(buf), "%s", d);
+
+    for (e = strtok_r(buf, ":", &s); e; e = strtok_r(NULL, ":", &s)) {
+        snprintf(fn, sizeof(fn), "%s/%s", e, filename);
+
+        if ((f = fopen(fn, "r")))
+            return f;
+    }
+
+    return NULL;
+}
diff --git a/avahi-0.6.31/avahi-client/xdg-config.h b/avahi-0.6.31/avahi-client/xdg-config.h
new file mode 100644
index 0000000..6c855ab
--- /dev/null
+++ b/avahi-0.6.31/avahi-client/xdg-config.h
@@ -0,0 +1,27 @@
+#ifndef fooxdgconfighfoo
+#define fooxdgconfighfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#include <stdio.h>
+
+FILE *avahi_xdg_config_open(const char *filename);
+
+#endif
diff --git a/avahi-0.6.31/avahi-common/Makefile.am b/avahi-0.6.31/avahi-common/Makefile.am
new file mode 100644
index 0000000..79d062f
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/Makefile.am
@@ -0,0 +1,129 @@
+# This file is part of avahi.
+#
+# avahi 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 of the
+# License, or (at your option) any later version.
+#
+# avahi 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 General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+AM_CFLAGS=-I$(top_srcdir)
+
+# This cool debug trap works on i386/gcc only
+AM_CFLAGS+='-DDEBUG_TRAP=__asm__("int $$3")'
+
+avahi_commonincludedir=$(includedir)/avahi-common
+
+avahi_commoninclude_HEADERS = \
+	strlst.h \
+	address.h \
+	alternative.h \
+	domain.h \
+	cdecl.h \
+	defs.h \
+	malloc.h \
+	watch.h \
+	timeval.h \
+	simple-watch.h \
+	thread-watch.h \
+	gccmacro.h \
+	error.h \
+	llist.h \
+	rlist.h
+
+if ENABLE_TESTS
+noinst_PROGRAMS = \
+	strlst-test \
+	domain-test \
+	alternative-test \
+	timeval-test \
+	watch-test \
+	watch-test-thread \
+	utf8-test
+endif
+
+lib_LTLIBRARIES = \
+	libavahi-common.la
+
+libavahi_common_la_SOURCES = \
+	malloc.c malloc.h \
+	address.c address.h \
+	alternative.c alternative.h \
+	error.c error.h \
+	strlst.c strlst.h \
+	domain.c domain.h \
+	timeval.c timeval.h \
+	simple-watch.c simple-watch.h \
+	thread-watch.c thread-watch.h \
+	watch.h gccmacro.h \
+	rlist.h rlist.c \
+	utf8.c utf8.h \
+	i18n.c i18n.h
+
+libavahi_common_la_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -DAVAHI_LOCALEDIR=\"$(avahilocaledir)\"
+libavahi_common_la_LIBADD = $(AM_LDADD) $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) $(INTLLIBS)
+libavahi_common_la_LDFLAGS = $(AM_LDFLAGS)  -version-info $(LIBAVAHI_COMMON_VERSION_INFO)
+
+strlst_test_SOURCES = \
+	strlst.c strlst.h \
+	malloc.c malloc.h \
+	strlst-test.c
+strlst_test_CFLAGS = $(AM_CFLAGS)
+
+alternative_test_SOURCES = \
+	alternative.c alternative.h \
+	malloc.c malloc.h \
+	domain.c domain.h \
+	address.c address.h \
+	alternative-test.c \
+	utf8.c utf8.h
+alternative_test_CFLAGS = $(AM_CFLAGS)
+
+domain_test_SOURCES = \
+	domain.c domain.h \
+	malloc.c malloc.h \
+	address.c address.h \
+	domain-test.c \
+	utf8.c utf8.h
+domain_test_CFLAGS = $(AM_CFLAGS)
+
+watch_test_SOURCES = \
+	timeval.c timeval.h \
+	simple-watch.c simple-watch.h \
+	watch.h \
+	malloc.c malloc.h \
+	watch-test.c
+watch_test_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS)
+watch_test_LDADD = $(AM_LDADD) $(PTHREAD_LIBS) $(PTHREAD_CFLAGS)
+
+watch_test_thread_SOURCES = $(watch_test_SOURCES) thread-watch.c thread-watch.h
+watch_test_thread_CFLAGS = $(watch_test_CFLAGS) -DUSE_THREAD
+watch_test_thread_LDADD = $(watch_test_LDADD)
+
+timeval_test_SOURCES = \
+	timeval.c timeval.h \
+	timeval-test.c
+timeval_test_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS)
+timeval_test_LDADD = $(AM_LDADD) $(PTHREAD_LIBS) $(PTHREAD_CFLAGS)
+
+utf8_test_SOURCES = \
+	utf8-test.c \
+	utf8.c utf8.h
+utf8_test_CFLAGS = $(AM_CFLAGS)
+utf8_test_LDADD = $(AM_LDADD)
+
+if HAVE_DBUS
+
+noinst_HEADERS = \
+	dbus.h \
+	dbus-watch-glue.h
+
+endif
diff --git a/avahi-0.6.31/avahi-common/Makefile.in b/avahi-0.6.31/avahi-common/Makefile.in
new file mode 100644
index 0000000..3480ee4
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/Makefile.in
@@ -0,0 +1,1439 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# This file is part of avahi.
+#
+# avahi 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 of the
+# License, or (at your option) any later version.
+#
+# avahi 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 General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@ENABLE_TESTS_TRUE@noinst_PROGRAMS = strlst-test$(EXEEXT) \
+@ENABLE_TESTS_TRUE@	domain-test$(EXEEXT) \
+@ENABLE_TESTS_TRUE@	alternative-test$(EXEEXT) \
+@ENABLE_TESTS_TRUE@	timeval-test$(EXEEXT) watch-test$(EXEEXT) \
+@ENABLE_TESTS_TRUE@	watch-test-thread$(EXEEXT) \
+@ENABLE_TESTS_TRUE@	utf8-test$(EXEEXT)
+subdir = avahi-common
+DIST_COMMON = $(am__noinst_HEADERS_DIST) \
+	$(avahi_commoninclude_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/common/acx_pthread.m4 \
+	$(top_srcdir)/common/gcc_stack_protect.m4 \
+	$(top_srcdir)/common/gcc_visibility.m4 \
+	$(top_srcdir)/common/intltool.m4 \
+	$(top_srcdir)/common/introspection.m4 \
+	$(top_srcdir)/common/libtool.m4 \
+	$(top_srcdir)/common/ltoptions.m4 \
+	$(top_srcdir)/common/ltsugar.m4 \
+	$(top_srcdir)/common/ltversion.m4 \
+	$(top_srcdir)/common/lt~obsolete.m4 \
+	$(top_srcdir)/common/nls.m4 $(top_srcdir)/common/python.m4 \
+	$(top_srcdir)/acinclude.m4 $(top_srcdir)/common/doxygen.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+am__installdirs = "$(DESTDIR)$(libdir)" \
+	"$(DESTDIR)$(avahi_commonincludedir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+libavahi_common_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am_libavahi_common_la_OBJECTS = libavahi_common_la-malloc.lo \
+	libavahi_common_la-address.lo \
+	libavahi_common_la-alternative.lo libavahi_common_la-error.lo \
+	libavahi_common_la-strlst.lo libavahi_common_la-domain.lo \
+	libavahi_common_la-timeval.lo \
+	libavahi_common_la-simple-watch.lo \
+	libavahi_common_la-thread-watch.lo libavahi_common_la-rlist.lo \
+	libavahi_common_la-utf8.lo libavahi_common_la-i18n.lo
+libavahi_common_la_OBJECTS = $(am_libavahi_common_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+libavahi_common_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(libavahi_common_la_CFLAGS) $(CFLAGS) \
+	$(libavahi_common_la_LDFLAGS) $(LDFLAGS) -o $@
+PROGRAMS = $(noinst_PROGRAMS)
+am_alternative_test_OBJECTS = alternative_test-alternative.$(OBJEXT) \
+	alternative_test-malloc.$(OBJEXT) \
+	alternative_test-domain.$(OBJEXT) \
+	alternative_test-address.$(OBJEXT) \
+	alternative_test-alternative-test.$(OBJEXT) \
+	alternative_test-utf8.$(OBJEXT)
+alternative_test_OBJECTS = $(am_alternative_test_OBJECTS)
+alternative_test_LDADD = $(LDADD)
+alternative_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(alternative_test_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+	-o $@
+am_domain_test_OBJECTS = domain_test-domain.$(OBJEXT) \
+	domain_test-malloc.$(OBJEXT) domain_test-address.$(OBJEXT) \
+	domain_test-domain-test.$(OBJEXT) domain_test-utf8.$(OBJEXT)
+domain_test_OBJECTS = $(am_domain_test_OBJECTS)
+domain_test_LDADD = $(LDADD)
+domain_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(domain_test_CFLAGS) \
+	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am_strlst_test_OBJECTS = strlst_test-strlst.$(OBJEXT) \
+	strlst_test-malloc.$(OBJEXT) strlst_test-strlst-test.$(OBJEXT)
+strlst_test_OBJECTS = $(am_strlst_test_OBJECTS)
+strlst_test_LDADD = $(LDADD)
+strlst_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(strlst_test_CFLAGS) \
+	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am_timeval_test_OBJECTS = timeval_test-timeval.$(OBJEXT) \
+	timeval_test-timeval-test.$(OBJEXT)
+timeval_test_OBJECTS = $(am_timeval_test_OBJECTS)
+timeval_test_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
+timeval_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(timeval_test_CFLAGS) \
+	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am_utf8_test_OBJECTS = utf8_test-utf8-test.$(OBJEXT) \
+	utf8_test-utf8.$(OBJEXT)
+utf8_test_OBJECTS = $(am_utf8_test_OBJECTS)
+utf8_test_DEPENDENCIES =
+utf8_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(utf8_test_CFLAGS) \
+	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am_watch_test_OBJECTS = watch_test-timeval.$(OBJEXT) \
+	watch_test-simple-watch.$(OBJEXT) watch_test-malloc.$(OBJEXT) \
+	watch_test-watch-test.$(OBJEXT)
+watch_test_OBJECTS = $(am_watch_test_OBJECTS)
+watch_test_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+watch_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(watch_test_CFLAGS) \
+	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am__objects_1 = watch_test_thread-timeval.$(OBJEXT) \
+	watch_test_thread-simple-watch.$(OBJEXT) \
+	watch_test_thread-malloc.$(OBJEXT) \
+	watch_test_thread-watch-test.$(OBJEXT)
+am_watch_test_thread_OBJECTS = $(am__objects_1) \
+	watch_test_thread-thread-watch.$(OBJEXT)
+watch_test_thread_OBJECTS = $(am_watch_test_thread_OBJECTS)
+am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+watch_test_thread_DEPENDENCIES = $(am__DEPENDENCIES_2)
+watch_test_thread_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(watch_test_thread_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+	-o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC    " $@;
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(libavahi_common_la_SOURCES) $(alternative_test_SOURCES) \
+	$(domain_test_SOURCES) $(strlst_test_SOURCES) \
+	$(timeval_test_SOURCES) $(utf8_test_SOURCES) \
+	$(watch_test_SOURCES) $(watch_test_thread_SOURCES)
+DIST_SOURCES = $(libavahi_common_la_SOURCES) \
+	$(alternative_test_SOURCES) $(domain_test_SOURCES) \
+	$(strlst_test_SOURCES) $(timeval_test_SOURCES) \
+	$(utf8_test_SOURCES) $(watch_test_SOURCES) \
+	$(watch_test_thread_SOURCES)
+am__noinst_HEADERS_DIST = dbus.h dbus-watch-glue.h
+HEADERS = $(avahi_commoninclude_HEADERS) $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AVAHI_AUTOIPD_GROUP = @AVAHI_AUTOIPD_GROUP@
+AVAHI_AUTOIPD_USER = @AVAHI_AUTOIPD_USER@
+AVAHI_GROUP = @AVAHI_GROUP@
+AVAHI_PRIV_ACCESS_GROUP = @AVAHI_PRIV_ACCESS_GROUP@
+AVAHI_USER = @AVAHI_USER@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
+DBUS_SYSTEM_BUS_DEFAULT_ADDRESS = @DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@
+DBUS_SYS_DIR = @DBUS_SYS_DIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+DX_CONFIG = @DX_CONFIG@
+DX_DOCDIR = @DX_DOCDIR@
+DX_DOT = @DX_DOT@
+DX_DOXYGEN = @DX_DOXYGEN@
+DX_DVIPS = @DX_DVIPS@
+DX_EGREP = @DX_EGREP@
+DX_ENV = @DX_ENV@
+DX_FLAG_chi = @DX_FLAG_chi@
+DX_FLAG_chm = @DX_FLAG_chm@
+DX_FLAG_doc = @DX_FLAG_doc@
+DX_FLAG_dot = @DX_FLAG_dot@
+DX_FLAG_html = @DX_FLAG_html@
+DX_FLAG_man = @DX_FLAG_man@
+DX_FLAG_pdf = @DX_FLAG_pdf@
+DX_FLAG_ps = @DX_FLAG_ps@
+DX_FLAG_rtf = @DX_FLAG_rtf@
+DX_FLAG_xml = @DX_FLAG_xml@
+DX_HHC = @DX_HHC@
+DX_LATEX = @DX_LATEX@
+DX_MAKEINDEX = @DX_MAKEINDEX@
+DX_PDFLATEX = @DX_PDFLATEX@
+DX_PERL = @DX_PERL@
+DX_PROJECT = @DX_PROJECT@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GACUTIL = @GACUTIL@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB20_CFLAGS = @GLIB20_CFLAGS@
+GLIB20_LIBS = @GLIB20_LIBS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GOBJECT_CFLAGS = @GOBJECT_CFLAGS@
+GOBJECT_LIBS = @GOBJECT_LIBS@
+GREP = @GREP@
+GTK20_CFLAGS = @GTK20_CFLAGS@
+GTK20_LIBS = @GTK20_LIBS@
+GTK30_CFLAGS = @GTK30_CFLAGS@
+GTK30_LIBS = @GTK30_LIBS@
+HOWL_COMPAT_VERSION = @HOWL_COMPAT_VERSION@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
+INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
+INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
+INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
+INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
+INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
+INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBAVAHI_CLIENT_VERSION_INFO = @LIBAVAHI_CLIENT_VERSION_INFO@
+LIBAVAHI_COMMON_VERSION_INFO = @LIBAVAHI_COMMON_VERSION_INFO@
+LIBAVAHI_COMPAT_HOWL_VERSION_INFO = @LIBAVAHI_COMPAT_HOWL_VERSION_INFO@
+LIBAVAHI_COMPAT_LIBDNS_SD_VERSION_INFO = @LIBAVAHI_COMPAT_LIBDNS_SD_VERSION_INFO@
+LIBAVAHI_CORE_VERSION_INFO = @LIBAVAHI_CORE_VERSION_INFO@
+LIBAVAHI_GLIB_VERSION_INFO = @LIBAVAHI_GLIB_VERSION_INFO@
+LIBAVAHI_GOBJECT_VERSION_INFO = @LIBAVAHI_GOBJECT_VERSION_INFO@
+LIBAVAHI_QT3_VERSION_INFO = @LIBAVAHI_QT3_VERSION_INFO@
+LIBAVAHI_QT4_VERSION_INFO = @LIBAVAHI_QT4_VERSION_INFO@
+LIBAVAHI_UI_VERSION_INFO = @LIBAVAHI_UI_VERSION_INFO@
+LIBDAEMON_CFLAGS = @LIBDAEMON_CFLAGS@
+LIBDAEMON_LIBS = @LIBDAEMON_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MCS = @MCS@
+MDASSEMBLER = @MDASSEMBLER@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MOC_QT3 = @MOC_QT3@
+MOC_QT4 = @MOC_QT4@
+MONODOCER = @MONODOCER@
+MONODOC_CFLAGS = @MONODOC_CFLAGS@
+MONODOC_DIR = @MONODOC_DIR@
+MONODOC_LIBS = @MONODOC_LIBS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+QT3_CFLAGS = @QT3_CFLAGS@
+QT3_LIBS = @QT3_LIBS@
+QT4_CFLAGS = @QT4_CFLAGS@
+QT4_LIBS = @QT4_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STOW = @STOW@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+VISIBILITY_HIDDEN_CFLAGS = @VISIBILITY_HIDDEN_CFLAGS@
+XGETTEXT = @XGETTEXT@
+XML_CFLAGS = @XML_CFLAGS@
+XML_LIBS = @XML_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+avahi_runtime_dir = @avahi_runtime_dir@
+avahi_socket = @avahi_socket@
+avahilocaledir = @avahilocaledir@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+have_pkg_config = @have_pkg_config@
+have_xmltoman = @have_xmltoman@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+interfacesdir = @interfacesdir@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+systemdsystemunitdir = @systemdsystemunitdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# This cool debug trap works on i386/gcc only
+AM_CFLAGS = -I$(top_srcdir) '-DDEBUG_TRAP=__asm__("int $$3")'
+avahi_commonincludedir = $(includedir)/avahi-common
+avahi_commoninclude_HEADERS = \
+	strlst.h \
+	address.h \
+	alternative.h \
+	domain.h \
+	cdecl.h \
+	defs.h \
+	malloc.h \
+	watch.h \
+	timeval.h \
+	simple-watch.h \
+	thread-watch.h \
+	gccmacro.h \
+	error.h \
+	llist.h \
+	rlist.h
+
+lib_LTLIBRARIES = \
+	libavahi-common.la
+
+libavahi_common_la_SOURCES = \
+	malloc.c malloc.h \
+	address.c address.h \
+	alternative.c alternative.h \
+	error.c error.h \
+	strlst.c strlst.h \
+	domain.c domain.h \
+	timeval.c timeval.h \
+	simple-watch.c simple-watch.h \
+	thread-watch.c thread-watch.h \
+	watch.h gccmacro.h \
+	rlist.h rlist.c \
+	utf8.c utf8.h \
+	i18n.c i18n.h
+
+libavahi_common_la_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -DAVAHI_LOCALEDIR=\"$(avahilocaledir)\"
+libavahi_common_la_LIBADD = $(AM_LDADD) $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) $(INTLLIBS)
+libavahi_common_la_LDFLAGS = $(AM_LDFLAGS)  -version-info $(LIBAVAHI_COMMON_VERSION_INFO)
+strlst_test_SOURCES = \
+	strlst.c strlst.h \
+	malloc.c malloc.h \
+	strlst-test.c
+
+strlst_test_CFLAGS = $(AM_CFLAGS)
+alternative_test_SOURCES = \
+	alternative.c alternative.h \
+	malloc.c malloc.h \
+	domain.c domain.h \
+	address.c address.h \
+	alternative-test.c \
+	utf8.c utf8.h
+
+alternative_test_CFLAGS = $(AM_CFLAGS)
+domain_test_SOURCES = \
+	domain.c domain.h \
+	malloc.c malloc.h \
+	address.c address.h \
+	domain-test.c \
+	utf8.c utf8.h
+
+domain_test_CFLAGS = $(AM_CFLAGS)
+watch_test_SOURCES = \
+	timeval.c timeval.h \
+	simple-watch.c simple-watch.h \
+	watch.h \
+	malloc.c malloc.h \
+	watch-test.c
+
+watch_test_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS)
+watch_test_LDADD = $(AM_LDADD) $(PTHREAD_LIBS) $(PTHREAD_CFLAGS)
+watch_test_thread_SOURCES = $(watch_test_SOURCES) thread-watch.c thread-watch.h
+watch_test_thread_CFLAGS = $(watch_test_CFLAGS) -DUSE_THREAD
+watch_test_thread_LDADD = $(watch_test_LDADD)
+timeval_test_SOURCES = \
+	timeval.c timeval.h \
+	timeval-test.c
+
+timeval_test_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS)
+timeval_test_LDADD = $(AM_LDADD) $(PTHREAD_LIBS) $(PTHREAD_CFLAGS)
+utf8_test_SOURCES = \
+	utf8-test.c \
+	utf8.c utf8.h
+
+utf8_test_CFLAGS = $(AM_CFLAGS)
+utf8_test_LDADD = $(AM_LDADD)
+@HAVE_DBUS_TRUE@noinst_HEADERS = \
+@HAVE_DBUS_TRUE@	dbus.h \
+@HAVE_DBUS_TRUE@	dbus-watch-glue.h
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign avahi-common/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign avahi-common/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	list2=; for p in $$list; do \
+	  if test -f $$p; then \
+	    list2="$$list2 $$p"; \
+	  else :; fi; \
+	done; \
+	test -z "$$list2" || { \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+	}
+
+uninstall-libLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	for p in $$list; do \
+	  $(am__strip_dir) \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+	done
+
+clean-libLTLIBRARIES:
+	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libavahi-common.la: $(libavahi_common_la_OBJECTS) $(libavahi_common_la_DEPENDENCIES) $(EXTRA_libavahi_common_la_DEPENDENCIES) 
+	$(AM_V_CCLD)$(libavahi_common_la_LINK) -rpath $(libdir) $(libavahi_common_la_OBJECTS) $(libavahi_common_la_LIBADD) $(LIBS)
+
+clean-noinstPROGRAMS:
+	@list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+alternative-test$(EXEEXT): $(alternative_test_OBJECTS) $(alternative_test_DEPENDENCIES) $(EXTRA_alternative_test_DEPENDENCIES) 
+	@rm -f alternative-test$(EXEEXT)
+	$(AM_V_CCLD)$(alternative_test_LINK) $(alternative_test_OBJECTS) $(alternative_test_LDADD) $(LIBS)
+domain-test$(EXEEXT): $(domain_test_OBJECTS) $(domain_test_DEPENDENCIES) $(EXTRA_domain_test_DEPENDENCIES) 
+	@rm -f domain-test$(EXEEXT)
+	$(AM_V_CCLD)$(domain_test_LINK) $(domain_test_OBJECTS) $(domain_test_LDADD) $(LIBS)
+strlst-test$(EXEEXT): $(strlst_test_OBJECTS) $(strlst_test_DEPENDENCIES) $(EXTRA_strlst_test_DEPENDENCIES) 
+	@rm -f strlst-test$(EXEEXT)
+	$(AM_V_CCLD)$(strlst_test_LINK) $(strlst_test_OBJECTS) $(strlst_test_LDADD) $(LIBS)
+timeval-test$(EXEEXT): $(timeval_test_OBJECTS) $(timeval_test_DEPENDENCIES) $(EXTRA_timeval_test_DEPENDENCIES) 
+	@rm -f timeval-test$(EXEEXT)
+	$(AM_V_CCLD)$(timeval_test_LINK) $(timeval_test_OBJECTS) $(timeval_test_LDADD) $(LIBS)
+utf8-test$(EXEEXT): $(utf8_test_OBJECTS) $(utf8_test_DEPENDENCIES) $(EXTRA_utf8_test_DEPENDENCIES) 
+	@rm -f utf8-test$(EXEEXT)
+	$(AM_V_CCLD)$(utf8_test_LINK) $(utf8_test_OBJECTS) $(utf8_test_LDADD) $(LIBS)
+watch-test$(EXEEXT): $(watch_test_OBJECTS) $(watch_test_DEPENDENCIES) $(EXTRA_watch_test_DEPENDENCIES) 
+	@rm -f watch-test$(EXEEXT)
+	$(AM_V_CCLD)$(watch_test_LINK) $(watch_test_OBJECTS) $(watch_test_LDADD) $(LIBS)
+watch-test-thread$(EXEEXT): $(watch_test_thread_OBJECTS) $(watch_test_thread_DEPENDENCIES) $(EXTRA_watch_test_thread_DEPENDENCIES) 
+	@rm -f watch-test-thread$(EXEEXT)
+	$(AM_V_CCLD)$(watch_test_thread_LINK) $(watch_test_thread_OBJECTS) $(watch_test_thread_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alternative_test-address.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alternative_test-alternative-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alternative_test-alternative.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alternative_test-domain.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alternative_test-malloc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alternative_test-utf8.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/domain_test-address.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/domain_test-domain-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/domain_test-domain.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/domain_test-malloc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/domain_test-utf8.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_common_la-address.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_common_la-alternative.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_common_la-domain.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_common_la-error.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_common_la-i18n.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_common_la-malloc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_common_la-rlist.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_common_la-simple-watch.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_common_la-strlst.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_common_la-thread-watch.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_common_la-timeval.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_common_la-utf8.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strlst_test-malloc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strlst_test-strlst-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strlst_test-strlst.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeval_test-timeval-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeval_test-timeval.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utf8_test-utf8-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utf8_test-utf8.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/watch_test-malloc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/watch_test-simple-watch.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/watch_test-timeval.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/watch_test-watch-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/watch_test_thread-malloc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/watch_test_thread-simple-watch.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/watch_test_thread-thread-watch.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/watch_test_thread-timeval.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/watch_test_thread-watch-test.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+libavahi_common_la-malloc.lo: malloc.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_common_la_CFLAGS) $(CFLAGS) -MT libavahi_common_la-malloc.lo -MD -MP -MF $(DEPDIR)/libavahi_common_la-malloc.Tpo -c -o libavahi_common_la-malloc.lo `test -f 'malloc.c' || echo '$(srcdir)/'`malloc.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_common_la-malloc.Tpo $(DEPDIR)/libavahi_common_la-malloc.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='malloc.c' object='libavahi_common_la-malloc.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_common_la_CFLAGS) $(CFLAGS) -c -o libavahi_common_la-malloc.lo `test -f 'malloc.c' || echo '$(srcdir)/'`malloc.c
+
+libavahi_common_la-address.lo: address.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_common_la_CFLAGS) $(CFLAGS) -MT libavahi_common_la-address.lo -MD -MP -MF $(DEPDIR)/libavahi_common_la-address.Tpo -c -o libavahi_common_la-address.lo `test -f 'address.c' || echo '$(srcdir)/'`address.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_common_la-address.Tpo $(DEPDIR)/libavahi_common_la-address.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='address.c' object='libavahi_common_la-address.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_common_la_CFLAGS) $(CFLAGS) -c -o libavahi_common_la-address.lo `test -f 'address.c' || echo '$(srcdir)/'`address.c
+
+libavahi_common_la-alternative.lo: alternative.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_common_la_CFLAGS) $(CFLAGS) -MT libavahi_common_la-alternative.lo -MD -MP -MF $(DEPDIR)/libavahi_common_la-alternative.Tpo -c -o libavahi_common_la-alternative.lo `test -f 'alternative.c' || echo '$(srcdir)/'`alternative.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_common_la-alternative.Tpo $(DEPDIR)/libavahi_common_la-alternative.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='alternative.c' object='libavahi_common_la-alternative.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_common_la_CFLAGS) $(CFLAGS) -c -o libavahi_common_la-alternative.lo `test -f 'alternative.c' || echo '$(srcdir)/'`alternative.c
+
+libavahi_common_la-error.lo: error.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_common_la_CFLAGS) $(CFLAGS) -MT libavahi_common_la-error.lo -MD -MP -MF $(DEPDIR)/libavahi_common_la-error.Tpo -c -o libavahi_common_la-error.lo `test -f 'error.c' || echo '$(srcdir)/'`error.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_common_la-error.Tpo $(DEPDIR)/libavahi_common_la-error.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='error.c' object='libavahi_common_la-error.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_common_la_CFLAGS) $(CFLAGS) -c -o libavahi_common_la-error.lo `test -f 'error.c' || echo '$(srcdir)/'`error.c
+
+libavahi_common_la-strlst.lo: strlst.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_common_la_CFLAGS) $(CFLAGS) -MT libavahi_common_la-strlst.lo -MD -MP -MF $(DEPDIR)/libavahi_common_la-strlst.Tpo -c -o libavahi_common_la-strlst.lo `test -f 'strlst.c' || echo '$(srcdir)/'`strlst.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_common_la-strlst.Tpo $(DEPDIR)/libavahi_common_la-strlst.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='strlst.c' object='libavahi_common_la-strlst.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_common_la_CFLAGS) $(CFLAGS) -c -o libavahi_common_la-strlst.lo `test -f 'strlst.c' || echo '$(srcdir)/'`strlst.c
+
+libavahi_common_la-domain.lo: domain.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_common_la_CFLAGS) $(CFLAGS) -MT libavahi_common_la-domain.lo -MD -MP -MF $(DEPDIR)/libavahi_common_la-domain.Tpo -c -o libavahi_common_la-domain.lo `test -f 'domain.c' || echo '$(srcdir)/'`domain.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_common_la-domain.Tpo $(DEPDIR)/libavahi_common_la-domain.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='domain.c' object='libavahi_common_la-domain.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_common_la_CFLAGS) $(CFLAGS) -c -o libavahi_common_la-domain.lo `test -f 'domain.c' || echo '$(srcdir)/'`domain.c
+
+libavahi_common_la-timeval.lo: timeval.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_common_la_CFLAGS) $(CFLAGS) -MT libavahi_common_la-timeval.lo -MD -MP -MF $(DEPDIR)/libavahi_common_la-timeval.Tpo -c -o libavahi_common_la-timeval.lo `test -f 'timeval.c' || echo '$(srcdir)/'`timeval.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_common_la-timeval.Tpo $(DEPDIR)/libavahi_common_la-timeval.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='timeval.c' object='libavahi_common_la-timeval.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_common_la_CFLAGS) $(CFLAGS) -c -o libavahi_common_la-timeval.lo `test -f 'timeval.c' || echo '$(srcdir)/'`timeval.c
+
+libavahi_common_la-simple-watch.lo: simple-watch.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_common_la_CFLAGS) $(CFLAGS) -MT libavahi_common_la-simple-watch.lo -MD -MP -MF $(DEPDIR)/libavahi_common_la-simple-watch.Tpo -c -o libavahi_common_la-simple-watch.lo `test -f 'simple-watch.c' || echo '$(srcdir)/'`simple-watch.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_common_la-simple-watch.Tpo $(DEPDIR)/libavahi_common_la-simple-watch.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='simple-watch.c' object='libavahi_common_la-simple-watch.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_common_la_CFLAGS) $(CFLAGS) -c -o libavahi_common_la-simple-watch.lo `test -f 'simple-watch.c' || echo '$(srcdir)/'`simple-watch.c
+
+libavahi_common_la-thread-watch.lo: thread-watch.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_common_la_CFLAGS) $(CFLAGS) -MT libavahi_common_la-thread-watch.lo -MD -MP -MF $(DEPDIR)/libavahi_common_la-thread-watch.Tpo -c -o libavahi_common_la-thread-watch.lo `test -f 'thread-watch.c' || echo '$(srcdir)/'`thread-watch.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_common_la-thread-watch.Tpo $(DEPDIR)/libavahi_common_la-thread-watch.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='thread-watch.c' object='libavahi_common_la-thread-watch.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_common_la_CFLAGS) $(CFLAGS) -c -o libavahi_common_la-thread-watch.lo `test -f 'thread-watch.c' || echo '$(srcdir)/'`thread-watch.c
+
+libavahi_common_la-rlist.lo: rlist.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_common_la_CFLAGS) $(CFLAGS) -MT libavahi_common_la-rlist.lo -MD -MP -MF $(DEPDIR)/libavahi_common_la-rlist.Tpo -c -o libavahi_common_la-rlist.lo `test -f 'rlist.c' || echo '$(srcdir)/'`rlist.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_common_la-rlist.Tpo $(DEPDIR)/libavahi_common_la-rlist.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='rlist.c' object='libavahi_common_la-rlist.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_common_la_CFLAGS) $(CFLAGS) -c -o libavahi_common_la-rlist.lo `test -f 'rlist.c' || echo '$(srcdir)/'`rlist.c
+
+libavahi_common_la-utf8.lo: utf8.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_common_la_CFLAGS) $(CFLAGS) -MT libavahi_common_la-utf8.lo -MD -MP -MF $(DEPDIR)/libavahi_common_la-utf8.Tpo -c -o libavahi_common_la-utf8.lo `test -f 'utf8.c' || echo '$(srcdir)/'`utf8.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_common_la-utf8.Tpo $(DEPDIR)/libavahi_common_la-utf8.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='utf8.c' object='libavahi_common_la-utf8.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_common_la_CFLAGS) $(CFLAGS) -c -o libavahi_common_la-utf8.lo `test -f 'utf8.c' || echo '$(srcdir)/'`utf8.c
+
+libavahi_common_la-i18n.lo: i18n.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_common_la_CFLAGS) $(CFLAGS) -MT libavahi_common_la-i18n.lo -MD -MP -MF $(DEPDIR)/libavahi_common_la-i18n.Tpo -c -o libavahi_common_la-i18n.lo `test -f 'i18n.c' || echo '$(srcdir)/'`i18n.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_common_la-i18n.Tpo $(DEPDIR)/libavahi_common_la-i18n.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='i18n.c' object='libavahi_common_la-i18n.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_common_la_CFLAGS) $(CFLAGS) -c -o libavahi_common_la-i18n.lo `test -f 'i18n.c' || echo '$(srcdir)/'`i18n.c
+
+alternative_test-alternative.o: alternative.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(alternative_test_CFLAGS) $(CFLAGS) -MT alternative_test-alternative.o -MD -MP -MF $(DEPDIR)/alternative_test-alternative.Tpo -c -o alternative_test-alternative.o `test -f 'alternative.c' || echo '$(srcdir)/'`alternative.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/alternative_test-alternative.Tpo $(DEPDIR)/alternative_test-alternative.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='alternative.c' object='alternative_test-alternative.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(alternative_test_CFLAGS) $(CFLAGS) -c -o alternative_test-alternative.o `test -f 'alternative.c' || echo '$(srcdir)/'`alternative.c
+
+alternative_test-alternative.obj: alternative.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(alternative_test_CFLAGS) $(CFLAGS) -MT alternative_test-alternative.obj -MD -MP -MF $(DEPDIR)/alternative_test-alternative.Tpo -c -o alternative_test-alternative.obj `if test -f 'alternative.c'; then $(CYGPATH_W) 'alternative.c'; else $(CYGPATH_W) '$(srcdir)/alternative.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/alternative_test-alternative.Tpo $(DEPDIR)/alternative_test-alternative.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='alternative.c' object='alternative_test-alternative.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(alternative_test_CFLAGS) $(CFLAGS) -c -o alternative_test-alternative.obj `if test -f 'alternative.c'; then $(CYGPATH_W) 'alternative.c'; else $(CYGPATH_W) '$(srcdir)/alternative.c'; fi`
+
+alternative_test-malloc.o: malloc.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(alternative_test_CFLAGS) $(CFLAGS) -MT alternative_test-malloc.o -MD -MP -MF $(DEPDIR)/alternative_test-malloc.Tpo -c -o alternative_test-malloc.o `test -f 'malloc.c' || echo '$(srcdir)/'`malloc.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/alternative_test-malloc.Tpo $(DEPDIR)/alternative_test-malloc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='malloc.c' object='alternative_test-malloc.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(alternative_test_CFLAGS) $(CFLAGS) -c -o alternative_test-malloc.o `test -f 'malloc.c' || echo '$(srcdir)/'`malloc.c
+
+alternative_test-malloc.obj: malloc.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(alternative_test_CFLAGS) $(CFLAGS) -MT alternative_test-malloc.obj -MD -MP -MF $(DEPDIR)/alternative_test-malloc.Tpo -c -o alternative_test-malloc.obj `if test -f 'malloc.c'; then $(CYGPATH_W) 'malloc.c'; else $(CYGPATH_W) '$(srcdir)/malloc.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/alternative_test-malloc.Tpo $(DEPDIR)/alternative_test-malloc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='malloc.c' object='alternative_test-malloc.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(alternative_test_CFLAGS) $(CFLAGS) -c -o alternative_test-malloc.obj `if test -f 'malloc.c'; then $(CYGPATH_W) 'malloc.c'; else $(CYGPATH_W) '$(srcdir)/malloc.c'; fi`
+
+alternative_test-domain.o: domain.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(alternative_test_CFLAGS) $(CFLAGS) -MT alternative_test-domain.o -MD -MP -MF $(DEPDIR)/alternative_test-domain.Tpo -c -o alternative_test-domain.o `test -f 'domain.c' || echo '$(srcdir)/'`domain.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/alternative_test-domain.Tpo $(DEPDIR)/alternative_test-domain.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='domain.c' object='alternative_test-domain.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(alternative_test_CFLAGS) $(CFLAGS) -c -o alternative_test-domain.o `test -f 'domain.c' || echo '$(srcdir)/'`domain.c
+
+alternative_test-domain.obj: domain.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(alternative_test_CFLAGS) $(CFLAGS) -MT alternative_test-domain.obj -MD -MP -MF $(DEPDIR)/alternative_test-domain.Tpo -c -o alternative_test-domain.obj `if test -f 'domain.c'; then $(CYGPATH_W) 'domain.c'; else $(CYGPATH_W) '$(srcdir)/domain.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/alternative_test-domain.Tpo $(DEPDIR)/alternative_test-domain.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='domain.c' object='alternative_test-domain.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(alternative_test_CFLAGS) $(CFLAGS) -c -o alternative_test-domain.obj `if test -f 'domain.c'; then $(CYGPATH_W) 'domain.c'; else $(CYGPATH_W) '$(srcdir)/domain.c'; fi`
+
+alternative_test-address.o: address.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(alternative_test_CFLAGS) $(CFLAGS) -MT alternative_test-address.o -MD -MP -MF $(DEPDIR)/alternative_test-address.Tpo -c -o alternative_test-address.o `test -f 'address.c' || echo '$(srcdir)/'`address.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/alternative_test-address.Tpo $(DEPDIR)/alternative_test-address.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='address.c' object='alternative_test-address.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(alternative_test_CFLAGS) $(CFLAGS) -c -o alternative_test-address.o `test -f 'address.c' || echo '$(srcdir)/'`address.c
+
+alternative_test-address.obj: address.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(alternative_test_CFLAGS) $(CFLAGS) -MT alternative_test-address.obj -MD -MP -MF $(DEPDIR)/alternative_test-address.Tpo -c -o alternative_test-address.obj `if test -f 'address.c'; then $(CYGPATH_W) 'address.c'; else $(CYGPATH_W) '$(srcdir)/address.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/alternative_test-address.Tpo $(DEPDIR)/alternative_test-address.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='address.c' object='alternative_test-address.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(alternative_test_CFLAGS) $(CFLAGS) -c -o alternative_test-address.obj `if test -f 'address.c'; then $(CYGPATH_W) 'address.c'; else $(CYGPATH_W) '$(srcdir)/address.c'; fi`
+
+alternative_test-alternative-test.o: alternative-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(alternative_test_CFLAGS) $(CFLAGS) -MT alternative_test-alternative-test.o -MD -MP -MF $(DEPDIR)/alternative_test-alternative-test.Tpo -c -o alternative_test-alternative-test.o `test -f 'alternative-test.c' || echo '$(srcdir)/'`alternative-test.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/alternative_test-alternative-test.Tpo $(DEPDIR)/alternative_test-alternative-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='alternative-test.c' object='alternative_test-alternative-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(alternative_test_CFLAGS) $(CFLAGS) -c -o alternative_test-alternative-test.o `test -f 'alternative-test.c' || echo '$(srcdir)/'`alternative-test.c
+
+alternative_test-alternative-test.obj: alternative-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(alternative_test_CFLAGS) $(CFLAGS) -MT alternative_test-alternative-test.obj -MD -MP -MF $(DEPDIR)/alternative_test-alternative-test.Tpo -c -o alternative_test-alternative-test.obj `if test -f 'alternative-test.c'; then $(CYGPATH_W) 'alternative-test.c'; else $(CYGPATH_W) '$(srcdir)/alternative-test.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/alternative_test-alternative-test.Tpo $(DEPDIR)/alternative_test-alternative-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='alternative-test.c' object='alternative_test-alternative-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(alternative_test_CFLAGS) $(CFLAGS) -c -o alternative_test-alternative-test.obj `if test -f 'alternative-test.c'; then $(CYGPATH_W) 'alternative-test.c'; else $(CYGPATH_W) '$(srcdir)/alternative-test.c'; fi`
+
+alternative_test-utf8.o: utf8.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(alternative_test_CFLAGS) $(CFLAGS) -MT alternative_test-utf8.o -MD -MP -MF $(DEPDIR)/alternative_test-utf8.Tpo -c -o alternative_test-utf8.o `test -f 'utf8.c' || echo '$(srcdir)/'`utf8.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/alternative_test-utf8.Tpo $(DEPDIR)/alternative_test-utf8.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='utf8.c' object='alternative_test-utf8.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(alternative_test_CFLAGS) $(CFLAGS) -c -o alternative_test-utf8.o `test -f 'utf8.c' || echo '$(srcdir)/'`utf8.c
+
+alternative_test-utf8.obj: utf8.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(alternative_test_CFLAGS) $(CFLAGS) -MT alternative_test-utf8.obj -MD -MP -MF $(DEPDIR)/alternative_test-utf8.Tpo -c -o alternative_test-utf8.obj `if test -f 'utf8.c'; then $(CYGPATH_W) 'utf8.c'; else $(CYGPATH_W) '$(srcdir)/utf8.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/alternative_test-utf8.Tpo $(DEPDIR)/alternative_test-utf8.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='utf8.c' object='alternative_test-utf8.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(alternative_test_CFLAGS) $(CFLAGS) -c -o alternative_test-utf8.obj `if test -f 'utf8.c'; then $(CYGPATH_W) 'utf8.c'; else $(CYGPATH_W) '$(srcdir)/utf8.c'; fi`
+
+domain_test-domain.o: domain.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(domain_test_CFLAGS) $(CFLAGS) -MT domain_test-domain.o -MD -MP -MF $(DEPDIR)/domain_test-domain.Tpo -c -o domain_test-domain.o `test -f 'domain.c' || echo '$(srcdir)/'`domain.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/domain_test-domain.Tpo $(DEPDIR)/domain_test-domain.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='domain.c' object='domain_test-domain.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(domain_test_CFLAGS) $(CFLAGS) -c -o domain_test-domain.o `test -f 'domain.c' || echo '$(srcdir)/'`domain.c
+
+domain_test-domain.obj: domain.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(domain_test_CFLAGS) $(CFLAGS) -MT domain_test-domain.obj -MD -MP -MF $(DEPDIR)/domain_test-domain.Tpo -c -o domain_test-domain.obj `if test -f 'domain.c'; then $(CYGPATH_W) 'domain.c'; else $(CYGPATH_W) '$(srcdir)/domain.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/domain_test-domain.Tpo $(DEPDIR)/domain_test-domain.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='domain.c' object='domain_test-domain.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(domain_test_CFLAGS) $(CFLAGS) -c -o domain_test-domain.obj `if test -f 'domain.c'; then $(CYGPATH_W) 'domain.c'; else $(CYGPATH_W) '$(srcdir)/domain.c'; fi`
+
+domain_test-malloc.o: malloc.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(domain_test_CFLAGS) $(CFLAGS) -MT domain_test-malloc.o -MD -MP -MF $(DEPDIR)/domain_test-malloc.Tpo -c -o domain_test-malloc.o `test -f 'malloc.c' || echo '$(srcdir)/'`malloc.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/domain_test-malloc.Tpo $(DEPDIR)/domain_test-malloc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='malloc.c' object='domain_test-malloc.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(domain_test_CFLAGS) $(CFLAGS) -c -o domain_test-malloc.o `test -f 'malloc.c' || echo '$(srcdir)/'`malloc.c
+
+domain_test-malloc.obj: malloc.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(domain_test_CFLAGS) $(CFLAGS) -MT domain_test-malloc.obj -MD -MP -MF $(DEPDIR)/domain_test-malloc.Tpo -c -o domain_test-malloc.obj `if test -f 'malloc.c'; then $(CYGPATH_W) 'malloc.c'; else $(CYGPATH_W) '$(srcdir)/malloc.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/domain_test-malloc.Tpo $(DEPDIR)/domain_test-malloc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='malloc.c' object='domain_test-malloc.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(domain_test_CFLAGS) $(CFLAGS) -c -o domain_test-malloc.obj `if test -f 'malloc.c'; then $(CYGPATH_W) 'malloc.c'; else $(CYGPATH_W) '$(srcdir)/malloc.c'; fi`
+
+domain_test-address.o: address.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(domain_test_CFLAGS) $(CFLAGS) -MT domain_test-address.o -MD -MP -MF $(DEPDIR)/domain_test-address.Tpo -c -o domain_test-address.o `test -f 'address.c' || echo '$(srcdir)/'`address.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/domain_test-address.Tpo $(DEPDIR)/domain_test-address.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='address.c' object='domain_test-address.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(domain_test_CFLAGS) $(CFLAGS) -c -o domain_test-address.o `test -f 'address.c' || echo '$(srcdir)/'`address.c
+
+domain_test-address.obj: address.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(domain_test_CFLAGS) $(CFLAGS) -MT domain_test-address.obj -MD -MP -MF $(DEPDIR)/domain_test-address.Tpo -c -o domain_test-address.obj `if test -f 'address.c'; then $(CYGPATH_W) 'address.c'; else $(CYGPATH_W) '$(srcdir)/address.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/domain_test-address.Tpo $(DEPDIR)/domain_test-address.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='address.c' object='domain_test-address.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(domain_test_CFLAGS) $(CFLAGS) -c -o domain_test-address.obj `if test -f 'address.c'; then $(CYGPATH_W) 'address.c'; else $(CYGPATH_W) '$(srcdir)/address.c'; fi`
+
+domain_test-domain-test.o: domain-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(domain_test_CFLAGS) $(CFLAGS) -MT domain_test-domain-test.o -MD -MP -MF $(DEPDIR)/domain_test-domain-test.Tpo -c -o domain_test-domain-test.o `test -f 'domain-test.c' || echo '$(srcdir)/'`domain-test.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/domain_test-domain-test.Tpo $(DEPDIR)/domain_test-domain-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='domain-test.c' object='domain_test-domain-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(domain_test_CFLAGS) $(CFLAGS) -c -o domain_test-domain-test.o `test -f 'domain-test.c' || echo '$(srcdir)/'`domain-test.c
+
+domain_test-domain-test.obj: domain-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(domain_test_CFLAGS) $(CFLAGS) -MT domain_test-domain-test.obj -MD -MP -MF $(DEPDIR)/domain_test-domain-test.Tpo -c -o domain_test-domain-test.obj `if test -f 'domain-test.c'; then $(CYGPATH_W) 'domain-test.c'; else $(CYGPATH_W) '$(srcdir)/domain-test.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/domain_test-domain-test.Tpo $(DEPDIR)/domain_test-domain-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='domain-test.c' object='domain_test-domain-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(domain_test_CFLAGS) $(CFLAGS) -c -o domain_test-domain-test.obj `if test -f 'domain-test.c'; then $(CYGPATH_W) 'domain-test.c'; else $(CYGPATH_W) '$(srcdir)/domain-test.c'; fi`
+
+domain_test-utf8.o: utf8.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(domain_test_CFLAGS) $(CFLAGS) -MT domain_test-utf8.o -MD -MP -MF $(DEPDIR)/domain_test-utf8.Tpo -c -o domain_test-utf8.o `test -f 'utf8.c' || echo '$(srcdir)/'`utf8.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/domain_test-utf8.Tpo $(DEPDIR)/domain_test-utf8.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='utf8.c' object='domain_test-utf8.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(domain_test_CFLAGS) $(CFLAGS) -c -o domain_test-utf8.o `test -f 'utf8.c' || echo '$(srcdir)/'`utf8.c
+
+domain_test-utf8.obj: utf8.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(domain_test_CFLAGS) $(CFLAGS) -MT domain_test-utf8.obj -MD -MP -MF $(DEPDIR)/domain_test-utf8.Tpo -c -o domain_test-utf8.obj `if test -f 'utf8.c'; then $(CYGPATH_W) 'utf8.c'; else $(CYGPATH_W) '$(srcdir)/utf8.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/domain_test-utf8.Tpo $(DEPDIR)/domain_test-utf8.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='utf8.c' object='domain_test-utf8.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(domain_test_CFLAGS) $(CFLAGS) -c -o domain_test-utf8.obj `if test -f 'utf8.c'; then $(CYGPATH_W) 'utf8.c'; else $(CYGPATH_W) '$(srcdir)/utf8.c'; fi`
+
+strlst_test-strlst.o: strlst.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(strlst_test_CFLAGS) $(CFLAGS) -MT strlst_test-strlst.o -MD -MP -MF $(DEPDIR)/strlst_test-strlst.Tpo -c -o strlst_test-strlst.o `test -f 'strlst.c' || echo '$(srcdir)/'`strlst.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/strlst_test-strlst.Tpo $(DEPDIR)/strlst_test-strlst.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='strlst.c' object='strlst_test-strlst.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(strlst_test_CFLAGS) $(CFLAGS) -c -o strlst_test-strlst.o `test -f 'strlst.c' || echo '$(srcdir)/'`strlst.c
+
+strlst_test-strlst.obj: strlst.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(strlst_test_CFLAGS) $(CFLAGS) -MT strlst_test-strlst.obj -MD -MP -MF $(DEPDIR)/strlst_test-strlst.Tpo -c -o strlst_test-strlst.obj `if test -f 'strlst.c'; then $(CYGPATH_W) 'strlst.c'; else $(CYGPATH_W) '$(srcdir)/strlst.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/strlst_test-strlst.Tpo $(DEPDIR)/strlst_test-strlst.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='strlst.c' object='strlst_test-strlst.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(strlst_test_CFLAGS) $(CFLAGS) -c -o strlst_test-strlst.obj `if test -f 'strlst.c'; then $(CYGPATH_W) 'strlst.c'; else $(CYGPATH_W) '$(srcdir)/strlst.c'; fi`
+
+strlst_test-malloc.o: malloc.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(strlst_test_CFLAGS) $(CFLAGS) -MT strlst_test-malloc.o -MD -MP -MF $(DEPDIR)/strlst_test-malloc.Tpo -c -o strlst_test-malloc.o `test -f 'malloc.c' || echo '$(srcdir)/'`malloc.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/strlst_test-malloc.Tpo $(DEPDIR)/strlst_test-malloc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='malloc.c' object='strlst_test-malloc.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(strlst_test_CFLAGS) $(CFLAGS) -c -o strlst_test-malloc.o `test -f 'malloc.c' || echo '$(srcdir)/'`malloc.c
+
+strlst_test-malloc.obj: malloc.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(strlst_test_CFLAGS) $(CFLAGS) -MT strlst_test-malloc.obj -MD -MP -MF $(DEPDIR)/strlst_test-malloc.Tpo -c -o strlst_test-malloc.obj `if test -f 'malloc.c'; then $(CYGPATH_W) 'malloc.c'; else $(CYGPATH_W) '$(srcdir)/malloc.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/strlst_test-malloc.Tpo $(DEPDIR)/strlst_test-malloc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='malloc.c' object='strlst_test-malloc.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(strlst_test_CFLAGS) $(CFLAGS) -c -o strlst_test-malloc.obj `if test -f 'malloc.c'; then $(CYGPATH_W) 'malloc.c'; else $(CYGPATH_W) '$(srcdir)/malloc.c'; fi`
+
+strlst_test-strlst-test.o: strlst-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(strlst_test_CFLAGS) $(CFLAGS) -MT strlst_test-strlst-test.o -MD -MP -MF $(DEPDIR)/strlst_test-strlst-test.Tpo -c -o strlst_test-strlst-test.o `test -f 'strlst-test.c' || echo '$(srcdir)/'`strlst-test.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/strlst_test-strlst-test.Tpo $(DEPDIR)/strlst_test-strlst-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='strlst-test.c' object='strlst_test-strlst-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(strlst_test_CFLAGS) $(CFLAGS) -c -o strlst_test-strlst-test.o `test -f 'strlst-test.c' || echo '$(srcdir)/'`strlst-test.c
+
+strlst_test-strlst-test.obj: strlst-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(strlst_test_CFLAGS) $(CFLAGS) -MT strlst_test-strlst-test.obj -MD -MP -MF $(DEPDIR)/strlst_test-strlst-test.Tpo -c -o strlst_test-strlst-test.obj `if test -f 'strlst-test.c'; then $(CYGPATH_W) 'strlst-test.c'; else $(CYGPATH_W) '$(srcdir)/strlst-test.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/strlst_test-strlst-test.Tpo $(DEPDIR)/strlst_test-strlst-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='strlst-test.c' object='strlst_test-strlst-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(strlst_test_CFLAGS) $(CFLAGS) -c -o strlst_test-strlst-test.obj `if test -f 'strlst-test.c'; then $(CYGPATH_W) 'strlst-test.c'; else $(CYGPATH_W) '$(srcdir)/strlst-test.c'; fi`
+
+timeval_test-timeval.o: timeval.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(timeval_test_CFLAGS) $(CFLAGS) -MT timeval_test-timeval.o -MD -MP -MF $(DEPDIR)/timeval_test-timeval.Tpo -c -o timeval_test-timeval.o `test -f 'timeval.c' || echo '$(srcdir)/'`timeval.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/timeval_test-timeval.Tpo $(DEPDIR)/timeval_test-timeval.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='timeval.c' object='timeval_test-timeval.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(timeval_test_CFLAGS) $(CFLAGS) -c -o timeval_test-timeval.o `test -f 'timeval.c' || echo '$(srcdir)/'`timeval.c
+
+timeval_test-timeval.obj: timeval.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(timeval_test_CFLAGS) $(CFLAGS) -MT timeval_test-timeval.obj -MD -MP -MF $(DEPDIR)/timeval_test-timeval.Tpo -c -o timeval_test-timeval.obj `if test -f 'timeval.c'; then $(CYGPATH_W) 'timeval.c'; else $(CYGPATH_W) '$(srcdir)/timeval.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/timeval_test-timeval.Tpo $(DEPDIR)/timeval_test-timeval.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='timeval.c' object='timeval_test-timeval.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(timeval_test_CFLAGS) $(CFLAGS) -c -o timeval_test-timeval.obj `if test -f 'timeval.c'; then $(CYGPATH_W) 'timeval.c'; else $(CYGPATH_W) '$(srcdir)/timeval.c'; fi`
+
+timeval_test-timeval-test.o: timeval-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(timeval_test_CFLAGS) $(CFLAGS) -MT timeval_test-timeval-test.o -MD -MP -MF $(DEPDIR)/timeval_test-timeval-test.Tpo -c -o timeval_test-timeval-test.o `test -f 'timeval-test.c' || echo '$(srcdir)/'`timeval-test.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/timeval_test-timeval-test.Tpo $(DEPDIR)/timeval_test-timeval-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='timeval-test.c' object='timeval_test-timeval-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(timeval_test_CFLAGS) $(CFLAGS) -c -o timeval_test-timeval-test.o `test -f 'timeval-test.c' || echo '$(srcdir)/'`timeval-test.c
+
+timeval_test-timeval-test.obj: timeval-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(timeval_test_CFLAGS) $(CFLAGS) -MT timeval_test-timeval-test.obj -MD -MP -MF $(DEPDIR)/timeval_test-timeval-test.Tpo -c -o timeval_test-timeval-test.obj `if test -f 'timeval-test.c'; then $(CYGPATH_W) 'timeval-test.c'; else $(CYGPATH_W) '$(srcdir)/timeval-test.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/timeval_test-timeval-test.Tpo $(DEPDIR)/timeval_test-timeval-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='timeval-test.c' object='timeval_test-timeval-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(timeval_test_CFLAGS) $(CFLAGS) -c -o timeval_test-timeval-test.obj `if test -f 'timeval-test.c'; then $(CYGPATH_W) 'timeval-test.c'; else $(CYGPATH_W) '$(srcdir)/timeval-test.c'; fi`
+
+utf8_test-utf8-test.o: utf8-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(utf8_test_CFLAGS) $(CFLAGS) -MT utf8_test-utf8-test.o -MD -MP -MF $(DEPDIR)/utf8_test-utf8-test.Tpo -c -o utf8_test-utf8-test.o `test -f 'utf8-test.c' || echo '$(srcdir)/'`utf8-test.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/utf8_test-utf8-test.Tpo $(DEPDIR)/utf8_test-utf8-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='utf8-test.c' object='utf8_test-utf8-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(utf8_test_CFLAGS) $(CFLAGS) -c -o utf8_test-utf8-test.o `test -f 'utf8-test.c' || echo '$(srcdir)/'`utf8-test.c
+
+utf8_test-utf8-test.obj: utf8-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(utf8_test_CFLAGS) $(CFLAGS) -MT utf8_test-utf8-test.obj -MD -MP -MF $(DEPDIR)/utf8_test-utf8-test.Tpo -c -o utf8_test-utf8-test.obj `if test -f 'utf8-test.c'; then $(CYGPATH_W) 'utf8-test.c'; else $(CYGPATH_W) '$(srcdir)/utf8-test.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/utf8_test-utf8-test.Tpo $(DEPDIR)/utf8_test-utf8-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='utf8-test.c' object='utf8_test-utf8-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(utf8_test_CFLAGS) $(CFLAGS) -c -o utf8_test-utf8-test.obj `if test -f 'utf8-test.c'; then $(CYGPATH_W) 'utf8-test.c'; else $(CYGPATH_W) '$(srcdir)/utf8-test.c'; fi`
+
+utf8_test-utf8.o: utf8.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(utf8_test_CFLAGS) $(CFLAGS) -MT utf8_test-utf8.o -MD -MP -MF $(DEPDIR)/utf8_test-utf8.Tpo -c -o utf8_test-utf8.o `test -f 'utf8.c' || echo '$(srcdir)/'`utf8.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/utf8_test-utf8.Tpo $(DEPDIR)/utf8_test-utf8.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='utf8.c' object='utf8_test-utf8.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(utf8_test_CFLAGS) $(CFLAGS) -c -o utf8_test-utf8.o `test -f 'utf8.c' || echo '$(srcdir)/'`utf8.c
+
+utf8_test-utf8.obj: utf8.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(utf8_test_CFLAGS) $(CFLAGS) -MT utf8_test-utf8.obj -MD -MP -MF $(DEPDIR)/utf8_test-utf8.Tpo -c -o utf8_test-utf8.obj `if test -f 'utf8.c'; then $(CYGPATH_W) 'utf8.c'; else $(CYGPATH_W) '$(srcdir)/utf8.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/utf8_test-utf8.Tpo $(DEPDIR)/utf8_test-utf8.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='utf8.c' object='utf8_test-utf8.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(utf8_test_CFLAGS) $(CFLAGS) -c -o utf8_test-utf8.obj `if test -f 'utf8.c'; then $(CYGPATH_W) 'utf8.c'; else $(CYGPATH_W) '$(srcdir)/utf8.c'; fi`
+
+watch_test-timeval.o: timeval.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(watch_test_CFLAGS) $(CFLAGS) -MT watch_test-timeval.o -MD -MP -MF $(DEPDIR)/watch_test-timeval.Tpo -c -o watch_test-timeval.o `test -f 'timeval.c' || echo '$(srcdir)/'`timeval.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/watch_test-timeval.Tpo $(DEPDIR)/watch_test-timeval.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='timeval.c' object='watch_test-timeval.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(watch_test_CFLAGS) $(CFLAGS) -c -o watch_test-timeval.o `test -f 'timeval.c' || echo '$(srcdir)/'`timeval.c
+
+watch_test-timeval.obj: timeval.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(watch_test_CFLAGS) $(CFLAGS) -MT watch_test-timeval.obj -MD -MP -MF $(DEPDIR)/watch_test-timeval.Tpo -c -o watch_test-timeval.obj `if test -f 'timeval.c'; then $(CYGPATH_W) 'timeval.c'; else $(CYGPATH_W) '$(srcdir)/timeval.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/watch_test-timeval.Tpo $(DEPDIR)/watch_test-timeval.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='timeval.c' object='watch_test-timeval.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(watch_test_CFLAGS) $(CFLAGS) -c -o watch_test-timeval.obj `if test -f 'timeval.c'; then $(CYGPATH_W) 'timeval.c'; else $(CYGPATH_W) '$(srcdir)/timeval.c'; fi`
+
+watch_test-simple-watch.o: simple-watch.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(watch_test_CFLAGS) $(CFLAGS) -MT watch_test-simple-watch.o -MD -MP -MF $(DEPDIR)/watch_test-simple-watch.Tpo -c -o watch_test-simple-watch.o `test -f 'simple-watch.c' || echo '$(srcdir)/'`simple-watch.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/watch_test-simple-watch.Tpo $(DEPDIR)/watch_test-simple-watch.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='simple-watch.c' object='watch_test-simple-watch.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(watch_test_CFLAGS) $(CFLAGS) -c -o watch_test-simple-watch.o `test -f 'simple-watch.c' || echo '$(srcdir)/'`simple-watch.c
+
+watch_test-simple-watch.obj: simple-watch.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(watch_test_CFLAGS) $(CFLAGS) -MT watch_test-simple-watch.obj -MD -MP -MF $(DEPDIR)/watch_test-simple-watch.Tpo -c -o watch_test-simple-watch.obj `if test -f 'simple-watch.c'; then $(CYGPATH_W) 'simple-watch.c'; else $(CYGPATH_W) '$(srcdir)/simple-watch.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/watch_test-simple-watch.Tpo $(DEPDIR)/watch_test-simple-watch.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='simple-watch.c' object='watch_test-simple-watch.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(watch_test_CFLAGS) $(CFLAGS) -c -o watch_test-simple-watch.obj `if test -f 'simple-watch.c'; then $(CYGPATH_W) 'simple-watch.c'; else $(CYGPATH_W) '$(srcdir)/simple-watch.c'; fi`
+
+watch_test-malloc.o: malloc.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(watch_test_CFLAGS) $(CFLAGS) -MT watch_test-malloc.o -MD -MP -MF $(DEPDIR)/watch_test-malloc.Tpo -c -o watch_test-malloc.o `test -f 'malloc.c' || echo '$(srcdir)/'`malloc.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/watch_test-malloc.Tpo $(DEPDIR)/watch_test-malloc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='malloc.c' object='watch_test-malloc.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(watch_test_CFLAGS) $(CFLAGS) -c -o watch_test-malloc.o `test -f 'malloc.c' || echo '$(srcdir)/'`malloc.c
+
+watch_test-malloc.obj: malloc.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(watch_test_CFLAGS) $(CFLAGS) -MT watch_test-malloc.obj -MD -MP -MF $(DEPDIR)/watch_test-malloc.Tpo -c -o watch_test-malloc.obj `if test -f 'malloc.c'; then $(CYGPATH_W) 'malloc.c'; else $(CYGPATH_W) '$(srcdir)/malloc.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/watch_test-malloc.Tpo $(DEPDIR)/watch_test-malloc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='malloc.c' object='watch_test-malloc.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(watch_test_CFLAGS) $(CFLAGS) -c -o watch_test-malloc.obj `if test -f 'malloc.c'; then $(CYGPATH_W) 'malloc.c'; else $(CYGPATH_W) '$(srcdir)/malloc.c'; fi`
+
+watch_test-watch-test.o: watch-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(watch_test_CFLAGS) $(CFLAGS) -MT watch_test-watch-test.o -MD -MP -MF $(DEPDIR)/watch_test-watch-test.Tpo -c -o watch_test-watch-test.o `test -f 'watch-test.c' || echo '$(srcdir)/'`watch-test.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/watch_test-watch-test.Tpo $(DEPDIR)/watch_test-watch-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='watch-test.c' object='watch_test-watch-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(watch_test_CFLAGS) $(CFLAGS) -c -o watch_test-watch-test.o `test -f 'watch-test.c' || echo '$(srcdir)/'`watch-test.c
+
+watch_test-watch-test.obj: watch-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(watch_test_CFLAGS) $(CFLAGS) -MT watch_test-watch-test.obj -MD -MP -MF $(DEPDIR)/watch_test-watch-test.Tpo -c -o watch_test-watch-test.obj `if test -f 'watch-test.c'; then $(CYGPATH_W) 'watch-test.c'; else $(CYGPATH_W) '$(srcdir)/watch-test.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/watch_test-watch-test.Tpo $(DEPDIR)/watch_test-watch-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='watch-test.c' object='watch_test-watch-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(watch_test_CFLAGS) $(CFLAGS) -c -o watch_test-watch-test.obj `if test -f 'watch-test.c'; then $(CYGPATH_W) 'watch-test.c'; else $(CYGPATH_W) '$(srcdir)/watch-test.c'; fi`
+
+watch_test_thread-timeval.o: timeval.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(watch_test_thread_CFLAGS) $(CFLAGS) -MT watch_test_thread-timeval.o -MD -MP -MF $(DEPDIR)/watch_test_thread-timeval.Tpo -c -o watch_test_thread-timeval.o `test -f 'timeval.c' || echo '$(srcdir)/'`timeval.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/watch_test_thread-timeval.Tpo $(DEPDIR)/watch_test_thread-timeval.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='timeval.c' object='watch_test_thread-timeval.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(watch_test_thread_CFLAGS) $(CFLAGS) -c -o watch_test_thread-timeval.o `test -f 'timeval.c' || echo '$(srcdir)/'`timeval.c
+
+watch_test_thread-timeval.obj: timeval.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(watch_test_thread_CFLAGS) $(CFLAGS) -MT watch_test_thread-timeval.obj -MD -MP -MF $(DEPDIR)/watch_test_thread-timeval.Tpo -c -o watch_test_thread-timeval.obj `if test -f 'timeval.c'; then $(CYGPATH_W) 'timeval.c'; else $(CYGPATH_W) '$(srcdir)/timeval.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/watch_test_thread-timeval.Tpo $(DEPDIR)/watch_test_thread-timeval.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='timeval.c' object='watch_test_thread-timeval.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(watch_test_thread_CFLAGS) $(CFLAGS) -c -o watch_test_thread-timeval.obj `if test -f 'timeval.c'; then $(CYGPATH_W) 'timeval.c'; else $(CYGPATH_W) '$(srcdir)/timeval.c'; fi`
+
+watch_test_thread-simple-watch.o: simple-watch.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(watch_test_thread_CFLAGS) $(CFLAGS) -MT watch_test_thread-simple-watch.o -MD -MP -MF $(DEPDIR)/watch_test_thread-simple-watch.Tpo -c -o watch_test_thread-simple-watch.o `test -f 'simple-watch.c' || echo '$(srcdir)/'`simple-watch.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/watch_test_thread-simple-watch.Tpo $(DEPDIR)/watch_test_thread-simple-watch.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='simple-watch.c' object='watch_test_thread-simple-watch.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(watch_test_thread_CFLAGS) $(CFLAGS) -c -o watch_test_thread-simple-watch.o `test -f 'simple-watch.c' || echo '$(srcdir)/'`simple-watch.c
+
+watch_test_thread-simple-watch.obj: simple-watch.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(watch_test_thread_CFLAGS) $(CFLAGS) -MT watch_test_thread-simple-watch.obj -MD -MP -MF $(DEPDIR)/watch_test_thread-simple-watch.Tpo -c -o watch_test_thread-simple-watch.obj `if test -f 'simple-watch.c'; then $(CYGPATH_W) 'simple-watch.c'; else $(CYGPATH_W) '$(srcdir)/simple-watch.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/watch_test_thread-simple-watch.Tpo $(DEPDIR)/watch_test_thread-simple-watch.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='simple-watch.c' object='watch_test_thread-simple-watch.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(watch_test_thread_CFLAGS) $(CFLAGS) -c -o watch_test_thread-simple-watch.obj `if test -f 'simple-watch.c'; then $(CYGPATH_W) 'simple-watch.c'; else $(CYGPATH_W) '$(srcdir)/simple-watch.c'; fi`
+
+watch_test_thread-malloc.o: malloc.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(watch_test_thread_CFLAGS) $(CFLAGS) -MT watch_test_thread-malloc.o -MD -MP -MF $(DEPDIR)/watch_test_thread-malloc.Tpo -c -o watch_test_thread-malloc.o `test -f 'malloc.c' || echo '$(srcdir)/'`malloc.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/watch_test_thread-malloc.Tpo $(DEPDIR)/watch_test_thread-malloc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='malloc.c' object='watch_test_thread-malloc.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(watch_test_thread_CFLAGS) $(CFLAGS) -c -o watch_test_thread-malloc.o `test -f 'malloc.c' || echo '$(srcdir)/'`malloc.c
+
+watch_test_thread-malloc.obj: malloc.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(watch_test_thread_CFLAGS) $(CFLAGS) -MT watch_test_thread-malloc.obj -MD -MP -MF $(DEPDIR)/watch_test_thread-malloc.Tpo -c -o watch_test_thread-malloc.obj `if test -f 'malloc.c'; then $(CYGPATH_W) 'malloc.c'; else $(CYGPATH_W) '$(srcdir)/malloc.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/watch_test_thread-malloc.Tpo $(DEPDIR)/watch_test_thread-malloc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='malloc.c' object='watch_test_thread-malloc.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(watch_test_thread_CFLAGS) $(CFLAGS) -c -o watch_test_thread-malloc.obj `if test -f 'malloc.c'; then $(CYGPATH_W) 'malloc.c'; else $(CYGPATH_W) '$(srcdir)/malloc.c'; fi`
+
+watch_test_thread-watch-test.o: watch-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(watch_test_thread_CFLAGS) $(CFLAGS) -MT watch_test_thread-watch-test.o -MD -MP -MF $(DEPDIR)/watch_test_thread-watch-test.Tpo -c -o watch_test_thread-watch-test.o `test -f 'watch-test.c' || echo '$(srcdir)/'`watch-test.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/watch_test_thread-watch-test.Tpo $(DEPDIR)/watch_test_thread-watch-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='watch-test.c' object='watch_test_thread-watch-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(watch_test_thread_CFLAGS) $(CFLAGS) -c -o watch_test_thread-watch-test.o `test -f 'watch-test.c' || echo '$(srcdir)/'`watch-test.c
+
+watch_test_thread-watch-test.obj: watch-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(watch_test_thread_CFLAGS) $(CFLAGS) -MT watch_test_thread-watch-test.obj -MD -MP -MF $(DEPDIR)/watch_test_thread-watch-test.Tpo -c -o watch_test_thread-watch-test.obj `if test -f 'watch-test.c'; then $(CYGPATH_W) 'watch-test.c'; else $(CYGPATH_W) '$(srcdir)/watch-test.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/watch_test_thread-watch-test.Tpo $(DEPDIR)/watch_test_thread-watch-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='watch-test.c' object='watch_test_thread-watch-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(watch_test_thread_CFLAGS) $(CFLAGS) -c -o watch_test_thread-watch-test.obj `if test -f 'watch-test.c'; then $(CYGPATH_W) 'watch-test.c'; else $(CYGPATH_W) '$(srcdir)/watch-test.c'; fi`
+
+watch_test_thread-thread-watch.o: thread-watch.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(watch_test_thread_CFLAGS) $(CFLAGS) -MT watch_test_thread-thread-watch.o -MD -MP -MF $(DEPDIR)/watch_test_thread-thread-watch.Tpo -c -o watch_test_thread-thread-watch.o `test -f 'thread-watch.c' || echo '$(srcdir)/'`thread-watch.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/watch_test_thread-thread-watch.Tpo $(DEPDIR)/watch_test_thread-thread-watch.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='thread-watch.c' object='watch_test_thread-thread-watch.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(watch_test_thread_CFLAGS) $(CFLAGS) -c -o watch_test_thread-thread-watch.o `test -f 'thread-watch.c' || echo '$(srcdir)/'`thread-watch.c
+
+watch_test_thread-thread-watch.obj: thread-watch.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(watch_test_thread_CFLAGS) $(CFLAGS) -MT watch_test_thread-thread-watch.obj -MD -MP -MF $(DEPDIR)/watch_test_thread-thread-watch.Tpo -c -o watch_test_thread-thread-watch.obj `if test -f 'thread-watch.c'; then $(CYGPATH_W) 'thread-watch.c'; else $(CYGPATH_W) '$(srcdir)/thread-watch.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/watch_test_thread-thread-watch.Tpo $(DEPDIR)/watch_test_thread-thread-watch.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='thread-watch.c' object='watch_test_thread-thread-watch.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(watch_test_thread_CFLAGS) $(CFLAGS) -c -o watch_test_thread-thread-watch.obj `if test -f 'thread-watch.c'; then $(CYGPATH_W) 'thread-watch.c'; else $(CYGPATH_W) '$(srcdir)/thread-watch.c'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+install-avahi_commonincludeHEADERS: $(avahi_commoninclude_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(avahi_commonincludedir)" || $(MKDIR_P) "$(DESTDIR)$(avahi_commonincludedir)"
+	@list='$(avahi_commoninclude_HEADERS)'; test -n "$(avahi_commonincludedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(avahi_commonincludedir)'"; \
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(avahi_commonincludedir)" || exit $$?; \
+	done
+
+uninstall-avahi_commonincludeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(avahi_commoninclude_HEADERS)'; test -n "$(avahi_commonincludedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(avahi_commonincludedir)'; $(am__uninstall_files_from_dir)
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(avahi_commonincludedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+	clean-noinstPROGRAMS mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-avahi_commonincludeHEADERS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-avahi_commonincludeHEADERS \
+	uninstall-libLTLIBRARIES
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS ctags \
+	distclean distclean-compile distclean-generic \
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am \
+	install-avahi_commonincludeHEADERS install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-libLTLIBRARIES install-man install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am \
+	uninstall-avahi_commonincludeHEADERS uninstall-libLTLIBRARIES
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/avahi-0.6.31/avahi-common/address.c b/avahi-0.6.31/avahi-common/address.c
new file mode 100644
index 0000000..e8f6148
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/address.c
@@ -0,0 +1,155 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <sys/socket.h>
+#include <arpa/inet.h>
+#include <string.h>
+#include <assert.h>
+#include <stdio.h>
+
+#include "address.h"
+#include "malloc.h"
+
+static size_t address_get_size(const AvahiAddress *a) {
+    assert(a);
+
+    if (a->proto == AVAHI_PROTO_INET)
+        return 4;
+    else if (a->proto == AVAHI_PROTO_INET6)
+        return 16;
+
+    return 0;
+}
+
+int avahi_address_cmp(const AvahiAddress *a, const AvahiAddress *b) {
+    assert(a);
+    assert(b);
+
+    if (a->proto != b->proto)
+        return -1;
+
+    return memcmp(a->data.data, b->data.data, address_get_size(a));
+}
+
+char *avahi_address_snprint(char *s, size_t length, const AvahiAddress *a) {
+    assert(s);
+    assert(length);
+    assert(a);
+
+    if (!(inet_ntop(avahi_proto_to_af(a->proto), a->data.data, s, length)))
+        return NULL;
+
+    return s;
+}
+
+char* avahi_reverse_lookup_name(const AvahiAddress *a, char *ret_s, size_t length) {
+    assert(ret_s);
+    assert(length > 0);
+    assert(a);
+
+    if (a->proto == AVAHI_PROTO_INET) {
+        uint32_t n = ntohl(a->data.ipv4.address);
+        snprintf(
+            ret_s, length,
+            "%u.%u.%u.%u.in-addr.arpa",
+            n & 0xFF, (n >> 8) & 0xFF, (n >> 16) & 0xFF, n >> 24);
+    } else {
+        assert(a->proto == AVAHI_PROTO_INET6);
+
+        snprintf(
+            ret_s, length,
+            "%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.ip6.arpa",
+            a->data.ipv6.address[15] & 0xF, a->data.ipv6.address[15] >> 4,
+            a->data.ipv6.address[14] & 0xF, a->data.ipv6.address[14] >> 4,
+            a->data.ipv6.address[13] & 0xF, a->data.ipv6.address[13] >> 4,
+            a->data.ipv6.address[12] & 0xF, a->data.ipv6.address[12] >> 4,
+            a->data.ipv6.address[11] & 0xF, a->data.ipv6.address[11] >> 4,
+            a->data.ipv6.address[10] & 0xF, a->data.ipv6.address[10] >> 4,
+            a->data.ipv6.address[ 9] & 0xF, a->data.ipv6.address[ 9] >> 4,
+            a->data.ipv6.address[ 8] & 0xF, a->data.ipv6.address[ 8] >> 4,
+            a->data.ipv6.address[ 7] & 0xF, a->data.ipv6.address[ 7] >> 4,
+            a->data.ipv6.address[ 6] & 0xF, a->data.ipv6.address[ 6] >> 4,
+            a->data.ipv6.address[ 5] & 0xF, a->data.ipv6.address[ 5] >> 4,
+            a->data.ipv6.address[ 4] & 0xF, a->data.ipv6.address[ 4] >> 4,
+            a->data.ipv6.address[ 3] & 0xF, a->data.ipv6.address[ 3] >> 4,
+            a->data.ipv6.address[ 2] & 0xF, a->data.ipv6.address[ 2] >> 4,
+            a->data.ipv6.address[ 1] & 0xF, a->data.ipv6.address[ 1] >> 4,
+            a->data.ipv6.address[ 0] & 0xF, a->data.ipv6.address[ 0] >> 4);
+    }
+
+    return ret_s;
+}
+
+AvahiAddress *avahi_address_parse(const char *s, AvahiProtocol proto, AvahiAddress *ret_addr) {
+    assert(ret_addr);
+    assert(s);
+
+    if (proto == AVAHI_PROTO_UNSPEC) {
+        if (inet_pton(AF_INET, s, ret_addr->data.data) <= 0) {
+            if (inet_pton(AF_INET6, s, ret_addr->data.data) <= 0)
+                return NULL;
+            else
+                ret_addr->proto = AVAHI_PROTO_INET6;
+        } else
+            ret_addr->proto = AVAHI_PROTO_INET;
+    } else {
+        if (inet_pton(avahi_proto_to_af(proto), s, ret_addr->data.data) <= 0)
+            return NULL;
+
+        ret_addr->proto = proto;
+    }
+
+    return ret_addr;
+}
+
+int avahi_proto_to_af(AvahiProtocol proto) {
+    if (proto == AVAHI_PROTO_INET)
+        return AF_INET;
+    if (proto == AVAHI_PROTO_INET6)
+        return AF_INET6;
+
+    assert(proto == AVAHI_PROTO_UNSPEC);
+    return AF_UNSPEC;
+}
+
+AvahiProtocol avahi_af_to_proto(int af) {
+    if (af == AF_INET)
+        return AVAHI_PROTO_INET;
+    if (af == AF_INET6)
+        return AVAHI_PROTO_INET6;
+
+    assert(af == AF_UNSPEC);
+    return AVAHI_PROTO_UNSPEC;
+}
+
+const char* avahi_proto_to_string(AvahiProtocol proto) {
+    if (proto == AVAHI_PROTO_INET)
+        return "IPv4";
+    if (proto == AVAHI_PROTO_INET6)
+        return "IPv6";
+
+    assert(proto == AVAHI_PROTO_UNSPEC);
+    return "UNSPEC";
+}
diff --git a/avahi-0.6.31/avahi-common/address.h b/avahi-0.6.31/avahi-common/address.h
new file mode 100644
index 0000000..a14104f
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/address.h
@@ -0,0 +1,119 @@
+#ifndef fooaddresshfoo
+#define fooaddresshfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+/** \file address.h Definitions and functions to manipulate IP addresses. */
+
+#include <inttypes.h>
+#include <sys/types.h>
+
+#include <avahi-common/cdecl.h>
+
+AVAHI_C_DECL_BEGIN
+
+/** Protocol family specification, takes the values AVAHI_PROTO_INET, AVAHI_PROTO_INET6, AVAHI_PROTO_UNSPEC */
+typedef int AvahiProtocol;
+
+/** Numeric network interface index. Takes OS dependent values and the special constant AVAHI_IF_UNSPEC  */
+typedef int AvahiIfIndex;
+
+/** Values for AvahiProtocol */
+enum {
+    AVAHI_PROTO_INET = 0,     /**< IPv4 */
+    AVAHI_PROTO_INET6 = 1,   /**< IPv6 */
+    AVAHI_PROTO_UNSPEC = -1  /**< Unspecified/all protocol(s) */
+};
+
+/** Special values for AvahiIfIndex */
+enum {
+    AVAHI_IF_UNSPEC = -1       /**< Unspecified/all interface(s) */
+};
+
+/** Maximum size of an address in string form */
+#define AVAHI_ADDRESS_STR_MAX 40 /* IPv6 Max = 4*8 + 7 + 1 for NUL */
+
+/** Return TRUE if the specified interface index is valid */
+#define AVAHI_IF_VALID(ifindex) (((ifindex) >= 0) || ((ifindex) == AVAHI_IF_UNSPEC))
+
+/** Return TRUE if the specified protocol is valid */
+#define AVAHI_PROTO_VALID(protocol) (((protocol) == AVAHI_PROTO_INET) || ((protocol) == AVAHI_PROTO_INET6) || ((protocol) == AVAHI_PROTO_UNSPEC))
+
+/** An IPv4 address */
+typedef struct AvahiIPv4Address {
+    uint32_t address; /**< Address data in network byte order. */
+} AvahiIPv4Address;
+
+/** An IPv6 address */
+typedef struct AvahiIPv6Address {
+    uint8_t address[16]; /**< Address data */
+} AvahiIPv6Address;
+
+/** Protocol (address family) independent address structure */
+typedef struct AvahiAddress {
+    AvahiProtocol proto; /**< Address family */
+
+    union {
+        AvahiIPv6Address ipv6;  /**< Address when IPv6 */
+        AvahiIPv4Address ipv4;  /**< Address when IPv4 */
+        uint8_t data[1];        /**< Type-independent data field */
+    } data;
+} AvahiAddress;
+
+/** @{ \name Comparison */
+
+/** Compare two addresses. Returns 0 when equal, a negative value when a < b, a positive value when a > b. */
+int avahi_address_cmp(const AvahiAddress *a, const AvahiAddress *b);
+
+/** @} */
+
+/** @{ \name String conversion */
+
+/** Convert the specified address *a to a human readable character string, use AVAHI_ADDRESS_STR_MAX to allocate an array of the right size */
+char *avahi_address_snprint(char *ret_s, size_t length, const AvahiAddress *a);
+
+/** Convert the specified human readable character string to an
+ * address structure. Set af to AVAHI_UNSPEC for automatic address
+ * family detection. */
+AvahiAddress *avahi_address_parse(const char *s, AvahiProtocol af, AvahiAddress *ret_addr);
+
+/** @} */
+
+/** \cond fulldocs */
+/** Generate the DNS reverse lookup name for an IPv4 or IPv6 address. */
+char* avahi_reverse_lookup_name(const AvahiAddress *a, char *ret_s, size_t length);
+/** \endcond */
+
+/** @{ \name Protocol/address family handling */
+
+/** Map AVAHI_PROTO_xxx constants to Unix AF_xxx constants */
+int avahi_proto_to_af(AvahiProtocol proto);
+
+/** Map Unix AF_xxx constants to AVAHI_PROTO_xxx constants */
+AvahiProtocol avahi_af_to_proto(int af);
+
+/** Return a textual representation of the specified protocol number. i.e. "IPv4", "IPv6" or "UNSPEC" */
+const char* avahi_proto_to_string(AvahiProtocol proto);
+
+/** @} */
+
+AVAHI_C_DECL_END
+
+#endif
diff --git a/avahi-0.6.31/avahi-common/alternative-test.c b/avahi-0.6.31/avahi-common/alternative-test.c
new file mode 100644
index 0000000..9255435
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/alternative-test.c
@@ -0,0 +1,90 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+
+#include "alternative.h"
+#include "malloc.h"
+#include "domain.h"
+
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
+    const char* const test_strings[] = {
+        "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+        "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXüüüüüüü",
+        "gurke",
+        "-",
+        " #",
+        "1",
+        "#0",
+        " #0",
+        " #1",
+        "#-1",
+        " #-1",
+        "-0",
+        "--0",
+        "-1",
+        "--1",
+        "-2",
+        "gurke1",
+        "gurke0",
+        "gurke-2",
+        "gurke #0",
+        "gurke #1",
+        "gurke #",
+        "gurke#1",
+        "gurke-",
+        "gurke---",
+        "gurke #",
+        "gurke ###",
+        NULL
+    };
+
+    char *r = NULL;
+    int i, j, k;
+
+    for (k = 0; test_strings[k]; k++) {
+
+        printf(">>>>>%s<<<<\n", test_strings[k]);
+
+        for (j = 0; j < 2; j++) {
+
+            for (i = 0; i <= 100; i++) {
+                char *n;
+
+                n = i == 0 ? avahi_strdup(test_strings[k]) : (j ? avahi_alternative_service_name(r) : avahi_alternative_host_name(r));
+                avahi_free(r);
+                r = n;
+
+                if (j)
+                    assert(avahi_is_valid_service_name(n));
+                else
+                    assert(avahi_is_valid_host_name(n));
+
+                printf("%s\n", r);
+            }
+        }
+    }
+
+    avahi_free(r);
+    return 0;
+}
diff --git a/avahi-0.6.31/avahi-common/alternative.c b/avahi-0.6.31/avahi-common/alternative.c
new file mode 100644
index 0000000..b3d39f0
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/alternative.c
@@ -0,0 +1,182 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <assert.h>
+
+#include "alternative.h"
+#include "malloc.h"
+#include "domain.h"
+#include "utf8.h"
+
+static void drop_incomplete_utf8(char *c) {
+    char *e;
+
+    e = strchr(c, 0) - 1;
+
+    while (e >= c) {
+
+        if (avahi_utf8_valid(c))
+            break;
+
+        assert(*e & 128);
+        *e = 0;
+
+        e--;
+    }
+}
+
+char *avahi_alternative_host_name(const char *s) {
+    const char *e;
+    char *r;
+
+    assert(s);
+
+    if (!avahi_is_valid_host_name(s))
+        return NULL;
+
+    if ((e = strrchr(s, '-'))) {
+        const char *p;
+
+        e++;
+
+        for (p = e; *p; p++)
+            if (!isdigit(*p)) {
+                e = NULL;
+                break;
+            }
+
+        if (e && (*e == '0' || *e == 0))
+            e = NULL;
+    }
+
+    if (e) {
+        char *c, *m;
+        size_t l;
+        int n;
+
+        n = atoi(e)+1;
+        if (!(m = avahi_strdup_printf("%i", n)))
+            return NULL;
+
+        l = e-s-1;
+
+        if (l >= AVAHI_LABEL_MAX-1-strlen(m)-1)
+            l = AVAHI_LABEL_MAX-1-strlen(m)-1;
+
+        if (!(c = avahi_strndup(s, l))) {
+            avahi_free(m);
+            return NULL;
+        }
+
+        drop_incomplete_utf8(c);
+
+        r = avahi_strdup_printf("%s-%s", c, m);
+        avahi_free(c);
+        avahi_free(m);
+
+    } else {
+        char *c;
+
+        if (!(c = avahi_strndup(s, AVAHI_LABEL_MAX-1-2)))
+            return NULL;
+
+        drop_incomplete_utf8(c);
+
+        r = avahi_strdup_printf("%s-2", c);
+        avahi_free(c);
+    }
+
+    assert(avahi_is_valid_host_name(r));
+
+    return r;
+}
+
+char *avahi_alternative_service_name(const char *s) {
+    const char *e;
+    char *r;
+
+    assert(s);
+
+    if (!avahi_is_valid_service_name(s))
+        return NULL;
+
+    if ((e = strstr(s, " #"))) {
+        const char *n, *p;
+        e += 2;
+
+        while ((n = strstr(e, " #")))
+            e = n + 2;
+
+        for (p = e; *p; p++)
+            if (!isdigit(*p)) {
+                e = NULL;
+                break;
+            }
+
+        if (e && (*e == '0' || *e == 0))
+            e = NULL;
+    }
+
+    if (e) {
+        char *c, *m;
+        size_t l;
+        int n;
+
+        n = atoi(e)+1;
+        if (!(m = avahi_strdup_printf("%i", n)))
+            return NULL;
+
+        l = e-s-2;
+
+        if (l >= AVAHI_LABEL_MAX-1-strlen(m)-2)
+            l = AVAHI_LABEL_MAX-1-strlen(m)-2;
+
+        if (!(c = avahi_strndup(s, l))) {
+            avahi_free(m);
+            return NULL;
+        }
+
+        drop_incomplete_utf8(c);
+
+        r = avahi_strdup_printf("%s #%s", c, m);
+        avahi_free(c);
+        avahi_free(m);
+    } else {
+        char *c;
+
+        if (!(c = avahi_strndup(s, AVAHI_LABEL_MAX-1-3)))
+            return NULL;
+
+        drop_incomplete_utf8(c);
+
+        r = avahi_strdup_printf("%s #2", c);
+        avahi_free(c);
+    }
+
+    assert(avahi_is_valid_service_name(r));
+
+    return r;
+}
diff --git a/avahi-0.6.31/avahi-common/alternative.h b/avahi-0.6.31/avahi-common/alternative.h
new file mode 100644
index 0000000..9b044de
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/alternative.h
@@ -0,0 +1,43 @@
+#ifndef fooalternativehfoo
+#define fooalternativehfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+/** \file alternative.h Functions to find alternative names for hosts and services in the case of name collision */
+
+#include <avahi-common/cdecl.h>
+
+AVAHI_C_DECL_BEGIN
+
+/** Find an alternative for the specified host name. If called with an
+ * original host name, "-2" is appended, afterwards the number is
+ * increased on each call. (i.e. "foo" becomes "foo-2" becomes "foo-3"
+ * and so on.) avahi_free() the result. */
+char *avahi_alternative_host_name(const char *s);
+
+/** Find an alternative for the specified service name. If called with
+ * an original service name, " #2" is appended. Afterwards the number
+ * is increased on each call (i.e. "foo" becomes "foo #2" becomes "foo
+ * #3" and so on.) avahi_free() the result. */
+char *avahi_alternative_service_name(const char *s);
+
+AVAHI_C_DECL_END
+
+#endif
diff --git a/avahi-0.6.31/avahi-common/cdecl.h b/avahi-0.6.31/avahi-common/cdecl.h
new file mode 100644
index 0000000..aef6aba
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/cdecl.h
@@ -0,0 +1,38 @@
+#ifndef foocdeclhfoo
+#define foocdeclhfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+/** \file cdecl.h C++ compatibility */
+#ifdef __cplusplus
+/** If using C++ this macro enables C mode, otherwise does nothing */
+#define AVAHI_C_DECL_BEGIN extern "C" {
+/** If using C++ this macro switches back to C++ mode, otherwise does nothing */
+#define AVAHI_C_DECL_END }
+
+#else
+/** If using C++ this macro enables C mode, otherwise does nothing */
+#define AVAHI_C_DECL_BEGIN
+/** If using C++ this macro switches back to C++ mode, otherwise does nothing */
+#define AVAHI_C_DECL_END
+
+#endif
+
+#endif
diff --git a/avahi-0.6.31/avahi-common/dbus-watch-glue.c b/avahi-0.6.31/avahi-common/dbus-watch-glue.c
new file mode 100644
index 0000000..b18f555
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/dbus-watch-glue.c
@@ -0,0 +1,357 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <assert.h>
+#include <stdio.h>
+
+#include "malloc.h"
+#include "timeval.h"
+#include "dbus-watch-glue.h"
+
+static AvahiWatchEvent translate_dbus_to_avahi(unsigned int f) {
+    AvahiWatchEvent e = 0;
+
+    if (f & DBUS_WATCH_READABLE)
+        e |= AVAHI_WATCH_IN;
+    if (f & DBUS_WATCH_WRITABLE)
+        e |= AVAHI_WATCH_OUT;
+    if (f & DBUS_WATCH_ERROR)
+        e |= AVAHI_WATCH_ERR;
+    if (f & DBUS_WATCH_HANGUP)
+        e |= AVAHI_WATCH_HUP;
+
+    return e;
+}
+
+static unsigned int translate_avahi_to_dbus(AvahiWatchEvent e) {
+    unsigned int f = 0;
+
+    if (e & AVAHI_WATCH_IN)
+        f |= DBUS_WATCH_READABLE;
+    if (e & AVAHI_WATCH_OUT)
+        f |= DBUS_WATCH_WRITABLE;
+    if (e & AVAHI_WATCH_ERR)
+        f |= DBUS_WATCH_ERROR;
+    if (e & AVAHI_WATCH_HUP)
+        f |= DBUS_WATCH_HANGUP;
+
+    return f;
+}
+
+typedef struct {
+    DBusConnection *connection;
+    const AvahiPoll *poll_api;
+    AvahiTimeout *dispatch_timeout;
+    int ref;
+} ConnectionData;
+
+static ConnectionData *connection_data_ref(ConnectionData *d) {
+    assert(d);
+    assert(d->ref >= 1);
+
+    d->ref++;
+    return d;
+}
+
+static void connection_data_unref(ConnectionData *d) {
+    assert(d);
+    assert(d->ref >= 1);
+
+    if (--d->ref <= 0) {
+        d->poll_api->timeout_free(d->dispatch_timeout);
+        avahi_free(d);
+    }
+}
+
+static void request_dispatch(ConnectionData *d, int enable) {
+    static const struct timeval tv = { 0, 0 };
+    assert(d);
+
+    if (enable) {
+        assert(dbus_connection_get_dispatch_status(d->connection) == DBUS_DISPATCH_DATA_REMAINS);
+        d->poll_api->timeout_update(d->dispatch_timeout, &tv);
+    } else
+        d->poll_api->timeout_update(d->dispatch_timeout, NULL);
+}
+
+static void dispatch_timeout_callback(AvahiTimeout *t, void *userdata) {
+    ConnectionData *d = userdata;
+    assert(t);
+    assert(d);
+
+    connection_data_ref(d);
+    dbus_connection_ref(d->connection);
+
+    if (dbus_connection_dispatch(d->connection) == DBUS_DISPATCH_DATA_REMAINS)
+        /* If there's still data, request that this handler is called again */
+        request_dispatch(d, 1);
+    else
+        request_dispatch(d, 0);
+
+    dbus_connection_unref(d->connection);
+    connection_data_unref(d);
+}
+
+static void watch_callback(AvahiWatch *avahi_watch, AVAHI_GCC_UNUSED int fd, AvahiWatchEvent events, void *userdata) {
+    DBusWatch *dbus_watch = userdata;
+
+    assert(avahi_watch);
+    assert(dbus_watch);
+
+    dbus_watch_handle(dbus_watch, translate_avahi_to_dbus(events));
+    /* Ignore the return value */
+}
+
+static dbus_bool_t update_watch(const AvahiPoll *poll_api, DBusWatch *dbus_watch) {
+    AvahiWatch *avahi_watch;
+    dbus_bool_t b;
+
+    assert(dbus_watch);
+
+    avahi_watch = dbus_watch_get_data(dbus_watch);
+
+    b = dbus_watch_get_enabled(dbus_watch);
+
+    if (b && !avahi_watch) {
+
+        if (!(avahi_watch = poll_api->watch_new(
+                  poll_api,
+#if (DBUS_VERSION_MAJOR == 1 && DBUS_VERSION_MINOR == 1 && DBUS_VERSION_MICRO >= 1) || (DBUS_VERSION_MAJOR == 1 && DBUS_VERSION_MINOR > 1) || (DBUS_VERSION_MAJOR > 1)
+                  dbus_watch_get_unix_fd(dbus_watch),
+#else
+                  dbus_watch_get_fd(dbus_watch),
+#endif
+                  translate_dbus_to_avahi(dbus_watch_get_flags(dbus_watch)),
+                  watch_callback,
+                  dbus_watch)))
+            return FALSE;
+
+        dbus_watch_set_data(dbus_watch, avahi_watch, NULL);
+
+    } else if (!b && avahi_watch) {
+
+        poll_api->watch_free(avahi_watch);
+        dbus_watch_set_data(dbus_watch, NULL, NULL);
+
+    } else if (avahi_watch) {
+
+        /* Update flags */
+        poll_api->watch_update(avahi_watch, dbus_watch_get_flags(dbus_watch));
+    }
+
+    return TRUE;
+}
+
+static dbus_bool_t add_watch(DBusWatch *dbus_watch, void *userdata) {
+    ConnectionData *d = userdata;
+
+    assert(dbus_watch);
+    assert(d);
+
+    return update_watch(d->poll_api, dbus_watch);
+}
+
+static void remove_watch(DBusWatch *dbus_watch, void *userdata) {
+    ConnectionData *d = userdata;
+    AvahiWatch *avahi_watch;
+
+    assert(dbus_watch);
+    assert(d);
+
+    if ((avahi_watch = dbus_watch_get_data(dbus_watch))) {
+        d->poll_api->watch_free(avahi_watch);
+        dbus_watch_set_data(dbus_watch, NULL, NULL);
+    }
+}
+
+static void watch_toggled(DBusWatch *dbus_watch, void *userdata) {
+    ConnectionData *d = userdata;
+
+    assert(dbus_watch);
+    assert(d);
+
+    update_watch(d->poll_api, dbus_watch);
+}
+
+typedef struct TimeoutData {
+    const AvahiPoll *poll_api;
+    AvahiTimeout *avahi_timeout;
+    DBusTimeout *dbus_timeout;
+    int ref;
+} TimeoutData;
+
+static TimeoutData* timeout_data_ref(TimeoutData *t) {
+    assert(t);
+    assert(t->ref >= 1);
+
+    t->ref++;
+    return t;
+}
+
+static void timeout_data_unref(TimeoutData *t) {
+    assert(t);
+    assert(t->ref >= 1);
+
+    if (--t->ref <= 0) {
+        if (t->avahi_timeout)
+            t->poll_api->timeout_free(t->avahi_timeout);
+
+        avahi_free(t);
+    }
+}
+
+static void update_timeout(TimeoutData *timeout) {
+    assert(timeout);
+    assert(timeout->ref >= 1);
+
+    if (dbus_timeout_get_enabled(timeout->dbus_timeout)) {
+        struct timeval tv;
+        avahi_elapse_time(&tv, dbus_timeout_get_interval(timeout->dbus_timeout), 0);
+        timeout->poll_api->timeout_update(timeout->
+                                      avahi_timeout, &tv);
+    } else
+        timeout->poll_api->timeout_update(timeout->avahi_timeout, NULL);
+
+}
+
+static void timeout_callback(AvahiTimeout *avahi_timeout, void *userdata) {
+    TimeoutData *timeout = userdata;
+
+    assert(avahi_timeout);
+    assert(timeout);
+
+    timeout_data_ref(timeout);
+
+    dbus_timeout_handle(timeout->dbus_timeout);
+    /* Ignore the return value */
+
+    if (timeout->avahi_timeout)
+        update_timeout(timeout);
+
+    timeout_data_unref(timeout);
+}
+
+static dbus_bool_t add_timeout(DBusTimeout *dbus_timeout, void *userdata) {
+    TimeoutData *timeout;
+    ConnectionData *d = userdata;
+    struct timeval tv;
+    dbus_bool_t b;
+
+    assert(dbus_timeout);
+    assert(d);
+
+    if (!(timeout = avahi_new(TimeoutData, 1)))
+        return FALSE;
+
+    timeout->dbus_timeout = dbus_timeout;
+    timeout->poll_api = d->poll_api;
+    timeout->ref = 1;
+
+    if ((b = dbus_timeout_get_enabled(dbus_timeout)))
+        avahi_elapse_time(&tv, dbus_timeout_get_interval(dbus_timeout), 0);
+
+    if (!(timeout->avahi_timeout = d->poll_api->timeout_new(
+              d->poll_api,
+              b ? &tv : NULL,
+              timeout_callback,
+              timeout))) {
+        avahi_free(timeout);
+        return FALSE;
+    }
+
+    dbus_timeout_set_data(dbus_timeout, timeout, (DBusFreeFunction) timeout_data_unref);
+    return TRUE;
+}
+
+static void remove_timeout(DBusTimeout *dbus_timeout, void *userdata) {
+    ConnectionData *d = userdata;
+    TimeoutData *timeout;
+
+    assert(dbus_timeout);
+    assert(d);
+
+    timeout = dbus_timeout_get_data(dbus_timeout);
+    assert(timeout);
+
+    d->poll_api->timeout_free(timeout->avahi_timeout);
+    timeout->avahi_timeout = NULL;
+}
+
+static void timeout_toggled(DBusTimeout *dbus_timeout, AVAHI_GCC_UNUSED void *userdata) {
+    TimeoutData *timeout;
+
+    assert(dbus_timeout);
+    timeout = dbus_timeout_get_data(dbus_timeout);
+    assert(timeout);
+
+    update_timeout(timeout);
+}
+
+static void dispatch_status(AVAHI_GCC_UNUSED DBusConnection *connection, DBusDispatchStatus new_status, void *userdata) {
+    ConnectionData *d = userdata;
+
+    if (new_status == DBUS_DISPATCH_DATA_REMAINS)
+        request_dispatch(d, 1);
+ }
+
+int avahi_dbus_connection_glue(DBusConnection *c, const AvahiPoll *poll_api) {
+    ConnectionData *d = NULL;
+
+    assert(c);
+    assert(poll_api);
+
+    if (!(d = avahi_new(ConnectionData, 1)))
+        goto fail;;
+
+    d->poll_api = poll_api;
+    d->connection = c;
+    d->ref = 1;
+
+    if (!(d->dispatch_timeout = poll_api->timeout_new(poll_api, NULL, dispatch_timeout_callback, d)))
+        goto fail;
+
+    if (!(dbus_connection_set_watch_functions(c, add_watch, remove_watch, watch_toggled, connection_data_ref(d), (DBusFreeFunction)connection_data_unref)))
+        goto fail;
+
+    if (!(dbus_connection_set_timeout_functions(c, add_timeout, remove_timeout, timeout_toggled, connection_data_ref(d), (DBusFreeFunction)connection_data_unref)))
+        goto fail;
+
+    dbus_connection_set_dispatch_status_function(c, dispatch_status, connection_data_ref(d), (DBusFreeFunction)connection_data_unref);
+
+    if (dbus_connection_get_dispatch_status(c) == DBUS_DISPATCH_DATA_REMAINS)
+        request_dispatch(d, 1);
+
+    connection_data_unref(d);
+
+    return 0;
+
+fail:
+
+    if (d) {
+        d->poll_api->timeout_free(d->dispatch_timeout);
+
+        avahi_free(d);
+    }
+
+    return -1;
+}
diff --git a/avahi-0.6.31/avahi-common/dbus-watch-glue.h b/avahi-0.6.31/avahi-common/dbus-watch-glue.h
new file mode 100644
index 0000000..138ea97
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/dbus-watch-glue.h
@@ -0,0 +1,33 @@
+#ifndef foodbuswatchgluehfoo
+#define foodbuswatchgluehfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#include <dbus/dbus.h>
+
+#include <avahi-common/watch.h>
+
+AVAHI_C_DECL_BEGIN
+
+int avahi_dbus_connection_glue(DBusConnection *c, const AvahiPoll *poll_api);
+
+AVAHI_C_DECL_END
+
+#endif
diff --git a/avahi-0.6.31/avahi-common/dbus.c b/avahi-0.6.31/avahi-common/dbus.c
new file mode 100644
index 0000000..f19c77c
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/dbus.c
@@ -0,0 +1,138 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
+#include <avahi-common/error.h>
+#include <avahi-common/dbus.h>
+
+static const char * const table[- AVAHI_ERR_MAX] = {
+    AVAHI_DBUS_ERR_OK,
+    AVAHI_DBUS_ERR_FAILURE,
+    AVAHI_DBUS_ERR_BAD_STATE,
+    AVAHI_DBUS_ERR_INVALID_HOST_NAME,
+    AVAHI_DBUS_ERR_INVALID_DOMAIN_NAME,
+    AVAHI_DBUS_ERR_NO_NETWORK,
+    AVAHI_DBUS_ERR_INVALID_TTL,
+    AVAHI_DBUS_ERR_IS_PATTERN,
+    AVAHI_DBUS_ERR_COLLISION,
+    AVAHI_DBUS_ERR_INVALID_RECORD,
+
+    AVAHI_DBUS_ERR_INVALID_SERVICE_NAME,
+    AVAHI_DBUS_ERR_INVALID_SERVICE_TYPE,
+    AVAHI_DBUS_ERR_INVALID_PORT,
+    AVAHI_DBUS_ERR_INVALID_KEY,
+    AVAHI_DBUS_ERR_INVALID_ADDRESS,
+    AVAHI_DBUS_ERR_TIMEOUT,
+    AVAHI_DBUS_ERR_TOO_MANY_CLIENTS,
+    AVAHI_DBUS_ERR_TOO_MANY_OBJECTS,
+    AVAHI_DBUS_ERR_TOO_MANY_ENTRIES,
+    AVAHI_DBUS_ERR_OS,
+
+    AVAHI_DBUS_ERR_ACCESS_DENIED,
+    AVAHI_DBUS_ERR_INVALID_OPERATION,
+    AVAHI_DBUS_ERR_DBUS_ERROR,
+    AVAHI_DBUS_ERR_DISCONNECTED,
+    AVAHI_DBUS_ERR_NO_MEMORY,
+    AVAHI_DBUS_ERR_INVALID_OBJECT,
+    AVAHI_DBUS_ERR_NO_DAEMON,
+    AVAHI_DBUS_ERR_INVALID_INTERFACE,
+    AVAHI_DBUS_ERR_INVALID_PROTOCOL,
+    AVAHI_DBUS_ERR_INVALID_FLAGS,
+
+    AVAHI_DBUS_ERR_NOT_FOUND,
+    AVAHI_DBUS_ERR_INVALID_CONFIG,
+    AVAHI_DBUS_ERR_VERSION_MISMATCH,
+    AVAHI_DBUS_ERR_INVALID_SERVICE_SUBTYPE,
+    AVAHI_DBUS_ERR_INVALID_PACKET,
+    AVAHI_DBUS_ERR_INVALID_DNS_ERROR,
+    AVAHI_DBUS_ERR_DNS_FORMERR,
+    AVAHI_DBUS_ERR_DNS_SERVFAIL,
+    AVAHI_DBUS_ERR_DNS_NXDOMAIN,
+    AVAHI_DBUS_ERR_DNS_NOTIMP,
+
+    AVAHI_DBUS_ERR_DNS_REFUSED,
+    AVAHI_DBUS_ERR_DNS_YXDOMAIN,
+    AVAHI_DBUS_ERR_DNS_YXRRSET,
+    AVAHI_DBUS_ERR_DNS_NXRRSET,
+    AVAHI_DBUS_ERR_DNS_NOTAUTH,
+    AVAHI_DBUS_ERR_DNS_NOTZONE,
+    AVAHI_DBUS_ERR_INVALID_RDATA,
+    AVAHI_DBUS_ERR_INVALID_DNS_CLASS,
+    AVAHI_DBUS_ERR_INVALID_DNS_TYPE,
+    AVAHI_DBUS_ERR_NOT_SUPPORTED,
+
+    AVAHI_DBUS_ERR_NOT_PERMITTED,
+    AVAHI_DBUS_ERR_INVALID_ARGUMENT,
+    AVAHI_DBUS_ERR_IS_EMPTY,
+    AVAHI_DBUS_ERR_NO_CHANGE
+};
+
+struct error_map {
+    const char *dbus_error;
+    int avahi_error;
+};
+
+static struct error_map error_map[] = {
+    { DBUS_ERROR_FAILED,           AVAHI_ERR_FAILURE },
+    { DBUS_ERROR_NO_MEMORY,        AVAHI_ERR_NO_MEMORY },
+    { DBUS_ERROR_SERVICE_UNKNOWN,  AVAHI_ERR_NO_DAEMON },
+    { DBUS_ERROR_BAD_ADDRESS,      AVAHI_ERR_NO_DAEMON },
+    { DBUS_ERROR_NOT_SUPPORTED,    AVAHI_ERR_NOT_SUPPORTED },
+    { DBUS_ERROR_LIMITS_EXCEEDED,  AVAHI_ERR_TOO_MANY_OBJECTS },
+    { DBUS_ERROR_ACCESS_DENIED,    AVAHI_ERR_ACCESS_DENIED },
+    { DBUS_ERROR_AUTH_FAILED,      AVAHI_ERR_ACCESS_DENIED },
+    { DBUS_ERROR_NO_SERVER,        AVAHI_ERR_NO_DAEMON },
+    { DBUS_ERROR_TIMEOUT,          AVAHI_ERR_TIMEOUT },
+    { DBUS_ERROR_NO_NETWORK,       AVAHI_ERR_NO_NETWORK },
+    { DBUS_ERROR_DISCONNECTED,     AVAHI_ERR_DISCONNECTED },
+    { DBUS_ERROR_INVALID_ARGS,     AVAHI_ERR_INVALID_ARGUMENT },
+    { DBUS_ERROR_TIMED_OUT,        AVAHI_ERR_TIMEOUT },
+    { NULL, 0 }
+};
+
+int avahi_error_dbus_to_number(const char *s) {
+    int e;
+    const struct error_map *m;
+
+    assert(s);
+
+    for (e = -1; e > AVAHI_ERR_MAX; e--)
+        if (strcmp(s, table[-e]) == 0)
+            return e;
+
+    for (m = error_map; m->dbus_error; m++)
+        if (strcmp(m->dbus_error, s) == 0)
+            return m->avahi_error;
+
+    return AVAHI_ERR_DBUS_ERROR;
+}
+
+const char *avahi_error_number_to_dbus(int error) {
+    assert(error > AVAHI_ERR_MAX);
+    assert(error < 1);
+
+    return table[-error];
+}
diff --git a/avahi-0.6.31/avahi-common/dbus.h b/avahi-0.6.31/avahi-common/dbus.h
new file mode 100644
index 0000000..ea3e8a2
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/dbus.h
@@ -0,0 +1,119 @@
+#ifndef foodbushfoo
+#define foodbushfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+/** \file dbus.h Some definitions for the D-Bus interface */
+
+#include <avahi-common/cdecl.h>
+#include <dbus/dbus.h>
+
+AVAHI_C_DECL_BEGIN
+
+#define AVAHI_DBUS_NAME "org.freedesktop.Avahi"
+#define AVAHI_DBUS_INTERFACE_SERVER AVAHI_DBUS_NAME".Server"
+#define AVAHI_DBUS_PATH_SERVER "/"
+#define AVAHI_DBUS_INTERFACE_ENTRY_GROUP AVAHI_DBUS_NAME".EntryGroup"
+#define AVAHI_DBUS_INTERFACE_DOMAIN_BROWSER AVAHI_DBUS_NAME".DomainBrowser"
+#define AVAHI_DBUS_INTERFACE_SERVICE_TYPE_BROWSER AVAHI_DBUS_NAME".ServiceTypeBrowser"
+#define AVAHI_DBUS_INTERFACE_SERVICE_BROWSER AVAHI_DBUS_NAME".ServiceBrowser"
+#define AVAHI_DBUS_INTERFACE_ADDRESS_RESOLVER AVAHI_DBUS_NAME".AddressResolver"
+#define AVAHI_DBUS_INTERFACE_HOST_NAME_RESOLVER AVAHI_DBUS_NAME".HostNameResolver"
+#define AVAHI_DBUS_INTERFACE_SERVICE_RESOLVER AVAHI_DBUS_NAME".ServiceResolver"
+#define AVAHI_DBUS_INTERFACE_RECORD_BROWSER AVAHI_DBUS_NAME".RecordBrowser"
+
+/** The D-Bus API version identifier. The first byte specifies the API
+release, the second byte specifies the revision. If the revision
+number is increased the API has been extended but is downwards
+compatible. If the release changes compatibility is lost.
+
+Avahi 0.6 implements API version 0x0201;
+Avahi 0.6.1 implements API version 0x0202 */
+#define AVAHI_DBUS_API_VERSION ((uint32_t) 0x0203)
+
+#define AVAHI_DBUS_ERR_OK "org.freedesktop.Avahi.Success"
+#define AVAHI_DBUS_ERR_FAILURE "org.freedesktop.Avahi.Failure"
+#define AVAHI_DBUS_ERR_BAD_STATE "org.freedesktop.Avahi.BadStateError"
+#define AVAHI_DBUS_ERR_INVALID_HOST_NAME "org.freedesktop.Avahi.InvalidHostNameError"
+#define AVAHI_DBUS_ERR_INVALID_DOMAIN_NAME "org.freedesktop.Avahi.InvalidDomainNameError"
+#define AVAHI_DBUS_ERR_NO_NETWORK "org.freedesktop.Avahi.NoNetworkError"
+#define AVAHI_DBUS_ERR_INVALID_TTL "org.freedesktop.Avahi.InvalidTTLError"
+#define AVAHI_DBUS_ERR_IS_PATTERN "org.freedesktop.Avahi.IsPatternError"
+#define AVAHI_DBUS_ERR_COLLISION "org.freedesktop.Avahi.CollisionError"
+#define AVAHI_DBUS_ERR_INVALID_RECORD "org.freedesktop.Avahi.InvalidRecordError"
+
+#define AVAHI_DBUS_ERR_INVALID_SERVICE_NAME "org.freedesktop.Avahi.InvalidServiceNameError"
+#define AVAHI_DBUS_ERR_INVALID_SERVICE_TYPE "org.freedesktop.Avahi.InvalidServiceTypeError"
+#define AVAHI_DBUS_ERR_INVALID_PORT "org.freedesktop.Avahi.InvalidPortError"
+#define AVAHI_DBUS_ERR_INVALID_KEY "org.freedesktop.Avahi.InvalidKeyError"
+#define AVAHI_DBUS_ERR_INVALID_ADDRESS "org.freedesktop.Avahi.InvalidAddressError"
+#define AVAHI_DBUS_ERR_TIMEOUT "org.freedesktop.Avahi.TimeoutError"
+#define AVAHI_DBUS_ERR_TOO_MANY_CLIENTS "org.freedesktop.Avahi.TooManyClientsError"
+#define AVAHI_DBUS_ERR_TOO_MANY_OBJECTS "org.freedesktop.Avahi.TooManyObjectsError"
+#define AVAHI_DBUS_ERR_TOO_MANY_ENTRIES "org.freedesktop.Avahi.TooManyEntriesError"
+#define AVAHI_DBUS_ERR_OS "org.freedesktop.Avahi.OSError"
+
+#define AVAHI_DBUS_ERR_ACCESS_DENIED DBUS_ERROR_ACCESS_DENIED
+#define AVAHI_DBUS_ERR_INVALID_OPERATION "org.freedesktop.Avahi.InvalidOperationError"
+#define AVAHI_DBUS_ERR_DBUS_ERROR "org.freedesktop.Avahi.DBusError"
+#define AVAHI_DBUS_ERR_DISCONNECTED "org.freedesktop.Avahi.DisconnectedError"
+#define AVAHI_DBUS_ERR_NO_MEMORY "org.freedesktop.Avahi.NoMemoryError"
+#define AVAHI_DBUS_ERR_INVALID_OBJECT "org.freedesktop.Avahi.InvalidObjectError"
+#define AVAHI_DBUS_ERR_NO_DAEMON "org.freedesktop.Avahi.NoDaemonError"
+#define AVAHI_DBUS_ERR_INVALID_INTERFACE "org.freedesktop.Avahi.InvalidInterfaceError"
+#define AVAHI_DBUS_ERR_INVALID_PROTOCOL "org.freedesktop.Avahi.InvalidInterfaceProtocolError"
+#define AVAHI_DBUS_ERR_INVALID_FLAGS "org.freedesktop.Avahi.InvalidFlagsError"
+
+#define AVAHI_DBUS_ERR_NOT_FOUND "org.freedesktop.Avahi.NotFoundError"
+#define AVAHI_DBUS_ERR_INVALID_CONFIG "org.freedesktop.Avahi.InvalidConfigurationError"
+#define AVAHI_DBUS_ERR_VERSION_MISMATCH "org.freedesktop.Avahi.VersionMismatchError"
+#define AVAHI_DBUS_ERR_INVALID_SERVICE_SUBTYPE "org.freedesktop.Avahi.InvalidServiceSubtypeError"
+#define AVAHI_DBUS_ERR_INVALID_PACKET "org.freedesktop.Avahi.InvalidPacketError"
+#define AVAHI_DBUS_ERR_INVALID_DNS_ERROR "org.freedesktop.Avahi.InvalidDNSErrorError"
+#define AVAHI_DBUS_ERR_DNS_FORMERR "org.freedesktop.Avahi.DNSFORMERR"
+#define AVAHI_DBUS_ERR_DNS_SERVFAIL "org.freedesktop.Avahi.DNSSERVFAIL"
+#define AVAHI_DBUS_ERR_DNS_NXDOMAIN "org.freedesktop.Avahi.DNSNXDOMAIN"
+#define AVAHI_DBUS_ERR_DNS_NOTIMP "org.freedesktop.Avahi.DNSNOTIMP"
+
+#define AVAHI_DBUS_ERR_DNS_REFUSED "org.freedesktop.Avahi.DNSREFUSED"
+#define AVAHI_DBUS_ERR_DNS_YXDOMAIN "org.freedesktop.Avahi.DNSYXDOMAIN"
+#define AVAHI_DBUS_ERR_DNS_YXRRSET "org.freedesktop.Avahi.DNSYXRRSET"
+#define AVAHI_DBUS_ERR_DNS_NXRRSET "org.freedesktop.Avahi.DNSNXRRSET"
+#define AVAHI_DBUS_ERR_DNS_NOTAUTH "org.freedesktop.Avahi.DNSNOTAUTH"
+#define AVAHI_DBUS_ERR_DNS_NOTZONE "org.freedesktop.Avahi.DNSNOTZONE"
+#define AVAHI_DBUS_ERR_INVALID_RDATA "org.freedesktop.Avahi.InvalidRDataError"
+#define AVAHI_DBUS_ERR_INVALID_DNS_CLASS "org.freedesktop.Avahi.InvalidDNSClassError"
+#define AVAHI_DBUS_ERR_INVALID_DNS_TYPE "org.freedesktop.Avahi.InvalidDNSTypeError"
+#define AVAHI_DBUS_ERR_NOT_SUPPORTED "org.freedesktop.Avahi.NotSupportedError"
+
+#define AVAHI_DBUS_ERR_NOT_PERMITTED "org.freedesktop.Avahi.NotPermittedError"
+#define AVAHI_DBUS_ERR_INVALID_ARGUMENT "org.freedesktop.Avahi.InvalidArgumentError"
+#define AVAHI_DBUS_ERR_IS_EMPTY "org.freedesktop.Avahi.IsEmptyError"
+#define AVAHI_DBUS_ERR_NO_CHANGE "org.freedesktop.Avahi.NoChangeError"
+
+/** Convert a DBus error string into an Avahi error number */
+int avahi_error_dbus_to_number(const char *s);
+
+/** Convert an Avahi error number into a DBus error string.  Result should not be freed */
+const char * avahi_error_number_to_dbus(int error);
+
+AVAHI_C_DECL_END
+
+#endif
diff --git a/avahi-0.6.31/avahi-common/defs.h b/avahi-0.6.31/avahi-common/defs.h
new file mode 100644
index 0000000..bb73a9d
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/defs.h
@@ -0,0 +1,356 @@
+#ifndef foodefshfoo
+#define foodefshfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+/** \file defs.h Some common definitions */
+
+#include <avahi-common/cdecl.h>
+
+/** \mainpage
+ *
+ * \section choose_api Choosing an API
+ *
+ * Avahi provides three programming APIs for integration of
+ * mDNS/DNS-SD features into your C progams:
+ *
+ * \li <b>avahi-core</b>: an API for embedding a complete mDNS/DNS-SD stack
+ * into your software. This is intended for developers of embedded
+ * appliances only. We dissuade from using this API in normal desktop
+ * applications since it is not a good idea to run multiple mDNS
+ * stacks simultaneously on the same host.
+ * \li <b>the D-Bus API</b>: an extensive D-Bus interface for browsing and
+ * registering mDNS/DNS-SD services using avahi-daemon. We recommend
+ * using this API for software written in any language other than
+ * C (e.g. Python).
+ * \li <b>avahi-client</b>: a simplifying C wrapper around the D-Bus API. We
+ * recommend using this API in C or C++ progams. The D-Bus internals
+ * are hidden completely.
+ * \li <b>avahi-gobject</b>: an object-oriented C wrapper based on
+ * GLib's GObject. We recommd using this API for GNOME/Gtk programs.
+ *
+ * All three APIs are very similar, however avahi-core is the most powerful.
+ *
+ * In addition to the three APIs described above Avahi supports two
+ * compatibility libraries:
+ *
+ * \li <b>avahi-compat-libdns_sd</b>: the original Bonjour API as documented
+ * in the header file "dns_sd.h" by Apple Computer, Inc.
+ *
+ * \li <b>avahi-compat-howl</b>: the HOWL API as released with HOWL 0.9.8 by
+ * Porchdog Software.
+ *
+ * Please note that these compatibility layers are incomplete and
+ * generally a waste of resources. We strongly encourage everyone to
+ * use our native APIs for newly written programs and to port older
+ * programs to avahi-client!
+ *
+ * The native APIs (avahi-client and avahi-core) can be integrated
+ * into external event loops. We provide adapters for the following
+ * event loop implementations:
+ *
+ * \li <b>avahi-glib</b>: The GLIB main loop as used by GTk+/GNOME
+ *
+ * \li <b>avahi-qt</b>: The Qt main loop as used by Qt/KDE
+ *
+ * Finally, we provide a high-level Gtk+ GUI dialog called
+ * <b>avahi-ui</b> for user-friendly browsing for services.
+ *
+ * The doxygen-generated API documentation covers avahi-client
+ * (including its auxiliary APIs), the event loop adapters and
+ * avahi-ui. For the other APIs please consult the original
+ * documentation (for the compatibility APIs) or the header files.
+ *
+ * Please note that the doxygen-generated API documentation of the
+ * native Avahi API is not complete. A few definitions that are part
+ * of the Avahi API have been removed from this documentation, either
+ * because they are only relevant in a very few low-level applications
+ * or because they are considered obsolete. Please consult the C header
+ * files for all definitions that are part of the Avahi API. Please
+ * note that these hidden definitions are considered part of the Avahi
+ * API and will stay available in the API in the future.
+ *
+ * \section error_reporting Error Reporting
+ *
+ * Some notes on the Avahi error handling:
+ *
+ * - Error codes are negative integers and defined as AVAHI_ERR_xx
+ * - If a function returns some kind of non-negative integer value on
+ * success, a failure is indicated by returning the error code
+ * directly.
+ * - If a function returns a pointer of some kind on success, a
+ * failure is indicated by returning NULL
+ * - The last error number may be retrieved by calling
+ * avahi_client_errno()
+ * - Just like the libc errno variable the Avahi errno is NOT reset to
+ * AVAHI_OK if a function call succeeds.
+ * - You may convert a numeric error code into a human readable string
+ * using avahi_strerror()
+ * - The constructor function avahi_client_new() returns the error
+ * code in a call-by-reference argument
+ *
+ * \section event_loop Event Loop Abstraction
+ *
+ * Avahi uses a simple event loop abstraction layer. A table AvahiPoll
+ * which contains function pointers for user defined timeout and I/O
+ * condition event source implementations needs to be passed to
+ * avahi_client_new(). An adapter for this abstraction layer is
+ * available for the GLib main loop in the object AvahiGLibPoll. A
+ * simple stand-alone implementation is available under the name
+ * AvahiSimplePoll. An adpater for the Qt main loop is available from
+ * avahi_qt_poll_get().
+ *
+ * \section good_publish How to Register Services
+ *
+ * - Subscribe to server state changes. Pass a callback function
+ * pointer to avahi_client_new(). It will be called
+ * whenever the server state changes.
+ * - Only register your services when the server is in state
+ * AVAHI_SERVER_RUNNING. If you register your services in other server
+ * states they might not be accessible since the local host name might not necessarily
+ * be established.
+ * - Remove your services when the server enters
+ * AVAHI_SERVER_COLLISION or AVAHI_SERVER_REGISTERING state. Your
+ * services may not be reachable anymore since the local host name is
+ * no longer established or is currently in the process of being
+ * established.
+ * - When registering services, use the following algorithm:
+ *   - Create a new entry group (i.e. avahi_entry_group_new())
+ *   - Add your service(s)/additional RRs/subtypes (e.g. avahi_entry_group_add_service())
+ *   - Commit the entry group (i.e. avahi_entry_group_commit())
+ * - Subscribe to entry group state changes.
+ * - If the entry group enters AVAHI_ENTRY_GROUP_COLLISION state the
+ * services of the entry group are automatically removed from the
+ * server. You may immediately add your services back to the entry
+ * group (but with new names, perhaps using
+ * avahi_alternative_service_name()) and commit again. Please do not
+ * free the entry group and create a new one. This would inhibit some
+ * traffic limiting algorithms in mDNS.
+ * - When you need to modify your services (i.e. change the TXT data
+ * or the port number), use the AVAHI_PUBLISH_UPDATE flag. Please do
+ * not free the entry group and create a new one. This would inhibit
+ * some traffic limiting algorithms in mDNS. When changing just the
+ * TXT data avahi_entry_group_update_txt() is a shortcut for
+ * AVAHI_PUBLISH_UPDATE. Please note that you cannot use
+ * AVAHI_PUBLISH_UPDATE when changing the service name! Renaming a
+ * DNS-SD service is identical to deleting and creating a new one, and
+ * that's exactly what you should do in that case. First call
+ * avahi_entry_group_reset() to remove it and then read it normally.
+ *
+ * \section good_browse How to Browse for Services
+ *
+ * - For normal applications you need to call avahi_service_browser_new()
+ * for the service type you want to browse for. Use
+ * avahi_service_resolver_new() to acquire service data for a service
+ * name.
+ * - You can use avahi_domain_browser_new() to get a list of announced
+ * browsing domains. Please note that not all domains whith services
+ * on the LAN are mandatorily announced.
+ * - There is no need to subscribe to server state changes.
+ *
+ * \section daemon_dies How to Write a Client That Can Deal with Daemon Restarts
+ *
+ * With Avahi it is possible to write client applications that can
+ * deal with Avahi daemon restarts. To accomplish that make sure to
+ * pass AVAHI_CLIENT_NO_FAIL to avahi_client_new()'s flags
+ * parameter. That way avahi_client_new() will succeed even when the
+ * daemon is not running. In that case the object will enter
+ * AVAHI_CLIENT_CONNECTING state. As soon as the daemon becomes
+ * available the object will enter one of the AVAHI_CLIENT_S_xxx
+ * states. Make sure to not create browsers or entry groups before the
+ * client object has entered one of those states. As usual you will be
+ * informed about state changes with the callback function supplied to
+ * avahi_client_new(). If the client is forced to disconnect from the
+ * server it will enter AVAHI_CLIENT_FAILURE state with
+ * avahi_client_errno() == AVAHI_ERR_DISCONNECTED. Free the
+ * AvahiClient object in that case (and all its associated objects
+ * such as entry groups and browser objects prior to that) and
+ * reconnect to the server anew - again with passing
+ * AVAHI_CLIENT_NO_FAIL to avahi_client_new().
+ *
+ * We encourage implementing this in all software where service
+ * discovery is not an integral part of application. e.g. use it in
+ * all kinds of background daemons, but not necessarily in software
+ * like iChat compatible IM software.
+ *
+ * For now AVAHI_CLIENT_NO_FAIL cannot deal with D-Bus daemon restarts.
+ *
+ * \section domains How to Deal Properly with Browsing Domains
+ *
+ * Due to the introduction of wide-area DNS-SD the correct handling of
+ * domains becomes more important for Avahi enabled applications. All
+ * applications that offer the user a list of services discovered with
+ * Avahi should offer some kind of editable drop down box where the
+ * user can either enter his own domain or select one of those offered
+ * by AvahiDomainBrowser. The default domain to browse should be the
+ * one returned by avahi_client_get_domain_name(). The list of domains
+ * returned by AvahiDomainBrowser is assembled by the browsing domains
+ * configured in the daemon's configuration file, the domains
+ * announced inside the default domain, the domains set with the
+ * environment variable $AVAHI_BROWSE_DOMAINS (colon-seperated) on the
+ * client side and the domains set in the XDG configuration file
+ * ~/.config/avahi/browse-domains on the client side (seperated by
+ * newlines). File managers offering some kind of "Network
+ * Neighborhood" folder should show the entries of the default domain
+ * right inside that and offer subfolders for the browsing domains
+ * returned by AvahiDomainBrowser.
+ */
+
+AVAHI_C_DECL_BEGIN
+
+/** @{ \name States */
+
+/** States of a server object */
+typedef enum {
+    AVAHI_SERVER_INVALID,          /**< Invalid state (initial) */
+    AVAHI_SERVER_REGISTERING,      /**< Host RRs are being registered */
+    AVAHI_SERVER_RUNNING,          /**< All host RRs have been established */
+    AVAHI_SERVER_COLLISION,        /**< There is a collision with a host RR. All host RRs have been withdrawn, the user should set a new host name via avahi_server_set_host_name() */
+    AVAHI_SERVER_FAILURE           /**< Some fatal failure happened, the server is unable to proceed */
+} AvahiServerState;
+
+/** States of an entry group object */
+typedef enum {
+    AVAHI_ENTRY_GROUP_UNCOMMITED,    /**< The group has not yet been commited, the user must still call avahi_entry_group_commit() */
+    AVAHI_ENTRY_GROUP_REGISTERING,   /**< The entries of the group are currently being registered */
+    AVAHI_ENTRY_GROUP_ESTABLISHED,   /**< The entries have successfully been established */
+    AVAHI_ENTRY_GROUP_COLLISION,     /**< A name collision for one of the entries in the group has been detected, the entries have been withdrawn */
+    AVAHI_ENTRY_GROUP_FAILURE        /**< Some kind of failure happened, the entries have been withdrawn */
+} AvahiEntryGroupState;
+
+/** @} */
+
+/** @{ \name Flags */
+
+/** Some flags for publishing functions */
+typedef enum {
+    AVAHI_PUBLISH_UNIQUE = 1,           /**< For raw records: The RRset is intended to be unique */
+    AVAHI_PUBLISH_NO_PROBE = 2,         /**< For raw records: Though the RRset is intended to be unique no probes shall be sent */
+    AVAHI_PUBLISH_NO_ANNOUNCE = 4,      /**< For raw records: Do not announce this RR to other hosts */
+    AVAHI_PUBLISH_ALLOW_MULTIPLE = 8,   /**< For raw records: Allow multiple local records of this type, even if they are intended to be unique */
+/** \cond fulldocs */
+    AVAHI_PUBLISH_NO_REVERSE = 16,      /**< For address records: don't create a reverse (PTR) entry */
+    AVAHI_PUBLISH_NO_COOKIE = 32,       /**< For service records: do not implicitly add the local service cookie to TXT data */
+/** \endcond */
+    AVAHI_PUBLISH_UPDATE = 64,          /**< Update existing records instead of adding new ones */
+/** \cond fulldocs */
+    AVAHI_PUBLISH_USE_WIDE_AREA = 128,  /**< Register the record using wide area DNS (i.e. unicast DNS update) */
+    AVAHI_PUBLISH_USE_MULTICAST = 256   /**< Register the record using multicast DNS */
+/** \endcond */
+} AvahiPublishFlags;
+
+/** Some flags for lookup functions */
+typedef enum {
+/** \cond fulldocs */
+    AVAHI_LOOKUP_USE_WIDE_AREA = 1,    /**< Force lookup via wide area DNS */
+    AVAHI_LOOKUP_USE_MULTICAST = 2,    /**< Force lookup via multicast DNS */
+/** \endcond */
+    AVAHI_LOOKUP_NO_TXT = 4,           /**< When doing service resolving, don't lookup TXT record */
+    AVAHI_LOOKUP_NO_ADDRESS = 8        /**< When doing service resolving, don't lookup A/AAAA record */
+} AvahiLookupFlags;
+
+/** Some flags for lookup callback functions */
+typedef enum {
+    AVAHI_LOOKUP_RESULT_CACHED = 1,         /**< This response originates from the cache */
+    AVAHI_LOOKUP_RESULT_WIDE_AREA = 2,      /**< This response originates from wide area DNS */
+    AVAHI_LOOKUP_RESULT_MULTICAST = 4,      /**< This response originates from multicast DNS */
+    AVAHI_LOOKUP_RESULT_LOCAL = 8,          /**< This record/service resides on and was announced by the local host. Only available in service and record browsers and only on AVAHI_BROWSER_NEW. */
+    AVAHI_LOOKUP_RESULT_OUR_OWN = 16,       /**< This service belongs to the same local client as the browser object. Only available in avahi-client, and only for service browsers and only on AVAHI_BROWSER_NEW. */
+    AVAHI_LOOKUP_RESULT_STATIC = 32         /**< The returned data has been defined statically by some configuration option */
+} AvahiLookupResultFlags;
+
+/** @} */
+
+/** @{ \name Events */
+
+/** Type of callback event when browsing */
+typedef enum {
+    AVAHI_BROWSER_NEW,               /**< The object is new on the network */
+    AVAHI_BROWSER_REMOVE,            /**< The object has been removed from the network */
+    AVAHI_BROWSER_CACHE_EXHAUSTED,   /**< One-time event, to notify the user that all entries from the caches have been sent */
+    AVAHI_BROWSER_ALL_FOR_NOW,       /**< One-time event, to notify the user that more records will probably not show up in the near future, i.e. all cache entries have been read and all static servers been queried */
+    AVAHI_BROWSER_FAILURE            /**< Browsing failed due to some reason which can be retrieved using avahi_server_errno()/avahi_client_errno() */
+} AvahiBrowserEvent;
+
+/** Type of callback event when resolving */
+typedef enum {
+    AVAHI_RESOLVER_FOUND,          /**< RR found, resolving successful */
+    AVAHI_RESOLVER_FAILURE         /**< Resolving failed due to some reason which can be retrieved using avahi_server_errno()/avahi_client_errno() */
+} AvahiResolverEvent;
+
+/** @} */
+
+/** @{ \name Other definitions */
+
+/** The type of domain to browse for */
+typedef enum {
+    AVAHI_DOMAIN_BROWSER_BROWSE,            /**< Browse for a list of available browsing domains */
+    AVAHI_DOMAIN_BROWSER_BROWSE_DEFAULT,    /**< Browse for the default browsing domain */
+    AVAHI_DOMAIN_BROWSER_REGISTER,          /**< Browse for a list of available registering domains */
+    AVAHI_DOMAIN_BROWSER_REGISTER_DEFAULT,  /**< Browse for the default registering domain */
+    AVAHI_DOMAIN_BROWSER_BROWSE_LEGACY,     /**< Legacy browse domain - see DNS-SD spec for more information */
+    AVAHI_DOMAIN_BROWSER_MAX
+} AvahiDomainBrowserType;
+
+/** @} */
+
+/** \cond fulldocs */
+/** For every service a special TXT item is implicitly added, which
+ * contains a random cookie which is private to the local daemon. This
+ * can be used by clients to determine if two services on two
+ * different subnets are effectively the same. */
+#define AVAHI_SERVICE_COOKIE "org.freedesktop.Avahi.cookie"
+
+/** In invalid cookie as special value */
+#define AVAHI_SERVICE_COOKIE_INVALID (0)
+/** \endcond fulldocs */
+
+/** @{ \name DNS RR definitions */
+
+/** DNS record types, see RFC 1035 */
+enum {
+    AVAHI_DNS_TYPE_A = 0x01,
+    AVAHI_DNS_TYPE_NS = 0x02,
+    AVAHI_DNS_TYPE_CNAME = 0x05,
+    AVAHI_DNS_TYPE_SOA = 0x06,
+    AVAHI_DNS_TYPE_PTR = 0x0C,
+    AVAHI_DNS_TYPE_HINFO = 0x0D,
+    AVAHI_DNS_TYPE_MX = 0x0F,
+    AVAHI_DNS_TYPE_TXT = 0x10,
+    AVAHI_DNS_TYPE_AAAA = 0x1C,
+    AVAHI_DNS_TYPE_SRV = 0x21
+};
+
+/** DNS record classes, see RFC 1035 */
+enum {
+    AVAHI_DNS_CLASS_IN = 0x01          /**< Probably the only class we will ever use */
+};
+
+/** @} */
+
+/** The default TTL for RRs which contain a host name of some kind. */
+#define AVAHI_DEFAULT_TTL_HOST_NAME (120)
+
+/** The default TTL for all other records. */
+#define AVAHI_DEFAULT_TTL (75*60)
+
+AVAHI_C_DECL_END
+
+#endif
diff --git a/avahi-0.6.31/avahi-common/domain-test.c b/avahi-0.6.31/avahi-common/domain-test.c
new file mode 100644
index 0000000..cf763ec
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/domain-test.c
@@ -0,0 +1,123 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+#include "domain.h"
+#include "malloc.h"
+
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
+    char *s;
+    char t[256], r[256];
+    const char *p;
+    size_t size;
+    char name[64], type[AVAHI_DOMAIN_NAME_MAX], domain[AVAHI_DOMAIN_NAME_MAX];
+
+    printf("%s\n", s = avahi_normalize_name_strdup("foo.foo\\046."));
+    avahi_free(s);
+
+    printf("%s\n", s = avahi_normalize_name_strdup("foo.foo\\.foo."));
+    avahi_free(s);
+
+
+    printf("%s\n", s = avahi_normalize_name_strdup("fo\\\\o\\..f oo."));
+    avahi_free(s);
+
+    printf("%i\n", avahi_domain_equal("\\065aa bbb\\.\\046cc.cc\\\\.dee.fff.", "Aaa BBB\\.\\.cc.cc\\\\.dee.fff"));
+    printf("%i\n", avahi_domain_equal("A", "a"));
+
+    printf("%i\n", avahi_domain_equal("a", "aaa"));
+
+    printf("%u = %u\n", avahi_domain_hash("ccc\\065aa.aa\\.b\\\\."), avahi_domain_hash("cccAaa.aa\\.b\\\\"));
+
+
+    avahi_service_name_join(t, sizeof(t), "foo.foo.foo \\.", "_http._tcp", "test.local");
+    printf("<%s>\n", t);
+
+    avahi_service_name_split(t, name, sizeof(name), type, sizeof(type), domain, sizeof(domain));
+    printf("name: <%s>; type: <%s>; domain <%s>\n", name, type, domain);
+
+    avahi_service_name_join(t, sizeof(t), NULL, "_http._tcp", "one.two\\. .local");
+    printf("<%s>\n", t);
+
+    avahi_service_name_split(t, NULL, 0, type, sizeof(type), domain, sizeof(domain));
+    printf("name: <>; type: <%s>; domain <%s>\n", type, domain);
+
+
+    p = "--:---\\\\\\123\\065_äöü\\064\\.\\\\sjöödfhh.sdfjhskjdf";
+    printf("unescaped: <%s>, rest: %s\n", avahi_unescape_label(&p, t, sizeof(t)), p);
+
+    size = sizeof(r);
+    s = r;
+
+    printf("escaped: <%s>\n", avahi_escape_label(t, strlen(t), &s, &size));
+
+    p = r;
+    printf("unescaped: <%s>\n", avahi_unescape_label(&p, t, sizeof(t)));
+
+    assert(avahi_is_valid_service_type_generic("_foo._bar._waldo"));
+    assert(!avahi_is_valid_service_type_strict("_foo._bar._waldo"));
+    assert(!avahi_is_valid_service_subtype("_foo._bar._waldo"));
+
+    assert(avahi_is_valid_service_type_generic("_foo._tcp"));
+    assert(avahi_is_valid_service_type_strict("_foo._tcp"));
+    assert(!avahi_is_valid_service_subtype("_foo._tcp"));
+
+    assert(!avahi_is_valid_service_type_generic("_foo._bar.waldo"));
+    assert(!avahi_is_valid_service_type_strict("_foo._bar.waldo"));
+    assert(!avahi_is_valid_service_subtype("_foo._bar.waldo"));
+
+    assert(!avahi_is_valid_service_type_generic(""));
+    assert(!avahi_is_valid_service_type_strict(""));
+    assert(!avahi_is_valid_service_subtype(""));
+
+    assert(avahi_is_valid_service_type_generic("_foo._sub._bar._tcp"));
+    assert(!avahi_is_valid_service_type_strict("_foo._sub._bar._tcp"));
+    assert(avahi_is_valid_service_subtype("_foo._sub._bar._tcp"));
+
+    printf("%s\n", avahi_get_type_from_subtype("_foo._sub._bar._tcp"));
+
+    assert(!avahi_is_valid_host_name("sf.ooo."));
+    assert(avahi_is_valid_host_name("sfooo."));
+    assert(avahi_is_valid_host_name("sfooo"));
+
+    assert(avahi_is_valid_domain_name("."));
+    assert(avahi_is_valid_domain_name(""));
+
+    assert(avahi_normalize_name(".", t, sizeof(t)));
+    assert(avahi_normalize_name("", t, sizeof(t)));
+
+    assert(!avahi_is_valid_fqdn("."));
+    assert(!avahi_is_valid_fqdn(""));
+    assert(!avahi_is_valid_fqdn("foo"));
+    assert(avahi_is_valid_fqdn("foo.bar"));
+    assert(avahi_is_valid_fqdn("foo.bar."));
+    assert(avahi_is_valid_fqdn("gnurz.foo.bar."));
+    assert(!avahi_is_valid_fqdn("192.168.50.1"));
+    assert(!avahi_is_valid_fqdn("::1"));
+    assert(!avahi_is_valid_fqdn(".192.168.50.1."));
+
+    return 0;
+}
diff --git a/avahi-0.6.31/avahi-common/domain.c b/avahi-0.6.31/avahi-common/domain.c
new file mode 100644
index 0000000..3b1ab68
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/domain.c
@@ -0,0 +1,609 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <limits.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <stdlib.h>
+#include <assert.h>
+
+#include "domain.h"
+#include "malloc.h"
+#include "error.h"
+#include "address.h"
+#include "utf8.h"
+
+/* Read the first label from string *name, unescape "\" and write it to dest */
+char *avahi_unescape_label(const char **name, char *dest, size_t size) {
+    unsigned i = 0;
+    char *d;
+
+    assert(dest);
+    assert(size > 0);
+    assert(name);
+
+    d = dest;
+
+    for (;;) {
+        if (i >= size)
+            return NULL;
+
+        if (**name == '.') {
+            (*name)++;
+            break;
+        }
+
+        if (**name == 0)
+            break;
+
+        if (**name == '\\') {
+            /* Escaped character */
+
+            (*name) ++;
+
+            if (**name == 0)
+                /* Ending NUL */
+                return NULL;
+
+            else if (**name == '\\' || **name == '.') {
+                /* Escaped backslash or dot */
+                *(d++) = *((*name) ++);
+                i++;
+            } else if (isdigit(**name)) {
+                int n;
+
+                /* Escaped literal ASCII character */
+
+                if (!isdigit(*(*name+1)) || !isdigit(*(*name+2)))
+                    return NULL;
+
+                n = ((uint8_t) (**name - '0') * 100) + ((uint8_t) (*(*name+1) - '0') * 10) + ((uint8_t) (*(*name +2) - '0'));
+
+                if (n > 255 || n == 0)
+                    return NULL;
+
+                *(d++) = (char) n;
+                i++;
+
+                (*name) += 3;
+            } else
+                return NULL;
+
+        } else {
+
+            /* Normal character */
+
+            *(d++) = *((*name) ++);
+            i++;
+        }
+    }
+
+    assert(i < size);
+
+    *d = 0;
+
+    if (!avahi_utf8_valid(dest))
+        return NULL;
+
+    return dest;
+}
+
+/* Escape "\" and ".", append \0 */
+char *avahi_escape_label(const char* src, size_t src_length, char **ret_name, size_t *ret_size) {
+    char *r;
+
+    assert(src);
+    assert(ret_name);
+    assert(*ret_name);
+    assert(ret_size);
+    assert(*ret_size > 0);
+
+    r = *ret_name;
+
+    while (src_length > 0) {
+        if (*src == '.' || *src == '\\') {
+
+            /* Dot or backslash */
+
+            if (*ret_size < 3)
+                return NULL;
+
+            *((*ret_name) ++) = '\\';
+            *((*ret_name) ++) = *src;
+            (*ret_size) -= 2;
+
+        } else if (
+            *src == '_' ||
+            *src == '-' ||
+            (*src >= '0' && *src <= '9') ||
+            (*src >= 'a' && *src <= 'z') ||
+            (*src >= 'A' && *src <= 'Z')) {
+
+            /* Proper character */
+
+            if (*ret_size < 2)
+                return NULL;
+
+            *((*ret_name)++) = *src;
+            (*ret_size) --;
+
+        } else {
+
+            /* Everything else */
+
+            if (*ret_size < 5)
+                return NULL;
+
+            *((*ret_name) ++) = '\\';
+            *((*ret_name) ++) = '0' + (char)  ((uint8_t) *src / 100);
+            *((*ret_name) ++) = '0' + (char) (((uint8_t) *src / 10) % 10);
+            *((*ret_name) ++) = '0' + (char)  ((uint8_t) *src % 10);
+
+            (*ret_size) -= 4;
+        }
+
+        src_length --;
+        src++;
+    }
+
+    **ret_name = 0;
+
+    return r;
+}
+
+char *avahi_normalize_name(const char *s, char *ret_s, size_t size) {
+    int empty = 1;
+    char *r;
+
+    assert(s);
+    assert(ret_s);
+    assert(size > 0);
+
+    r = ret_s;
+    *ret_s = 0;
+
+    while (*s) {
+        char label[AVAHI_LABEL_MAX];
+
+        if (!(avahi_unescape_label(&s, label, sizeof(label))))
+            return NULL;
+
+        if (label[0] == 0) {
+
+            if (*s == 0 && empty)
+                return ret_s;
+
+            return NULL;
+        }
+
+        if (!empty) {
+            if (size < 1)
+                return NULL;
+
+            *(r++) = '.';
+            size--;
+
+        } else
+            empty = 0;
+
+        avahi_escape_label(label, strlen(label), &r, &size);
+    }
+
+    return ret_s;
+}
+
+char *avahi_normalize_name_strdup(const char *s) {
+    char t[AVAHI_DOMAIN_NAME_MAX];
+    assert(s);
+
+    if (!(avahi_normalize_name(s, t, sizeof(t))))
+        return NULL;
+
+    return avahi_strdup(t);
+}
+
+int avahi_domain_equal(const char *a, const char *b) {
+    assert(a);
+    assert(b);
+
+    if (a == b)
+        return 1;
+
+    for (;;) {
+        char ca[AVAHI_LABEL_MAX], cb[AVAHI_LABEL_MAX], *r;
+
+        r = avahi_unescape_label(&a, ca, sizeof(ca));
+        assert(r);
+        r = avahi_unescape_label(&b, cb, sizeof(cb));
+        assert(r);
+
+        if (strcasecmp(ca, cb))
+            return 0;
+
+        if (!*a && !*b)
+            return 1;
+    }
+
+    return 1;
+}
+
+int avahi_is_valid_service_type_generic(const char *t) {
+    assert(t);
+
+    if (strlen(t) >= AVAHI_DOMAIN_NAME_MAX || !*t)
+        return 0;
+
+    do {
+        char label[AVAHI_LABEL_MAX];
+
+        if (!(avahi_unescape_label(&t, label, sizeof(label))))
+            return 0;
+
+        if (strlen(label) <= 2 || label[0] != '_')
+            return 0;
+
+    } while (*t);
+
+    return 1;
+}
+
+int avahi_is_valid_service_type_strict(const char *t) {
+    char label[AVAHI_LABEL_MAX];
+    assert(t);
+
+    if (strlen(t) >= AVAHI_DOMAIN_NAME_MAX || !*t)
+        return 0;
+
+    /* Application name */
+
+    if (!(avahi_unescape_label(&t, label, sizeof(label))))
+        return 0;
+
+    if (strlen(label) <= 2 || label[0] != '_')
+        return 0;
+
+    if (!*t)
+        return 0;
+
+    /* _tcp or _udp boilerplate */
+
+    if (!(avahi_unescape_label(&t, label, sizeof(label))))
+        return 0;
+
+    if (strcasecmp(label, "_tcp") && strcasecmp(label, "_udp"))
+        return 0;
+
+    if (*t)
+        return 0;
+
+    return 1;
+}
+
+const char *avahi_get_type_from_subtype(const char *t) {
+    char label[AVAHI_LABEL_MAX];
+    const char *ret;
+    assert(t);
+
+    if (strlen(t) >= AVAHI_DOMAIN_NAME_MAX || !*t)
+        return NULL;
+
+    /* Subtype name */
+
+    if (!(avahi_unescape_label(&t, label, sizeof(label))))
+        return NULL;
+
+    if (strlen(label) <= 2 || label[0] != '_')
+        return NULL;
+
+    if (!*t)
+        return NULL;
+
+    /* String "_sub" */
+
+    if (!(avahi_unescape_label(&t, label, sizeof(label))))
+        return NULL;
+
+    if (strcasecmp(label, "_sub"))
+        return NULL;
+
+    if (!*t)
+        return NULL;
+
+    ret = t;
+
+    /* Application name */
+
+    if (!(avahi_unescape_label(&t, label, sizeof(label))))
+        return NULL;
+
+    if (strlen(label) <= 2 || label[0] != '_')
+        return NULL;
+
+    if (!*t)
+        return NULL;
+
+    /* _tcp or _udp boilerplate */
+
+    if (!(avahi_unescape_label(&t, label, sizeof(label))))
+        return NULL;
+
+    if (strcasecmp(label, "_tcp") && strcasecmp(label, "_udp"))
+        return NULL;
+
+    if (*t)
+        return NULL;
+
+    return ret;
+}
+
+int avahi_is_valid_service_subtype(const char *t) {
+    assert(t);
+
+    return !!avahi_get_type_from_subtype(t);
+}
+
+int avahi_is_valid_domain_name(const char *t) {
+    int is_first = 1;
+    assert(t);
+
+    if (strlen(t) >= AVAHI_DOMAIN_NAME_MAX)
+        return 0;
+
+    do {
+        char label[AVAHI_LABEL_MAX];
+
+        if (!(avahi_unescape_label(&t, label, sizeof(label))))
+            return 0;
+
+        /* Explicitly allow the root domain name */
+        if (is_first && label[0] == 0 && *t == 0)
+            return 1;
+
+        is_first = 0;
+
+        if (label[0] == 0)
+            return 0;
+
+    } while (*t);
+
+    return 1;
+}
+
+int avahi_is_valid_service_name(const char *t) {
+    assert(t);
+
+    if (strlen(t) >= AVAHI_LABEL_MAX || !*t)
+        return 0;
+
+    return 1;
+}
+
+int avahi_is_valid_host_name(const char *t) {
+    char label[AVAHI_LABEL_MAX];
+    assert(t);
+
+    if (strlen(t) >= AVAHI_DOMAIN_NAME_MAX || !*t)
+        return 0;
+
+    if (!(avahi_unescape_label(&t, label, sizeof(label))))
+        return 0;
+
+    if (strlen(label) < 1)
+        return 0;
+
+    if (*t)
+        return 0;
+
+    return 1;
+}
+
+unsigned avahi_domain_hash(const char *s) {
+    unsigned hash = 0;
+
+    while (*s) {
+        char c[AVAHI_LABEL_MAX], *p, *r;
+
+        r = avahi_unescape_label(&s, c, sizeof(c));
+        assert(r);
+
+        for (p = c; *p; p++)
+            hash = 31 * hash + tolower(*p);
+    }
+
+    return hash;
+}
+
+int avahi_service_name_join(char *p, size_t size, const char *name, const char *type, const char *domain) {
+    char escaped_name[AVAHI_LABEL_MAX*4];
+    char normalized_type[AVAHI_DOMAIN_NAME_MAX];
+    char normalized_domain[AVAHI_DOMAIN_NAME_MAX];
+
+    assert(p);
+
+    /* Validity checks */
+
+    if ((name && !avahi_is_valid_service_name(name)))
+        return AVAHI_ERR_INVALID_SERVICE_NAME;
+
+    if (!avahi_is_valid_service_type_generic(type))
+        return AVAHI_ERR_INVALID_SERVICE_TYPE;
+
+    if (!avahi_is_valid_domain_name(domain))
+        return AVAHI_ERR_INVALID_DOMAIN_NAME;
+
+    /* Preparation */
+
+    if (name) {
+        size_t l = sizeof(escaped_name);
+        char *e = escaped_name, *r;
+        r = avahi_escape_label(name, strlen(name), &e, &l);
+        assert(r);
+    }
+
+    if (!(avahi_normalize_name(type, normalized_type, sizeof(normalized_type))))
+        return AVAHI_ERR_INVALID_SERVICE_TYPE;
+
+    if (!(avahi_normalize_name(domain, normalized_domain, sizeof(normalized_domain))))
+        return AVAHI_ERR_INVALID_DOMAIN_NAME;
+
+    /* Concatenation */
+
+    snprintf(p, size, "%s%s%s.%s", name ? escaped_name : "", name ? "." : "", normalized_type, normalized_domain);
+
+    return AVAHI_OK;
+}
+
+#ifndef HAVE_STRLCPY
+
+static size_t strlcpy(char *dest, const char *src, size_t n) {
+    assert(dest);
+    assert(src);
+
+    if (n > 0) {
+        strncpy(dest, src, n-1);
+        dest[n-1] = 0;
+    }
+
+    return strlen(src);
+}
+
+#endif
+
+int avahi_service_name_split(const char *p, char *name, size_t name_size, char *type, size_t type_size, char *domain, size_t domain_size) {
+    enum {
+        NAME,
+        TYPE,
+        DOMAIN
+    } state;
+    int type_empty = 1, domain_empty = 1;
+
+    assert(p);
+    assert(type);
+    assert(type_size > 0);
+    assert(domain);
+    assert(domain_size > 0);
+
+    if (name) {
+        assert(name_size > 0);
+        *name = 0;
+        state = NAME;
+    } else
+        state = TYPE;
+
+    *type = *domain = 0;
+
+    while (*p) {
+        char buf[64];
+
+        if (!(avahi_unescape_label(&p, buf, sizeof(buf))))
+            return -1;
+
+        switch (state) {
+            case NAME:
+                strlcpy(name, buf, name_size);
+                state = TYPE;
+                break;
+
+            case TYPE:
+
+                if (buf[0] == '_') {
+
+                    if (!type_empty) {
+                        if (!type_size)
+                            return AVAHI_ERR_NO_MEMORY;
+
+                        *(type++) = '.';
+                        type_size --;
+
+                    } else
+                        type_empty = 0;
+
+                    if (!(avahi_escape_label(buf, strlen(buf), &type, &type_size)))
+                        return AVAHI_ERR_NO_MEMORY;
+
+                    break;
+                }
+
+                state = DOMAIN;
+                /* fall through */
+
+            case DOMAIN:
+
+                if (!domain_empty) {
+                    if (!domain_size)
+                        return AVAHI_ERR_NO_MEMORY;
+
+                    *(domain++) = '.';
+                    domain_size --;
+                } else
+                    domain_empty = 0;
+
+                if (!(avahi_escape_label(buf, strlen(buf), &domain, &domain_size)))
+                    return AVAHI_ERR_NO_MEMORY;
+
+                break;
+        }
+    }
+
+    return 0;
+}
+
+int avahi_is_valid_fqdn(const char *t) {
+    char label[AVAHI_LABEL_MAX];
+    char normalized[AVAHI_DOMAIN_NAME_MAX];
+    const char *k = t;
+    AvahiAddress a;
+    assert(t);
+
+    if (strlen(t) >= AVAHI_DOMAIN_NAME_MAX)
+        return 0;
+
+    if (!avahi_is_valid_domain_name(t))
+        return 0;
+
+    /* Check if there are at least two labels*/
+    if (!(avahi_unescape_label(&k, label, sizeof(label))))
+        return 0;
+
+    if (label[0] == 0 || !k)
+        return 0;
+
+    if (!(avahi_unescape_label(&k, label, sizeof(label))))
+        return 0;
+
+    if (label[0] == 0 || !k)
+        return 0;
+
+    /* Make sure that the name is not an IP address */
+    if (!(avahi_normalize_name(t, normalized, sizeof(normalized))))
+        return 0;
+
+    if (avahi_address_parse(normalized, AVAHI_PROTO_UNSPEC, &a))
+        return 0;
+
+    return 1;
+}
diff --git a/avahi-0.6.31/avahi-common/domain.h b/avahi-0.6.31/avahi-common/domain.h
new file mode 100644
index 0000000..a0dcd0f
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/domain.h
@@ -0,0 +1,129 @@
+#ifndef foodomainhfoo
+#define foodomainhfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+/** \file domain.h Domain name handling functions */
+
+#include <inttypes.h>
+#include <sys/types.h>
+
+#include <avahi-common/cdecl.h>
+
+AVAHI_C_DECL_BEGIN
+
+/** The maximum length of a a fully escaped domain name C string. This
+ * is calculated like this: RFC1034 mandates maximum length of FQDNs
+ * is 255. The maximum label length is 63. To minimize the number of
+ * (non-escaped) dots, we comprise our maximum-length domain name of
+ * four labels á 63 characters plus three inner dots. Escaping the
+ * four labels quadruples their length at maximum. An escaped domain
+ * name has the therefore the maximum length of 63*4*4+3=1011. A
+ * trailing NUL and perhaps two unnecessary dots leading and trailing
+ * the string brings us to 1014. */
+#define AVAHI_DOMAIN_NAME_MAX 1014
+
+/** Maximum size of an unescaped label */
+#define AVAHI_LABEL_MAX 64
+
+/** @{ \name Normalization */
+
+/** Normalize a domain name into canonical form. This drops trailing
+ * dots and removes useless backslash escapes. */
+char *avahi_normalize_name(const char *s, char *ret_s, size_t size);
+
+/** Normalize a domain name into canonical form. This drops trailing
+ * dots and removes useless backslash escapes. avahi_free() the
+ * result! */
+char *avahi_normalize_name_strdup(const char *s);
+
+/** @} */
+
+/** @{ \name Comparison */
+
+/** Return 1 when the specified domain names are equal, 0 otherwise */
+int avahi_domain_equal(const char *a, const char *b);
+
+/** Return some kind of hash value for the domain, useful for using domains as hash table keys. */
+unsigned avahi_domain_hash(const char *name);
+
+/** @} */
+
+/** @{ \name Escaping */
+
+/** Read the first label from the textual domain name *name, unescape
+ * it and write it to dest, *name is changed to point to the next label*/
+char *avahi_unescape_label(const char **name, char *dest, size_t size);
+
+/** Escape the domain name in *src and write it to *ret_name */
+char *avahi_escape_label(const char* src, size_t src_length, char **ret_name, size_t *ret_size);
+
+/** @} */
+
+/** @{ \name Validity Checks */
+
+/** Return 1 when the specified string contains a valid generic DNS-SD
+ * service type (i.e. a series of words starting with "_"), 0
+ * otherwise */
+int avahi_is_valid_service_type_generic(const char *t);
+
+/** Return 1 when the specified string contains a valid strict DNS-SD
+ * service type (i.e. consisting of only two words, the latter being
+ * either _udp or _tcp), 0 otherwise */
+int avahi_is_valid_service_type_strict(const char *t);
+
+/** Return 1 when the specified string contains a valid DNS-SD service
+ * subtype, 0 otherwise */
+int avahi_is_valid_service_subtype(const char *t);
+
+/** Return 1 when the specified string contains a valid domain name, 0 otherwise */
+int avahi_is_valid_domain_name(const char *t);
+
+/** Return 1 when the specified string contains a valid DNS-SD service name, 0 otherwise */
+int avahi_is_valid_service_name(const char *t);
+
+/** Return 1 when the specified string contains a valid non-FQDN host name (i.e. without dots), 0 otherwise */
+int avahi_is_valid_host_name(const char *t);
+
+/** Return 1 when the specified string contains a valid FQDN host name (i.e. with more than one label and non-numerical), 0 otherwise. \since 0.6.9 */
+int avahi_is_valid_fqdn(const char *t);
+
+/** @} */
+
+/** @{ \name DNS-SD service name handling */
+
+/** Construct a valid complete DNS-SD service name from a name, a type and a domain */
+int avahi_service_name_join(char *p, size_t size, const char *name, const char *type, const char *domain);
+
+/** Split a full service name into name, type and domain */
+int avahi_service_name_split(const char *p, char *name, size_t name_size, char *type, size_t type_size, char *domain, size_t domain_size);
+
+/** @} */
+
+/** @{ \name DNS-SD Subtype handling */
+
+/** Return a pointer to the type section of a subtype i.e. _foo._sub._bar._tcp => _bar._tcp */
+const char *avahi_get_type_from_subtype(const char *t);
+
+/** @} */
+
+AVAHI_C_DECL_END
+
+#endif
diff --git a/avahi-0.6.31/avahi-common/error.c b/avahi-0.6.31/avahi-common/error.c
new file mode 100644
index 0000000..b0b66ea
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/error.c
@@ -0,0 +1,97 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+ ***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "error.h"
+#include "i18n.h"
+
+const char *avahi_strerror(int error) {
+
+    const char * const msg[- AVAHI_ERR_MAX] = {
+        N_("OK"),
+        N_("Operation failed"),
+        N_("Bad state"),
+        N_("Invalid host name"),
+        N_("Invalid domain name"),
+        N_("No suitable network protocol available"),
+        N_("Invalid DNS TTL"),
+        N_("Resource record key is pattern"),
+        N_("Local name collision"),
+        N_("Invalid record"),
+
+        N_("Invalid service name"),
+        N_("Invalid service type"),
+        N_("Invalid port number"),
+        N_("Invalid record key"),
+        N_("Invalid address"),
+        N_("Timeout reached"),
+        N_("Too many clients"),
+        N_("Too many objects"),
+        N_("Too many entries"),
+        N_("OS Error"),
+
+        N_("Access denied"),
+        N_("Invalid operation"),
+        N_("An unexpected D-Bus error occured"),
+        N_("Daemon connection failed"),
+        N_("Memory exhausted"),
+        N_("The object passed in was not valid"),
+        N_("Daemon not running"),
+        N_("Invalid interface index"),
+        N_("Invalid protocol specification"),
+        N_("Invalid flags"),
+
+        N_("Not found"),
+        N_("Invalid configuration"),
+        N_("Version mismatch"),
+        N_("Invalid service subtype"),
+        N_("Invalid packet"),
+        N_("Invalid DNS return code"),
+        N_("DNS failure: FORMERR"),
+        N_("DNS failure: SERVFAIL"),
+        N_("DNS failure: NXDOMAIN"),
+        N_("DNS failure: NOTIMP"),
+
+        N_("DNS failure: REFUSED"),
+        N_("DNS failure: YXDOMAIN"),
+        N_("DNS failure: YXRRSET"),
+        N_("DNS failure: NXRRSET"),
+        N_("DNS failure: NOTAUTH"),
+        N_("DNS failure: NOTZONE"),
+        N_("Invalid RDATA"),
+        N_("Invalid DNS type"),
+        N_("Invalid DNS class"),
+        N_("Not supported"),
+
+        N_("Not permitted"),
+        N_("Invalid argument"),
+        N_("Is empty"),
+        N_("The requested operation is invalid because redundant")
+    };
+
+    avahi_init_i18n();
+
+    if (-error < 0 || -error >= -AVAHI_ERR_MAX)
+        return _("Invalid Error Code");
+
+    return _(msg[-error]);
+}
diff --git a/avahi-0.6.31/avahi-common/error.h b/avahi-0.6.31/avahi-common/error.h
new file mode 100644
index 0000000..392aaf5
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/error.h
@@ -0,0 +1,107 @@
+#ifndef fooerrorhfoo
+#define fooerrorhfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+/** \file error.h Error codes and auxiliary functions */
+
+#include <avahi-common/cdecl.h>
+
+AVAHI_C_DECL_BEGIN
+
+/** Error codes used by avahi */
+enum {
+    AVAHI_OK = 0,                            /**< OK */
+    AVAHI_ERR_FAILURE = -1,                  /**< Generic error code */
+    AVAHI_ERR_BAD_STATE = -2,                /**< Object was in a bad state */
+    AVAHI_ERR_INVALID_HOST_NAME = -3,        /**< Invalid host name */
+    AVAHI_ERR_INVALID_DOMAIN_NAME = -4,      /**< Invalid domain name */
+    AVAHI_ERR_NO_NETWORK = -5,               /**< No suitable network protocol available */
+    AVAHI_ERR_INVALID_TTL = -6,              /**< Invalid DNS TTL */
+    AVAHI_ERR_IS_PATTERN = -7,               /**< RR key is pattern */
+    AVAHI_ERR_COLLISION = -8,                /**< Name collision */
+    AVAHI_ERR_INVALID_RECORD = -9,           /**< Invalid RR */
+
+    AVAHI_ERR_INVALID_SERVICE_NAME = -10,    /**< Invalid service name */
+    AVAHI_ERR_INVALID_SERVICE_TYPE = -11,    /**< Invalid service type */
+    AVAHI_ERR_INVALID_PORT = -12,            /**< Invalid port number */
+    AVAHI_ERR_INVALID_KEY = -13,             /**< Invalid key */
+    AVAHI_ERR_INVALID_ADDRESS = -14,         /**< Invalid address */
+    AVAHI_ERR_TIMEOUT = -15,                 /**< Timeout reached */
+    AVAHI_ERR_TOO_MANY_CLIENTS = -16,        /**< Too many clients */
+    AVAHI_ERR_TOO_MANY_OBJECTS = -17,        /**< Too many objects */
+    AVAHI_ERR_TOO_MANY_ENTRIES = -18,        /**< Too many entries */
+    AVAHI_ERR_OS = -19,                      /**< OS error */
+
+    AVAHI_ERR_ACCESS_DENIED = -20,           /**< Access denied */
+    AVAHI_ERR_INVALID_OPERATION = -21,       /**< Invalid operation */
+    AVAHI_ERR_DBUS_ERROR = -22,              /**< An unexpected D-Bus error occured */
+    AVAHI_ERR_DISCONNECTED = -23,            /**< Daemon connection failed */
+    AVAHI_ERR_NO_MEMORY = -24,               /**< Memory exhausted */
+    AVAHI_ERR_INVALID_OBJECT = -25,          /**< The object passed to this function was invalid */
+    AVAHI_ERR_NO_DAEMON = -26,               /**< Daemon not running */
+    AVAHI_ERR_INVALID_INTERFACE = -27,       /**< Invalid interface */
+    AVAHI_ERR_INVALID_PROTOCOL = -28,        /**< Invalid protocol */
+    AVAHI_ERR_INVALID_FLAGS = -29,           /**< Invalid flags */
+
+    AVAHI_ERR_NOT_FOUND = -30,               /**< Not found */
+    AVAHI_ERR_INVALID_CONFIG = -31,          /**< Configuration error */
+    AVAHI_ERR_VERSION_MISMATCH = -32,        /**< Verson mismatch */
+    AVAHI_ERR_INVALID_SERVICE_SUBTYPE = -33, /**< Invalid service subtype */
+    AVAHI_ERR_INVALID_PACKET = -34,          /**< Invalid packet */
+    AVAHI_ERR_INVALID_DNS_ERROR = -35,       /**< Invlaid DNS return code */
+    AVAHI_ERR_DNS_FORMERR = -36,             /**< DNS Error: Form error */
+    AVAHI_ERR_DNS_SERVFAIL = -37,            /**< DNS Error: Server Failure */
+    AVAHI_ERR_DNS_NXDOMAIN = -38,            /**< DNS Error: No such domain */
+    AVAHI_ERR_DNS_NOTIMP = -39,              /**< DNS Error: Not implemented */
+
+    AVAHI_ERR_DNS_REFUSED = -40,             /**< DNS Error: Operation refused */
+    AVAHI_ERR_DNS_YXDOMAIN = -41,
+    AVAHI_ERR_DNS_YXRRSET = -42,
+    AVAHI_ERR_DNS_NXRRSET = -43,
+    AVAHI_ERR_DNS_NOTAUTH = -44,             /**< DNS Error: Not authorized */
+    AVAHI_ERR_DNS_NOTZONE = -45,
+    AVAHI_ERR_INVALID_RDATA = -46,           /**< Invalid RDATA */
+    AVAHI_ERR_INVALID_DNS_CLASS = -47,       /**< Invalid DNS class */
+    AVAHI_ERR_INVALID_DNS_TYPE = -48,        /**< Invalid DNS type */
+    AVAHI_ERR_NOT_SUPPORTED = -49,           /**< Not supported */
+
+    AVAHI_ERR_NOT_PERMITTED = -50,           /**< Operation not permitted */
+    AVAHI_ERR_INVALID_ARGUMENT = -51,        /**< Invalid argument */
+    AVAHI_ERR_IS_EMPTY = -52,                /**< Is empty */
+    AVAHI_ERR_NO_CHANGE = -53,               /**< The requested operation is invalid because it is redundant */
+
+    /****
+     ****    IF YOU ADD A NEW ERROR CODE HERE, PLEASE DON'T FORGET TO ADD
+     ****    IT TO THE STRING ARRAY IN avahi_strerror() IN error.c AND
+     ****    TO THE ARRAY IN dbus.c AND FINALLY TO dbus.h!
+     ****
+     ****    Also remember to update the MAX value below.
+     ****/
+
+    AVAHI_ERR_MAX = -54
+};
+
+/** Return a human readable error string for the specified error code */
+const char *avahi_strerror(int error);
+
+AVAHI_C_DECL_END
+
+#endif
diff --git a/avahi-0.6.31/avahi-common/gccmacro.h b/avahi-0.6.31/avahi-common/gccmacro.h
new file mode 100644
index 0000000..4c97111
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/gccmacro.h
@@ -0,0 +1,74 @@
+#ifndef foogccmacrohfoo
+#define foogccmacrohfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+/** \file gccmacro.h Defines some macros for GCC extensions */
+
+#include <avahi-common/cdecl.h>
+
+AVAHI_C_DECL_BEGIN
+
+#if defined(__GNUC__) && (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 3)
+#define AVAHI_GCC_ALLOC_SIZE(x) __attribute__ ((__alloc_size__(x)))
+#define AVAHI_GCC_ALLOC_SIZE2(x,y) __attribute__ ((__alloc_size__(x,y)))
+#else
+/** Macro for usage of GCC's alloc_size attribute */
+#define AVAHI_GCC_ALLOC_SIZE(x)
+#define AVAHI_GCC_ALLOC_SIZE2(x,y)
+#endif
+
+#if defined(__GNUC__) && (__GNUC__ >= 4)
+#define AVAHI_GCC_SENTINEL __attribute__ ((sentinel))
+#else
+/** Macro for usage of GCC's sentinel compilation warnings */
+#define AVAHI_GCC_SENTINEL
+#endif
+
+#ifdef __GNUC__
+#define AVAHI_GCC_PRINTF_ATTR(a,b) __attribute__ ((format (printf, a, b)))
+#else
+/** Macro for usage of GCC's printf compilation warnings */
+#define AVAHI_GCC_PRINTF_ATTR(a,b)
+#endif
+
+/** Same as AVAHI_GCC_PRINTF_ATTR but hard coded to arguments 1 and 2 */
+#define AVAHI_GCC_PRINTF_ATTR12 AVAHI_GCC_PRINTF_ATTR(1,2)
+
+/** Same as AVAHI_GCC_PRINTF_ATTR but hard coded to arguments 2 and 3 */
+#define AVAHI_GCC_PRINTF_ATTR23 AVAHI_GCC_PRINTF_ATTR(2,3)
+
+#ifdef __GNUC__
+#define AVAHI_GCC_NORETURN __attribute__((noreturn))
+#else
+/** Macro for no-return functions */
+#define AVAHI_GCC_NORETURN
+#endif
+
+#ifdef __GNUC__
+#define AVAHI_GCC_UNUSED __attribute__ ((unused))
+#else
+/** Macro for not used parameter */
+#define AVAHI_GCC_UNUSED
+#endif
+
+AVAHI_C_DECL_END
+
+#endif
diff --git a/avahi-0.6.31/avahi-common/i18n.c b/avahi-0.6.31/avahi-common/i18n.c
new file mode 100644
index 0000000..51c93e4
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/i18n.c
@@ -0,0 +1,38 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+ ***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "i18n.h"
+
+void avahi_init_i18n(void) {
+
+    /* Not really thread safe, but this doesn't matter much since
+     * bindtextdomain is supposed to be idempotent anyway. */
+
+    static int done = 0;
+
+    if (!done) {
+        bindtextdomain(GETTEXT_PACKAGE, AVAHI_LOCALEDIR);
+        bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
+        done = 1;
+    }
+}
diff --git a/avahi-0.6.31/avahi-common/i18n.h b/avahi-0.6.31/avahi-common/i18n.h
new file mode 100644
index 0000000..2a613e5
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/i18n.h
@@ -0,0 +1,53 @@
+#ifndef fooi18nhfoo
+#define fooi18nhfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#if !defined(GETTEXT_PACKAGE)
+#error "Something is very wrong here, config.h needs to be included first"
+#endif
+
+#ifdef ENABLE_NLS
+
+#include <libintl.h>
+
+#define _(String) dgettext(GETTEXT_PACKAGE, String)
+#ifdef gettext_noop
+#define N_(String) gettext_noop(String)
+#else
+#define N_(String) (String)
+#endif
+
+#else /* NLS is disabled */
+
+#define _(String) (String)
+#define N_(String) (String)
+#define textdomain(String) (String)
+#define gettext(String) (String)
+#define dgettext(Domain,String) (String)
+#define dcgettext(Domain,String,Type) (String)
+#define bindtextdomain(Domain,Directory) (Domain)
+#define bind_textdomain_codeset(Domain,Codeset) (Codeset)
+
+#endif /* ENABLE_NLS */
+
+void avahi_init_i18n(void);
+
+#endif
diff --git a/avahi-0.6.31/avahi-common/llist.h b/avahi-0.6.31/avahi-common/llist.h
new file mode 100644
index 0000000..e37056d
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/llist.h
@@ -0,0 +1,75 @@
+#ifndef foollistfoo
+#define foollistfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+/** \file llist.h A simple macro based linked list implementation */
+
+#include <assert.h>
+
+#include <avahi-common/cdecl.h>
+
+AVAHI_C_DECL_BEGIN
+
+/** The head of the linked list. Use this in the structure that shall
+ * contain the head of the linked list */
+#define AVAHI_LLIST_HEAD(t,name) t *name
+
+/** The pointers in the linked list's items. Use this in the item structure */
+#define AVAHI_LLIST_FIELDS(t,name) t *name##_next, *name##_prev
+
+/** Initialize the list's head */
+#define AVAHI_LLIST_HEAD_INIT(t,head) do { (head) = NULL; } while(0)
+
+/** Initialize a list item */
+#define AVAHI_LLIST_INIT(t,name,item) do { \
+                               t *_item = (item); \
+                               assert(_item); \
+                               _item->name##_prev = _item->name##_next = NULL; \
+                               } while(0)
+
+/** Prepend an item to the list */
+#define AVAHI_LLIST_PREPEND(t,name,head,item) do { \
+                                        t **_head = &(head), *_item = (item); \
+                                        assert(_item); \
+                                        if ((_item->name##_next = *_head)) \
+                                           _item->name##_next->name##_prev = _item; \
+                                        _item->name##_prev = NULL; \
+                                        *_head = _item; \
+                                        } while (0)
+
+/** Remove an item from the list */
+#define AVAHI_LLIST_REMOVE(t,name,head,item) do { \
+                                    t **_head = &(head), *_item = (item); \
+                                    assert(_item); \
+                                    if (_item->name##_next) \
+                                       _item->name##_next->name##_prev = _item->name##_prev; \
+                                    if (_item->name##_prev) \
+                                       _item->name##_prev->name##_next = _item->name##_next; \
+                                    else {\
+                                       assert(*_head == _item); \
+                                       *_head = _item->name##_next; \
+                                    } \
+                                    _item->name##_next = _item->name##_prev = NULL; \
+                                    } while(0)
+
+AVAHI_C_DECL_END
+
+#endif
diff --git a/avahi-0.6.31/avahi-common/malloc.c b/avahi-0.6.31/avahi-common/malloc.c
new file mode 100644
index 0000000..23b13a9
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/malloc.c
@@ -0,0 +1,257 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#include "malloc.h"
+
+#ifndef va_copy
+#ifdef __va_copy
+#define va_copy(DEST,SRC) __va_copy((DEST),(SRC))
+#else
+#define va_copy(DEST,SRC) memcpy(&(DEST), &(SRC), sizeof(va_list))
+#endif
+#endif
+
+static const AvahiAllocator *allocator = NULL;
+
+static void oom(void) AVAHI_GCC_NORETURN;
+
+static void oom(void) {
+
+    static const char msg[] = "Out of memory, aborting ...\n";
+    const char *n = msg;
+
+    while (strlen(n) > 0) {
+        ssize_t r;
+
+        if ((r = write(2, n, strlen(n))) < 0)
+            break;
+
+        n += r;
+    }
+
+    abort();
+}
+
+/* Default implementation for avahi_malloc() */
+static void* xmalloc(size_t size) {
+    void *p;
+
+    if (size == 0)
+        return NULL;
+
+    if (!(p = malloc(size)))
+        oom();
+
+    return p;
+}
+
+/* Default implementation for avahi_realloc() */
+static void *xrealloc(void *p, size_t size) {
+
+    if (size == 0) {
+        free(p);
+        return NULL;
+    }
+
+    if (!(p = realloc(p, size)))
+        oom();
+
+    return p;
+}
+
+/* Default implementation for avahi_calloc() */
+static void *xcalloc(size_t nmemb, size_t size) {
+    void *p;
+
+    if (size == 0 || nmemb == 0)
+        return NULL;
+
+    if (!(p = calloc(nmemb, size)))
+        oom();
+
+    return p;
+}
+
+void *avahi_malloc(size_t size) {
+
+    if (size <= 0)
+        return NULL;
+
+    if (!allocator)
+        return xmalloc(size);
+
+    assert(allocator->malloc);
+    return allocator->malloc(size);
+}
+
+void *avahi_malloc0(size_t size) {
+    void *p;
+
+    if (size <= 0)
+        return NULL;
+
+    if (!allocator)
+        return xcalloc(1, size);
+
+    if (allocator->calloc)
+        return allocator->calloc(1, size);
+
+    assert(allocator->malloc);
+    if ((p = allocator->malloc(size)))
+        memset(p, 0, size);
+
+    return p;
+}
+
+void avahi_free(void *p) {
+
+    if (!p)
+        return;
+
+    if (!allocator) {
+        free(p);
+        return;
+    }
+
+    assert(allocator->free);
+    allocator->free(p);
+}
+
+void *avahi_realloc(void *p, size_t size) {
+
+    if (size == 0) {
+        avahi_free(p);
+        return NULL;
+    }
+
+    if (!allocator)
+        return xrealloc(p, size);
+
+    assert(allocator->realloc);
+    return allocator->realloc(p, size);
+}
+
+char *avahi_strdup(const char *s) {
+    char *r;
+    size_t size;
+
+    if (!s)
+        return NULL;
+
+    size = strlen(s);
+    if (!(r = avahi_malloc(size+1)))
+        return NULL;
+
+    memcpy(r, s, size+1);
+    return r;
+}
+
+char *avahi_strndup(const char *s, size_t max) {
+    char *r;
+    size_t size;
+    const char *p;
+
+    if (!s)
+        return NULL;
+
+    for (p = s, size = 0;
+         size < max && *p;
+         p++, size++);
+
+    if (!(r = avahi_new(char, size+1)))
+        return NULL;
+
+    memcpy(r, s, size);
+    r[size] = 0;
+    return r;
+}
+
+/* Change the allocator */
+void avahi_set_allocator(const AvahiAllocator *a) {
+    allocator = a;
+}
+
+char *avahi_strdup_vprintf(const char *fmt, va_list ap) {
+    size_t len = 80;
+    char *buf;
+
+    assert(fmt);
+
+    if (!(buf = avahi_malloc(len)))
+        return NULL;
+
+    for (;;) {
+        int n;
+        char *nbuf;
+        va_list ap2;
+
+        va_copy (ap2, ap);
+        n = vsnprintf(buf, len, fmt, ap2);
+        va_end (ap2);
+
+        if (n >= 0 && n < (int) len)
+            return buf;
+
+        if (n >= 0)
+            len = n+1;
+        else
+            len *= 2;
+
+        if (!(nbuf = avahi_realloc(buf, len))) {
+            avahi_free(buf);
+            return NULL;
+        }
+
+        buf = nbuf;
+    }
+}
+
+char *avahi_strdup_printf(const char *fmt, ... ) {
+    char *s;
+    va_list ap;
+
+    assert(fmt);
+
+    va_start(ap, fmt);
+    s = avahi_strdup_vprintf(fmt, ap);
+    va_end(ap);
+
+    return s;
+}
+
+void *avahi_memdup(const void *s, size_t l) {
+    void *p;
+    assert(s);
+
+    if (!(p = avahi_malloc(l)))
+        return NULL;
+
+    memcpy(p, s, l);
+    return p;
+}
diff --git a/avahi-0.6.31/avahi-common/malloc.h b/avahi-0.6.31/avahi-common/malloc.h
new file mode 100644
index 0000000..ffaac3f
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/malloc.h
@@ -0,0 +1,96 @@
+#ifndef foomallochfoo
+#define foomallochfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+/** \file malloc.h Memory allocation */
+
+#include <sys/types.h>
+#include <stdarg.h>
+#include <limits.h>
+#include <assert.h>
+
+#include <avahi-common/cdecl.h>
+#include <avahi-common/gccmacro.h>
+
+AVAHI_C_DECL_BEGIN
+
+/** Allocate some memory, just like the libc malloc() */
+void *avahi_malloc(size_t size) AVAHI_GCC_ALLOC_SIZE(1);
+
+/** Similar to avahi_malloc() but set the memory to zero */
+void *avahi_malloc0(size_t size) AVAHI_GCC_ALLOC_SIZE(1);
+
+/** Free some memory */
+void avahi_free(void *p);
+
+/** Similar to libc's realloc() */
+void *avahi_realloc(void *p, size_t size) AVAHI_GCC_ALLOC_SIZE(2);
+
+/** Internal helper for avahi_new() */
+static inline void* AVAHI_GCC_ALLOC_SIZE2(1,2) avahi_new_internal(unsigned n, size_t k) {
+    assert(n < INT_MAX/k);
+    return avahi_malloc(n*k);
+}
+
+/** Allocate n new structures of the specified type. */
+#define avahi_new(type, n) ((type*) avahi_new_internal((n), sizeof(type)))
+
+/** Internal helper for avahi_new0() */
+static inline void* AVAHI_GCC_ALLOC_SIZE2(1,2) avahi_new0_internal(unsigned n, size_t k) {
+    assert(n < INT_MAX/k);
+    return avahi_malloc0(n*k);
+}
+
+/** Same as avahi_new() but set the memory to zero */
+#define avahi_new0(type, n) ((type*) avahi_new0_internal((n), sizeof(type)))
+
+/** Just like libc's strdup() */
+char *avahi_strdup(const char *s);
+
+/** Just like libc's strndup() */
+char *avahi_strndup(const char *s, size_t l);
+
+/** Duplicate the given memory block into a new one allocated with avahi_malloc() */
+void *avahi_memdup(const void *s, size_t l) AVAHI_GCC_ALLOC_SIZE(2);
+
+/** Wraps allocator functions */
+typedef struct AvahiAllocator {
+    void* (*malloc)(size_t size) AVAHI_GCC_ALLOC_SIZE(1);
+    void (*free)(void *p);
+    void* (*realloc)(void *p, size_t size) AVAHI_GCC_ALLOC_SIZE(2);
+    void* (*calloc)(size_t nmemb, size_t size) AVAHI_GCC_ALLOC_SIZE2(1,2);   /**< May be NULL */
+} AvahiAllocator;
+
+/** Change the allocator. May be NULL to return to default (libc)
+ * allocators. The structure is not copied! */
+void avahi_set_allocator(const AvahiAllocator *a);
+
+/** Like sprintf() but store the result in a freshly allocated buffer. Free this with avahi_free() */
+char *avahi_strdup_printf(const char *fmt, ... ) AVAHI_GCC_PRINTF_ATTR12;
+
+/** \cond fulldocs */
+/** Same as avahi_strdup_printf() but take a va_list instead of varargs */
+char *avahi_strdup_vprintf(const char *fmt, va_list ap);
+/** \endcond */
+
+AVAHI_C_DECL_END
+
+#endif
diff --git a/avahi-0.6.31/avahi-common/rlist.c b/avahi-0.6.31/avahi-common/rlist.c
new file mode 100644
index 0000000..17dcb24
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/rlist.c
@@ -0,0 +1,62 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+
+#include "rlist.h"
+#include "malloc.h"
+
+AvahiRList* avahi_rlist_prepend(AvahiRList *r, void *data) {
+    AvahiRList *n;
+
+    if (!(n = avahi_new(AvahiRList, 1)))
+        return NULL;
+
+    n->data = data;
+
+    AVAHI_LLIST_PREPEND(AvahiRList, rlist, r, n);
+    return r;
+}
+
+AvahiRList* avahi_rlist_remove(AvahiRList *r, void *data) {
+    AvahiRList *n;
+
+    for (n = r; n; n = n->rlist_next)
+
+        if (n->data == data) {
+            AVAHI_LLIST_REMOVE(AvahiRList, rlist, r, n);
+            avahi_free(n);
+            break;
+        }
+
+    return r;
+}
+
+AvahiRList* avahi_rlist_remove_by_link(AvahiRList *r, AvahiRList *n) {
+    assert(n);
+
+    AVAHI_LLIST_REMOVE(AvahiRList, rlist, r, n);
+    avahi_free(n);
+
+    return r;
+}
diff --git a/avahi-0.6.31/avahi-common/rlist.h b/avahi-0.6.31/avahi-common/rlist.h
new file mode 100644
index 0000000..9bcc1d5
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/rlist.h
@@ -0,0 +1,49 @@
+#ifndef foorlistfoo
+#define foorlistfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+/** \file rlist.h A simple linked list implementation */
+
+#include "llist.h"
+
+AVAHI_C_DECL_BEGIN
+
+/** A doubly linked list type */
+typedef struct AvahiRList AvahiRList;
+
+/** A doubly linked list type */
+struct AvahiRList {
+    AVAHI_LLIST_FIELDS(AvahiRList, rlist);
+    void *data;
+};
+
+/** Prepend a new item to the beginning of the list and return the new beginning */
+AvahiRList* avahi_rlist_prepend(AvahiRList *r, void *data);
+
+/** Remove the first occurence of the specified item from the list and return the new beginning */
+AvahiRList* avahi_rlist_remove(AvahiRList *r, void *data);
+
+/** Remove the specified item from the list and return the new beginning */
+AvahiRList* avahi_rlist_remove_by_link(AvahiRList *r, AvahiRList *n);
+
+AVAHI_C_DECL_END
+
+#endif
diff --git a/avahi-0.6.31/avahi-common/simple-watch.c b/avahi-0.6.31/avahi-common/simple-watch.c
new file mode 100644
index 0000000..8df18dd
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/simple-watch.c
@@ -0,0 +1,649 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <sys/poll.h>
+#include <assert.h>
+#include <string.h>
+#include <errno.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <stdio.h>
+
+#include "llist.h"
+#include "malloc.h"
+#include "timeval.h"
+#include "simple-watch.h"
+
+struct AvahiWatch {
+    AvahiSimplePoll *simple_poll;
+    int dead;
+
+    int idx;
+    struct pollfd pollfd;
+
+    AvahiWatchCallback callback;
+    void *userdata;
+
+    AVAHI_LLIST_FIELDS(AvahiWatch, watches);
+};
+
+struct AvahiTimeout {
+    AvahiSimplePoll *simple_poll;
+    int dead;
+
+    int enabled;
+    struct timeval expiry;
+
+    AvahiTimeoutCallback callback;
+    void  *userdata;
+
+    AVAHI_LLIST_FIELDS(AvahiTimeout, timeouts);
+};
+
+struct AvahiSimplePoll {
+    AvahiPoll api;
+    AvahiPollFunc poll_func;
+    void *poll_func_userdata;
+
+    struct pollfd* pollfds;
+    int n_pollfds, max_pollfds, rebuild_pollfds;
+
+    int watch_req_cleanup, timeout_req_cleanup;
+    int quit;
+    int events_valid;
+
+    int n_watches;
+    AVAHI_LLIST_HEAD(AvahiWatch, watches);
+    AVAHI_LLIST_HEAD(AvahiTimeout, timeouts);
+
+    int wakeup_pipe[2];
+    int wakeup_issued;
+
+    int prepared_timeout;
+
+    enum {
+        STATE_INIT,
+        STATE_PREPARING,
+        STATE_PREPARED,
+        STATE_RUNNING,
+        STATE_RAN,
+        STATE_DISPATCHING,
+        STATE_DISPATCHED,
+        STATE_QUIT,
+        STATE_FAILURE
+    } state;
+};
+
+void avahi_simple_poll_wakeup(AvahiSimplePoll *s) {
+    char c = 'W';
+    assert(s);
+
+    write(s->wakeup_pipe[1], &c, sizeof(c));
+    s->wakeup_issued = 1;
+}
+
+static void clear_wakeup(AvahiSimplePoll *s) {
+    char c[10]; /* Read ten at a time */
+
+    if (!s->wakeup_issued)
+        return;
+
+    s->wakeup_issued = 0;
+
+    for(;;)
+        if (read(s->wakeup_pipe[0], &c, sizeof(c)) != sizeof(c))
+            break;
+}
+
+static int set_nonblock(int fd) {
+    int n;
+
+    assert(fd >= 0);
+
+    if ((n = fcntl(fd, F_GETFL)) < 0)
+        return -1;
+
+    if (n & O_NONBLOCK)
+        return 0;
+
+    return fcntl(fd, F_SETFL, n|O_NONBLOCK);
+}
+
+static AvahiWatch* watch_new(const AvahiPoll *api, int fd, AvahiWatchEvent event, AvahiWatchCallback callback, void *userdata) {
+    AvahiWatch *w;
+    AvahiSimplePoll *s;
+
+    assert(api);
+    assert(fd >= 0);
+    assert(callback);
+
+    s = api->userdata;
+    assert(s);
+
+    if (!(w = avahi_new(AvahiWatch, 1)))
+        return NULL;
+
+    /* If there is a background thread running the poll() for us, tell it to exit the poll() */
+    avahi_simple_poll_wakeup(s);
+
+    w->simple_poll = s;
+    w->dead = 0;
+
+    w->pollfd.fd = fd;
+    w->pollfd.events = event;
+    w->pollfd.revents = 0;
+
+    w->callback = callback;
+    w->userdata = userdata;
+
+    w->idx = -1;
+    s->rebuild_pollfds = 1;
+
+    AVAHI_LLIST_PREPEND(AvahiWatch, watches, s->watches, w);
+    s->n_watches++;
+
+    return w;
+}
+
+static void watch_update(AvahiWatch *w, AvahiWatchEvent events) {
+    assert(w);
+    assert(!w->dead);
+
+    /* If there is a background thread running the poll() for us, tell it to exit the poll() */
+    avahi_simple_poll_wakeup(w->simple_poll);
+
+    w->pollfd.events = events;
+
+    if (w->idx != -1) {
+        assert(w->simple_poll);
+        w->simple_poll->pollfds[w->idx] = w->pollfd;
+    } else
+        w->simple_poll->rebuild_pollfds = 1;
+}
+
+static AvahiWatchEvent watch_get_events(AvahiWatch *w) {
+    assert(w);
+    assert(!w->dead);
+
+    if (w->idx != -1 && w->simple_poll->events_valid)
+        return w->simple_poll->pollfds[w->idx].revents;
+
+    return 0;
+}
+
+static void remove_pollfd(AvahiWatch *w) {
+    assert(w);
+
+    if (w->idx == -1)
+        return;
+
+    w->simple_poll->rebuild_pollfds = 1;
+}
+
+static void watch_free(AvahiWatch *w) {
+    assert(w);
+
+    assert(!w->dead);
+
+    /* If there is a background thread running the poll() for us, tell it to exit the poll() */
+    avahi_simple_poll_wakeup(w->simple_poll);
+
+    remove_pollfd(w);
+
+    w->dead = 1;
+    w->simple_poll->n_watches --;
+    w->simple_poll->watch_req_cleanup = 1;
+}
+
+static void destroy_watch(AvahiWatch *w) {
+    assert(w);
+
+    remove_pollfd(w);
+    AVAHI_LLIST_REMOVE(AvahiWatch, watches, w->simple_poll->watches, w);
+
+    if (!w->dead)
+        w->simple_poll->n_watches --;
+
+    avahi_free(w);
+}
+
+static void cleanup_watches(AvahiSimplePoll *s, int all) {
+    AvahiWatch *w, *next;
+    assert(s);
+
+    for (w = s->watches; w; w = next) {
+        next = w->watches_next;
+
+        if (all || w->dead)
+            destroy_watch(w);
+    }
+
+    s->timeout_req_cleanup = 0;
+}
+
+static AvahiTimeout* timeout_new(const AvahiPoll *api, const struct timeval *tv, AvahiTimeoutCallback callback, void *userdata) {
+    AvahiTimeout *t;
+    AvahiSimplePoll *s;
+
+    assert(api);
+    assert(callback);
+
+    s = api->userdata;
+    assert(s);
+
+    if (!(t = avahi_new(AvahiTimeout, 1)))
+        return NULL;
+
+    /* If there is a background thread running the poll() for us, tell it to exit the poll() */
+    avahi_simple_poll_wakeup(s);
+
+    t->simple_poll = s;
+    t->dead = 0;
+
+    if ((t->enabled = !!tv))
+        t->expiry = *tv;
+
+    t->callback = callback;
+    t->userdata = userdata;
+
+    AVAHI_LLIST_PREPEND(AvahiTimeout, timeouts, s->timeouts, t);
+    return t;
+}
+
+static void timeout_update(AvahiTimeout *t, const struct timeval *tv) {
+    assert(t);
+    assert(!t->dead);
+
+    /* If there is a background thread running the poll() for us, tell it to exit the poll() */
+    avahi_simple_poll_wakeup(t->simple_poll);
+
+    if ((t->enabled = !!tv))
+        t->expiry = *tv;
+}
+
+static void timeout_free(AvahiTimeout *t) {
+    assert(t);
+    assert(!t->dead);
+
+    /* If there is a background thread running the poll() for us, tell it to exit the poll() */
+    avahi_simple_poll_wakeup(t->simple_poll);
+
+    t->dead = 1;
+    t->simple_poll->timeout_req_cleanup = 1;
+}
+
+
+static void destroy_timeout(AvahiTimeout *t) {
+    assert(t);
+
+    AVAHI_LLIST_REMOVE(AvahiTimeout, timeouts, t->simple_poll->timeouts, t);
+
+    avahi_free(t);
+}
+
+static void cleanup_timeouts(AvahiSimplePoll *s, int all) {
+    AvahiTimeout *t, *next;
+    assert(s);
+
+    for (t = s->timeouts; t; t = next) {
+        next = t->timeouts_next;
+
+        if (all || t->dead)
+            destroy_timeout(t);
+    }
+
+    s->timeout_req_cleanup = 0;
+}
+
+AvahiSimplePoll *avahi_simple_poll_new(void) {
+    AvahiSimplePoll *s;
+
+    if (!(s = avahi_new(AvahiSimplePoll, 1)))
+        return NULL;
+
+    if (pipe(s->wakeup_pipe) < 0) {
+        avahi_free(s);
+        return NULL;
+    }
+
+    set_nonblock(s->wakeup_pipe[0]);
+    set_nonblock(s->wakeup_pipe[1]);
+
+    s->api.userdata = s;
+
+    s->api.watch_new = watch_new;
+    s->api.watch_free = watch_free;
+    s->api.watch_update = watch_update;
+    s->api.watch_get_events = watch_get_events;
+
+    s->api.timeout_new = timeout_new;
+    s->api.timeout_free = timeout_free;
+    s->api.timeout_update = timeout_update;
+
+    s->pollfds = NULL;
+    s->max_pollfds = s->n_pollfds = 0;
+    s->rebuild_pollfds = 1;
+    s->quit = 0;
+    s->n_watches = 0;
+    s->events_valid = 0;
+
+    s->watch_req_cleanup = 0;
+    s->timeout_req_cleanup = 0;
+
+    s->prepared_timeout = 0;
+
+    s->state = STATE_INIT;
+
+    s->wakeup_issued = 0;
+
+    avahi_simple_poll_set_func(s, NULL, NULL);
+
+    AVAHI_LLIST_HEAD_INIT(AvahiWatch, s->watches);
+    AVAHI_LLIST_HEAD_INIT(AvahiTimeout, s->timeouts);
+
+    return s;
+}
+
+void avahi_simple_poll_free(AvahiSimplePoll *s) {
+    assert(s);
+
+    cleanup_timeouts(s, 1);
+    cleanup_watches(s, 1);
+    assert(s->n_watches == 0);
+
+    avahi_free(s->pollfds);
+
+    if (s->wakeup_pipe[0] >= 0)
+        close(s->wakeup_pipe[0]);
+
+    if (s->wakeup_pipe[1] >= 0)
+        close(s->wakeup_pipe[1]);
+
+    avahi_free(s);
+}
+
+static int rebuild(AvahiSimplePoll *s) {
+    AvahiWatch *w;
+    int idx;
+
+    assert(s);
+
+    if (s->n_watches+1 > s->max_pollfds) {
+        struct pollfd *n;
+
+        s->max_pollfds = s->n_watches + 10;
+
+        if (!(n = avahi_realloc(s->pollfds, sizeof(struct pollfd) * s->max_pollfds)))
+            return -1;
+
+        s->pollfds = n;
+    }
+
+
+    s->pollfds[0].fd = s->wakeup_pipe[0];
+    s->pollfds[0].events = POLLIN;
+    s->pollfds[0].revents = 0;
+
+    idx = 1;
+
+    for (w = s->watches; w; w = w->watches_next) {
+
+        if(w->dead)
+            continue;
+
+        assert(w->idx < s->max_pollfds);
+        s->pollfds[w->idx = idx++] = w->pollfd;
+    }
+
+    s->n_pollfds = idx;
+    s->events_valid = 0;
+    s->rebuild_pollfds = 0;
+
+    return 0;
+}
+
+static AvahiTimeout* find_next_timeout(AvahiSimplePoll *s) {
+    AvahiTimeout *t, *n = NULL;
+    assert(s);
+
+    for (t = s->timeouts; t; t = t->timeouts_next) {
+
+        if (t->dead || !t->enabled)
+            continue;
+
+        if (!n || avahi_timeval_compare(&t->expiry, &n->expiry) < 0)
+            n = t;
+    }
+
+    return n;
+}
+
+static void timeout_callback(AvahiTimeout *t) {
+    assert(t);
+    assert(!t->dead);
+    assert(t->enabled);
+
+    t->enabled = 0;
+    t->callback(t, t->userdata);
+}
+
+int avahi_simple_poll_prepare(AvahiSimplePoll *s, int timeout) {
+    AvahiTimeout *next_timeout;
+
+    assert(s);
+    assert(s->state == STATE_INIT || s->state == STATE_DISPATCHED || s->state == STATE_FAILURE);
+    s->state = STATE_PREPARING;
+
+    /* Clear pending wakeup requests */
+    clear_wakeup(s);
+
+    /* Cleanup things first */
+    if (s->watch_req_cleanup)
+        cleanup_watches(s, 0);
+
+    if (s->timeout_req_cleanup)
+        cleanup_timeouts(s, 0);
+
+    /* Check whether a quit was requested */
+    if (s->quit) {
+        s->state = STATE_QUIT;
+        return 1;
+    }
+
+    /* Do we need to rebuild our array of pollfds? */
+    if (s->rebuild_pollfds)
+        if (rebuild(s) < 0) {
+            s->state = STATE_FAILURE;
+            return -1;
+        }
+
+    /* Calculate the wakeup time */
+    if ((next_timeout = find_next_timeout(s))) {
+        struct timeval now;
+        int t;
+        AvahiUsec usec;
+
+        if (next_timeout->expiry.tv_sec == 0 &&
+            next_timeout->expiry.tv_usec == 0) {
+
+            /* Just a shortcut so that we don't need to call gettimeofday() */
+            timeout = 0;
+            goto finish;
+        }
+
+        gettimeofday(&now, NULL);
+        usec = avahi_timeval_diff(&next_timeout->expiry, &now);
+
+        if (usec <= 0) {
+            /* Timeout elapsed */
+
+            timeout = 0;
+            goto finish;
+        }
+
+        /* Calculate sleep time. We add 1ms because otherwise we'd
+         * wake up too early most of the time */
+        t = (int) (usec / 1000) + 1;
+
+        if (timeout < 0 || timeout > t)
+            timeout = t;
+    }
+
+finish:
+    s->prepared_timeout = timeout;
+    s->state = STATE_PREPARED;
+    return 0;
+}
+
+int avahi_simple_poll_run(AvahiSimplePoll *s) {
+    assert(s);
+    assert(s->state == STATE_PREPARED || s->state == STATE_FAILURE);
+
+    s->state = STATE_RUNNING;
+
+    for (;;) {
+        errno = 0;
+
+        if (s->poll_func(s->pollfds, s->n_pollfds, s->prepared_timeout, s->poll_func_userdata) < 0) {
+
+            if (errno == EINTR)
+                continue;
+
+            s->state = STATE_FAILURE;
+            return -1;
+        }
+
+        break;
+    }
+
+    /* The poll events are now valid again */
+    s->events_valid = 1;
+
+    /* Update state */
+    s->state = STATE_RAN;
+    return 0;
+}
+
+int avahi_simple_poll_dispatch(AvahiSimplePoll *s) {
+    AvahiTimeout *next_timeout;
+    AvahiWatch *w;
+
+    assert(s);
+    assert(s->state == STATE_RAN);
+    s->state = STATE_DISPATCHING;
+
+    /* We execute only on callback in every iteration */
+
+    /* Check whether the wakeup time has been reached now */
+    if ((next_timeout = find_next_timeout(s))) {
+
+        if (next_timeout->expiry.tv_sec == 0 && next_timeout->expiry.tv_usec == 0) {
+
+            /* Just a shortcut so that we don't need to call gettimeofday() */
+            timeout_callback(next_timeout);
+            goto finish;
+        }
+
+        if (avahi_age(&next_timeout->expiry) >= 0) {
+
+            /* Timeout elapsed */
+            timeout_callback(next_timeout);
+            goto finish;
+        }
+    }
+
+    /* Look for some kind of I/O event */
+    for (w = s->watches; w; w = w->watches_next) {
+
+        if (w->dead)
+            continue;
+
+        assert(w->idx >= 0);
+        assert(w->idx < s->n_pollfds);
+
+        if (s->pollfds[w->idx].revents != 0) {
+            w->callback(w, w->pollfd.fd, s->pollfds[w->idx].revents, w->userdata);
+            goto finish;
+        }
+    }
+
+finish:
+
+    s->state = STATE_DISPATCHED;
+    return 0;
+}
+
+int avahi_simple_poll_iterate(AvahiSimplePoll *s, int timeout) {
+    int r;
+
+    if ((r = avahi_simple_poll_prepare(s, timeout)) != 0)
+        return r;
+
+    if ((r = avahi_simple_poll_run(s)) != 0)
+        return r;
+
+    if ((r = avahi_simple_poll_dispatch(s)) != 0)
+        return r;
+
+    return 0;
+}
+
+void avahi_simple_poll_quit(AvahiSimplePoll *s) {
+    assert(s);
+
+    s->quit = 1;
+
+    /* If there is a background thread running the poll() for us, tell it to exit the poll() */
+    avahi_simple_poll_wakeup(s);
+}
+
+const AvahiPoll* avahi_simple_poll_get(AvahiSimplePoll *s) {
+    assert(s);
+
+    return &s->api;
+}
+
+static int system_poll(struct pollfd *ufds, unsigned int nfds, int timeout, AVAHI_GCC_UNUSED void *userdata) {
+    return poll(ufds, nfds, timeout);
+}
+
+void avahi_simple_poll_set_func(AvahiSimplePoll *s, AvahiPollFunc func, void *userdata) {
+    assert(s);
+
+    s->poll_func = func ? func : system_poll;
+    s->poll_func_userdata = func ? userdata : NULL;
+
+    /* If there is a background thread running the poll() for us, tell it to exit the poll() */
+    avahi_simple_poll_wakeup(s);
+}
+
+int avahi_simple_poll_loop(AvahiSimplePoll *s) {
+    int r;
+
+    assert(s);
+
+    for (;;)
+        if ((r = avahi_simple_poll_iterate(s, -1)) != 0)
+            if (r >= 0 || errno != EINTR)
+                return r;
+}
diff --git a/avahi-0.6.31/avahi-common/simple-watch.h b/avahi-0.6.31/avahi-common/simple-watch.h
new file mode 100644
index 0000000..72c1905
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/simple-watch.h
@@ -0,0 +1,85 @@
+#ifndef foosimplewatchhfoo
+#define foosimplewatchhfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+/** \file simple-watch.h Simple poll() based main loop implementation */
+
+#include <sys/poll.h>
+#include <avahi-common/cdecl.h>
+#include <avahi-common/watch.h>
+
+AVAHI_C_DECL_BEGIN
+
+/** A main loop object. Main loops of this type aren't very flexible
+ * since they only support a single wakeup type. Nevertheless it
+ * should suffice for small test and example applications.  */
+typedef struct AvahiSimplePoll AvahiSimplePoll;
+
+/** Create a new main loop object */
+AvahiSimplePoll *avahi_simple_poll_new(void);
+
+/** Free a main loop object */
+void avahi_simple_poll_free(AvahiSimplePoll *s);
+
+/** Return the abstracted poll API object for this main loop
+ * object. The is will return the same pointer each time it is
+ * called. */
+const AvahiPoll* avahi_simple_poll_get(AvahiSimplePoll *s);
+
+/** Run a single main loop iteration of this main loop. If sleep_time
+is < 0 this will block until any of the registered events happens,
+then it will execute the attached callback function. If sleep_time is
+0 the routine just checks if any event is pending. If yes the attached
+callback function is called, otherwise the function returns
+immediately. If sleep_time > 0 the function will block for at most the
+specified time in msecs. Returns -1 on error, 0 on success and 1 if a
+quit request has been scheduled. Usually this function should be called
+in a loop until it returns a non-zero value*/
+int avahi_simple_poll_iterate(AvahiSimplePoll *s, int sleep_time);
+
+/** Request that the main loop quits. If this is called the next
+ call to avahi_simple_poll_iterate() will return 1 */
+void avahi_simple_poll_quit(AvahiSimplePoll *s);
+
+/** Prototype for a poll() type function */
+typedef int (*AvahiPollFunc)(struct pollfd *ufds, unsigned int nfds, int timeout, void *userdata);
+
+/** Replace the internally used poll() function. By default the system's poll() will be used */
+void avahi_simple_poll_set_func(AvahiSimplePoll *s, AvahiPollFunc func, void *userdata);
+
+/** The first stage of avahi_simple_poll_iterate(), use this function only if you know what you do */
+int avahi_simple_poll_prepare(AvahiSimplePoll *s, int timeout);
+
+/** The second stage of avahi_simple_poll_iterate(), use this function only if you know what you do */
+int avahi_simple_poll_run(AvahiSimplePoll *s);
+
+/** The third and final stage of avahi_simple_poll_iterate(), use this function only if you know what you do */
+int avahi_simple_poll_dispatch(AvahiSimplePoll *s);
+
+/** Call avahi_simple_poll_iterate() in a loop and return if it returns non-zero */
+int avahi_simple_poll_loop(AvahiSimplePoll *s);
+
+/** Wakeup the main loop. (for threaded environments) */
+void avahi_simple_poll_wakeup(AvahiSimplePoll *s);
+
+AVAHI_C_DECL_END
+
+#endif
diff --git a/avahi-0.6.31/avahi-common/strlst-test.c b/avahi-0.6.31/avahi-common/strlst-test.c
new file mode 100644
index 0000000..0945b37
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/strlst-test.c
@@ -0,0 +1,127 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <assert.h>
+
+#include "strlst.h"
+#include "malloc.h"
+
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
+    char *t, *v;
+    uint8_t data[1024];
+    AvahiStringList *a = NULL, *b, *p;
+    size_t size, n;
+    int r;
+
+    a = avahi_string_list_new("prefix", "a", "b", NULL);
+
+    a = avahi_string_list_add(a, "start");
+    a = avahi_string_list_add(a, "foo=99");
+    a = avahi_string_list_add(a, "bar");
+    a = avahi_string_list_add(a, "");
+    a = avahi_string_list_add(a, "");
+    a = avahi_string_list_add(a, "quux");
+    a = avahi_string_list_add(a, "");
+    a = avahi_string_list_add_arbitrary(a, (const uint8_t*) "null\0null", 9);
+    a = avahi_string_list_add_printf(a, "seven=%i %c", 7, 'x');
+    a = avahi_string_list_add_pair(a, "blubb", "blaa");
+    a = avahi_string_list_add_pair(a, "uxknurz", NULL);
+    a = avahi_string_list_add_pair_arbitrary(a, "uxknurz2", (const uint8_t*) "blafasel\0oerks", 14);
+
+    a = avahi_string_list_add(a, "end");
+
+    t = avahi_string_list_to_string(a);
+    printf("--%s--\n", t);
+    avahi_free(t);
+
+    n = avahi_string_list_serialize(a, NULL, 0);
+    size = avahi_string_list_serialize(a, data, sizeof(data));
+    assert(size == n);
+
+    printf("%zu\n", size);
+
+    for (t = (char*) data, n = 0; n < size; n++, t++) {
+        if (*t <= 32)
+            printf("(%u)", *t);
+        else
+            printf("%c", *t);
+    }
+
+    printf("\n");
+
+    assert(avahi_string_list_parse(data, size, &b) == 0);
+
+    printf("equal: %i\n", avahi_string_list_equal(a, b));
+
+    t = avahi_string_list_to_string(b);
+    printf("--%s--\n", t);
+    avahi_free(t);
+
+    avahi_string_list_free(b);
+
+    b = avahi_string_list_copy(a);
+
+    assert(avahi_string_list_equal(a, b));
+
+    t = avahi_string_list_to_string(b);
+    printf("--%s--\n", t);
+    avahi_free(t);
+
+    p = avahi_string_list_find(a, "seven");
+    assert(p);
+
+    r = avahi_string_list_get_pair(p, &t, &v, NULL);
+    assert(r >= 0);
+    assert(t);
+    assert(v);
+
+    printf("<%s>=<%s>\n", t, v);
+    avahi_free(t);
+    avahi_free(v);
+
+    p = avahi_string_list_find(a, "quux");
+    assert(p);
+
+    r = avahi_string_list_get_pair(p, &t, &v, NULL);
+    assert(r >= 0);
+    assert(t);
+    assert(!v);
+
+    printf("<%s>=<%s>\n", t, v);
+    avahi_free(t);
+    avahi_free(v);
+
+    avahi_string_list_free(a);
+    avahi_string_list_free(b);
+
+    n = avahi_string_list_serialize(NULL, NULL, 0);
+    size = avahi_string_list_serialize(NULL, data, sizeof(data));
+    assert(size == 1);
+    assert(size == n);
+
+    assert(avahi_string_list_parse(data, size, &a) == 0);
+    assert(!a);
+
+    return 0;
+}
diff --git a/avahi-0.6.31/avahi-common/strlst.c b/avahi-0.6.31/avahi-common/strlst.c
new file mode 100644
index 0000000..b861cf8
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/strlst.c
@@ -0,0 +1,505 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "strlst.h"
+#include "malloc.h"
+#include "defs.h"
+
+AvahiStringList*avahi_string_list_add_anonymous(AvahiStringList *l, size_t size) {
+    AvahiStringList *n;
+
+    if (!(n = avahi_malloc(sizeof(AvahiStringList) + size)))
+        return NULL;
+
+    n->next = l;
+    n->size = size;
+
+    /* NUL terminate strings, just to make sure */
+    n->text[size] = 0;
+
+    return n;
+}
+
+AvahiStringList *avahi_string_list_add_arbitrary(AvahiStringList *l, const uint8_t*text, size_t size) {
+    AvahiStringList *n;
+
+    assert(size == 0 || text);
+
+    if (!(n = avahi_string_list_add_anonymous(l, size)))
+        return NULL;
+
+    if (size > 0)
+        memcpy(n->text, text, size);
+
+    return n;
+}
+
+AvahiStringList *avahi_string_list_add(AvahiStringList *l, const char *text) {
+    assert(text);
+
+    return avahi_string_list_add_arbitrary(l, (const uint8_t*) text, strlen(text));
+}
+
+int avahi_string_list_parse(const void* data, size_t size, AvahiStringList **ret) {
+    const uint8_t *c;
+    AvahiStringList *r = NULL;
+
+    assert(data);
+    assert(ret);
+
+    c = data;
+    while (size > 0) {
+        size_t k;
+
+        k = *(c++);
+        size--;
+
+        if (k > size)
+            goto fail; /* Overflow */
+
+        if (k > 0) { /* Ignore empty strings */
+            AvahiStringList *n;
+
+            if (!(n = avahi_string_list_add_arbitrary(r, c, k)))
+                goto fail; /* OOM */
+
+            r = n;
+        }
+
+        c += k;
+        size -= k;
+    }
+
+    *ret = r;
+
+    return 0;
+
+fail:
+    avahi_string_list_free(r);
+    return -1;
+}
+
+void avahi_string_list_free(AvahiStringList *l) {
+    AvahiStringList *n;
+
+    while (l) {
+        n = l->next;
+        avahi_free(l);
+        l = n;
+    }
+}
+
+AvahiStringList* avahi_string_list_reverse(AvahiStringList *l) {
+    AvahiStringList *r = NULL, *n;
+
+    while (l) {
+        n = l->next;
+        l->next = r;
+        r = l;
+        l = n;
+    }
+
+    return r;
+}
+
+char* avahi_string_list_to_string(AvahiStringList *l) {
+    AvahiStringList *n;
+    size_t s = 0;
+    char *t, *e;
+
+    for (n = l; n; n = n->next) {
+        if (n != l)
+            s ++;
+
+        s += n->size+2;
+    }
+
+    if (!(t = e = avahi_new(char, s+1)))
+        return NULL;
+
+    l = avahi_string_list_reverse(l);
+
+    for (n = l; n; n = n->next) {
+        if (n != l)
+            *(e++) = ' ';
+
+        *(e++) = '"';
+        strncpy(e, (char*) n->text, n->size);
+        e[n->size] = 0;
+        e = strchr(e, 0);
+        *(e++) = '"';
+
+        assert(e);
+    }
+
+    l = avahi_string_list_reverse(l);
+
+    *e = 0;
+
+    return t;
+}
+
+size_t avahi_string_list_serialize(AvahiStringList *l, void *data, size_t size) {
+    size_t used = 0;
+
+    if (data) {
+        AvahiStringList *n;
+        uint8_t *c;
+
+        l = avahi_string_list_reverse(l);
+        c = data;
+
+        for (n = l; size > 1 && n; n = n->next) {
+            size_t k;
+
+            if ((k = n->size) == 0)
+                /* Skip empty strings */
+                continue;
+
+            if (k > 255)
+                /* Truncate strings at 255 characters */
+                k = 255;
+
+            if (k > size-1)
+                /* Make sure this string fits in */
+                k = size-1;
+
+            *(c++) = (uint8_t) k;
+            memcpy(c, n->text, k);
+            c += k;
+
+            used += 1 + k;
+            size -= 1 + k;
+        }
+
+        l = avahi_string_list_reverse(l);
+
+        if (used == 0 && size > 0) {
+
+            /* Empty lists are treated specially. To comply with
+             * section 6.1 of the DNS-SD spec, we return a single
+             * empty string (i.e. a NUL byte)*/
+
+            *(uint8_t*) data = 0;
+            used = 1;
+        }
+
+    } else {
+        AvahiStringList *n;
+
+        for (n = l; n; n = n->next) {
+            size_t k;
+
+            if ((k = n->size) == 0)
+                continue;
+
+            if (k > 255)
+                k = 255;
+
+            used += 1+k;
+        }
+
+        if (used == 0)
+            used = 1;
+    }
+
+    return used;
+}
+
+int avahi_string_list_equal(const AvahiStringList *a, const AvahiStringList *b) {
+
+    for (;;) {
+        if (!a && !b)
+            return 1;
+
+        if (!a || !b)
+            return 0;
+
+        if (a->size != b->size)
+            return 0;
+
+        if (a->size != 0 && memcmp(a->text, b->text, a->size) != 0)
+            return 0;
+
+        a = a->next;
+        b = b->next;
+    }
+}
+
+AvahiStringList *avahi_string_list_add_many(AvahiStringList *r, ...) {
+    va_list va;
+
+    va_start(va, r);
+    r = avahi_string_list_add_many_va(r, va);
+    va_end(va);
+
+    return r;
+}
+
+AvahiStringList *avahi_string_list_add_many_va(AvahiStringList *r, va_list va) {
+    const char *txt;
+
+    while ((txt = va_arg(va, const char*)))
+        r = avahi_string_list_add(r, txt);
+
+    return r;
+}
+
+AvahiStringList *avahi_string_list_new(const char *txt, ...) {
+    va_list va;
+    AvahiStringList *r = NULL;
+
+    if (txt) {
+        r = avahi_string_list_add(r, txt);
+
+        va_start(va, txt);
+        r = avahi_string_list_add_many_va(r, va);
+        va_end(va);
+    }
+
+    return r;
+}
+
+AvahiStringList *avahi_string_list_new_va(va_list va) {
+    return avahi_string_list_add_many_va(NULL, va);
+}
+
+AvahiStringList *avahi_string_list_copy(const AvahiStringList *l) {
+    AvahiStringList *r = NULL;
+
+    for (; l; l = l->next)
+        if (!(r = avahi_string_list_add_arbitrary(r, l->text, l->size))) {
+            avahi_string_list_free(r);
+            return NULL;
+        }
+
+    return avahi_string_list_reverse(r);
+}
+
+AvahiStringList *avahi_string_list_new_from_array(const char *array[], int length) {
+    AvahiStringList *r = NULL;
+    int i;
+
+    assert(array);
+
+    for (i = 0; length >= 0 ? i < length : !!array[i]; i++)
+        r = avahi_string_list_add(r, array[i]);
+
+    return r;
+}
+
+unsigned avahi_string_list_length(const AvahiStringList *l) {
+    unsigned n = 0;
+
+    for (; l; l = l->next)
+        n++;
+
+    return n;
+}
+
+AvahiStringList *avahi_string_list_add_vprintf(AvahiStringList *l, const char *format, va_list va) {
+    size_t len = 80;
+    AvahiStringList *r;
+
+    assert(format);
+
+    if (!(r = avahi_malloc(sizeof(AvahiStringList) + len)))
+        return NULL;
+
+    for (;;) {
+        int n;
+        AvahiStringList *nr;
+        va_list va2;
+
+        va_copy(va2, va);
+        n = vsnprintf((char*) r->text, len, format, va2);
+        va_end(va2);
+
+        if (n >= 0 && n < (int) len)
+            break;
+
+        if (n >= 0)
+            len = n+1;
+        else
+            len *= 2;
+
+        if (!(nr = avahi_realloc(r, sizeof(AvahiStringList) + len))) {
+            avahi_free(r);
+            return NULL;
+        }
+
+        r = nr;
+    }
+
+    r->next = l;
+    r->size = strlen((char*) r->text);
+
+    return r;
+}
+
+AvahiStringList *avahi_string_list_add_printf(AvahiStringList *l, const char *format, ...) {
+    va_list va;
+
+    assert(format);
+
+    va_start(va, format);
+    l  = avahi_string_list_add_vprintf(l, format, va);
+    va_end(va);
+
+    return l;
+}
+
+AvahiStringList *avahi_string_list_find(AvahiStringList *l, const char *key) {
+    size_t n;
+
+    assert(key);
+    n = strlen(key);
+
+    for (; l; l = l->next) {
+        if (strcasecmp((char*) l->text, key) == 0)
+            return l;
+
+        if (strncasecmp((char*) l->text, key, n) == 0 && l->text[n] == '=')
+            return l;
+    }
+
+    return NULL;
+}
+
+AvahiStringList *avahi_string_list_add_pair(AvahiStringList *l, const char *key, const char *value) {
+    assert(key);
+
+    if (value)
+        return avahi_string_list_add_printf(l, "%s=%s", key, value);
+    else
+        return avahi_string_list_add(l, key);
+}
+
+AvahiStringList *avahi_string_list_add_pair_arbitrary(AvahiStringList *l, const char *key, const uint8_t *value, size_t size) {
+    size_t n;
+    assert(key);
+
+    if (!value)
+        return avahi_string_list_add(l, key);
+
+    n = strlen(key);
+
+    if (!(l = avahi_string_list_add_anonymous(l, n + 1 + size)))
+        return NULL;
+
+    memcpy(l->text, key, n);
+    l->text[n] = '=';
+    memcpy(l->text + n + 1, value, size);
+
+    return l;
+}
+
+int avahi_string_list_get_pair(AvahiStringList *l, char **key, char **value, size_t *size) {
+    char *e;
+
+    assert(l);
+
+    if (!(e = memchr(l->text, '=', l->size))) {
+
+        if (key)
+            if (!(*key = avahi_strdup((char*) l->text)))
+                return -1;
+
+        if (value)
+            *value = NULL;
+
+        if (size)
+            *size = 0;
+
+    } else {
+        size_t n;
+
+        if (key)
+            if (!(*key = avahi_strndup((char*) l->text, e - (char *) l->text)))
+                return -1;
+
+        e++; /* Advance after '=' */
+
+        n = l->size - (e - (char*) l->text);
+
+        if (value) {
+
+            if (!(*value = avahi_memdup(e, n+1))) {
+                if (key)
+                    avahi_free(*key);
+                return -1;
+            }
+
+            (*value)[n] = 0;
+        }
+
+        if (size)
+            *size = n;
+    }
+
+    return 0;
+}
+
+AvahiStringList *avahi_string_list_get_next(AvahiStringList *l) {
+    assert(l);
+    return l->next;
+}
+
+uint8_t *avahi_string_list_get_text(AvahiStringList *l) {
+    assert(l);
+    return l->text;
+}
+
+size_t avahi_string_list_get_size(AvahiStringList *l) {
+    assert(l);
+    return l->size;
+}
+
+uint32_t avahi_string_list_get_service_cookie(AvahiStringList *l) {
+    AvahiStringList *f;
+    char *value = NULL, *end = NULL;
+    uint32_t ret;
+
+    if (!(f = avahi_string_list_find(l, AVAHI_SERVICE_COOKIE)))
+        return AVAHI_SERVICE_COOKIE_INVALID;
+
+    if (avahi_string_list_get_pair(f, NULL, &value, NULL) < 0 || !value)
+        return AVAHI_SERVICE_COOKIE_INVALID;
+
+    ret = (uint32_t) strtoll(value, &end, 0);
+
+    if (*value && end && *end != 0) {
+        avahi_free(value);
+        return AVAHI_SERVICE_COOKIE_INVALID;
+    }
+
+    avahi_free(value);
+
+    return ret;
+}
diff --git a/avahi-0.6.31/avahi-common/strlst.h b/avahi-0.6.31/avahi-common/strlst.h
new file mode 100644
index 0000000..94adcea
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/strlst.h
@@ -0,0 +1,180 @@
+#ifndef footxtlisthfoo
+#define footxtlisthfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+/** \file strlst.h Implementation of a data type to store lists of strings */
+
+#include <sys/types.h>
+#include <inttypes.h>
+#include <stdarg.h>
+
+#include <avahi-common/cdecl.h>
+#include <avahi-common/gccmacro.h>
+
+AVAHI_C_DECL_BEGIN
+
+/** Linked list of strings that can contain any number of binary
+ * characters, including NUL bytes. An empty list is created by
+ * assigning a NULL to a pointer to AvahiStringList. The string list
+ * is stored in reverse order, so that appending to the string list is
+ * effectively a prepending to the linked list.  This object is used
+ * primarily for storing DNS TXT record data. */
+typedef struct AvahiStringList {
+    struct AvahiStringList *next; /**< Pointer to the next linked list element */
+    size_t size;  /**< Size of text[] */
+    uint8_t text[1]; /**< Character data */
+} AvahiStringList;
+
+/** @{ \name Construction and destruction */
+
+/** Create a new string list by taking a variable list of NUL
+ * terminated strings. The strings are copied using g_strdup(). The
+ * argument list must be terminated by a NULL pointer. */
+AvahiStringList *avahi_string_list_new(const char *txt, ...) AVAHI_GCC_SENTINEL;
+
+/** \cond fulldocs */
+/** Same as avahi_string_list_new() but pass a va_list structure */
+AvahiStringList *avahi_string_list_new_va(va_list va);
+/** \endcond */
+
+/** Create a new string list from a string array. The strings are
+ * copied using g_strdup(). length should contain the length of the
+ * array, or -1 if the array is NULL terminated*/
+AvahiStringList *avahi_string_list_new_from_array(const char **array, int length);
+
+/** Free a string list */
+void avahi_string_list_free(AvahiStringList *l);
+
+/** @} */
+
+/** @{ \name Adding strings */
+
+/** Append a NUL terminated string to the specified string list. The
+ * passed string is copied using g_strdup(). Returns the new list
+ * start. */
+AvahiStringList *avahi_string_list_add(AvahiStringList *l, const char *text);
+
+/** Append a new NUL terminated formatted string to the specified string list */
+AvahiStringList *avahi_string_list_add_printf(AvahiStringList *l, const char *format, ...) AVAHI_GCC_PRINTF_ATTR23;
+
+/** \cond fulldocs */
+/** Append a new NUL terminated formatted string to the specified string list */
+AvahiStringList *avahi_string_list_add_vprintf(AvahiStringList *l, const char *format, va_list va);
+/** \endcond */
+
+/** Append an arbitrary length byte string to the list. Returns the
+ * new list start. */
+AvahiStringList *avahi_string_list_add_arbitrary(AvahiStringList *l, const uint8_t *text, size_t size);
+
+/** Append a new entry to the string list. The string is not filled
+with data. The caller should fill in string data afterwards by writing
+it to l->text, where l is the pointer returned by this function. This
+function exists solely to optimize a few operations where otherwise
+superfluous string copying would be necessary. */
+AvahiStringList*avahi_string_list_add_anonymous(AvahiStringList *l, size_t size);
+
+/** Same as avahi_string_list_add(), but takes a variable number of
+ * NUL terminated strings. The argument list must be terminated by a
+ * NULL pointer. Returns the new list start. */
+AvahiStringList *avahi_string_list_add_many(AvahiStringList *r, ...) AVAHI_GCC_SENTINEL;
+
+/** \cond fulldocs */
+/** Same as avahi_string_list_add_many(), but use a va_list
+ * structure. Returns the new list start. */
+AvahiStringList *avahi_string_list_add_many_va(AvahiStringList *r, va_list va);
+/** \endcond */
+
+/** @} */
+
+/** @{ \name String list operations */
+
+/** Convert the string list object to a single character string,
+ * seperated by spaces and enclosed in "". avahi_free() the result! This
+ * function doesn't work well with strings that contain NUL bytes. */
+char* avahi_string_list_to_string(AvahiStringList *l);
+
+/** \cond fulldocs */
+/** Serialize the string list object in a way that is compatible with
+ * the storing of DNS TXT records. Strings longer than 255 bytes are truncated. */
+size_t avahi_string_list_serialize(AvahiStringList *l, void * data, size_t size);
+
+/** Inverse of avahi_string_list_serialize() */
+int avahi_string_list_parse(const void *data, size_t size, AvahiStringList **ret);
+/** \endcond */
+
+/** Compare to string lists */
+int avahi_string_list_equal(const AvahiStringList *a, const AvahiStringList *b);
+
+/** Copy a string list */
+AvahiStringList *avahi_string_list_copy(const AvahiStringList *l);
+
+/** Reverse the string list. */
+AvahiStringList* avahi_string_list_reverse(AvahiStringList *l);
+
+/** Return the number of elements in the string list */
+unsigned avahi_string_list_length(const AvahiStringList *l);
+
+/** @} */
+
+/** @{ \name Accessing items */
+
+/** Returns the next item in the string list */
+AvahiStringList *avahi_string_list_get_next(AvahiStringList *l);
+
+/** Returns the text for the current item */
+uint8_t *avahi_string_list_get_text(AvahiStringList *l);
+
+/** Returns the size of the current text */
+size_t avahi_string_list_get_size(AvahiStringList *l);
+
+/** @} */
+
+/** @{ \name DNS-SD TXT pair handling */
+
+/** Find the string list entry for the given DNS-SD TXT key */
+AvahiStringList *avahi_string_list_find(AvahiStringList *l, const char *key);
+
+/** Return the DNS-SD TXT key and value for the specified string list
+ * item. If size is not NULL it will be filled with the length of
+ * value. (for strings containing NUL bytes). If the entry doesn't
+ * contain a value *value will be set to NULL. You need to
+ * avahi_free() the strings returned in *key and *value. */
+int avahi_string_list_get_pair(AvahiStringList *l, char **key, char **value, size_t *size);
+
+/** Add a new DNS-SD TXT key value pair to the string list. value may
+ * be NULL in case you want to specify a key without a value */
+AvahiStringList *avahi_string_list_add_pair(AvahiStringList *l, const char *key, const char *value);
+
+/** Same as avahi_string_list_add_pair() but allow strings containing NUL bytes in *value. */
+AvahiStringList *avahi_string_list_add_pair_arbitrary(AvahiStringList *l, const char *key, const uint8_t *value, size_t size);
+
+/** @} */
+
+/** \cond fulldocs */
+/** Try to find a magic service cookie in the specified DNS-SD string
+ * list. Or return AVAHI_SERVICE_COOKIE_INVALID if none is found. */
+uint32_t avahi_string_list_get_service_cookie(AvahiStringList *l);
+/** \endcond */
+
+AVAHI_C_DECL_END
+
+#endif
+
diff --git a/avahi-0.6.31/avahi-common/thread-watch.c b/avahi-0.6.31/avahi-common/thread-watch.c
new file mode 100644
index 0000000..c0cadeb
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/thread-watch.c
@@ -0,0 +1,186 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <sys/poll.h>
+#include <assert.h>
+#include <string.h>
+#include <errno.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <pthread.h>
+#include <signal.h>
+
+#include "llist.h"
+#include "malloc.h"
+#include "timeval.h"
+#include "simple-watch.h"
+#include "thread-watch.h"
+
+struct AvahiThreadedPoll {
+    AvahiSimplePoll *simple_poll;
+    pthread_t thread_id;
+    pthread_mutex_t mutex;
+    int thread_running;
+    int retval;
+};
+
+static int poll_func(struct pollfd *ufds, unsigned int nfds, int timeout, void *userdata) {
+    pthread_mutex_t *mutex = userdata;
+    int r;
+
+    /* Before entering poll() we unlock the mutex, so that
+     * avahi_simple_poll_quit() can succeed from another thread. */
+
+    pthread_mutex_unlock(mutex);
+    r = poll(ufds, nfds, timeout);
+    pthread_mutex_lock(mutex);
+
+    return r;
+}
+
+static void* thread(void *userdata){
+    AvahiThreadedPoll *p = userdata;
+    sigset_t mask;
+
+    /* Make sure that signals are delivered to the main thread */
+    sigfillset(&mask);
+    pthread_sigmask(SIG_BLOCK, &mask, NULL);
+
+    pthread_mutex_lock(&p->mutex);
+    p->retval = avahi_simple_poll_loop(p->simple_poll);
+    pthread_mutex_unlock(&p->mutex);
+
+    return NULL;
+}
+
+AvahiThreadedPoll *avahi_threaded_poll_new(void) {
+    AvahiThreadedPoll *p;
+
+    if (!(p = avahi_new(AvahiThreadedPoll, 1)))
+        goto fail; /* OOM */
+
+    if (!(p->simple_poll = avahi_simple_poll_new()))
+        goto fail;
+
+    pthread_mutex_init(&p->mutex, NULL);
+
+    avahi_simple_poll_set_func(p->simple_poll, poll_func, &p->mutex);
+
+    p->thread_running = 0;
+
+    return p;
+
+fail:
+    if (p) {
+        if (p->simple_poll) {
+            avahi_simple_poll_free(p->simple_poll);
+            pthread_mutex_destroy(&p->mutex);
+        }
+
+        avahi_free(p);
+    }
+
+    return NULL;
+}
+
+void avahi_threaded_poll_free(AvahiThreadedPoll *p) {
+    assert(p);
+
+    /* Make sure that this function is not called from the helper thread */
+    assert(!p->thread_running || !pthread_equal(pthread_self(), p->thread_id));
+
+    if (p->thread_running)
+        avahi_threaded_poll_stop(p);
+
+    if (p->simple_poll)
+        avahi_simple_poll_free(p->simple_poll);
+
+    pthread_mutex_destroy(&p->mutex);
+    avahi_free(p);
+}
+
+const AvahiPoll* avahi_threaded_poll_get(AvahiThreadedPoll *p) {
+    assert(p);
+
+    return avahi_simple_poll_get(p->simple_poll);
+}
+
+int avahi_threaded_poll_start(AvahiThreadedPoll *p) {
+    assert(p);
+
+    assert(!p->thread_running);
+
+    if (pthread_create(&p->thread_id, NULL, thread, p) < 0)
+        return -1;
+
+    p->thread_running = 1;
+
+    return 0;
+}
+
+int avahi_threaded_poll_stop(AvahiThreadedPoll *p) {
+    assert(p);
+
+    if (!p->thread_running)
+        return -1;
+
+    /* Make sure that this function is not called from the helper thread */
+    assert(!pthread_equal(pthread_self(), p->thread_id));
+
+    pthread_mutex_lock(&p->mutex);
+    avahi_simple_poll_quit(p->simple_poll);
+    pthread_mutex_unlock(&p->mutex);
+
+    pthread_join(p->thread_id, NULL);
+    p->thread_running = 0;
+
+    return p->retval;
+}
+
+void avahi_threaded_poll_quit(AvahiThreadedPoll *p) {
+    assert(p);
+
+    /* Make sure that this function is called from the helper thread */
+    assert(pthread_equal(pthread_self(), p->thread_id));
+
+    avahi_simple_poll_quit(p->simple_poll);
+}
+
+void avahi_threaded_poll_lock(AvahiThreadedPoll *p) {
+    assert(p);
+
+    /* Make sure that this function is not called from the helper thread */
+    assert(!p->thread_running || !pthread_equal(pthread_self(), p->thread_id));
+
+    pthread_mutex_lock(&p->mutex);
+}
+
+void avahi_threaded_poll_unlock(AvahiThreadedPoll *p) {
+    assert(p);
+
+    /* Make sure that this function is not called from the helper thread */
+    assert(!p->thread_running || !pthread_equal(pthread_self(), p->thread_id));
+
+    pthread_mutex_unlock(&p->mutex);
+}
diff --git a/avahi-0.6.31/avahi-common/thread-watch.h b/avahi-0.6.31/avahi-common/thread-watch.h
new file mode 100644
index 0000000..dec0cf3
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/thread-watch.h
@@ -0,0 +1,80 @@
+#ifndef foothreadedwatchhfoo
+#define foothreadedwatchhfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+/** \file thread-watch.h Threaded poll() based main loop implementation */
+
+#include <sys/poll.h>
+#include <avahi-common/cdecl.h>
+#include <avahi-common/watch.h>
+
+AVAHI_C_DECL_BEGIN
+
+/** A main loop object that runs an AvahiSimplePoll in its own thread. \since 0.6.4 */
+typedef struct AvahiThreadedPoll AvahiThreadedPoll;
+
+/** Create a new event loop object. This will allocate the internal
+ * AvahiSimplePoll, but will not start the helper thread. \since 0.6.4 */
+AvahiThreadedPoll *avahi_threaded_poll_new(void);
+
+/** Free an event loop object. This will stop the associated event loop
+ * thread (if it is running). \since 0.6.4 */
+void avahi_threaded_poll_free(AvahiThreadedPoll *p);
+
+/** Return the abstracted poll API object for this event loop
+ * object. The will return the same pointer each time it is
+ * called. \since 0.6.4 */
+const AvahiPoll* avahi_threaded_poll_get(AvahiThreadedPoll *p);
+
+/** Start the event loop helper thread. After the thread has started
+ * you must make sure to access the event loop object
+ * (AvahiThreadedPoll, AvahiPoll and all its associated objects)
+ * synchronized, i.e. with proper locking. You may want to use
+ * avahi_threaded_poll_lock()/avahi_threaded_poll_unlock() for this,
+ * which will lock the the entire event loop. Please note that event
+ * loop callback functions are called from the event loop helper thread
+ * with that lock held, i.e. avahi_threaded_poll_lock() calls are not
+ * required from event callbacks. \since 0.6.4 */
+int avahi_threaded_poll_start(AvahiThreadedPoll *p);
+
+/** Request that the event loop quits and the associated thread
+ stops. Call this from outside the helper thread if you want to shut
+ it down. \since 0.6.4 */
+int avahi_threaded_poll_stop(AvahiThreadedPoll *p);
+
+/** Request that the event loop quits and the associated thread
+ stops. Call this from inside the helper thread if you want to shut it
+ down. \since 0.6.4  */
+void avahi_threaded_poll_quit(AvahiThreadedPoll *p);
+
+/** Lock the main loop object. Use this if you want to access the event
+ * loop objects (such as creating a new event source) from anything
+ * else but the event loop helper thread, i.e. from anything else but event
+ * loop callbacks \since 0.6.4  */
+void avahi_threaded_poll_lock(AvahiThreadedPoll *p);
+
+/** Unlock the event loop object, use this as counterpart to
+ * avahi_threaded_poll_lock() \since 0.6.4 */
+void avahi_threaded_poll_unlock(AvahiThreadedPoll *p);
+
+AVAHI_C_DECL_END
+
+#endif
diff --git a/avahi-0.6.31/avahi-common/timeval-test.c b/avahi-0.6.31/avahi-common/timeval-test.c
new file mode 100644
index 0000000..387c180
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/timeval-test.c
@@ -0,0 +1,43 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+
+#include "gccmacro.h"
+#include "timeval.h"
+
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
+
+    struct timeval a = { 5, 5 }, b;
+
+    b = a;
+
+    printf("%li.%li\n", a.tv_sec, a.tv_usec);
+    avahi_timeval_add(&a, -50);
+
+    printf("%li.%li\n", a.tv_sec, a.tv_usec);
+
+    printf("%lli\n", (long long) avahi_timeval_diff(&a, &b));
+
+    return 0;
+}
diff --git a/avahi-0.6.31/avahi-common/timeval.c b/avahi-0.6.31/avahi-common/timeval.c
new file mode 100644
index 0000000..cdb0f09
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/timeval.c
@@ -0,0 +1,123 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <pthread.h>
+#include <stdlib.h>
+#include <assert.h>
+
+#include "timeval.h"
+
+int avahi_timeval_compare(const struct timeval *a, const struct timeval *b) {
+    assert(a);
+    assert(b);
+
+    if (a->tv_sec < b->tv_sec)
+        return -1;
+
+    if (a->tv_sec > b->tv_sec)
+        return 1;
+
+    if (a->tv_usec < b->tv_usec)
+        return -1;
+
+    if (a->tv_usec > b->tv_usec)
+        return 1;
+
+    return 0;
+}
+
+AvahiUsec avahi_timeval_diff(const struct timeval *a, const struct timeval *b) {
+    assert(a);
+    assert(b);
+
+    if (avahi_timeval_compare(a, b) < 0)
+        return - avahi_timeval_diff(b, a);
+
+    return ((AvahiUsec) a->tv_sec - b->tv_sec)*1000000 + a->tv_usec - b->tv_usec;
+}
+
+struct timeval* avahi_timeval_add(struct timeval *a, AvahiUsec usec) {
+    AvahiUsec u;
+    assert(a);
+
+    u = usec + a->tv_usec;
+
+    if (u < 0) {
+        a->tv_usec = (long) (1000000 + (u % 1000000));
+        a->tv_sec += (long) (-1 + (u / 1000000));
+    } else {
+        a->tv_usec = (long) (u % 1000000);
+        a->tv_sec += (long) (u / 1000000);
+    }
+
+    return a;
+}
+
+AvahiUsec avahi_age(const struct timeval *a) {
+    struct timeval now;
+
+    assert(a);
+
+    gettimeofday(&now, NULL);
+
+    return avahi_timeval_diff(&now, a);
+}
+
+struct timeval *avahi_elapse_time(struct timeval *tv, unsigned msec, unsigned jitter) {
+    assert(tv);
+
+    gettimeofday(tv, NULL);
+
+    if (msec)
+        avahi_timeval_add(tv, (AvahiUsec) msec*1000);
+
+    if (jitter) {
+        static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+        static int last_rand;
+        static time_t timestamp = 0;
+
+        time_t now;
+        int r;
+
+        now = time(NULL);
+
+        pthread_mutex_lock(&mutex);
+        if (now >= timestamp + 10) {
+            timestamp = now;
+            last_rand = rand();
+        }
+
+        r = last_rand;
+
+        pthread_mutex_unlock(&mutex);
+
+        /* We use the same jitter for 10 seconds. That way our
+         * time events elapse in bursts which has the advantage that
+         * packet data can be aggregated better */
+
+        avahi_timeval_add(tv, (AvahiUsec) (jitter*1000.0*r/(RAND_MAX+1.0)));
+    }
+
+    return tv;
+}
+
diff --git a/avahi-0.6.31/avahi-common/timeval.h b/avahi-0.6.31/avahi-common/timeval.h
new file mode 100644
index 0000000..6470f01
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/timeval.h
@@ -0,0 +1,54 @@
+#ifndef footimevalhfoo
+#define footimevalhfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+/** \file timeval.h Functions to facilitate timeval handling */
+
+#include <inttypes.h>
+#include <sys/time.h>
+
+#include <avahi-common/cdecl.h>
+
+AVAHI_C_DECL_BEGIN
+
+/** A numeric data type for storing microsecond values. (signed 64bit integer) */
+typedef int64_t AvahiUsec;
+
+/** Compare two timeval structures and return a negative value when a < b, 0 when a == b and a positive value otherwise */
+int avahi_timeval_compare(const struct timeval *a, const struct timeval *b);
+
+/** Calculate the difference between two timeval structures as microsecond value */
+AvahiUsec avahi_timeval_diff(const struct timeval *a, const struct timeval *b);
+
+/** Add a number of microseconds to the specified timeval structure and return it. *a is modified. */
+struct timeval* avahi_timeval_add(struct timeval *a, AvahiUsec usec);
+
+/** Return the difference between the current time and *a. Positive if *a was earlier */
+AvahiUsec avahi_age(const struct timeval *a);
+
+/** Fill *tv with the current time plus "ms" milliseconds plus an
+ * extra jitter of "j" milliseconds. Pass 0 for j if you don't want
+ * the jitter */
+struct timeval *avahi_elapse_time(struct timeval *tv, unsigned ms, unsigned j);
+
+AVAHI_C_DECL_END
+
+#endif
diff --git a/avahi-0.6.31/avahi-common/utf8-test.c b/avahi-0.6.31/avahi-common/utf8-test.c
new file mode 100644
index 0000000..d12ed58
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/utf8-test.c
@@ -0,0 +1,37 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <assert.h>
+
+#include <avahi-common/gccmacro.h>
+
+#include "utf8.h"
+
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
+
+    assert(avahi_utf8_valid("hallo"));
+    assert(!avahi_utf8_valid("üxknürz"));
+    assert(avahi_utf8_valid("üxknürz"));
+
+    return 0;
+}
diff --git a/avahi-0.6.31/avahi-common/utf8.c b/avahi-0.6.31/avahi-common/utf8.c
new file mode 100644
index 0000000..ab10ba0
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/utf8.c
@@ -0,0 +1,110 @@
+/* This file is based on the GLIB utf8 validation functions. The
+ * original license text follows. */
+
+/* gutf8.c - Operations on UTF-8 strings.
+ *
+ * Copyright (C) 1999 Tom Tromey
+ * Copyright (C) 2000 Red Hat, Inc.
+ *
+ * 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 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+
+#include "utf8.h"
+
+#define UNICODE_VALID(Char)                   \
+    ((Char) < 0x110000 &&                     \
+     (((Char) & 0xFFFFF800) != 0xD800) &&     \
+     ((Char) < 0xFDD0 || (Char) > 0xFDEF) &&  \
+     ((Char) & 0xFFFE) != 0xFFFE)
+
+
+#define CONTINUATION_CHAR                           \
+ do {                                     \
+  if ((*(const unsigned char *)p & 0xc0) != 0x80) /* 10xxxxxx */ \
+    goto error;                                     \
+  val <<= 6;                                        \
+  val |= (*(const unsigned char *)p) & 0x3f;                     \
+ } while(0)
+
+
+const char *
+avahi_utf8_valid (const char *str)
+
+{
+  unsigned val = 0;
+  unsigned min = 0;
+  const char *p;
+
+  for (p = str; *p; p++)
+    {
+      if (*(const unsigned char *)p < 128)
+	/* done */;
+      else
+	{
+	  if ((*(const unsigned char *)p & 0xe0) == 0xc0) /* 110xxxxx */
+	    {
+	      if ( ((*(const unsigned char *)p & 0x1e) == 0))
+		goto error;
+	      p++;
+	      if ( ((*(const unsigned char *)p & 0xc0) != 0x80)) /* 10xxxxxx */
+		goto error;
+	    }
+	  else
+	    {
+	      if ((*(const unsigned char *)p & 0xf0) == 0xe0) /* 1110xxxx */
+		{
+		  min = (1 << 11);
+		  val = *(const unsigned char *)p & 0x0f;
+		  goto TWO_REMAINING;
+		}
+	      else if ((*(const unsigned char *)p & 0xf8) == 0xf0) /* 11110xxx */
+		{
+		  min = (1 << 16);
+		  val = *(const unsigned char *)p & 0x07;
+		}
+	      else
+		goto error;
+
+	      p++;
+	      CONTINUATION_CHAR;
+	    TWO_REMAINING:
+	      p++;
+	      CONTINUATION_CHAR;
+	      p++;
+	      CONTINUATION_CHAR;
+
+	      if ( (val < min))
+		goto error;
+
+	      if ( (!UNICODE_VALID(val)))
+		goto error;
+	    }
+
+	  continue;
+
+	error:
+	  return NULL;
+	}
+    }
+
+  return str;
+}
diff --git a/avahi-0.6.31/avahi-common/utf8.h b/avahi-0.6.31/avahi-common/utf8.h
new file mode 100644
index 0000000..dc1ce4b
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/utf8.h
@@ -0,0 +1,33 @@
+#ifndef fooutf8hfoo
+#define fooutf8hfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#include <inttypes.h>
+
+#include <avahi-common/cdecl.h>
+
+AVAHI_C_DECL_BEGIN
+
+const char *avahi_utf8_valid(const char *str);
+
+AVAHI_C_DECL_END
+
+#endif
diff --git a/avahi-0.6.31/avahi-common/watch-test.c b/avahi-0.6.31/avahi-common/watch-test.c
new file mode 100644
index 0000000..6c178ba
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/watch-test.c
@@ -0,0 +1,115 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <unistd.h>
+#include <assert.h>
+#include <errno.h>
+#include <string.h>
+
+#include "watch.h"
+#include "timeval.h"
+#include "gccmacro.h"
+
+static const AvahiPoll *api = NULL;
+
+#ifndef USE_THREAD
+#include "simple-watch.h"
+static AvahiSimplePoll *simple_poll = NULL;
+#else
+#include "thread-watch.h"
+static AvahiThreadedPoll *threaded_poll = NULL;
+#endif
+
+static void callback(AvahiWatch *w, int fd, AvahiWatchEvent event, AVAHI_GCC_UNUSED void *userdata) {
+
+    if (event & AVAHI_WATCH_IN) {
+        ssize_t r;
+        char c;
+
+        if ((r = read(fd, &c, 1)) <= 0) {
+            fprintf(stderr, "read() failed: %s\n", r < 0 ? strerror(errno) : "EOF");
+            api->watch_free(w);
+            return;
+        }
+
+        printf("Read: %c\n", c >= 32 && c < 127 ? c : '.');
+    }
+}
+
+static void wakeup(AvahiTimeout *t, AVAHI_GCC_UNUSED void *userdata) {
+    static int i = 0;
+    struct timeval tv;
+
+    printf("Wakeup #%i\n", i++);
+
+    if (i > 10) {
+#ifndef USE_THREAD
+        avahi_simple_poll_quit(simple_poll);
+#else
+        avahi_threaded_poll_quit(threaded_poll);
+#endif
+    } else {
+        avahi_elapse_time(&tv, 1000, 0);
+        api->timeout_update(t, &tv);
+    }
+}
+
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
+    struct timeval tv;
+
+#ifndef USE_THREAD
+    simple_poll = avahi_simple_poll_new();
+    assert(simple_poll);
+    api = avahi_simple_poll_get(simple_poll);
+    assert(api);
+#else
+    threaded_poll = avahi_threaded_poll_new();
+    assert(threaded_poll);
+    api = avahi_threaded_poll_get(threaded_poll);
+    assert(api);
+#endif
+
+    api->watch_new(api, 0, AVAHI_WATCH_IN, callback, NULL);
+
+    avahi_elapse_time(&tv, 1000, 0);
+    api->timeout_new(api, &tv, wakeup, NULL);
+
+#ifndef USE_THREAD
+    /* Our main loop */
+    avahi_simple_poll_loop(simple_poll);
+    avahi_simple_poll_free(simple_poll);
+
+#else
+    avahi_threaded_poll_start(threaded_poll);
+
+    fprintf(stderr, "Now doing some stupid stuff ...\n");
+    sleep(20);
+    fprintf(stderr, "... stupid stuff is done.\n");
+
+    avahi_threaded_poll_free(threaded_poll);
+
+#endif
+
+    return 0;
+}
diff --git a/avahi-0.6.31/avahi-common/watch.h b/avahi-0.6.31/avahi-common/watch.h
new file mode 100644
index 0000000..86e63d3
--- /dev/null
+++ b/avahi-0.6.31/avahi-common/watch.h
@@ -0,0 +1,97 @@
+#ifndef foowatchhfoo
+#define foowatchhfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+/** \file watch.h Simplistic main loop abstraction */
+
+#include <sys/poll.h>
+#include <sys/time.h>
+
+#include <avahi-common/cdecl.h>
+
+AVAHI_C_DECL_BEGIN
+
+/** An I/O watch object */
+typedef struct AvahiWatch AvahiWatch;
+
+/** A timeout watch object */
+typedef struct AvahiTimeout AvahiTimeout;
+
+/** An event polling abstraction object */
+typedef struct AvahiPoll AvahiPoll;
+
+/** Type of watch events */
+typedef enum {
+    AVAHI_WATCH_IN = POLLIN,      /**< Input event */
+    AVAHI_WATCH_OUT = POLLOUT,    /**< Output event */
+    AVAHI_WATCH_ERR = POLLERR,    /**< Error event */
+    AVAHI_WATCH_HUP = POLLHUP     /**< Hangup event */
+} AvahiWatchEvent;
+
+/** Called whenever an I/O event happens  on an I/O watch */
+typedef void (*AvahiWatchCallback)(AvahiWatch *w, int fd, AvahiWatchEvent event, void *userdata);
+
+/** Called when the timeout is reached */
+typedef void (*AvahiTimeoutCallback)(AvahiTimeout *t, void *userdata);
+
+/** Defines an abstracted event polling API. This may be used to
+ connect Avahi to other main loops. This is loosely based on Unix
+ poll(2). A consumer will call watch_new() for all file descriptors it
+ wants to listen for events on. In addition he can call timeout_new()
+ to define time based events .*/
+struct AvahiPoll {
+
+    /** Some abstract user data usable by the provider of the API */
+    void* userdata;
+
+    /** Create a new watch for the specified file descriptor and for
+     * the specified events. The API will call the callback function
+     * whenever any of the events happens. */
+    AvahiWatch* (*watch_new)(const AvahiPoll *api, int fd, AvahiWatchEvent event, AvahiWatchCallback callback, void *userdata);
+
+    /** Update the events to wait for. It is safe to call this function from an AvahiWatchCallback */
+    void (*watch_update)(AvahiWatch *w, AvahiWatchEvent event);
+
+    /** Return the events that happened. It is safe to call this function from an AvahiWatchCallback  */
+    AvahiWatchEvent (*watch_get_events)(AvahiWatch *w);
+
+    /** Free a watch. It is safe to call this function from an AvahiWatchCallback */
+    void (*watch_free)(AvahiWatch *w);
+
+    /** Set a wakeup time for the polling loop. The API will call the
+    callback function when the absolute time *tv is reached. If tv is
+    NULL, the timeout is disabled. After the timeout expired the
+    callback function will be called and the timeout is disabled. You
+    can reenable it by calling timeout_update()  */
+    AvahiTimeout* (*timeout_new)(const AvahiPoll *api, const struct timeval *tv, AvahiTimeoutCallback callback, void *userdata);
+
+    /** Update the absolute expiration time for a timeout, If tv is
+     * NULL, the timeout is disabled. It is safe to call this function from an AvahiTimeoutCallback */
+    void (*timeout_update)(AvahiTimeout *, const struct timeval *tv);
+
+    /** Free a timeout. It is safe to call this function from an AvahiTimeoutCallback */
+    void (*timeout_free)(AvahiTimeout *t);
+};
+
+AVAHI_C_DECL_END
+
+#endif
+
diff --git a/avahi-0.6.31/avahi-compat-howl.pc.in b/avahi-0.6.31/avahi-compat-howl.pc.in
new file mode 100644
index 0000000..b3cd02a
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-howl.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=${prefix}
+libdir=@libdir@
+includedir=${prefix}/include/avahi-compat-howl/
+
+Name: avahi-compat-howl
+Description: Avahi Multicast DNS Responder (HOWL Compatibility)
+Version: @HOWL_COMPAT_VERSION@
+Libs: -L${libdir} -lhowl
+Cflags: -D_REENTRANT -I${includedir}
diff --git a/avahi-0.6.31/avahi-compat-howl/Makefile.am b/avahi-0.6.31/avahi-compat-howl/Makefile.am
new file mode 100644
index 0000000..bc67142
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-howl/Makefile.am
@@ -0,0 +1,109 @@
+# This file is part of avahi.
+#
+# avahi 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 of the
+# License, or (at your option) any later version.
+#
+# avahi 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 General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+AM_CFLAGS=-I$(top_srcdir)
+
+# This cool debug trap works on i386/gcc only
+AM_CFLAGS+='-DDEBUG_TRAP=__asm__("int $$3")'
+
+SUBDIRS = . samples
+
+if HAVE_DBUS
+if ENABLE_COMPAT_HOWL
+
+avahi_compat_howldir=$(includedir)/avahi-compat-howl
+avahi_compat_howl_rendezvousdir=$(avahi_compat_howldir)/rendezvous
+avahi_compat_howl_corbydir=$(avahi_compat_howldir)/corby
+avahi_compat_howl_discoverydir=$(avahi_compat_howldir)/discovery
+avahi_compat_howl_saltdir=$(avahi_compat_howldir)/salt
+
+avahi_compat_howl_HEADERS = \
+	include/howl.h
+
+avahi_compat_howl_rendezvous_HEADERS = \
+	include/rendezvous/rendezvous.h \
+	include/rendezvous/text_record.h
+
+avahi_compat_howl_corby_HEADERS = \
+	include/corby/message.h \
+	include/corby/object.h \
+	include/corby/orb.h \
+	include/corby/corby.h \
+	include/corby/channel.h \
+	include/corby/buffer.h
+
+avahi_compat_howl_discovery_HEADERS = \
+	include/discovery/discovery.h \
+	include/discovery/text_record.h
+
+avahi_compat_howl_salt_HEADERS = \
+	include/salt/socket.h \
+	include/salt/address.h \
+	include/salt/platform.h \
+	include/salt/signal.h \
+	include/salt/interface.h \
+	include/salt/salt.h \
+	include/salt/time.h \
+	include/salt/debug.h
+
+HOWLHEADERS = \
+	$(avahi_compat_howl_HEADERS) \
+	$(avahi_compat_howl_rendezvous_HEADERS) \
+	$(avahi_compat_howl_corby_HEADERS) \
+	$(avahi_compat_howl_discovery_HEADERS) \
+	$(avahi_compat_howl_salt_HEADERS)
+
+lib_LTLIBRARIES = libhowl.la
+
+if ENABLE_TESTS
+noinst_PROGRAMS = address-test text-test browse-domain-test
+endif
+
+libhowl_la_SOURCES = \
+	$(HOWLHEADERS) \
+	warn.c warn.h \
+	unsupported.c \
+	address.c \
+	text.c \
+	compat.c
+libhowl_la_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -I $(srcdir)/include
+libhowl_la_LDFLAGS = $(AM_LDFLAGS)  -version-info $(LIBAVAHI_COMPAT_HOWL_VERSION_INFO) $(PTHREAD_LIBS) $(PTHREAD_CFLAGS) ../avahi-common/libavahi-common.la ../avahi-client/libavahi-client.la
+
+address_test_SOURCES = \
+	$(HOWLHEADERS) \
+	address.c \
+	address-test.c \
+	warn.c warn.h
+address_test_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -I $(srcdir)/include
+address_test_LDADD = $(AM_LDADD) $(PTHREAD_LIBS) $(PTHREAD_CFLAGS) ../avahi-common/libavahi-common.la
+
+text_test_SOURCES = \
+	$(HOWLHEADERS) \
+	text.c \
+	text-test.c \
+	warn.c warn.h
+text_test_CFLAGS = $(AM_CFLAGS)  $(PTHREAD_CFLAGS) -I $(srcdir)/include
+text_test_LDADD = $(AM_LDADD) $(PTHREAD_LIBS) $(PTHREAD_CFLAGS) ../avahi-common/libavahi-common.la
+
+browse_domain_test_SOURCES = \
+	$(HOWLHEADERS) \
+	browse-domain-test.c
+browse_domain_test_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -I $(srcdir)/include
+browse_domain_test_LDADD = $(AM_LDADD) $(PTHREAD_LIBS) $(PTHREAD_CFLAGS) libhowl.la
+
+endif
+endif
diff --git a/avahi-0.6.31/avahi-compat-howl/Makefile.in b/avahi-0.6.31/avahi-compat-howl/Makefile.in
new file mode 100644
index 0000000..a659fc2
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-howl/Makefile.in
@@ -0,0 +1,1337 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# This file is part of avahi.
+#
+# avahi 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 of the
+# License, or (at your option) any later version.
+#
+# avahi 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 General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@ENABLE_COMPAT_HOWL_TRUE@@ENABLE_TESTS_TRUE@@HAVE_DBUS_TRUE@noinst_PROGRAMS = address-test$(EXEEXT) \
+@ENABLE_COMPAT_HOWL_TRUE@@ENABLE_TESTS_TRUE@@HAVE_DBUS_TRUE@	text-test$(EXEEXT) \
+@ENABLE_COMPAT_HOWL_TRUE@@ENABLE_TESTS_TRUE@@HAVE_DBUS_TRUE@	browse-domain-test$(EXEEXT)
+subdir = avahi-compat-howl
+DIST_COMMON = $(am__avahi_compat_howl_HEADERS_DIST) \
+	$(am__avahi_compat_howl_corby_HEADERS_DIST) \
+	$(am__avahi_compat_howl_discovery_HEADERS_DIST) \
+	$(am__avahi_compat_howl_rendezvous_HEADERS_DIST) \
+	$(am__avahi_compat_howl_salt_HEADERS_DIST) \
+	$(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/common/acx_pthread.m4 \
+	$(top_srcdir)/common/gcc_stack_protect.m4 \
+	$(top_srcdir)/common/gcc_visibility.m4 \
+	$(top_srcdir)/common/intltool.m4 \
+	$(top_srcdir)/common/introspection.m4 \
+	$(top_srcdir)/common/libtool.m4 \
+	$(top_srcdir)/common/ltoptions.m4 \
+	$(top_srcdir)/common/ltsugar.m4 \
+	$(top_srcdir)/common/ltversion.m4 \
+	$(top_srcdir)/common/lt~obsolete.m4 \
+	$(top_srcdir)/common/nls.m4 $(top_srcdir)/common/python.m4 \
+	$(top_srcdir)/acinclude.m4 $(top_srcdir)/common/doxygen.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+am__installdirs = "$(DESTDIR)$(libdir)" \
+	"$(DESTDIR)$(avahi_compat_howldir)" \
+	"$(DESTDIR)$(avahi_compat_howl_corbydir)" \
+	"$(DESTDIR)$(avahi_compat_howl_discoverydir)" \
+	"$(DESTDIR)$(avahi_compat_howl_rendezvousdir)" \
+	"$(DESTDIR)$(avahi_compat_howl_saltdir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+libhowl_la_LIBADD =
+am__libhowl_la_SOURCES_DIST = include/howl.h \
+	include/rendezvous/rendezvous.h \
+	include/rendezvous/text_record.h include/corby/message.h \
+	include/corby/object.h include/corby/orb.h \
+	include/corby/corby.h include/corby/channel.h \
+	include/corby/buffer.h include/discovery/discovery.h \
+	include/discovery/text_record.h include/salt/socket.h \
+	include/salt/address.h include/salt/platform.h \
+	include/salt/signal.h include/salt/interface.h \
+	include/salt/salt.h include/salt/time.h include/salt/debug.h \
+	warn.c warn.h unsupported.c address.c text.c compat.c
+am__objects_1 =
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@am__objects_2 =  \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	$(am__objects_1) \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	$(am__objects_1) \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	$(am__objects_1) \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	$(am__objects_1) \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	$(am__objects_1)
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@am_libhowl_la_OBJECTS =  \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	$(am__objects_2) \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	libhowl_la-warn.lo \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	libhowl_la-unsupported.lo \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	libhowl_la-address.lo \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	libhowl_la-text.lo \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	libhowl_la-compat.lo
+libhowl_la_OBJECTS = $(am_libhowl_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+libhowl_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libhowl_la_CFLAGS) \
+	$(CFLAGS) $(libhowl_la_LDFLAGS) $(LDFLAGS) -o $@
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@am_libhowl_la_rpath = -rpath \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	$(libdir)
+PROGRAMS = $(noinst_PROGRAMS)
+am__address_test_SOURCES_DIST = include/howl.h \
+	include/rendezvous/rendezvous.h \
+	include/rendezvous/text_record.h include/corby/message.h \
+	include/corby/object.h include/corby/orb.h \
+	include/corby/corby.h include/corby/channel.h \
+	include/corby/buffer.h include/discovery/discovery.h \
+	include/discovery/text_record.h include/salt/socket.h \
+	include/salt/address.h include/salt/platform.h \
+	include/salt/signal.h include/salt/interface.h \
+	include/salt/salt.h include/salt/time.h include/salt/debug.h \
+	address.c address-test.c warn.c warn.h
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@am_address_test_OBJECTS =  \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	$(am__objects_2) \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	address_test-address.$(OBJEXT) \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	address_test-address-test.$(OBJEXT) \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	address_test-warn.$(OBJEXT)
+address_test_OBJECTS = $(am_address_test_OBJECTS)
+am__DEPENDENCIES_1 =
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@address_test_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	$(am__DEPENDENCIES_1) \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	../avahi-common/libavahi-common.la
+address_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(address_test_CFLAGS) \
+	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am__browse_domain_test_SOURCES_DIST = include/howl.h \
+	include/rendezvous/rendezvous.h \
+	include/rendezvous/text_record.h include/corby/message.h \
+	include/corby/object.h include/corby/orb.h \
+	include/corby/corby.h include/corby/channel.h \
+	include/corby/buffer.h include/discovery/discovery.h \
+	include/discovery/text_record.h include/salt/socket.h \
+	include/salt/address.h include/salt/platform.h \
+	include/salt/signal.h include/salt/interface.h \
+	include/salt/salt.h include/salt/time.h include/salt/debug.h \
+	browse-domain-test.c
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@am_browse_domain_test_OBJECTS =  \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	$(am__objects_2) \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	browse_domain_test-browse-domain-test.$(OBJEXT)
+browse_domain_test_OBJECTS = $(am_browse_domain_test_OBJECTS)
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@browse_domain_test_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	$(am__DEPENDENCIES_1) \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	libhowl.la
+browse_domain_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(browse_domain_test_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+am__text_test_SOURCES_DIST = include/howl.h \
+	include/rendezvous/rendezvous.h \
+	include/rendezvous/text_record.h include/corby/message.h \
+	include/corby/object.h include/corby/orb.h \
+	include/corby/corby.h include/corby/channel.h \
+	include/corby/buffer.h include/discovery/discovery.h \
+	include/discovery/text_record.h include/salt/socket.h \
+	include/salt/address.h include/salt/platform.h \
+	include/salt/signal.h include/salt/interface.h \
+	include/salt/salt.h include/salt/time.h include/salt/debug.h \
+	text.c text-test.c warn.c warn.h
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@am_text_test_OBJECTS =  \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	$(am__objects_2) \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	text_test-text.$(OBJEXT) \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	text_test-text-test.$(OBJEXT) \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	text_test-warn.$(OBJEXT)
+text_test_OBJECTS = $(am_text_test_OBJECTS)
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@text_test_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	$(am__DEPENDENCIES_1) \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	../avahi-common/libavahi-common.la
+text_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(text_test_CFLAGS) \
+	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC    " $@;
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(libhowl_la_SOURCES) $(address_test_SOURCES) \
+	$(browse_domain_test_SOURCES) $(text_test_SOURCES)
+DIST_SOURCES = $(am__libhowl_la_SOURCES_DIST) \
+	$(am__address_test_SOURCES_DIST) \
+	$(am__browse_domain_test_SOURCES_DIST) \
+	$(am__text_test_SOURCES_DIST)
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-dvi-recursive install-exec-recursive \
+	install-html-recursive install-info-recursive \
+	install-pdf-recursive install-ps-recursive install-recursive \
+	installcheck-recursive installdirs-recursive pdf-recursive \
+	ps-recursive uninstall-recursive
+am__avahi_compat_howl_HEADERS_DIST = include/howl.h
+am__avahi_compat_howl_corby_HEADERS_DIST = include/corby/message.h \
+	include/corby/object.h include/corby/orb.h \
+	include/corby/corby.h include/corby/channel.h \
+	include/corby/buffer.h
+am__avahi_compat_howl_discovery_HEADERS_DIST =  \
+	include/discovery/discovery.h include/discovery/text_record.h
+am__avahi_compat_howl_rendezvous_HEADERS_DIST =  \
+	include/rendezvous/rendezvous.h \
+	include/rendezvous/text_record.h
+am__avahi_compat_howl_salt_HEADERS_DIST = include/salt/socket.h \
+	include/salt/address.h include/salt/platform.h \
+	include/salt/signal.h include/salt/interface.h \
+	include/salt/salt.h include/salt/time.h include/salt/debug.h
+HEADERS = $(avahi_compat_howl_HEADERS) \
+	$(avahi_compat_howl_corby_HEADERS) \
+	$(avahi_compat_howl_discovery_HEADERS) \
+	$(avahi_compat_howl_rendezvous_HEADERS) \
+	$(avahi_compat_howl_salt_HEADERS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+	distdir
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AVAHI_AUTOIPD_GROUP = @AVAHI_AUTOIPD_GROUP@
+AVAHI_AUTOIPD_USER = @AVAHI_AUTOIPD_USER@
+AVAHI_GROUP = @AVAHI_GROUP@
+AVAHI_PRIV_ACCESS_GROUP = @AVAHI_PRIV_ACCESS_GROUP@
+AVAHI_USER = @AVAHI_USER@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
+DBUS_SYSTEM_BUS_DEFAULT_ADDRESS = @DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@
+DBUS_SYS_DIR = @DBUS_SYS_DIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+DX_CONFIG = @DX_CONFIG@
+DX_DOCDIR = @DX_DOCDIR@
+DX_DOT = @DX_DOT@
+DX_DOXYGEN = @DX_DOXYGEN@
+DX_DVIPS = @DX_DVIPS@
+DX_EGREP = @DX_EGREP@
+DX_ENV = @DX_ENV@
+DX_FLAG_chi = @DX_FLAG_chi@
+DX_FLAG_chm = @DX_FLAG_chm@
+DX_FLAG_doc = @DX_FLAG_doc@
+DX_FLAG_dot = @DX_FLAG_dot@
+DX_FLAG_html = @DX_FLAG_html@
+DX_FLAG_man = @DX_FLAG_man@
+DX_FLAG_pdf = @DX_FLAG_pdf@
+DX_FLAG_ps = @DX_FLAG_ps@
+DX_FLAG_rtf = @DX_FLAG_rtf@
+DX_FLAG_xml = @DX_FLAG_xml@
+DX_HHC = @DX_HHC@
+DX_LATEX = @DX_LATEX@
+DX_MAKEINDEX = @DX_MAKEINDEX@
+DX_PDFLATEX = @DX_PDFLATEX@
+DX_PERL = @DX_PERL@
+DX_PROJECT = @DX_PROJECT@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GACUTIL = @GACUTIL@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB20_CFLAGS = @GLIB20_CFLAGS@
+GLIB20_LIBS = @GLIB20_LIBS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GOBJECT_CFLAGS = @GOBJECT_CFLAGS@
+GOBJECT_LIBS = @GOBJECT_LIBS@
+GREP = @GREP@
+GTK20_CFLAGS = @GTK20_CFLAGS@
+GTK20_LIBS = @GTK20_LIBS@
+GTK30_CFLAGS = @GTK30_CFLAGS@
+GTK30_LIBS = @GTK30_LIBS@
+HOWL_COMPAT_VERSION = @HOWL_COMPAT_VERSION@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
+INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
+INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
+INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
+INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
+INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
+INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBAVAHI_CLIENT_VERSION_INFO = @LIBAVAHI_CLIENT_VERSION_INFO@
+LIBAVAHI_COMMON_VERSION_INFO = @LIBAVAHI_COMMON_VERSION_INFO@
+LIBAVAHI_COMPAT_HOWL_VERSION_INFO = @LIBAVAHI_COMPAT_HOWL_VERSION_INFO@
+LIBAVAHI_COMPAT_LIBDNS_SD_VERSION_INFO = @LIBAVAHI_COMPAT_LIBDNS_SD_VERSION_INFO@
+LIBAVAHI_CORE_VERSION_INFO = @LIBAVAHI_CORE_VERSION_INFO@
+LIBAVAHI_GLIB_VERSION_INFO = @LIBAVAHI_GLIB_VERSION_INFO@
+LIBAVAHI_GOBJECT_VERSION_INFO = @LIBAVAHI_GOBJECT_VERSION_INFO@
+LIBAVAHI_QT3_VERSION_INFO = @LIBAVAHI_QT3_VERSION_INFO@
+LIBAVAHI_QT4_VERSION_INFO = @LIBAVAHI_QT4_VERSION_INFO@
+LIBAVAHI_UI_VERSION_INFO = @LIBAVAHI_UI_VERSION_INFO@
+LIBDAEMON_CFLAGS = @LIBDAEMON_CFLAGS@
+LIBDAEMON_LIBS = @LIBDAEMON_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MCS = @MCS@
+MDASSEMBLER = @MDASSEMBLER@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MOC_QT3 = @MOC_QT3@
+MOC_QT4 = @MOC_QT4@
+MONODOCER = @MONODOCER@
+MONODOC_CFLAGS = @MONODOC_CFLAGS@
+MONODOC_DIR = @MONODOC_DIR@
+MONODOC_LIBS = @MONODOC_LIBS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+QT3_CFLAGS = @QT3_CFLAGS@
+QT3_LIBS = @QT3_LIBS@
+QT4_CFLAGS = @QT4_CFLAGS@
+QT4_LIBS = @QT4_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STOW = @STOW@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+VISIBILITY_HIDDEN_CFLAGS = @VISIBILITY_HIDDEN_CFLAGS@
+XGETTEXT = @XGETTEXT@
+XML_CFLAGS = @XML_CFLAGS@
+XML_LIBS = @XML_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+avahi_runtime_dir = @avahi_runtime_dir@
+avahi_socket = @avahi_socket@
+avahilocaledir = @avahilocaledir@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+have_pkg_config = @have_pkg_config@
+have_xmltoman = @have_xmltoman@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+interfacesdir = @interfacesdir@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+systemdsystemunitdir = @systemdsystemunitdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# This cool debug trap works on i386/gcc only
+AM_CFLAGS = -I$(top_srcdir) '-DDEBUG_TRAP=__asm__("int $$3")'
+SUBDIRS = . samples
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@avahi_compat_howldir = $(includedir)/avahi-compat-howl
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@avahi_compat_howl_rendezvousdir = $(avahi_compat_howldir)/rendezvous
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@avahi_compat_howl_corbydir = $(avahi_compat_howldir)/corby
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@avahi_compat_howl_discoverydir = $(avahi_compat_howldir)/discovery
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@avahi_compat_howl_saltdir = $(avahi_compat_howldir)/salt
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@avahi_compat_howl_HEADERS = \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	include/howl.h
+
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@avahi_compat_howl_rendezvous_HEADERS = \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	include/rendezvous/rendezvous.h \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	include/rendezvous/text_record.h
+
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@avahi_compat_howl_corby_HEADERS = \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	include/corby/message.h \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	include/corby/object.h \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	include/corby/orb.h \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	include/corby/corby.h \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	include/corby/channel.h \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	include/corby/buffer.h
+
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@avahi_compat_howl_discovery_HEADERS = \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	include/discovery/discovery.h \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	include/discovery/text_record.h
+
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@avahi_compat_howl_salt_HEADERS = \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	include/salt/socket.h \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	include/salt/address.h \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	include/salt/platform.h \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	include/salt/signal.h \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	include/salt/interface.h \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	include/salt/salt.h \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	include/salt/time.h \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	include/salt/debug.h
+
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@HOWLHEADERS = \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	$(avahi_compat_howl_HEADERS) \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	$(avahi_compat_howl_rendezvous_HEADERS) \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	$(avahi_compat_howl_corby_HEADERS) \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	$(avahi_compat_howl_discovery_HEADERS) \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	$(avahi_compat_howl_salt_HEADERS)
+
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@lib_LTLIBRARIES = libhowl.la
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@libhowl_la_SOURCES = \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	$(HOWLHEADERS) \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	warn.c warn.h \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	unsupported.c \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	address.c \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	text.c \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	compat.c
+
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@libhowl_la_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -I $(srcdir)/include
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@libhowl_la_LDFLAGS = $(AM_LDFLAGS)  -version-info $(LIBAVAHI_COMPAT_HOWL_VERSION_INFO) $(PTHREAD_LIBS) $(PTHREAD_CFLAGS) ../avahi-common/libavahi-common.la ../avahi-client/libavahi-client.la
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@address_test_SOURCES = \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	$(HOWLHEADERS) \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	address.c \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	address-test.c \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	warn.c warn.h
+
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@address_test_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -I $(srcdir)/include
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@address_test_LDADD = $(AM_LDADD) $(PTHREAD_LIBS) $(PTHREAD_CFLAGS) ../avahi-common/libavahi-common.la
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@text_test_SOURCES = \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	$(HOWLHEADERS) \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	text.c \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	text-test.c \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	warn.c warn.h
+
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@text_test_CFLAGS = $(AM_CFLAGS)  $(PTHREAD_CFLAGS) -I $(srcdir)/include
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@text_test_LDADD = $(AM_LDADD) $(PTHREAD_LIBS) $(PTHREAD_CFLAGS) ../avahi-common/libavahi-common.la
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@browse_domain_test_SOURCES = \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	$(HOWLHEADERS) \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	browse-domain-test.c
+
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@browse_domain_test_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -I $(srcdir)/include
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@browse_domain_test_LDADD = $(AM_LDADD) $(PTHREAD_LIBS) $(PTHREAD_CFLAGS) libhowl.la
+all: all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign avahi-compat-howl/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign avahi-compat-howl/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	list2=; for p in $$list; do \
+	  if test -f $$p; then \
+	    list2="$$list2 $$p"; \
+	  else :; fi; \
+	done; \
+	test -z "$$list2" || { \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+	}
+
+uninstall-libLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	for p in $$list; do \
+	  $(am__strip_dir) \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+	done
+
+clean-libLTLIBRARIES:
+	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libhowl.la: $(libhowl_la_OBJECTS) $(libhowl_la_DEPENDENCIES) $(EXTRA_libhowl_la_DEPENDENCIES) 
+	$(AM_V_CCLD)$(libhowl_la_LINK) $(am_libhowl_la_rpath) $(libhowl_la_OBJECTS) $(libhowl_la_LIBADD) $(LIBS)
+
+clean-noinstPROGRAMS:
+	@list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+address-test$(EXEEXT): $(address_test_OBJECTS) $(address_test_DEPENDENCIES) $(EXTRA_address_test_DEPENDENCIES) 
+	@rm -f address-test$(EXEEXT)
+	$(AM_V_CCLD)$(address_test_LINK) $(address_test_OBJECTS) $(address_test_LDADD) $(LIBS)
+browse-domain-test$(EXEEXT): $(browse_domain_test_OBJECTS) $(browse_domain_test_DEPENDENCIES) $(EXTRA_browse_domain_test_DEPENDENCIES) 
+	@rm -f browse-domain-test$(EXEEXT)
+	$(AM_V_CCLD)$(browse_domain_test_LINK) $(browse_domain_test_OBJECTS) $(browse_domain_test_LDADD) $(LIBS)
+text-test$(EXEEXT): $(text_test_OBJECTS) $(text_test_DEPENDENCIES) $(EXTRA_text_test_DEPENDENCIES) 
+	@rm -f text-test$(EXEEXT)
+	$(AM_V_CCLD)$(text_test_LINK) $(text_test_OBJECTS) $(text_test_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/address_test-address-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/address_test-address.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/address_test-warn.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/browse_domain_test-browse-domain-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhowl_la-address.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhowl_la-compat.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhowl_la-text.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhowl_la-unsupported.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhowl_la-warn.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/text_test-text-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/text_test-text.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/text_test-warn.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+libhowl_la-warn.lo: warn.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhowl_la_CFLAGS) $(CFLAGS) -MT libhowl_la-warn.lo -MD -MP -MF $(DEPDIR)/libhowl_la-warn.Tpo -c -o libhowl_la-warn.lo `test -f 'warn.c' || echo '$(srcdir)/'`warn.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libhowl_la-warn.Tpo $(DEPDIR)/libhowl_la-warn.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='warn.c' object='libhowl_la-warn.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhowl_la_CFLAGS) $(CFLAGS) -c -o libhowl_la-warn.lo `test -f 'warn.c' || echo '$(srcdir)/'`warn.c
+
+libhowl_la-unsupported.lo: unsupported.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhowl_la_CFLAGS) $(CFLAGS) -MT libhowl_la-unsupported.lo -MD -MP -MF $(DEPDIR)/libhowl_la-unsupported.Tpo -c -o libhowl_la-unsupported.lo `test -f 'unsupported.c' || echo '$(srcdir)/'`unsupported.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libhowl_la-unsupported.Tpo $(DEPDIR)/libhowl_la-unsupported.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='unsupported.c' object='libhowl_la-unsupported.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhowl_la_CFLAGS) $(CFLAGS) -c -o libhowl_la-unsupported.lo `test -f 'unsupported.c' || echo '$(srcdir)/'`unsupported.c
+
+libhowl_la-address.lo: address.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhowl_la_CFLAGS) $(CFLAGS) -MT libhowl_la-address.lo -MD -MP -MF $(DEPDIR)/libhowl_la-address.Tpo -c -o libhowl_la-address.lo `test -f 'address.c' || echo '$(srcdir)/'`address.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libhowl_la-address.Tpo $(DEPDIR)/libhowl_la-address.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='address.c' object='libhowl_la-address.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhowl_la_CFLAGS) $(CFLAGS) -c -o libhowl_la-address.lo `test -f 'address.c' || echo '$(srcdir)/'`address.c
+
+libhowl_la-text.lo: text.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhowl_la_CFLAGS) $(CFLAGS) -MT libhowl_la-text.lo -MD -MP -MF $(DEPDIR)/libhowl_la-text.Tpo -c -o libhowl_la-text.lo `test -f 'text.c' || echo '$(srcdir)/'`text.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libhowl_la-text.Tpo $(DEPDIR)/libhowl_la-text.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='text.c' object='libhowl_la-text.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhowl_la_CFLAGS) $(CFLAGS) -c -o libhowl_la-text.lo `test -f 'text.c' || echo '$(srcdir)/'`text.c
+
+libhowl_la-compat.lo: compat.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhowl_la_CFLAGS) $(CFLAGS) -MT libhowl_la-compat.lo -MD -MP -MF $(DEPDIR)/libhowl_la-compat.Tpo -c -o libhowl_la-compat.lo `test -f 'compat.c' || echo '$(srcdir)/'`compat.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libhowl_la-compat.Tpo $(DEPDIR)/libhowl_la-compat.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='compat.c' object='libhowl_la-compat.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhowl_la_CFLAGS) $(CFLAGS) -c -o libhowl_la-compat.lo `test -f 'compat.c' || echo '$(srcdir)/'`compat.c
+
+address_test-address.o: address.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(address_test_CFLAGS) $(CFLAGS) -MT address_test-address.o -MD -MP -MF $(DEPDIR)/address_test-address.Tpo -c -o address_test-address.o `test -f 'address.c' || echo '$(srcdir)/'`address.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/address_test-address.Tpo $(DEPDIR)/address_test-address.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='address.c' object='address_test-address.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(address_test_CFLAGS) $(CFLAGS) -c -o address_test-address.o `test -f 'address.c' || echo '$(srcdir)/'`address.c
+
+address_test-address.obj: address.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(address_test_CFLAGS) $(CFLAGS) -MT address_test-address.obj -MD -MP -MF $(DEPDIR)/address_test-address.Tpo -c -o address_test-address.obj `if test -f 'address.c'; then $(CYGPATH_W) 'address.c'; else $(CYGPATH_W) '$(srcdir)/address.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/address_test-address.Tpo $(DEPDIR)/address_test-address.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='address.c' object='address_test-address.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(address_test_CFLAGS) $(CFLAGS) -c -o address_test-address.obj `if test -f 'address.c'; then $(CYGPATH_W) 'address.c'; else $(CYGPATH_W) '$(srcdir)/address.c'; fi`
+
+address_test-address-test.o: address-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(address_test_CFLAGS) $(CFLAGS) -MT address_test-address-test.o -MD -MP -MF $(DEPDIR)/address_test-address-test.Tpo -c -o address_test-address-test.o `test -f 'address-test.c' || echo '$(srcdir)/'`address-test.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/address_test-address-test.Tpo $(DEPDIR)/address_test-address-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='address-test.c' object='address_test-address-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(address_test_CFLAGS) $(CFLAGS) -c -o address_test-address-test.o `test -f 'address-test.c' || echo '$(srcdir)/'`address-test.c
+
+address_test-address-test.obj: address-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(address_test_CFLAGS) $(CFLAGS) -MT address_test-address-test.obj -MD -MP -MF $(DEPDIR)/address_test-address-test.Tpo -c -o address_test-address-test.obj `if test -f 'address-test.c'; then $(CYGPATH_W) 'address-test.c'; else $(CYGPATH_W) '$(srcdir)/address-test.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/address_test-address-test.Tpo $(DEPDIR)/address_test-address-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='address-test.c' object='address_test-address-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(address_test_CFLAGS) $(CFLAGS) -c -o address_test-address-test.obj `if test -f 'address-test.c'; then $(CYGPATH_W) 'address-test.c'; else $(CYGPATH_W) '$(srcdir)/address-test.c'; fi`
+
+address_test-warn.o: warn.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(address_test_CFLAGS) $(CFLAGS) -MT address_test-warn.o -MD -MP -MF $(DEPDIR)/address_test-warn.Tpo -c -o address_test-warn.o `test -f 'warn.c' || echo '$(srcdir)/'`warn.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/address_test-warn.Tpo $(DEPDIR)/address_test-warn.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='warn.c' object='address_test-warn.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(address_test_CFLAGS) $(CFLAGS) -c -o address_test-warn.o `test -f 'warn.c' || echo '$(srcdir)/'`warn.c
+
+address_test-warn.obj: warn.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(address_test_CFLAGS) $(CFLAGS) -MT address_test-warn.obj -MD -MP -MF $(DEPDIR)/address_test-warn.Tpo -c -o address_test-warn.obj `if test -f 'warn.c'; then $(CYGPATH_W) 'warn.c'; else $(CYGPATH_W) '$(srcdir)/warn.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/address_test-warn.Tpo $(DEPDIR)/address_test-warn.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='warn.c' object='address_test-warn.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(address_test_CFLAGS) $(CFLAGS) -c -o address_test-warn.obj `if test -f 'warn.c'; then $(CYGPATH_W) 'warn.c'; else $(CYGPATH_W) '$(srcdir)/warn.c'; fi`
+
+browse_domain_test-browse-domain-test.o: browse-domain-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(browse_domain_test_CFLAGS) $(CFLAGS) -MT browse_domain_test-browse-domain-test.o -MD -MP -MF $(DEPDIR)/browse_domain_test-browse-domain-test.Tpo -c -o browse_domain_test-browse-domain-test.o `test -f 'browse-domain-test.c' || echo '$(srcdir)/'`browse-domain-test.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/browse_domain_test-browse-domain-test.Tpo $(DEPDIR)/browse_domain_test-browse-domain-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='browse-domain-test.c' object='browse_domain_test-browse-domain-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(browse_domain_test_CFLAGS) $(CFLAGS) -c -o browse_domain_test-browse-domain-test.o `test -f 'browse-domain-test.c' || echo '$(srcdir)/'`browse-domain-test.c
+
+browse_domain_test-browse-domain-test.obj: browse-domain-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(browse_domain_test_CFLAGS) $(CFLAGS) -MT browse_domain_test-browse-domain-test.obj -MD -MP -MF $(DEPDIR)/browse_domain_test-browse-domain-test.Tpo -c -o browse_domain_test-browse-domain-test.obj `if test -f 'browse-domain-test.c'; then $(CYGPATH_W) 'browse-domain-test.c'; else $(CYGPATH_W) '$(srcdir)/browse-domain-test.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/browse_domain_test-browse-domain-test.Tpo $(DEPDIR)/browse_domain_test-browse-domain-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='browse-domain-test.c' object='browse_domain_test-browse-domain-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(browse_domain_test_CFLAGS) $(CFLAGS) -c -o browse_domain_test-browse-domain-test.obj `if test -f 'browse-domain-test.c'; then $(CYGPATH_W) 'browse-domain-test.c'; else $(CYGPATH_W) '$(srcdir)/browse-domain-test.c'; fi`
+
+text_test-text.o: text.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(text_test_CFLAGS) $(CFLAGS) -MT text_test-text.o -MD -MP -MF $(DEPDIR)/text_test-text.Tpo -c -o text_test-text.o `test -f 'text.c' || echo '$(srcdir)/'`text.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/text_test-text.Tpo $(DEPDIR)/text_test-text.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='text.c' object='text_test-text.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(text_test_CFLAGS) $(CFLAGS) -c -o text_test-text.o `test -f 'text.c' || echo '$(srcdir)/'`text.c
+
+text_test-text.obj: text.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(text_test_CFLAGS) $(CFLAGS) -MT text_test-text.obj -MD -MP -MF $(DEPDIR)/text_test-text.Tpo -c -o text_test-text.obj `if test -f 'text.c'; then $(CYGPATH_W) 'text.c'; else $(CYGPATH_W) '$(srcdir)/text.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/text_test-text.Tpo $(DEPDIR)/text_test-text.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='text.c' object='text_test-text.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(text_test_CFLAGS) $(CFLAGS) -c -o text_test-text.obj `if test -f 'text.c'; then $(CYGPATH_W) 'text.c'; else $(CYGPATH_W) '$(srcdir)/text.c'; fi`
+
+text_test-text-test.o: text-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(text_test_CFLAGS) $(CFLAGS) -MT text_test-text-test.o -MD -MP -MF $(DEPDIR)/text_test-text-test.Tpo -c -o text_test-text-test.o `test -f 'text-test.c' || echo '$(srcdir)/'`text-test.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/text_test-text-test.Tpo $(DEPDIR)/text_test-text-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='text-test.c' object='text_test-text-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(text_test_CFLAGS) $(CFLAGS) -c -o text_test-text-test.o `test -f 'text-test.c' || echo '$(srcdir)/'`text-test.c
+
+text_test-text-test.obj: text-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(text_test_CFLAGS) $(CFLAGS) -MT text_test-text-test.obj -MD -MP -MF $(DEPDIR)/text_test-text-test.Tpo -c -o text_test-text-test.obj `if test -f 'text-test.c'; then $(CYGPATH_W) 'text-test.c'; else $(CYGPATH_W) '$(srcdir)/text-test.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/text_test-text-test.Tpo $(DEPDIR)/text_test-text-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='text-test.c' object='text_test-text-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(text_test_CFLAGS) $(CFLAGS) -c -o text_test-text-test.obj `if test -f 'text-test.c'; then $(CYGPATH_W) 'text-test.c'; else $(CYGPATH_W) '$(srcdir)/text-test.c'; fi`
+
+text_test-warn.o: warn.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(text_test_CFLAGS) $(CFLAGS) -MT text_test-warn.o -MD -MP -MF $(DEPDIR)/text_test-warn.Tpo -c -o text_test-warn.o `test -f 'warn.c' || echo '$(srcdir)/'`warn.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/text_test-warn.Tpo $(DEPDIR)/text_test-warn.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='warn.c' object='text_test-warn.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(text_test_CFLAGS) $(CFLAGS) -c -o text_test-warn.o `test -f 'warn.c' || echo '$(srcdir)/'`warn.c
+
+text_test-warn.obj: warn.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(text_test_CFLAGS) $(CFLAGS) -MT text_test-warn.obj -MD -MP -MF $(DEPDIR)/text_test-warn.Tpo -c -o text_test-warn.obj `if test -f 'warn.c'; then $(CYGPATH_W) 'warn.c'; else $(CYGPATH_W) '$(srcdir)/warn.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/text_test-warn.Tpo $(DEPDIR)/text_test-warn.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='warn.c' object='text_test-warn.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(text_test_CFLAGS) $(CFLAGS) -c -o text_test-warn.obj `if test -f 'warn.c'; then $(CYGPATH_W) 'warn.c'; else $(CYGPATH_W) '$(srcdir)/warn.c'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+install-avahi_compat_howlHEADERS: $(avahi_compat_howl_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(avahi_compat_howldir)" || $(MKDIR_P) "$(DESTDIR)$(avahi_compat_howldir)"
+	@list='$(avahi_compat_howl_HEADERS)'; test -n "$(avahi_compat_howldir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(avahi_compat_howldir)'"; \
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(avahi_compat_howldir)" || exit $$?; \
+	done
+
+uninstall-avahi_compat_howlHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(avahi_compat_howl_HEADERS)'; test -n "$(avahi_compat_howldir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(avahi_compat_howldir)'; $(am__uninstall_files_from_dir)
+install-avahi_compat_howl_corbyHEADERS: $(avahi_compat_howl_corby_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(avahi_compat_howl_corbydir)" || $(MKDIR_P) "$(DESTDIR)$(avahi_compat_howl_corbydir)"
+	@list='$(avahi_compat_howl_corby_HEADERS)'; test -n "$(avahi_compat_howl_corbydir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(avahi_compat_howl_corbydir)'"; \
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(avahi_compat_howl_corbydir)" || exit $$?; \
+	done
+
+uninstall-avahi_compat_howl_corbyHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(avahi_compat_howl_corby_HEADERS)'; test -n "$(avahi_compat_howl_corbydir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(avahi_compat_howl_corbydir)'; $(am__uninstall_files_from_dir)
+install-avahi_compat_howl_discoveryHEADERS: $(avahi_compat_howl_discovery_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(avahi_compat_howl_discoverydir)" || $(MKDIR_P) "$(DESTDIR)$(avahi_compat_howl_discoverydir)"
+	@list='$(avahi_compat_howl_discovery_HEADERS)'; test -n "$(avahi_compat_howl_discoverydir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(avahi_compat_howl_discoverydir)'"; \
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(avahi_compat_howl_discoverydir)" || exit $$?; \
+	done
+
+uninstall-avahi_compat_howl_discoveryHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(avahi_compat_howl_discovery_HEADERS)'; test -n "$(avahi_compat_howl_discoverydir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(avahi_compat_howl_discoverydir)'; $(am__uninstall_files_from_dir)
+install-avahi_compat_howl_rendezvousHEADERS: $(avahi_compat_howl_rendezvous_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(avahi_compat_howl_rendezvousdir)" || $(MKDIR_P) "$(DESTDIR)$(avahi_compat_howl_rendezvousdir)"
+	@list='$(avahi_compat_howl_rendezvous_HEADERS)'; test -n "$(avahi_compat_howl_rendezvousdir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(avahi_compat_howl_rendezvousdir)'"; \
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(avahi_compat_howl_rendezvousdir)" || exit $$?; \
+	done
+
+uninstall-avahi_compat_howl_rendezvousHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(avahi_compat_howl_rendezvous_HEADERS)'; test -n "$(avahi_compat_howl_rendezvousdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(avahi_compat_howl_rendezvousdir)'; $(am__uninstall_files_from_dir)
+install-avahi_compat_howl_saltHEADERS: $(avahi_compat_howl_salt_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(avahi_compat_howl_saltdir)" || $(MKDIR_P) "$(DESTDIR)$(avahi_compat_howl_saltdir)"
+	@list='$(avahi_compat_howl_salt_HEADERS)'; test -n "$(avahi_compat_howl_saltdir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(avahi_compat_howl_saltdir)'"; \
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(avahi_compat_howl_saltdir)" || exit $$?; \
+	done
+
+uninstall-avahi_compat_howl_saltHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(avahi_compat_howl_salt_HEADERS)'; test -n "$(avahi_compat_howl_saltdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(avahi_compat_howl_saltdir)'; $(am__uninstall_files_from_dir)
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@fail= failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+	@fail= failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(MKDIR_P) "$(distdir)/$$subdir" \
+	    || exit 1; \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+	    $(am__relativize); \
+	    new_distdir=$$reldir; \
+	    dir1=$$subdir; dir2="$(top_distdir)"; \
+	    $(am__relativize); \
+	    new_top_distdir=$$reldir; \
+	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+	    ($(am__cd) $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$new_top_distdir" \
+	        distdir="$$new_distdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+		am__skip_mode_fix=: \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS)
+installdirs: installdirs-recursive
+installdirs-am:
+	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(avahi_compat_howldir)" "$(DESTDIR)$(avahi_compat_howl_corbydir)" "$(DESTDIR)$(avahi_compat_howl_discoverydir)" "$(DESTDIR)$(avahi_compat_howl_rendezvousdir)" "$(DESTDIR)$(avahi_compat_howl_saltdir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+	clean-noinstPROGRAMS mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-avahi_compat_howlHEADERS \
+	install-avahi_compat_howl_corbyHEADERS \
+	install-avahi_compat_howl_discoveryHEADERS \
+	install-avahi_compat_howl_rendezvousHEADERS \
+	install-avahi_compat_howl_saltHEADERS
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-avahi_compat_howlHEADERS \
+	uninstall-avahi_compat_howl_corbyHEADERS \
+	uninstall-avahi_compat_howl_discoveryHEADERS \
+	uninstall-avahi_compat_howl_rendezvousHEADERS \
+	uninstall-avahi_compat_howl_saltHEADERS \
+	uninstall-libLTLIBRARIES
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+	install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+	all all-am check check-am clean clean-generic \
+	clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS ctags \
+	ctags-recursive distclean distclean-compile distclean-generic \
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am \
+	install-avahi_compat_howlHEADERS \
+	install-avahi_compat_howl_corbyHEADERS \
+	install-avahi_compat_howl_discoveryHEADERS \
+	install-avahi_compat_howl_rendezvousHEADERS \
+	install-avahi_compat_howl_saltHEADERS install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-libLTLIBRARIES install-man install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs installdirs-am \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
+	uninstall-avahi_compat_howlHEADERS \
+	uninstall-avahi_compat_howl_corbyHEADERS \
+	uninstall-avahi_compat_howl_discoveryHEADERS \
+	uninstall-avahi_compat_howl_rendezvousHEADERS \
+	uninstall-avahi_compat_howl_saltHEADERS \
+	uninstall-libLTLIBRARIES
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/avahi-0.6.31/avahi-compat-howl/address-test.c b/avahi-0.6.31/avahi-compat-howl/address-test.c
new file mode 100644
index 0000000..d9e152f
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-howl/address-test.c
@@ -0,0 +1,51 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <assert.h>
+#include <stdio.h>
+
+#include <avahi-common/gccmacro.h>
+
+#include "howl.h"
+
+#define ASSERT_SW_OKAY(t) { sw_result r; r = (t); assert(r == SW_OKAY); }
+#define ASSERT_NOT_NULL(t) { const void* r; r = (t); assert(r); }
+
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
+    sw_ipv4_address a;
+    char t[256];
+    uint8_t a1, a2, a3, a4;
+
+    ASSERT_SW_OKAY(sw_ipv4_address_init_from_name(&a, "heise.de"));
+    ASSERT_NOT_NULL(sw_ipv4_address_name(a, t, sizeof(t)));
+    printf("%s\n", t);
+
+    ASSERT_SW_OKAY(sw_ipv4_address_init_from_this_host(&a));
+    ASSERT_NOT_NULL(sw_ipv4_address_name(a, t, sizeof(t)));
+    printf("%s\n", t);
+
+    ASSERT_SW_OKAY(sw_ipv4_address_decompose(a, &a1, &a2, &a3, &a4));
+    printf("%i.%i.%i.%i\n", a1, a2, a3, a4);
+
+    return 0;
+}
diff --git a/avahi-0.6.31/avahi-compat-howl/address.c b/avahi-0.6.31/avahi-compat-howl/address.c
new file mode 100644
index 0000000..81b6e6b
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-howl/address.c
@@ -0,0 +1,212 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <assert.h>
+#include <netdb.h>
+#include <unistd.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <sys/types.h>
+
+#include <avahi-common/gccmacro.h>
+
+#include "howl.h"
+#include "warn.h"
+
+sw_ipv4_address sw_ipv4_address_any(void) {
+    sw_ipv4_address a;
+
+    AVAHI_WARN_LINKAGE;
+
+    a.m_addr = htonl(INADDR_ANY);
+    return a;
+}
+
+sw_ipv4_address sw_ipv4_address_loopback(void) {
+    sw_ipv4_address a;
+
+    AVAHI_WARN_LINKAGE;
+
+    a.m_addr = htonl(INADDR_LOOPBACK);
+    return a;
+}
+
+sw_result sw_ipv4_address_init(sw_ipv4_address * self) {
+    assert(self);
+
+    AVAHI_WARN_LINKAGE;
+
+    self->m_addr = htonl(INADDR_ANY);
+    return SW_OKAY;
+}
+
+sw_result sw_ipv4_address_init_from_saddr(
+    sw_ipv4_address *self,
+    sw_saddr addr) {
+
+    assert(self);
+
+    AVAHI_WARN_LINKAGE;
+
+    self->m_addr = addr;
+    return SW_OKAY;
+}
+
+sw_result sw_ipv4_address_init_from_name(
+    sw_ipv4_address *self,
+    sw_const_string name) {
+
+    struct hostent *he;
+
+    assert(self);
+    assert(name);
+
+    AVAHI_WARN_LINKAGE;
+
+    if (!(he = gethostbyname(name)))
+        return SW_E_UNKNOWN;
+
+    self->m_addr = *(uint32_t*) he->h_addr;
+    return SW_OKAY;
+}
+
+sw_result sw_ipv4_address_init_from_address(
+    sw_ipv4_address *self,
+    sw_ipv4_address addr) {
+
+    assert(self);
+
+    AVAHI_WARN_LINKAGE;
+
+    self->m_addr = addr.m_addr;
+    return SW_OKAY;
+}
+
+sw_result sw_ipv4_address_init_from_this_host(sw_ipv4_address *self) {
+    struct sockaddr_in sa;
+    int fd;
+    socklen_t l = sizeof(sa);
+
+    assert(self);
+
+    AVAHI_WARN_LINKAGE;
+
+    /* This is so fucked up ... */
+
+    memset(&sa, 0, sizeof(sa));
+    sa.sin_family = AF_INET;
+    sa.sin_addr.s_addr = inet_addr("192.168.1.1"); /* Ouch */
+    sa.sin_port = htons(5555);
+
+    if ((fd = socket(PF_INET, SOCK_DGRAM, 0)) < 0 ||
+        connect(fd, (struct sockaddr*) &sa, sizeof(sa)) < 0 ||
+        getsockname(fd, (struct sockaddr*) &sa, &l) < 0) {
+        if (fd >= 0)
+            close(fd);
+
+        perror("fuck");
+        return SW_E_UNKNOWN;
+    }
+
+    assert(l == sizeof(sa));
+    close(fd);
+
+    self->m_addr = sa.sin_addr.s_addr;
+
+    return SW_OKAY;
+}
+
+sw_result sw_ipv4_address_fina(AVAHI_GCC_UNUSED sw_ipv4_address self) {
+
+    AVAHI_WARN_LINKAGE;
+
+    /* This is ridiculous ... */
+
+    return SW_OKAY;
+}
+
+sw_bool sw_ipv4_address_is_any(sw_ipv4_address self) {
+    AVAHI_WARN_LINKAGE;
+    return self.m_addr == htonl(INADDR_ANY);
+}
+
+sw_saddr sw_ipv4_address_saddr(sw_ipv4_address self) {
+    AVAHI_WARN_LINKAGE;
+    return self.m_addr;
+}
+
+sw_string sw_ipv4_address_name(
+    sw_ipv4_address self,
+    sw_string name,
+    sw_uint32 len) {
+
+    assert(name);
+    assert(len > 0);
+
+    AVAHI_WARN_LINKAGE;
+
+    if (len < INET_ADDRSTRLEN)
+        return NULL;
+
+    if (!(inet_ntop(AF_INET, &self.m_addr, name, len)))
+        return NULL;
+
+    return name;
+}
+
+sw_result sw_ipv4_address_decompose(
+    sw_ipv4_address self,
+    sw_uint8 * a1,
+    sw_uint8 * a2,
+    sw_uint8 * a3,
+    sw_uint8 * a4) {
+
+    uint32_t a;
+
+    AVAHI_WARN_LINKAGE;
+
+    a = ntohl(self.m_addr);
+
+    assert(a1);
+    assert(a2);
+    assert(a3);
+    assert(a4);
+
+    *a1 = (uint8_t) (a >> 24);
+    *a2 = (uint8_t) (a >> 16);
+    *a3 = (uint8_t) (a >> 8);
+    *a4 = (uint8_t) (a);
+
+    return SW_OKAY;
+}
+
+sw_bool sw_ipv4_address_equals(
+    sw_ipv4_address self,
+    sw_ipv4_address addr) {
+
+    AVAHI_WARN_LINKAGE;
+
+    return self.m_addr == addr.m_addr;
+}
+
diff --git a/avahi-0.6.31/avahi-compat-howl/browse-domain-test.c b/avahi-0.6.31/avahi-compat-howl/browse-domain-test.c
new file mode 100644
index 0000000..b5a4a01
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-howl/browse-domain-test.c
@@ -0,0 +1,74 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <assert.h>
+#include <stdio.h>
+
+#include <avahi-common/gccmacro.h>
+#include "howl.h"
+
+#define ASSERT_SW_OKAY(t) { sw_result _r; _r = (t); assert(_r == SW_OKAY); }
+#define ASSERT_NOT_NULL(t) { const void* _r; r = (t); assert(_r); }
+
+static sw_result reply(
+    AVAHI_GCC_UNUSED sw_discovery discovery,
+    AVAHI_GCC_UNUSED sw_discovery_oid oid,
+    sw_discovery_browse_status status,
+    AVAHI_GCC_UNUSED sw_uint32 interface_index,
+    AVAHI_GCC_UNUSED sw_const_string name,
+    AVAHI_GCC_UNUSED sw_const_string type,
+    sw_const_string domain,
+    AVAHI_GCC_UNUSED sw_opaque extra) {
+
+    switch (status) {
+        case SW_DISCOVERY_BROWSE_ADD_DOMAIN:
+            fprintf(stderr, "new domain %s\n", domain);
+            break;
+
+        case SW_DISCOVERY_BROWSE_REMOVE_DOMAIN:
+            fprintf(stderr, "removed domain %s\n", domain);
+            break;
+
+        case SW_DISCOVERY_BROWSE_INVALID:
+            fprintf(stderr, "some kind of failure happened: %s\n", domain);
+            break;
+
+        default:
+            abort();
+    }
+
+    return SW_OKAY;
+}
+
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
+    sw_discovery discovery;
+    sw_discovery_oid oid;
+
+    ASSERT_SW_OKAY(sw_discovery_init(&discovery));
+
+    ASSERT_SW_OKAY(sw_discovery_browse_domains(discovery, 0, reply, NULL, &oid));
+
+    ASSERT_SW_OKAY(sw_discovery_run(discovery));
+
+    return 0;
+}
diff --git a/avahi-0.6.31/avahi-compat-howl/compat.c b/avahi-0.6.31/avahi-compat-howl/compat.c
new file mode 100644
index 0000000..9b8b18c
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-howl/compat.c
@@ -0,0 +1,1182 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <assert.h>
+
+#include <pthread.h>
+
+#include <avahi-common/strlst.h>
+#include <avahi-common/malloc.h>
+#include <avahi-common/domain.h>
+#include <avahi-common/simple-watch.h>
+#include <avahi-common/error.h>
+#include <avahi-common/llist.h>
+
+#include <avahi-client/client.h>
+#include <avahi-client/publish.h>
+#include <avahi-client/lookup.h>
+
+#include "howl.h"
+#include "warn.h"
+
+#define OID_MAX 50
+
+enum {
+    COMMAND_POLL = 'p',
+    COMMAND_QUIT = 'q',
+    COMMAND_POLL_DONE = 'P',
+    COMMAND_POLL_FAILED = 'F'
+};
+
+typedef enum {
+    OID_UNUSED = 0,
+    OID_SERVICE_BROWSER,
+    OID_SERVICE_RESOLVER,
+    OID_DOMAIN_BROWSER,
+    OID_ENTRY_GROUP
+} oid_type;
+
+typedef struct service_data service_data;
+
+typedef struct oid_data {
+    oid_type type;
+    sw_opaque extra;
+    sw_discovery discovery;
+    void *object;
+    sw_result (*reply)(void);
+    service_data *service_data;
+} oid_data;
+
+
+struct service_data {
+    char *name, *regtype, *domain, *host;
+    uint16_t port;
+    AvahiIfIndex interface;
+    AvahiStringList *txt;
+    AVAHI_LLIST_FIELDS(service_data, services);
+};
+
+struct _sw_discovery {
+    int n_ref;
+    AvahiSimplePoll *simple_poll;
+    AvahiClient *client;
+
+    oid_data oid_table[OID_MAX];
+    sw_discovery_oid oid_index;
+
+    int thread_fd, main_fd;
+
+    pthread_t thread;
+    int thread_running;
+
+    pthread_mutex_t mutex, salt_mutex;
+
+    AVAHI_LLIST_HEAD(service_data, services);
+};
+
+#define ASSERT_SUCCESS(r) { int __ret = (r); assert(__ret == 0); }
+
+#define OID_GET_INDEX(data) ((sw_discovery_oid) (((data) - ((data)->discovery->oid_table))))
+
+static sw_discovery discovery_ref(sw_discovery self);
+static void discovery_unref(sw_discovery self);
+
+static const char *add_trailing_dot(const char *s, char *buf, size_t buf_len) {
+    if (!s)
+        return NULL;
+
+    if (*s == 0)
+        return s;
+
+    if (s[strlen(s)-1] == '.')
+        return s;
+
+    snprintf(buf, buf_len, "%s.", s);
+    return buf;
+}
+
+static sw_result map_error(int error) {
+    switch (error) {
+        case AVAHI_OK:
+            return SW_OKAY;
+
+        case AVAHI_ERR_NO_MEMORY:
+            return SW_E_MEM;
+    }
+
+    return SW_E_UNKNOWN;
+}
+
+static int read_command(int fd) {
+    ssize_t r;
+    char command;
+
+    assert(fd >= 0);
+
+    if ((r = read(fd, &command, 1)) != 1) {
+        fprintf(stderr, __FILE__": read() failed: %s\n", r < 0 ? strerror(errno) : "EOF");
+        return -1;
+    }
+
+    return command;
+}
+
+static int write_command(int fd, char reply) {
+    assert(fd >= 0);
+
+    if (write(fd, &reply, 1) != 1) {
+        fprintf(stderr, __FILE__": write() failed: %s\n", strerror(errno));
+        return -1;
+    }
+
+    return 0;
+}
+
+static int poll_func(struct pollfd *ufds, unsigned int nfds, int timeout, void *userdata) {
+    sw_discovery self = userdata;
+    int ret;
+
+    assert(self);
+
+    ASSERT_SUCCESS(pthread_mutex_unlock(&self->mutex));
+    ret = poll(ufds, nfds, timeout);
+    ASSERT_SUCCESS(pthread_mutex_lock(&self->mutex));
+
+    return ret;
+}
+
+static void * thread_func(void *data) {
+    sw_discovery self = data;
+    sigset_t mask;
+
+    sigfillset(&mask);
+    pthread_sigmask(SIG_BLOCK, &mask, NULL);
+
+    self->thread = pthread_self();
+    self->thread_running = 1;
+
+    for (;;) {
+        char command;
+
+        if ((command = read_command(self->thread_fd)) < 0)
+            break;
+
+/*         fprintf(stderr, "Command: %c\n", command); */
+
+        switch (command) {
+
+            case COMMAND_POLL: {
+                int ret;
+
+                ASSERT_SUCCESS(pthread_mutex_lock(&self->mutex));
+
+                for (;;) {
+                    errno = 0;
+
+                    if ((ret = avahi_simple_poll_run(self->simple_poll)) < 0) {
+
+                        if (errno == EINTR)
+                            continue;
+
+                        fprintf(stderr, __FILE__": avahi_simple_poll_run() failed: %s\n", strerror(errno));
+                    }
+
+                    break;
+                }
+
+                ASSERT_SUCCESS(pthread_mutex_unlock(&self->mutex));
+
+                if (write_command(self->thread_fd, ret < 0 ? COMMAND_POLL_FAILED : COMMAND_POLL_DONE) < 0)
+                    break;
+
+                break;
+            }
+
+            case COMMAND_QUIT:
+                return NULL;
+        }
+
+    }
+
+    return NULL;
+}
+
+static int oid_alloc(sw_discovery self, oid_type type) {
+    sw_discovery_oid i;
+    assert(self);
+
+    for (i = 0; i < OID_MAX; i++) {
+
+        while (self->oid_index >= OID_MAX)
+            self->oid_index -= OID_MAX;
+
+        if (self->oid_table[self->oid_index].type == OID_UNUSED) {
+            self->oid_table[self->oid_index].type = type;
+            self->oid_table[self->oid_index].discovery = self;
+
+            assert(OID_GET_INDEX(&self->oid_table[self->oid_index]) == self->oid_index);
+
+            return self->oid_index ++;
+        }
+
+        self->oid_index ++;
+    }
+
+    /* No free entry found */
+
+    return (sw_discovery_oid) -1;
+}
+
+static void oid_release(sw_discovery self, sw_discovery_oid oid) {
+    assert(self);
+    assert(oid < OID_MAX);
+
+    assert(self->oid_table[oid].type != OID_UNUSED);
+
+    self->oid_table[oid].type = OID_UNUSED;
+    self->oid_table[oid].discovery = NULL;
+    self->oid_table[oid].reply = NULL;
+    self->oid_table[oid].object = NULL;
+    self->oid_table[oid].extra = NULL;
+    self->oid_table[oid].service_data = NULL;
+}
+
+static oid_data* oid_get(sw_discovery self, sw_discovery_oid oid) {
+    assert(self);
+
+    if (oid >= OID_MAX)
+        return NULL;
+
+    if (self->oid_table[oid].type == OID_UNUSED)
+        return NULL;
+
+    return &self->oid_table[oid];
+}
+
+static service_data* service_data_new(sw_discovery self) {
+    service_data *sdata;
+
+    assert(self);
+
+    if (!(sdata = avahi_new0(service_data, 1)))
+        return NULL;
+
+    AVAHI_LLIST_PREPEND(service_data, services, self->services, sdata);
+
+    return sdata;
+
+}
+
+static void service_data_free(sw_discovery self, service_data* sdata) {
+    assert(self);
+    assert(sdata);
+
+    AVAHI_LLIST_REMOVE(service_data, services, self->services, sdata);
+
+    avahi_free(sdata->name);
+    avahi_free(sdata->regtype);
+    avahi_free(sdata->domain);
+    avahi_free(sdata->host);
+    avahi_string_list_free(sdata->txt);
+    avahi_free(sdata);
+}
+
+static void reg_client_callback(oid_data *data, AvahiClientState state);
+
+static void client_callback(AvahiClient *s, AvahiClientState state, void* userdata) {
+    sw_discovery self = userdata;
+    sw_discovery_oid oid;
+
+    assert(s);
+    assert(self);
+
+    discovery_ref(self);
+
+    for (oid = 0; oid < OID_MAX; oid++) {
+
+        switch (self->oid_table[oid].type) {
+
+            case OID_ENTRY_GROUP:
+                reg_client_callback(&self->oid_table[oid], state);
+                break;
+
+            case OID_DOMAIN_BROWSER:
+            case OID_SERVICE_BROWSER:
+                ((sw_discovery_browse_reply) self->oid_table[oid].reply)(self, oid, SW_DISCOVERY_BROWSE_INVALID, 0, NULL, NULL, NULL, self->oid_table[oid].extra);
+                break;
+
+            case OID_SERVICE_RESOLVER:
+            case OID_UNUSED:
+                ;
+        }
+    }
+
+    discovery_unref(self);
+}
+
+sw_result sw_discovery_init(sw_discovery * self) {
+    int fd[2] = { -1, -1};
+    sw_result result = SW_E_UNKNOWN;
+    pthread_mutexattr_t mutex_attr;
+    int error;
+
+    assert(self);
+
+    AVAHI_WARN_LINKAGE;
+
+    *self = NULL;
+
+    if (socketpair(AF_UNIX, SOCK_STREAM, 0, fd) < 0)
+        goto fail;
+
+    if (!(*self = avahi_new(struct _sw_discovery, 1))) {
+        result = SW_E_MEM;
+        goto fail;
+    }
+
+    (*self)->n_ref = 1;
+    (*self)->thread_fd = fd[0];
+    (*self)->main_fd = fd[1];
+
+    (*self)->client = NULL;
+    (*self)->simple_poll = NULL;
+
+    memset((*self)->oid_table, 0, sizeof((*self)->oid_table));
+    (*self)->oid_index = 0;
+
+    (*self)->thread_running = 0;
+
+    AVAHI_LLIST_HEAD_INIT(service_info, (*self)->services);
+
+    ASSERT_SUCCESS(pthread_mutexattr_init(&mutex_attr));
+    pthread_mutexattr_settype(&mutex_attr, PTHREAD_MUTEX_RECURSIVE);
+    ASSERT_SUCCESS(pthread_mutex_init(&(*self)->mutex, &mutex_attr));
+    ASSERT_SUCCESS(pthread_mutex_init(&(*self)->salt_mutex, &mutex_attr));
+
+    if (!((*self)->simple_poll = avahi_simple_poll_new()))
+        goto fail;
+
+    avahi_simple_poll_set_func((*self)->simple_poll, poll_func, *self);
+
+    if (!((*self)->client = avahi_client_new(avahi_simple_poll_get((*self)->simple_poll), 0, client_callback, *self, &error))) {
+        result = map_error(error);
+        goto fail;
+    }
+
+    /* Start simple poll */
+    if (avahi_simple_poll_prepare((*self)->simple_poll, -1) < 0)
+        goto fail;
+
+    /* Queue an initial POLL command for the thread */
+    if (write_command((*self)->main_fd, COMMAND_POLL) < 0)
+        goto fail;
+
+    if (pthread_create(&(*self)->thread, NULL, thread_func, *self) != 0)
+        goto fail;
+
+    (*self)->thread_running = 1;
+
+    return SW_OKAY;
+
+fail:
+
+    if (*self)
+        sw_discovery_fina(*self);
+
+    return result;
+}
+
+static int stop_thread(sw_discovery self) {
+    assert(self);
+
+    if (!self->thread_running)
+        return 0;
+
+    if (write_command(self->main_fd, COMMAND_QUIT) < 0)
+        return -1;
+
+    avahi_simple_poll_wakeup(self->simple_poll);
+
+    ASSERT_SUCCESS(pthread_join(self->thread, NULL));
+    self->thread_running = 0;
+    return 0;
+}
+
+static sw_discovery discovery_ref(sw_discovery self) {
+    assert(self);
+    assert(self->n_ref >= 1);
+
+    self->n_ref++;
+
+    return self;
+}
+
+static void discovery_unref(sw_discovery self) {
+    assert(self);
+    assert(self->n_ref >= 1);
+
+    if (--self->n_ref > 0)
+        return;
+
+    stop_thread(self);
+
+    if (self->client)
+        avahi_client_free(self->client);
+
+    if (self->simple_poll)
+        avahi_simple_poll_free(self->simple_poll);
+
+    if (self->thread_fd >= 0)
+        close(self->thread_fd);
+
+    if (self->main_fd >= 0)
+        close(self->main_fd);
+
+    ASSERT_SUCCESS(pthread_mutex_destroy(&self->mutex));
+    ASSERT_SUCCESS(pthread_mutex_destroy(&self->salt_mutex));
+
+    while (self->services)
+        service_data_free(self, self->services);
+
+    avahi_free(self);
+}
+
+sw_result sw_discovery_fina(sw_discovery self) {
+    assert(self);
+
+    AVAHI_WARN_LINKAGE;
+
+    stop_thread(self);
+    discovery_unref(self);
+
+    return SW_OKAY;
+}
+
+sw_result sw_discovery_run(sw_discovery self) {
+    assert(self);
+
+    AVAHI_WARN_LINKAGE;
+
+    return sw_salt_run((sw_salt) self);
+}
+
+sw_result sw_discovery_stop_run(sw_discovery self) {
+    assert(self);
+
+    AVAHI_WARN_LINKAGE;
+
+    return sw_salt_stop_run((sw_salt) self);
+}
+
+int sw_discovery_socket(sw_discovery self) {
+    assert(self);
+
+    AVAHI_WARN_LINKAGE;
+
+    return self->main_fd;
+}
+
+sw_result sw_discovery_read_socket(sw_discovery self) {
+    sw_result result = SW_E_UNKNOWN;
+
+    assert(self);
+
+    discovery_ref(self);
+
+    ASSERT_SUCCESS(pthread_mutex_lock(&self->mutex));
+
+    /* Cleanup notification socket */
+    if (read_command(self->main_fd) != COMMAND_POLL_DONE)
+        goto finish;
+
+    if (avahi_simple_poll_dispatch(self->simple_poll) < 0)
+        goto finish;
+
+    if (self->n_ref > 1) /* Perhaps we should die */
+
+        /* Dispatch events */
+        if (avahi_simple_poll_prepare(self->simple_poll, -1) < 0)
+            goto finish;
+
+    if (self->n_ref > 1)
+
+        /* Request the poll */
+        if (write_command(self->main_fd, COMMAND_POLL) < 0)
+            goto finish;
+
+    result = SW_OKAY;
+
+finish:
+
+    ASSERT_SUCCESS(pthread_mutex_unlock(&self->mutex));
+
+    discovery_unref(self);
+
+    return result;
+}
+
+sw_result sw_discovery_salt(sw_discovery self, sw_salt *salt) {
+    assert(self);
+    assert(salt);
+
+    AVAHI_WARN_LINKAGE;
+
+    *salt = (sw_salt) self;
+
+    return SW_OKAY;
+}
+
+sw_result sw_salt_step(sw_salt self, sw_uint32 * msec) {
+    struct pollfd p;
+    int r;
+    sw_result result;
+
+    AVAHI_WARN_LINKAGE;
+
+    if (!((sw_discovery) self)->thread_running)
+        return SW_E_UNKNOWN;
+
+    memset(&p, 0, sizeof(p));
+    p.fd = ((sw_discovery) self)->main_fd;
+    p.events = POLLIN;
+
+    if ((r = poll(&p, 1, msec ? (int) *msec : -1)) < 0) {
+
+        /* Don't treat EINTR as error */
+        if (errno == EINTR)
+            return SW_OKAY;
+
+        return SW_E_UNKNOWN;
+
+    } else if (r == 0) {
+
+        /* Timeoout */
+        return SW_OKAY;
+
+    } else {
+        /* Success */
+
+        if (p.revents != POLLIN)
+            return SW_E_UNKNOWN;
+
+        if ((result = sw_discovery_read_socket((sw_discovery) self)) != SW_OKAY)
+            return result;
+    }
+
+    return SW_OKAY;
+}
+
+sw_result sw_salt_run(sw_salt self) {
+    sw_result ret;
+
+    AVAHI_WARN_LINKAGE;
+
+    assert(self);
+
+    for (;;)
+        if ((ret = sw_salt_step(self, NULL)) != SW_OKAY)
+            return ret;
+}
+
+sw_result sw_salt_stop_run(sw_salt self) {
+    AVAHI_WARN_LINKAGE;
+
+    assert(self);
+
+    if (stop_thread((sw_discovery) self) < 0)
+        return SW_E_UNKNOWN;
+
+    return SW_OKAY;
+}
+
+sw_result sw_salt_lock(sw_salt self) {
+    AVAHI_WARN_LINKAGE;
+
+    assert(self);
+    ASSERT_SUCCESS(pthread_mutex_lock(&((sw_discovery) self)->salt_mutex));
+
+    return SW_OKAY;
+}
+
+sw_result sw_salt_unlock(sw_salt self) {
+    assert(self);
+
+    AVAHI_WARN_LINKAGE;
+
+    ASSERT_SUCCESS(pthread_mutex_unlock(&((sw_discovery) self)->salt_mutex));
+
+    return SW_OKAY;
+}
+
+static void reg_report_status(oid_data *data, sw_discovery_publish_status status) {
+    sw_discovery_publish_reply reply;
+
+    assert(data);
+
+    reply = (sw_discovery_publish_reply) data->reply;
+
+    reply(data->discovery,
+          OID_GET_INDEX(data),
+          status,
+          data->extra);
+}
+
+static int reg_create_service(oid_data *data) {
+    int ret;
+    const char *real_type;
+
+    assert(data);
+
+    real_type = avahi_get_type_from_subtype(data->service_data->regtype);
+
+    if ((ret = avahi_entry_group_add_service_strlst(
+             data->object,
+             data->service_data->interface,
+             AVAHI_PROTO_INET,
+             0,
+             data->service_data->name,
+             real_type ? real_type : data->service_data->regtype,
+             data->service_data->domain,
+             data->service_data->host,
+             data->service_data->port,
+             data->service_data->txt)) < 0)
+        return ret;
+
+    if (real_type) {
+        /* Create a subtype entry */
+
+        if (avahi_entry_group_add_service_subtype(
+                data->object,
+                data->service_data->interface,
+                AVAHI_PROTO_INET,
+                0,
+                data->service_data->name,
+                real_type,
+                data->service_data->domain,
+                data->service_data->regtype) < 0)
+            return ret;
+
+    }
+
+    if ((ret = avahi_entry_group_commit(data->object)) < 0)
+        return ret;
+
+    return 0;
+}
+
+static void reg_client_callback(oid_data *data, AvahiClientState state) {
+    assert(data);
+
+    /* We've not been setup completely */
+    if (!data->object)
+        return;
+
+    switch (state) {
+        case AVAHI_CLIENT_FAILURE:
+            reg_report_status(data, SW_DISCOVERY_PUBLISH_INVALID);
+            break;
+
+        case AVAHI_CLIENT_S_RUNNING: {
+            int ret;
+
+            /* Register the service */
+            if ((ret = reg_create_service(data)) < 0) {
+                reg_report_status(data, SW_DISCOVERY_PUBLISH_INVALID);
+                return;
+            }
+
+            break;
+        }
+
+        case AVAHI_CLIENT_S_COLLISION:
+        case AVAHI_CLIENT_S_REGISTERING:
+
+            /* Remove our entry */
+            avahi_entry_group_reset(data->object);
+            break;
+
+        case AVAHI_CLIENT_CONNECTING:
+            /* Ignore */
+            break;
+    }
+
+}
+
+static void reg_entry_group_callback(AvahiEntryGroup *g, AvahiEntryGroupState state, void *userdata) {
+    oid_data *data = userdata;
+
+    assert(g);
+    assert(data);
+
+    switch (state) {
+        case AVAHI_ENTRY_GROUP_ESTABLISHED:
+
+            reg_report_status(data, SW_DISCOVERY_PUBLISH_STARTED);
+            break;
+
+        case AVAHI_ENTRY_GROUP_COLLISION:
+
+            reg_report_status(data, SW_DISCOVERY_PUBLISH_NAME_COLLISION);
+            break;
+
+        case AVAHI_ENTRY_GROUP_REGISTERING:
+        case AVAHI_ENTRY_GROUP_UNCOMMITED:
+            /* Ignore */
+            break;
+
+        case AVAHI_ENTRY_GROUP_FAILURE:
+            reg_report_status(data, SW_DISCOVERY_PUBLISH_INVALID);
+            break;
+
+    }
+}
+
+sw_result sw_discovery_publish(
+    sw_discovery self,
+    sw_uint32 interface_index,
+    sw_const_string name,
+    sw_const_string type,
+    sw_const_string domain,
+    sw_const_string host,
+    sw_port port,
+    sw_octets text_record,
+    sw_uint32 text_record_len,
+    sw_discovery_publish_reply reply,
+    sw_opaque extra,
+    sw_discovery_oid * oid) {
+
+    oid_data *data;
+    sw_result result = SW_E_UNKNOWN;
+    service_data *sdata;
+    AvahiStringList *txt = NULL;
+
+    assert(self);
+    assert(name);
+    assert(type);
+    assert(reply);
+    assert(oid);
+
+    AVAHI_WARN_LINKAGE;
+
+    if (text_record && text_record_len > 0)
+        if (avahi_string_list_parse(text_record, text_record_len, &txt) < 0)
+            return SW_E_UNKNOWN;
+
+    if ((*oid = oid_alloc(self, OID_ENTRY_GROUP)) == (sw_discovery_oid) -1) {
+        avahi_string_list_free(txt);
+        return SW_E_UNKNOWN;
+    }
+
+    if (!(sdata = service_data_new(self))) {
+        avahi_string_list_free(txt);
+        oid_release(self, *oid);
+        return SW_E_MEM;
+    }
+
+    data = oid_get(self, *oid);
+    assert(data);
+    data->reply = (sw_result (*)(void)) reply;
+    data->extra = extra;
+    data->service_data = sdata;
+
+    sdata->interface = interface_index == 0 ? AVAHI_IF_UNSPEC : (AvahiIfIndex) interface_index;
+    sdata->name = avahi_strdup(name);
+    sdata->regtype = type ? avahi_normalize_name_strdup(type) : NULL;
+    sdata->domain = domain ? avahi_normalize_name_strdup(domain) : NULL;
+    sdata->host = host ? avahi_normalize_name_strdup(host) : NULL;
+    sdata->port = port;
+    sdata->txt = txt;
+
+    /* Some OOM checking would be cool here */
+
+    ASSERT_SUCCESS(pthread_mutex_lock(&self->mutex));
+
+    if (!(data->object = avahi_entry_group_new(self->client, reg_entry_group_callback, data))) {
+        result = map_error(avahi_client_errno(self->client));
+        goto finish;
+    }
+
+    if (avahi_client_get_state(self->client) == AVAHI_CLIENT_S_RUNNING) {
+        int error;
+
+        if ((error = reg_create_service(data)) < 0) {
+            result = map_error(error);
+            goto finish;
+        }
+    }
+
+    result = SW_OKAY;
+
+finish:
+
+    ASSERT_SUCCESS(pthread_mutex_unlock(&self->mutex));
+
+    if (result != SW_OKAY)
+        if (*oid != (sw_discovery_oid) -1)
+            sw_discovery_cancel(self, *oid);
+
+    return result;
+}
+
+static void domain_browser_callback(
+    AvahiDomainBrowser *b,
+    AvahiIfIndex interface,
+    AVAHI_GCC_UNUSED AvahiProtocol protocol,
+    AvahiBrowserEvent event,
+    const char *domain,
+    AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+    void *userdata) {
+
+    oid_data* data = userdata;
+    sw_discovery_browse_reply reply;
+    static char domain_fixed[AVAHI_DOMAIN_NAME_MAX];
+
+    assert(b);
+    assert(data);
+
+    reply = (sw_discovery_browse_reply) data->reply;
+
+    domain  = add_trailing_dot(domain, domain_fixed, sizeof(domain_fixed));
+
+    switch (event) {
+        case AVAHI_BROWSER_NEW:
+            reply(data->discovery, OID_GET_INDEX(data), SW_DISCOVERY_BROWSE_ADD_DOMAIN, interface, NULL, NULL, domain, data->extra);
+            break;
+
+        case AVAHI_BROWSER_REMOVE:
+            reply(data->discovery, OID_GET_INDEX(data), SW_DISCOVERY_BROWSE_REMOVE_DOMAIN, interface, NULL, NULL, domain, data->extra);
+            break;
+
+        case AVAHI_BROWSER_FAILURE:
+            reply(data->discovery, OID_GET_INDEX(data), SW_DISCOVERY_BROWSE_INVALID, interface, NULL, NULL, domain, data->extra);
+            break;
+
+        case AVAHI_BROWSER_CACHE_EXHAUSTED:
+        case AVAHI_BROWSER_ALL_FOR_NOW:
+            break;
+    }
+}
+
+sw_result sw_discovery_browse_domains(
+    sw_discovery self,
+    sw_uint32 interface_index,
+    sw_discovery_browse_reply reply,
+    sw_opaque extra,
+    sw_discovery_oid * oid) {
+
+    oid_data *data;
+    AvahiIfIndex ifindex;
+    sw_result result = SW_E_UNKNOWN;
+
+    assert(self);
+    assert(reply);
+    assert(oid);
+
+    AVAHI_WARN_LINKAGE;
+
+    if ((*oid = oid_alloc(self, OID_DOMAIN_BROWSER)) == (sw_discovery_oid) -1)
+        return SW_E_UNKNOWN;
+
+    data = oid_get(self, *oid);
+    assert(data);
+    data->reply = (sw_result (*)(void)) reply;
+    data->extra = extra;
+
+    ifindex = interface_index == 0 ? AVAHI_IF_UNSPEC : (AvahiIfIndex) interface_index;
+
+    ASSERT_SUCCESS(pthread_mutex_lock(&self->mutex));
+
+    if (!(data->object = avahi_domain_browser_new(self->client, ifindex, AVAHI_PROTO_INET, NULL, AVAHI_DOMAIN_BROWSER_BROWSE, 0, domain_browser_callback, data))) {
+        result = map_error(avahi_client_errno(self->client));
+        goto finish;
+    }
+
+    result = SW_OKAY;
+
+finish:
+
+    ASSERT_SUCCESS(pthread_mutex_unlock(&self->mutex));
+
+    if (result != SW_OKAY)
+        if (*oid != (sw_discovery_oid) -1)
+            sw_discovery_cancel(self, *oid);
+
+    return result;
+}
+
+static void service_resolver_callback(
+    AvahiServiceResolver *r,
+    AvahiIfIndex interface,
+    AVAHI_GCC_UNUSED AvahiProtocol protocol,
+    AvahiResolverEvent event,
+    const char *name,
+    const char *type,
+    const char *domain,
+    const char *host_name,
+    const AvahiAddress *a,
+    uint16_t port,
+    AvahiStringList *txt,
+    AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+    void *userdata) {
+
+    oid_data* data = userdata;
+    sw_discovery_resolve_reply reply;
+
+    assert(r);
+    assert(data);
+
+    reply = (sw_discovery_resolve_reply) data->reply;
+
+    switch (event) {
+        case AVAHI_RESOLVER_FOUND: {
+
+            char host_name_fixed[AVAHI_DOMAIN_NAME_MAX];
+            uint8_t *p = NULL;
+            size_t l = 0;
+            sw_ipv4_address addr;
+
+            sw_ipv4_address_init_from_saddr(&addr, a->data.ipv4.address);
+
+            host_name = add_trailing_dot(host_name, host_name_fixed, sizeof(host_name_fixed));
+
+            if ((p = avahi_new0(uint8_t, (l = avahi_string_list_serialize(txt, NULL, 0))+1)))
+                avahi_string_list_serialize(txt, p, l);
+
+            reply(data->discovery, OID_GET_INDEX(data), interface, name, type, domain, addr, port, p, l, data->extra);
+
+            avahi_free(p);
+            break;
+        }
+
+        case AVAHI_RESOLVER_FAILURE:
+
+            /* Apparently there is no way in HOWL to inform about failed resolvings ... */
+
+            avahi_warn("A service failed to resolve in the HOWL compatiblity layer of Avahi which is used by '%s'. "
+                       "Since the HOWL API doesn't offer any means to inform the application about this, we have to ignore the failure. "
+                       "Please fix your application to use the native API of Avahi!",
+                       avahi_exe_name());
+
+            break;
+    }
+}
+
+sw_result sw_discovery_resolve(
+    sw_discovery self,
+    sw_uint32 interface_index,
+    sw_const_string name,
+    sw_const_string type,
+    sw_const_string domain,
+    sw_discovery_resolve_reply reply,
+    sw_opaque extra,
+    sw_discovery_oid * oid) {
+
+    oid_data *data;
+    AvahiIfIndex ifindex;
+    sw_result result = SW_E_UNKNOWN;
+
+    assert(self);
+    assert(name);
+    assert(type);
+    assert(reply);
+    assert(oid);
+
+    AVAHI_WARN_LINKAGE;
+
+    if ((*oid = oid_alloc(self, OID_SERVICE_RESOLVER)) == (sw_discovery_oid) -1)
+        return SW_E_UNKNOWN;
+
+    data = oid_get(self, *oid);
+    assert(data);
+    data->reply = (sw_result (*)(void)) reply;
+    data->extra = extra;
+
+    ifindex = interface_index == 0 ? AVAHI_IF_UNSPEC : (AvahiIfIndex) interface_index;
+
+    ASSERT_SUCCESS(pthread_mutex_lock(&self->mutex));
+
+    if (!(data->object = avahi_service_resolver_new(self->client, ifindex, AVAHI_PROTO_INET, name, type, domain, AVAHI_PROTO_INET, 0, service_resolver_callback, data))) {
+        result = map_error(avahi_client_errno(self->client));
+        goto finish;
+    }
+
+    result = SW_OKAY;
+
+finish:
+
+    ASSERT_SUCCESS(pthread_mutex_unlock(&self->mutex));
+
+    if (result != SW_OKAY)
+        if (*oid != (sw_discovery_oid) -1)
+            sw_discovery_cancel(self, *oid);
+
+    return result;
+}
+
+static void service_browser_callback(
+    AvahiServiceBrowser *b,
+    AvahiIfIndex interface,
+    AVAHI_GCC_UNUSED AvahiProtocol protocol,
+    AvahiBrowserEvent event,
+    const char *name,
+    const char *type,
+    const char *domain,
+    AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+    void *userdata) {
+
+    oid_data* data = userdata;
+    char type_fixed[AVAHI_DOMAIN_NAME_MAX], domain_fixed[AVAHI_DOMAIN_NAME_MAX];
+    sw_discovery_browse_reply reply;
+
+    assert(b);
+    assert(data);
+
+    reply = (sw_discovery_browse_reply) data->reply;
+
+    type = add_trailing_dot(type, type_fixed, sizeof(type_fixed));
+    domain = add_trailing_dot(domain, domain_fixed, sizeof(domain_fixed));
+
+    switch (event) {
+        case AVAHI_BROWSER_NEW:
+            reply(data->discovery, OID_GET_INDEX(data), SW_DISCOVERY_BROWSE_ADD_SERVICE, interface, name, type, domain, data->extra);
+            break;
+
+        case AVAHI_BROWSER_REMOVE:
+            reply(data->discovery, OID_GET_INDEX(data), SW_DISCOVERY_BROWSE_REMOVE_SERVICE, interface, name, type, domain, data->extra);
+            break;
+
+        case AVAHI_BROWSER_FAILURE:
+            reply(data->discovery, OID_GET_INDEX(data), SW_DISCOVERY_BROWSE_INVALID, interface, name, type, domain, data->extra);
+            break;
+
+        case AVAHI_BROWSER_CACHE_EXHAUSTED:
+        case AVAHI_BROWSER_ALL_FOR_NOW:
+            break;
+    }
+}
+
+sw_result sw_discovery_browse(
+    sw_discovery self,
+    sw_uint32 interface_index,
+    sw_const_string type,
+    sw_const_string domain,
+    sw_discovery_browse_reply reply,
+    sw_opaque extra,
+    sw_discovery_oid * oid) {
+
+    oid_data *data;
+    AvahiIfIndex ifindex;
+    sw_result result = SW_E_UNKNOWN;
+
+    assert(self);
+    assert(type);
+    assert(reply);
+    assert(oid);
+
+    AVAHI_WARN_LINKAGE;
+
+    if ((*oid = oid_alloc(self, OID_SERVICE_BROWSER)) == (sw_discovery_oid) -1)
+        return SW_E_UNKNOWN;
+
+    data = oid_get(self, *oid);
+    assert(data);
+    data->reply = (sw_result (*)(void)) reply;
+    data->extra = extra;
+
+    ifindex = interface_index == 0 ? AVAHI_IF_UNSPEC : (AvahiIfIndex) interface_index;
+
+    ASSERT_SUCCESS(pthread_mutex_lock(&self->mutex));
+
+    if (!(data->object = avahi_service_browser_new(self->client, ifindex, AVAHI_PROTO_INET, type, domain, 0, service_browser_callback, data))) {
+        result = map_error(avahi_client_errno(self->client));
+        goto finish;
+    }
+
+    result = SW_OKAY;
+
+finish:
+
+    ASSERT_SUCCESS(pthread_mutex_unlock(&self->mutex));
+
+    if (result != SW_OKAY)
+        if (*oid != (sw_discovery_oid) -1)
+            sw_discovery_cancel(self, *oid);
+
+    return result;
+}
+
+sw_result sw_discovery_cancel(sw_discovery self, sw_discovery_oid oid) {
+    oid_data *data;
+    assert(self);
+
+    AVAHI_WARN_LINKAGE;
+
+    if (!(data = oid_get(self, oid)))
+        return SW_E_UNKNOWN;
+
+    if (data->object) {
+        switch (data->type) {
+            case OID_SERVICE_BROWSER:
+                avahi_service_browser_free(data->object);
+                break;
+
+            case OID_SERVICE_RESOLVER:
+                avahi_service_resolver_free(data->object);
+                break;
+
+            case OID_DOMAIN_BROWSER:
+                avahi_domain_browser_free(data->object);
+                break;
+
+            case OID_ENTRY_GROUP:
+                avahi_entry_group_free(data->object);
+                break;
+
+            case OID_UNUSED:
+            ;
+        }
+    }
+
+    if (data->service_data) {
+        assert(data->type == OID_ENTRY_GROUP);
+        service_data_free(self, data->service_data);
+    }
+
+    oid_release(self, oid);
+
+    return SW_OKAY;
+}
+
+sw_result sw_discovery_init_with_flags(
+    sw_discovery * self,
+    sw_discovery_init_flags flags) {
+
+    assert(self);
+
+    AVAHI_WARN_LINKAGE;
+
+    if (flags != SW_DISCOVERY_USE_SHARED_SERVICE)
+        return SW_E_NO_IMPL;
+
+    return sw_discovery_init(self);
+}
diff --git a/avahi-0.6.31/avahi-compat-howl/include/corby/buffer.h b/avahi-0.6.31/avahi-compat-howl/include/corby/buffer.h
new file mode 100644
index 0000000..3c4416e
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-howl/include/corby/buffer.h
@@ -0,0 +1,330 @@
+#ifndef _sw_corby_buffer_h
+#define _sw_corby_buffer_h
+
+/*
+ * Copyright 2003, 2004 Porchdog Software. All rights reserved.
+ *
+ *	Redistribution and use in source and binary forms, with or without modification,
+ *	are permitted provided that the following conditions are met:
+ *
+ *		1. Redistributions of source code must retain the above copyright notice,
+ *		   this list of conditions and the following disclaimer.
+ *		2. Redistributions in binary form must reproduce the above copyright notice,
+ *		   this list of conditions and the following disclaimer in the documentation
+ *		   and/or other materials provided with the distribution.
+ *
+ *	THIS SOFTWARE IS PROVIDED BY PORCHDOG SOFTWARE ``AS IS'' AND ANY
+ *	EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ *	WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ *	IN NO EVENT SHALL THE HOWL PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ *	INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ *	BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ *	OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ *	OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ *	OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *	The views and conclusions contained in the software and documentation are those
+ *	of the authors and should not be interpreted as representing official policies,
+ *	either expressed or implied, of Porchdog Software.
+ */
+
+#include <salt/salt.h>
+#include <corby/corby.h>
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+
+struct										_sw_corby_buffer;
+typedef struct _sw_corby_buffer	*	sw_corby_buffer;
+struct										_sw_corby_object;
+typedef sw_opaque							sw_corby_buffer_delegate;
+typedef sw_opaque							sw_corby_buffer_observer;
+
+
+typedef enum _sw_corby_buffer_pad
+{
+	SW_CORBY_BUFFER_PAD_NONE,
+	SW_CORBY_BUFFER_PAD_ALIGN_2,
+	SW_CORBY_BUFFER_PAD_ALIGN_4,
+	SW_CORBY_BUFFER_PAD_ALIGN_8,
+	SW_CORBY_BUFFER_PAD_ALIGN_16,
+	SW_CORBY_BUFFER_PAD_ALIGN_32
+} sw_corby_buffer_pad;
+
+
+typedef sw_result
+(HOWL_API* sw_corby_buffer_written_func)(
+								sw_corby_buffer_observer	observer,
+								sw_corby_buffer				buffer,
+								sw_result						result,
+								sw_size_t						bytesWritten,
+								sw_opaque_t						extra);
+
+
+typedef sw_result
+(HOWL_API* sw_corby_buffer_overflow_func)(
+								sw_corby_buffer_delegate	delegate,
+								sw_corby_buffer				buffer,
+								sw_uint8						octet,
+								sw_uint8					**	base,
+								sw_uint8					**	bptr,
+								sw_uint8					**	eptr,
+								sw_uint8					**	end,
+								sw_opaque_t						extra);
+
+
+typedef sw_result
+(HOWL_API* sw_corby_buffer_underflow_func)(
+								sw_corby_buffer_delegate	delegate,
+								sw_corby_buffer				buffer,
+								sw_uint8					*	octet,
+								sw_uint8					**	base,
+								sw_uint8					**	bptr,
+								sw_uint8					**	eptr,
+								sw_uint8					**	end,
+								sw_opaque_t						extra);
+
+
+sw_result HOWL_API
+sw_corby_buffer_init(
+				sw_corby_buffer	*	self);
+
+
+sw_result HOWL_API
+sw_corby_buffer_init_with_size(
+				sw_corby_buffer	*	self,
+				sw_size_t				size);
+
+
+sw_result HOWL_API
+sw_corby_buffer_init_with_delegate(
+				sw_corby_buffer					*	self,
+				sw_corby_buffer_delegate			delegate,
+				sw_corby_buffer_overflow_func		overflow,
+				sw_corby_buffer_underflow_func	underflow,
+				sw_opaque_t								extra);
+
+
+sw_result HOWL_API
+sw_corby_buffer_init_with_size_and_delegate(
+				sw_corby_buffer					*	self,
+				sw_size_t								size,
+				sw_corby_buffer_delegate			delegate,
+				sw_corby_buffer_overflow_func		overflow,
+				sw_corby_buffer_underflow_func	underflow,
+				sw_opaque_t								extra);
+
+
+sw_result HOWL_API
+sw_corby_buffer_fina(
+				sw_corby_buffer	self);
+
+
+void HOWL_API
+sw_corby_buffer_reset(
+				sw_corby_buffer	self);
+
+
+sw_result HOWL_API
+sw_corby_buffer_set_octets(
+				sw_corby_buffer	self,
+				sw_octets			octets,
+				sw_size_t			size);
+
+
+sw_octets HOWL_API
+sw_corby_buffer_octets(
+				sw_corby_buffer	self);
+
+
+sw_size_t HOWL_API
+sw_corby_buffer_bytes_used(
+				sw_corby_buffer	self);
+
+
+sw_size_t HOWL_API
+sw_corby_buffer_size(
+				sw_corby_buffer	self);
+
+
+sw_result HOWL_API
+sw_corby_buffer_put_int8(
+				sw_corby_buffer	self,
+				sw_int8			val);
+
+
+sw_result HOWL_API
+sw_corby_buffer_put_uint8(
+				sw_corby_buffer	self,
+				sw_uint8			val);
+
+
+sw_result HOWL_API
+sw_corby_buffer_put_int16(
+				sw_corby_buffer	self,
+				sw_int16			val);
+
+
+sw_result HOWL_API
+sw_corby_buffer_put_uint16(
+				sw_corby_buffer	self,
+				sw_uint16			val);
+
+
+sw_result HOWL_API
+sw_corby_buffer_put_int32(
+				sw_corby_buffer	self,
+				sw_int32			val);
+
+
+sw_result HOWL_API
+sw_corby_buffer_put_uint32(
+				sw_corby_buffer	self,
+				sw_uint32			val);
+
+
+sw_result HOWL_API
+sw_corby_buffer_put_octets(
+				sw_corby_buffer	self,
+				sw_const_octets	val,
+				sw_size_t			size);
+
+
+sw_result HOWL_API
+sw_corby_buffer_put_sized_octets(
+				sw_corby_buffer	self,
+				sw_const_octets	val,
+				sw_uint32			len);
+
+
+sw_result HOWL_API
+sw_corby_buffer_put_cstring(
+				sw_corby_buffer	self,
+				sw_const_string	val);
+
+
+sw_result HOWL_API
+sw_corby_buffer_put_object(
+				sw_corby_buffer						self,
+				const struct _sw_corby_object	*	object);
+
+
+sw_result HOWL_API
+sw_corby_buffer_put_pad(
+				sw_corby_buffer						self,
+				sw_corby_buffer_pad					pad);
+
+
+sw_result HOWL_API
+sw_corby_buffer_get_int8(
+				sw_corby_buffer	self,
+				sw_int8		*	val);
+
+
+sw_result HOWL_API
+sw_corby_buffer_get_uint8(
+				sw_corby_buffer	self,
+				sw_uint8		*	val);
+
+
+sw_result HOWL_API
+sw_corby_buffer_get_int16(
+				sw_corby_buffer	self,
+				sw_int16		*	val,
+            sw_uint8			endian);
+
+
+sw_result HOWL_API
+sw_corby_buffer_get_uint16(
+				sw_corby_buffer	self,
+				sw_uint16		*	val,
+            sw_uint8			endian);
+
+
+sw_result HOWL_API
+sw_corby_buffer_get_int32(
+				sw_corby_buffer	self,
+				sw_int32		*	val,
+            sw_uint8			endian);
+
+
+sw_result HOWL_API
+sw_corby_buffer_get_uint32(
+				sw_corby_buffer	self,
+				sw_uint32		*	val,
+            sw_uint8			endian);
+
+
+sw_result HOWL_API
+sw_corby_buffer_get_octets(
+				sw_corby_buffer	self,
+				sw_octets			octets,
+				sw_size_t			size);
+
+
+sw_result HOWL_API
+sw_corby_buffer_allocate_and_get_sized_octets(
+				sw_corby_buffer	self,
+				sw_octets		*	val,
+				sw_uint32		*	size,
+            sw_uint8			endian);
+
+
+sw_result HOWL_API
+sw_corby_buffer_get_zerocopy_sized_octets(
+				sw_corby_buffer	self,
+				sw_octets		*	val,
+				sw_uint32		*	size,
+				sw_uint8			endian);
+
+
+sw_result HOWL_API
+sw_corby_buffer_get_sized_octets(
+				sw_corby_buffer	self,
+				sw_octets			val,
+				sw_uint32		*	len,
+            sw_uint8			endian);
+
+
+sw_result HOWL_API
+sw_corby_buffer_allocate_and_get_cstring(
+				sw_corby_buffer	self,
+				sw_string		*	val,
+				sw_uint32		*	len,
+				sw_uint8			endian);
+
+
+sw_result HOWL_API
+sw_corby_buffer_get_zerocopy_cstring(
+				sw_corby_buffer	self,
+				sw_string		*	val,
+				sw_uint32		*	len,
+				sw_uint8			endian);
+
+
+sw_result HOWL_API
+sw_corby_buffer_get_cstring(
+				sw_corby_buffer	self,
+				sw_string			val,
+				sw_uint32		*	len,
+				sw_uint8			endian);
+
+
+sw_result HOWL_API
+sw_corby_buffer_get_object(
+				sw_corby_buffer				self,
+				struct _sw_corby_object	**	object,
+				sw_uint8						endian);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif
diff --git a/avahi-0.6.31/avahi-compat-howl/include/corby/channel.h b/avahi-0.6.31/avahi-compat-howl/include/corby/channel.h
new file mode 100644
index 0000000..9c91fbb
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-howl/include/corby/channel.h
@@ -0,0 +1,186 @@
+#ifndef _sw_corby_channel_h
+#define _sw_corby_channel_h
+
+/*
+ * Copyright 2003, 2004 Porchdog Software. All rights reserved.
+ *
+ *	Redistribution and use in source and binary forms, with or without modification,
+ *	are permitted provided that the following conditions are met:
+ *
+ *		1. Redistributions of source code must retain the above copyright notice,
+ *		   this list of conditions and the following disclaimer.
+ *		2. Redistributions in binary form must reproduce the above copyright notice,
+ *		   this list of conditions and the following disclaimer in the documentation
+ *		   and/or other materials provided with the distribution.
+ *
+ *	THIS SOFTWARE IS PROVIDED BY PORCHDOG SOFTWARE ``AS IS'' AND ANY
+ *	EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ *	WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ *	IN NO EVENT SHALL THE HOWL PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ *	INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ *	BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ *	OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ *	OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ *	OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *	The views and conclusions contained in the software and documentation are those
+ *	of the authors and should not be interpreted as representing official policies,
+ *	either expressed or implied, of Porchdog Software.
+ */
+
+#include <salt/salt.h>
+#include <salt/socket.h>
+#include <corby/corby.h>
+#include <corby/buffer.h>
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+struct												_sw_corby_channel;
+typedef struct _sw_corby_channel			*	sw_corby_channel;
+struct												_sw_corby_message;
+struct												_sw_corby_profile;
+typedef struct _sw_corby_profile			*	sw_corby_profile;
+typedef struct _sw_corby_profile const	*	sw_const_corby_profile;
+
+
+typedef enum _sw_corby_reply_status
+{
+   SW_CORBY_NO_EXCEPTION		=	0,
+   SW_CORBY_SYSTEM_EXCEPTION	=	1,
+   SW_CORBY_USER_EXCEPTION		=	2,
+   SW_CORBY_LOCATION_FORWARD	=	3
+} sw_corby_reply_status;
+
+
+typedef sw_result
+(HOWL_API *sw_corby_channel_will_send_func)(
+						sw_corby_channel			channel,
+						sw_octets					bytes,
+						sw_size_t					len,
+						sw_opaque_t					extra);
+
+
+typedef sw_result
+(HOWL_API *sw_corby_channel_did_read_func)(
+						sw_corby_channel			channel,
+						sw_octets					bytes,
+						sw_size_t					len,
+						sw_opaque_t					extra);
+
+
+typedef void
+(HOWL_API *sw_corby_channel_cleanup_func)(
+						sw_corby_channel			channel);
+
+
+typedef struct _sw_corby_channel_delegate
+{
+	sw_opaque_t								m_delegate;
+	sw_corby_channel_will_send_func	m_will_send_func;
+	sw_corby_channel_did_read_func	m_did_read_func;
+	sw_corby_channel_cleanup_func		m_cleanup_func;
+	sw_opaque_t								m_extra;
+} * sw_corby_channel_delegate;
+
+
+sw_result HOWL_API
+sw_corby_channel_start_request(
+							sw_corby_channel				self,
+							sw_const_corby_profile		profile,
+							struct _sw_corby_buffer	**	buffer,
+							sw_const_string				op,
+							sw_uint32						oplen,
+							sw_bool						reply_expected);
+
+
+sw_result HOWL_API
+sw_corby_channel_start_reply(
+							sw_corby_channel				self,
+							struct _sw_corby_buffer	**	buffer,
+							sw_uint32						request_id,
+							sw_corby_reply_status		status);
+
+
+sw_result HOWL_API
+sw_corby_channel_send(
+							sw_corby_channel					self,
+							struct _sw_corby_buffer		*	buffer,
+							sw_corby_buffer_observer		observer,
+							sw_corby_buffer_written_func	func,
+							sw_opaque_t							extra);
+
+
+sw_result HOWL_API
+sw_corby_channel_recv(
+							sw_corby_channel					self,
+							sw_salt							*	salt,
+							struct _sw_corby_message	**	message,
+							sw_uint32						*	request_id,
+							sw_string						*	op,
+							sw_uint32						*	op_len,
+							struct _sw_corby_buffer		**	buffer,
+							sw_uint8						*	endian,
+							sw_bool							block);
+
+
+sw_result HOWL_API
+sw_corby_channel_last_recv_from(
+							sw_corby_channel					self,
+							sw_ipv4_address				*	from,
+							sw_port						*	from_port);
+
+
+sw_result HOWL_API
+sw_corby_channel_ff(
+							sw_corby_channel					self,
+							struct _sw_corby_buffer		*	buffer);
+
+
+sw_socket HOWL_API
+sw_corby_channel_socket(
+							sw_corby_channel				self);
+
+
+sw_result HOWL_API
+sw_corby_channel_retain(
+							sw_corby_channel				self);
+
+
+sw_result HOWL_API
+sw_corby_channel_set_delegate(
+							sw_corby_channel				self,
+							sw_corby_channel_delegate	delegate);
+
+
+sw_corby_channel_delegate HOWL_API
+sw_corby_channel_get_delegate(
+							sw_corby_channel				self);
+
+
+void HOWL_API
+sw_corby_channel_set_app_data(
+							sw_corby_channel				self,
+							sw_opaque						app_data);
+
+
+sw_opaque HOWL_API
+sw_corby_channel_get_app_data(
+							sw_corby_channel				self);
+
+
+sw_result HOWL_API
+sw_corby_channel_fina(
+							sw_corby_channel				self);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif
diff --git a/avahi-0.6.31/avahi-compat-howl/include/corby/corby.h b/avahi-0.6.31/avahi-compat-howl/include/corby/corby.h
new file mode 100644
index 0000000..5e069ff
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-howl/include/corby/corby.h
@@ -0,0 +1,68 @@
+#ifndef _corby_corby_h
+#define _corby_corby_h
+
+/*
+ * Copyright 2003, 2004 Porchdog Software. All rights reserved.
+ *
+ *	Redistribution and use in source and binary forms, with or without modification,
+ *	are permitted provided that the following conditions are met:
+ *
+ *		1. Redistributions of source code must retain the above copyright notice,
+ *		   this list of conditions and the following disclaimer.
+ *		2. Redistributions in binary form must reproduce the above copyright notice,
+ *		   this list of conditions and the following disclaimer in the documentation
+ *		   and/or other materials provided with the distribution.
+ *
+ *	THIS SOFTWARE IS PROVIDED BY PORCHDOG SOFTWARE ``AS IS'' AND ANY
+ *	EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ *	WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ *	IN NO EVENT SHALL THE HOWL PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ *	INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ *	BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ *	OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ *	OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ *	OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *	The views and conclusions contained in the software and documentation are those
+ *	of the authors and should not be interpreted as representing official policies,
+ *	either expressed or implied, of Porchdog Software.
+ */
+
+#include <salt/platform.h>
+
+/*
+ * corby limits
+ */
+#define SW_CORBY_OID_LEN		32
+
+
+/*
+ * protocol tags.  the only standard one is TAG_INTERNET_IIOP.
+ * the others are proprietary pandora corby protocols.
+ */
+#define SW_TAG_INTERNET_IOP	0
+#define SW_TAG_UIOP				250
+#define SW_TAG_MIOP				251
+#define SW_MIOP_ADDR				"231.255.255.250"
+typedef sw_uint32				sw_corby_protocol_tag;
+
+
+/*
+ * error codes
+ */
+#define SW_E_CORBY_BASE					0x80000500
+#define SW_E_CORBY_UNKNOWN				(SW_E_CORBY_BASE + 0)
+#define SW_E_CORBY_BAD_CONFIG			(SW_E_CORBY_BASE + 1)
+#define SW_E_CORBY_NO_INTERFACE		(SW_E_CORBY_BASE + 2)
+#define SW_E_CORBY_BAD_URL				(SW_E_CORBY_BASE + 3)
+#define SW_E_CORBY_BAD_NAME			(SW_E_CORBY_BASE + 4)
+#define SW_E_CORBY_BAD_MESSAGE		(SW_E_CORBY_BASE + 5)
+#define SW_E_CORBY_BAD_VERSION		(SW_E_CORBY_BASE + 6)
+#define SW_E_CORBY_BAD_OID				(SW_E_CORBY_BASE + 7)
+#define SW_E_CORBY_BAD_OPERATION		(SW_E_CORBY_BASE + 8)
+#define SW_E_CORBY_MARSHAL				(SW_E_CORBY_BASE + 10)
+#define SW_E_CORBY_OBJECT_NOT_EXIST	(SW_E_CORBY_BASE + 11)
+
+
+#endif
diff --git a/avahi-0.6.31/avahi-compat-howl/include/corby/message.h b/avahi-0.6.31/avahi-compat-howl/include/corby/message.h
new file mode 100644
index 0000000..a06c358
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-howl/include/corby/message.h
@@ -0,0 +1,60 @@
+#ifndef _sw_corby_message_h
+#define _sw_corby_message_h
+
+/*
+ * Copyright 2003, 2004 Porchdog Software. All rights reserved.
+ *
+ *	Redistribution and use in source and binary forms, with or without modification,
+ *	are permitted provided that the following conditions are met:
+ *
+ *		1. Redistributions of source code must retain the above copyright notice,
+ *		   this list of conditions and the following disclaimer.
+ *		2. Redistributions in binary form must reproduce the above copyright notice,
+ *		   this list of conditions and the following disclaimer in the documentation
+ *		   and/or other materials provided with the distribution.
+ *
+ *	THIS SOFTWARE IS PROVIDED BY PORCHDOG SOFTWARE ``AS IS'' AND ANY
+ *	EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ *	WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ *	IN NO EVENT SHALL THE HOWL PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ *	INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ *	BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ *	OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ *	OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ *	OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *	The views and conclusions contained in the software and documentation are those
+ *	of the authors and should not be interpreted as representing official policies,
+ *	either expressed or implied, of Porchdog Software.
+ */
+
+#include <corby/corby.h>
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+
+struct 										_sw_corby_message;
+typedef struct _sw_corby_message	*	sw_corby_message;
+
+
+sw_result HOWL_API
+sw_corby_message_init(
+					sw_corby_message	*	self);
+
+
+sw_result HOWL_API
+sw_corby_message_fina(
+					sw_corby_message	self);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif
diff --git a/avahi-0.6.31/avahi-compat-howl/include/corby/object.h b/avahi-0.6.31/avahi-compat-howl/include/corby/object.h
new file mode 100644
index 0000000..1cfd516
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-howl/include/corby/object.h
@@ -0,0 +1,113 @@
+#ifndef _corby_object_h
+#define _corby_object_h
+
+/*
+ * Copyright 2003, 2004 Porchdog Software. All rights reserved.
+ *
+ *	Redistribution and use in source and binary forms, with or without modification,
+ *	are permitted provided that the following conditions are met:
+ *
+ *		1. Redistributions of source code must retain the above copyright notice,
+ *		   this list of conditions and the following disclaimer.
+ *		2. Redistributions in binary form must reproduce the above copyright notice,
+ *		   this list of conditions and the following disclaimer in the documentation
+ *		   and/or other materials provided with the distribution.
+ *
+ *	THIS SOFTWARE IS PROVIDED BY PORCHDOG SOFTWARE ``AS IS'' AND ANY
+ *	EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ *	WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ *	IN NO EVENT SHALL THE HOWL PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ *	INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ *	BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ *	OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ *	OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ *	OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *	The views and conclusions contained in the software and documentation are those
+ *	of the authors and should not be interpreted as representing official policies,
+ *	either expressed or implied, of Porchdog Software.
+ */
+
+#include <salt/salt.h>
+#include <corby/message.h>
+#include <corby/channel.h>
+#include <corby/buffer.h>
+#include <corby/corby.h>
+
+#if defined(__cplusplus)
+extern "C"
+{
+#endif
+
+struct										_sw_corby_orb;
+struct										_sw_corby_object;
+typedef struct _sw_corby_object	*	sw_corby_object;
+typedef sw_opaque							sw_corby_object_send_completion_handler;
+typedef void
+(HOWL_API *sw_corby_object_send_completion_func)(
+												sw_corby_object	object,
+												sw_corby_buffer	buffer,
+												sw_result			result);
+
+
+
+sw_result HOWL_API
+sw_corby_object_init_from_url(
+							sw_corby_object			*	self,
+							struct _sw_corby_orb		*	orb,
+							sw_const_string				url,
+							sw_socket_options				options,
+							sw_uint32							bufsize);
+
+
+sw_result HOWL_API
+sw_corby_object_fina(
+							sw_corby_object		self);
+
+
+sw_result HOWL_API
+sw_corby_object_start_request(
+							sw_corby_object 		self,
+							sw_const_string		op,
+							sw_uint32					op_len,
+							sw_bool					reply_expected,
+							sw_corby_buffer	*	buffer);
+
+
+sw_result HOWL_API
+sw_corby_object_send(
+							sw_corby_object					self,
+							sw_corby_buffer					buffer,
+							sw_corby_buffer_observer		observer,
+							sw_corby_buffer_written_func	func,
+							sw_opaque							extra);
+
+
+sw_result HOWL_API
+sw_corby_object_recv(
+							sw_corby_object		self,
+							sw_corby_message	*	message,
+                     sw_corby_buffer	*	buffer,
+                     sw_uint8				*	endian,
+                     sw_bool					block);
+
+
+sw_result HOWL_API
+sw_corby_object_channel(
+							sw_corby_object		self,
+							sw_corby_channel	*	channel);
+
+
+sw_result HOWL_API
+sw_corby_object_set_channel(
+							sw_corby_object		self,
+							sw_corby_channel		channel);
+
+
+#if defined(__cplusplus)
+}
+#endif
+
+
+#endif
diff --git a/avahi-0.6.31/avahi-compat-howl/include/corby/orb.h b/avahi-0.6.31/avahi-compat-howl/include/corby/orb.h
new file mode 100644
index 0000000..76af578
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-howl/include/corby/orb.h
@@ -0,0 +1,199 @@
+#ifndef _corby_orb_h
+#define _corby_orb_h
+
+/*
+ * Copyright 2003, 2004 Porchdog Software. All rights reserved.
+ *
+ *	Redistribution and use in source and binary forms, with or without modification,
+ *	are permitted provided that the following conditions are met:
+ *
+ *		1. Redistributions of source code must retain the above copyright notice,
+ *		   this list of conditions and the following disclaimer.
+ *		2. Redistributions in binary form must reproduce the above copyright notice,
+ *		   this list of conditions and the following disclaimer in the documentation
+ *		   and/or other materials provided with the distribution.
+ *
+ *	THIS SOFTWARE IS PROVIDED BY PORCHDOG SOFTWARE ``AS IS'' AND ANY
+ *	EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ *	WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ *	IN NO EVENT SHALL THE HOWL PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ *	INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ *	BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ *	OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ *	OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ *	OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *	The views and conclusions contained in the software and documentation are those
+ *	of the authors and should not be interpreted as representing official policies,
+ *	either expressed or implied, of Porchdog Software.
+ */
+
+#include <salt/salt.h>
+#include <salt/address.h>
+#include <salt/socket.h>
+#include <corby/corby.h>
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+
+struct									_sw_corby_orb;
+typedef struct _sw_corby_orb	*	sw_corby_orb;
+typedef sw_opaque						sw_corby_orb_observer;
+typedef sw_opaque						sw_corby_servant;
+struct									_sw_corby_object;
+struct									_sw_corby_channel;
+struct									_sw_corby_message;
+struct									_sw_corby_buffer;
+
+typedef sw_result
+(HOWL_API *sw_corby_orb_accept_channel_func)(
+								sw_corby_orb						orb,
+								struct _sw_corby_channel	*	channel);
+
+
+typedef struct _sw_corby_orb_delegate
+{
+	sw_opaque								m_delegate;
+	sw_corby_orb_accept_channel_func	m_accept_channel_func;
+	sw_opaque								m_extra;
+} * sw_corby_orb_delegate;
+
+
+typedef struct _sw_corby_orb_config
+{
+	sw_string	m_name;
+	sw_uint32	m_tag;
+	sw_string	m_host;
+	sw_port	m_port;
+	sw_string	m_options;
+} sw_corby_orb_config;
+
+
+typedef sw_result
+(HOWL_API *sw_corby_servant_cb)(
+				sw_corby_servant					servant,
+				sw_salt								salt,
+				sw_corby_orb						orb,
+				struct _sw_corby_channel	*	channel,
+				struct _sw_corby_message	*	message,
+				struct _sw_corby_buffer		*	buffer,
+				sw_const_string					op,
+				sw_uint32							op_len,
+				sw_uint32							request_id,
+				sw_uint8							endian);
+
+
+typedef sw_result
+(HOWL_API *sw_corby_orb_observer_func)(
+				sw_corby_orb_observer			handler,
+				sw_salt								salt,
+				sw_corby_orb						orb,
+				struct _sw_corby_channel	*	channel,
+				sw_opaque_t							extra);
+
+
+sw_result HOWL_API
+sw_corby_orb_init(
+				sw_corby_orb						*	self,
+				sw_salt									salt,
+				const sw_corby_orb_config		*	config,
+            sw_corby_orb_observer				observer,
+            sw_corby_orb_observer_func			func,
+            sw_opaque_t								extra);
+
+
+sw_result HOWL_API
+sw_corby_orb_fina(
+				sw_corby_orb	self);
+
+
+sw_result HOWL_API
+sw_corby_orb_register_servant(
+				sw_corby_orb					self,
+				sw_corby_servant				servant,
+            sw_corby_servant_cb			cb,
+				sw_const_string				oid,
+				struct _sw_corby_object	**	object,
+				sw_const_string				protocol_name);
+
+
+sw_result HOWL_API
+sw_corby_orb_unregister_servant(
+				sw_corby_orb		self,
+				sw_const_string	oid);
+
+
+sw_result HOWL_API
+sw_corby_orb_register_bidirectional_object(
+				sw_corby_orb					self,
+				struct _sw_corby_object	*	object);
+
+
+sw_result HOWL_API
+sw_corby_orb_register_channel(
+				sw_corby_orb						self,
+				struct _sw_corby_channel	*	channel);
+
+
+sw_corby_orb_delegate HOWL_API
+sw_corby_orb_get_delegate(
+				sw_corby_orb						self);
+
+
+sw_result HOWL_API
+sw_corby_orb_set_delegate(
+				sw_corby_orb						self,
+				sw_corby_orb_delegate			delegate);
+
+
+sw_result HOWL_API
+sw_corby_orb_set_observer(
+				sw_corby_orb						self,
+				sw_corby_orb_observer			observer,
+				sw_corby_orb_observer_func		func,
+				sw_opaque_t							extra);
+
+
+sw_result HOWL_API
+sw_corby_orb_protocol_to_address(
+				sw_corby_orb		self,
+				sw_const_string	tag,
+				sw_string			addr,
+				sw_port		*	port);
+
+
+sw_result HOWL_API
+sw_corby_orb_protocol_to_url(
+				sw_corby_orb		self,
+				sw_const_string	tag,
+				sw_const_string	name,
+				sw_string			url,
+				sw_size_t			url_len);
+
+
+sw_result HOWL_API
+sw_corby_orb_read_channel(
+				sw_corby_orb						self,
+				struct _sw_corby_channel	*	channel);
+
+
+sw_result HOWL_API
+sw_corby_orb_dispatch_message(
+				sw_corby_orb						self,
+				struct _sw_corby_channel	*	channel,
+				struct _sw_corby_message	*	message,
+				struct _sw_corby_buffer		*	buffer,
+				sw_uint8							endian);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif
diff --git a/avahi-0.6.31/avahi-compat-howl/include/discovery/discovery.h b/avahi-0.6.31/avahi-compat-howl/include/discovery/discovery.h
new file mode 100644
index 0000000..082373d
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-howl/include/discovery/discovery.h
@@ -0,0 +1,327 @@
+#ifndef _discovery_discovery_h
+#define _discovery_discovery_h
+
+/*
+ * Copyright 2003, 2004 Porchdog Software. All rights reserved.
+ *
+ *	Redistribution and use in source and binary forms, with or without modification,
+ *	are permitted provided that the following conditions are met:
+ *
+ *		1. Redistributions of source code must retain the above copyright notice,
+ *		   this list of conditions and the following disclaimer.
+ *		2. Redistributions in binary form must reproduce the above copyright notice,
+ *		   this list of conditions and the following disclaimer in the documentation
+ *		   and/or other materials provided with the distribution.
+ *
+ *	THIS SOFTWARE IS PROVIDED BY PORCHDOG SOFTWARE ``AS IS'' AND ANY
+ *	EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ *	WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ *	IN NO EVENT SHALL THE HOWL PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ *	INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ *	BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ *	OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ *	OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ *	OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *	The views and conclusions contained in the software and documentation are those
+ *	of the authors and should not be interpreted as representing official policies,
+ *	either expressed or implied, of Porchdog Software.
+ */
+
+#include <salt/salt.h>
+#include <salt/socket.h>
+
+
+#if defined(__cplusplus)
+extern "C"
+{
+#endif
+
+
+struct									_sw_discovery;
+typedef struct _sw_discovery	*	sw_discovery;
+
+
+/*
+ * keeps track of different discovery operations
+ */
+typedef sw_uint32						sw_discovery_oid;
+
+
+/*
+ * For backwards compatibility
+ */
+#define sw_discovery_publish_host_id	sw_discovery_oid
+#define sw_discovery_publish_id			sw_discovery_oid
+#define sw_discovery_browse_id			sw_discovery_oid
+#define sw_discovery_resolve_id			sw_discovery_oid
+
+
+/*
+ * how to connect to server
+ */
+typedef enum _sw_discovery_init_flags
+{
+	SW_DISCOVERY_USE_SHARED_SERVICE		=	0x1,
+	SW_DISCOVERY_USE_PRIVATE_SERVICE		=	0x2,
+	SW_DISCOVERY_SKIP_VERSION_CHECK		=	0x4
+} sw_discovery_init_flags;
+
+
+/*
+ * status for asynchronous registration call
+ */
+typedef enum _sw_discovery_publish_status
+{
+	SW_DISCOVERY_PUBLISH_STARTED,
+	SW_DISCOVERY_PUBLISH_STOPPED,
+	SW_DISCOVERY_PUBLISH_NAME_COLLISION,
+	SW_DISCOVERY_PUBLISH_INVALID
+} sw_discovery_publish_status;
+
+
+typedef enum _sw_discovery_browse_status
+{
+	SW_DISCOVERY_BROWSE_INVALID,
+	SW_DISCOVERY_BROWSE_RELEASE,
+	SW_DISCOVERY_BROWSE_ADD_DOMAIN,
+	SW_DISCOVERY_BROWSE_ADD_DEFAULT_DOMAIN,
+	SW_DISCOVERY_BROWSE_REMOVE_DOMAIN,
+	SW_DISCOVERY_BROWSE_ADD_SERVICE,
+	SW_DISCOVERY_BROWSE_REMOVE_SERVICE,
+	SW_DISCOVERY_BROWSE_RESOLVED
+} sw_discovery_browse_status;
+
+
+typedef enum _sw_discovery_query_record_status
+{
+	SW_DISCOVERY_QUERY_RECORD_ADD			=	0x1
+} sw_discovery_query_record_status;
+
+
+typedef sw_result
+(HOWL_API *sw_discovery_publish_reply)(
+							sw_discovery						session,
+							sw_discovery_oid					oid,
+							sw_discovery_publish_status	status,
+							sw_opaque							extra);
+
+typedef sw_result
+(HOWL_API *sw_discovery_browse_reply)(
+							sw_discovery						session,
+							sw_discovery_oid					oid,
+							sw_discovery_browse_status		status,
+							sw_uint32							interface_index,
+							sw_const_string					name,
+							sw_const_string					type,
+							sw_const_string					domain,
+							sw_opaque							extra);
+
+typedef sw_result
+(HOWL_API *sw_discovery_resolve_reply)(
+							sw_discovery						session,
+							sw_discovery_oid					oid,
+							sw_uint32							interface_index,
+							sw_const_string					name,
+							sw_const_string					type,
+							sw_const_string					domain,
+							sw_ipv4_address					address,
+							sw_port								port,
+							sw_octets							text_record,
+							sw_uint32							text_record_len,
+							sw_opaque							extra);
+
+
+typedef sw_result
+(HOWL_API *sw_discovery_query_record_reply)(
+							sw_discovery								session,
+							sw_discovery_oid							oid,
+							sw_discovery_query_record_status		status,
+							sw_uint32									interface_index,
+							sw_const_string							fullname,
+							sw_uint16									rrtype,
+							sw_uint16									rrclass,
+							sw_uint16									rrdatalen,
+							sw_const_octets							rrdata,
+							sw_uint32									ttl,
+							sw_opaque									extra);
+
+
+/*
+ * API for publishing/browsing/resolving services
+ */
+sw_result HOWL_API
+sw_discovery_init(
+					sw_discovery			*	self);
+
+
+sw_result HOWL_API
+sw_discovery_init_with_flags(
+					sw_discovery			*	self,
+					sw_discovery_init_flags	flags);
+
+
+sw_result HOWL_API
+sw_discovery_fina(
+					sw_discovery		self);
+
+
+sw_result HOWL_API
+sw_discovery_publish_host(
+					sw_discovery						self,
+					sw_uint32							interface_index,
+					sw_const_string					name,
+					sw_const_string					domain,
+					sw_ipv4_address					address,
+					sw_discovery_publish_reply		reply,
+					sw_opaque							extra,
+					sw_discovery_oid				*	oid);
+
+
+sw_result HOWL_API
+sw_discovery_publish(
+					sw_discovery						self,
+					sw_uint32							interface_index,
+					sw_const_string					name,
+					sw_const_string					type,
+					sw_const_string					domain,
+					sw_const_string					host,
+					sw_port								port,
+					sw_octets							text_record,
+					sw_uint32							text_record_len,
+					sw_discovery_publish_reply		reply,
+					sw_opaque							extra,
+					sw_discovery_oid				*	oid);
+
+
+sw_result HOWL_API
+sw_discovery_publish_update(
+					sw_discovery						self,
+					sw_discovery_oid					oid,
+					sw_octets							text_record,
+					sw_uint32							text_record_len);
+
+
+
+/*
+ * API for browsing domains
+ */
+sw_result HOWL_API
+sw_discovery_browse_domains(
+					sw_discovery						self,
+					sw_uint32							interface_index,
+					sw_discovery_browse_reply		reply,
+					sw_opaque							extra,
+					sw_discovery_oid				*	oid);
+
+
+
+/*
+ * API for browsing services
+ */
+sw_result HOWL_API
+sw_discovery_browse(
+					sw_discovery						self,
+					sw_uint32							interface_index,
+					sw_const_string					type,
+					sw_const_string					domain,
+					sw_discovery_browse_reply		reply,
+					sw_opaque							extra,
+					sw_discovery_oid				*	oid);
+
+
+/*
+ * API for resolving services
+ */
+sw_result HOWL_API
+sw_discovery_resolve(
+					sw_discovery						self,
+					sw_uint32							interface_index,
+					sw_const_string					name,
+					sw_const_string					type,
+					sw_const_string					domain,
+					sw_discovery_resolve_reply		reply,
+					sw_opaque							extra,
+					sw_discovery_oid				*	oid);
+
+
+sw_result HOWL_API
+sw_discovery_query_record(
+					sw_discovery								self,
+					sw_uint32									interface_index,
+					sw_uint32									flags,
+					sw_const_string							fullname,
+					sw_uint16									rrtype,
+					sw_uint16									rrclass,
+					sw_discovery_query_record_reply		reply,
+					sw_opaque									extra,
+					sw_discovery_oid						*	oid);
+
+
+sw_result HOWL_API
+sw_discovery_cancel(
+					sw_discovery		self,
+					sw_discovery_oid	oid);
+
+
+
+/* ----------------------------------------------------------
+ *
+ * Event Processing APIs
+ *
+ * ----------------------------------------------------------
+ */
+
+
+sw_result HOWL_API
+sw_discovery_run(
+					sw_discovery						self);
+
+
+sw_result HOWL_API
+sw_discovery_stop_run(
+					sw_discovery						self);
+
+
+int HOWL_API
+sw_discovery_socket(
+					sw_discovery						self);
+
+
+sw_result HOWL_API
+sw_discovery_read_socket(
+					sw_discovery						self);
+
+
+sw_result HOWL_API
+sw_discovery_salt(
+					sw_discovery	self,
+					sw_salt		*	salt);
+
+
+/*
+ * Error codes
+ */
+#define SW_DISCOVERY_E_BASE					900
+#define SW_DISCOVERY_E_UNKNOWN				(SW_DISCOVERY_E_BASE + 2)
+#define SW_DISCOVERY_E_NO_SUCH_NAME			(SW_DISCOVERY_E_BASE + 3)
+#define SW_DISCOVERY_E_NO_MEM					(SW_DISCOVERY_E_BASE + 4)
+#define SW_DISCOVERY_E_BAD_PARAM				(SW_DISCOVERY_E_BASE + 5)
+#define SW_DISCOVERY_E_BAD_REFERENCE		(SW_DISCOVERY_E_BASE + 6)
+#define SW_DISCOVERY_E_BAD_STATE				(SW_DISCOVERY_E_BASE + 7)
+#define SW_DISCOVERY_E_BAD_FLAGS				(SW_DISCOVERY_E_BASE + 8)
+#define SW_DISCOVERY_E_NOT_SUPPORTED		(SW_DISCOVERY_E_BASE + 9)
+#define SW_DISCOVERY_E_NOT_INITIALIZED		(SW_DISCOVERY_E_BASE + 10)
+#define SW_DISCOVERY_E_NO_CACHE				(SW_DISCOVERY_E_BASE + 11)
+#define SW_DISCOVERY_E_ALREADY_REGISTERED	(SW_DISCOVERY_E_BASE + 12)
+#define SW_DISCOVERY_E_NAME_CONFLICT		(SW_DISCOVERY_E_BASE + 13)
+#define SW_DISCOVERY_E_INVALID				(SW_DISCOVERY_E_BASE + 14)
+
+
+#if defined(__cplusplus)
+}
+#endif
+
+
+#endif
diff --git a/avahi-0.6.31/avahi-compat-howl/include/discovery/text_record.h b/avahi-0.6.31/avahi-compat-howl/include/discovery/text_record.h
new file mode 100644
index 0000000..a5ee802
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-howl/include/discovery/text_record.h
@@ -0,0 +1,143 @@
+#ifndef _discovery_text_record_h
+#define _discovery_text_record_h
+
+/*
+ * Copyright 2003, 2004 Porchdog Software. All rights reserved.
+ *
+ *	Redistribution and use in source and binary forms, with or without modification,
+ *	are permitted provided that the following conditions are met:
+ *
+ *		1. Redistributions of source code must retain the above copyright notice,
+ *		   this list of conditions and the following disclaimer.
+ *		2. Redistributions in binary form must reproduce the above copyright notice,
+ *		   this list of conditions and the following disclaimer in the documentation
+ *		   and/or other materials provided with the distribution.
+ *
+ *	THIS SOFTWARE IS PROVIDED BY PORCHDOG SOFTWARE ``AS IS'' AND ANY
+ *	EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ *	WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ *	IN NO EVENT SHALL THE HOWL PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ *	INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ *	BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ *	OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ *	OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ *	OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *	The views and conclusions contained in the software and documentation are those
+ *	of the authors and should not be interpreted as representing official policies,
+ *	either expressed or implied, of Porchdog Software.
+ */
+
+#include <salt/salt.h>
+
+#if defined(__cplusplus)
+extern "C"
+{
+#endif
+
+#define SW_TEXT_RECORD_MAX_LEN 255
+
+
+struct															_sw_text_record;
+typedef struct _sw_text_record						*	sw_text_record;
+struct															_sw_text_record_iterator;
+typedef struct _sw_text_record_iterator			*	sw_text_record_iterator;
+struct															_sw_text_record_string_iterator;
+typedef struct _sw_text_record_string_iterator	*	sw_text_record_string_iterator;
+
+
+/*
+ * Text record APIs
+ */
+sw_result HOWL_API
+sw_text_record_init(
+				sw_text_record	*	self);
+
+
+sw_result HOWL_API
+sw_text_record_fina(
+				sw_text_record		self);
+
+
+sw_result HOWL_API
+sw_text_record_add_string(
+				sw_text_record		self,
+				sw_const_string	string);
+
+
+sw_result HOWL_API
+sw_text_record_add_key_and_string_value(
+				sw_text_record		self,
+				sw_const_string	key,
+				sw_const_string	val);
+
+
+sw_result HOWL_API
+sw_text_record_add_key_and_binary_value(
+				sw_text_record		self,
+				sw_const_string	key,
+				sw_octets			val,
+				sw_uint32				len);
+
+
+sw_octets HOWL_API
+sw_text_record_bytes(
+				sw_text_record		self);
+
+
+sw_uint32 HOWL_API
+sw_text_record_len(
+				sw_text_record		self);
+
+
+/*
+ * APIs for iterating through raw text records
+ */
+sw_result HOWL_API
+sw_text_record_iterator_init(
+				sw_text_record_iterator	*	self,
+				sw_octets						text_record,
+				sw_uint32						text_record_len);
+
+
+sw_result HOWL_API
+sw_text_record_iterator_fina(
+				sw_text_record_iterator		self);
+
+
+sw_result HOWL_API
+sw_text_record_iterator_next(
+				sw_text_record_iterator		self,
+				char								key[SW_TEXT_RECORD_MAX_LEN],
+				sw_uint8							val[SW_TEXT_RECORD_MAX_LEN],
+				sw_uint32					*	val_len);
+
+
+/*
+ * APIs for iterating through stringified text records
+ */
+sw_result HOWL_API
+sw_text_record_string_iterator_init(
+				sw_text_record_string_iterator	*	self,
+				sw_const_string							text_record_string);
+
+
+sw_result HOWL_API
+sw_text_record_string_iterator_fina(
+				sw_text_record_string_iterator	self);
+
+
+sw_result HOWL_API
+sw_text_record_string_iterator_next(
+				sw_text_record_string_iterator	self,
+				char										key[SW_TEXT_RECORD_MAX_LEN],
+				char										val[SW_TEXT_RECORD_MAX_LEN]);
+
+
+#if defined(__cplusplus)
+}
+#endif
+
+
+#endif
diff --git a/avahi-0.6.31/avahi-compat-howl/include/howl.h b/avahi-0.6.31/avahi-compat-howl/include/howl.h
new file mode 100644
index 0000000..dac6d43
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-howl/include/howl.h
@@ -0,0 +1,44 @@
+#ifndef _sw_howl_h
+#define _sw_howl_h
+
+/*
+ * Copyright 2003, 2004 Porchdog Software. All rights reserved.
+ *
+ *	Redistribution and use in source and binary forms, with or without modification,
+ *	are permitted provided that the following conditions are met:
+ *
+ *		1. Redistributions of source code must retain the above copyright notice,
+ *		   this list of conditions and the following disclaimer.
+ *		2. Redistributions in binary form must reproduce the above copyright notice,
+ *		   this list of conditions and the following disclaimer in the documentation
+ *		   and/or other materials provided with the distribution.
+ *
+ *	THIS SOFTWARE IS PROVIDED BY PORCHDOG SOFTWARE ``AS IS'' AND ANY
+ *	EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ *	WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ *	IN NO EVENT SHALL THE HOWL PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ *	INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ *	BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ *	OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ *	OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ *	OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *	The views and conclusions contained in the software and documentation are those
+ *	of the authors and should not be interpreted as representing official policies,
+ *	either expressed or implied, of Porchdog Software.
+ */
+
+#include <salt/salt.h>
+#include <salt/time.h>
+#include <salt/debug.h>
+#include <corby/orb.h>
+#include <corby/message.h>
+#include <corby/object.h>
+#include <corby/channel.h>
+#include <corby/buffer.h>
+#include <discovery/discovery.h>
+#include <discovery/text_record.h>
+
+
+#endif
diff --git a/avahi-0.6.31/avahi-compat-howl/include/rendezvous/rendezvous.h b/avahi-0.6.31/avahi-compat-howl/include/rendezvous/rendezvous.h
new file mode 100644
index 0000000..12c85e8
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-howl/include/rendezvous/rendezvous.h
@@ -0,0 +1,101 @@
+#ifndef _rendezvous_rendezvous_h
+#define _rendezvous_rendezvous_h
+
+/*
+ * Copyright 2003, 2004 Porchdog Software. All rights reserved.
+ *
+ *	Redistribution and use in source and binary forms, with or without modification,
+ *	are permitted provided that the following conditions are met:
+ *
+ *		1. Redistributions of source code must retain the above copyright notice,
+ *		   this list of conditions and the following disclaimer.
+ *		2. Redistributions in binary form must reproduce the above copyright notice,
+ *		   this list of conditions and the following disclaimer in the documentation
+ *		   and/or other materials provided with the distribution.
+ *
+ *	THIS SOFTWARE IS PROVIDED BY PORCHDOG SOFTWARE ``AS IS'' AND ANY
+ *	EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ *	WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ *	IN NO EVENT SHALL THE HOWL PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ *	INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ *	BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ *	OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ *	OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ *	OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *	The views and conclusions contained in the software and documentation are those
+ *	of the authors and should not be interpreted as representing official policies,
+ *	either expressed or implied, of Porchdog Software.
+ */
+
+#include <discovery/discovery.h>
+
+#define _sw_rendezvous							_sw_discovery
+#define sw_rendezvous							sw_discovery
+#define sw_rendezvous_publish_domain_id	sw_discovery_publish_domain_id
+#define sw_rendezvous_publish_host_id		sw_discovery_publish_host_id
+#define sw_rendezvous_publish_id				sw_discovery_publish_id
+#define sw_rendezvous_browse_id				sw_discovery_browse_id
+#define sw_rendezvous_resolve_id				sw_discovery_resolve_id
+#define sw_rendezvous_publish_status		sw_discovery_publish_status
+#define SW_RENDEZVOUS_PUBLISH_STARTED		SW_DISCOVERY_PUBLISH_STARTED
+#define SW_RENDEZVOUS_PUBLISH_STOPPED		SW_DISCOVERY_PUBLISH_STOPPED
+#define SW_RENDEZVOUS_PUBLISH_NAME_COLLISION	SW_DISCOVERY_PUBLISH_NAME_COLLISION
+#define SW_RENDEZVOUS_PUBLISH_INVALID		SW_DISCOVERY_PUBLISH_INVALID
+#define sw_rendezvous_browse_status			sw_discovery_browse_status
+#define SW_RENDEZVOUS_BROWSE_INVALID		SW_DISCOVERY_BROWSE_INVALID
+#define SW_RENDEZVOUS_BROWSE_RELEASE		SW_DISCOVERY_BROWSE_RELEASE
+#define SW_RENDEZVOUS_BROWSE_ADD_DOMAIN	SW_DISCOVERY_BROWSE_ADD_DOMAIN
+#define SW_RENDEZVOUS_BROWSE_ADD_DEFAULT_DOMAIN	SW_DISCOVERY_BROWSE_ADD_DEFAULT_DOMAIN
+#define SW_RENDEZVOUS_BROWSE_REMOVE_DOMAIN	SW_DISCOVERY_BROWSE_REMOVE_DOMAIN
+#define SW_RENDEZVOUS_BROWSE_ADD_SERVICE		SW_DISCOVERY_BROWSE_ADD_SERVICE
+#define SW_RENDEZVOUS_BROWSE_REMOVE_SERVICE	SW_DISCOVERY_BROWSE_REMOVE_SERVICE
+#define SW_RENDEZVOUS_BROWSE_RESOLVED			SW_DISCOVERY_BROWSE_RESOLVED
+#define sw_rendezvous_publish_domain_handler	sw_discovery_publish_domain_handler
+#define sw_rendezvous_publish_domain_reply	sw_discovery_publish_domain_reply
+#define sw_rendezvous_publish_host_handler	sw_discovery_publish_host_handler
+#define sw_rendezvous_publish_host_reply		sw_discovery_publish_host_reply
+#define sw_rendezvous_publish_handler			sw_discovery_publish_handler
+#define sw_rendezvous_publish_reply				sw_discovery_publish_reply
+#define sw_rendezvous_browse_handler			sw_discovery_browse_handler
+#define sw_rendezvous_browse_reply				sw_discovery_browse_reply
+#define sw_rendezvous_resolve_handler			sw_discovery_resolve_handler
+#define sw_rendezvous_resolve_reply				sw_discovery_resolve_reply
+#define sw_rendezvous_init							sw_discovery_init
+#define sw_rendezvous_fina							sw_discovery_fina
+#define sw_rendezvous_publish_domain			sw_discovery_publish_domain
+#define sw_rendezvous_stop_publish_domain		sw_discovery_stop_publish_domain
+#define sw_rendezvous_publish_host				sw_discovery_publish_host
+#define sw_rendezvous_stop_publish_host		sw_discovery_stop_publish_host
+#define sw_rendezvous_publish						sw_discovery_publish
+#define sw_rendezvous_publish_update			sw_discovery_publish_update
+#define sw_rendezvous_stop_publish				sw_discovery_stop_publish
+#define sw_rendezvous_browse_domains			sw_discovery_browse_domains
+#define sw_rendezvous_stop_browse_domains		sw_discovery_stop_browse_domains
+#define sw_rendezvous_browse_services			sw_discovery_browse
+#define sw_rendezvous_stop_browse_services	sw_discovery_stop_browse
+#define sw_rendezvous_resolve						sw_discovery_resolve
+#define sw_rendezvous_stop_resolve				sw_discovery_stop_resolve
+#define sw_rendezvous_run							sw_discovery_run
+#define sw_rendezvous_stop_run					sw_discovery_stop_run
+#define sw_rendezvous_socket						sw_discovery_socket
+#define sw_rendezvous_read_socket				sw_discovery_read_socket
+#define sw_rendezvous_salt							sw_discovery_salt
+#define SW_RENDEZVOUS_E_BASE						SW_DISCOVERY_E_BASE
+#define SW_RENDEZVOUS_E_UNKNOWN					SW_DISCOVERY_E_UNKNOWN
+#define SW_RENDEZVOUS_E_NO_SUCH_NAME			SW_DISCOVERY_E_NO_SUCH_NAME
+#define SW_RENDEZVOUS_E_NO_MEM					SW_DISCOVERY_E_NO_MEM
+#define SW_RENDEZVOUS_E_BAD_PARAM				SW_DISCOVERY_E_BAD_PARAM
+#define SW_RENDEZVOUS_E_BAD_REFERENCE			SW_DISCOVERY_E_BAD_REFERENCE
+#define SW_RENDEZVOUS_E_BAD_STATE				SW_DISCOVERY_E_BAD_STATE
+#define SW_RENDEZVOUS_E_BAD_FLAGS				SW_DISCOVERY_E_BAD_FLAGS
+#define SW_RENDEZVOUS_E_NOT_SUPPORTED			SW_DISCOVERY_E_NOT_SUPPORTED
+#define SW_RENDEZVOUS_E_NOT_INITIALIZED		SW_DISCOVERY_E_NOT_INITIALIZED
+#define SW_RENDEZVOUS_E_NO_CACHE					SW_DISCOVERY_E_NO_CACHE
+#define SW_RENDEZVOUS_E_ALREADY_REGISTERED	SW_DISCOVERY_E_ALREADY_REGISTERED
+#define SW_RENDEZVOUS_E_NAME_CONFLICT			SW_DISCOVERY_E_NAME_CONFLICT
+#define SW_RENDEZVOUS_E_INVALID					SW_DISCOVERY_E_INVALID
+
+
+#endif
diff --git a/avahi-0.6.31/avahi-compat-howl/include/rendezvous/text_record.h b/avahi-0.6.31/avahi-compat-howl/include/rendezvous/text_record.h
new file mode 100644
index 0000000..3e2bfc2
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-howl/include/rendezvous/text_record.h
@@ -0,0 +1,36 @@
+#ifndef _rendezvous_text_record_h
+#define _rendezvous_text_record_h
+
+/*
+ * Copyright 2003, 2004 Porchdog Software. All rights reserved.
+ *
+ *	Redistribution and use in source and binary forms, with or without modification,
+ *	are permitted provided that the following conditions are met:
+ *
+ *		1. Redistributions of source code must retain the above copyright notice,
+ *		   this list of conditions and the following disclaimer.
+ *		2. Redistributions in binary form must reproduce the above copyright notice,
+ *		   this list of conditions and the following disclaimer in the documentation
+ *		   and/or other materials provided with the distribution.
+ *
+ *	THIS SOFTWARE IS PROVIDED BY PORCHDOG SOFTWARE ``AS IS'' AND ANY
+ *	EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ *	WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ *	IN NO EVENT SHALL THE HOWL PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ *	INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ *	BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ *	OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ *	OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ *	OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *	The views and conclusions contained in the software and documentation are those
+ *	of the authors and should not be interpreted as representing official policies,
+ *	either expressed or implied, of Porchdog Software.
+ */
+
+
+#include <discovery/text_record.h>
+
+
+#endif
diff --git a/avahi-0.6.31/avahi-compat-howl/include/salt/address.h b/avahi-0.6.31/avahi-compat-howl/include/salt/address.h
new file mode 100644
index 0000000..ea83f8d
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-howl/include/salt/address.h
@@ -0,0 +1,128 @@
+#ifndef _salt_address_h
+#define _salt_address_h
+
+/*
+ * Copyright 2003, 2004 Porchdog Software. All rights reserved.
+ *
+ *	Redistribution and use in source and binary forms, with or without modification,
+ *	are permitted provided that the following conditions are met:
+ *
+ *		1. Redistributions of source code must retain the above copyright notice,
+ *		   this list of conditions and the following disclaimer.
+ *		2. Redistributions in binary form must reproduce the above copyright notice,
+ *		   this list of conditions and the following disclaimer in the documentation
+ *		   and/or other materials provided with the distribution.
+ *
+ *	THIS SOFTWARE IS PROVIDED BY PORCHDOG SOFTWARE ``AS IS'' AND ANY
+ *	EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ *	WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ *	IN NO EVENT SHALL THE HOWL PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ *	INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ *	BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ *	OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ *	OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ *	OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *	The views and conclusions contained in the software and documentation are those
+ *	of the authors and should not be interpreted as representing official policies,
+ *	either expressed or implied, of Porchdog Software.
+ */
+
+
+#include <salt/salt.h>
+
+
+#if defined(__cplusplus)
+extern "C"
+{
+#endif
+
+
+typedef struct _sw_ipv4_address
+{
+	sw_uint32	m_addr;
+} sw_ipv4_address;
+
+typedef sw_uint32 sw_saddr;
+
+
+sw_ipv4_address HOWL_API
+sw_ipv4_address_any(void);
+
+
+sw_ipv4_address HOWL_API
+sw_ipv4_address_loopback(void);
+
+
+sw_result HOWL_API
+sw_ipv4_address_init(
+				sw_ipv4_address	*	self);
+
+
+sw_result HOWL_API
+sw_ipv4_address_init_from_saddr(
+				sw_ipv4_address	*	self,
+				sw_saddr			saddr);
+
+
+sw_result HOWL_API
+sw_ipv4_address_init_from_name(
+				sw_ipv4_address		*	self,
+				sw_const_string	name);
+
+
+sw_result HOWL_API
+sw_ipv4_address_init_from_address(
+				sw_ipv4_address		*	self,
+				sw_ipv4_address			addr);
+
+
+sw_result HOWL_API
+sw_ipv4_address_init_from_this_host(
+				sw_ipv4_address		*	self);
+
+
+sw_result HOWL_API
+sw_ipv4_address_fina(
+				sw_ipv4_address	self);
+
+
+sw_bool HOWL_API
+sw_ipv4_address_is_any(
+				sw_ipv4_address	self);
+
+
+sw_saddr HOWL_API
+sw_ipv4_address_saddr(
+				sw_ipv4_address	self);
+
+
+sw_string HOWL_API
+sw_ipv4_address_name(
+				sw_ipv4_address	self,
+				sw_string			name,
+				sw_uint32				len);
+
+
+sw_result HOWL_API
+sw_ipv4_address_decompose(
+				sw_ipv4_address	self,
+				sw_uint8			*	a1,
+				sw_uint8			*	a2,
+				sw_uint8			*	a3,
+				sw_uint8			*	a4);
+
+
+sw_bool HOWL_API
+sw_ipv4_address_equals(
+				sw_ipv4_address	self,
+				sw_ipv4_address	addr);
+
+
+#if defined(__cplusplus)
+}
+#endif
+
+
+#endif
diff --git a/avahi-0.6.31/avahi-compat-howl/include/salt/debug.h b/avahi-0.6.31/avahi-compat-howl/include/salt/debug.h
new file mode 100644
index 0000000..c53977b
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-howl/include/salt/debug.h
@@ -0,0 +1,230 @@
+#ifndef _salt_debug_h
+#define _salt_debug_h
+
+/*
+ * Copyright 2003, 2004 Porchdog Software. All rights reserved.
+ *
+ *	Redistribution and use in source and binary forms, with or without modification,
+ *	are permitted provided that the following conditions are met:
+ *
+ *		1. Redistributions of source code must retain the above copyright notice,
+ *		   this list of conditions and the following disclaimer.
+ *		2. Redistributions in binary form must reproduce the above copyright notice,
+ *		   this list of conditions and the following disclaimer in the documentation
+ *		   and/or other materials provided with the distribution.
+ *
+ *	THIS SOFTWARE IS PROVIDED BY PORCHDOG SOFTWARE ``AS IS'' AND ANY
+ *	EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ *	WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ *	IN NO EVENT SHALL THE HOWL PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ *	INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ *	BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ *	OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ *	OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ *	OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *	The views and conclusions contained in the software and documentation are those
+ *	of the authors and should not be interpreted as representing official policies,
+ *	either expressed or implied, of Porchdog Software.
+ */
+
+#include <salt/platform.h>
+#include <stdarg.h>
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+
+#define SW_LOG_WARNING     1 << 0
+#define SW_LOG_ERROR       1 << 1
+#define SW_LOG_NOTICE      1 << 2
+#define SW_LOG_VERBOSE     1 << 3
+#define SW_LOG_OFF         0x0
+
+
+#if (defined( __GNUC__))
+
+#	if ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)))
+
+#		define  __C99_VA_ARGS__	1
+
+#		define  __GNU_VA_ARGS__	0
+
+#	else
+
+#		define  __C99_VA_ARGS__	0
+
+#		define  __GNU_VA_ARGS__	1
+
+#	endif
+
+#else
+
+#	define  __C99_VA_ARGS__		0
+
+#	define  __GNU_VA_ARGS__		0
+
+#endif
+
+
+# if ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 9)))
+
+#	define	__SW_FUNCTION__			__func__
+
+#elif (defined( __GNUC__))
+
+#	define	__SW_FUNCTION__			__PRETTY_FUNCTION__
+
+#elif( defined(_MSC_VER ) && !defined(_WIN32_WCE))
+
+#	define	__SW_FUNCTION__			__FUNCTION__
+
+#else
+
+#	define	__SW_FUNCTION__			""
+
+#endif
+
+
+#define sw_check(expr, label, action)			\
+do 														\
+{															\
+	if (!(expr)) 										\
+	{														\
+		{													\
+			action;										\
+		}													\
+		goto label;										\
+	}														\
+} while (0)
+
+
+#define sw_check_log(expr, label, action)		\
+do 														\
+{															\
+	if (!(expr)) 										\
+	{														\
+		sw_print_assert(0, NULL, __FILE__, __SW_FUNCTION__, __LINE__);	\
+		{													\
+			action;										\
+		}													\
+		goto label;										\
+	}														\
+} while (0)
+
+
+#define sw_check_okay(code, label)				\
+do 														\
+{															\
+	if ((int) code != 0) 							\
+	{														\
+		goto label;										\
+	}														\
+} while (0)
+
+
+#define sw_check_okay_log(code, label)			\
+do 														\
+{															\
+	if ((int) code != 0) 							\
+	{														\
+		sw_print_assert((int) code, NULL, __FILE__, __SW_FUNCTION__, __LINE__);	\
+		goto label;										\
+	}														\
+} while ( 0 )
+
+
+#define sw_translate_error(expr, errno)		((expr) ? 0 : (errno))
+
+
+#if defined(WIN32)
+
+#	define sw_socket_errno()		(int) WSAGetLastError()
+#	define sw_set_socket_errno(X)	WSASetLastError(X)
+#	define sw_system_errno()		(int) GetLastError()
+#	define sw_set_system_errno(X)	SetLastError(X)
+
+#else
+
+#	define sw_socket_errno()		errno
+#	define sw_set_socket_errno(X)	errno = X
+#	define sw_system_errno()		errno
+#	define sw_set_system_errno(X)	errno = X
+
+#endif
+
+
+#if !defined(NDEBUG)
+
+#	define sw_assert(X)		\
+									\
+	do								\
+	{								\
+		if (!(X))				\
+		{							\
+			sw_print_assert( 0, #X, __FILE__, __SW_FUNCTION__, __LINE__); \
+		}							\
+	} while( 0 )
+
+#else
+
+#	define sw_assert(X)
+
+#endif
+
+
+void HOWL_API
+sw_print_assert(
+		int					code,
+		sw_const_string	assert_string,
+		sw_const_string	file,
+		sw_const_string	func,
+		int					line);
+
+
+#if !defined(NDEBUG)
+
+void HOWL_API
+sw_print_debug(
+		int					level,
+		sw_const_string	format,
+		...);
+
+#	if (__C99_VA_ARGS__)
+
+#		define  sw_debug(...)			sw_print_debug(__VA_ARGS__)
+
+#	else
+
+#		define  sw_debug					sw_print_debug
+
+#	endif
+
+#else
+
+#	if (__C99_VA_ARGS__)
+
+#		define  sw_debug(...)
+
+#	else
+
+#		define  sw_debug					while( 0 )
+
+#	endif
+
+#endif
+
+
+#define SW_UNUSED_PARAM(X)	(void) (X)
+
+
+#if defined(__cplusplus)
+}
+#endif
+
+
+#endif
diff --git a/avahi-0.6.31/avahi-compat-howl/include/salt/interface.h b/avahi-0.6.31/avahi-compat-howl/include/salt/interface.h
new file mode 100644
index 0000000..a4b1b1d
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-howl/include/salt/interface.h
@@ -0,0 +1,115 @@
+#ifndef _sw_interface_h
+#define _sw_interface_h
+
+/*
+ * Copyright 2003, 2004 Porchdog Software. All rights reserved.
+ *
+ *	Redistribution and use in source and binary forms, with or without modification,
+ *	are permitted provided that the following conditions are met:
+ *
+ *		1. Redistributions of source code must retain the above copyright notice,
+ *		   this list of conditions and the following disclaimer.
+ *		2. Redistributions in binary form must reproduce the above copyright notice,
+ *		   this list of conditions and the following disclaimer in the documentation
+ *		   and/or other materials provided with the distribution.
+ *
+ *	THIS SOFTWARE IS PROVIDED BY PORCHDOG SOFTWARE ``AS IS'' AND ANY
+ *	EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ *	WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ *	IN NO EVENT SHALL THE HOWL PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ *	INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ *	BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ *	OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ *	OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ *	OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *	The views and conclusions contained in the software and documentation are those
+ *	of the authors and should not be interpreted as representing official policies,
+ *	either expressed or implied, of Porchdog Software.
+ */
+
+#include <salt/address.h>
+
+struct											_sw_network_interface;
+typedef struct _sw_network_interface * sw_network_interface;
+
+
+typedef enum _sw_network_interface_state
+{
+	SW_NETWORK_INTERFACE_RUNNING		= 0x1,
+} sw_network_interface_state;
+
+
+typedef struct _sw_mac_address
+{
+	sw_uint8	m_id[6];
+} sw_mac_address;
+
+
+sw_result HOWL_API
+sw_network_interfaces(
+				sw_uint32					*	count,
+				sw_network_interface	**	netifs);
+
+
+sw_result HOWL_API
+sw_network_interfaces_fina(
+				sw_uint32						count,
+				sw_network_interface	*	netifs);
+
+
+sw_result HOWL_API
+sw_network_interface_fina(
+				sw_network_interface		netif);
+
+
+sw_result  HOWL_API
+sw_network_interface_by_name(
+				sw_string					name,
+				sw_network_interface	*	netif);
+
+
+sw_result HOWL_API
+sw_network_interface_name(
+				sw_network_interface		netif,
+				sw_string					name,
+				sw_uint32						len);
+
+
+sw_result HOWL_API
+sw_network_interface_mac_address(
+				sw_network_interface		netif,
+				sw_mac_address			*	addr);
+
+
+sw_result HOWL_API
+sw_network_interface_ipv4_address(
+				sw_network_interface		netif,
+				sw_ipv4_address		*	addr);
+
+
+sw_result HOWL_API
+sw_network_interface_set_ipv4_address(
+				sw_network_interface		netif,
+				sw_ipv4_address			addr);
+
+
+sw_result HOWL_API
+sw_network_interface_index(
+				sw_network_interface		netif,
+				sw_uint32					*	index);
+
+
+sw_result HOWL_API
+sw_network_interface_linked(
+				sw_network_interface		netif,
+				sw_bool					*	linked);
+
+
+sw_result HOWL_API
+sw_network_interface_up(
+				sw_network_interface		netif);
+
+
+#endif
diff --git a/avahi-0.6.31/avahi-compat-howl/include/salt/platform.h b/avahi-0.6.31/avahi-compat-howl/include/salt/platform.h
new file mode 100644
index 0000000..6bb9dcc
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-howl/include/salt/platform.h
@@ -0,0 +1,438 @@
+#ifndef _sw_platform_h
+#define _sw_platform_h
+
+/*
+ * Copyright 2003, 2004 Porchdog Software, Inc. All rights reserved.
+ *
+ *	Redistribution and use in source and binary forms, with or without modification,
+ *	are permitted provided that the following conditions are met:
+ *
+ *		1. Redistributions of source code must retain the above copyright notice,
+ *		   this list of conditions and the following disclaimer.
+ *		2. Redistributions in binary form must reproduce the above copyright notice,
+ *		   this list of conditions and the following disclaimer in the documentation
+ *		   and/or other materials provided with the distribution.
+ *
+ *	THIS SOFTWARE IS PROVIDED BY PORCHDOG SOFTWARE ``AS IS'' AND ANY
+ *	EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ *	WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ *	IN NO EVENT SHALL THE HOWL PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ *	INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ *	BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ *	OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ *	OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ *	OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *	The views and conclusions contained in the software and documentation are those
+ *	of the authors and should not be interpreted as representing official policies,
+ *	either expressed or implied, of Porchdog Software, Inc.
+ */
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+
+#if defined(__VXWORKS__)
+
+#	define HOWL_API
+#	include <vxworks.h>
+#	include <sysLib.h>
+
+#	define sw_snooze(SECS)		taskDelay(sysClkRateGet() * SECS)
+
+#elif defined(WIN32)
+
+#	define WIN32_LEAN_AND_MEAN
+#	define HOWL_API __stdcall
+#	pragma warning(disable:4127)
+#	include <windows.h>
+#	include <stdlib.h>
+
+typedef signed char				int8_t;
+typedef unsigned char			u_int8_t;
+typedef signed short				int16_t;
+typedef unsigned short			u_int16_t;
+typedef signed long				int32_t;
+typedef unsigned long			u_int32_t;
+typedef _int64						int64_t;
+typedef _int64						u_int64_t;
+
+#	define sw_snooze(SECS)		Sleep(SECS * 1000)
+
+#else
+
+#	define HOWL_API
+#	if defined(HOWL_KERNEL)
+#		include <howl_config.h>
+#	endif
+#	include <sys/types.h>
+#	include <stdlib.h>
+#	include <unistd.h>
+
+#	define sw_snooze(SECS)		sleep(SECS)
+
+#endif
+
+#if defined(__sun)
+
+#	define u_int8_t	uint8_t
+#	define u_int16_t	uint16_t
+#	define u_int32_t	uint32_t
+#	define u_int64_t	uint64_t
+
+#endif
+
+typedef void				*	sw_opaque;
+typedef void				*	sw_opaque_t;
+typedef int8_t					sw_int8;
+typedef u_int8_t				sw_uint8;
+typedef u_int8_t				sw_bool;
+typedef int16_t				sw_int16;
+typedef u_int16_t				sw_uint16;
+typedef int32_t				sw_int32;
+typedef u_int32_t				sw_uint32;
+typedef int64_t				sw_int64;
+typedef u_int64_t				sw_uint64;
+typedef char				*	sw_string;
+typedef sw_uint8			*	sw_octets;
+#if !defined(__VXWORKS__) || defined(__cplusplus)
+typedef const char		*	sw_const_string;
+typedef const u_int8_t	*	sw_const_octets;
+#else
+typedef char				*	sw_const_string;
+typedef u_int8_t			*	sw_const_octets;
+#endif
+typedef size_t					sw_size_t;
+typedef int						sw_result;
+
+
+
+/* --------------------------------------------------------
+ *
+ * Endian-osity
+ *
+ * SW_ENDIAN is 0 for big endian platforms, 1
+ * for little endian platforms.
+ *
+ * The macro WORDS_BIGENDIAN will be defined
+ * by autoconf.  If you are using Howl on
+ * a platform  that doesn't have autoconf, define
+ * SW_ENDIAN directly
+ * --------------------------------------------------------
+ */
+
+#if !defined(SW_ENDIAN)
+
+#	if defined(WORDS_BIGENDIAN) && WORDS_BIGENDIAN == 1
+
+#		define SW_ENDIAN	0
+
+#	else
+
+#		define SW_ENDIAN	1
+
+#	endif
+
+#endif
+
+
+/* --------------------------------------------------------
+ *
+ * Strings
+ *
+ * These macros supports cross platform string functions
+ * for the following OSes
+ *
+ * Win32
+ * *NIX
+ * PalmOS
+ * VxWorks
+ *
+ * --------------------------------------------------------
+ */
+
+#if defined(WIN32)
+
+#	include <string.h>
+
+#	define sw_memset(ARG1, ARG2, ARG3)		memset((char*) ARG1, ARG2, ARG3)
+#	define sw_memcpy(ARG1, ARG2, ARG3)		memmove((char*) ARG1, (char*) ARG2, ARG3)
+#	define sw_memcmp(ARG1, ARG2, ARG3)		memcmp((char*) ARG1, ARG2, ARG3)
+#	define sw_strcasecmp(ARG1, ARG2)			stricmp(ARG1, ARG2)
+#	define sw_strncasecmp(ARG1, ARG2)		strnicmp(ARG1, ARG2)
+#	define sw_strcat(ARG1, ARG2)				strcat(ARG1, ARG2)
+#	define sw_strncat(ARG1, ARG2)				strncat(ARG1, ARG2)
+#	define sw_strchr(ARG1, ARG2)				strchr(ARG1, ARG2)
+#	define sw_strcmp(ARG1, ARG2)				strcmp(ARG1, ARG2)
+#	define sw_strncmp(ARG1, ARG2)				strncmp(ARG1, ARG2)
+#	define sw_strcoll(ARG1, ARG2)				strcoll(ARG1, ARG2)
+#	define sw_strcpy(ARG1, ARG2)				(ARG2) ? strcpy(ARG1, ARG2) : strcpy(ARG1, "")
+#	define sw_strncpy(ARG1, ARG2, N)			(ARG2) ? strncpy(ARG1, ARG2, N) : strcpy(ARG1, "")
+#	define sw_strcspn(ARG1, ARG2)				strcspn(ARG1, ARG2)
+#	define sw_strlen(ARG1)						strlen(ARG1)
+#	define sw_strstr(ARG1, ARG2)				strstr(ARG1, ARG2)
+#	define sw_strtok_r(ARG1, ARG2, ARG3)	strtok_r(ARG1, ARG2, ARG3)
+
+#elif defined(__VXWORKS__)
+
+#	include <string.h>
+
+extern sw_int32
+sw_strcasecmp(
+		sw_const_string	arg1,
+		sw_const_string	arg2);
+
+extern sw_int32
+sw_strncasecmp(
+		sw_const_string	arg1,
+		sw_const_string	arg2,
+		sw_len				n);
+
+extern sw_string
+sw_strtok_r(
+		sw_string			arg1,
+		sw_const_string	arg2,
+		sw_string		*	lasts);
+
+#	define sw_memset(ARG1, ARG2, ARG3)		memset((char*) ARG1, ARG2, ARG3)
+#	define sw_memcpy(ARG1, ARG2, ARG3)		memcpy((char*) ARG1, (char*) ARG2, ARG3)
+#	define sw_memcmp(ARG1, ARG2, ARG3)		memcmp((char*) ARG1, ARG2, ARG3)
+#	define sw_strcat(ARG1, ARG2)				strcat(ARG1, ARG2)
+#	define sw_strncat(ARG1, ARG2)				strncat(ARG1, ARG2)
+#	define sw_strchr(ARG1, ARG2)				strchr(ARG1, ARG2)
+#	define sw_strcmp(ARG1, ARG2)				strcmp(ARG1, ARG2)
+#	define sw_strncmp(ARG1, ARG2)				strncmp(ARG1, ARG2)
+#	define sw_strcoll(ARG1, ARG2)				strcoll(ARG1, ARG2)
+#	define sw_strcpy(ARG1, ARG2)				ARG2 ? strcpy(ARG1, ARG2) : strcpy(ARG1, "")
+#	define sw_strncpy(ARG1, ARG2, N)			ARG2 ? strncpy(ARG1, ARG2, N) : strcpy(ARG1, "")
+#	define sw_strcspn(ARG1, ARG2)				strcspn(ARG1, ARG2)
+#	define sw_strlen(ARG1)						strlen(ARG1)
+#	define sw_strstr(ARG1, ARG2)				strstr(ARG1, ARG2)
+
+#elif defined(__PALMOS__)
+
+#	include <StringMgr.h>
+
+#	define sw_strcasecmp(ARG1, ARG2)			strcasecmp(ARG1, ARG2)
+#	define sw_strncasecmp(ARG1, ARG2)		strncasecmp(ARG1, ARG2)
+#	define sw_strcat(ARG1, ARG2)				StrCat(ARG1, ARG2)
+#	define sw_strncat(ARG1, ARG2)				StrNCat(ARG1, ARG2)
+#	define sw_strchr(ARG1, ARG2)				StrChr(ARG1, ARG2)
+#	define sw_strcmp(ARG1, ARG2)				StrCampare(ARG1, ARG2)
+#	define sw_strncmp(ARG1, ARG2)				StrNCompare(ARG1, ARG2)
+#	define sw_strcoll(ARG1, ARG2)				strcoll(ARG1, ARG2)
+#	define sw_strcpy(ARG1, ARG2)				ARG2 ? StrCopy(ARG1, ARG2) : StrCopy(ARG1, "")
+#	define sw_strncpy(ARG1, ARG2, N)			ARG2 ? StrNCopy(ARG1, ARG2, N) : StrCopy(ARG1, "")
+#	define sw_strcspn(ARG1, ARG2)				strcspn(ARG1, ARG2)
+#	define sw_strlen(ARG1)						StrLen(ARG1)
+#	define sw_strstr(ARG1, ARG2)				strstr(ARG1, ARG2)
+#	define sw_strtok_r(ARG1, ARG2, ARG3)	strtok_r(ARG1, ARG2, ARG3)
+
+#else
+
+#	include <string.h>
+
+#	if defined(__Lynx__)
+		char * strchr(char*, int);
+#	endif
+
+#	define sw_memset(ARG1, ARG2, ARG3)		memset((char*) ARG1, ARG2, ARG3)
+#	define sw_memcpy(ARG1, ARG2, ARG3)		memcpy((char*) ARG1, (char*) ARG2, ARG3)
+#	define sw_memcmp(ARG1, ARG2, ARG3)		memcmp((char*) ARG1, ARG2, ARG3)
+#	define sw_strcasecmp(ARG1, ARG2)			strcasecmp(ARG1, ARG2)
+#	define sw_strncasecmp(ARG1, ARG2)		strncasecmp(ARG1, ARG2)
+#	define sw_strcat(ARG1, ARG2)				strcat(ARG1, ARG2)
+#	define sw_strncat(ARG1, ARG2)				strncat(ARG1, ARG2)
+#	define sw_strchr(ARG1, ARG2)				strchr(ARG1, ARG2)
+#	define sw_strcmp(ARG1, ARG2)				strcmp(ARG1, ARG2)
+#	define sw_strncmp(ARG1, ARG2)				strncmp(ARG1, ARG2)
+#	define sw_strcoll(ARG1, ARG2)				strcoll(ARG1, ARG2)
+#	define sw_strcpy(ARG1, ARG2)				ARG2 ? strcpy(ARG1, ARG2) : strcpy(ARG1, "")
+#	define sw_strncpy(ARG1, ARG2, N)			ARG2 ? strncpy(ARG1, ARG2, N) : strcpy(ARG1, "")
+#	define sw_strcspn(ARG1, ARG2)				strcspn(ARG1, ARG2)
+#	define sw_strlen(ARG1)						strlen(ARG1)
+#	define sw_strstr(ARG1, ARG2)				strstr(ARG1, ARG2)
+#	define sw_strtok_r(ARG1, ARG2, ARG3)	strtok_r(ARG1, ARG2, ARG3)
+
+#endif
+
+
+sw_string
+sw_strdup(
+		sw_const_string str);
+
+
+/* --------------------------------------------------------
+ *
+ * Memory
+ *
+ * These macros support cross platform heap functions.
+ * When compiling with DEBUG, some extra checking is
+ * done which can aid in tracking down heap corruption
+ * problems
+ *
+ * --------------------------------------------------------
+ */
+
+#if defined(NDEBUG)
+
+#	define	sw_malloc(SIZE)		malloc(SIZE)
+#	define	sw_realloc(MEM,SIZE)	realloc(MEM, SIZE)
+#	define	sw_free(MEM)			if (MEM) free(MEM)
+
+#else
+
+#	define	sw_malloc(SIZE)		_sw_debug_malloc(SIZE, __SW_FUNCTION__, __FILE__, __LINE__)
+#	define	sw_realloc(MEM,SIZE)	_sw_debug_realloc(MEM, SIZE, __SW_FUNCTION__, __FILE__, __LINE__)
+#	define	sw_free(MEM)			if (MEM) _sw_debug_free(MEM, __SW_FUNCTION__, __FILE__, __LINE__)
+
+#endif
+
+
+sw_opaque HOWL_API
+_sw_debug_malloc(
+			sw_size_t			size,
+			sw_const_string	function,
+			sw_const_string	file,
+			sw_uint32			line);
+
+
+sw_opaque HOWL_API
+_sw_debug_realloc(
+			sw_opaque_t			mem,
+			sw_size_t			size,
+			sw_const_string	function,
+			sw_const_string	file,
+			sw_uint32			line);
+
+
+void HOWL_API
+_sw_debug_free(
+			sw_opaque_t			mem,
+			sw_const_string	function,
+			sw_const_string	file,
+			sw_uint32			line);
+
+
+
+/* --------------------------------------------------------
+ *
+ * Sockets
+ *
+ * These macros and APIs support cross platform socket
+ * calls.  I am relying on BSD APIs, but even with those
+ * there are subtle and not so subtle platform differences
+ *
+ * --------------------------------------------------------
+ */
+
+#if defined(__VXWORKS__)
+
+#	include <vxworks.h>
+#	include <hostLib.h>
+#	include <sockLib.h>
+#	include <ioLib.h>
+#	include <inetLib.h>
+
+typedef int							sw_sockdesc_t;
+typedef socklen_t					sw_socklen_t;
+
+#elif defined(WIN32)
+
+#	include <winsock2.h>
+
+typedef SOCKET						sw_sockdesc_t;
+typedef int							sw_socklen_t;
+
+#	define SW_E_WOULDBLOCK		WSAEWOULDBLOCK
+#	define SW_INVALID_SOCKET	INVALID_SOCKET
+#	define SW_SOCKET_ERROR		SOCKET_ERROR
+
+#	define sw_close_socket(X)	closesocket(X)
+
+#else
+
+#	if defined(sun)
+
+#		include <unistd.h>
+
+#	endif
+
+#	include <sys/types.h>
+#	include <signal.h>
+
+#	if defined(__Lynx__)
+
+#		include <socket.h>
+
+#	else
+
+#		include <sys/socket.h>
+
+#	endif
+
+#	include <netinet/in.h>
+#	include <netinet/tcp.h>
+#	include <netdb.h>
+#	include <arpa/inet.h>
+#	include <stdlib.h>
+#	include <unistd.h>
+#	include <sys/ioctl.h>
+#	include <stdio.h>
+#	include <errno.h>
+
+typedef sw_int32					sw_sockdesc_t;
+typedef socklen_t					sw_socklen_t;
+
+#	define SW_E_WOULDBLOCK		EWOULDBLOCK
+#	define SW_INVALID_SOCKET	-1
+#	define SW_SOCKET_ERROR		-1
+
+#	define sw_close_socket(X)	close(X)
+
+#endif
+
+
+/* --------------------------------------------------------
+ *
+ * strerror()
+ *
+ * This function will print a string rep of a system error
+ * code
+ *
+ * --------------------------------------------------------
+ */
+
+sw_const_string
+sw_strerror();
+
+
+/*
+ * Obsolete types and macros.
+ *
+ * These are here for backwards compatibility, but will
+ * be removed in the future
+ */
+#define sw_char	sw_int8
+#define sw_uchar	sw_uint8
+#define sw_octet	sw_uint8
+#define sw_short	sw_int16
+#define sw_ushort	sw_uint16
+#define sw_long	sw_int32
+#define sw_ulong	sw_uint32
+
+
+#define SW_TRY(EXPR) { sw_result result; if ((result = EXPR) != SW_OKAY) return result; } ((void) 0)
+#define SW_TRY_GOTO(EXPR)  { if ((result = EXPR) != SW_OKAY) goto exit; } ((void) 0)
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif
diff --git a/avahi-0.6.31/avahi-compat-howl/include/salt/salt.h b/avahi-0.6.31/avahi-compat-howl/include/salt/salt.h
new file mode 100644
index 0000000..ddb289b
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-howl/include/salt/salt.h
@@ -0,0 +1,215 @@
+#ifndef _sw_salt_h
+#define _sw_salt_h
+
+/*
+ * Copyright 2003, 2004 Porchdog Software, Inc. All rights reserved.
+ *
+ *	Redistribution and use in source and binary forms, with or without modification,
+ *	are permitted provided that the following conditions are met:
+ *
+ *		1. Redistributions of source code must retain the above copyright notice,
+ *		   this list of conditions and the following disclaimer.
+ *		2. Redistributions in binary form must reproduce the above copyright notice,
+ *		   this list of conditions and the following disclaimer in the documentation
+ *		   and/or other materials provided with the distribution.
+ *
+ *	THIS SOFTWARE IS PROVIDED BY PORCHDOG SOFTWARE ``AS IS'' AND ANY
+ *	EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ *	WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ *	IN NO EVENT SHALL THE HOWL PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ *	INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ *	BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ *	OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ *	OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ *	OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *	The views and conclusions contained in the software and documentation are those
+ *	of the authors and should not be interpreted as representing official policies,
+ *	either expressed or implied, of Porchdog Software, Inc.
+ */
+
+#include <salt/platform.h>
+#include <salt/time.h>
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+
+typedef enum _sw_socket_event
+{
+	SW_SOCKET_READ		=	(1 << 0),
+	SW_SOCKET_WRITE	=	(1 << 1),
+	SW_SOCKET_OOB		=	(1 << 2)
+} sw_socket_event;
+
+
+struct							_sw_salt;
+typedef struct _sw_salt	*	sw_salt;
+struct							_sw_socket;
+struct							_sw_timer;
+struct							_sw_network_interface;
+struct							_sw_signal;
+
+typedef sw_opaque				sw_socket_handler;
+typedef sw_result
+(HOWL_API *sw_socket_handler_func)(
+									sw_socket_handler		handler,
+									sw_salt					salt,
+									struct _sw_socket	*	socket,
+									sw_socket_event		events,
+									sw_opaque				extra);
+
+
+typedef sw_opaque				sw_timer_handler;
+typedef sw_result
+(HOWL_API *sw_timer_handler_func)(
+									sw_timer_handler		handler,
+									sw_salt					salt,
+									struct _sw_timer	*	timer,
+									sw_time					timeout,
+									sw_opaque				extra);
+
+typedef sw_opaque				sw_network_interface_handler;
+typedef sw_result
+(HOWL_API *sw_network_interface_handler_func)(
+									sw_network_interface_handler		handler,
+									sw_salt									salt,
+									struct _sw_network_interface	*	netif,
+									sw_opaque								extra);
+
+typedef sw_opaque				sw_signal_handler;
+typedef sw_result
+(HOWL_API *sw_signal_handler_func)(
+									sw_signal_handler		handler,
+									sw_salt					salt,
+									struct _sw_signal	*	signal,
+									sw_opaque				extra);
+
+
+sw_result HOWL_API
+sw_salt_init(
+				sw_salt		*	self,
+				int				argc,
+				char			**	argv);
+
+
+sw_result HOWL_API
+sw_salt_fina(
+				sw_salt	self);
+
+
+sw_result HOWL_API
+sw_salt_register_socket(
+				sw_salt						self,
+				struct _sw_socket		*	socket,
+				sw_socket_event			events,
+				sw_socket_handler			handler,
+				sw_socket_handler_func	func,
+				sw_opaque					extra);
+
+
+sw_result HOWL_API
+sw_salt_unregister_socket(
+				sw_salt						self,
+				struct _sw_socket		*	socket);
+
+
+sw_result HOWL_API
+sw_salt_register_timer(
+				sw_salt						self,
+				struct _sw_timer		*	timer,
+				sw_time						timeout,
+				sw_timer_handler			handler,
+				sw_timer_handler_func	func,
+				sw_opaque					extra);
+
+
+sw_result HOWL_API
+sw_salt_unregister_timer(
+				sw_salt						self,
+				struct _sw_timer		*	timer);
+
+
+sw_result HOWL_API
+sw_salt_register_network_interface(
+				sw_salt										self,
+				struct _sw_network_interface		*	netif,
+				sw_network_interface_handler			handler,
+				sw_network_interface_handler_func	func,
+				sw_opaque									extra);
+
+
+sw_result HOWL_API
+sw_salt_unregister_network_interface_handler(
+				sw_salt						self);
+
+
+sw_result HOWL_API
+sw_salt_register_signal(
+				sw_salt						self,
+				struct _sw_signal	*		signal,
+				sw_signal_handler			handler,
+				sw_signal_handler_func	func,
+				sw_opaque					extra);
+
+
+sw_result HOWL_API
+sw_salt_unregister_signal(
+				sw_salt						self,
+				struct _sw_signal	*		signal);
+
+
+sw_result HOWL_API
+sw_salt_lock(
+				sw_salt	self);
+
+
+sw_result HOWL_API
+sw_salt_unlock(
+				sw_salt	self);
+
+
+sw_result HOWL_API
+sw_salt_step(
+				sw_salt		self,
+				sw_uint32	*	msec);
+
+
+sw_result HOWL_API
+sw_salt_run(
+				sw_salt	self);
+
+
+sw_result HOWL_API
+sw_salt_stop_run(
+				sw_salt	self);
+
+
+#define SW_FALSE		0
+#define SW_TRUE		1
+#define SW_OKAY		0
+
+
+/*
+ * error codes
+ */
+#define	SW_E_CORE_BASE					0x80000000
+#define	SW_E_UNKNOWN					(SW_E_CORE_BASE) + 1
+#define	SW_E_INIT						(SW_E_CORE_BASE) + 2
+#define	SW_E_MEM							(SW_E_CORE_BASE) + 3
+#define	SW_E_EOF							(SW_E_CORE_BASE) + 4
+#define	SW_E_NO_IMPL					(SW_E_CORE_BASE) + 5
+#define	SW_E_FILE_LOCKED				(SW_E_CORE_BASE) + 6
+#define	SW_E_PROTOCOL_NOT_FOUND		(SW_E_CORE_BASE) + 7
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif
diff --git a/avahi-0.6.31/avahi-compat-howl/include/salt/signal.h b/avahi-0.6.31/avahi-compat-howl/include/salt/signal.h
new file mode 100644
index 0000000..b36e02f
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-howl/include/salt/signal.h
@@ -0,0 +1,61 @@
+#ifndef _salt_signal_h
+#define _salt_signal_h
+
+/*
+ * Copyright 2003, 2004 Porchdog Software. All rights reserved.
+ *
+ *	Redistribution and use in source and binary forms, with or without modification,
+ *	are permitted provided that the following conditions are met:
+ *
+ *		1. Redistributions of source code must retain the above copyright notice,
+ *		   this list of conditions and the following disclaimer.
+ *		2. Redistributions in binary form must reproduce the above copyright notice,
+ *		   this list of conditions and the following disclaimer in the documentation
+ *		   and/or other materials provided with the distribution.
+ *
+ *	THIS SOFTWARE IS PROVIDED BY PORCHDOG SOFTWARE ``AS IS'' AND ANY
+ *	EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ *	WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ *	IN NO EVENT SHALL THE HOWL PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ *	INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ *	BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ *	OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ *	OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ *	OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *	The views and conclusions contained in the software and documentation are those
+ *	of the authors and should not be interpreted as representing official policies,
+ *	either expressed or implied, of Porchdog Software.
+ */
+
+#include <salt/platform.h>
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+
+struct								_sw_signal;
+typedef struct _sw_signal	*	sw_signal;
+
+
+sw_result HOWL_API
+sw_signal_init(
+		sw_signal	*	self,
+		int				signal);
+
+
+sw_result HOWL_API
+sw_signal_fina(
+		sw_signal		self);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif
diff --git a/avahi-0.6.31/avahi-compat-howl/include/salt/socket.h b/avahi-0.6.31/avahi-compat-howl/include/salt/socket.h
new file mode 100644
index 0000000..9eaa102
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-howl/include/salt/socket.h
@@ -0,0 +1,263 @@
+#ifndef _sw_socket_h
+#define _sw_socket_h
+
+/*
+ * Copyright 2003, 2004 Porchdog Software. All rights reserved.
+ *
+ *	Redistribution and use in source and binary forms, with or without modification,
+ *	are permitted provided that the following conditions are met:
+ *
+ *		1. Redistributions of source code must retain the above copyright notice,
+ *		   this list of conditions and the following disclaimer.
+ *		2. Redistributions in binary form must reproduce the above copyright notice,
+ *		   this list of conditions and the following disclaimer in the documentation
+ *		   and/or other materials provided with the distribution.
+ *
+ *	THIS SOFTWARE IS PROVIDED BY PORCHDOG SOFTWARE ``AS IS'' AND ANY
+ *	EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ *	WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ *	IN NO EVENT SHALL THE HOWL PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ *	INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ *	BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ *	OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ *	OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ *	OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *	The views and conclusions contained in the software and documentation are those
+ *	of the authors and should not be interpreted as representing official policies,
+ *	either expressed or implied, of Porchdog Software.
+ */
+
+#include <salt/platform.h>
+#include <salt/address.h>
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+
+struct											_sw_socket;
+typedef struct _sw_socket				*	sw_socket;
+struct											_sw_socket_options;
+typedef struct _sw_socket_options	*	sw_socket_options;
+typedef sw_uint16							sw_port;
+
+
+
+sw_result HOWL_API
+sw_tcp_socket_init(
+				sw_socket	*	self);
+
+
+sw_result HOWL_API
+sw_tcp_socket_init_with_desc(
+				sw_socket	*	self,
+				sw_sockdesc_t	desc);
+
+
+sw_result HOWL_API
+sw_udp_socket_init(
+				sw_socket	*	self);
+
+
+sw_result HOWL_API
+sw_multicast_socket_init(
+				sw_socket	*	self);
+
+
+sw_result HOWL_API
+sw_socket_fina(
+				sw_socket	self);
+
+
+sw_result HOWL_API
+sw_socket_bind(
+				sw_socket			self,
+				sw_ipv4_address	address,
+				sw_port			port);
+
+
+sw_result HOWL_API
+sw_socket_join_multicast_group(
+				sw_socket			self,
+				sw_ipv4_address	local_address,
+				sw_ipv4_address	multicast_address,
+				sw_uint32			ttl);
+
+
+sw_result HOWL_API
+sw_socket_leave_multicast_group(
+				sw_socket	self);
+
+
+sw_result HOWL_API
+sw_socket_listen(
+				sw_socket	self,
+				int			qsize);
+
+
+sw_result HOWL_API
+sw_socket_connect(
+				sw_socket			self,
+				sw_ipv4_address	address,
+				sw_port			port);
+
+
+sw_result HOWL_API
+sw_socket_accept(
+				sw_socket		self,
+				sw_socket	*	socket);
+
+
+sw_result HOWL_API
+sw_socket_send(
+				sw_socket		self,
+				sw_octets		buffer,
+				sw_size_t		len,
+				sw_size_t	*	bytesWritten);
+
+
+sw_result HOWL_API
+sw_socket_sendto(
+				sw_socket			self,
+				sw_octets			buffer,
+				sw_size_t			len,
+				sw_size_t		*	bytesWritten,
+				sw_ipv4_address	to,
+				sw_port			port);
+
+
+sw_result HOWL_API
+sw_socket_recv(
+				sw_socket		self,
+				sw_octets		buffer,
+				sw_size_t		max,
+				sw_size_t	*	len);
+
+
+sw_result HOWL_API
+sw_socket_recvfrom(
+				sw_socket				self,
+				sw_octets				buffer,
+				sw_size_t				max,
+				sw_size_t			*	len,
+				sw_ipv4_address	*	from,
+				sw_port			*	port,
+				sw_ipv4_address	*	dest,
+				sw_uint32				*	interface_index);
+
+
+sw_result HOWL_API
+sw_socket_set_blocking_mode(
+				sw_socket	self,
+				sw_bool	blocking_mode);
+
+
+sw_result HOWL_API
+sw_socket_set_options(
+				sw_socket				self,
+				sw_socket_options		options);
+
+
+sw_ipv4_address HOWL_API
+sw_socket_ipv4_address(
+				sw_socket	self);
+
+
+sw_port HOWL_API
+sw_socket_port(
+				sw_socket	self);
+
+
+sw_sockdesc_t HOWL_API
+sw_socket_desc(
+				sw_socket	self);
+
+
+sw_result HOWL_API
+sw_socket_close(
+				sw_socket	self);
+
+
+sw_result HOWL_API
+sw_socket_options_init(
+				sw_socket_options	*	self);
+
+
+sw_result HOWL_API
+sw_socket_options_fina(
+				sw_socket_options	self);
+
+
+sw_result HOWL_API
+sw_socket_options_set_debug(
+				sw_socket_options		self,
+				sw_bool					val);
+
+
+sw_result HOWL_API
+sw_socket_options_set_nodelay(
+				sw_socket_options		self,
+				sw_bool					val);
+
+
+sw_result HOWL_API
+sw_socket_options_set_dontroute(
+				sw_socket_options		self,
+				sw_bool					val);
+
+
+sw_result HOWL_API
+sw_socket_options_set_keepalive(
+				sw_socket_options		self,
+				sw_bool					val);
+
+
+sw_result HOWL_API
+sw_socket_options_set_linger(
+				sw_socket_options		self,
+				sw_bool					onoff,
+				sw_uint32					linger);
+
+
+sw_result HOWL_API
+sw_socket_options_set_reuseaddr(
+				sw_socket_options		self,
+				sw_bool					val);
+
+
+sw_result HOWL_API
+sw_socket_options_set_rcvbuf(
+				sw_socket_options		self,
+				sw_uint32					val);
+
+
+sw_result HOWL_API
+sw_socket_options_set_sndbuf(
+				sw_socket_options		self,
+				sw_uint32					val);
+
+
+int
+sw_socket_error_code(void);
+
+
+#define	SW_E_SOCKET_BASE		0x80000200
+#define	SW_E_SOCKET				(SW_E_SOCKET_BASE) + 1
+#define	SW_E_BIND				(SW_E_SOCKET_BASE) + 2
+#define	SW_E_GETSOCKNAME		(SW_E_SOCKET_BASE) + 3
+#define	SW_E_ADD_MEMBERSHIP	(SW_E_SOCKET_BASE) + 4
+#define	SW_E_MULTICAST_TTL	(SW_E_SOCKET_BASE) + 5
+#define	SW_E_NOCONNECTION		(SW_E_SOCKET_BASE) + 6
+#define	SW_E_INPROGRESS		(SW_E_SOCKET_BASE) + 7
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif
diff --git a/avahi-0.6.31/avahi-compat-howl/include/salt/time.h b/avahi-0.6.31/avahi-compat-howl/include/salt/time.h
new file mode 100644
index 0000000..8789b3a
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-howl/include/salt/time.h
@@ -0,0 +1,100 @@
+#ifndef _salt_time_h
+#define _salt_time_h
+
+/*
+ * Copyright 2003, 2004 Porchdog Software. All rights reserved.
+ *
+ *	Redistribution and use in source and binary forms, with or without modification,
+ *	are permitted provided that the following conditions are met:
+ *
+ *		1. Redistributions of source code must retain the above copyright notice,
+ *		   this list of conditions and the following disclaimer.
+ *		2. Redistributions in binary form must reproduce the above copyright notice,
+ *		   this list of conditions and the following disclaimer in the documentation
+ *		   and/or other materials provided with the distribution.
+ *
+ *	THIS SOFTWARE IS PROVIDED BY PORCHDOG SOFTWARE ``AS IS'' AND ANY
+ *	EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ *	WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ *	IN NO EVENT SHALL THE HOWL PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ *	INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ *	BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ *	OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ *	OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ *	OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *	The views and conclusions contained in the software and documentation are those
+ *	of the authors and should not be interpreted as representing official policies,
+ *	either expressed or implied, of Porchdog Software.
+ */
+
+#include <salt/platform.h>
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+
+struct								_sw_timer;
+typedef struct _sw_timer	*	sw_timer;
+
+
+sw_result HOWL_API
+sw_timer_init(
+		sw_timer	*	self);
+
+
+sw_result HOWL_API
+sw_timer_fina(
+		sw_timer	self);
+
+
+typedef struct _sw_time
+{
+	sw_uint32	m_secs;
+	sw_uint32 m_usecs;
+} sw_time;
+
+
+sw_result HOWL_API
+sw_time_init(
+		sw_time	*	self);
+
+
+sw_result HOWL_API
+sw_time_init_now(
+		sw_time	*	self);
+
+
+sw_result HOWL_API
+sw_time_fina(
+		sw_time	self);
+
+
+sw_time HOWL_API
+sw_time_add(
+		sw_time	self,
+		sw_time	y);
+
+
+sw_time HOWL_API
+sw_time_sub(
+		sw_time	self,
+		sw_time	y);
+
+
+sw_int32 HOWL_API
+sw_time_cmp(
+		sw_time	self,
+		sw_time	y);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif
diff --git a/avahi-0.6.31/avahi-compat-howl/samples/Makefile.am b/avahi-0.6.31/avahi-compat-howl/samples/Makefile.am
new file mode 100644
index 0000000..5efa19e
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-howl/samples/Makefile.am
@@ -0,0 +1,51 @@
+# This file is part of avahi.
+#
+# avahi 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 of the
+# License, or (at your option) any later version.
+#
+# avahi 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 General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+AM_CFLAGS=-I$(top_srcdir) -I$(top_srcdir)/avahi-compat-howl/include
+
+# This cool debug trap works on i386/gcc only
+AM_CFLAGS+='-DDEBUG_TRAP=__asm__("int $$3")'
+
+if HAVE_DBUS
+if ENABLE_COMPAT_HOWL
+
+if ENABLE_TESTS
+noinst_PROGRAMS = browse resolve publish query
+endif
+
+browse_SOURCES = \
+	browse.c
+browse_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -I $(srcdir)/include
+browse_LDADD = $(AM_LDADD) ../libhowl.la
+
+resolve_SOURCES = \
+	resolve.c
+resolve_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -I $(srcdir)/include
+resolve_LDADD = $(AM_LDADD) ../libhowl.la
+
+publish_SOURCES = \
+	publish.c
+publish_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -I $(srcdir)/include
+publish_LDADD = $(AM_LDADD) ../libhowl.la
+
+query_SOURCES = \
+	query.c
+query_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -I $(srcdir)/include
+query_LDADD = $(AM_LDADD) ../libhowl.la
+
+endif
+endif
diff --git a/avahi-0.6.31/avahi-compat-howl/samples/Makefile.in b/avahi-0.6.31/avahi-compat-howl/samples/Makefile.in
new file mode 100644
index 0000000..f2b009c
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-howl/samples/Makefile.in
@@ -0,0 +1,772 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# This file is part of avahi.
+#
+# avahi 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 of the
+# License, or (at your option) any later version.
+#
+# avahi 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 General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@ENABLE_COMPAT_HOWL_TRUE@@ENABLE_TESTS_TRUE@@HAVE_DBUS_TRUE@noinst_PROGRAMS = browse$(EXEEXT) \
+@ENABLE_COMPAT_HOWL_TRUE@@ENABLE_TESTS_TRUE@@HAVE_DBUS_TRUE@	resolve$(EXEEXT) \
+@ENABLE_COMPAT_HOWL_TRUE@@ENABLE_TESTS_TRUE@@HAVE_DBUS_TRUE@	publish$(EXEEXT) \
+@ENABLE_COMPAT_HOWL_TRUE@@ENABLE_TESTS_TRUE@@HAVE_DBUS_TRUE@	query$(EXEEXT)
+subdir = avahi-compat-howl/samples
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/common/acx_pthread.m4 \
+	$(top_srcdir)/common/gcc_stack_protect.m4 \
+	$(top_srcdir)/common/gcc_visibility.m4 \
+	$(top_srcdir)/common/intltool.m4 \
+	$(top_srcdir)/common/introspection.m4 \
+	$(top_srcdir)/common/libtool.m4 \
+	$(top_srcdir)/common/ltoptions.m4 \
+	$(top_srcdir)/common/ltsugar.m4 \
+	$(top_srcdir)/common/ltversion.m4 \
+	$(top_srcdir)/common/lt~obsolete.m4 \
+	$(top_srcdir)/common/nls.m4 $(top_srcdir)/common/python.m4 \
+	$(top_srcdir)/acinclude.m4 $(top_srcdir)/common/doxygen.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+PROGRAMS = $(noinst_PROGRAMS)
+am__browse_SOURCES_DIST = browse.c
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@am_browse_OBJECTS = browse-browse.$(OBJEXT)
+browse_OBJECTS = $(am_browse_OBJECTS)
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@browse_DEPENDENCIES =  \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	../libhowl.la
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+browse_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(browse_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+am__publish_SOURCES_DIST = publish.c
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@am_publish_OBJECTS = publish-publish.$(OBJEXT)
+publish_OBJECTS = $(am_publish_OBJECTS)
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@publish_DEPENDENCIES =  \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	../libhowl.la
+publish_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(publish_CFLAGS) \
+	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am__query_SOURCES_DIST = query.c
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@am_query_OBJECTS = query-query.$(OBJEXT)
+query_OBJECTS = $(am_query_OBJECTS)
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@query_DEPENDENCIES =  \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	../libhowl.la
+query_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(query_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+am__resolve_SOURCES_DIST = resolve.c
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@am_resolve_OBJECTS = resolve-resolve.$(OBJEXT)
+resolve_OBJECTS = $(am_resolve_OBJECTS)
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@resolve_DEPENDENCIES =  \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	../libhowl.la
+resolve_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(resolve_CFLAGS) \
+	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC    " $@;
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(browse_SOURCES) $(publish_SOURCES) $(query_SOURCES) \
+	$(resolve_SOURCES)
+DIST_SOURCES = $(am__browse_SOURCES_DIST) $(am__publish_SOURCES_DIST) \
+	$(am__query_SOURCES_DIST) $(am__resolve_SOURCES_DIST)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AVAHI_AUTOIPD_GROUP = @AVAHI_AUTOIPD_GROUP@
+AVAHI_AUTOIPD_USER = @AVAHI_AUTOIPD_USER@
+AVAHI_GROUP = @AVAHI_GROUP@
+AVAHI_PRIV_ACCESS_GROUP = @AVAHI_PRIV_ACCESS_GROUP@
+AVAHI_USER = @AVAHI_USER@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
+DBUS_SYSTEM_BUS_DEFAULT_ADDRESS = @DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@
+DBUS_SYS_DIR = @DBUS_SYS_DIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+DX_CONFIG = @DX_CONFIG@
+DX_DOCDIR = @DX_DOCDIR@
+DX_DOT = @DX_DOT@
+DX_DOXYGEN = @DX_DOXYGEN@
+DX_DVIPS = @DX_DVIPS@
+DX_EGREP = @DX_EGREP@
+DX_ENV = @DX_ENV@
+DX_FLAG_chi = @DX_FLAG_chi@
+DX_FLAG_chm = @DX_FLAG_chm@
+DX_FLAG_doc = @DX_FLAG_doc@
+DX_FLAG_dot = @DX_FLAG_dot@
+DX_FLAG_html = @DX_FLAG_html@
+DX_FLAG_man = @DX_FLAG_man@
+DX_FLAG_pdf = @DX_FLAG_pdf@
+DX_FLAG_ps = @DX_FLAG_ps@
+DX_FLAG_rtf = @DX_FLAG_rtf@
+DX_FLAG_xml = @DX_FLAG_xml@
+DX_HHC = @DX_HHC@
+DX_LATEX = @DX_LATEX@
+DX_MAKEINDEX = @DX_MAKEINDEX@
+DX_PDFLATEX = @DX_PDFLATEX@
+DX_PERL = @DX_PERL@
+DX_PROJECT = @DX_PROJECT@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GACUTIL = @GACUTIL@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB20_CFLAGS = @GLIB20_CFLAGS@
+GLIB20_LIBS = @GLIB20_LIBS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GOBJECT_CFLAGS = @GOBJECT_CFLAGS@
+GOBJECT_LIBS = @GOBJECT_LIBS@
+GREP = @GREP@
+GTK20_CFLAGS = @GTK20_CFLAGS@
+GTK20_LIBS = @GTK20_LIBS@
+GTK30_CFLAGS = @GTK30_CFLAGS@
+GTK30_LIBS = @GTK30_LIBS@
+HOWL_COMPAT_VERSION = @HOWL_COMPAT_VERSION@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
+INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
+INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
+INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
+INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
+INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
+INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBAVAHI_CLIENT_VERSION_INFO = @LIBAVAHI_CLIENT_VERSION_INFO@
+LIBAVAHI_COMMON_VERSION_INFO = @LIBAVAHI_COMMON_VERSION_INFO@
+LIBAVAHI_COMPAT_HOWL_VERSION_INFO = @LIBAVAHI_COMPAT_HOWL_VERSION_INFO@
+LIBAVAHI_COMPAT_LIBDNS_SD_VERSION_INFO = @LIBAVAHI_COMPAT_LIBDNS_SD_VERSION_INFO@
+LIBAVAHI_CORE_VERSION_INFO = @LIBAVAHI_CORE_VERSION_INFO@
+LIBAVAHI_GLIB_VERSION_INFO = @LIBAVAHI_GLIB_VERSION_INFO@
+LIBAVAHI_GOBJECT_VERSION_INFO = @LIBAVAHI_GOBJECT_VERSION_INFO@
+LIBAVAHI_QT3_VERSION_INFO = @LIBAVAHI_QT3_VERSION_INFO@
+LIBAVAHI_QT4_VERSION_INFO = @LIBAVAHI_QT4_VERSION_INFO@
+LIBAVAHI_UI_VERSION_INFO = @LIBAVAHI_UI_VERSION_INFO@
+LIBDAEMON_CFLAGS = @LIBDAEMON_CFLAGS@
+LIBDAEMON_LIBS = @LIBDAEMON_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MCS = @MCS@
+MDASSEMBLER = @MDASSEMBLER@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MOC_QT3 = @MOC_QT3@
+MOC_QT4 = @MOC_QT4@
+MONODOCER = @MONODOCER@
+MONODOC_CFLAGS = @MONODOC_CFLAGS@
+MONODOC_DIR = @MONODOC_DIR@
+MONODOC_LIBS = @MONODOC_LIBS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+QT3_CFLAGS = @QT3_CFLAGS@
+QT3_LIBS = @QT3_LIBS@
+QT4_CFLAGS = @QT4_CFLAGS@
+QT4_LIBS = @QT4_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STOW = @STOW@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+VISIBILITY_HIDDEN_CFLAGS = @VISIBILITY_HIDDEN_CFLAGS@
+XGETTEXT = @XGETTEXT@
+XML_CFLAGS = @XML_CFLAGS@
+XML_LIBS = @XML_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+avahi_runtime_dir = @avahi_runtime_dir@
+avahi_socket = @avahi_socket@
+avahilocaledir = @avahilocaledir@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+have_pkg_config = @have_pkg_config@
+have_xmltoman = @have_xmltoman@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+interfacesdir = @interfacesdir@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+systemdsystemunitdir = @systemdsystemunitdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# This cool debug trap works on i386/gcc only
+AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/avahi-compat-howl/include \
+	'-DDEBUG_TRAP=__asm__("int $$3")'
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@browse_SOURCES = \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	browse.c
+
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@browse_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -I $(srcdir)/include
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@browse_LDADD = $(AM_LDADD) ../libhowl.la
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@resolve_SOURCES = \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	resolve.c
+
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@resolve_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -I $(srcdir)/include
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@resolve_LDADD = $(AM_LDADD) ../libhowl.la
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@publish_SOURCES = \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	publish.c
+
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@publish_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -I $(srcdir)/include
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@publish_LDADD = $(AM_LDADD) ../libhowl.la
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@query_SOURCES = \
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@	query.c
+
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@query_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -I $(srcdir)/include
+@ENABLE_COMPAT_HOWL_TRUE@@HAVE_DBUS_TRUE@query_LDADD = $(AM_LDADD) ../libhowl.la
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign avahi-compat-howl/samples/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign avahi-compat-howl/samples/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstPROGRAMS:
+	@list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+browse$(EXEEXT): $(browse_OBJECTS) $(browse_DEPENDENCIES) $(EXTRA_browse_DEPENDENCIES) 
+	@rm -f browse$(EXEEXT)
+	$(AM_V_CCLD)$(browse_LINK) $(browse_OBJECTS) $(browse_LDADD) $(LIBS)
+publish$(EXEEXT): $(publish_OBJECTS) $(publish_DEPENDENCIES) $(EXTRA_publish_DEPENDENCIES) 
+	@rm -f publish$(EXEEXT)
+	$(AM_V_CCLD)$(publish_LINK) $(publish_OBJECTS) $(publish_LDADD) $(LIBS)
+query$(EXEEXT): $(query_OBJECTS) $(query_DEPENDENCIES) $(EXTRA_query_DEPENDENCIES) 
+	@rm -f query$(EXEEXT)
+	$(AM_V_CCLD)$(query_LINK) $(query_OBJECTS) $(query_LDADD) $(LIBS)
+resolve$(EXEEXT): $(resolve_OBJECTS) $(resolve_DEPENDENCIES) $(EXTRA_resolve_DEPENDENCIES) 
+	@rm -f resolve$(EXEEXT)
+	$(AM_V_CCLD)$(resolve_LINK) $(resolve_OBJECTS) $(resolve_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/browse-browse.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/publish-publish.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/query-query.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resolve-resolve.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+browse-browse.o: browse.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(browse_CFLAGS) $(CFLAGS) -MT browse-browse.o -MD -MP -MF $(DEPDIR)/browse-browse.Tpo -c -o browse-browse.o `test -f 'browse.c' || echo '$(srcdir)/'`browse.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/browse-browse.Tpo $(DEPDIR)/browse-browse.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='browse.c' object='browse-browse.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(browse_CFLAGS) $(CFLAGS) -c -o browse-browse.o `test -f 'browse.c' || echo '$(srcdir)/'`browse.c
+
+browse-browse.obj: browse.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(browse_CFLAGS) $(CFLAGS) -MT browse-browse.obj -MD -MP -MF $(DEPDIR)/browse-browse.Tpo -c -o browse-browse.obj `if test -f 'browse.c'; then $(CYGPATH_W) 'browse.c'; else $(CYGPATH_W) '$(srcdir)/browse.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/browse-browse.Tpo $(DEPDIR)/browse-browse.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='browse.c' object='browse-browse.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(browse_CFLAGS) $(CFLAGS) -c -o browse-browse.obj `if test -f 'browse.c'; then $(CYGPATH_W) 'browse.c'; else $(CYGPATH_W) '$(srcdir)/browse.c'; fi`
+
+publish-publish.o: publish.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(publish_CFLAGS) $(CFLAGS) -MT publish-publish.o -MD -MP -MF $(DEPDIR)/publish-publish.Tpo -c -o publish-publish.o `test -f 'publish.c' || echo '$(srcdir)/'`publish.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/publish-publish.Tpo $(DEPDIR)/publish-publish.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='publish.c' object='publish-publish.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(publish_CFLAGS) $(CFLAGS) -c -o publish-publish.o `test -f 'publish.c' || echo '$(srcdir)/'`publish.c
+
+publish-publish.obj: publish.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(publish_CFLAGS) $(CFLAGS) -MT publish-publish.obj -MD -MP -MF $(DEPDIR)/publish-publish.Tpo -c -o publish-publish.obj `if test -f 'publish.c'; then $(CYGPATH_W) 'publish.c'; else $(CYGPATH_W) '$(srcdir)/publish.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/publish-publish.Tpo $(DEPDIR)/publish-publish.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='publish.c' object='publish-publish.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(publish_CFLAGS) $(CFLAGS) -c -o publish-publish.obj `if test -f 'publish.c'; then $(CYGPATH_W) 'publish.c'; else $(CYGPATH_W) '$(srcdir)/publish.c'; fi`
+
+query-query.o: query.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(query_CFLAGS) $(CFLAGS) -MT query-query.o -MD -MP -MF $(DEPDIR)/query-query.Tpo -c -o query-query.o `test -f 'query.c' || echo '$(srcdir)/'`query.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/query-query.Tpo $(DEPDIR)/query-query.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='query.c' object='query-query.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(query_CFLAGS) $(CFLAGS) -c -o query-query.o `test -f 'query.c' || echo '$(srcdir)/'`query.c
+
+query-query.obj: query.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(query_CFLAGS) $(CFLAGS) -MT query-query.obj -MD -MP -MF $(DEPDIR)/query-query.Tpo -c -o query-query.obj `if test -f 'query.c'; then $(CYGPATH_W) 'query.c'; else $(CYGPATH_W) '$(srcdir)/query.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/query-query.Tpo $(DEPDIR)/query-query.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='query.c' object='query-query.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(query_CFLAGS) $(CFLAGS) -c -o query-query.obj `if test -f 'query.c'; then $(CYGPATH_W) 'query.c'; else $(CYGPATH_W) '$(srcdir)/query.c'; fi`
+
+resolve-resolve.o: resolve.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-resolve.o -MD -MP -MF $(DEPDIR)/resolve-resolve.Tpo -c -o resolve-resolve.o `test -f 'resolve.c' || echo '$(srcdir)/'`resolve.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/resolve-resolve.Tpo $(DEPDIR)/resolve-resolve.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='resolve.c' object='resolve-resolve.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-resolve.o `test -f 'resolve.c' || echo '$(srcdir)/'`resolve.c
+
+resolve-resolve.obj: resolve.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -MT resolve-resolve.obj -MD -MP -MF $(DEPDIR)/resolve-resolve.Tpo -c -o resolve-resolve.obj `if test -f 'resolve.c'; then $(CYGPATH_W) 'resolve.c'; else $(CYGPATH_W) '$(srcdir)/resolve.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/resolve-resolve.Tpo $(DEPDIR)/resolve-resolve.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='resolve.c' object='resolve-resolve.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(resolve_CFLAGS) $(CFLAGS) -c -o resolve-resolve.obj `if test -f 'resolve.c'; then $(CYGPATH_W) 'resolve.c'; else $(CYGPATH_W) '$(srcdir)/resolve.c'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstPROGRAMS ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/avahi-0.6.31/avahi-compat-howl/samples/browse.c b/avahi-0.6.31/avahi-compat-howl/samples/browse.c
new file mode 100644
index 0000000..f55b1cf
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-howl/samples/browse.c
@@ -0,0 +1,184 @@
+/*
+ * Copyright 2003, 2004, 2004 Porchdog Software. All rights reserved.
+ *
+ *	Redistribution and use in source and binary forms, with or without modification,
+ *	are permitted provided that the following conditions are met:
+ *
+ *		1. Redistributions of source code must retain the above copyright notice,
+ *		   this list of conditions and the following disclaimer.
+ *		2. Redistributions in binary form must reproduce the above copyright notice,
+ *		   this list of conditions and the following disclaimer in the documentation
+ *		   and/or other materials provided with the distribution.
+ *
+ *	THIS SOFTWARE IS PROVIDED BY PORCHDOG SOFTWARE ``AS IS'' AND ANY
+ *	EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ *	WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ *	IN NO EVENT SHALL THE HOWL PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ *	INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ *	BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ *	OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ *	OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ *	OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *	The views and conclusions contained in the software and documentation are those
+ *	of the authors and should not be interpreted as representing official policies,
+ *	either expressed or implied, of Porchdog Software.
+ */
+
+#include <howl.h>
+#include <salt/debug.h>
+#include <stdio.h>
+
+
+static sw_result HOWL_API
+my_resolver(
+				sw_discovery			discovery,
+				sw_discovery_oid		oid,
+				sw_uint32				interface_index,
+				sw_const_string		name,
+				sw_const_string		type,
+				sw_const_string		domain,
+				sw_ipv4_address		address,
+				sw_port					port,
+				sw_octets				text_record,
+				sw_uint32				text_record_len,
+				sw_opaque_t				extra)
+{
+	sw_text_record_iterator				it;
+	sw_int8									name_buf[16];
+	sw_int8									key[SW_TEXT_RECORD_MAX_LEN];
+	sw_int8									sval[SW_TEXT_RECORD_MAX_LEN];
+	sw_uint8									oval[SW_TEXT_RECORD_MAX_LEN];
+	sw_uint32								oval_len;
+	sw_result								err = SW_OKAY;
+
+	sw_discovery_cancel(discovery, oid);
+
+	fprintf(stderr, "resolve reply: 0x%x %s %s %s %s %d\n", interface_index, name, type, domain, sw_ipv4_address_name(address, name_buf, 16), port);
+
+	if ((text_record_len > 0) && (text_record) && (*text_record != '\0'))
+	{
+		err = sw_text_record_iterator_init(&it, text_record, text_record_len);
+		sw_check_okay(err, exit);
+
+		while (sw_text_record_iterator_next(it, key, oval, &oval_len) == SW_OKAY)
+		{
+			fprintf(stderr, "Txt: [%s]=[%s] - (%d bytes)\n", key, oval, oval_len);
+		}
+
+		err = sw_text_record_iterator_fina(it);
+		sw_check_okay(err, exit);
+	}
+
+exit:
+
+	return err;
+}
+
+
+static sw_result HOWL_API
+my_browser(
+				sw_discovery						discovery,
+				sw_discovery_oid					oid,
+				sw_discovery_browse_status		status,
+				sw_uint32							interface_index,
+				sw_const_string					name,
+				sw_const_string					type,
+				sw_const_string					domain,
+				sw_opaque_t							extra)
+{
+	sw_discovery_resolve_id rid;
+
+	switch (status)
+	{
+		case SW_DISCOVERY_BROWSE_INVALID:
+		{
+			fprintf(stderr, "browse reply: Invalid\n");
+		}
+		break;
+
+		case SW_DISCOVERY_BROWSE_RELEASE:
+		{
+			fprintf(stderr, "browse reply: Release\n");
+		}
+		break;
+
+		case SW_DISCOVERY_BROWSE_ADD_DOMAIN:
+		{
+			fprintf(stderr, "browse reply: Add Domain\n");
+		}
+		break;
+
+		case SW_DISCOVERY_BROWSE_ADD_DEFAULT_DOMAIN:
+		{
+			fprintf(stderr, "browse reply: Add Default Domain\n");
+		}
+		break;
+
+		case SW_DISCOVERY_BROWSE_REMOVE_DOMAIN:
+		{
+			fprintf(stderr, "browse reply: Remove Domain\n");
+		}
+		break;
+
+		case SW_DISCOVERY_BROWSE_ADD_SERVICE:
+		{
+			fprintf(stderr, "browse reply: Add Service 0x%x %s %s %s\n", interface_index, name, type, domain);
+			if (sw_discovery_resolve(discovery, interface_index, name, type, domain, my_resolver, NULL, &rid) != SW_OKAY)
+			{
+				fprintf(stderr, "resolve failed\n");
+			}
+		}
+		break;
+
+		case SW_DISCOVERY_BROWSE_REMOVE_SERVICE:
+		{
+			fprintf(stderr, "browse reply: Remove Service\n");
+			fprintf(stderr, "remove service: 0x%x %s %s %s\n", interface_index, name, type, domain);
+		}
+		break;
+
+		case SW_DISCOVERY_BROWSE_RESOLVED:
+		{
+			fprintf(stderr, "browse reply: Resolved\n");
+		}
+		break;
+	}
+
+	return SW_OKAY;
+}
+
+
+#if defined(WIN32)
+int __cdecl
+#else
+int
+#endif
+main(
+	int		argc,
+	char	**	argv)
+{
+	sw_discovery		discovery;
+	sw_discovery_oid	oid;
+	sw_result			err;
+
+	err = sw_discovery_init(&discovery);
+	sw_check_okay(err, exit);
+
+	if (argc != 2)
+	{
+		fprintf(stderr, "usage: mDNSBrowse <type>\n");
+		return -1;
+	}
+
+	err = sw_discovery_browse(discovery, 0, argv[1], NULL, my_browser, NULL, &oid);
+	sw_check_okay(err, exit);
+
+	err = sw_discovery_run(discovery);
+	sw_check_okay(err, exit);
+
+exit:
+
+	return err;
+}
diff --git a/avahi-0.6.31/avahi-compat-howl/samples/publish.c b/avahi-0.6.31/avahi-compat-howl/samples/publish.c
new file mode 100644
index 0000000..931e786
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-howl/samples/publish.c
@@ -0,0 +1,110 @@
+/*
+ * Copyright 2003, 2004 Porchdog Software. All rights reserved.
+ *
+ *	Redistribution and use in source and binary forms, with or without modification,
+ *	are permitted provided that the following conditions are met:
+ *
+ *		1. Redistributions of source code must retain the above copyright notice,
+ *		   this list of conditions and the following disclaimer.
+ *		2. Redistributions in binary form must reproduce the above copyright notice,
+ *		   this list of conditions and the following disclaimer in the documentation
+ *		   and/or other materials provided with the distribution.
+ *
+ *	THIS SOFTWARE IS PROVIDED BY PORCHDOG SOFTWARE ``AS IS'' AND ANY
+ *	EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ *	WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ *	IN NO EVENT SHALL THE HOWL PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ *	INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ *	BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ *	OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ *	OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ *	OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *	The views and conclusions contained in the software and documentation are those
+ *	of the authors and should not be interpreted as representing official policies,
+ *	either expressed or implied, of Porchdog Software.
+ */
+
+#include <howl.h>
+#include <stdio.h>
+
+
+static sw_result HOWL_API
+my_service_reply(
+				sw_discovery						discovery,
+				sw_discovery_oid					oid,
+				sw_discovery_publish_status	status,
+				sw_opaque							extra)
+{
+	static sw_string
+	status_text[] =
+	{
+		"Started",
+		"Stopped",
+		"Name Collision",
+		"Invalid"
+	};
+
+	fprintf(stderr, "publish reply: %s\n", status_text[status]);
+	return SW_OKAY;
+}
+
+
+#if defined(WIN32)
+int __cdecl
+#else
+int
+#endif
+main(
+	int		argc,
+	char	**	argv)
+{
+	sw_discovery					discovery;
+	sw_text_record					text_record;
+	sw_result						result;
+	sw_discovery_publish_id	id;
+	int								i;
+
+	if (sw_discovery_init(&discovery) != SW_OKAY)
+	{
+		fprintf(stderr, "sw_discovery_init() failed\n");
+		return -1;
+	}
+
+	if (argc < 4)
+	{
+		fprintf(stderr, "usage: mDNSPublish <name> <type> <port> [service text 1]...[service text n]\n");
+		return -1;
+	}
+
+	if (sw_text_record_init(&text_record) != SW_OKAY)
+	{
+		fprintf(stderr, "sw_text_record_init() failed\n");
+		return -1;
+	}
+
+	for (i = 4; i < argc; i++)
+	{
+		if (sw_text_record_add_string(text_record, argv[i]) != SW_OKAY)
+		{
+			fprintf(stderr, "unable to add service text: %s\n", argv[i]);
+			return -1;
+		}
+	}
+
+	printf("%s %s %d\n", argv[1], argv[2], atoi(argv[3]));
+
+	if ((result = sw_discovery_publish(discovery, 0, argv[1], argv[2], NULL, NULL, atoi(argv[3]), sw_text_record_bytes(text_record), sw_text_record_len(text_record), my_service_reply, NULL, &id)) != SW_OKAY)
+	{
+		fprintf(stderr, "publish failed: %d\n", result);
+		sw_text_record_fina(text_record);
+		return -1;
+	}
+
+	sw_text_record_fina(text_record);
+
+	sw_discovery_run(discovery);
+
+	return 0;
+}
diff --git a/avahi-0.6.31/avahi-compat-howl/samples/query.c b/avahi-0.6.31/avahi-compat-howl/samples/query.c
new file mode 100644
index 0000000..b1c30eb
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-howl/samples/query.c
@@ -0,0 +1,98 @@
+/*
+ * Copyright 2003, 2004, 2004 Porchdog Software. All rights reserved.
+ *
+ *	Redistribution and use in source and binary forms, with or without modification,
+ *	are permitted provided that the following conditions are met:
+ *
+ *		1. Redistributions of source code must retain the above copyright notice,
+ *		   this list of conditions and the following disclaimer.
+ *		2. Redistributions in binary form must reproduce the above copyright notice,
+ *		   this list of conditions and the following disclaimer in the documentation
+ *		   and/or other materials provided with the distribution.
+ *
+ *	THIS SOFTWARE IS PROVIDED BY PORCHDOG SOFTWARE ``AS IS'' AND ANY
+ *	EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ *	WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ *	IN NO EVENT SHALL THE HOWL PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ *	INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ *	BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ *	OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ *	OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ *	OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *	The views and conclusions contained in the software and documentation are those
+ *	of the authors and should not be interpreted as representing official policies,
+ *	either expressed or implied, of Porchdog Software.
+ */
+
+#include <howl.h>
+#include <salt/debug.h>
+#include <stdio.h>
+
+
+static sw_result HOWL_API
+query_record_reply(
+				sw_discovery								session,
+				sw_discovery_oid							oid,
+				sw_discovery_query_record_status		status,
+				sw_uint32									interface_index,
+				sw_const_string							fullname,
+				sw_uint16									rrtype,
+				sw_uint16									rrclass,
+				sw_uint16									rrdatalen,
+				sw_const_octets							rrdata,
+				sw_uint32									ttl,
+				sw_opaque									extra)
+{
+	sw_ipv4_address address;
+
+	fprintf(stderr, "interface index = 0x%x, fullname is %s\n", interface_index, fullname);
+
+	if ((rrtype == 1) && (rrclass == 1))
+	{
+		sw_ipv4_address	address;
+		sw_char				name[16];
+
+		sw_ipv4_address_init_from_saddr(&address, *(sw_saddr*) rrdata);
+
+		fprintf(stderr, "address is %s\n", sw_ipv4_address_name(address, name, sizeof(name)));
+	}
+
+	return SW_OKAY;
+}
+
+
+
+#if defined(WIN32)
+int __cdecl
+#else
+int
+#endif
+main(
+	int		argc,
+	char	**	argv)
+{
+	sw_discovery		discovery;
+	sw_discovery_oid	oid;
+	sw_result			err;
+
+	err = sw_discovery_init(&discovery);
+	sw_check_okay(err, exit);
+
+	if (argc != 4)
+	{
+		fprintf(stderr, "usage: mDNSBrowse <name> <rrtype> <rrclass>\n");
+		return -1;
+	}
+
+	err = sw_discovery_query_record(discovery, 0, 0, argv[1], atoi(argv[2]), atoi(argv[3]), query_record_reply, NULL, &oid);
+	sw_check_okay(err, exit);
+
+	err = sw_discovery_run(discovery);
+	sw_check_okay(err, exit);
+
+exit:
+
+	return err;
+}
diff --git a/avahi-0.6.31/avahi-compat-howl/samples/resolve.c b/avahi-0.6.31/avahi-compat-howl/samples/resolve.c
new file mode 100644
index 0000000..1790849
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-howl/samples/resolve.c
@@ -0,0 +1,111 @@
+/*
+ * Copyright 2003, 2004, 2004 Porchdog Software. All rights reserved.
+ *
+ *	Redistribution and use in source and binary forms, with or without modification,
+ *	are permitted provided that the following conditions are met:
+ *
+ *		1. Redistributions of source code must retain the above copyright notice,
+ *		   this list of conditions and the following disclaimer.
+ *		2. Redistributions in binary form must reproduce the above copyright notice,
+ *		   this list of conditions and the following disclaimer in the documentation
+ *		   and/or other materials provided with the distribution.
+ *
+ *	THIS SOFTWARE IS PROVIDED BY PORCHDOG SOFTWARE ``AS IS'' AND ANY
+ *	EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ *	WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ *	IN NO EVENT SHALL THE HOWL PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ *	INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ *	BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ *	OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ *	OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ *	OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *	The views and conclusions contained in the software and documentation are those
+ *	of the authors and should not be interpreted as representing official policies,
+ *	either expressed or implied, of Porchdog Software.
+ */
+
+#include <howl.h>
+#include <salt/debug.h>
+#include <stdio.h>
+
+
+static sw_result HOWL_API
+my_resolver(
+				sw_discovery			discovery,
+				sw_discovery_oid		oid,
+				sw_uint32				interface_index,
+				sw_const_string		name,
+				sw_const_string		type,
+				sw_const_string		domain,
+				sw_ipv4_address		address,
+				sw_port					port,
+				sw_octets				text_record,
+				sw_uint32				text_record_len,
+				sw_opaque_t				extra)
+{
+	sw_text_record_iterator				it;
+	sw_int8									name_buf[16];
+	sw_int8									key[SW_TEXT_RECORD_MAX_LEN];
+	sw_int8									sval[SW_TEXT_RECORD_MAX_LEN];
+	sw_uint8									oval[SW_TEXT_RECORD_MAX_LEN];
+	sw_uint32								oval_len;
+	sw_result								err = SW_OKAY;
+
+	sw_discovery_cancel(discovery, oid);
+
+	fprintf(stderr, "resolve reply: 0x%x %s %s %s %s %d\n", interface_index, name, type, domain, sw_ipv4_address_name(address, name_buf, 16), port);
+
+	if ((text_record_len > 0) && (text_record) && (*text_record != '\0'))
+	{
+		err = sw_text_record_iterator_init(&it, text_record, text_record_len);
+		sw_check_okay(err, exit);
+
+		while (sw_text_record_iterator_next(it, key, oval, &oval_len) == SW_OKAY)
+		{
+			fprintf(stderr, "key = %s, data is %d bytes\n", key, oval_len);
+		}
+
+		err = sw_text_record_iterator_fina(it);
+		sw_check_okay(err, exit);
+	}
+
+exit:
+
+	return err;
+}
+
+
+#if defined(WIN32)
+int __cdecl
+#else
+int
+#endif
+main(
+	int		argc,
+	char	**	argv)
+{
+	sw_discovery		discovery;
+	sw_discovery_oid	oid;
+	sw_result			err;
+
+	err = sw_discovery_init(&discovery);
+	sw_check_okay(err, exit);
+
+	if (argc != 3)
+	{
+		fprintf(stderr, "usage: mDNSResolve <name> <type>\n");
+		return -1;
+	}
+
+	err = sw_discovery_resolve(discovery, 0, argv[1], argv[2], "local.", my_resolver, NULL, &oid);
+	sw_check_okay(err, exit);
+
+	err = sw_discovery_run(discovery);
+	sw_check_okay(err, exit);
+
+exit:
+
+	return err;
+}
diff --git a/avahi-0.6.31/avahi-compat-howl/text-test.c b/avahi-0.6.31/avahi-compat-howl/text-test.c
new file mode 100644
index 0000000..66ff58b
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-howl/text-test.c
@@ -0,0 +1,97 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <assert.h>
+#include <stdio.h>
+
+#include <avahi-common/gccmacro.h>
+#include "howl.h"
+
+#define ASSERT_SW_OKAY(t) { sw_result _r; _r = (t); assert(_r == SW_OKAY); }
+#define ASSERT_NOT_NULL(t) { const void* _r; r = (t); assert(_r); }
+
+static void hexdump(const void* p, size_t size) {
+    const uint8_t *c = p;
+    assert(p);
+
+    printf("Dumping %zu bytes from %p:\n", size, p);
+
+    while (size > 0) {
+        unsigned i;
+
+        for (i = 0; i < 16; i++) {
+            if (i < size)
+                printf("%02x ", c[i]);
+            else
+                printf("   ");
+        }
+
+        for (i = 0; i < 16; i++) {
+            if (i < size)
+                printf("%c", c[i] >= 32 && c[i] < 127 ? c[i] : '.');
+            else
+                printf(" ");
+        }
+
+        printf("\n");
+
+        c += 16;
+
+        if (size <= 16)
+            break;
+
+        size -= 16;
+    }
+}
+
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
+    sw_text_record r;
+    sw_text_record_iterator it;
+    char key[255];
+    uint8_t val[255];
+    sw_ulong val_len;
+
+    ASSERT_SW_OKAY(sw_text_record_init(&r));
+    ASSERT_SW_OKAY(sw_text_record_add_string(r, "foo=bar"));
+    ASSERT_SW_OKAY(sw_text_record_add_string(r, "waldo=baz"));
+    ASSERT_SW_OKAY(sw_text_record_add_key_and_string_value(r, "quux", "nimpf"));
+    ASSERT_SW_OKAY(sw_text_record_add_key_and_binary_value(r, "quux", (void*) "\0\0\0\0", 4));
+
+    hexdump(sw_text_record_bytes(r), sw_text_record_len(r));
+
+    ASSERT_SW_OKAY(sw_text_record_iterator_init(&it, sw_text_record_bytes(r), sw_text_record_len(r)));
+
+    while (sw_text_record_iterator_next(it, key, val, &val_len) == SW_OKAY) {
+        printf("key=%s\n", key);
+        hexdump(val, val_len);
+    }
+
+    ASSERT_SW_OKAY(sw_text_record_iterator_fina(it));
+
+
+
+
+    ASSERT_SW_OKAY(sw_text_record_fina(r));
+
+    return 0;
+}
diff --git a/avahi-0.6.31/avahi-compat-howl/text.c b/avahi-0.6.31/avahi-compat-howl/text.c
new file mode 100644
index 0000000..7ef4df3
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-howl/text.c
@@ -0,0 +1,259 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <assert.h>
+
+#include <avahi-common/strlst.h>
+#include <avahi-common/malloc.h>
+#include <avahi-common/domain.h>
+
+#include "howl.h"
+#include "warn.h"
+
+struct _sw_text_record {
+    AvahiStringList *strlst;
+    uint8_t *buffer;
+    size_t buffer_size;
+    int buffer_valid;
+};
+
+#ifndef HAVE_STRLCPY
+
+static size_t strlcpy(char *dest, const char *src, size_t n) {
+    assert(dest);
+    assert(src);
+
+    if (n > 0) {
+        strncpy(dest, src, n-1);
+        dest[n-1] = 0;
+    }
+
+    return strlen(src);
+}
+
+#endif
+
+sw_result sw_text_record_init(sw_text_record *self) {
+    assert(self);
+
+    AVAHI_WARN_LINKAGE;
+
+    if (!(*self = avahi_new(struct _sw_text_record, 1))) {
+        *self = NULL;
+        return SW_E_UNKNOWN;
+    }
+
+    (*self)->strlst = NULL;
+    (*self)->buffer = NULL;
+    (*self)->buffer_size = 0;
+    (*self)->buffer_valid = 0;
+
+    return SW_OKAY;
+}
+
+sw_result sw_text_record_fina(sw_text_record self) {
+    assert(self);
+
+    AVAHI_WARN_LINKAGE;
+
+    avahi_string_list_free(self->strlst);
+    avahi_free(self->buffer);
+    avahi_free(self);
+    return SW_OKAY;
+}
+
+sw_result sw_text_record_add_string(
+    sw_text_record self,
+    sw_const_string string) {
+
+    AvahiStringList *n;
+
+    assert(self);
+    assert(string);
+
+    AVAHI_WARN_LINKAGE;
+
+    if (!(n = avahi_string_list_add(self->strlst, string)))
+        return SW_E_UNKNOWN;
+
+    self->strlst = n;
+    self->buffer_valid = 0;
+    return SW_OKAY;
+}
+
+sw_result sw_text_record_add_key_and_string_value(
+    sw_text_record self,
+    sw_const_string key,
+    sw_const_string val) {
+
+    AvahiStringList *n;
+
+    assert(self);
+    assert(key);
+
+    AVAHI_WARN_LINKAGE;
+
+    if (!(n = avahi_string_list_add_pair(self->strlst, key, val)))
+        return SW_E_UNKNOWN;
+
+    self->strlst = n;
+    self->buffer_valid = 0;
+    return SW_OKAY;
+}
+
+sw_result sw_text_record_add_key_and_binary_value(
+    sw_text_record self,
+    sw_const_string key,
+    sw_octets val,
+    sw_uint32 len) {
+
+    AvahiStringList *n;
+
+    assert(self);
+    assert(key);
+    assert(len || !val);
+
+    AVAHI_WARN_LINKAGE;
+
+    if (!(n = avahi_string_list_add_pair_arbitrary(self->strlst, key, val, len)))
+        return SW_E_UNKNOWN;
+
+    self->strlst = n;
+    self->buffer_valid = 0;
+    return SW_OKAY;
+}
+
+static int rebuild(sw_text_record self) {
+    assert(self);
+
+    if (self->buffer_valid)
+        return 0;
+
+    self->buffer_size = avahi_string_list_serialize(self->strlst, NULL, 0);
+
+    if (!(self->buffer = avahi_realloc(self->buffer, self->buffer_size + 1)))
+        return -1;
+
+    avahi_string_list_serialize(self->strlst, self->buffer, self->buffer_size);
+    self->buffer_valid = 1;
+
+    return 0;
+}
+
+sw_octets sw_text_record_bytes(sw_text_record self) {
+    assert(self);
+
+    AVAHI_WARN_LINKAGE;
+
+    if (rebuild(self) < 0)
+        return NULL;
+
+    return self->buffer;
+}
+
+sw_uint32 sw_text_record_len(sw_text_record self) {
+    assert(self);
+
+    AVAHI_WARN_LINKAGE;
+
+    if (rebuild(self) < 0)
+        return (uint32_t) -1;
+
+    return self->buffer_size;
+}
+
+struct _sw_text_record_iterator {
+    AvahiStringList *strlst, *index;
+
+};
+
+sw_result sw_text_record_iterator_init(
+    sw_text_record_iterator * self,
+    sw_octets text_record,
+    sw_uint32 text_record_len) {
+
+    AvahiStringList *txt;
+    assert(self);
+
+    AVAHI_WARN_LINKAGE;
+
+    if (!(*self = avahi_new(struct _sw_text_record_iterator, 1))) {
+        *self = NULL;
+        return SW_E_UNKNOWN;
+    }
+
+    if (avahi_string_list_parse(text_record, text_record_len, &txt) < 0) {
+        avahi_free(*self);
+        *self = NULL;
+        return SW_E_UNKNOWN;
+    }
+
+    (*self)->index = (*self)->strlst = avahi_string_list_reverse(txt);
+
+    return SW_OKAY;
+}
+
+sw_result sw_text_record_iterator_fina(sw_text_record_iterator self) {
+    assert(self);
+
+    AVAHI_WARN_LINKAGE;
+
+    avahi_string_list_free(self->strlst);
+    avahi_free(self);
+
+    return SW_OKAY;
+}
+
+sw_result sw_text_record_iterator_next(
+    sw_text_record_iterator self,
+    char key[SW_TEXT_RECORD_MAX_LEN],
+    sw_uint8 val[SW_TEXT_RECORD_MAX_LEN],
+    sw_uint32 * val_len) {
+
+    char *mkey = NULL, *mvalue = NULL;
+    size_t msize = 0;
+
+    assert(self);
+    assert(key);
+
+    AVAHI_WARN_LINKAGE;
+
+    if (!self->index)
+        return SW_E_UNKNOWN;
+
+    if (avahi_string_list_get_pair(self->index, &mkey, &mvalue, &msize) < 0)
+        return SW_E_UNKNOWN;
+
+    strlcpy(key, mkey, SW_TEXT_RECORD_MAX_LEN);
+    memset(val, 0, SW_TEXT_RECORD_MAX_LEN);
+    memcpy(val, mvalue, msize);
+    *val_len = msize;
+
+    avahi_free(mkey);
+    avahi_free(mvalue);
+
+    self->index = self->index->next;
+
+    return SW_OKAY;
+}
+
diff --git a/avahi-0.6.31/avahi-compat-howl/unsupported.c b/avahi-0.6.31/avahi-compat-howl/unsupported.c
new file mode 100644
index 0000000..ff440af
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-howl/unsupported.c
@@ -0,0 +1,1019 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <avahi-common/gccmacro.h>
+
+#include "howl.h"
+#include "warn.h"
+
+AVAHI_GCC_NORETURN
+sw_string sw_strdup(AVAHI_GCC_UNUSED sw_const_string str) {
+    AVAHI_WARN_UNSUPPORTED_ABORT;
+}
+
+AVAHI_GCC_NORETURN
+sw_opaque _sw_debug_malloc(
+    AVAHI_GCC_UNUSED sw_size_t size,
+    AVAHI_GCC_UNUSED sw_const_string function,
+    AVAHI_GCC_UNUSED sw_const_string file,
+    AVAHI_GCC_UNUSED sw_uint32 line) {
+    AVAHI_WARN_UNSUPPORTED_ABORT;
+}
+
+AVAHI_GCC_NORETURN
+sw_opaque _sw_debug_realloc(
+    AVAHI_GCC_UNUSED sw_opaque_t mem,
+    AVAHI_GCC_UNUSED sw_size_t size,
+    AVAHI_GCC_UNUSED sw_const_string function,
+    AVAHI_GCC_UNUSED sw_const_string file,
+    AVAHI_GCC_UNUSED sw_uint32 line) {
+    AVAHI_WARN_UNSUPPORTED_ABORT;
+}
+
+void _sw_debug_free(
+    AVAHI_GCC_UNUSED sw_opaque_t mem,
+    AVAHI_GCC_UNUSED sw_const_string function,
+    AVAHI_GCC_UNUSED sw_const_string file,
+    AVAHI_GCC_UNUSED sw_uint32 line) {
+    AVAHI_WARN_UNSUPPORTED;
+}
+
+AVAHI_GCC_NORETURN
+sw_const_string sw_strerror(/* howl sucks */) {
+    AVAHI_WARN_UNSUPPORTED_ABORT;
+}
+
+sw_result sw_timer_init(AVAHI_GCC_UNUSED sw_timer * self) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_timer_fina(AVAHI_GCC_UNUSED sw_timer self) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_time_init(AVAHI_GCC_UNUSED sw_time * self) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_time_init_now(AVAHI_GCC_UNUSED sw_time * self) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_time_fina(AVAHI_GCC_UNUSED sw_time self) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+AVAHI_GCC_NORETURN
+sw_time sw_time_add(
+    AVAHI_GCC_UNUSED sw_time self,
+    AVAHI_GCC_UNUSED sw_time y) {
+    AVAHI_WARN_UNSUPPORTED_ABORT;
+}
+
+AVAHI_GCC_NORETURN
+sw_time sw_time_sub(
+    AVAHI_GCC_UNUSED sw_time self,
+    AVAHI_GCC_UNUSED sw_time y) {
+    AVAHI_WARN_UNSUPPORTED_ABORT;
+}
+
+AVAHI_GCC_NORETURN
+sw_int32 sw_time_cmp(
+    AVAHI_GCC_UNUSED sw_time self,
+    AVAHI_GCC_UNUSED sw_time y) {
+    AVAHI_WARN_UNSUPPORTED_ABORT;
+}
+
+sw_result sw_salt_init(
+    AVAHI_GCC_UNUSED sw_salt * self,
+    AVAHI_GCC_UNUSED int argc,
+    AVAHI_GCC_UNUSED char ** argv) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_salt_fina(AVAHI_GCC_UNUSED sw_salt self) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_salt_register_socket(
+    AVAHI_GCC_UNUSED sw_salt self,
+    AVAHI_GCC_UNUSED struct _sw_socket * _socket,
+    AVAHI_GCC_UNUSED sw_socket_event events,
+    AVAHI_GCC_UNUSED sw_socket_handler handler,
+    AVAHI_GCC_UNUSED sw_socket_handler_func func,
+    AVAHI_GCC_UNUSED sw_opaque extra) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_salt_unregister_socket(
+    AVAHI_GCC_UNUSED sw_salt self,
+    AVAHI_GCC_UNUSED struct _sw_socket * _socket) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+
+sw_result sw_salt_register_timer(
+    AVAHI_GCC_UNUSED sw_salt self,
+    AVAHI_GCC_UNUSED struct _sw_timer * timer,
+    AVAHI_GCC_UNUSED sw_time timeout,
+    AVAHI_GCC_UNUSED sw_timer_handler handler,
+    AVAHI_GCC_UNUSED sw_timer_handler_func func,
+    AVAHI_GCC_UNUSED sw_opaque extra) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_salt_unregister_timer(
+    AVAHI_GCC_UNUSED sw_salt self,
+    AVAHI_GCC_UNUSED struct _sw_timer * timer) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_salt_register_network_interface(
+    AVAHI_GCC_UNUSED sw_salt self,
+    AVAHI_GCC_UNUSED struct _sw_network_interface * netif,
+    AVAHI_GCC_UNUSED sw_network_interface_handler handler,
+    AVAHI_GCC_UNUSED sw_network_interface_handler_func func,
+    AVAHI_GCC_UNUSED sw_opaque extra) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_salt_unregister_network_interface_handler(AVAHI_GCC_UNUSED sw_salt self) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_salt_register_signal(
+    AVAHI_GCC_UNUSED sw_salt self,
+    AVAHI_GCC_UNUSED struct _sw_signal * _signal,
+    AVAHI_GCC_UNUSED sw_signal_handler handler,
+    AVAHI_GCC_UNUSED sw_signal_handler_func func,
+    AVAHI_GCC_UNUSED sw_opaque extra) {
+
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_salt_unregister_signal(
+    AVAHI_GCC_UNUSED sw_salt self,
+    AVAHI_GCC_UNUSED struct _sw_signal * _signal) {
+
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+void sw_print_assert(
+    AVAHI_GCC_UNUSED int code,
+    AVAHI_GCC_UNUSED sw_const_string assert_string,
+    AVAHI_GCC_UNUSED sw_const_string file,
+    AVAHI_GCC_UNUSED sw_const_string func,
+    AVAHI_GCC_UNUSED int line) {
+    AVAHI_WARN_UNSUPPORTED;
+}
+
+void sw_print_debug(
+    AVAHI_GCC_UNUSED int level,
+    AVAHI_GCC_UNUSED sw_const_string format,
+    ...) {
+    AVAHI_WARN_UNSUPPORTED;
+}
+
+sw_result sw_tcp_socket_init(AVAHI_GCC_UNUSED sw_socket * self) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_tcp_socket_init_with_desc(
+    AVAHI_GCC_UNUSED sw_socket * self,
+    AVAHI_GCC_UNUSED sw_sockdesc_t desc) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_udp_socket_init(AVAHI_GCC_UNUSED sw_socket * self) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_multicast_socket_init(AVAHI_GCC_UNUSED sw_socket * self) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_socket_fina(AVAHI_GCC_UNUSED sw_socket self) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_socket_bind(
+    AVAHI_GCC_UNUSED sw_socket self,
+    AVAHI_GCC_UNUSED sw_ipv4_address address,
+    AVAHI_GCC_UNUSED sw_port port) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_socket_join_multicast_group(
+    AVAHI_GCC_UNUSED sw_socket self,
+    AVAHI_GCC_UNUSED sw_ipv4_address local_address,
+    AVAHI_GCC_UNUSED sw_ipv4_address multicast_address,
+    AVAHI_GCC_UNUSED sw_uint32 ttl) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_socket_leave_multicast_group(AVAHI_GCC_UNUSED sw_socket self) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_socket_listen(
+    AVAHI_GCC_UNUSED sw_socket self,
+    AVAHI_GCC_UNUSED int qsize) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_socket_connect(
+    AVAHI_GCC_UNUSED sw_socket self,
+    AVAHI_GCC_UNUSED sw_ipv4_address address,
+    AVAHI_GCC_UNUSED sw_port port) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_socket_accept(
+    AVAHI_GCC_UNUSED sw_socket self,
+    AVAHI_GCC_UNUSED sw_socket * _socket) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_socket_send(
+    AVAHI_GCC_UNUSED sw_socket self,
+    AVAHI_GCC_UNUSED sw_octets buffer,
+    AVAHI_GCC_UNUSED sw_size_t len,
+    AVAHI_GCC_UNUSED sw_size_t * bytesWritten) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_socket_sendto(
+    AVAHI_GCC_UNUSED sw_socket self,
+    AVAHI_GCC_UNUSED sw_octets buffer,
+    AVAHI_GCC_UNUSED sw_size_t len,
+    AVAHI_GCC_UNUSED sw_size_t * bytesWritten,
+    AVAHI_GCC_UNUSED sw_ipv4_address to,
+    AVAHI_GCC_UNUSED sw_port port) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_socket_recv(
+    AVAHI_GCC_UNUSED sw_socket self,
+    AVAHI_GCC_UNUSED sw_octets buffer,
+    AVAHI_GCC_UNUSED sw_size_t max,
+    AVAHI_GCC_UNUSED sw_size_t * len) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_socket_recvfrom(
+    AVAHI_GCC_UNUSED sw_socket self,
+    AVAHI_GCC_UNUSED sw_octets buffer,
+    AVAHI_GCC_UNUSED sw_size_t max,
+    AVAHI_GCC_UNUSED sw_size_t * len,
+    AVAHI_GCC_UNUSED sw_ipv4_address * from,
+    AVAHI_GCC_UNUSED sw_port * port,
+    AVAHI_GCC_UNUSED sw_ipv4_address * dest,
+    AVAHI_GCC_UNUSED sw_uint32 * interface_index) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_socket_set_blocking_mode(
+    AVAHI_GCC_UNUSED sw_socket self,
+    AVAHI_GCC_UNUSED sw_bool blocking_mode) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_socket_set_options(
+    AVAHI_GCC_UNUSED sw_socket self,
+    AVAHI_GCC_UNUSED sw_socket_options options) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+AVAHI_GCC_NORETURN
+sw_ipv4_address sw_socket_ipv4_address(AVAHI_GCC_UNUSED sw_socket self) {
+    AVAHI_WARN_UNSUPPORTED_ABORT;
+}
+
+AVAHI_GCC_NORETURN
+sw_port sw_socket_port(AVAHI_GCC_UNUSED sw_socket self) {
+    AVAHI_WARN_UNSUPPORTED_ABORT;
+}
+
+AVAHI_GCC_NORETURN
+sw_sockdesc_t sw_socket_desc(AVAHI_GCC_UNUSED sw_socket self) {
+    AVAHI_WARN_UNSUPPORTED_ABORT;
+}
+
+sw_result sw_socket_close(AVAHI_GCC_UNUSED sw_socket self) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_socket_options_init(AVAHI_GCC_UNUSED sw_socket_options * self) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_socket_options_fina(AVAHI_GCC_UNUSED sw_socket_options self) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_socket_options_set_debug(
+    AVAHI_GCC_UNUSED sw_socket_options self,
+    AVAHI_GCC_UNUSED sw_bool val) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_socket_options_set_nodelay(
+    AVAHI_GCC_UNUSED sw_socket_options self,
+    AVAHI_GCC_UNUSED sw_bool val) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_socket_options_set_dontroute(
+    AVAHI_GCC_UNUSED sw_socket_options self,
+    AVAHI_GCC_UNUSED sw_bool val) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_socket_options_set_keepalive(
+    AVAHI_GCC_UNUSED sw_socket_options self,
+    AVAHI_GCC_UNUSED sw_bool val) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_socket_options_set_linger(
+    AVAHI_GCC_UNUSED sw_socket_options self,
+    AVAHI_GCC_UNUSED sw_bool onoff,
+    AVAHI_GCC_UNUSED sw_uint32 linger) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_socket_options_set_reuseaddr(
+    AVAHI_GCC_UNUSED sw_socket_options self,
+    AVAHI_GCC_UNUSED sw_bool val) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_socket_options_set_rcvbuf(
+    AVAHI_GCC_UNUSED sw_socket_options self,
+    AVAHI_GCC_UNUSED sw_uint32 val) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_socket_options_set_sndbuf(
+    AVAHI_GCC_UNUSED sw_socket_options self,
+    AVAHI_GCC_UNUSED sw_uint32 val) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+AVAHI_GCC_NORETURN
+int sw_socket_error_code(void) {
+    AVAHI_WARN_UNSUPPORTED_ABORT;
+}
+
+sw_result sw_corby_orb_init(
+    AVAHI_GCC_UNUSED sw_corby_orb * self,
+    AVAHI_GCC_UNUSED sw_salt salt,
+    AVAHI_GCC_UNUSED const sw_corby_orb_config * config,
+    AVAHI_GCC_UNUSED sw_corby_orb_observer observer,
+    AVAHI_GCC_UNUSED sw_corby_orb_observer_func func,
+    AVAHI_GCC_UNUSED sw_opaque_t extra) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_orb_fina(AVAHI_GCC_UNUSED sw_corby_orb self) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_orb_register_servant(
+    AVAHI_GCC_UNUSED sw_corby_orb self,
+    AVAHI_GCC_UNUSED sw_corby_servant servant,
+    AVAHI_GCC_UNUSED sw_corby_servant_cb cb,
+    AVAHI_GCC_UNUSED sw_const_string oid,
+    AVAHI_GCC_UNUSED struct _sw_corby_object ** object,
+    AVAHI_GCC_UNUSED sw_const_string protocol_name) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_orb_unregister_servant(
+    AVAHI_GCC_UNUSED sw_corby_orb self,
+    AVAHI_GCC_UNUSED sw_const_string oid) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_orb_register_bidirectional_object(
+    AVAHI_GCC_UNUSED sw_corby_orb self,
+    AVAHI_GCC_UNUSED struct _sw_corby_object * object) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_orb_register_channel(
+    AVAHI_GCC_UNUSED sw_corby_orb self,
+    AVAHI_GCC_UNUSED struct _sw_corby_channel * channel) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+AVAHI_GCC_NORETURN
+sw_corby_orb_delegate sw_corby_orb_get_delegate(AVAHI_GCC_UNUSED sw_corby_orb self) {
+    AVAHI_WARN_UNSUPPORTED_ABORT;
+}
+
+sw_result sw_corby_orb_set_delegate(
+    AVAHI_GCC_UNUSED sw_corby_orb self,
+    AVAHI_GCC_UNUSED sw_corby_orb_delegate delegate) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_orb_set_observer(
+    AVAHI_GCC_UNUSED sw_corby_orb self,
+    AVAHI_GCC_UNUSED sw_corby_orb_observer observer,
+    AVAHI_GCC_UNUSED sw_corby_orb_observer_func func,
+    AVAHI_GCC_UNUSED sw_opaque_t extra) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_orb_protocol_to_address(
+    AVAHI_GCC_UNUSED sw_corby_orb self,
+    AVAHI_GCC_UNUSED sw_const_string tag,
+    AVAHI_GCC_UNUSED sw_string addr,
+    AVAHI_GCC_UNUSED sw_port * port) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_orb_protocol_to_url(
+    AVAHI_GCC_UNUSED sw_corby_orb self,
+    AVAHI_GCC_UNUSED sw_const_string tag,
+    AVAHI_GCC_UNUSED sw_const_string name,
+    AVAHI_GCC_UNUSED sw_string url,
+    AVAHI_GCC_UNUSED sw_size_t url_len) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_orb_read_channel(
+    AVAHI_GCC_UNUSED sw_corby_orb self,
+    AVAHI_GCC_UNUSED struct _sw_corby_channel * channel) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_orb_dispatch_message(
+    AVAHI_GCC_UNUSED sw_corby_orb self,
+    AVAHI_GCC_UNUSED struct _sw_corby_channel * channel,
+    AVAHI_GCC_UNUSED struct _sw_corby_message * message,
+    AVAHI_GCC_UNUSED struct _sw_corby_buffer * buffer,
+    AVAHI_GCC_UNUSED sw_uint8 endian) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_message_init(AVAHI_GCC_UNUSED sw_corby_message * self) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_message_fina(AVAHI_GCC_UNUSED sw_corby_message self) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_buffer_init(AVAHI_GCC_UNUSED sw_corby_buffer * self) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_buffer_init_with_size(
+    AVAHI_GCC_UNUSED sw_corby_buffer * self,
+    AVAHI_GCC_UNUSED sw_size_t size) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_buffer_init_with_delegate(
+    AVAHI_GCC_UNUSED sw_corby_buffer * self,
+    AVAHI_GCC_UNUSED sw_corby_buffer_delegate delegate,
+    AVAHI_GCC_UNUSED sw_corby_buffer_overflow_func overflow,
+    AVAHI_GCC_UNUSED sw_corby_buffer_underflow_func underflow,
+    AVAHI_GCC_UNUSED sw_opaque_t extra) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_buffer_init_with_size_and_delegate(
+    AVAHI_GCC_UNUSED sw_corby_buffer * self,
+    AVAHI_GCC_UNUSED sw_size_t size,
+    AVAHI_GCC_UNUSED sw_corby_buffer_delegate delegate,
+    AVAHI_GCC_UNUSED sw_corby_buffer_overflow_func overflow,
+    AVAHI_GCC_UNUSED sw_corby_buffer_underflow_func underflow,
+    AVAHI_GCC_UNUSED sw_opaque_t extra) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_buffer_fina(AVAHI_GCC_UNUSED sw_corby_buffer self) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+void sw_corby_buffer_reset(AVAHI_GCC_UNUSED sw_corby_buffer self) {
+    AVAHI_WARN_UNSUPPORTED;
+}
+
+sw_result sw_corby_buffer_set_octets(
+    AVAHI_GCC_UNUSED sw_corby_buffer self,
+    AVAHI_GCC_UNUSED sw_octets octets,
+    AVAHI_GCC_UNUSED sw_size_t size) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_octets sw_corby_buffer_octets(AVAHI_GCC_UNUSED sw_corby_buffer self) {
+    AVAHI_WARN_UNSUPPORTED;
+    return NULL;
+}
+
+sw_size_t sw_corby_buffer_bytes_used(AVAHI_GCC_UNUSED sw_corby_buffer self) {
+    AVAHI_WARN_UNSUPPORTED;
+    return 0;
+}
+
+sw_size_t sw_corby_buffer_size(AVAHI_GCC_UNUSED sw_corby_buffer self) {
+    AVAHI_WARN_UNSUPPORTED;
+    return 0;
+}
+
+sw_result sw_corby_buffer_put_int8(
+    AVAHI_GCC_UNUSED sw_corby_buffer self,
+    AVAHI_GCC_UNUSED sw_int8 val) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_buffer_put_uint8(
+    AVAHI_GCC_UNUSED sw_corby_buffer self,
+    AVAHI_GCC_UNUSED sw_uint8 val) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_buffer_put_int16(
+    AVAHI_GCC_UNUSED sw_corby_buffer self,
+    AVAHI_GCC_UNUSED sw_int16 val) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_buffer_put_uint16(
+    AVAHI_GCC_UNUSED sw_corby_buffer self,
+    AVAHI_GCC_UNUSED sw_uint16 val) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_buffer_put_int32(
+    AVAHI_GCC_UNUSED sw_corby_buffer self,
+    AVAHI_GCC_UNUSED sw_int32 val) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_buffer_put_uint32(
+    AVAHI_GCC_UNUSED sw_corby_buffer self,
+    AVAHI_GCC_UNUSED sw_uint32 val) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_buffer_put_octets(
+    AVAHI_GCC_UNUSED sw_corby_buffer self,
+    AVAHI_GCC_UNUSED sw_const_octets val,
+    AVAHI_GCC_UNUSED sw_size_t size) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_buffer_put_sized_octets(
+    AVAHI_GCC_UNUSED sw_corby_buffer self,
+    AVAHI_GCC_UNUSED sw_const_octets val,
+    AVAHI_GCC_UNUSED sw_uint32 len) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_buffer_put_cstring(
+    AVAHI_GCC_UNUSED sw_corby_buffer self,
+    AVAHI_GCC_UNUSED sw_const_string val) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_buffer_put_object(
+    AVAHI_GCC_UNUSED sw_corby_buffer self,
+    AVAHI_GCC_UNUSED const struct _sw_corby_object * object) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_buffer_put_pad(
+    AVAHI_GCC_UNUSED sw_corby_buffer self,
+    AVAHI_GCC_UNUSED sw_corby_buffer_pad pad) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_buffer_get_int8(
+    AVAHI_GCC_UNUSED sw_corby_buffer self,
+    AVAHI_GCC_UNUSED sw_int8 * val) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_buffer_get_uint8(
+    AVAHI_GCC_UNUSED sw_corby_buffer self,
+    AVAHI_GCC_UNUSED sw_uint8 * val) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_buffer_get_int16(
+    AVAHI_GCC_UNUSED sw_corby_buffer self,
+    AVAHI_GCC_UNUSED sw_int16 * val,
+    AVAHI_GCC_UNUSED sw_uint8 endian) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_buffer_get_uint16(
+    AVAHI_GCC_UNUSED sw_corby_buffer self,
+    AVAHI_GCC_UNUSED sw_uint16 * val,
+    AVAHI_GCC_UNUSED sw_uint8 endian) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_buffer_get_int32(
+    AVAHI_GCC_UNUSED sw_corby_buffer self,
+    AVAHI_GCC_UNUSED sw_int32 * val,
+    AVAHI_GCC_UNUSED sw_uint8 endian) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_buffer_get_uint32(
+    AVAHI_GCC_UNUSED sw_corby_buffer self,
+    AVAHI_GCC_UNUSED sw_uint32 * val,
+    AVAHI_GCC_UNUSED sw_uint8 endian) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_buffer_get_octets(
+    AVAHI_GCC_UNUSED sw_corby_buffer self,
+    AVAHI_GCC_UNUSED sw_octets octets,
+    AVAHI_GCC_UNUSED sw_size_t size) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_buffer_allocate_and_get_sized_octets(
+    AVAHI_GCC_UNUSED sw_corby_buffer self,
+    AVAHI_GCC_UNUSED sw_octets * val,
+    AVAHI_GCC_UNUSED sw_uint32 * size,
+    AVAHI_GCC_UNUSED sw_uint8 endian) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_buffer_get_zerocopy_sized_octets(
+    AVAHI_GCC_UNUSED sw_corby_buffer self,
+    AVAHI_GCC_UNUSED sw_octets * val,
+    AVAHI_GCC_UNUSED sw_uint32 * size,
+    AVAHI_GCC_UNUSED sw_uint8 endian) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_buffer_get_sized_octets(
+    AVAHI_GCC_UNUSED sw_corby_buffer self,
+    AVAHI_GCC_UNUSED sw_octets val,
+    AVAHI_GCC_UNUSED sw_uint32 * len,
+    AVAHI_GCC_UNUSED sw_uint8 endian) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_buffer_allocate_and_get_cstring(
+    AVAHI_GCC_UNUSED sw_corby_buffer self,
+    AVAHI_GCC_UNUSED sw_string * val,
+    AVAHI_GCC_UNUSED sw_uint32 * len,
+    AVAHI_GCC_UNUSED sw_uint8 endian) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_buffer_get_zerocopy_cstring(
+    AVAHI_GCC_UNUSED sw_corby_buffer self,
+    AVAHI_GCC_UNUSED sw_string * val,
+    AVAHI_GCC_UNUSED sw_uint32 * len,
+    AVAHI_GCC_UNUSED sw_uint8 endian) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_buffer_get_cstring(
+    AVAHI_GCC_UNUSED sw_corby_buffer self,
+    AVAHI_GCC_UNUSED sw_string val,
+    AVAHI_GCC_UNUSED sw_uint32 * len,
+    AVAHI_GCC_UNUSED sw_uint8 endian) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_buffer_get_object(
+    AVAHI_GCC_UNUSED sw_corby_buffer self,
+    AVAHI_GCC_UNUSED struct _sw_corby_object ** object,
+    AVAHI_GCC_UNUSED sw_uint8 endian) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_channel_start_request(
+    AVAHI_GCC_UNUSED sw_corby_channel self,
+    AVAHI_GCC_UNUSED sw_const_corby_profile profile,
+    AVAHI_GCC_UNUSED struct _sw_corby_buffer ** buffer,
+    AVAHI_GCC_UNUSED sw_const_string op,
+    AVAHI_GCC_UNUSED sw_uint32 oplen,
+    AVAHI_GCC_UNUSED sw_bool reply_expected) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_channel_start_reply(
+    AVAHI_GCC_UNUSED sw_corby_channel self,
+    AVAHI_GCC_UNUSED struct _sw_corby_buffer ** buffer,
+    AVAHI_GCC_UNUSED sw_uint32 request_id,
+    AVAHI_GCC_UNUSED sw_corby_reply_status status) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_channel_send(
+    AVAHI_GCC_UNUSED sw_corby_channel self,
+    AVAHI_GCC_UNUSED struct _sw_corby_buffer * buffer,
+    AVAHI_GCC_UNUSED sw_corby_buffer_observer observer,
+    AVAHI_GCC_UNUSED sw_corby_buffer_written_func func,
+    AVAHI_GCC_UNUSED sw_opaque_t extra) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_channel_recv(
+    AVAHI_GCC_UNUSED sw_corby_channel self,
+    AVAHI_GCC_UNUSED sw_salt * salt,
+    AVAHI_GCC_UNUSED struct _sw_corby_message ** message,
+    AVAHI_GCC_UNUSED sw_uint32 * request_id,
+    AVAHI_GCC_UNUSED sw_string * op,
+    AVAHI_GCC_UNUSED sw_uint32 * op_len,
+    AVAHI_GCC_UNUSED struct _sw_corby_buffer ** buffer,
+    AVAHI_GCC_UNUSED sw_uint8 * endian,
+    AVAHI_GCC_UNUSED sw_bool block) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_channel_last_recv_from(
+    AVAHI_GCC_UNUSED sw_corby_channel self,
+    AVAHI_GCC_UNUSED sw_ipv4_address * from,
+    AVAHI_GCC_UNUSED sw_port * from_port) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_channel_ff(
+    AVAHI_GCC_UNUSED sw_corby_channel self,
+    AVAHI_GCC_UNUSED struct _sw_corby_buffer * buffer) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+AVAHI_GCC_NORETURN
+sw_socket sw_corby_channel_socket(AVAHI_GCC_UNUSED sw_corby_channel self) {
+    AVAHI_WARN_UNSUPPORTED_ABORT;
+}
+
+sw_result sw_corby_channel_retain(AVAHI_GCC_UNUSED sw_corby_channel self) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_channel_set_delegate(
+    AVAHI_GCC_UNUSED sw_corby_channel self,
+    AVAHI_GCC_UNUSED sw_corby_channel_delegate delegate) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+AVAHI_GCC_NORETURN
+sw_corby_channel_delegate sw_corby_channel_get_delegate(
+    AVAHI_GCC_UNUSED sw_corby_channel self) {
+    AVAHI_WARN_UNSUPPORTED_ABORT;
+}
+
+void sw_corby_channel_set_app_data(
+    AVAHI_GCC_UNUSED sw_corby_channel self,
+    AVAHI_GCC_UNUSED sw_opaque app_data) {
+    AVAHI_WARN_UNSUPPORTED;
+}
+
+AVAHI_GCC_NORETURN
+sw_opaque sw_corby_channel_get_app_data(AVAHI_GCC_UNUSED sw_corby_channel self) {
+    AVAHI_WARN_UNSUPPORTED_ABORT;
+}
+
+sw_result sw_corby_channel_fina(AVAHI_GCC_UNUSED sw_corby_channel self) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_object_init_from_url(
+    AVAHI_GCC_UNUSED sw_corby_object * self,
+    AVAHI_GCC_UNUSED struct _sw_corby_orb * orb,
+    AVAHI_GCC_UNUSED sw_const_string url,
+    AVAHI_GCC_UNUSED sw_socket_options options,
+    AVAHI_GCC_UNUSED sw_uint32 bufsize) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_object_fina(
+    AVAHI_GCC_UNUSED sw_corby_object self) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_object_start_request(
+    AVAHI_GCC_UNUSED sw_corby_object self,
+    AVAHI_GCC_UNUSED sw_const_string op,
+    AVAHI_GCC_UNUSED sw_uint32 op_len,
+    AVAHI_GCC_UNUSED sw_bool reply_expected,
+    AVAHI_GCC_UNUSED sw_corby_buffer * buffer) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_object_send(
+    AVAHI_GCC_UNUSED sw_corby_object self,
+    AVAHI_GCC_UNUSED sw_corby_buffer buffer,
+    AVAHI_GCC_UNUSED sw_corby_buffer_observer observer,
+    AVAHI_GCC_UNUSED sw_corby_buffer_written_func func,
+    AVAHI_GCC_UNUSED sw_opaque extra) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_object_recv(
+    AVAHI_GCC_UNUSED sw_corby_object self,
+    AVAHI_GCC_UNUSED sw_corby_message * message,
+    AVAHI_GCC_UNUSED sw_corby_buffer * buffer,
+    AVAHI_GCC_UNUSED sw_uint8 * endian,
+    AVAHI_GCC_UNUSED sw_bool block) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_object_channel(
+    AVAHI_GCC_UNUSED sw_corby_object self,
+    AVAHI_GCC_UNUSED sw_corby_channel * channel) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_corby_object_set_channel(
+    AVAHI_GCC_UNUSED sw_corby_object self,
+    AVAHI_GCC_UNUSED sw_corby_channel channel) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_discovery_publish_host(
+    AVAHI_GCC_UNUSED sw_discovery self,
+    AVAHI_GCC_UNUSED sw_uint32 interface_index,
+    AVAHI_GCC_UNUSED sw_const_string name,
+    AVAHI_GCC_UNUSED sw_const_string domain,
+    AVAHI_GCC_UNUSED sw_ipv4_address address,
+    AVAHI_GCC_UNUSED sw_discovery_publish_reply reply,
+    AVAHI_GCC_UNUSED sw_opaque extra,
+    AVAHI_GCC_UNUSED sw_discovery_oid * oid) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_discovery_publish_update(
+    AVAHI_GCC_UNUSED sw_discovery self,
+    AVAHI_GCC_UNUSED sw_discovery_oid oid,
+    AVAHI_GCC_UNUSED sw_octets text_record,
+    AVAHI_GCC_UNUSED sw_uint32 text_record_len) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_discovery_query_record(
+    AVAHI_GCC_UNUSED sw_discovery self,
+    AVAHI_GCC_UNUSED sw_uint32 interface_index,
+    AVAHI_GCC_UNUSED sw_uint32 flags,
+    AVAHI_GCC_UNUSED sw_const_string fullname,
+    AVAHI_GCC_UNUSED sw_uint16 rrtype,
+    AVAHI_GCC_UNUSED sw_uint16 rrclass,
+    AVAHI_GCC_UNUSED sw_discovery_query_record_reply reply,
+    AVAHI_GCC_UNUSED sw_opaque extra,
+    AVAHI_GCC_UNUSED sw_discovery_oid * oid) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_text_record_string_iterator_init(
+    AVAHI_GCC_UNUSED sw_text_record_string_iterator * self,
+    AVAHI_GCC_UNUSED sw_const_string text_record_string) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_text_record_string_iterator_fina(
+    AVAHI_GCC_UNUSED sw_text_record_string_iterator self) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
+
+sw_result sw_text_record_string_iterator_next(
+    AVAHI_GCC_UNUSED sw_text_record_string_iterator self,
+    AVAHI_GCC_UNUSED char key[255],
+    AVAHI_GCC_UNUSED char val[255]) {
+    AVAHI_WARN_UNSUPPORTED;
+    return SW_E_NO_IMPL;
+}
diff --git a/avahi-0.6.31/avahi-compat-howl/warn.c b/avahi-0.6.31/avahi-compat-howl/warn.c
new file mode 100644
index 0000000..235bb59
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-howl/warn.c
@@ -0,0 +1,29 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "warn.h"
+
+#define COMPAT_LAYER "HOWL"
+#define CGI_SUBSYSTEM "howl"
+
+#include "../avahi-compat-libdns_sd/warn.c"
diff --git a/avahi-0.6.31/avahi-compat-howl/warn.h b/avahi-0.6.31/avahi-compat-howl/warn.h
new file mode 100644
index 0000000..04bd0ed
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-howl/warn.h
@@ -0,0 +1,33 @@
+#ifndef foowarnhhowlfoo
+#define foowarnhhowlfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+/* To avoid symbol name clashes when a process links to both our
+ * compatiblity layers, we move the symbols out of the way here */
+
+#define avahi_warn_unsupported avahi_warn_unsupported_HOWL
+#define avahi_warn_linkage avahi_warn_linkage_HOWL
+#define avahi_warn avahi_warn_HOWL
+#define avahi_exe_name avahi_exe_name_HOWL
+
+#include "../avahi-compat-libdns_sd/warn.h"
+
+#endif
diff --git a/avahi-0.6.31/avahi-compat-libdns_sd.pc.in b/avahi-0.6.31/avahi-compat-libdns_sd.pc.in
new file mode 100644
index 0000000..d619632
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-libdns_sd.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=${prefix}
+libdir=@libdir@
+includedir=${prefix}/include/avahi-compat-libdns_sd/
+
+Name: avahi-compat-libdns_sd
+Description: Avahi Multicast DNS Responder (libdns_sd Compatibility)
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir} -ldns_sd
+Cflags: -D_REENTRANT -I${includedir}
diff --git a/avahi-0.6.31/avahi-compat-libdns_sd/Makefile.am b/avahi-0.6.31/avahi-compat-libdns_sd/Makefile.am
new file mode 100644
index 0000000..9a66bc0
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-libdns_sd/Makefile.am
@@ -0,0 +1,73 @@
+# This file is part of avahi.
+#
+# avahi 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 of the
+# License, or (at your option) any later version.
+#
+# avahi 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 General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+AM_CFLAGS=-I$(top_srcdir)
+
+# This cool debug trap works on i386/gcc only
+AM_CFLAGS+='-DDEBUG_TRAP=__asm__("int $$3")'
+
+if HAVE_DBUS
+if ENABLE_COMPAT_LIBDNS_SD
+
+avahi_compat_libdns_sddir=$(includedir)/avahi-compat-libdns_sd
+
+avahi_compat_libdns_sd_HEADERS = dns_sd.h
+
+lib_LTLIBRARIES = libdns_sd.la
+
+if ENABLE_TESTS
+noinst_PROGRAMS = txt-test null-test
+endif
+
+libdns_sd_la_SOURCES = \
+	dns_sd.h \
+	compat.c \
+	txt.c \
+	unsupported.c \
+	warn.c warn.h
+libdns_sd_la_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS)
+libdns_sd_la_LDFLAGS = $(AM_LDFLAGS)  -version-info $(LIBAVAHI_COMPAT_LIBDNS_SD_VERSION_INFO) $(PTHREAD_LIBS) $(PTHREAD_CFLAGS) ../avahi-common/libavahi-common.la ../avahi-client/libavahi-client.la
+
+txt_test_SOURCES = \
+	dns_sd.h \
+	txt.c \
+	txt-test.c \
+	warn.c warn.h
+txt_test_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS)
+txt_test_LDADD = $(AM_LDADD) $(PTHREAD_LIBS) $(PTHREAD_CFLAGS) ../avahi-common/libavahi-common.la
+
+null_test_SOURCES = \
+	dns_sd.h \
+	compat.c \
+	null-test.c \
+	warn.c warn.h
+null_test_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS)
+null_test_LDADD = $(AM_LDADD) $(PTHREAD_LIBS) $(PTHREAD_CFLAGS) ../avahi-common/libavahi-common.la ../avahi-client/libavahi-client.la
+
+# You can test the compatibility layer by sticking in mDNSResponder's
+# dns-sd.c source here, naming it "libdns_sd-test.c" and running "make
+# libdns_sd-test" manually. We do not distribute that file due to
+# licensing restrictions.
+
+libdns_sd-test: libdns_sd-test.c libdns_sd.la
+	$(LIBTOOL) --mode=compile $(CC) $(AM_CFLAGS) $(PTHREAD_CFLAGS) -o libdns_sd-test.o -c libdns_sd-test.c
+	$(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(PTHREAD_CFLAGS) -o libdns_sd-test libdns_sd-test.o $(PTHREAD_LIBS) ../avahi-common/libavahi-common.la libdns_sd.la
+
+CLEANFILES = libdns_sd-test.o libdns_sd-test
+
+endif
+endif
diff --git a/avahi-0.6.31/avahi-compat-libdns_sd/Makefile.in b/avahi-0.6.31/avahi-compat-libdns_sd/Makefile.in
new file mode 100644
index 0000000..ed02c88
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-libdns_sd/Makefile.in
@@ -0,0 +1,944 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# This file is part of avahi.
+#
+# avahi 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 of the
+# License, or (at your option) any later version.
+#
+# avahi 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 General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@ENABLE_TESTS_TRUE@@HAVE_DBUS_TRUE@noinst_PROGRAMS = txt-test$(EXEEXT) \
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@ENABLE_TESTS_TRUE@@HAVE_DBUS_TRUE@	null-test$(EXEEXT)
+subdir = avahi-compat-libdns_sd
+DIST_COMMON = $(am__avahi_compat_libdns_sd_HEADERS_DIST) \
+	$(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/common/acx_pthread.m4 \
+	$(top_srcdir)/common/gcc_stack_protect.m4 \
+	$(top_srcdir)/common/gcc_visibility.m4 \
+	$(top_srcdir)/common/intltool.m4 \
+	$(top_srcdir)/common/introspection.m4 \
+	$(top_srcdir)/common/libtool.m4 \
+	$(top_srcdir)/common/ltoptions.m4 \
+	$(top_srcdir)/common/ltsugar.m4 \
+	$(top_srcdir)/common/ltversion.m4 \
+	$(top_srcdir)/common/lt~obsolete.m4 \
+	$(top_srcdir)/common/nls.m4 $(top_srcdir)/common/python.m4 \
+	$(top_srcdir)/acinclude.m4 $(top_srcdir)/common/doxygen.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+am__installdirs = "$(DESTDIR)$(libdir)" \
+	"$(DESTDIR)$(avahi_compat_libdns_sddir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+libdns_sd_la_LIBADD =
+am__libdns_sd_la_SOURCES_DIST = dns_sd.h compat.c txt.c unsupported.c \
+	warn.c warn.h
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@am_libdns_sd_la_OBJECTS = libdns_sd_la-compat.lo \
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@	libdns_sd_la-txt.lo \
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@	libdns_sd_la-unsupported.lo \
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@	libdns_sd_la-warn.lo
+libdns_sd_la_OBJECTS = $(am_libdns_sd_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+libdns_sd_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libdns_sd_la_CFLAGS) \
+	$(CFLAGS) $(libdns_sd_la_LDFLAGS) $(LDFLAGS) -o $@
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@am_libdns_sd_la_rpath =  \
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@	-rpath $(libdir)
+PROGRAMS = $(noinst_PROGRAMS)
+am__null_test_SOURCES_DIST = dns_sd.h compat.c null-test.c warn.c \
+	warn.h
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@am_null_test_OBJECTS = null_test-compat.$(OBJEXT) \
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@	null_test-null-test.$(OBJEXT) \
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@	null_test-warn.$(OBJEXT)
+null_test_OBJECTS = $(am_null_test_OBJECTS)
+am__DEPENDENCIES_1 =
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@null_test_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@	$(am__DEPENDENCIES_1) \
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@	../avahi-common/libavahi-common.la \
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@	../avahi-client/libavahi-client.la
+null_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(null_test_CFLAGS) \
+	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am__txt_test_SOURCES_DIST = dns_sd.h txt.c txt-test.c warn.c warn.h
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@am_txt_test_OBJECTS = txt_test-txt.$(OBJEXT) \
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@	txt_test-txt-test.$(OBJEXT) \
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@	txt_test-warn.$(OBJEXT)
+txt_test_OBJECTS = $(am_txt_test_OBJECTS)
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@txt_test_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@	$(am__DEPENDENCIES_1) \
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@	../avahi-common/libavahi-common.la
+txt_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(txt_test_CFLAGS) \
+	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC    " $@;
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(libdns_sd_la_SOURCES) $(null_test_SOURCES) \
+	$(txt_test_SOURCES)
+DIST_SOURCES = $(am__libdns_sd_la_SOURCES_DIST) \
+	$(am__null_test_SOURCES_DIST) $(am__txt_test_SOURCES_DIST)
+am__avahi_compat_libdns_sd_HEADERS_DIST = dns_sd.h
+HEADERS = $(avahi_compat_libdns_sd_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AVAHI_AUTOIPD_GROUP = @AVAHI_AUTOIPD_GROUP@
+AVAHI_AUTOIPD_USER = @AVAHI_AUTOIPD_USER@
+AVAHI_GROUP = @AVAHI_GROUP@
+AVAHI_PRIV_ACCESS_GROUP = @AVAHI_PRIV_ACCESS_GROUP@
+AVAHI_USER = @AVAHI_USER@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
+DBUS_SYSTEM_BUS_DEFAULT_ADDRESS = @DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@
+DBUS_SYS_DIR = @DBUS_SYS_DIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+DX_CONFIG = @DX_CONFIG@
+DX_DOCDIR = @DX_DOCDIR@
+DX_DOT = @DX_DOT@
+DX_DOXYGEN = @DX_DOXYGEN@
+DX_DVIPS = @DX_DVIPS@
+DX_EGREP = @DX_EGREP@
+DX_ENV = @DX_ENV@
+DX_FLAG_chi = @DX_FLAG_chi@
+DX_FLAG_chm = @DX_FLAG_chm@
+DX_FLAG_doc = @DX_FLAG_doc@
+DX_FLAG_dot = @DX_FLAG_dot@
+DX_FLAG_html = @DX_FLAG_html@
+DX_FLAG_man = @DX_FLAG_man@
+DX_FLAG_pdf = @DX_FLAG_pdf@
+DX_FLAG_ps = @DX_FLAG_ps@
+DX_FLAG_rtf = @DX_FLAG_rtf@
+DX_FLAG_xml = @DX_FLAG_xml@
+DX_HHC = @DX_HHC@
+DX_LATEX = @DX_LATEX@
+DX_MAKEINDEX = @DX_MAKEINDEX@
+DX_PDFLATEX = @DX_PDFLATEX@
+DX_PERL = @DX_PERL@
+DX_PROJECT = @DX_PROJECT@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GACUTIL = @GACUTIL@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB20_CFLAGS = @GLIB20_CFLAGS@
+GLIB20_LIBS = @GLIB20_LIBS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GOBJECT_CFLAGS = @GOBJECT_CFLAGS@
+GOBJECT_LIBS = @GOBJECT_LIBS@
+GREP = @GREP@
+GTK20_CFLAGS = @GTK20_CFLAGS@
+GTK20_LIBS = @GTK20_LIBS@
+GTK30_CFLAGS = @GTK30_CFLAGS@
+GTK30_LIBS = @GTK30_LIBS@
+HOWL_COMPAT_VERSION = @HOWL_COMPAT_VERSION@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
+INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
+INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
+INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
+INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
+INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
+INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBAVAHI_CLIENT_VERSION_INFO = @LIBAVAHI_CLIENT_VERSION_INFO@
+LIBAVAHI_COMMON_VERSION_INFO = @LIBAVAHI_COMMON_VERSION_INFO@
+LIBAVAHI_COMPAT_HOWL_VERSION_INFO = @LIBAVAHI_COMPAT_HOWL_VERSION_INFO@
+LIBAVAHI_COMPAT_LIBDNS_SD_VERSION_INFO = @LIBAVAHI_COMPAT_LIBDNS_SD_VERSION_INFO@
+LIBAVAHI_CORE_VERSION_INFO = @LIBAVAHI_CORE_VERSION_INFO@
+LIBAVAHI_GLIB_VERSION_INFO = @LIBAVAHI_GLIB_VERSION_INFO@
+LIBAVAHI_GOBJECT_VERSION_INFO = @LIBAVAHI_GOBJECT_VERSION_INFO@
+LIBAVAHI_QT3_VERSION_INFO = @LIBAVAHI_QT3_VERSION_INFO@
+LIBAVAHI_QT4_VERSION_INFO = @LIBAVAHI_QT4_VERSION_INFO@
+LIBAVAHI_UI_VERSION_INFO = @LIBAVAHI_UI_VERSION_INFO@
+LIBDAEMON_CFLAGS = @LIBDAEMON_CFLAGS@
+LIBDAEMON_LIBS = @LIBDAEMON_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MCS = @MCS@
+MDASSEMBLER = @MDASSEMBLER@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MOC_QT3 = @MOC_QT3@
+MOC_QT4 = @MOC_QT4@
+MONODOCER = @MONODOCER@
+MONODOC_CFLAGS = @MONODOC_CFLAGS@
+MONODOC_DIR = @MONODOC_DIR@
+MONODOC_LIBS = @MONODOC_LIBS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+QT3_CFLAGS = @QT3_CFLAGS@
+QT3_LIBS = @QT3_LIBS@
+QT4_CFLAGS = @QT4_CFLAGS@
+QT4_LIBS = @QT4_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STOW = @STOW@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+VISIBILITY_HIDDEN_CFLAGS = @VISIBILITY_HIDDEN_CFLAGS@
+XGETTEXT = @XGETTEXT@
+XML_CFLAGS = @XML_CFLAGS@
+XML_LIBS = @XML_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+avahi_runtime_dir = @avahi_runtime_dir@
+avahi_socket = @avahi_socket@
+avahilocaledir = @avahilocaledir@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+have_pkg_config = @have_pkg_config@
+have_xmltoman = @have_xmltoman@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+interfacesdir = @interfacesdir@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+systemdsystemunitdir = @systemdsystemunitdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# This cool debug trap works on i386/gcc only
+AM_CFLAGS = -I$(top_srcdir) '-DDEBUG_TRAP=__asm__("int $$3")'
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@avahi_compat_libdns_sddir = $(includedir)/avahi-compat-libdns_sd
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@avahi_compat_libdns_sd_HEADERS = dns_sd.h
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@lib_LTLIBRARIES = libdns_sd.la
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@libdns_sd_la_SOURCES = \
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@	dns_sd.h \
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@	compat.c \
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@	txt.c \
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@	unsupported.c \
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@	warn.c warn.h
+
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@libdns_sd_la_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS)
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@libdns_sd_la_LDFLAGS = $(AM_LDFLAGS)  -version-info $(LIBAVAHI_COMPAT_LIBDNS_SD_VERSION_INFO) $(PTHREAD_LIBS) $(PTHREAD_CFLAGS) ../avahi-common/libavahi-common.la ../avahi-client/libavahi-client.la
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@txt_test_SOURCES = \
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@	dns_sd.h \
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@	txt.c \
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@	txt-test.c \
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@	warn.c warn.h
+
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@txt_test_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS)
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@txt_test_LDADD = $(AM_LDADD) $(PTHREAD_LIBS) $(PTHREAD_CFLAGS) ../avahi-common/libavahi-common.la
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@null_test_SOURCES = \
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@	dns_sd.h \
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@	compat.c \
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@	null-test.c \
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@	warn.c warn.h
+
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@null_test_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS)
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@null_test_LDADD = $(AM_LDADD) $(PTHREAD_LIBS) $(PTHREAD_CFLAGS) ../avahi-common/libavahi-common.la ../avahi-client/libavahi-client.la
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@CLEANFILES = libdns_sd-test.o libdns_sd-test
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign avahi-compat-libdns_sd/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign avahi-compat-libdns_sd/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	list2=; for p in $$list; do \
+	  if test -f $$p; then \
+	    list2="$$list2 $$p"; \
+	  else :; fi; \
+	done; \
+	test -z "$$list2" || { \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+	}
+
+uninstall-libLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	for p in $$list; do \
+	  $(am__strip_dir) \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+	done
+
+clean-libLTLIBRARIES:
+	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libdns_sd.la: $(libdns_sd_la_OBJECTS) $(libdns_sd_la_DEPENDENCIES) $(EXTRA_libdns_sd_la_DEPENDENCIES) 
+	$(AM_V_CCLD)$(libdns_sd_la_LINK) $(am_libdns_sd_la_rpath) $(libdns_sd_la_OBJECTS) $(libdns_sd_la_LIBADD) $(LIBS)
+
+clean-noinstPROGRAMS:
+	@list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+null-test$(EXEEXT): $(null_test_OBJECTS) $(null_test_DEPENDENCIES) $(EXTRA_null_test_DEPENDENCIES) 
+	@rm -f null-test$(EXEEXT)
+	$(AM_V_CCLD)$(null_test_LINK) $(null_test_OBJECTS) $(null_test_LDADD) $(LIBS)
+txt-test$(EXEEXT): $(txt_test_OBJECTS) $(txt_test_DEPENDENCIES) $(EXTRA_txt_test_DEPENDENCIES) 
+	@rm -f txt-test$(EXEEXT)
+	$(AM_V_CCLD)$(txt_test_LINK) $(txt_test_OBJECTS) $(txt_test_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdns_sd_la-compat.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdns_sd_la-txt.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdns_sd_la-unsupported.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdns_sd_la-warn.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/null_test-compat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/null_test-null-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/null_test-warn.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/txt_test-txt-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/txt_test-txt.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/txt_test-warn.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+libdns_sd_la-compat.lo: compat.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdns_sd_la_CFLAGS) $(CFLAGS) -MT libdns_sd_la-compat.lo -MD -MP -MF $(DEPDIR)/libdns_sd_la-compat.Tpo -c -o libdns_sd_la-compat.lo `test -f 'compat.c' || echo '$(srcdir)/'`compat.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdns_sd_la-compat.Tpo $(DEPDIR)/libdns_sd_la-compat.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='compat.c' object='libdns_sd_la-compat.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdns_sd_la_CFLAGS) $(CFLAGS) -c -o libdns_sd_la-compat.lo `test -f 'compat.c' || echo '$(srcdir)/'`compat.c
+
+libdns_sd_la-txt.lo: txt.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdns_sd_la_CFLAGS) $(CFLAGS) -MT libdns_sd_la-txt.lo -MD -MP -MF $(DEPDIR)/libdns_sd_la-txt.Tpo -c -o libdns_sd_la-txt.lo `test -f 'txt.c' || echo '$(srcdir)/'`txt.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdns_sd_la-txt.Tpo $(DEPDIR)/libdns_sd_la-txt.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='txt.c' object='libdns_sd_la-txt.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdns_sd_la_CFLAGS) $(CFLAGS) -c -o libdns_sd_la-txt.lo `test -f 'txt.c' || echo '$(srcdir)/'`txt.c
+
+libdns_sd_la-unsupported.lo: unsupported.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdns_sd_la_CFLAGS) $(CFLAGS) -MT libdns_sd_la-unsupported.lo -MD -MP -MF $(DEPDIR)/libdns_sd_la-unsupported.Tpo -c -o libdns_sd_la-unsupported.lo `test -f 'unsupported.c' || echo '$(srcdir)/'`unsupported.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdns_sd_la-unsupported.Tpo $(DEPDIR)/libdns_sd_la-unsupported.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='unsupported.c' object='libdns_sd_la-unsupported.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdns_sd_la_CFLAGS) $(CFLAGS) -c -o libdns_sd_la-unsupported.lo `test -f 'unsupported.c' || echo '$(srcdir)/'`unsupported.c
+
+libdns_sd_la-warn.lo: warn.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdns_sd_la_CFLAGS) $(CFLAGS) -MT libdns_sd_la-warn.lo -MD -MP -MF $(DEPDIR)/libdns_sd_la-warn.Tpo -c -o libdns_sd_la-warn.lo `test -f 'warn.c' || echo '$(srcdir)/'`warn.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libdns_sd_la-warn.Tpo $(DEPDIR)/libdns_sd_la-warn.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='warn.c' object='libdns_sd_la-warn.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdns_sd_la_CFLAGS) $(CFLAGS) -c -o libdns_sd_la-warn.lo `test -f 'warn.c' || echo '$(srcdir)/'`warn.c
+
+null_test-compat.o: compat.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(null_test_CFLAGS) $(CFLAGS) -MT null_test-compat.o -MD -MP -MF $(DEPDIR)/null_test-compat.Tpo -c -o null_test-compat.o `test -f 'compat.c' || echo '$(srcdir)/'`compat.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/null_test-compat.Tpo $(DEPDIR)/null_test-compat.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='compat.c' object='null_test-compat.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(null_test_CFLAGS) $(CFLAGS) -c -o null_test-compat.o `test -f 'compat.c' || echo '$(srcdir)/'`compat.c
+
+null_test-compat.obj: compat.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(null_test_CFLAGS) $(CFLAGS) -MT null_test-compat.obj -MD -MP -MF $(DEPDIR)/null_test-compat.Tpo -c -o null_test-compat.obj `if test -f 'compat.c'; then $(CYGPATH_W) 'compat.c'; else $(CYGPATH_W) '$(srcdir)/compat.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/null_test-compat.Tpo $(DEPDIR)/null_test-compat.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='compat.c' object='null_test-compat.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(null_test_CFLAGS) $(CFLAGS) -c -o null_test-compat.obj `if test -f 'compat.c'; then $(CYGPATH_W) 'compat.c'; else $(CYGPATH_W) '$(srcdir)/compat.c'; fi`
+
+null_test-null-test.o: null-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(null_test_CFLAGS) $(CFLAGS) -MT null_test-null-test.o -MD -MP -MF $(DEPDIR)/null_test-null-test.Tpo -c -o null_test-null-test.o `test -f 'null-test.c' || echo '$(srcdir)/'`null-test.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/null_test-null-test.Tpo $(DEPDIR)/null_test-null-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='null-test.c' object='null_test-null-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(null_test_CFLAGS) $(CFLAGS) -c -o null_test-null-test.o `test -f 'null-test.c' || echo '$(srcdir)/'`null-test.c
+
+null_test-null-test.obj: null-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(null_test_CFLAGS) $(CFLAGS) -MT null_test-null-test.obj -MD -MP -MF $(DEPDIR)/null_test-null-test.Tpo -c -o null_test-null-test.obj `if test -f 'null-test.c'; then $(CYGPATH_W) 'null-test.c'; else $(CYGPATH_W) '$(srcdir)/null-test.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/null_test-null-test.Tpo $(DEPDIR)/null_test-null-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='null-test.c' object='null_test-null-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(null_test_CFLAGS) $(CFLAGS) -c -o null_test-null-test.obj `if test -f 'null-test.c'; then $(CYGPATH_W) 'null-test.c'; else $(CYGPATH_W) '$(srcdir)/null-test.c'; fi`
+
+null_test-warn.o: warn.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(null_test_CFLAGS) $(CFLAGS) -MT null_test-warn.o -MD -MP -MF $(DEPDIR)/null_test-warn.Tpo -c -o null_test-warn.o `test -f 'warn.c' || echo '$(srcdir)/'`warn.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/null_test-warn.Tpo $(DEPDIR)/null_test-warn.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='warn.c' object='null_test-warn.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(null_test_CFLAGS) $(CFLAGS) -c -o null_test-warn.o `test -f 'warn.c' || echo '$(srcdir)/'`warn.c
+
+null_test-warn.obj: warn.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(null_test_CFLAGS) $(CFLAGS) -MT null_test-warn.obj -MD -MP -MF $(DEPDIR)/null_test-warn.Tpo -c -o null_test-warn.obj `if test -f 'warn.c'; then $(CYGPATH_W) 'warn.c'; else $(CYGPATH_W) '$(srcdir)/warn.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/null_test-warn.Tpo $(DEPDIR)/null_test-warn.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='warn.c' object='null_test-warn.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(null_test_CFLAGS) $(CFLAGS) -c -o null_test-warn.obj `if test -f 'warn.c'; then $(CYGPATH_W) 'warn.c'; else $(CYGPATH_W) '$(srcdir)/warn.c'; fi`
+
+txt_test-txt.o: txt.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(txt_test_CFLAGS) $(CFLAGS) -MT txt_test-txt.o -MD -MP -MF $(DEPDIR)/txt_test-txt.Tpo -c -o txt_test-txt.o `test -f 'txt.c' || echo '$(srcdir)/'`txt.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/txt_test-txt.Tpo $(DEPDIR)/txt_test-txt.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='txt.c' object='txt_test-txt.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(txt_test_CFLAGS) $(CFLAGS) -c -o txt_test-txt.o `test -f 'txt.c' || echo '$(srcdir)/'`txt.c
+
+txt_test-txt.obj: txt.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(txt_test_CFLAGS) $(CFLAGS) -MT txt_test-txt.obj -MD -MP -MF $(DEPDIR)/txt_test-txt.Tpo -c -o txt_test-txt.obj `if test -f 'txt.c'; then $(CYGPATH_W) 'txt.c'; else $(CYGPATH_W) '$(srcdir)/txt.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/txt_test-txt.Tpo $(DEPDIR)/txt_test-txt.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='txt.c' object='txt_test-txt.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(txt_test_CFLAGS) $(CFLAGS) -c -o txt_test-txt.obj `if test -f 'txt.c'; then $(CYGPATH_W) 'txt.c'; else $(CYGPATH_W) '$(srcdir)/txt.c'; fi`
+
+txt_test-txt-test.o: txt-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(txt_test_CFLAGS) $(CFLAGS) -MT txt_test-txt-test.o -MD -MP -MF $(DEPDIR)/txt_test-txt-test.Tpo -c -o txt_test-txt-test.o `test -f 'txt-test.c' || echo '$(srcdir)/'`txt-test.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/txt_test-txt-test.Tpo $(DEPDIR)/txt_test-txt-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='txt-test.c' object='txt_test-txt-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(txt_test_CFLAGS) $(CFLAGS) -c -o txt_test-txt-test.o `test -f 'txt-test.c' || echo '$(srcdir)/'`txt-test.c
+
+txt_test-txt-test.obj: txt-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(txt_test_CFLAGS) $(CFLAGS) -MT txt_test-txt-test.obj -MD -MP -MF $(DEPDIR)/txt_test-txt-test.Tpo -c -o txt_test-txt-test.obj `if test -f 'txt-test.c'; then $(CYGPATH_W) 'txt-test.c'; else $(CYGPATH_W) '$(srcdir)/txt-test.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/txt_test-txt-test.Tpo $(DEPDIR)/txt_test-txt-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='txt-test.c' object='txt_test-txt-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(txt_test_CFLAGS) $(CFLAGS) -c -o txt_test-txt-test.obj `if test -f 'txt-test.c'; then $(CYGPATH_W) 'txt-test.c'; else $(CYGPATH_W) '$(srcdir)/txt-test.c'; fi`
+
+txt_test-warn.o: warn.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(txt_test_CFLAGS) $(CFLAGS) -MT txt_test-warn.o -MD -MP -MF $(DEPDIR)/txt_test-warn.Tpo -c -o txt_test-warn.o `test -f 'warn.c' || echo '$(srcdir)/'`warn.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/txt_test-warn.Tpo $(DEPDIR)/txt_test-warn.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='warn.c' object='txt_test-warn.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(txt_test_CFLAGS) $(CFLAGS) -c -o txt_test-warn.o `test -f 'warn.c' || echo '$(srcdir)/'`warn.c
+
+txt_test-warn.obj: warn.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(txt_test_CFLAGS) $(CFLAGS) -MT txt_test-warn.obj -MD -MP -MF $(DEPDIR)/txt_test-warn.Tpo -c -o txt_test-warn.obj `if test -f 'warn.c'; then $(CYGPATH_W) 'warn.c'; else $(CYGPATH_W) '$(srcdir)/warn.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/txt_test-warn.Tpo $(DEPDIR)/txt_test-warn.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='warn.c' object='txt_test-warn.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(txt_test_CFLAGS) $(CFLAGS) -c -o txt_test-warn.obj `if test -f 'warn.c'; then $(CYGPATH_W) 'warn.c'; else $(CYGPATH_W) '$(srcdir)/warn.c'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+install-avahi_compat_libdns_sdHEADERS: $(avahi_compat_libdns_sd_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(avahi_compat_libdns_sddir)" || $(MKDIR_P) "$(DESTDIR)$(avahi_compat_libdns_sddir)"
+	@list='$(avahi_compat_libdns_sd_HEADERS)'; test -n "$(avahi_compat_libdns_sddir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(avahi_compat_libdns_sddir)'"; \
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(avahi_compat_libdns_sddir)" || exit $$?; \
+	done
+
+uninstall-avahi_compat_libdns_sdHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(avahi_compat_libdns_sd_HEADERS)'; test -n "$(avahi_compat_libdns_sddir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(avahi_compat_libdns_sddir)'; $(am__uninstall_files_from_dir)
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(avahi_compat_libdns_sddir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+	clean-noinstPROGRAMS mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-avahi_compat_libdns_sdHEADERS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-avahi_compat_libdns_sdHEADERS \
+	uninstall-libLTLIBRARIES
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS ctags \
+	distclean distclean-compile distclean-generic \
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am \
+	install-avahi_compat_libdns_sdHEADERS install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-libLTLIBRARIES install-man install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am \
+	uninstall-avahi_compat_libdns_sdHEADERS \
+	uninstall-libLTLIBRARIES
+
+
+# You can test the compatibility layer by sticking in mDNSResponder's
+# dns-sd.c source here, naming it "libdns_sd-test.c" and running "make
+# libdns_sd-test" manually. We do not distribute that file due to
+# licensing restrictions.
+
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@libdns_sd-test: libdns_sd-test.c libdns_sd.la
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@	$(LIBTOOL) --mode=compile $(CC) $(AM_CFLAGS) $(PTHREAD_CFLAGS) -o libdns_sd-test.o -c libdns_sd-test.c
+@ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@	$(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(PTHREAD_CFLAGS) -o libdns_sd-test libdns_sd-test.o $(PTHREAD_LIBS) ../avahi-common/libavahi-common.la libdns_sd.la
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/avahi-0.6.31/avahi-compat-libdns_sd/compat.c b/avahi-0.6.31/avahi-compat-libdns_sd/compat.c
new file mode 100644
index 0000000..3ea359e
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-libdns_sd/compat.c
@@ -0,0 +1,1372 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <pthread.h>
+#include <assert.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <signal.h>
+#include <netinet/in.h>
+#include <fcntl.h>
+
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#include <avahi-common/simple-watch.h>
+#include <avahi-common/malloc.h>
+#include <avahi-common/error.h>
+#include <avahi-common/domain.h>
+#include <avahi-common/alternative.h>
+
+#include <avahi-client/client.h>
+#include <avahi-client/publish.h>
+#include <avahi-client/lookup.h>
+
+#include "warn.h"
+#include "dns_sd.h"
+
+enum {
+    COMMAND_POLL = 'p',
+    COMMAND_QUIT = 'q',
+    COMMAND_POLL_DONE = 'P',
+    COMMAND_POLL_FAILED = 'F'
+};
+
+struct type_info {
+    char *type;
+    AvahiStringList *subtypes;
+    int n_subtypes;
+};
+
+struct _DNSServiceRef_t {
+    int n_ref;
+
+    AvahiSimplePoll *simple_poll;
+
+    int thread_fd, main_fd;
+
+    pthread_t thread;
+    int thread_running;
+
+    pthread_mutex_t mutex;
+
+    void *context;
+    DNSServiceBrowseReply service_browser_callback;
+    DNSServiceResolveReply service_resolver_callback;
+    DNSServiceDomainEnumReply domain_browser_callback;
+    DNSServiceRegisterReply service_register_callback;
+    DNSServiceQueryRecordReply query_resolver_callback;
+
+    AvahiClient *client;
+    AvahiServiceBrowser *service_browser;
+    AvahiServiceResolver *service_resolver;
+    AvahiDomainBrowser *domain_browser;
+    AvahiRecordBrowser *record_browser;
+
+    struct type_info type_info;
+    char *service_name, *service_name_chosen, *service_domain, *service_host;
+    uint16_t service_port;
+    AvahiIfIndex service_interface;
+    AvahiStringList *service_txt;
+
+    AvahiEntryGroup *entry_group;
+};
+
+#define ASSERT_SUCCESS(r) { int __ret = (r); assert(__ret == 0); }
+
+static DNSServiceErrorType map_error(int error) {
+    switch (error) {
+        case AVAHI_OK :
+            return kDNSServiceErr_NoError;
+
+        case AVAHI_ERR_BAD_STATE :
+            return kDNSServiceErr_BadState;
+
+        case AVAHI_ERR_INVALID_HOST_NAME:
+        case AVAHI_ERR_INVALID_DOMAIN_NAME:
+        case AVAHI_ERR_INVALID_TTL:
+        case AVAHI_ERR_IS_PATTERN:
+        case AVAHI_ERR_INVALID_RECORD:
+        case AVAHI_ERR_INVALID_SERVICE_NAME:
+        case AVAHI_ERR_INVALID_SERVICE_TYPE:
+        case AVAHI_ERR_INVALID_PORT:
+        case AVAHI_ERR_INVALID_KEY:
+        case AVAHI_ERR_INVALID_ADDRESS:
+        case AVAHI_ERR_INVALID_SERVICE_SUBTYPE:
+            return kDNSServiceErr_BadParam;
+
+
+        case AVAHI_ERR_COLLISION:
+            return kDNSServiceErr_NameConflict;
+
+        case AVAHI_ERR_TOO_MANY_CLIENTS:
+        case AVAHI_ERR_TOO_MANY_OBJECTS:
+        case AVAHI_ERR_TOO_MANY_ENTRIES:
+        case AVAHI_ERR_ACCESS_DENIED:
+            return kDNSServiceErr_Refused;
+
+        case AVAHI_ERR_INVALID_OPERATION:
+        case AVAHI_ERR_INVALID_OBJECT:
+            return kDNSServiceErr_Invalid;
+
+        case AVAHI_ERR_NO_MEMORY:
+            return kDNSServiceErr_NoMemory;
+
+        case AVAHI_ERR_INVALID_INTERFACE:
+        case AVAHI_ERR_INVALID_PROTOCOL:
+            return kDNSServiceErr_BadInterfaceIndex;
+
+        case AVAHI_ERR_INVALID_FLAGS:
+            return kDNSServiceErr_BadFlags;
+
+        case AVAHI_ERR_NOT_FOUND:
+            return kDNSServiceErr_NoSuchName;
+
+        case AVAHI_ERR_VERSION_MISMATCH:
+            return kDNSServiceErr_Incompatible;
+
+        case AVAHI_ERR_NO_NETWORK:
+        case AVAHI_ERR_OS:
+        case AVAHI_ERR_INVALID_CONFIG:
+        case AVAHI_ERR_TIMEOUT:
+        case AVAHI_ERR_DBUS_ERROR:
+        case AVAHI_ERR_DISCONNECTED:
+        case AVAHI_ERR_NO_DAEMON:
+            break;
+
+    }
+
+    return kDNSServiceErr_Unknown;
+}
+
+static void type_info_init(struct type_info *i) {
+    assert(i);
+    i->type = NULL;
+    i->subtypes = NULL;
+    i->n_subtypes = 0;
+}
+
+static void type_info_free(struct type_info *i) {
+    assert(i);
+
+    avahi_free(i->type);
+    avahi_string_list_free(i->subtypes);
+
+    type_info_init(i);
+}
+
+static int type_info_parse(struct type_info *i, const char *t) {
+    char *token = NULL;
+
+    assert(i);
+    assert(t);
+
+    type_info_init(i);
+
+    for (;;) {
+        size_t l;
+
+        if (*t == 0)
+            break;
+
+        l = strcspn(t, ",");
+
+        if (l <= 0)
+            goto fail;
+
+        token = avahi_strndup(t, l);
+
+        if (!token)
+            goto fail;
+
+        if (!i->type) {
+            /* This is the first token, hence the main type */
+
+            if (!avahi_is_valid_service_type_strict(token))
+                goto fail;
+
+            i->type = token;
+            token = NULL;
+        } else {
+            char *fst;
+
+            /* This is not the first token, hence a subtype */
+
+            if (!(fst = avahi_strdup_printf("%s._sub.%s", token, i->type)))
+                goto fail;
+
+            if (!avahi_is_valid_service_subtype(fst)) {
+                avahi_free(fst);
+                goto fail;
+            }
+
+            i->subtypes = avahi_string_list_add(i->subtypes, fst);
+            avahi_free(fst);
+
+            avahi_free(token);
+            token = NULL;
+
+            i->n_subtypes++;
+        }
+
+        t += l;
+
+        if (*t == ',')
+            t++;
+    }
+
+    if (i->type)
+        return 0;
+
+fail:
+    type_info_free(i);
+    avahi_free(token);
+    return -1;
+}
+
+static const char *add_trailing_dot(const char *s, char *buf, size_t buf_len) {
+    if (!s)
+        return NULL;
+
+    if (*s == 0)
+        return s;
+
+    if (s[strlen(s)-1] == '.')
+        return s;
+
+    snprintf(buf, buf_len, "%s.", s);
+    return buf;
+}
+
+static int read_command(int fd) {
+    ssize_t r;
+    char command;
+
+    assert(fd >= 0);
+
+    if ((r = read(fd, &command, 1)) != 1) {
+        fprintf(stderr, __FILE__": read() failed: %s\n", r < 0 ? strerror(errno) : "EOF");
+        return -1;
+    }
+
+    return command;
+}
+
+static int write_command(int fd, char reply) {
+    assert(fd >= 0);
+
+    if (write(fd, &reply, 1) != 1) {
+        fprintf(stderr, __FILE__": write() failed: %s\n", strerror(errno));
+        return -1;
+    }
+
+    return 0;
+}
+
+static int poll_func(struct pollfd *ufds, unsigned int nfds, int timeout, void *userdata) {
+    DNSServiceRef sdref = userdata;
+    int ret;
+
+    assert(sdref);
+
+    ASSERT_SUCCESS(pthread_mutex_unlock(&sdref->mutex));
+
+/*     fprintf(stderr, "pre-syscall\n"); */
+    ret = poll(ufds, nfds, timeout);
+/*     fprintf(stderr, "post-syscall\n"); */
+
+    ASSERT_SUCCESS(pthread_mutex_lock(&sdref->mutex));
+
+    return ret;
+}
+
+static void * thread_func(void *data) {
+    DNSServiceRef sdref = data;
+    sigset_t mask;
+
+    sigfillset(&mask);
+    pthread_sigmask(SIG_BLOCK, &mask, NULL);
+
+    sdref->thread = pthread_self();
+    sdref->thread_running = 1;
+
+    for (;;) {
+        char command;
+
+        if ((command = read_command(sdref->thread_fd)) < 0)
+            break;
+
+/*         fprintf(stderr, "Command: %c\n", command); */
+
+        switch (command) {
+
+            case COMMAND_POLL: {
+                int ret;
+
+                ASSERT_SUCCESS(pthread_mutex_lock(&sdref->mutex));
+
+                for (;;) {
+                    errno = 0;
+
+                    if ((ret = avahi_simple_poll_run(sdref->simple_poll)) < 0) {
+
+                        if (errno == EINTR)
+                            continue;
+
+                        fprintf(stderr, __FILE__": avahi_simple_poll_run() failed: %s\n", strerror(errno));
+                    }
+
+                    break;
+                }
+
+                ASSERT_SUCCESS(pthread_mutex_unlock(&sdref->mutex));
+
+                if (write_command(sdref->thread_fd, ret < 0 ? COMMAND_POLL_FAILED : COMMAND_POLL_DONE) < 0)
+                    break;
+
+                break;
+            }
+
+            case COMMAND_QUIT:
+                return NULL;
+        }
+
+    }
+
+    return NULL;
+}
+
+static DNSServiceRef sdref_new(void) {
+    int fd[2] = { -1, -1 };
+    DNSServiceRef sdref = NULL;
+    pthread_mutexattr_t mutex_attr;
+
+    if (socketpair(AF_UNIX, SOCK_STREAM, 0, fd) < 0)
+        goto fail;
+
+    if (!(sdref = avahi_new(struct _DNSServiceRef_t, 1)))
+        goto fail;
+
+    sdref->n_ref = 1;
+    sdref->thread_fd = fd[0];
+    sdref->main_fd = fd[1];
+
+    sdref->client = NULL;
+    sdref->service_browser = NULL;
+    sdref->service_resolver = NULL;
+    sdref->domain_browser = NULL;
+    sdref->entry_group = NULL;
+
+    sdref->service_name = sdref->service_name_chosen = sdref->service_domain = sdref->service_host = NULL;
+    sdref->service_txt = NULL;
+
+    type_info_init(&sdref->type_info);
+
+    ASSERT_SUCCESS(pthread_mutexattr_init(&mutex_attr));
+    pthread_mutexattr_settype(&mutex_attr, PTHREAD_MUTEX_RECURSIVE);
+    ASSERT_SUCCESS(pthread_mutex_init(&sdref->mutex, &mutex_attr));
+
+    sdref->thread_running = 0;
+
+    if (!(sdref->simple_poll = avahi_simple_poll_new()))
+        goto fail;
+
+    avahi_simple_poll_set_func(sdref->simple_poll, poll_func, sdref);
+
+    /* Start simple poll */
+    if (avahi_simple_poll_prepare(sdref->simple_poll, -1) < 0)
+        goto fail;
+
+    /* Queue an initial POLL command for the thread */
+    if (write_command(sdref->main_fd, COMMAND_POLL) < 0)
+        goto fail;
+
+    if (pthread_create(&sdref->thread, NULL, thread_func, sdref) != 0)
+        goto fail;
+
+    sdref->thread_running = 1;
+
+    return sdref;
+
+fail:
+
+    if (sdref)
+        DNSServiceRefDeallocate(sdref);
+
+    return NULL;
+}
+
+static void sdref_free(DNSServiceRef sdref) {
+    assert(sdref);
+
+    if (sdref->thread_running) {
+        ASSERT_SUCCESS(write_command(sdref->main_fd, COMMAND_QUIT));
+        avahi_simple_poll_wakeup(sdref->simple_poll);
+        ASSERT_SUCCESS(pthread_join(sdref->thread, NULL));
+    }
+
+    if (sdref->client)
+        avahi_client_free(sdref->client);
+
+    if (sdref->simple_poll)
+        avahi_simple_poll_free(sdref->simple_poll);
+
+    if (sdref->thread_fd >= 0)
+        close(sdref->thread_fd);
+
+    if (sdref->main_fd >= 0)
+        close(sdref->main_fd);
+
+    ASSERT_SUCCESS(pthread_mutex_destroy(&sdref->mutex));
+
+    avahi_free(sdref->service_name);
+    avahi_free(sdref->service_name_chosen);
+    avahi_free(sdref->service_domain);
+    avahi_free(sdref->service_host);
+
+    type_info_free(&sdref->type_info);
+
+    avahi_string_list_free(sdref->service_txt);
+
+    avahi_free(sdref);
+}
+
+static void sdref_ref(DNSServiceRef sdref) {
+    assert(sdref);
+    assert(sdref->n_ref >= 1);
+
+    sdref->n_ref++;
+}
+
+static void sdref_unref(DNSServiceRef sdref) {
+    assert(sdref);
+    assert(sdref->n_ref >= 1);
+
+    if (--(sdref->n_ref) <= 0)
+        sdref_free(sdref);
+}
+
+int DNSSD_API DNSServiceRefSockFD(DNSServiceRef sdref) {
+
+    AVAHI_WARN_LINKAGE;
+
+    if (!sdref || sdref->n_ref <= 0)
+        return -1;
+
+    return sdref->main_fd;
+}
+
+DNSServiceErrorType DNSSD_API DNSServiceProcessResult(DNSServiceRef sdref) {
+    DNSServiceErrorType ret = kDNSServiceErr_Unknown;
+
+    AVAHI_WARN_LINKAGE;
+
+    if (!sdref || sdref->n_ref <= 0)
+        return kDNSServiceErr_BadParam;
+
+    sdref_ref(sdref);
+
+    ASSERT_SUCCESS(pthread_mutex_lock(&sdref->mutex));
+
+    /* Cleanup notification socket */
+    if (read_command(sdref->main_fd) != COMMAND_POLL_DONE)
+        goto finish;
+
+    if (avahi_simple_poll_dispatch(sdref->simple_poll) < 0)
+        goto finish;
+
+    if (sdref->n_ref > 1) /* Perhaps we should die */
+
+        /* Dispatch events */
+        if (avahi_simple_poll_prepare(sdref->simple_poll, -1) < 0)
+            goto finish;
+
+    if (sdref->n_ref > 1)
+
+        /* Request the poll */
+        if (write_command(sdref->main_fd, COMMAND_POLL) < 0)
+            goto finish;
+
+    ret = kDNSServiceErr_NoError;
+
+finish:
+
+    ASSERT_SUCCESS(pthread_mutex_unlock(&sdref->mutex));
+
+    sdref_unref(sdref);
+
+    return ret;
+}
+
+void DNSSD_API DNSServiceRefDeallocate(DNSServiceRef sdref) {
+    AVAHI_WARN_LINKAGE;
+
+    if (sdref)
+        sdref_unref(sdref);
+}
+
+static void service_browser_callback(
+    AvahiServiceBrowser *b,
+    AvahiIfIndex interface,
+    AVAHI_GCC_UNUSED AvahiProtocol protocol,
+    AvahiBrowserEvent event,
+    const char *name,
+    const char *type,
+    const char *domain,
+    AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+    void *userdata) {
+
+    DNSServiceRef sdref = userdata;
+    char type_fixed[AVAHI_DOMAIN_NAME_MAX], domain_fixed[AVAHI_DOMAIN_NAME_MAX];
+    assert(b);
+    assert(sdref);
+    assert(sdref->n_ref >= 1);
+
+    type = add_trailing_dot(type, type_fixed, sizeof(type_fixed));
+    domain  = add_trailing_dot(domain, domain_fixed, sizeof(domain_fixed));
+
+    switch (event) {
+        case AVAHI_BROWSER_NEW:
+            sdref->service_browser_callback(sdref, kDNSServiceFlagsAdd, interface, kDNSServiceErr_NoError, name, type, domain, sdref->context);
+            break;
+
+        case AVAHI_BROWSER_REMOVE:
+            sdref->service_browser_callback(sdref, 0, interface, kDNSServiceErr_NoError, name, type, domain, sdref->context);
+            break;
+
+        case AVAHI_BROWSER_FAILURE:
+            sdref->service_browser_callback(sdref, 0, interface, map_error(avahi_client_errno(sdref->client)), NULL, NULL, NULL, sdref->context);
+            break;
+
+        case AVAHI_BROWSER_CACHE_EXHAUSTED:
+        case AVAHI_BROWSER_ALL_FOR_NOW:
+            break;
+    }
+}
+
+static void generic_client_callback(AvahiClient *s, AvahiClientState state, void* userdata) {
+    DNSServiceRef sdref = userdata;
+    int error = kDNSServiceErr_Unknown;
+
+    assert(s);
+    assert(sdref);
+    assert(sdref->n_ref >= 1);
+
+    switch (state) {
+
+        case AVAHI_CLIENT_FAILURE:
+
+            if (sdref->service_browser_callback)
+                sdref->service_browser_callback(sdref, 0, 0, error, NULL, NULL, NULL, sdref->context);
+            else if (sdref->service_resolver_callback)
+                sdref->service_resolver_callback(sdref, 0, 0, error, NULL, NULL, 0, 0, NULL, sdref->context);
+            else if (sdref->domain_browser_callback)
+                sdref->domain_browser_callback(sdref, 0, 0, error, NULL, sdref->context);
+            else if (sdref->query_resolver_callback)
+                sdref->query_resolver_callback(sdref, 0, 0, error, NULL, 0, 0, 0, NULL, 0, sdref->context);
+
+            break;
+
+        case AVAHI_CLIENT_S_RUNNING:
+        case AVAHI_CLIENT_S_COLLISION:
+        case AVAHI_CLIENT_S_REGISTERING:
+        case AVAHI_CLIENT_CONNECTING:
+            break;
+    }
+}
+
+DNSServiceErrorType DNSSD_API DNSServiceBrowse(
+        DNSServiceRef *ret_sdref,
+        DNSServiceFlags flags,
+        uint32_t interface,
+        const char *regtype,
+        const char *domain,
+        DNSServiceBrowseReply callback,
+        void *context) {
+
+    DNSServiceErrorType ret = kDNSServiceErr_Unknown;
+    int error;
+    DNSServiceRef sdref = NULL;
+    AvahiIfIndex ifindex;
+    struct type_info type_info;
+
+    AVAHI_WARN_LINKAGE;
+
+    if (!ret_sdref || !regtype)
+        return kDNSServiceErr_BadParam;
+    *ret_sdref = NULL;
+
+    if (interface == kDNSServiceInterfaceIndexLocalOnly || flags != 0) {
+        AVAHI_WARN_UNSUPPORTED;
+        return kDNSServiceErr_Unsupported;
+    }
+
+    type_info_init(&type_info);
+
+    if (type_info_parse(&type_info, regtype) < 0 || type_info.n_subtypes > 1) {
+        type_info_free(&type_info);
+
+        if (!avahi_is_valid_service_type_generic(regtype))
+            return kDNSServiceErr_Unsupported;
+    } else
+        regtype = type_info.subtypes ? (char*) type_info.subtypes->text : type_info.type;
+
+    if (!(sdref = sdref_new())) {
+        type_info_free(&type_info);
+        return kDNSServiceErr_Unknown;
+    }
+
+    sdref->context = context;
+    sdref->service_browser_callback = callback;
+
+    ASSERT_SUCCESS(pthread_mutex_lock(&sdref->mutex));
+
+    if (!(sdref->client = avahi_client_new(avahi_simple_poll_get(sdref->simple_poll), 0, generic_client_callback, sdref, &error))) {
+        ret =  map_error(error);
+        goto finish;
+    }
+
+    ifindex = interface == kDNSServiceInterfaceIndexAny ? AVAHI_IF_UNSPEC : (AvahiIfIndex) interface;
+
+    if (!(sdref->service_browser = avahi_service_browser_new(sdref->client, ifindex, AVAHI_PROTO_UNSPEC, regtype, domain, 0, service_browser_callback, sdref))) {
+        ret = map_error(avahi_client_errno(sdref->client));
+        goto finish;
+    }
+
+    ret = kDNSServiceErr_NoError;
+    *ret_sdref = sdref;
+
+finish:
+
+    ASSERT_SUCCESS(pthread_mutex_unlock(&sdref->mutex));
+
+    if (ret != kDNSServiceErr_NoError)
+        DNSServiceRefDeallocate(sdref);
+
+    type_info_free(&type_info);
+
+    return ret;
+}
+
+static void service_resolver_callback(
+    AvahiServiceResolver *r,
+    AvahiIfIndex interface,
+    AVAHI_GCC_UNUSED AvahiProtocol protocol,
+    AvahiResolverEvent event,
+    const char *name,
+    const char *type,
+    const char *domain,
+    const char *host_name,
+    AVAHI_GCC_UNUSED const AvahiAddress *a,
+    uint16_t port,
+    AvahiStringList *txt,
+    AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+    void *userdata) {
+
+    DNSServiceRef sdref = userdata;
+
+    assert(r);
+    assert(sdref);
+    assert(sdref->n_ref >= 1);
+
+    switch (event) {
+        case AVAHI_RESOLVER_FOUND: {
+
+            char host_name_fixed[AVAHI_DOMAIN_NAME_MAX];
+            char full_name[AVAHI_DOMAIN_NAME_MAX];
+            int ret;
+            char *p = NULL;
+            size_t l = 0;
+
+            host_name = add_trailing_dot(host_name, host_name_fixed, sizeof(host_name_fixed));
+
+            if ((p = avahi_new0(char, (l = avahi_string_list_serialize(txt, NULL, 0))+1)))
+                avahi_string_list_serialize(txt, p, l);
+
+            ret = avahi_service_name_join(full_name, sizeof(full_name), name, type, domain);
+            assert(ret == AVAHI_OK);
+
+            strcat(full_name, ".");
+
+            sdref->service_resolver_callback(sdref, 0, interface, kDNSServiceErr_NoError, full_name, host_name, htons(port), l, (unsigned char*) p, sdref->context);
+
+            avahi_free(p);
+            break;
+        }
+
+        case AVAHI_RESOLVER_FAILURE:
+            sdref->service_resolver_callback(sdref, 0, interface, map_error(avahi_client_errno(sdref->client)), NULL, NULL, 0, 0, NULL, sdref->context);
+            break;
+    }
+}
+
+DNSServiceErrorType DNSSD_API DNSServiceResolve(
+    DNSServiceRef *ret_sdref,
+    DNSServiceFlags flags,
+    uint32_t interface,
+    const char *name,
+    const char *regtype,
+    const char *domain,
+    DNSServiceResolveReply callback,
+    void *context) {
+
+    DNSServiceErrorType ret = kDNSServiceErr_Unknown;
+    int error;
+    DNSServiceRef sdref = NULL;
+    AvahiIfIndex ifindex;
+
+    AVAHI_WARN_LINKAGE;
+
+    if (!ret_sdref || !name || !regtype || !domain || !callback)
+        return kDNSServiceErr_BadParam;
+    *ret_sdref = NULL;
+
+    if (interface == kDNSServiceInterfaceIndexLocalOnly || flags != 0) {
+        AVAHI_WARN_UNSUPPORTED;
+        return kDNSServiceErr_Unsupported;
+    }
+
+    if (!(sdref = sdref_new()))
+        return kDNSServiceErr_Unknown;
+
+    sdref->context = context;
+    sdref->service_resolver_callback = callback;
+
+    ASSERT_SUCCESS(pthread_mutex_lock(&sdref->mutex));
+
+    if (!(sdref->client = avahi_client_new(avahi_simple_poll_get(sdref->simple_poll), 0, generic_client_callback, sdref, &error))) {
+        ret =  map_error(error);
+        goto finish;
+    }
+
+    ifindex = interface == kDNSServiceInterfaceIndexAny ? AVAHI_IF_UNSPEC : (AvahiIfIndex) interface;
+
+    if (!(sdref->service_resolver = avahi_service_resolver_new(sdref->client, ifindex, AVAHI_PROTO_UNSPEC, name, regtype, domain, AVAHI_PROTO_UNSPEC, 0, service_resolver_callback, sdref))) {
+        ret = map_error(avahi_client_errno(sdref->client));
+        goto finish;
+    }
+
+
+    ret = kDNSServiceErr_NoError;
+    *ret_sdref = sdref;
+
+finish:
+
+    ASSERT_SUCCESS(pthread_mutex_unlock(&sdref->mutex));
+
+    if (ret != kDNSServiceErr_NoError)
+        DNSServiceRefDeallocate(sdref);
+
+    return ret;
+}
+
+int DNSSD_API DNSServiceConstructFullName (
+    char *fullName,
+    const char *service,
+    const char *regtype,
+    const char *domain) {
+
+    AVAHI_WARN_LINKAGE;
+
+    if (!fullName || !regtype || !domain)
+        return -1;
+
+    if (avahi_service_name_join(fullName, kDNSServiceMaxDomainName, service, regtype, domain) < 0)
+        return -1;
+
+    return 0;
+}
+
+static void domain_browser_callback(
+    AvahiDomainBrowser *b,
+    AvahiIfIndex interface,
+    AVAHI_GCC_UNUSED AvahiProtocol protocol,
+    AvahiBrowserEvent event,
+    const char *domain,
+    AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+    void *userdata) {
+
+    DNSServiceRef sdref = userdata;
+    static char domain_fixed[AVAHI_DOMAIN_NAME_MAX];
+
+    assert(b);
+    assert(sdref);
+    assert(sdref->n_ref >= 1);
+
+    domain  = add_trailing_dot(domain, domain_fixed, sizeof(domain_fixed));
+
+    switch (event) {
+        case AVAHI_BROWSER_NEW:
+            sdref->domain_browser_callback(sdref, kDNSServiceFlagsAdd, interface, kDNSServiceErr_NoError, domain, sdref->context);
+            break;
+
+        case AVAHI_BROWSER_REMOVE:
+            sdref->domain_browser_callback(sdref, 0, interface, kDNSServiceErr_NoError, domain, sdref->context);
+            break;
+
+        case AVAHI_BROWSER_FAILURE:
+            sdref->domain_browser_callback(sdref, 0, interface, map_error(avahi_client_errno(sdref->client)), domain, sdref->context);
+            break;
+
+        case AVAHI_BROWSER_CACHE_EXHAUSTED:
+        case AVAHI_BROWSER_ALL_FOR_NOW:
+            break;
+    }
+}
+
+DNSServiceErrorType DNSSD_API DNSServiceEnumerateDomains(
+    DNSServiceRef *ret_sdref,
+    DNSServiceFlags flags,
+    uint32_t interface,
+    DNSServiceDomainEnumReply callback,
+    void *context) {
+
+    DNSServiceErrorType ret = kDNSServiceErr_Unknown;
+    int error;
+    DNSServiceRef sdref = NULL;
+    AvahiIfIndex ifindex;
+
+    AVAHI_WARN_LINKAGE;
+
+    if (!ret_sdref || !callback)
+        return kDNSServiceErr_BadParam;
+    *ret_sdref = NULL;
+
+    if (interface == kDNSServiceInterfaceIndexLocalOnly ||
+        (flags != kDNSServiceFlagsBrowseDomains &&  flags != kDNSServiceFlagsRegistrationDomains)) {
+        AVAHI_WARN_UNSUPPORTED;
+        return kDNSServiceErr_Unsupported;
+    }
+
+    if (!(sdref = sdref_new()))
+        return kDNSServiceErr_Unknown;
+
+    sdref->context = context;
+    sdref->domain_browser_callback = callback;
+
+    ASSERT_SUCCESS(pthread_mutex_lock(&sdref->mutex));
+
+    if (!(sdref->client = avahi_client_new(avahi_simple_poll_get(sdref->simple_poll), 0, generic_client_callback, sdref, &error))) {
+        ret =  map_error(error);
+        goto finish;
+    }
+
+    ifindex = interface == kDNSServiceInterfaceIndexAny ? AVAHI_IF_UNSPEC : (AvahiIfIndex) interface;
+
+    if (!(sdref->domain_browser = avahi_domain_browser_new(sdref->client, ifindex, AVAHI_PROTO_UNSPEC, "local",
+                                                           flags == kDNSServiceFlagsRegistrationDomains ? AVAHI_DOMAIN_BROWSER_REGISTER : AVAHI_DOMAIN_BROWSER_BROWSE,
+                                                           0, domain_browser_callback, sdref))) {
+        ret = map_error(avahi_client_errno(sdref->client));
+        goto finish;
+    }
+
+    ret = kDNSServiceErr_NoError;
+    *ret_sdref = sdref;
+
+finish:
+
+    ASSERT_SUCCESS(pthread_mutex_unlock(&sdref->mutex));
+
+    if (ret != kDNSServiceErr_NoError)
+        DNSServiceRefDeallocate(sdref);
+
+    return ret;
+}
+
+static void reg_report_error(DNSServiceRef sdref, DNSServiceErrorType error) {
+    char regtype_fixed[AVAHI_DOMAIN_NAME_MAX], domain_fixed[AVAHI_DOMAIN_NAME_MAX];
+    const char *regtype, *domain;
+    assert(sdref);
+    assert(sdref->n_ref >= 1);
+
+    if (!sdref->service_register_callback)
+        return;
+
+    regtype = add_trailing_dot(sdref->type_info.type, regtype_fixed, sizeof(regtype_fixed));
+    domain = add_trailing_dot(sdref->service_domain, domain_fixed, sizeof(domain_fixed));
+
+    sdref->service_register_callback(
+        sdref, 0, error,
+        sdref->service_name_chosen ? sdref->service_name_chosen : sdref->service_name,
+        regtype,
+        domain,
+        sdref->context);
+}
+
+static int reg_create_service(DNSServiceRef sdref) {
+    int ret;
+    AvahiStringList *l;
+
+    assert(sdref);
+    assert(sdref->n_ref >= 1);
+
+    if ((ret = avahi_entry_group_add_service_strlst(
+        sdref->entry_group,
+        sdref->service_interface,
+        AVAHI_PROTO_UNSPEC,
+        0,
+        sdref->service_name_chosen,
+        sdref->type_info.type,
+        sdref->service_domain,
+        sdref->service_host,
+        sdref->service_port,
+        sdref->service_txt)) < 0)
+        return ret;
+
+    for (l = sdref->type_info.subtypes; l; l = l->next) {
+        /* Create a subtype entry */
+
+        if (avahi_entry_group_add_service_subtype(
+                sdref->entry_group,
+                sdref->service_interface,
+                AVAHI_PROTO_UNSPEC,
+                0,
+                sdref->service_name_chosen,
+                sdref->type_info.type,
+                sdref->service_domain,
+                (const char*) l->text) < 0)
+            return ret;
+    }
+
+    if ((ret = avahi_entry_group_commit(sdref->entry_group)) < 0)
+        return ret;
+
+    return 0;
+}
+
+static void reg_client_callback(AvahiClient *s, AvahiClientState state, void* userdata) {
+    DNSServiceRef sdref = userdata;
+
+    assert(s);
+    assert(sdref);
+    assert(sdref->n_ref >= 1);
+
+    /* We've not been setup completely */
+    if (!sdref->entry_group)
+        return;
+
+    switch (state) {
+        case AVAHI_CLIENT_FAILURE:
+            reg_report_error(sdref, kDNSServiceErr_Unknown);
+            break;
+
+        case AVAHI_CLIENT_S_RUNNING: {
+            int ret;
+
+            if (!sdref->service_name) {
+                const char *n;
+                /* If the service name is taken from the host name, copy that */
+
+                avahi_free(sdref->service_name_chosen);
+                sdref->service_name_chosen = NULL;
+
+                if (!(n = avahi_client_get_host_name(sdref->client))) {
+                    reg_report_error(sdref, map_error(avahi_client_errno(sdref->client)));
+                    return;
+                }
+
+                if (!(sdref->service_name_chosen = avahi_strdup(n))) {
+                    reg_report_error(sdref, kDNSServiceErr_NoMemory);
+                    return;
+                }
+            }
+
+            if (!sdref->service_name_chosen) {
+
+                assert(sdref->service_name);
+
+                if (!(sdref->service_name_chosen = avahi_strdup(sdref->service_name))) {
+                    reg_report_error(sdref, kDNSServiceErr_NoMemory);
+                    return;
+                }
+            }
+
+            /* Register the service */
+
+            if ((ret = reg_create_service(sdref)) < 0) {
+                reg_report_error(sdref, map_error(ret));
+                return;
+            }
+
+            break;
+        }
+
+        case AVAHI_CLIENT_S_COLLISION:
+        case AVAHI_CLIENT_S_REGISTERING:
+
+            /* Remove our entry */
+            avahi_entry_group_reset(sdref->entry_group);
+
+            break;
+
+        case AVAHI_CLIENT_CONNECTING:
+            /* Ignore */
+            break;
+    }
+
+}
+
+static void reg_entry_group_callback(AvahiEntryGroup *g, AvahiEntryGroupState state, void *userdata) {
+    DNSServiceRef sdref = userdata;
+
+    assert(g);
+
+    switch (state) {
+        case AVAHI_ENTRY_GROUP_ESTABLISHED:
+
+            /* Inform the user */
+            reg_report_error(sdref, kDNSServiceErr_NoError);
+
+            break;
+
+        case AVAHI_ENTRY_GROUP_COLLISION: {
+            char *n;
+            int ret;
+
+            /* Remove our entry */
+            avahi_entry_group_reset(sdref->entry_group);
+
+            assert(sdref->service_name_chosen);
+
+            /* Pick a new name */
+            if (!(n = avahi_alternative_service_name(sdref->service_name_chosen))) {
+                reg_report_error(sdref, kDNSServiceErr_NoMemory);
+                return;
+            }
+            avahi_free(sdref->service_name_chosen);
+            sdref->service_name_chosen = n;
+
+            /* Register the service with that new name */
+            if ((ret = reg_create_service(sdref)) < 0) {
+                reg_report_error(sdref, map_error(ret));
+                return;
+            }
+
+            break;
+        }
+
+        case AVAHI_ENTRY_GROUP_REGISTERING:
+        case AVAHI_ENTRY_GROUP_UNCOMMITED:
+            /* Ignore */
+            break;
+
+        case AVAHI_ENTRY_GROUP_FAILURE:
+            /* Inform the user */
+            reg_report_error(sdref, map_error(avahi_client_errno(sdref->client)));
+            break;
+
+    }
+}
+
+DNSServiceErrorType DNSSD_API DNSServiceRegister (
+        DNSServiceRef *ret_sdref,
+        DNSServiceFlags flags,
+        uint32_t interface,
+        const char *name,
+        const char *regtype,
+        const char *domain,
+        const char *host,
+        uint16_t port,
+        uint16_t txtLen,
+        const void *txtRecord,
+        DNSServiceRegisterReply callback,
+        void *context) {
+
+    DNSServiceErrorType ret = kDNSServiceErr_Unknown;
+    int error;
+    DNSServiceRef sdref = NULL;
+    AvahiStringList *txt = NULL;
+    struct type_info type_info;
+
+    AVAHI_WARN_LINKAGE;
+
+    if (!ret_sdref || !regtype)
+        return kDNSServiceErr_BadParam;
+    *ret_sdref = NULL;
+
+    if (!txtRecord) {
+        txtLen = 1;
+        txtRecord = "";
+    }
+
+    if (interface == kDNSServiceInterfaceIndexLocalOnly || flags) {
+        AVAHI_WARN_UNSUPPORTED;
+        return kDNSServiceErr_Unsupported;
+    }
+
+    if (txtLen > 0)
+        if (avahi_string_list_parse(txtRecord, txtLen, &txt) < 0)
+            return kDNSServiceErr_Invalid;
+
+    if (type_info_parse(&type_info, regtype) < 0) {
+        avahi_string_list_free(txt);
+        return kDNSServiceErr_Invalid;
+    }
+
+    if (!(sdref = sdref_new())) {
+        avahi_string_list_free(txt);
+        type_info_free(&type_info);
+        return kDNSServiceErr_Unknown;
+    }
+
+    sdref->context = context;
+    sdref->service_register_callback = callback;
+
+    sdref->type_info = type_info;
+    sdref->service_name = avahi_strdup(name);
+    sdref->service_domain = domain ? avahi_normalize_name_strdup(domain) : NULL;
+    sdref->service_host = host ? avahi_normalize_name_strdup(host) : NULL;
+    sdref->service_interface = interface == kDNSServiceInterfaceIndexAny ? AVAHI_IF_UNSPEC : (AvahiIfIndex) interface;
+    sdref->service_port = ntohs(port);
+    sdref->service_txt = txt;
+
+    /* Some OOM checking would be cool here */
+
+    ASSERT_SUCCESS(pthread_mutex_lock(&sdref->mutex));
+
+    if (!(sdref->client = avahi_client_new(avahi_simple_poll_get(sdref->simple_poll), 0, reg_client_callback, sdref, &error))) {
+        ret =  map_error(error);
+        goto finish;
+    }
+
+    if (!sdref->service_domain) {
+        const char *d;
+
+        if (!(d = avahi_client_get_domain_name(sdref->client))) {
+            ret = map_error(avahi_client_errno(sdref->client));
+            goto finish;
+        }
+
+        if (!(sdref->service_domain = avahi_strdup(d))) {
+            ret = kDNSServiceErr_NoMemory;
+            goto finish;
+        }
+    }
+
+    if (!(sdref->entry_group = avahi_entry_group_new(sdref->client, reg_entry_group_callback, sdref))) {
+        ret = map_error(avahi_client_errno(sdref->client));
+        goto finish;
+    }
+
+    if (avahi_client_get_state(sdref->client) == AVAHI_CLIENT_S_RUNNING) {
+        const char *n;
+
+        if (sdref->service_name)
+            n = sdref->service_name;
+        else {
+            if (!(n = avahi_client_get_host_name(sdref->client))) {
+                ret = map_error(avahi_client_errno(sdref->client));
+                goto finish;
+            }
+        }
+
+        if (!(sdref->service_name_chosen = avahi_strdup(n))) {
+            ret = kDNSServiceErr_NoMemory;
+            goto finish;
+        }
+
+
+        if ((error = reg_create_service(sdref)) < 0) {
+            ret = map_error(error);
+            goto finish;
+        }
+    }
+
+    ret = kDNSServiceErr_NoError;
+    *ret_sdref = sdref;
+
+finish:
+
+    ASSERT_SUCCESS(pthread_mutex_unlock(&sdref->mutex));
+
+    if (ret != kDNSServiceErr_NoError)
+        DNSServiceRefDeallocate(sdref);
+
+    return ret;
+}
+
+DNSServiceErrorType DNSSD_API DNSServiceUpdateRecord(
+         DNSServiceRef sdref,
+         DNSRecordRef rref,
+         DNSServiceFlags flags,
+         uint16_t rdlen,
+         const void *rdata,
+         AVAHI_GCC_UNUSED uint32_t ttl) {
+
+    int ret = kDNSServiceErr_Unknown;
+    AvahiStringList *txt = NULL;
+
+    AVAHI_WARN_LINKAGE;
+
+    if (!sdref || sdref->n_ref <= 0)
+        return kDNSServiceErr_BadParam;
+
+    if (flags || rref) {
+        AVAHI_WARN_UNSUPPORTED;
+        return kDNSServiceErr_Unsupported;
+    }
+
+    if (rdlen > 0)
+        if (avahi_string_list_parse(rdata, rdlen, &txt) < 0)
+            return kDNSServiceErr_Invalid;
+
+    ASSERT_SUCCESS(pthread_mutex_lock(&sdref->mutex));
+
+    if (!avahi_string_list_equal(txt, sdref->service_txt)) {
+
+        avahi_string_list_free(sdref->service_txt);
+        sdref->service_txt = txt;
+
+        if (avahi_client_get_state(sdref->client) == AVAHI_CLIENT_S_RUNNING &&
+            sdref->entry_group &&
+            (avahi_entry_group_get_state(sdref->entry_group) == AVAHI_ENTRY_GROUP_ESTABLISHED ||
+            avahi_entry_group_get_state(sdref->entry_group) == AVAHI_ENTRY_GROUP_REGISTERING))
+
+            if (avahi_entry_group_update_service_txt_strlst(
+                        sdref->entry_group,
+                        sdref->service_interface,
+                        AVAHI_PROTO_UNSPEC,
+                        0,
+                        sdref->service_name_chosen,
+                        sdref->type_info.type,
+                        sdref->service_domain,
+                        sdref->service_txt) < 0) {
+
+                ret = map_error(avahi_client_errno(sdref->client));
+                goto finish;
+            }
+
+    } else
+        avahi_string_list_free(txt);
+
+    ret = kDNSServiceErr_NoError;
+
+finish:
+    ASSERT_SUCCESS(pthread_mutex_unlock(&sdref->mutex));
+
+    return ret;
+}
+
+static void query_resolver_callback(
+        AvahiRecordBrowser *r,
+        AvahiIfIndex interface,
+        AVAHI_GCC_UNUSED AvahiProtocol protocol,
+        AvahiBrowserEvent event,
+        const char *name,
+        uint16_t clazz,
+        uint16_t type,
+        const void* rdata,
+        size_t size,
+        AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+        void *userdata) {
+
+    DNSServiceRef sdref = userdata;
+
+    assert(r);
+    assert(sdref);
+    assert(sdref->n_ref >= 1);
+
+    switch (event) {
+
+    case AVAHI_BROWSER_NEW:
+    case AVAHI_BROWSER_REMOVE: {
+
+        DNSServiceFlags qflags = 0;
+        if (event == AVAHI_BROWSER_NEW)
+            qflags |= kDNSServiceFlagsAdd;
+
+        sdref->query_resolver_callback(sdref, qflags, interface, kDNSServiceErr_NoError, name, type, clazz, size, rdata, 0, sdref->context);
+        break;
+    }
+
+    case AVAHI_BROWSER_ALL_FOR_NOW:
+    case AVAHI_BROWSER_CACHE_EXHAUSTED:
+        /* not implemented */
+        break;
+
+    case AVAHI_BROWSER_FAILURE:
+        sdref->query_resolver_callback(sdref, 0, interface, map_error(avahi_client_errno(sdref->client)), NULL, 0, 0, 0, NULL, 0, sdref->context);
+        break;
+    }
+}
+
+DNSServiceErrorType DNSSD_API DNSServiceQueryRecord (
+    DNSServiceRef *ret_sdref,
+    DNSServiceFlags flags,
+    uint32_t interface,
+    const char *fullname,
+    uint16_t type,
+    uint16_t clazz,
+    DNSServiceQueryRecordReply callback,
+    void *context) {
+
+    DNSServiceErrorType ret = kDNSServiceErr_Unknown;
+    int error;
+    DNSServiceRef sdref = NULL;
+    AvahiIfIndex ifindex;
+
+    AVAHI_WARN_LINKAGE;
+
+    if (!ret_sdref || !fullname)
+        return kDNSServiceErr_BadParam;
+    *ret_sdref = NULL;
+
+    if (interface == kDNSServiceInterfaceIndexLocalOnly || flags != 0) {
+        AVAHI_WARN_UNSUPPORTED;
+        return kDNSServiceErr_Unsupported;
+    }
+
+    if (!(sdref = sdref_new()))
+        return kDNSServiceErr_Unknown;
+
+    sdref->context = context;
+    sdref->query_resolver_callback = callback;
+
+    ASSERT_SUCCESS(pthread_mutex_lock(&sdref->mutex));
+
+    if (!(sdref->client = avahi_client_new(avahi_simple_poll_get(sdref->simple_poll), 0, generic_client_callback, sdref, &error))) {
+        ret =  map_error(error);
+        goto finish;
+    }
+
+    ifindex = interface == kDNSServiceInterfaceIndexAny ? AVAHI_IF_UNSPEC : (AvahiIfIndex) interface;
+
+    if (!(sdref->record_browser = avahi_record_browser_new(sdref->client, ifindex, AVAHI_PROTO_UNSPEC, fullname, clazz, type, 0, query_resolver_callback, sdref))) {
+        ret = map_error(avahi_client_errno(sdref->client));
+        goto finish;
+    }
+
+    ret = kDNSServiceErr_NoError;
+    *ret_sdref = sdref;
+
+finish:
+
+    ASSERT_SUCCESS(pthread_mutex_unlock(&sdref->mutex));
+
+    if (ret != kDNSServiceErr_NoError)
+        DNSServiceRefDeallocate(sdref);
+
+    return ret;
+}
diff --git a/avahi-0.6.31/avahi-compat-libdns_sd/dns_sd.h b/avahi-0.6.31/avahi-compat-libdns_sd/dns_sd.h
new file mode 100644
index 0000000..66e494e
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-libdns_sd/dns_sd.h
@@ -0,0 +1,1722 @@
+/* -*- Mode: C; tab-width: 4 -*-
+ *
+ * Copyright (c) 2003-2004, Apple Computer, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright notice,
+ *     this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright notice,
+ *     this list of conditions and the following disclaimer in the documentation
+ *     and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of its
+ *     contributors may be used to endorse or promote products derived from this
+ *     software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _DNS_SD_H
+#define _DNS_SD_H
+
+#ifdef  __cplusplus
+    extern "C" {
+#endif
+
+/* standard calling convention under Win32 is __stdcall */
+/* Note: When compiling Intel EFI (Extensible Firmware Interface) under MS Visual Studio, the */
+/* _WIN32 symbol is defined by the compiler even though it's NOT compiling code for Windows32 */
+#if defined(_WIN32) && !defined(EFI32) && !defined(EFI64)
+#define DNSSD_API __stdcall
+#else
+#define DNSSD_API
+#endif
+
+/* stdint.h does not exist on FreeBSD 4.x; its types are defined in sys/types.h instead */
+#if defined(__FreeBSD__) && (__FreeBSD__ < 5)
+#include <sys/types.h>
+
+/* Likewise, on Sun, standard integer types are in sys/types.h */
+#elif defined(__sun__)
+#include <sys/types.h>
+
+/* EFI does not have stdint.h, or anything else equivalent */
+#elif defined(EFI32) || defined(EFI64)
+typedef UINT8       uint8_t;
+typedef INT8        int8_t;
+typedef UINT16      uint16_t;
+typedef INT16       int16_t;
+typedef UINT32      uint32_t;
+typedef INT32       int32_t;
+
+/* Windows has its own differences */
+#elif defined(_WIN32)
+#include <windows.h>
+#define _UNUSED
+#define bzero(a, b) memset(a, 0, b)
+#ifndef _MSL_STDINT_H
+typedef UINT8       uint8_t;
+typedef INT8        int8_t;
+typedef UINT16      uint16_t;
+typedef INT16       int16_t;
+typedef UINT32      uint32_t;
+typedef INT32       int32_t;
+#endif
+
+/* All other Posix platforms use stdint.h */
+#else
+#include <stdint.h>
+#endif
+
+/* DNSServiceRef, DNSRecordRef
+ *
+ * Opaque internal data types.
+ * Note: client is responsible for serializing access to these structures if
+ * they are shared between concurrent threads.
+ */
+
+typedef struct _DNSServiceRef_t *DNSServiceRef;
+typedef struct _DNSRecordRef_t *DNSRecordRef;
+
+/* General flags used in functions defined below */
+enum
+    {
+    kDNSServiceFlagsMoreComing          = 0x1,
+    /* MoreComing indicates to a callback that at least one more result is
+     * queued and will be delivered following immediately after this one.
+     * Applications should not update their UI to display browse
+     * results when the MoreComing flag is set, because this would
+     * result in a great deal of ugly flickering on the screen.
+     * Applications should instead wait until until MoreComing is not set,
+     * and then update their UI.
+     * When MoreComing is not set, that doesn't mean there will be no more
+     * answers EVER, just that there are no more answers immediately
+     * available right now at this instant. If more answers become available
+     * in the future they will be delivered as usual.
+     */
+
+    kDNSServiceFlagsAdd                 = 0x2,
+    kDNSServiceFlagsDefault             = 0x4,
+    /* Flags for domain enumeration and browse/query reply callbacks.
+     * "Default" applies only to enumeration and is only valid in
+     * conjuction with "Add".  An enumeration callback with the "Add"
+     * flag NOT set indicates a "Remove", i.e. the domain is no longer
+     * valid.
+     */
+
+    kDNSServiceFlagsNoAutoRename        = 0x8,
+    /* Flag for specifying renaming behavior on name conflict when registering
+     * non-shared records. By default, name conflicts are automatically handled
+     * by renaming the service.  NoAutoRename overrides this behavior - with this
+     * flag set, name conflicts will result in a callback.  The NoAutorename flag
+     * is only valid if a name is explicitly specified when registering a service
+     * (i.e. the default name is not used.)
+     */
+
+    kDNSServiceFlagsShared              = 0x10,
+    kDNSServiceFlagsUnique              = 0x20,
+    /* Flag for registering individual records on a connected
+     * DNSServiceRef.  Shared indicates that there may be multiple records
+     * with this name on the network (e.g. PTR records).  Unique indicates that the
+     * record's name is to be unique on the network (e.g. SRV records).
+     */
+
+    kDNSServiceFlagsBrowseDomains       = 0x40,
+    kDNSServiceFlagsRegistrationDomains = 0x80,
+    /* Flags for specifying domain enumeration type in DNSServiceEnumerateDomains.
+     * BrowseDomains enumerates domains recommended for browsing, RegistrationDomains
+     * enumerates domains recommended for registration.
+     */
+
+    kDNSServiceFlagsLongLivedQuery      = 0x100,
+    /* Flag for creating a long-lived unicast query for the DNSServiceQueryRecord call. */
+
+    kDNSServiceFlagsAllowRemoteQuery    = 0x200,
+    /* Flag for creating a record for which we will answer remote queries
+     * (queries from hosts more than one hop away; hosts not directly connected to the local link).
+     */
+
+    kDNSServiceFlagsForceMulticast      = 0x400,
+    /* Flag for signifying that a query or registration should be performed exclusively via multicast DNS,
+     * even for a name in a domain (e.g. foo.apple.com.) that would normally imply unicast DNS.
+     */
+
+    kDNSServiceFlagsReturnCNAME         = 0x800
+    /* Flag for returning CNAME records in the DNSServiceQueryRecord call. CNAME records are
+     * normally followed without indicating to the client that there was a CNAME record.
+     */
+    };
+
+/*
+ * The values for DNS Classes and Types are listed in RFC 1035, and are available
+ * on every OS in its DNS header file. Unfortunately every OS does not have the
+ * same header file containing DNS Class and Type constants, and the names of
+ * the constants are not consistent. For example, BIND 8 uses "T_A",
+ * BIND 9 uses "ns_t_a", Windows uses "DNS_TYPE_A", etc.
+ * For this reason, these constants are also listed here, so that code using
+ * the DNS-SD programming APIs can use these constants, so that the same code
+ * can compile on all our supported platforms.
+ */
+
+enum
+    {
+    kDNSServiceClass_IN       = 1       /* Internet */
+    };
+
+enum
+    {
+    kDNSServiceType_A         = 1,      /* Host address. */
+    kDNSServiceType_NS        = 2,      /* Authoritative server. */
+    kDNSServiceType_MD        = 3,      /* Mail destination. */
+    kDNSServiceType_MF        = 4,      /* Mail forwarder. */
+    kDNSServiceType_CNAME     = 5,      /* Canonical name. */
+    kDNSServiceType_SOA       = 6,      /* Start of authority zone. */
+    kDNSServiceType_MB        = 7,      /* Mailbox domain name. */
+    kDNSServiceType_MG        = 8,      /* Mail group member. */
+    kDNSServiceType_MR        = 9,      /* Mail rename name. */
+    kDNSServiceType_NULL      = 10,     /* Null resource record. */
+    kDNSServiceType_WKS       = 11,     /* Well known service. */
+    kDNSServiceType_PTR       = 12,     /* Domain name pointer. */
+    kDNSServiceType_HINFO     = 13,     /* Host information. */
+    kDNSServiceType_MINFO     = 14,     /* Mailbox information. */
+    kDNSServiceType_MX        = 15,     /* Mail routing information. */
+    kDNSServiceType_TXT       = 16,     /* One or more text strings. */
+    kDNSServiceType_RP        = 17,     /* Responsible person. */
+    kDNSServiceType_AFSDB     = 18,     /* AFS cell database. */
+    kDNSServiceType_X25       = 19,     /* X_25 calling address. */
+    kDNSServiceType_ISDN      = 20,     /* ISDN calling address. */
+    kDNSServiceType_RT        = 21,     /* Router. */
+    kDNSServiceType_NSAP      = 22,     /* NSAP address. */
+    kDNSServiceType_NSAP_PTR  = 23,     /* Reverse NSAP lookup (deprecated). */
+    kDNSServiceType_SIG       = 24,     /* Security signature. */
+    kDNSServiceType_KEY       = 25,     /* Security key. */
+    kDNSServiceType_PX        = 26,     /* X.400 mail mapping. */
+    kDNSServiceType_GPOS      = 27,     /* Geographical position (withdrawn). */
+    kDNSServiceType_AAAA      = 28,     /* IPv6 Address. */
+    kDNSServiceType_LOC       = 29,     /* Location Information. */
+    kDNSServiceType_NXT       = 30,     /* Next domain (security). */
+    kDNSServiceType_EID       = 31,     /* Endpoint identifier. */
+    kDNSServiceType_NIMLOC    = 32,     /* Nimrod Locator. */
+    kDNSServiceType_SRV       = 33,     /* Server Selection. */
+    kDNSServiceType_ATMA      = 34,     /* ATM Address */
+    kDNSServiceType_NAPTR     = 35,     /* Naming Authority PoinTeR */
+    kDNSServiceType_KX        = 36,     /* Key Exchange */
+    kDNSServiceType_CERT      = 37,     /* Certification record */
+    kDNSServiceType_A6        = 38,     /* IPv6 Address (deprecated) */
+    kDNSServiceType_DNAME     = 39,     /* Non-terminal DNAME (for IPv6) */
+    kDNSServiceType_SINK      = 40,     /* Kitchen sink (experimentatl) */
+    kDNSServiceType_OPT       = 41,     /* EDNS0 option (meta-RR) */
+    kDNSServiceType_TKEY      = 249,    /* Transaction key */
+    kDNSServiceType_TSIG      = 250,    /* Transaction signature. */
+    kDNSServiceType_IXFR      = 251,    /* Incremental zone transfer. */
+    kDNSServiceType_AXFR      = 252,    /* Transfer zone of authority. */
+    kDNSServiceType_MAILB     = 253,    /* Transfer mailbox records. */
+    kDNSServiceType_MAILA     = 254,    /* Transfer mail agent records. */
+    kDNSServiceType_ANY       = 255     /* Wildcard match. */
+    };
+
+
+/* possible error code values */
+enum
+    {
+    kDNSServiceErr_NoError             = 0,
+    kDNSServiceErr_Unknown             = -65537,       /* 0xFFFE FFFF */
+    kDNSServiceErr_NoSuchName          = -65538,
+    kDNSServiceErr_NoMemory            = -65539,
+    kDNSServiceErr_BadParam            = -65540,
+    kDNSServiceErr_BadReference        = -65541,
+    kDNSServiceErr_BadState            = -65542,
+    kDNSServiceErr_BadFlags            = -65543,
+    kDNSServiceErr_Unsupported         = -65544,
+    kDNSServiceErr_NotInitialized      = -65545,
+    kDNSServiceErr_AlreadyRegistered   = -65547,
+    kDNSServiceErr_NameConflict        = -65548,
+    kDNSServiceErr_Invalid             = -65549,
+    kDNSServiceErr_Firewall            = -65550,
+    kDNSServiceErr_Incompatible        = -65551,        /* client library incompatible with daemon */
+    kDNSServiceErr_BadInterfaceIndex   = -65552,
+    kDNSServiceErr_Refused             = -65553,
+    kDNSServiceErr_NoSuchRecord        = -65554,
+    kDNSServiceErr_NoAuth              = -65555,
+    kDNSServiceErr_NoSuchKey           = -65556,
+    kDNSServiceErr_NATTraversal        = -65557,
+    kDNSServiceErr_DoubleNAT           = -65558,
+    kDNSServiceErr_BadTime             = -65559
+    /* mDNS Error codes are in the range
+     * FFFE FF00 (-65792) to FFFE FFFF (-65537) */
+    };
+
+
+/* Maximum length, in bytes, of a service name represented as a */
+/* literal C-String, including the terminating NULL at the end. */
+
+#define kDNSServiceMaxServiceName 64
+
+/* Maximum length, in bytes, of a domain name represented as an *escaped* C-String */
+/* including the final trailing dot, and the C-String terminating NULL at the end. */
+
+#define kDNSServiceMaxDomainName 1005
+
+/*
+ * Notes on DNS Name Escaping
+ *   -- or --
+ * "Why is kDNSServiceMaxDomainName 1005, when the maximum legal domain name is 255 bytes?"
+ *
+ * All strings used in DNS-SD are UTF-8 strings.
+ * With few exceptions, most are also escaped using standard DNS escaping rules:
+ *
+ *   '\\' represents a single literal '\' in the name
+ *   '\.' represents a single literal '.' in the name
+ *   '\ddd', where ddd is a three-digit decimal value from 000 to 255,
+ *        represents a single literal byte with that value.
+ *   A bare unescaped '.' is a label separator, marking a boundary between domain and subdomain.
+ *
+ * The exceptions, that do not use escaping, are the routines where the full
+ * DNS name of a resource is broken, for convenience, into servicename/regtype/domain.
+ * In these routines, the "servicename" is NOT escaped. It does not need to be, since
+ * it is, by definition, just a single literal string. Any characters in that string
+ * represent exactly what they are. The "regtype" portion is, technically speaking,
+ * escaped, but since legal regtypes are only allowed to contain letters, digits,
+ * and hyphens, there is nothing to escape, so the issue is moot. The "domain"
+ * portion is also escaped, though most domains in use on the public Internet
+ * today, like regtypes, don't contain any characters that need to be escaped.
+ * As DNS-SD becomes more popular, rich-text domains for service discovery will
+ * become common, so software should be written to cope with domains with escaping.
+ *
+ * The servicename may be up to 63 bytes of UTF-8 text (not counting the C-String
+ * terminating NULL at the end). The regtype is of the form _service._tcp or
+ * _service._udp, where the "service" part is 1-14 characters, which may be
+ * letters, digits, or hyphens. The domain part of the three-part name may be
+ * any legal domain, providing that the resulting servicename+regtype+domain
+ * name does not exceed 255 bytes.
+ *
+ * For most software, these issues are transparent. When browsing, the discovered
+ * servicenames should simply be displayed as-is. When resolving, the discovered
+ * servicename/regtype/domain are simply passed unchanged to DNSServiceResolve().
+ * When a DNSServiceResolve() succeeds, the returned fullname is already in
+ * the correct format to pass to standard system DNS APIs such as res_query().
+ * For converting from servicename/regtype/domain to a single properly-escaped
+ * full DNS name, the helper function DNSServiceConstructFullName() is provided.
+ *
+ * The following (highly contrived) example illustrates the escaping process.
+ * Suppose you have an service called "Dr. Smith\Dr. Johnson", of type "_ftp._tcp"
+ * in subdomain "4th. Floor" of subdomain "Building 2" of domain "apple.com."
+ * The full (escaped) DNS name of this service's SRV record would be:
+ * Dr\.\032Smith\\Dr\.\032Johnson._ftp._tcp.4th\.\032Floor.Building\0322.apple.com.
+ */
+
+
+/*
+ * Constants for specifying an interface index
+ *
+ * Specific interface indexes are identified via a 32-bit unsigned integer returned
+ * by the if_nametoindex() family of calls.
+ *
+ * If the client passes 0 for interface index, that means "do the right thing",
+ * which (at present) means, "if the name is in an mDNS local multicast domain
+ * (e.g. 'local.', '254.169.in-addr.arpa.', '{8,9,A,B}.E.F.ip6.arpa.') then multicast
+ * on all applicable interfaces, otherwise send via unicast to the appropriate
+ * DNS server." Normally, most clients will use 0 for interface index to
+ * automatically get the default sensible behaviour.
+ *
+ * If the client passes a positive interface index, then for multicast names that
+ * indicates to do the operation only on that one interface. For unicast names the
+ * interface index is ignored unless kDNSServiceFlagsForceMulticast is also set.
+ *
+ * If the client passes kDNSServiceInterfaceIndexLocalOnly when registering
+ * a service, then that service will be found *only* by other local clients
+ * on the same machine that are browsing using kDNSServiceInterfaceIndexLocalOnly
+ * or kDNSServiceInterfaceIndexAny.
+ * If a client has a 'private' service, accessible only to other processes
+ * running on the same machine, this allows the client to advertise that service
+ * in a way such that it does not inadvertently appear in service lists on
+ * all the other machines on the network.
+ *
+ * If the client passes kDNSServiceInterfaceIndexLocalOnly when browsing
+ * then it will find *all* records registered on that same local machine.
+ * Clients explicitly wishing to discover *only* LocalOnly services can
+ * accomplish this by inspecting the interfaceIndex of each service reported
+ * to their DNSServiceBrowseReply() callback function, and discarding those
+ * where the interface index is not kDNSServiceInterfaceIndexLocalOnly.
+ */
+
+#define kDNSServiceInterfaceIndexAny 0
+#define kDNSServiceInterfaceIndexLocalOnly ( (uint32_t) -1 )
+
+
+typedef uint32_t DNSServiceFlags;
+typedef int32_t DNSServiceErrorType;
+
+
+/*********************************************************************************************
+ *
+ * Unix Domain Socket access, DNSServiceRef deallocation, and data processing functions
+ *
+ *********************************************************************************************/
+
+
+/* DNSServiceRefSockFD()
+ *
+ * Access underlying Unix domain socket for an initialized DNSServiceRef.
+ * The DNS Service Discovery implmementation uses this socket to communicate between
+ * the client and the mDNSResponder daemon.  The application MUST NOT directly read from
+ * or write to this socket.  Access to the socket is provided so that it can be used as a
+ * run loop source, or in a select() loop: when data is available for reading on the socket,
+ * DNSServiceProcessResult() should be called, which will extract the daemon's reply from
+ * the socket, and pass it to the appropriate application callback.  By using a run loop or
+ * select(), results from the daemon can be processed asynchronously.  Without using these
+ * constructs, DNSServiceProcessResult() will block until the response from the daemon arrives.
+ * The client is responsible for ensuring that the data on the socket is processed in a timely
+ * fashion - the daemon may terminate its connection with a client that does not clear its
+ * socket buffer.
+ *
+ * sdRef:            A DNSServiceRef initialized by any of the DNSService calls.
+ *
+ * return value:    The DNSServiceRef's underlying socket descriptor, or -1 on
+ *                  error.
+ */
+
+int DNSSD_API DNSServiceRefSockFD(DNSServiceRef sdRef);
+
+
+/* DNSServiceProcessResult()
+ *
+ * Read a reply from the daemon, calling the appropriate application callback.  This call will
+ * block until the daemon's response is received.  Use DNSServiceRefSockFD() in
+ * conjunction with a run loop or select() to determine the presence of a response from the
+ * server before calling this function to process the reply without blocking.  Call this function
+ * at any point if it is acceptable to block until the daemon's response arrives.  Note that the
+ * client is responsible for ensuring that DNSServiceProcessResult() is called whenever there is
+ * a reply from the daemon - the daemon may terminate its connection with a client that does not
+ * process the daemon's responses.
+ *
+ * sdRef:           A DNSServiceRef initialized by any of the DNSService calls
+ *                  that take a callback parameter.
+ *
+ * return value:    Returns kDNSServiceErr_NoError on success, otherwise returns
+ *                  an error code indicating the specific failure that occurred.
+ */
+
+DNSServiceErrorType DNSSD_API DNSServiceProcessResult(DNSServiceRef sdRef);
+
+
+/* DNSServiceRefDeallocate()
+ *
+ * Terminate a connection with the daemon and free memory associated with the DNSServiceRef.
+ * Any services or records registered with this DNSServiceRef will be deregistered. Any
+ * Browse, Resolve, or Query operations called with this reference will be terminated.
+ *
+ * Note: If the reference's underlying socket is used in a run loop or select() call, it should
+ * be removed BEFORE DNSServiceRefDeallocate() is called, as this function closes the reference's
+ * socket.
+ *
+ * Note: If the reference was initialized with DNSServiceCreateConnection(), any DNSRecordRefs
+ * created via this reference will be invalidated by this call - the resource records are
+ * deregistered, and their DNSRecordRefs may not be used in subsequent functions.  Similarly,
+ * if the reference was initialized with DNSServiceRegister, and an extra resource record was
+ * added to the service via DNSServiceAddRecord(), the DNSRecordRef created by the Add() call
+ * is invalidated when this function is called - the DNSRecordRef may not be used in subsequent
+ * functions.
+ *
+ * Note: This call is to be used only with the DNSServiceRef defined by this API.  It is
+ * not compatible with dns_service_discovery_ref objects defined in the legacy Mach-based
+ * DNSServiceDiscovery.h API.
+ *
+ * sdRef:           A DNSServiceRef initialized by any of the DNSService calls.
+ *
+ */
+
+void DNSSD_API DNSServiceRefDeallocate(DNSServiceRef sdRef);
+
+
+/*********************************************************************************************
+ *
+ * Domain Enumeration
+ *
+ *********************************************************************************************/
+
+/* DNSServiceEnumerateDomains()
+ *
+ * Asynchronously enumerate domains available for browsing and registration.
+ *
+ * The enumeration MUST be cancelled via DNSServiceRefDeallocate() when no more domains
+ * are to be found.
+ *
+ * Note that the names returned are (like all of DNS-SD) UTF-8 strings,
+ * and are escaped using standard DNS escaping rules.
+ * (See "Notes on DNS Name Escaping" earlier in this file for more details.)
+ * A graphical browser displaying a hierarchical tree-structured view should cut
+ * the names at the bare dots to yield individual labels, then de-escape each
+ * label according to the escaping rules, and then display the resulting UTF-8 text.
+ *
+ * DNSServiceDomainEnumReply Callback Parameters:
+ *
+ * sdRef:           The DNSServiceRef initialized by DNSServiceEnumerateDomains().
+ *
+ * flags:           Possible values are:
+ *                  kDNSServiceFlagsMoreComing
+ *                  kDNSServiceFlagsAdd
+ *                  kDNSServiceFlagsDefault
+ *
+ * interfaceIndex:  Specifies the interface on which the domain exists.  (The index for a given
+ *                  interface is determined via the if_nametoindex() family of calls.)
+ *
+ * errorCode:       Will be kDNSServiceErr_NoError (0) on success, otherwise indicates
+ *                  the failure that occurred (other parameters are undefined if errorCode is nonzero).
+ *
+ * replyDomain:     The name of the domain.
+ *
+ * context:         The context pointer passed to DNSServiceEnumerateDomains.
+ *
+ */
+
+typedef void (DNSSD_API *DNSServiceDomainEnumReply)
+    (
+    DNSServiceRef                       sdRef,
+    DNSServiceFlags                     flags,
+    uint32_t                            interfaceIndex,
+    DNSServiceErrorType                 errorCode,
+    const char                          *replyDomain,
+    void                                *context
+    );
+
+
+/* DNSServiceEnumerateDomains() Parameters:
+ *
+ *
+ * sdRef:           A pointer to an uninitialized DNSServiceRef. If the call succeeds
+ *                  then it initializes the DNSServiceRef, returns kDNSServiceErr_NoError,
+ *                  and the enumeration operation will run indefinitely until the client
+ *                  terminates it by passing this DNSServiceRef to DNSServiceRefDeallocate().
+ *
+ * flags:           Possible values are:
+ *                  kDNSServiceFlagsBrowseDomains to enumerate domains recommended for browsing.
+ *                  kDNSServiceFlagsRegistrationDomains to enumerate domains recommended
+ *                  for registration.
+ *
+ * interfaceIndex:  If non-zero, specifies the interface on which to look for domains.
+ *                  (the index for a given interface is determined via the if_nametoindex()
+ *                  family of calls.)  Most applications will pass 0 to enumerate domains on
+ *                  all interfaces. See "Constants for specifying an interface index" for more details.
+ *
+ * callBack:        The function to be called when a domain is found or the call asynchronously
+ *                  fails.
+ *
+ * context:         An application context pointer which is passed to the callback function
+ *                  (may be NULL).
+ *
+ * return value:    Returns kDNSServiceErr_NoError on succeses (any subsequent, asynchronous
+ *                  errors are delivered to the callback), otherwise returns an error code indicating
+ *                  the error that occurred (the callback is not invoked and the DNSServiceRef
+ *                  is not initialized.)
+ */
+
+DNSServiceErrorType DNSSD_API DNSServiceEnumerateDomains
+    (
+    DNSServiceRef                       *sdRef,
+    DNSServiceFlags                     flags,
+    uint32_t                            interfaceIndex,
+    DNSServiceDomainEnumReply           callBack,
+    void                                *context  /* may be NULL */
+    );
+
+
+/*********************************************************************************************
+ *
+ *  Service Registration
+ *
+ *********************************************************************************************/
+
+/* Register a service that is discovered via Browse() and Resolve() calls.
+ *
+ *
+ * DNSServiceRegisterReply() Callback Parameters:
+ *
+ * sdRef:           The DNSServiceRef initialized by DNSServiceRegister().
+ *
+ * flags:           Currently unused, reserved for future use.
+ *
+ * errorCode:       Will be kDNSServiceErr_NoError on success, otherwise will
+ *                  indicate the failure that occurred (including name conflicts,
+ *                  if the kDNSServiceFlagsNoAutoRename flag was used when registering.)
+ *                  Other parameters are undefined if errorCode is nonzero.
+ *
+ * name:            The service name registered (if the application did not specify a name in
+ *                  DNSServiceRegister(), this indicates what name was automatically chosen).
+ *
+ * regtype:         The type of service registered, as it was passed to the callout.
+ *
+ * domain:          The domain on which the service was registered (if the application did not
+ *                  specify a domain in DNSServiceRegister(), this indicates the default domain
+ *                  on which the service was registered).
+ *
+ * context:         The context pointer that was passed to the callout.
+ *
+ */
+
+typedef void (DNSSD_API *DNSServiceRegisterReply)
+    (
+    DNSServiceRef                       sdRef,
+    DNSServiceFlags                     flags,
+    DNSServiceErrorType                 errorCode,
+    const char                          *name,
+    const char                          *regtype,
+    const char                          *domain,
+    void                                *context
+    );
+
+
+/* DNSServiceRegister()  Parameters:
+ *
+ * sdRef:           A pointer to an uninitialized DNSServiceRef. If the call succeeds
+ *                  then it initializes the DNSServiceRef, returns kDNSServiceErr_NoError,
+ *                  and the registration will remain active indefinitely until the client
+ *                  terminates it by passing this DNSServiceRef to DNSServiceRefDeallocate().
+ *
+ * interfaceIndex:  If non-zero, specifies the interface on which to register the service
+ *                  (the index for a given interface is determined via the if_nametoindex()
+ *                  family of calls.)  Most applications will pass 0 to register on all
+ *                  available interfaces. See "Constants for specifying an interface index" for more details.
+ *
+ * flags:           Indicates the renaming behavior on name conflict (most applications
+ *                  will pass 0).  See flag definitions above for details.
+ *
+ * name:            If non-NULL, specifies the service name to be registered.
+ *                  Most applications will not specify a name, in which case the computer
+ *                  name is used (this name is communicated to the client via the callback).
+ *                  If a name is specified, it must be 1-63 bytes of UTF-8 text.
+ *                  If the name is longer than 63 bytes it will be automatically truncated
+ *                  to a legal length, unless the NoAutoRename flag is set,
+ *                  in which case kDNSServiceErr_BadParam will be returned.
+ *
+ * regtype:         The service type followed by the protocol, separated by a dot
+ *                  (e.g. "_ftp._tcp"). The service type must be an underscore, followed
+ *                  by 1-14 characters, which may be letters, digits, or hyphens.
+ *                  The transport protocol must be "_tcp" or "_udp". New service types
+ *                  should be registered at <http://www.dns-sd.org/ServiceTypes.html>.
+ *
+ * domain:          If non-NULL, specifies the domain on which to advertise the service.
+ *                  Most applications will not specify a domain, instead automatically
+ *                  registering in the default domain(s).
+ *
+ * host:            If non-NULL, specifies the SRV target host name.  Most applications
+ *                  will not specify a host, instead automatically using the machine's
+ *                  default host name(s).  Note that specifying a non-NULL host does NOT
+ *                  create an address record for that host - the application is responsible
+ *                  for ensuring that the appropriate address record exists, or creating it
+ *                  via DNSServiceRegisterRecord().
+ *
+ * port:            The port, in network byte order, on which the service accepts connections.
+ *                  Pass 0 for a "placeholder" service (i.e. a service that will not be discovered
+ *                  by browsing, but will cause a name conflict if another client tries to
+ *                  register that same name).  Most clients will not use placeholder services.
+ *
+ * txtLen:          The length of the txtRecord, in bytes.  Must be zero if the txtRecord is NULL.
+ *
+ * txtRecord:       The TXT record rdata. A non-NULL txtRecord MUST be a properly formatted DNS
+ *                  TXT record, i.e. <length byte> <data> <length byte> <data> ...
+ *                  Passing NULL for the txtRecord is allowed as a synonym for txtLen=1, txtRecord="",
+ *                  i.e. it creates a TXT record of length one containing a single empty string.
+ *                  RFC 1035 doesn't allow a TXT record to contain *zero* strings, so a single empty
+ *                  string is the smallest legal DNS TXT record.
+ *                  As with the other parameters, the DNSServiceRegister call copies the txtRecord
+ *                  data; e.g. if you allocated the storage for the txtRecord parameter with malloc()
+ *                  then you can safely free that memory right after the DNSServiceRegister call returns.
+ *
+ * callBack:        The function to be called when the registration completes or asynchronously
+ *                  fails.  The client MAY pass NULL for the callback -  The client will NOT be notified
+ *                  of the default values picked on its behalf, and the client will NOT be notified of any
+ *                  asynchronous errors (e.g. out of memory errors, etc.) that may prevent the registration
+ *                  of the service.  The client may NOT pass the NoAutoRename flag if the callback is NULL.
+ *                  The client may still deregister the service at any time via DNSServiceRefDeallocate().
+ *
+ * context:         An application context pointer which is passed to the callback function
+ *                  (may be NULL).
+ *
+ * return value:    Returns kDNSServiceErr_NoError on succeses (any subsequent, asynchronous
+ *                  errors are delivered to the callback), otherwise returns an error code indicating
+ *                  the error that occurred (the callback is never invoked and the DNSServiceRef
+ *                  is not initialized.)
+ */
+
+DNSServiceErrorType DNSSD_API DNSServiceRegister
+    (
+    DNSServiceRef                       *sdRef,
+    DNSServiceFlags                     flags,
+    uint32_t                            interfaceIndex,
+    const char                          *name,         /* may be NULL */
+    const char                          *regtype,
+    const char                          *domain,       /* may be NULL */
+    const char                          *host,         /* may be NULL */
+    uint16_t                            port,
+    uint16_t                            txtLen,
+    const void                          *txtRecord,    /* may be NULL */
+    DNSServiceRegisterReply             callBack,      /* may be NULL */
+    void                                *context       /* may be NULL */
+    );
+
+
+/* DNSServiceAddRecord()
+ *
+ * Add a record to a registered service.  The name of the record will be the same as the
+ * registered service's name.
+ * The record can later be updated or deregistered by passing the RecordRef initialized
+ * by this function to DNSServiceUpdateRecord() or DNSServiceRemoveRecord().
+ *
+ * Note that the DNSServiceAddRecord/UpdateRecord/RemoveRecord are *NOT* thread-safe
+ * with respect to a single DNSServiceRef. If you plan to have multiple threads
+ * in your program simultaneously add, update, or remove records from the same
+ * DNSServiceRef, then it's the caller's responsibility to use a mutext lock
+ * or take similar appropriate precautions to serialize those calls.
+ *
+ *
+ * Parameters;
+ *
+ * sdRef:           A DNSServiceRef initialized by DNSServiceRegister().
+ *
+ * RecordRef:       A pointer to an uninitialized DNSRecordRef.  Upon succesfull completion of this
+ *                  call, this ref may be passed to DNSServiceUpdateRecord() or DNSServiceRemoveRecord().
+ *                  If the above DNSServiceRef is passed to DNSServiceRefDeallocate(), RecordRef is also
+ *                  invalidated and may not be used further.
+ *
+ * flags:           Currently ignored, reserved for future use.
+ *
+ * rrtype:          The type of the record (e.g. kDNSServiceType_TXT, kDNSServiceType_SRV, etc)
+ *
+ * rdlen:           The length, in bytes, of the rdata.
+ *
+ * rdata:           The raw rdata to be contained in the added resource record.
+ *
+ * ttl:             The time to live of the resource record, in seconds.  Pass 0 to use a default value.
+ *
+ * return value:    Returns kDNSServiceErr_NoError on success, otherwise returns an
+ *                  error code indicating the error that occurred (the RecordRef is not initialized).
+ */
+
+DNSServiceErrorType DNSSD_API DNSServiceAddRecord
+    (
+    DNSServiceRef                       sdRef,
+    DNSRecordRef                        *RecordRef,
+    DNSServiceFlags                     flags,
+    uint16_t                            rrtype,
+    uint16_t                            rdlen,
+    const void                          *rdata,
+    uint32_t                            ttl
+    );
+
+
+/* DNSServiceUpdateRecord
+ *
+ * Update a registered resource record.  The record must either be:
+ *   - The primary txt record of a service registered via DNSServiceRegister()
+ *   - A record added to a registered service via DNSServiceAddRecord()
+ *   - An individual record registered by DNSServiceRegisterRecord()
+ *
+ *
+ * Parameters:
+ *
+ * sdRef:           A DNSServiceRef that was initialized by DNSServiceRegister()
+ *                  or DNSServiceCreateConnection().
+ *
+ * RecordRef:       A DNSRecordRef initialized by DNSServiceAddRecord, or NULL to update the
+ *                  service's primary txt record.
+ *
+ * flags:           Currently ignored, reserved for future use.
+ *
+ * rdlen:           The length, in bytes, of the new rdata.
+ *
+ * rdata:           The new rdata to be contained in the updated resource record.
+ *
+ * ttl:             The time to live of the updated resource record, in seconds.
+ *
+ * return value:    Returns kDNSServiceErr_NoError on success, otherwise returns an
+ *                  error code indicating the error that occurred.
+ */
+
+DNSServiceErrorType DNSSD_API DNSServiceUpdateRecord
+    (
+    DNSServiceRef                       sdRef,
+    DNSRecordRef                        RecordRef,     /* may be NULL */
+    DNSServiceFlags                     flags,
+    uint16_t                            rdlen,
+    const void                          *rdata,
+    uint32_t                            ttl
+    );
+
+
+/* DNSServiceRemoveRecord
+ *
+ * Remove a record previously added to a service record set via DNSServiceAddRecord(), or deregister
+ * an record registered individually via DNSServiceRegisterRecord().
+ *
+ * Parameters:
+ *
+ * sdRef:           A DNSServiceRef initialized by DNSServiceRegister() (if the
+ *                  record being removed was registered via DNSServiceAddRecord()) or by
+ *                  DNSServiceCreateConnection() (if the record being removed was registered via
+ *                  DNSServiceRegisterRecord()).
+ *
+ * recordRef:       A DNSRecordRef initialized by a successful call to DNSServiceAddRecord()
+ *                  or DNSServiceRegisterRecord().
+ *
+ * flags:           Currently ignored, reserved for future use.
+ *
+ * return value:    Returns kDNSServiceErr_NoError on success, otherwise returns an
+ *                  error code indicating the error that occurred.
+ */
+
+DNSServiceErrorType DNSSD_API DNSServiceRemoveRecord
+    (
+    DNSServiceRef                 sdRef,
+    DNSRecordRef                  RecordRef,
+    DNSServiceFlags               flags
+    );
+
+
+/*********************************************************************************************
+ *
+ *  Service Discovery
+ *
+ *********************************************************************************************/
+
+/* Browse for instances of a service.
+ *
+ *
+ * DNSServiceBrowseReply() Parameters:
+ *
+ * sdRef:           The DNSServiceRef initialized by DNSServiceBrowse().
+ *
+ * flags:           Possible values are kDNSServiceFlagsMoreComing and kDNSServiceFlagsAdd.
+ *                  See flag definitions for details.
+ *
+ * interfaceIndex:  The interface on which the service is advertised.  This index should
+ *                  be passed to DNSServiceResolve() when resolving the service.
+ *
+ * errorCode:       Will be kDNSServiceErr_NoError (0) on success, otherwise will
+ *                  indicate the failure that occurred.  Other parameters are undefined if
+ *                  the errorCode is nonzero.
+ *
+ * serviceName:     The discovered service name. This name should be displayed to the user,
+ *                  and stored for subsequent use in the DNSServiceResolve() call.
+ *
+ * regtype:         The service type, which is usually (but not always) the same as was passed
+ *                  to DNSServiceBrowse(). One case where the discovered service type may
+ *                  not be the same as the requested service type is when using subtypes:
+ *                  The client may want to browse for only those ftp servers that allow
+ *                  anonymous connections. The client will pass the string "_ftp._tcp,_anon"
+ *                  to DNSServiceBrowse(), but the type of the service that's discovered
+ *                  is simply "_ftp._tcp". The regtype for each discovered service instance
+ *                  should be stored along with the name, so that it can be passed to
+ *                  DNSServiceResolve() when the service is later resolved.
+ *
+ * domain:          The domain of the discovered service instance. This may or may not be the
+ *                  same as the domain that was passed to DNSServiceBrowse(). The domain for each
+ *                  discovered service instance should be stored along with the name, so that
+ *                  it can be passed to DNSServiceResolve() when the service is later resolved.
+ *
+ * context:         The context pointer that was passed to the callout.
+ *
+ */
+
+typedef void (DNSSD_API *DNSServiceBrowseReply)
+    (
+    DNSServiceRef                       sdRef,
+    DNSServiceFlags                     flags,
+    uint32_t                            interfaceIndex,
+    DNSServiceErrorType                 errorCode,
+    const char                          *serviceName,
+    const char                          *regtype,
+    const char                          *replyDomain,
+    void                                *context
+    );
+
+
+/* DNSServiceBrowse() Parameters:
+ *
+ * sdRef:           A pointer to an uninitialized DNSServiceRef. If the call succeeds
+ *                  then it initializes the DNSServiceRef, returns kDNSServiceErr_NoError,
+ *                  and the browse operation will run indefinitely until the client
+ *                  terminates it by passing this DNSServiceRef to DNSServiceRefDeallocate().
+ *
+ * flags:           Currently ignored, reserved for future use.
+ *
+ * interfaceIndex:  If non-zero, specifies the interface on which to browse for services
+ *                  (the index for a given interface is determined via the if_nametoindex()
+ *                  family of calls.)  Most applications will pass 0 to browse on all available
+ *                  interfaces. See "Constants for specifying an interface index" for more details.
+ *
+ * regtype:         The service type being browsed for followed by the protocol, separated by a
+ *                  dot (e.g. "_ftp._tcp").  The transport protocol must be "_tcp" or "_udp".
+ *
+ * domain:          If non-NULL, specifies the domain on which to browse for services.
+ *                  Most applications will not specify a domain, instead browsing on the
+ *                  default domain(s).
+ *
+ * callBack:        The function to be called when an instance of the service being browsed for
+ *                  is found, or if the call asynchronously fails.
+ *
+ * context:         An application context pointer which is passed to the callback function
+ *                  (may be NULL).
+ *
+ * return value:    Returns kDNSServiceErr_NoError on succeses (any subsequent, asynchronous
+ *                  errors are delivered to the callback), otherwise returns an error code indicating
+ *                  the error that occurred (the callback is not invoked and the DNSServiceRef
+ *                  is not initialized.)
+ */
+
+DNSServiceErrorType DNSSD_API DNSServiceBrowse
+    (
+    DNSServiceRef                       *sdRef,
+    DNSServiceFlags                     flags,
+    uint32_t                            interfaceIndex,
+    const char                          *regtype,
+    const char                          *domain,    /* may be NULL */
+    DNSServiceBrowseReply               callBack,
+    void                                *context    /* may be NULL */
+    );
+
+
+/* DNSServiceResolve()
+ *
+ * Resolve a service name discovered via DNSServiceBrowse() to a target host name, port number, and
+ * txt record.
+ *
+ * Note: Applications should NOT use DNSServiceResolve() solely for txt record monitoring - use
+ * DNSServiceQueryRecord() instead, as it is more efficient for this task.
+ *
+ * Note: When the desired results have been returned, the client MUST terminate the resolve by calling
+ * DNSServiceRefDeallocate().
+ *
+ * Note: DNSServiceResolve() behaves correctly for typical services that have a single SRV record
+ * and a single TXT record. To resolve non-standard services with multiple SRV or TXT records,
+ * DNSServiceQueryRecord() should be used.
+ *
+ * DNSServiceResolveReply Callback Parameters:
+ *
+ * sdRef:           The DNSServiceRef initialized by DNSServiceResolve().
+ *
+ * flags:           Currently unused, reserved for future use.
+ *
+ * interfaceIndex:  The interface on which the service was resolved.
+ *
+ * errorCode:       Will be kDNSServiceErr_NoError (0) on success, otherwise will
+ *                  indicate the failure that occurred.  Other parameters are undefined if
+ *                  the errorCode is nonzero.
+ *
+ * fullname:        The full service domain name, in the form <servicename>.<protocol>.<domain>.
+ *                  (This name is escaped following standard DNS rules, making it suitable for
+ *                  passing to standard system DNS APIs such as res_query(), or to the
+ *                  special-purpose functions included in this API that take fullname parameters.
+ *                  See "Notes on DNS Name Escaping" earlier in this file for more details.)
+ *
+ * hosttarget:      The target hostname of the machine providing the service.  This name can
+ *                  be passed to functions like gethostbyname() to identify the host's IP address.
+ *
+ * port:            The port, in network byte order, on which connections are accepted for this service.
+ *
+ * txtLen:          The length of the txt record, in bytes.
+ *
+ * txtRecord:       The service's primary txt record, in standard txt record format.
+ *
+ * context:         The context pointer that was passed to the callout.
+ *
+ * NOTE: In earlier versions of this header file, the txtRecord parameter was declared "const char *"
+ * This is incorrect, since it contains length bytes which are values in the range 0 to 255, not -128 to +127.
+ * Depending on your compiler settings, this change may cause signed/unsigned mismatch warnings.
+ * These should be fixed by updating your own callback function definition to match the corrected
+ * function signature using "const unsigned char *txtRecord". Making this change may also fix inadvertent
+ * bugs in your callback function, where it could have incorrectly interpreted a length byte with value 250
+ * as being -6 instead, with various bad consequences ranging from incorrect operation to software crashes.
+ * If you need to maintain portable code that will compile cleanly with both the old and new versions of
+ * this header file, you should update your callback function definition to use the correct unsigned value,
+ * and then in the place where you pass your callback function to DNSServiceResolve(), use a cast to eliminate
+ * the compiler warning, e.g.:
+ *   DNSServiceResolve(sd, flags, index, name, regtype, domain, (DNSServiceResolveReply)MyCallback, context);
+ * This will ensure that your code compiles cleanly without warnings (and more importantly, works correctly)
+ * with both the old header and with the new corrected version.
+ *
+ */
+
+typedef void (DNSSD_API *DNSServiceResolveReply)
+    (
+    DNSServiceRef                       sdRef,
+    DNSServiceFlags                     flags,
+    uint32_t                            interfaceIndex,
+    DNSServiceErrorType                 errorCode,
+    const char                          *fullname,
+    const char                          *hosttarget,
+    uint16_t                            port,
+    uint16_t                            txtLen,
+    const unsigned char                 *txtRecord,
+    void                                *context
+    );
+
+
+/* DNSServiceResolve() Parameters
+ *
+ * sdRef:           A pointer to an uninitialized DNSServiceRef. If the call succeeds
+ *                  then it initializes the DNSServiceRef, returns kDNSServiceErr_NoError,
+ *                  and the resolve operation will run indefinitely until the client
+ *                  terminates it by passing this DNSServiceRef to DNSServiceRefDeallocate().
+ *
+ * flags:           Currently ignored, reserved for future use.
+ *
+ * interfaceIndex:  The interface on which to resolve the service. If this resolve call is
+ *                  as a result of a currently active DNSServiceBrowse() operation, then the
+ *                  interfaceIndex should be the index reported in the DNSServiceBrowseReply
+ *                  callback. If this resolve call is using information previously saved
+ *                  (e.g. in a preference file) for later use, then use interfaceIndex 0, because
+ *                  the desired service may now be reachable via a different physical interface.
+ *                  See "Constants for specifying an interface index" for more details.
+ *
+ * name:            The name of the service instance to be resolved, as reported to the
+ *                  DNSServiceBrowseReply() callback.
+ *
+ * regtype:         The type of the service instance to be resolved, as reported to the
+ *                  DNSServiceBrowseReply() callback.
+ *
+ * domain:          The domain of the service instance to be resolved, as reported to the
+ *                  DNSServiceBrowseReply() callback.
+ *
+ * callBack:        The function to be called when a result is found, or if the call
+ *                  asynchronously fails.
+ *
+ * context:         An application context pointer which is passed to the callback function
+ *                  (may be NULL).
+ *
+ * return value:    Returns kDNSServiceErr_NoError on succeses (any subsequent, asynchronous
+ *                  errors are delivered to the callback), otherwise returns an error code indicating
+ *                  the error that occurred (the callback is never invoked and the DNSServiceRef
+ *                  is not initialized.)
+ */
+
+DNSServiceErrorType DNSSD_API DNSServiceResolve
+    (
+    DNSServiceRef                       *sdRef,
+    DNSServiceFlags                     flags,
+    uint32_t                            interfaceIndex,
+    const char                          *name,
+    const char                          *regtype,
+    const char                          *domain,
+    DNSServiceResolveReply              callBack,
+    void                                *context  /* may be NULL */
+    );
+
+
+/*********************************************************************************************
+ *
+ *  Special Purpose Calls (most applications will not use these)
+ *
+ *********************************************************************************************/
+
+/* DNSServiceCreateConnection()
+ *
+ * Create a connection to the daemon allowing efficient registration of
+ * multiple individual records.
+ *
+ *
+ * Parameters:
+ *
+ * sdRef:           A pointer to an uninitialized DNSServiceRef.  Deallocating
+ *                  the reference (via DNSServiceRefDeallocate()) severs the
+ *                  connection and deregisters all records registered on this connection.
+ *
+ * return value:    Returns kDNSServiceErr_NoError on success, otherwise returns
+ *                  an error code indicating the specific failure that occurred (in which
+ *                  case the DNSServiceRef is not initialized).
+ */
+
+DNSServiceErrorType DNSSD_API DNSServiceCreateConnection(DNSServiceRef *sdRef);
+
+
+/* DNSServiceRegisterRecord
+ *
+ * Register an individual resource record on a connected DNSServiceRef.
+ *
+ * Note that name conflicts occurring for records registered via this call must be handled
+ * by the client in the callback.
+ *
+ *
+ * DNSServiceRegisterRecordReply() parameters:
+ *
+ * sdRef:           The connected DNSServiceRef initialized by
+ *                  DNSServiceCreateConnection().
+ *
+ * RecordRef:       The DNSRecordRef initialized by DNSServiceRegisterRecord().  If the above
+ *                  DNSServiceRef is passed to DNSServiceRefDeallocate(), this DNSRecordRef is
+ *                  invalidated, and may not be used further.
+ *
+ * flags:           Currently unused, reserved for future use.
+ *
+ * errorCode:       Will be kDNSServiceErr_NoError on success, otherwise will
+ *                  indicate the failure that occurred (including name conflicts.)
+ *                  Other parameters are undefined if errorCode is nonzero.
+ *
+ * context:         The context pointer that was passed to the callout.
+ *
+ */
+
+ typedef void (DNSSD_API *DNSServiceRegisterRecordReply)
+    (
+    DNSServiceRef                       sdRef,
+    DNSRecordRef                        RecordRef,
+    DNSServiceFlags                     flags,
+    DNSServiceErrorType                 errorCode,
+    void                                *context
+    );
+
+
+/* DNSServiceRegisterRecord() Parameters:
+ *
+ * sdRef:           A DNSServiceRef initialized by DNSServiceCreateConnection().
+ *
+ * RecordRef:       A pointer to an uninitialized DNSRecordRef.  Upon succesfull completion of this
+ *                  call, this ref may be passed to DNSServiceUpdateRecord() or DNSServiceRemoveRecord().
+ *                  (To deregister ALL records registered on a single connected DNSServiceRef
+ *                  and deallocate each of their corresponding DNSServiceRecordRefs, call
+ *                  DNSServiceRefDealloocate()).
+ *
+ * flags:           Possible values are kDNSServiceFlagsShared or kDNSServiceFlagsUnique
+ *                  (see flag type definitions for details).
+ *
+ * interfaceIndex:  If non-zero, specifies the interface on which to register the record
+ *                  (the index for a given interface is determined via the if_nametoindex()
+ *                  family of calls.)  Passing 0 causes the record to be registered on all interfaces.
+ *                  See "Constants for specifying an interface index" for more details.
+ *
+ * fullname:        The full domain name of the resource record.
+ *
+ * rrtype:          The numerical type of the resource record (e.g. kDNSServiceType_PTR, kDNSServiceType_SRV, etc)
+ *
+ * rrclass:         The class of the resource record (usually kDNSServiceClass_IN)
+ *
+ * rdlen:           Length, in bytes, of the rdata.
+ *
+ * rdata:           A pointer to the raw rdata, as it is to appear in the DNS record.
+ *
+ * ttl:             The time to live of the resource record, in seconds.  Pass 0 to use a default value.
+ *
+ * callBack:        The function to be called when a result is found, or if the call
+ *                  asynchronously fails (e.g. because of a name conflict.)
+ *
+ * context:         An application context pointer which is passed to the callback function
+ *                  (may be NULL).
+ *
+ * return value:    Returns kDNSServiceErr_NoError on succeses (any subsequent, asynchronous
+ *                  errors are delivered to the callback), otherwise returns an error code indicating
+ *                  the error that occurred (the callback is never invoked and the DNSRecordRef is
+ *                  not initialized.)
+ */
+
+DNSServiceErrorType DNSSD_API DNSServiceRegisterRecord
+    (
+    DNSServiceRef                       sdRef,
+    DNSRecordRef                        *RecordRef,
+    DNSServiceFlags                     flags,
+    uint32_t                            interfaceIndex,
+    const char                          *fullname,
+    uint16_t                            rrtype,
+    uint16_t                            rrclass,
+    uint16_t                            rdlen,
+    const void                          *rdata,
+    uint32_t                            ttl,
+    DNSServiceRegisterRecordReply       callBack,
+    void                                *context    /* may be NULL */
+    );
+
+
+/* DNSServiceQueryRecord
+ *
+ * Query for an arbitrary DNS record.
+ *
+ *
+ * DNSServiceQueryRecordReply() Callback Parameters:
+ *
+ * sdRef:           The DNSServiceRef initialized by DNSServiceQueryRecord().
+ *
+ * flags:           Possible values are kDNSServiceFlagsMoreComing and
+ *                  kDNSServiceFlagsAdd.  The Add flag is NOT set for PTR records
+ *                  with a ttl of 0, i.e. "Remove" events.
+ *
+ * interfaceIndex:  The interface on which the query was resolved (the index for a given
+ *                  interface is determined via the if_nametoindex() family of calls).
+ *                  See "Constants for specifying an interface index" for more details.
+ *
+ * errorCode:       Will be kDNSServiceErr_NoError on success, otherwise will
+ *                  indicate the failure that occurred.  Other parameters are undefined if
+ *                  errorCode is nonzero.
+ *
+ * fullname:        The resource record's full domain name.
+ *
+ * rrtype:          The resource record's type (e.g. kDNSServiceType_PTR, kDNSServiceType_SRV, etc)
+ *
+ * rrclass:         The class of the resource record (usually kDNSServiceClass_IN).
+ *
+ * rdlen:           The length, in bytes, of the resource record rdata.
+ *
+ * rdata:           The raw rdata of the resource record.
+ *
+ * ttl:             The resource record's time to live, in seconds.
+ *
+ * context:         The context pointer that was passed to the callout.
+ *
+ */
+
+typedef void (DNSSD_API *DNSServiceQueryRecordReply)
+    (
+    DNSServiceRef                       DNSServiceRef,
+    DNSServiceFlags                     flags,
+    uint32_t                            interfaceIndex,
+    DNSServiceErrorType                 errorCode,
+    const char                          *fullname,
+    uint16_t                            rrtype,
+    uint16_t                            rrclass,
+    uint16_t                            rdlen,
+    const void                          *rdata,
+    uint32_t                            ttl,
+    void                                *context
+    );
+
+
+/* DNSServiceQueryRecord() Parameters:
+ *
+ * sdRef:           A pointer to an uninitialized DNSServiceRef. If the call succeeds
+ *                  then it initializes the DNSServiceRef, returns kDNSServiceErr_NoError,
+ *                  and the query operation will run indefinitely until the client
+ *                  terminates it by passing this DNSServiceRef to DNSServiceRefDeallocate().
+ *
+ * flags:           Pass kDNSServiceFlagsLongLivedQuery to create a "long-lived" unicast
+ *                  query in a non-local domain.  Without setting this flag, unicast queries
+ *                  will be one-shot - that is, only answers available at the time of the call
+ *                  will be returned.  By setting this flag, answers (including Add and Remove
+ *                  events) that become available after the initial call is made will generate
+ *                  callbacks.  This flag has no effect on link-local multicast queries.
+ *
+ * interfaceIndex:  If non-zero, specifies the interface on which to issue the query
+ *                  (the index for a given interface is determined via the if_nametoindex()
+ *                  family of calls.)  Passing 0 causes the name to be queried for on all
+ *                  interfaces. See "Constants for specifying an interface index" for more details.
+ *
+ * fullname:        The full domain name of the resource record to be queried for.
+ *
+ * rrtype:          The numerical type of the resource record to be queried for
+ *                  (e.g. kDNSServiceType_PTR, kDNSServiceType_SRV, etc)
+ *
+ * rrclass:         The class of the resource record (usually kDNSServiceClass_IN).
+ *
+ * callBack:        The function to be called when a result is found, or if the call
+ *                  asynchronously fails.
+ *
+ * context:         An application context pointer which is passed to the callback function
+ *                  (may be NULL).
+ *
+ * return value:    Returns kDNSServiceErr_NoError on succeses (any subsequent, asynchronous
+ *                  errors are delivered to the callback), otherwise returns an error code indicating
+ *                  the error that occurred (the callback is never invoked and the DNSServiceRef
+ *                  is not initialized.)
+ */
+
+DNSServiceErrorType DNSSD_API DNSServiceQueryRecord
+    (
+    DNSServiceRef                       *sdRef,
+    DNSServiceFlags                     flags,
+    uint32_t                            interfaceIndex,
+    const char                          *fullname,
+    uint16_t                            rrtype,
+    uint16_t                            rrclass,
+    DNSServiceQueryRecordReply          callBack,
+    void                                *context  /* may be NULL */
+    );
+
+
+/* DNSServiceReconfirmRecord
+ *
+ * Instruct the daemon to verify the validity of a resource record that appears to
+ * be out of date (e.g. because tcp connection to a service's target failed.)
+ * Causes the record to be flushed from the daemon's cache (as well as all other
+ * daemons' caches on the network) if the record is determined to be invalid.
+ *
+ * Parameters:
+ *
+ * flags:           Currently unused, reserved for future use.
+ *
+ * interfaceIndex:  If non-zero, specifies the interface of the record in question.
+ *                  Passing 0 causes all instances of this record to be reconfirmed.
+ *
+ * fullname:        The resource record's full domain name.
+ *
+ * rrtype:          The resource record's type (e.g. kDNSServiceType_PTR, kDNSServiceType_SRV, etc)
+ *
+ * rrclass:         The class of the resource record (usually kDNSServiceClass_IN).
+ *
+ * rdlen:           The length, in bytes, of the resource record rdata.
+ *
+ * rdata:           The raw rdata of the resource record.
+ *
+ */
+
+DNSServiceErrorType DNSSD_API DNSServiceReconfirmRecord
+    (
+    DNSServiceFlags                    flags,
+    uint32_t                           interfaceIndex,
+    const char                         *fullname,
+    uint16_t                           rrtype,
+    uint16_t                           rrclass,
+    uint16_t                           rdlen,
+    const void                         *rdata
+    );
+
+
+/*********************************************************************************************
+ *
+ *  General Utility Functions
+ *
+ *********************************************************************************************/
+
+/* DNSServiceConstructFullName()
+ *
+ * Concatenate a three-part domain name (as returned by the above callbacks) into a
+ * properly-escaped full domain name. Note that callbacks in the above functions ALREADY ESCAPE
+ * strings where necessary.
+ *
+ * Parameters:
+ *
+ * fullName:        A pointer to a buffer that where the resulting full domain name is to be written.
+ *                  The buffer must be kDNSServiceMaxDomainName (1005) bytes in length to
+ *                  accommodate the longest legal domain name without buffer overrun.
+ *
+ * service:         The service name - any dots or backslashes must NOT be escaped.
+ *                  May be NULL (to construct a PTR record name, e.g.
+ *                  "_ftp._tcp.apple.com.").
+ *
+ * regtype:         The service type followed by the protocol, separated by a dot
+ *                  (e.g. "_ftp._tcp").
+ *
+ * domain:          The domain name, e.g. "apple.com.".  Literal dots or backslashes,
+ *                  if any, must be escaped, e.g. "1st\. Floor.apple.com."
+ *
+ * return value:    Returns 0 on success, -1 on error.
+ *
+ */
+
+int DNSSD_API DNSServiceConstructFullName
+    (
+    char                            *fullName,
+    const char                      *service,      /* may be NULL */
+    const char                      *regtype,
+    const char                      *domain
+    );
+
+
+/*********************************************************************************************
+ *
+ *   TXT Record Construction Functions
+ *
+ *********************************************************************************************/
+
+/*
+ * A typical calling sequence for TXT record construction is something like:
+ *
+ * Client allocates storage for TXTRecord data (e.g. declare buffer on the stack)
+ * TXTRecordCreate();
+ * TXTRecordSetValue();
+ * TXTRecordSetValue();
+ * TXTRecordSetValue();
+ * ...
+ * DNSServiceRegister( ... TXTRecordGetLength(), TXTRecordGetBytesPtr() ... );
+ * TXTRecordDeallocate();
+ * Explicitly deallocate storage for TXTRecord data (if not allocated on the stack)
+ */
+
+
+/* TXTRecordRef
+ *
+ * Opaque internal data type.
+ * Note: Represents a DNS-SD TXT record.
+ */
+
+typedef union _TXTRecordRef_t { char PrivateData[16]; char *ForceNaturalAlignment; } TXTRecordRef;
+
+
+/* TXTRecordCreate()
+ *
+ * Creates a new empty TXTRecordRef referencing the specified storage.
+ *
+ * If the buffer parameter is NULL, or the specified storage size is not
+ * large enough to hold a key subsequently added using TXTRecordSetValue(),
+ * then additional memory will be added as needed using malloc().
+ *
+ * On some platforms, when memory is low, malloc() may fail. In this
+ * case, TXTRecordSetValue() will return kDNSServiceErr_NoMemory, and this
+ * error condition will need to be handled as appropriate by the caller.
+ *
+ * You can avoid the need to handle this error condition if you ensure
+ * that the storage you initially provide is large enough to hold all
+ * the key/value pairs that are to be added to the record.
+ * The caller can precompute the exact length required for all of the
+ * key/value pairs to be added, or simply provide a fixed-sized buffer
+ * known in advance to be large enough.
+ * A no-value (key-only) key requires  (1 + key length) bytes.
+ * A key with empty value requires     (1 + key length + 1) bytes.
+ * A key with non-empty value requires (1 + key length + 1 + value length).
+ * For most applications, DNS-SD TXT records are generally
+ * less than 100 bytes, so in most cases a simple fixed-sized
+ * 256-byte buffer will be more than sufficient.
+ * Recommended size limits for DNS-SD TXT Records are discussed in
+ * <http://files.dns-sd.org/draft-cheshire-dnsext-dns-sd.txt>
+ *
+ * Note: When passing parameters to and from these TXT record APIs,
+ * the key name does not include the '=' character. The '=' character
+ * is the separator between the key and value in the on-the-wire
+ * packet format; it is not part of either the key or the value.
+ *
+ * txtRecord:       A pointer to an uninitialized TXTRecordRef.
+ *
+ * bufferLen:       The size of the storage provided in the "buffer" parameter.
+ *
+ * buffer:          Optional caller-supplied storage used to hold the TXTRecord data.
+ *                  This storage must remain valid for as long as
+ *                  the TXTRecordRef.
+ */
+
+void DNSSD_API TXTRecordCreate
+    (
+    TXTRecordRef     *txtRecord,
+    uint16_t         bufferLen,
+    void             *buffer
+    );
+
+
+/* TXTRecordDeallocate()
+ *
+ * Releases any resources allocated in the course of preparing a TXT Record
+ * using TXTRecordCreate()/TXTRecordSetValue()/TXTRecordRemoveValue().
+ * Ownership of the buffer provided in TXTRecordCreate() returns to the client.
+ *
+ * txtRecord:           A TXTRecordRef initialized by calling TXTRecordCreate().
+ *
+ */
+
+void DNSSD_API TXTRecordDeallocate
+    (
+    TXTRecordRef     *txtRecord
+    );
+
+
+/* TXTRecordSetValue()
+ *
+ * Adds a key (optionally with value) to a TXTRecordRef. If the "key" already
+ * exists in the TXTRecordRef, then the current value will be replaced with
+ * the new value.
+ * Keys may exist in four states with respect to a given TXT record:
+ *  - Absent (key does not appear at all)
+ *  - Present with no value ("key" appears alone)
+ *  - Present with empty value ("key=" appears in TXT record)
+ *  - Present with non-empty value ("key=value" appears in TXT record)
+ * For more details refer to "Data Syntax for DNS-SD TXT Records" in
+ * <http://files.dns-sd.org/draft-cheshire-dnsext-dns-sd.txt>
+ *
+ * txtRecord:       A TXTRecordRef initialized by calling TXTRecordCreate().
+ *
+ * key:             A null-terminated string which only contains printable ASCII
+ *                  values (0x20-0x7E), excluding '=' (0x3D). Keys should be
+ *                  8 characters or less (not counting the terminating null).
+ *
+ * valueSize:       The size of the value.
+ *
+ * value:           Any binary value. For values that represent
+ *                  textual data, UTF-8 is STRONGLY recommended.
+ *                  For values that represent textual data, valueSize
+ *                  should NOT include the terminating null (if any)
+ *                  at the end of the string.
+ *                  If NULL, then "key" will be added with no value.
+ *                  If non-NULL but valueSize is zero, then "key=" will be
+ *                  added with empty value.
+ *
+ * return value:    Returns kDNSServiceErr_NoError on success.
+ *                  Returns kDNSServiceErr_Invalid if the "key" string contains
+ *                  illegal characters.
+ *                  Returns kDNSServiceErr_NoMemory if adding this key would
+ *                  exceed the available storage.
+ */
+
+DNSServiceErrorType DNSSD_API TXTRecordSetValue
+    (
+    TXTRecordRef     *txtRecord,
+    const char       *key,
+    uint8_t          valueSize,        /* may be zero */
+    const void       *value            /* may be NULL */
+    );
+
+
+/* TXTRecordRemoveValue()
+ *
+ * Removes a key from a TXTRecordRef.  The "key" must be an
+ * ASCII string which exists in the TXTRecordRef.
+ *
+ * txtRecord:       A TXTRecordRef initialized by calling TXTRecordCreate().
+ *
+ * key:             A key name which exists in the TXTRecordRef.
+ *
+ * return value:    Returns kDNSServiceErr_NoError on success.
+ *                  Returns kDNSServiceErr_NoSuchKey if the "key" does not
+ *                  exist in the TXTRecordRef.
+ */
+
+DNSServiceErrorType DNSSD_API TXTRecordRemoveValue
+    (
+    TXTRecordRef     *txtRecord,
+    const char       *key
+    );
+
+
+/* TXTRecordGetLength()
+ *
+ * Allows you to determine the length of the raw bytes within a TXTRecordRef.
+ *
+ * txtRecord:       A TXTRecordRef initialized by calling TXTRecordCreate().
+ *
+ * return value:    Returns the size of the raw bytes inside a TXTRecordRef
+ *                  which you can pass directly to DNSServiceRegister() or
+ *                  to DNSServiceUpdateRecord().
+ *                  Returns 0 if the TXTRecordRef is empty.
+ */
+
+uint16_t DNSSD_API TXTRecordGetLength
+    (
+    const TXTRecordRef *txtRecord
+    );
+
+
+/* TXTRecordGetBytesPtr()
+ *
+ * Allows you to retrieve a pointer to the raw bytes within a TXTRecordRef.
+ *
+ * txtRecord:       A TXTRecordRef initialized by calling TXTRecordCreate().
+ *
+ * return value:    Returns a pointer to the raw bytes inside the TXTRecordRef
+ *                  which you can pass directly to DNSServiceRegister() or
+ *                  to DNSServiceUpdateRecord().
+ */
+
+const void * DNSSD_API TXTRecordGetBytesPtr
+    (
+    const TXTRecordRef *txtRecord
+    );
+
+
+/*********************************************************************************************
+ *
+ *   TXT Record Parsing Functions
+ *
+ *********************************************************************************************/
+
+/*
+ * A typical calling sequence for TXT record parsing is something like:
+ *
+ * Receive TXT record data in DNSServiceResolve() callback
+ * if (TXTRecordContainsKey(txtLen, txtRecord, "key")) then do something
+ * val1ptr = TXTRecordGetValuePtr(txtLen, txtRecord, "key1", &len1);
+ * val2ptr = TXTRecordGetValuePtr(txtLen, txtRecord, "key2", &len2);
+ * ...
+ * bcopy(val1ptr, myval1, len1);
+ * bcopy(val2ptr, myval2, len2);
+ * ...
+ * return;
+ *
+ * If you wish to retain the values after return from the DNSServiceResolve()
+ * callback, then you need to copy the data to your own storage using bcopy()
+ * or similar, as shown in the example above.
+ *
+ * If for some reason you need to parse a TXT record you built yourself
+ * using the TXT record construction functions above, then you can do
+ * that using TXTRecordGetLength and TXTRecordGetBytesPtr calls:
+ * TXTRecordGetValue(TXTRecordGetLength(x), TXTRecordGetBytesPtr(x), key, &len);
+ *
+ * Most applications only fetch keys they know about from a TXT record and
+ * ignore the rest.
+ * However, some debugging tools wish to fetch and display all keys.
+ * To do that, use the TXTRecordGetCount() and TXTRecordGetItemAtIndex() calls.
+ */
+
+/* TXTRecordContainsKey()
+ *
+ * Allows you to determine if a given TXT Record contains a specified key.
+ *
+ * txtLen:          The size of the received TXT Record.
+ *
+ * txtRecord:       Pointer to the received TXT Record bytes.
+ *
+ * key:             A null-terminated ASCII string containing the key name.
+ *
+ * return value:    Returns 1 if the TXT Record contains the specified key.
+ *                  Otherwise, it returns 0.
+ */
+
+int DNSSD_API TXTRecordContainsKey
+    (
+    uint16_t         txtLen,
+    const void       *txtRecord,
+    const char       *key
+    );
+
+
+/* TXTRecordGetValuePtr()
+ *
+ * Allows you to retrieve the value for a given key from a TXT Record.
+ *
+ * txtLen:          The size of the received TXT Record
+ *
+ * txtRecord:       Pointer to the received TXT Record bytes.
+ *
+ * key:             A null-terminated ASCII string containing the key name.
+ *
+ * valueLen:        On output, will be set to the size of the "value" data.
+ *
+ * return value:    Returns NULL if the key does not exist in this TXT record,
+ *                  or exists with no value (to differentiate between
+ *                  these two cases use TXTRecordContainsKey()).
+ *                  Returns pointer to location within TXT Record bytes
+ *                  if the key exists with empty or non-empty value.
+ *                  For empty value, valueLen will be zero.
+ *                  For non-empty value, valueLen will be length of value data.
+ */
+
+const void * DNSSD_API TXTRecordGetValuePtr
+    (
+    uint16_t         txtLen,
+    const void       *txtRecord,
+    const char       *key,
+    uint8_t          *valueLen
+    );
+
+
+/* TXTRecordGetCount()
+ *
+ * Returns the number of keys stored in the TXT Record.  The count
+ * can be used with TXTRecordGetItemAtIndex() to iterate through the keys.
+ *
+ * txtLen:          The size of the received TXT Record.
+ *
+ * txtRecord:       Pointer to the received TXT Record bytes.
+ *
+ * return value:    Returns the total number of keys in the TXT Record.
+ *
+ */
+
+uint16_t DNSSD_API TXTRecordGetCount
+    (
+    uint16_t         txtLen,
+    const void       *txtRecord
+    );
+
+
+/* TXTRecordGetItemAtIndex()
+ *
+ * Allows you to retrieve a key name and value pointer, given an index into
+ * a TXT Record.  Legal index values range from zero to TXTRecordGetCount()-1.
+ * It's also possible to iterate through keys in a TXT record by simply
+ * calling TXTRecordGetItemAtIndex() repeatedly, beginning with index zero
+ * and increasing until TXTRecordGetItemAtIndex() returns kDNSServiceErr_Invalid.
+ *
+ * On return:
+ * For keys with no value, *value is set to NULL and *valueLen is zero.
+ * For keys with empty value, *value is non-NULL and *valueLen is zero.
+ * For keys with non-empty value, *value is non-NULL and *valueLen is non-zero.
+ *
+ * txtLen:          The size of the received TXT Record.
+ *
+ * txtRecord:       Pointer to the received TXT Record bytes.
+ *
+ * index:           An index into the TXT Record.
+ *
+ * keyBufLen:       The size of the string buffer being supplied.
+ *
+ * key:             A string buffer used to store the key name.
+ *                  On return, the buffer contains a null-terminated C string
+ *                  giving the key name. DNS-SD TXT keys are usually
+ *                  8 characters or less. To hold the maximum possible
+ *                  key name, the buffer should be 256 bytes long.
+ *
+ * valueLen:        On output, will be set to the size of the "value" data.
+ *
+ * value:           On output, *value is set to point to location within TXT
+ *                  Record bytes that holds the value data.
+ *
+ * return value:    Returns kDNSServiceErr_NoError on success.
+ *                  Returns kDNSServiceErr_NoMemory if keyBufLen is too short.
+ *                  Returns kDNSServiceErr_Invalid if index is greater than
+ *                  TXTRecordGetCount()-1.
+ */
+
+DNSServiceErrorType DNSSD_API TXTRecordGetItemAtIndex
+    (
+    uint16_t         txtLen,
+    const void       *txtRecord,
+    uint16_t         index,
+    uint16_t         keyBufLen,
+    char             *key,
+    uint8_t          *valueLen,
+    const void       **value
+    );
+
+#ifdef __APPLE_API_PRIVATE
+
+/*
+ * Mac OS X specific functionality
+ * 3rd party clients of this API should not depend on future support or availability of this routine
+ */
+
+/* DNSServiceSetDefaultDomainForUser()
+ *
+ * Set the default domain for the caller's UID.  Future browse and registration
+ * calls by this user that do not specify an explicit domain will browse and
+ * register in this wide-area domain in addition to .local.  In addition, this
+ * domain will be returned as a Browse domain via domain enumeration calls.
+ *
+ *
+ * Parameters:
+ *
+ * flags:           Pass kDNSServiceFlagsAdd to add a domain for a user.  Call without
+ *                  this flag set to clear a previously added domain.
+ *
+ * domain:          The domain to be used for the caller's UID.
+ *
+ * return value:    Returns kDNSServiceErr_NoError on succeses, otherwise returns
+ *                  an error code indicating the error that occurred
+ */
+
+DNSServiceErrorType DNSSD_API DNSServiceSetDefaultDomainForUser
+    (
+    DNSServiceFlags                    flags,
+    const char                         *domain
+    );
+
+#endif //__APPLE_API_PRIVATE
+
+// Some C compiler cleverness. We can make the compiler check certain things for us,
+// and report errors at compile-time if anything is wrong. The usual way to do this would
+// be to use a run-time "if" statement or the conventional run-time "assert" mechanism, but
+// then you don't find out what's wrong until you run the software. This way, if the assertion
+// condition is false, the array size is negative, and the complier complains immediately.
+
+struct DNS_SD_CompileTimeAssertionChecks
+	{
+	char assert0[(sizeof(union _TXTRecordRef_t) == 16) ? 1 : -1];
+	};
+
+#ifdef  __cplusplus
+    }
+#endif
+
+#endif  /* _DNS_SD_H */
diff --git a/avahi-0.6.31/avahi-compat-libdns_sd/null-test.c b/avahi-0.6.31/avahi-compat-libdns_sd/null-test.c
new file mode 100644
index 0000000..8cfb98f
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-libdns_sd/null-test.c
@@ -0,0 +1,71 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <sys/types.h>
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include <avahi-common/gccmacro.h>
+#include <dns_sd.h>
+
+static void reply(
+        AVAHI_GCC_UNUSED DNSServiceRef sdRef,
+        AVAHI_GCC_UNUSED DNSServiceFlags flags,
+        AVAHI_GCC_UNUSED uint32_t interfaceIndex,
+        AVAHI_GCC_UNUSED DNSServiceErrorType errorCode,
+        AVAHI_GCC_UNUSED const char *serviceName,
+        AVAHI_GCC_UNUSED const char *regtype,
+        AVAHI_GCC_UNUSED const char *replyDomain,
+        AVAHI_GCC_UNUSED void *context) {
+}
+
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char*argv[]) {
+
+    DNSServiceRef ref1, ref2, ref3, ref4 = NULL;
+
+    DNSServiceRegister(&ref1, 0, 0, "simple", "_simple._tcp", NULL, NULL, 4711, 0, NULL, NULL, NULL);
+    DNSServiceRegister(&ref2, 0, 0, "subtype #1", "_simple._tcp,_subtype1", NULL, NULL, 4711, 0, NULL, NULL, NULL);
+    DNSServiceRegister(&ref3, 0, 0, "subtype #2", "_simple._tcp,_subtype1,_subtype2", NULL, NULL, 4711, 0, NULL, NULL, NULL);
+
+    DNSServiceRegister(&ref4, 0, 0, "subtype #3", "_simple._tcp,,", NULL, NULL, 4711, 0, NULL, NULL, NULL);
+    assert(!ref4);
+    DNSServiceRegister(&ref4, 0, 0, "subtype #3", "", NULL, NULL, 4711, 0, NULL, NULL, NULL);
+    assert(!ref4);
+    DNSServiceRegister(&ref4, 0, 0, "subtype #3", ",", NULL, NULL, 4711, 0, NULL, NULL, NULL);
+    assert(!ref4);
+    DNSServiceRegister(&ref4, 0, 0, "subtype #3", ",,", NULL, NULL, 4711, 0, NULL, NULL, NULL);
+    assert(!ref4);
+
+    DNSServiceBrowse(&ref4, 0, 0, "_simple._tcp,_gurke", NULL, reply, NULL);
+
+    sleep(20);
+
+    DNSServiceRefDeallocate(ref1);
+    DNSServiceRefDeallocate(ref2);
+    DNSServiceRefDeallocate(ref3);
+    DNSServiceRefDeallocate(ref4);
+
+    return 0;
+}
diff --git a/avahi-0.6.31/avahi-compat-libdns_sd/txt-test.c b/avahi-0.6.31/avahi-compat-libdns_sd/txt-test.c
new file mode 100644
index 0000000..9bf29b4
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-libdns_sd/txt-test.c
@@ -0,0 +1,128 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <sys/types.h>
+#include <assert.h>
+#include <stdio.h>
+
+#include <avahi-common/gccmacro.h>
+#include <dns_sd.h>
+
+static void hexdump(const void* p, size_t size) {
+    const uint8_t *c = p;
+    assert(p);
+
+    printf("Dumping %zu bytes from %p:\n", size, p);
+
+    while (size > 0) {
+        unsigned i;
+
+        for (i = 0; i < 16; i++) {
+            if (i < size)
+                printf("%02x ", c[i]);
+            else
+                printf("   ");
+        }
+
+        for (i = 0; i < 16; i++) {
+            if (i < size)
+                printf("%c", c[i] >= 32 && c[i] < 127 ? c[i] : '.');
+            else
+                printf(" ");
+        }
+
+        printf("\n");
+
+        c += 16;
+
+        if (size <= 16)
+            break;
+
+        size -= 16;
+    }
+}
+
+
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
+    const char *r;
+    TXTRecordRef ref;
+    uint8_t l;
+    const void *p;
+    char k[256];
+
+    TXTRecordCreate(&ref, 0, NULL);
+
+    hexdump(TXTRecordGetBytesPtr(&ref), TXTRecordGetLength(&ref));
+
+    TXTRecordSetValue(&ref, "foo", 7, "lennart");
+    hexdump(TXTRecordGetBytesPtr(&ref), TXTRecordGetLength(&ref));
+
+    TXTRecordSetValue(&ref, "waldo", 5, "rocks");
+    hexdump(TXTRecordGetBytesPtr(&ref), TXTRecordGetLength(&ref));
+
+    TXTRecordSetValue(&ref, "quux", 9, "the_house");
+    hexdump(TXTRecordGetBytesPtr(&ref), TXTRecordGetLength(&ref));
+
+    TXTRecordSetValue(&ref, "yeah", 0, NULL);
+    hexdump(TXTRecordGetBytesPtr(&ref), TXTRecordGetLength(&ref));
+
+    TXTRecordSetValue(&ref, "waldo", 6, "rocked");
+    hexdump(TXTRecordGetBytesPtr(&ref), TXTRecordGetLength(&ref));
+
+    TXTRecordRemoveValue(&ref, "foo");
+    hexdump(TXTRecordGetBytesPtr(&ref), TXTRecordGetLength(&ref));
+
+    TXTRecordRemoveValue(&ref, "waldo");
+    hexdump(TXTRecordGetBytesPtr(&ref), TXTRecordGetLength(&ref));
+
+    TXTRecordSetValue(&ref, "kawumm", 6, "bloerb");
+    hexdump(TXTRecordGetBytesPtr(&ref), TXTRecordGetLength(&ref));
+
+    TXTRecordSetValue(&ref, "one", 1, "1");
+    hexdump(TXTRecordGetBytesPtr(&ref), TXTRecordGetLength(&ref));
+
+    TXTRecordSetValue(&ref, "two", 1, "2");
+    hexdump(TXTRecordGetBytesPtr(&ref), TXTRecordGetLength(&ref));
+
+    TXTRecordSetValue(&ref, "three", 1, "3");
+    hexdump(TXTRecordGetBytesPtr(&ref), TXTRecordGetLength(&ref));
+
+    assert(TXTRecordContainsKey(TXTRecordGetLength(&ref), TXTRecordGetBytesPtr(&ref), "two"));
+    assert(!TXTRecordContainsKey(TXTRecordGetLength(&ref), TXTRecordGetBytesPtr(&ref), "four"));
+
+    r = TXTRecordGetValuePtr(TXTRecordGetLength(&ref), TXTRecordGetBytesPtr(&ref), "kawumm", &l);
+
+    hexdump(r, l);
+
+    assert(TXTRecordGetCount(TXTRecordGetLength(&ref), TXTRecordGetBytesPtr(&ref)) == 6);
+
+    TXTRecordGetItemAtIndex(TXTRecordGetLength(&ref), TXTRecordGetBytesPtr(&ref), 2, sizeof(k), k, &l, &p);
+
+    fprintf(stderr, "key=<%s>\n", k);
+
+    hexdump(p, l);
+
+    assert(TXTRecordGetItemAtIndex(TXTRecordGetLength(&ref), TXTRecordGetBytesPtr(&ref), 20, sizeof(k), k, &l, &p) == kDNSServiceErr_Invalid);
+
+    TXTRecordDeallocate(&ref);
+}
diff --git a/avahi-0.6.31/avahi-compat-libdns_sd/txt.c b/avahi-0.6.31/avahi-compat-libdns_sd/txt.c
new file mode 100644
index 0000000..9d6c116
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-libdns_sd/txt.c
@@ -0,0 +1,489 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <sys/types.h>
+#include <assert.h>
+#include <string.h>
+
+#include <avahi-common/malloc.h>
+
+#include "dns_sd.h"
+#include "warn.h"
+
+typedef struct TXTRecordInternal {
+    uint8_t *buffer, *malloc_buffer;
+    size_t size, max_size;
+} TXTRecordInternal;
+
+#define INTERNAL_PTR(txtref) (* (TXTRecordInternal**) (txtref))
+#define INTERNAL_PTR_CONST(txtref) (* (const TXTRecordInternal* const *) (txtref))
+
+void DNSSD_API TXTRecordCreate(
+    TXTRecordRef *txtref,
+    uint16_t length,
+    void *buffer) {
+
+    TXTRecordInternal *t;
+
+    AVAHI_WARN_LINKAGE;
+
+    assert(txtref);
+
+    /* Apple's API design is flawed in so many ways, including the
+     * fact that it isn't compatible with 64 bit processors. To work
+     * around this we need some magic here which involves allocating
+     * our own memory. Please, Apple, do your homework next time
+     * before designing an API! */
+
+    if ((t = avahi_new(TXTRecordInternal, 1))) {
+        t->buffer = buffer;
+        t->max_size = buffer ? length : (size_t)0;
+        t->size = 0;
+        t->malloc_buffer = NULL;
+    }
+
+    /* If we were unable to allocate memory, we store a NULL pointer
+     * and return a NoMemory error later, is somewhat unclean, but
+     * should work. */
+    INTERNAL_PTR(txtref) = t;
+}
+
+void DNSSD_API TXTRecordDeallocate(TXTRecordRef *txtref) {
+    TXTRecordInternal *t;
+
+    AVAHI_WARN_LINKAGE;
+
+    assert(txtref);
+    t = INTERNAL_PTR(txtref);
+    if (!t)
+        return;
+
+    avahi_free(t->malloc_buffer);
+    avahi_free(t);
+
+    /* Just in case ... */
+    INTERNAL_PTR(txtref) = NULL;
+}
+
+static int make_sure_fits_in(TXTRecordInternal *t, size_t size) {
+    uint8_t *n;
+    size_t nsize;
+
+    assert(t);
+
+    if (t->size + size <= t->max_size)
+        return 0;
+
+    nsize = t->size + size + 100;
+
+    if (nsize > 0xFFFF)
+        return -1;
+
+    if (!(n = avahi_realloc(t->malloc_buffer, nsize)))
+        return -1;
+
+    if (!t->malloc_buffer && t->size)
+        memcpy(n, t->buffer, t->size);
+
+    t->buffer = t->malloc_buffer = n;
+    t->max_size = nsize;
+
+    return 0;
+}
+
+static int remove_key(TXTRecordInternal *t, const char *key) {
+    size_t i;
+    uint8_t *p;
+    size_t key_len;
+    int found = 0;
+
+    key_len = strlen(key);
+    assert(key_len <= 0xFF);
+
+    p = t->buffer;
+    i = 0;
+
+    while (i < t->size) {
+
+        /* Does the item fit in? */
+        assert(*p <= t->size - i - 1);
+
+        /* Key longer than buffer */
+        if (key_len > t->size - i - 1)
+            break;
+
+        if (key_len <= *p &&
+            strncmp(key, (char*) p+1, key_len) == 0 &&
+            (key_len == *p || p[1+key_len] == '=')) {
+
+            uint8_t s;
+
+            /* Key matches, so let's remove it */
+
+            s = *p;
+            memmove(p, p + 1 + *p, t->size - i - *p -1);
+            t->size -= s + 1;
+
+            found = 1;
+        } else {
+            /* Skip to next */
+
+            i += *p +1;
+            p += *p +1;
+        }
+    }
+
+    return found;
+}
+
+DNSServiceErrorType DNSSD_API TXTRecordSetValue(
+    TXTRecordRef *txtref,
+    const char *key,
+    uint8_t length,
+    const void *value) {
+
+    TXTRecordInternal *t;
+    uint8_t *p;
+    size_t l, n;
+
+    AVAHI_WARN_LINKAGE;
+
+    assert(key);
+    assert(txtref);
+
+    l = strlen(key);
+
+    if (*key == 0 || strchr(key, '=') || l > 0xFF) /* Empty or invalid key */
+        return kDNSServiceErr_Invalid;
+
+    if (!(t = INTERNAL_PTR(txtref)))
+        return kDNSServiceErr_NoMemory;
+
+    n = l + (value ? length + 1 : 0);
+
+    if (n > 0xFF)
+        return kDNSServiceErr_Invalid;
+
+    if (make_sure_fits_in(t, 1 + n) < 0)
+        return kDNSServiceErr_NoMemory;
+
+    remove_key(t, key);
+
+    p = t->buffer + t->size;
+
+    *(p++) = (uint8_t) n;
+    t->size ++;
+
+    memcpy(p, key, l);
+    p += l;
+    t->size += l;
+
+    if (value) {
+        *(p++) = '=';
+        memcpy(p, value, length);
+        t->size += length + 1;
+    }
+
+    assert(t->size <= t->max_size);
+
+    return kDNSServiceErr_NoError;
+}
+
+DNSServiceErrorType DNSSD_API TXTRecordRemoveValue(TXTRecordRef *txtref, const char *key) {
+    TXTRecordInternal *t;
+    int found;
+
+    AVAHI_WARN_LINKAGE;
+
+    assert(key);
+    assert(txtref);
+
+    if (*key == 0 || strchr(key, '=') || strlen(key) > 0xFF) /* Empty or invalid key */
+        return kDNSServiceErr_Invalid;
+
+    if (!(t = INTERNAL_PTR(txtref)))
+        return kDNSServiceErr_NoError;
+
+    found = remove_key(t, key);
+
+    return found ? kDNSServiceErr_NoError : kDNSServiceErr_NoSuchKey;
+}
+
+uint16_t DNSSD_API TXTRecordGetLength(const TXTRecordRef *txtref) {
+    const TXTRecordInternal *t;
+
+    AVAHI_WARN_LINKAGE;
+
+    assert(txtref);
+
+    if (!(t = INTERNAL_PTR_CONST(txtref)))
+        return 0;
+
+    assert(t->size <= 0xFFFF);
+    return (uint16_t) t->size;
+}
+
+const void * DNSSD_API TXTRecordGetBytesPtr(const TXTRecordRef *txtref) {
+    const TXTRecordInternal *t;
+
+    AVAHI_WARN_LINKAGE;
+
+    assert(txtref);
+
+    if (!(t = INTERNAL_PTR_CONST(txtref)) || !t->buffer)
+        return "";
+
+    return t->buffer;
+}
+
+static const uint8_t *find_key(const uint8_t *buffer, size_t size, const char *key) {
+    size_t i;
+    const uint8_t *p;
+    size_t key_len;
+
+    key_len = strlen(key);
+
+    assert(key_len <= 0xFF);
+
+    p = buffer;
+    i = 0;
+
+    while (i < size) {
+
+        /* Does the item fit in? */
+        if (*p > size - i - 1)
+            return NULL;
+
+        /* Key longer than buffer */
+        if (key_len > size - i - 1)
+            return NULL;
+
+        if (key_len <= *p &&
+            strncmp(key, (const char*) p+1, key_len) == 0 &&
+            (key_len == *p || p[1+key_len] == '=')) {
+
+            /* Key matches, so let's return it */
+
+            return p;
+        }
+
+        /* Skip to next */
+        i += *p +1;
+        p += *p +1;
+    }
+
+    return NULL;
+}
+
+int DNSSD_API TXTRecordContainsKey (
+    uint16_t size,
+    const void *buffer,
+    const char *key) {
+
+    AVAHI_WARN_LINKAGE;
+
+    assert(key);
+
+    if (!size)
+        return 0;
+
+    assert(buffer);
+
+    if (!(find_key(buffer, size, key)))
+        return 0;
+
+    return 1;
+}
+
+const void * DNSSD_API TXTRecordGetValuePtr(
+    uint16_t size,
+    const void *buffer,
+    const char *key,
+    uint8_t *value_len) {
+
+    const uint8_t *p;
+    size_t n, l;
+
+    AVAHI_WARN_LINKAGE;
+
+    assert(key);
+
+    if (!size)
+        goto fail;
+
+    if (*key == 0 || strchr(key, '=') || strlen(key) > 0xFF) /* Empty or invalid key */
+        return NULL;
+
+    assert(buffer);
+
+    if (!(p = find_key(buffer, size, key)))
+        goto fail;
+
+    n = *p;
+    l = strlen(key);
+
+    assert(n >= l);
+    p += 1 + l;
+    n -= l;
+
+    if (n <= 0)
+        goto fail;
+
+    assert(*p == '=');
+    p++;
+    n--;
+
+    if (value_len)
+        *value_len = n;
+
+    return p;
+
+fail:
+    if (value_len)
+        *value_len = 0;
+
+    return NULL;
+}
+
+
+uint16_t DNSSD_API TXTRecordGetCount(
+    uint16_t size,
+    const void *buffer) {
+
+    const uint8_t *p;
+    unsigned n = 0;
+    size_t i;
+
+    AVAHI_WARN_LINKAGE;
+
+    if (!size)
+        return 0;
+
+    assert(buffer);
+
+    p = buffer;
+    i = 0;
+
+    while (i < size) {
+
+        /* Does the item fit in? */
+        if (*p > size - i - 1)
+            break;
+
+        n++;
+
+        /* Skip to next */
+        i += *p +1;
+        p += *p +1;
+    }
+
+    assert(n <= 0xFFFF);
+
+    return (uint16_t) n;
+}
+
+DNSServiceErrorType DNSSD_API TXTRecordGetItemAtIndex(
+    uint16_t size,
+    const void *buffer,
+    uint16_t idx,
+    uint16_t key_len,
+    char *key,
+    uint8_t *value_len,
+    const void **value) {
+
+    const uint8_t *p;
+    size_t i;
+    unsigned n = 0;
+    DNSServiceErrorType ret = kDNSServiceErr_Invalid;
+
+    AVAHI_WARN_LINKAGE;
+
+    if (!size)
+        goto fail;
+
+    assert(buffer);
+
+    p = buffer;
+    i = 0;
+
+    while (i < size) {
+
+        /* Does the item fit in? */
+        if (*p > size - i - 1)
+            goto fail;
+
+        if (n >= idx) {
+            size_t l;
+            const uint8_t *d;
+
+            d = memchr(p+1, '=', *p);
+
+            /* Length of key */
+            l = d ? d - p - 1 : *p;
+
+            if (key_len < l+1) {
+                ret = kDNSServiceErr_NoMemory;
+                goto fail;
+            }
+
+            strncpy(key, (const char*) p + 1, l);
+            key[l] = 0;
+
+            if (d) {
+                if (value_len)
+                    *value_len = *p - l - 1;
+
+                if (value)
+                    *value = d + 1;
+            } else {
+
+                if (value_len)
+                    *value_len  = 0;
+
+                if (value)
+                    *value = NULL;
+            }
+
+            return kDNSServiceErr_NoError;
+        }
+
+        n++;
+
+        /* Skip to next */
+        i += *p +1;
+        p += *p +1;
+    }
+
+
+fail:
+
+    if (value)
+        *value = NULL;
+
+    if (value_len)
+        *value_len = 0;
+
+    return ret;
+
+}
diff --git a/avahi-0.6.31/avahi-compat-libdns_sd/unsupported.c b/avahi-0.6.31/avahi-compat-libdns_sd/unsupported.c
new file mode 100644
index 0000000..4e94f70
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-libdns_sd/unsupported.c
@@ -0,0 +1,90 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <avahi-common/gccmacro.h>
+
+#include "dns_sd.h"
+#include "warn.h"
+
+DNSServiceErrorType DNSSD_API DNSServiceRegisterRecord (
+    AVAHI_GCC_UNUSED DNSServiceRef sdRef,
+    AVAHI_GCC_UNUSED DNSRecordRef *RecordRef,
+    AVAHI_GCC_UNUSED DNSServiceFlags flags,
+    AVAHI_GCC_UNUSED uint32_t interfaceIndex,
+    AVAHI_GCC_UNUSED const char *fullname,
+    AVAHI_GCC_UNUSED uint16_t rrtype,
+    AVAHI_GCC_UNUSED uint16_t rrclass,
+    AVAHI_GCC_UNUSED uint16_t rdlen,
+    AVAHI_GCC_UNUSED const void *rdata,
+    AVAHI_GCC_UNUSED uint32_t ttl,
+    AVAHI_GCC_UNUSED DNSServiceRegisterRecordReply callBack,
+    AVAHI_GCC_UNUSED void *context) {
+
+    AVAHI_WARN_UNSUPPORTED;
+
+    return kDNSServiceErr_Unsupported;
+}
+
+DNSServiceErrorType DNSSD_API DNSServiceReconfirmRecord (
+    AVAHI_GCC_UNUSED DNSServiceFlags flags,
+    AVAHI_GCC_UNUSED uint32_t interfaceIndex,
+    AVAHI_GCC_UNUSED const char *fullname,
+    AVAHI_GCC_UNUSED uint16_t rrtype,
+    AVAHI_GCC_UNUSED uint16_t rrclass,
+    AVAHI_GCC_UNUSED uint16_t rdlen,
+    AVAHI_GCC_UNUSED const void *rdata) {
+
+    AVAHI_WARN_UNSUPPORTED;
+
+    return kDNSServiceErr_Unsupported;
+}
+
+DNSServiceErrorType DNSSD_API DNSServiceCreateConnection(AVAHI_GCC_UNUSED DNSServiceRef *sdRef) {
+    AVAHI_WARN_UNSUPPORTED;
+
+    return kDNSServiceErr_Unsupported;
+}
+
+DNSServiceErrorType DNSSD_API DNSServiceAddRecord(
+    AVAHI_GCC_UNUSED DNSServiceRef sdRef,
+    AVAHI_GCC_UNUSED DNSRecordRef *RecordRef,
+    AVAHI_GCC_UNUSED DNSServiceFlags flags,
+    AVAHI_GCC_UNUSED uint16_t rrtype,
+    AVAHI_GCC_UNUSED uint16_t rdlen,
+    AVAHI_GCC_UNUSED const void *rdata,
+    AVAHI_GCC_UNUSED uint32_t ttl) {
+
+    AVAHI_WARN_UNSUPPORTED;
+
+    return kDNSServiceErr_Unsupported;
+}
+
+DNSServiceErrorType DNSSD_API DNSServiceRemoveRecord(
+    AVAHI_GCC_UNUSED DNSServiceRef sdRef,
+    AVAHI_GCC_UNUSED DNSRecordRef RecordRef,
+    AVAHI_GCC_UNUSED DNSServiceFlags flags) {
+
+    AVAHI_WARN_UNSUPPORTED;
+
+    return kDNSServiceErr_Unsupported;
+}
diff --git a/avahi-0.6.31/avahi-compat-libdns_sd/warn.c b/avahi-0.6.31/avahi-compat-libdns_sd/warn.c
new file mode 100644
index 0000000..b311736
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-libdns_sd/warn.c
@@ -0,0 +1,124 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <pthread.h>
+#include <unistd.h>
+#include <limits.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <stdarg.h>
+#include <syslog.h>
+
+#include "warn.h"
+
+#ifndef COMPAT_LAYER
+#define COMPAT_LAYER "Apple Bonjour"
+#endif
+
+#ifndef CGI_SUBSYSTEM
+#define CGI_SUBSYSTEM "libdns_sd"
+#endif
+
+static pthread_mutex_t linkage_mutex = PTHREAD_MUTEX_INITIALIZER;
+static int linkage_warning = 0;
+
+const char *avahi_exe_name(void) {
+#ifdef HAVE_GETPROGNAME
+    return getprogname();
+#elif defined(__linux__)
+    static char exe_name[1024] = "";
+    static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+
+    /* Yes, I know, this is not portable. But who cares? It's for
+     * cosmetics only, anyway. */
+
+    pthread_mutex_lock(&mutex);
+
+    if (exe_name[0] == 0) {
+        int k;
+
+        if ((k = readlink("/proc/self/exe", exe_name, sizeof(exe_name)-1)) < 0)
+            snprintf(exe_name, sizeof(exe_name), "(unknown)");
+        else {
+            char *slash;
+
+            assert((size_t) k <= sizeof(exe_name)-1);
+            exe_name[k] = 0;
+
+            if ((slash = strrchr(exe_name, '/')))
+                memmove(exe_name, slash+1, strlen(slash)+1);
+        }
+    }
+
+    pthread_mutex_unlock(&mutex);
+
+    return exe_name;
+#else
+#ifdef __GNUC__
+#warning "avahi_exe_name() needs to be implemented for your operating system"
+#endif
+    return "(unknown)";
+#endif
+}
+
+void avahi_warn(const char *fmt, ...) {
+    char msg[512]  = "*** WARNING *** ";
+    va_list ap;
+    size_t n;
+
+    assert(fmt);
+
+    va_start(ap, fmt);
+    n = strlen(msg);
+    vsnprintf(msg + n, sizeof(msg) - n, fmt, ap);
+    va_end(ap);
+
+    fprintf(stderr, "%s\n", msg);
+
+    openlog(avahi_exe_name(), LOG_PID, LOG_USER);
+    syslog(LOG_WARNING, "%s", msg);
+    closelog();
+}
+
+void avahi_warn_linkage(void) {
+    int w;
+
+    pthread_mutex_lock(&linkage_mutex);
+    w = linkage_warning;
+    linkage_warning = 1;
+    pthread_mutex_unlock(&linkage_mutex);
+
+    if (!w && !getenv("AVAHI_COMPAT_NOWARN")) {
+        avahi_warn("The program '%s' uses the "COMPAT_LAYER" compatibility layer of Avahi.", avahi_exe_name());
+        avahi_warn("Please fix your application to use the native API of Avahi!");
+        avahi_warn("For more information see <http://0pointer.de/avahi-compat?s="CGI_SUBSYSTEM"&e=%s>", avahi_exe_name());
+    }
+}
+
+void avahi_warn_unsupported(const char *function) {
+    avahi_warn("The program '%s' called '%s()' which is not supported (or only supported partially) in the "COMPAT_LAYER" compatibility layer of Avahi.", avahi_exe_name(), function);
+    avahi_warn("Please fix your application to use the native API of Avahi!");
+    avahi_warn("For more information see <http://0pointer.de/avahi-compat?s="CGI_SUBSYSTEM"&e=%s&f=%s>", avahi_exe_name(), function);
+}
diff --git a/avahi-0.6.31/avahi-compat-libdns_sd/warn.h b/avahi-0.6.31/avahi-compat-libdns_sd/warn.h
new file mode 100644
index 0000000..0a8c2ba
--- /dev/null
+++ b/avahi-0.6.31/avahi-compat-libdns_sd/warn.h
@@ -0,0 +1,36 @@
+#ifndef foowarnhfoo
+#define foowarnhfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+/* This routine works on Linux only, so don't rely on it */
+const char *avahi_exe_name(void);
+
+void avahi_warn_unsupported(const char *function);
+
+void avahi_warn_linkage(void);
+
+void avahi_warn(const char *fmt, ...);
+
+#define AVAHI_WARN_LINKAGE do { avahi_warn_linkage(); } while(0)
+#define AVAHI_WARN_UNSUPPORTED do { avahi_warn_linkage(); avahi_warn_unsupported(__FUNCTION__); } while(0)
+#define AVAHI_WARN_UNSUPPORTED_ABORT do { AVAHI_WARN_UNSUPPORTED; abort(); } while(0)
+
+#endif
diff --git a/avahi-0.6.31/avahi-core.pc.in b/avahi-0.6.31/avahi-core.pc.in
new file mode 100644
index 0000000..52491b4
--- /dev/null
+++ b/avahi-0.6.31/avahi-core.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=${prefix}
+libdir=@libdir@
+includedir=${prefix}/include
+
+Name: avahi-core
+Description: Avahi Multicast DNS Responder (Embeddable Stack)
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir} -lavahi-common -lavahi-core
+Cflags: -D_REENTRANT -I${includedir}
diff --git a/avahi-0.6.31/avahi-core/Makefile.am b/avahi-0.6.31/avahi-core/Makefile.am
new file mode 100644
index 0000000..2f09596
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/Makefile.am
@@ -0,0 +1,173 @@
+# This file is part of avahi.
+#
+# avahi 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 of the
+# License, or (at your option) any later version.
+#
+# avahi 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 General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+AM_CFLAGS=-I$(top_srcdir)
+
+# This cool debug trap works on i386/gcc only
+AM_CFLAGS+='-DDEBUG_TRAP=__asm__("int $$3")'
+
+avahiincludedir=$(includedir)/avahi-core
+
+avahiinclude_HEADERS = \
+	core.h \
+	log.h \
+	rr.h \
+	publish.h \
+	lookup.h
+
+lib_LTLIBRARIES = \
+	libavahi-core.la
+
+if ENABLE_TESTS
+noinst_PROGRAMS = \
+	prioq-test \
+	avahi-test \
+	conformance-test \
+	avahi-reflector \
+	dns-test \
+	dns-spin-test \
+	timeeventq-test \
+	hashmap-test \
+	querier-test \
+	update-test
+
+TESTS = \
+	dns-spin-test \
+	dns-test \
+	hashmap-test
+endif
+
+libavahi_core_la_SOURCES = \
+	timeeventq.c timeeventq.h\
+	iface.c iface.h \
+	server.c internal.h entry.c \
+	prioq.c prioq.h \
+	cache.c cache.h \
+	socket.c socket.h \
+	response-sched.c response-sched.h \
+	query-sched.c query-sched.h \
+	probe-sched.c probe-sched.h \
+	announce.c announce.h \
+	browse.c browse.h \
+	rrlist.c rrlist.h \
+	resolve-host-name.c \
+	resolve-address.c \
+	browse-domain.c \
+	browse-service-type.c \
+	browse-service.c \
+	resolve-service.c \
+	dns.c dns.h \
+	rr.c rr.h rr-util.h \
+	core.h lookup.h publish.h \
+	log.c log.h \
+	browse-dns-server.c \
+	fdutil.h fdutil.c \
+	util.c util.h \
+	hashmap.c hashmap.h \
+	wide-area.c wide-area.h \
+	multicast-lookup.c multicast-lookup.h \
+	querier.c querier.h \
+	addr-util.h addr-util.c \
+	domain-util.h domain-util.c \
+	dns-srv-rr.h
+
+if HAVE_NETLINK
+libavahi_core_la_SOURCES += \
+       iface-linux.c iface-linux.h \
+       netlink.c netlink.h
+else
+if HAVE_PF_ROUTE
+libavahi_core_la_SOURCES += \
+	iface-pfroute.c iface-pfroute.h
+else
+libavahi_core_la_SOURCES += \
+	iface-none.c
+endif
+endif
+
+libavahi_core_la_CFLAGS = $(AM_CFLAGS)
+libavahi_core_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la
+libavahi_core_la_LDFLAGS = $(AM_LDFLAGS)  -version-info $(LIBAVAHI_CORE_VERSION_INFO)
+
+prioq_test_SOURCES = \
+	prioq-test.c  \
+	prioq.c prioq.h
+prioq_test_CFLAGS = $(AM_CFLAGS)
+prioq_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la
+
+avahi_test_SOURCES = \
+	avahi-test.c
+avahi_test_CFLAGS = $(AM_CFLAGS)
+avahi_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la libavahi-core.la
+
+update_test_SOURCES = \
+	update-test.c
+update_test_CFLAGS = $(AM_CFLAGS)
+update_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la libavahi-core.la
+
+querier_test_SOURCES = \
+	querier-test.c
+querier_test_CFLAGS = $(AM_CFLAGS)
+querier_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la libavahi-core.la
+
+conformance_test_SOURCES = \
+	conformance-test.c
+conformance_test_CFLAGS = $(AM_CFLAGS)
+conformance_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la libavahi-core.la
+
+avahi_reflector_SOURCES = \
+	avahi-reflector.c
+avahi_reflector_CFLAGS = $(AM_CFLAGS)
+avahi_reflector_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la libavahi-core.la
+
+dns_test_SOURCES = \
+	dns.c dns.h \
+	dns-test.c \
+	log.c log.h \
+	util.c util.h \
+	rr.c rr.h \
+	hashmap.c hashmap.h \
+	domain-util.c domain-util.h \
+	addr-util.c addr-util.h
+dns_test_CFLAGS = $(AM_CFLAGS)
+dns_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la
+
+dns_spin_test_SOURCES = \
+	dns-spin-test.c
+dns_spin_test_CFLAGS = $(AM_CFLAGS)
+dns_spin_test_LDADD = $(AM_LDADD) libavahi-core.la
+
+timeeventq_test_SOURCES = \
+	timeeventq-test.c \
+	timeeventq.h timeeventq.c \
+	prioq.h prioq.c \
+	log.c log.h
+timeeventq_test_CFLAGS = $(AM_CFLAGS)
+timeeventq_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la
+
+hashmap_test_SOURCES = \
+	hashmap-test.c \
+	hashmap.h hashmap.c \
+	util.h util.c
+hashmap_test_CFLAGS = $(AM_CFLAGS)
+hashmap_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la
+
+valgrind: avahi-test
+	libtool --mode=execute valgrind ./avahi-test
+
+gdb: avahi-test
+	libtool --mode=execute gdb ./avahi-test
diff --git a/avahi-0.6.31/avahi-core/Makefile.in b/avahi-0.6.31/avahi-core/Makefile.in
new file mode 100644
index 0000000..0f56d61
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/Makefile.in
@@ -0,0 +1,1733 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# This file is part of avahi.
+#
+# avahi 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 of the
+# License, or (at your option) any later version.
+#
+# avahi 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 General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@ENABLE_TESTS_TRUE@noinst_PROGRAMS = prioq-test$(EXEEXT) \
+@ENABLE_TESTS_TRUE@	avahi-test$(EXEEXT) \
+@ENABLE_TESTS_TRUE@	conformance-test$(EXEEXT) \
+@ENABLE_TESTS_TRUE@	avahi-reflector$(EXEEXT) dns-test$(EXEEXT) \
+@ENABLE_TESTS_TRUE@	dns-spin-test$(EXEEXT) \
+@ENABLE_TESTS_TRUE@	timeeventq-test$(EXEEXT) \
+@ENABLE_TESTS_TRUE@	hashmap-test$(EXEEXT) querier-test$(EXEEXT) \
+@ENABLE_TESTS_TRUE@	update-test$(EXEEXT)
+@ENABLE_TESTS_TRUE@TESTS = dns-spin-test$(EXEEXT) dns-test$(EXEEXT) \
+@ENABLE_TESTS_TRUE@	hashmap-test$(EXEEXT)
+@HAVE_NETLINK_TRUE@am__append_1 = \
+@HAVE_NETLINK_TRUE@       iface-linux.c iface-linux.h \
+@HAVE_NETLINK_TRUE@       netlink.c netlink.h
+
+@HAVE_NETLINK_FALSE@@HAVE_PF_ROUTE_TRUE@am__append_2 = \
+@HAVE_NETLINK_FALSE@@HAVE_PF_ROUTE_TRUE@	iface-pfroute.c iface-pfroute.h
+
+@HAVE_NETLINK_FALSE@@HAVE_PF_ROUTE_FALSE@am__append_3 = \
+@HAVE_NETLINK_FALSE@@HAVE_PF_ROUTE_FALSE@	iface-none.c
+
+subdir = avahi-core
+DIST_COMMON = $(avahiinclude_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/common/acx_pthread.m4 \
+	$(top_srcdir)/common/gcc_stack_protect.m4 \
+	$(top_srcdir)/common/gcc_visibility.m4 \
+	$(top_srcdir)/common/intltool.m4 \
+	$(top_srcdir)/common/introspection.m4 \
+	$(top_srcdir)/common/libtool.m4 \
+	$(top_srcdir)/common/ltoptions.m4 \
+	$(top_srcdir)/common/ltsugar.m4 \
+	$(top_srcdir)/common/ltversion.m4 \
+	$(top_srcdir)/common/lt~obsolete.m4 \
+	$(top_srcdir)/common/nls.m4 $(top_srcdir)/common/python.m4 \
+	$(top_srcdir)/acinclude.m4 $(top_srcdir)/common/doxygen.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(avahiincludedir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+libavahi_core_la_DEPENDENCIES = ../avahi-common/libavahi-common.la
+am__libavahi_core_la_SOURCES_DIST = timeeventq.c timeeventq.h iface.c \
+	iface.h server.c internal.h entry.c prioq.c prioq.h cache.c \
+	cache.h socket.c socket.h response-sched.c response-sched.h \
+	query-sched.c query-sched.h probe-sched.c probe-sched.h \
+	announce.c announce.h browse.c browse.h rrlist.c rrlist.h \
+	resolve-host-name.c resolve-address.c browse-domain.c \
+	browse-service-type.c browse-service.c resolve-service.c dns.c \
+	dns.h rr.c rr.h rr-util.h core.h lookup.h publish.h log.c \
+	log.h browse-dns-server.c fdutil.h fdutil.c util.c util.h \
+	hashmap.c hashmap.h wide-area.c wide-area.h multicast-lookup.c \
+	multicast-lookup.h querier.c querier.h addr-util.h addr-util.c \
+	domain-util.h domain-util.c dns-srv-rr.h iface-linux.c \
+	iface-linux.h netlink.c netlink.h iface-pfroute.c \
+	iface-pfroute.h iface-none.c
+@HAVE_NETLINK_TRUE@am__objects_1 = libavahi_core_la-iface-linux.lo \
+@HAVE_NETLINK_TRUE@	libavahi_core_la-netlink.lo
+@HAVE_NETLINK_FALSE@@HAVE_PF_ROUTE_TRUE@am__objects_2 = libavahi_core_la-iface-pfroute.lo
+@HAVE_NETLINK_FALSE@@HAVE_PF_ROUTE_FALSE@am__objects_3 = libavahi_core_la-iface-none.lo
+am_libavahi_core_la_OBJECTS = libavahi_core_la-timeeventq.lo \
+	libavahi_core_la-iface.lo libavahi_core_la-server.lo \
+	libavahi_core_la-entry.lo libavahi_core_la-prioq.lo \
+	libavahi_core_la-cache.lo libavahi_core_la-socket.lo \
+	libavahi_core_la-response-sched.lo \
+	libavahi_core_la-query-sched.lo \
+	libavahi_core_la-probe-sched.lo libavahi_core_la-announce.lo \
+	libavahi_core_la-browse.lo libavahi_core_la-rrlist.lo \
+	libavahi_core_la-resolve-host-name.lo \
+	libavahi_core_la-resolve-address.lo \
+	libavahi_core_la-browse-domain.lo \
+	libavahi_core_la-browse-service-type.lo \
+	libavahi_core_la-browse-service.lo \
+	libavahi_core_la-resolve-service.lo libavahi_core_la-dns.lo \
+	libavahi_core_la-rr.lo libavahi_core_la-log.lo \
+	libavahi_core_la-browse-dns-server.lo \
+	libavahi_core_la-fdutil.lo libavahi_core_la-util.lo \
+	libavahi_core_la-hashmap.lo libavahi_core_la-wide-area.lo \
+	libavahi_core_la-multicast-lookup.lo \
+	libavahi_core_la-querier.lo libavahi_core_la-addr-util.lo \
+	libavahi_core_la-domain-util.lo $(am__objects_1) \
+	$(am__objects_2) $(am__objects_3)
+libavahi_core_la_OBJECTS = $(am_libavahi_core_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+libavahi_core_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(libavahi_core_la_CFLAGS) $(CFLAGS) \
+	$(libavahi_core_la_LDFLAGS) $(LDFLAGS) -o $@
+PROGRAMS = $(noinst_PROGRAMS)
+am_avahi_reflector_OBJECTS =  \
+	avahi_reflector-avahi-reflector.$(OBJEXT)
+avahi_reflector_OBJECTS = $(am_avahi_reflector_OBJECTS)
+avahi_reflector_DEPENDENCIES = ../avahi-common/libavahi-common.la \
+	libavahi-core.la
+avahi_reflector_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(avahi_reflector_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+	-o $@
+am_avahi_test_OBJECTS = avahi_test-avahi-test.$(OBJEXT)
+avahi_test_OBJECTS = $(am_avahi_test_OBJECTS)
+avahi_test_DEPENDENCIES = ../avahi-common/libavahi-common.la \
+	libavahi-core.la
+avahi_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(avahi_test_CFLAGS) \
+	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am_conformance_test_OBJECTS =  \
+	conformance_test-conformance-test.$(OBJEXT)
+conformance_test_OBJECTS = $(am_conformance_test_OBJECTS)
+conformance_test_DEPENDENCIES = ../avahi-common/libavahi-common.la \
+	libavahi-core.la
+conformance_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(conformance_test_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+	-o $@
+am_dns_spin_test_OBJECTS = dns_spin_test-dns-spin-test.$(OBJEXT)
+dns_spin_test_OBJECTS = $(am_dns_spin_test_OBJECTS)
+dns_spin_test_DEPENDENCIES = libavahi-core.la
+dns_spin_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(dns_spin_test_CFLAGS) \
+	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am_dns_test_OBJECTS = dns_test-dns.$(OBJEXT) \
+	dns_test-dns-test.$(OBJEXT) dns_test-log.$(OBJEXT) \
+	dns_test-util.$(OBJEXT) dns_test-rr.$(OBJEXT) \
+	dns_test-hashmap.$(OBJEXT) dns_test-domain-util.$(OBJEXT) \
+	dns_test-addr-util.$(OBJEXT)
+dns_test_OBJECTS = $(am_dns_test_OBJECTS)
+dns_test_DEPENDENCIES = ../avahi-common/libavahi-common.la
+dns_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(dns_test_CFLAGS) \
+	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am_hashmap_test_OBJECTS = hashmap_test-hashmap-test.$(OBJEXT) \
+	hashmap_test-hashmap.$(OBJEXT) hashmap_test-util.$(OBJEXT)
+hashmap_test_OBJECTS = $(am_hashmap_test_OBJECTS)
+hashmap_test_DEPENDENCIES = ../avahi-common/libavahi-common.la
+hashmap_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(hashmap_test_CFLAGS) \
+	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am_prioq_test_OBJECTS = prioq_test-prioq-test.$(OBJEXT) \
+	prioq_test-prioq.$(OBJEXT)
+prioq_test_OBJECTS = $(am_prioq_test_OBJECTS)
+prioq_test_DEPENDENCIES = ../avahi-common/libavahi-common.la
+prioq_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(prioq_test_CFLAGS) \
+	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am_querier_test_OBJECTS = querier_test-querier-test.$(OBJEXT)
+querier_test_OBJECTS = $(am_querier_test_OBJECTS)
+querier_test_DEPENDENCIES = ../avahi-common/libavahi-common.la \
+	libavahi-core.la
+querier_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(querier_test_CFLAGS) \
+	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am_timeeventq_test_OBJECTS =  \
+	timeeventq_test-timeeventq-test.$(OBJEXT) \
+	timeeventq_test-timeeventq.$(OBJEXT) \
+	timeeventq_test-prioq.$(OBJEXT) timeeventq_test-log.$(OBJEXT)
+timeeventq_test_OBJECTS = $(am_timeeventq_test_OBJECTS)
+timeeventq_test_DEPENDENCIES = ../avahi-common/libavahi-common.la
+timeeventq_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(timeeventq_test_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+	-o $@
+am_update_test_OBJECTS = update_test-update-test.$(OBJEXT)
+update_test_OBJECTS = $(am_update_test_OBJECTS)
+update_test_DEPENDENCIES = ../avahi-common/libavahi-common.la \
+	libavahi-core.la
+update_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(update_test_CFLAGS) \
+	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC    " $@;
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(libavahi_core_la_SOURCES) $(avahi_reflector_SOURCES) \
+	$(avahi_test_SOURCES) $(conformance_test_SOURCES) \
+	$(dns_spin_test_SOURCES) $(dns_test_SOURCES) \
+	$(hashmap_test_SOURCES) $(prioq_test_SOURCES) \
+	$(querier_test_SOURCES) $(timeeventq_test_SOURCES) \
+	$(update_test_SOURCES)
+DIST_SOURCES = $(am__libavahi_core_la_SOURCES_DIST) \
+	$(avahi_reflector_SOURCES) $(avahi_test_SOURCES) \
+	$(conformance_test_SOURCES) $(dns_spin_test_SOURCES) \
+	$(dns_test_SOURCES) $(hashmap_test_SOURCES) \
+	$(prioq_test_SOURCES) $(querier_test_SOURCES) \
+	$(timeeventq_test_SOURCES) $(update_test_SOURCES)
+HEADERS = $(avahiinclude_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+am__tty_colors = \
+red=; grn=; lgn=; blu=; std=
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AVAHI_AUTOIPD_GROUP = @AVAHI_AUTOIPD_GROUP@
+AVAHI_AUTOIPD_USER = @AVAHI_AUTOIPD_USER@
+AVAHI_GROUP = @AVAHI_GROUP@
+AVAHI_PRIV_ACCESS_GROUP = @AVAHI_PRIV_ACCESS_GROUP@
+AVAHI_USER = @AVAHI_USER@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
+DBUS_SYSTEM_BUS_DEFAULT_ADDRESS = @DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@
+DBUS_SYS_DIR = @DBUS_SYS_DIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+DX_CONFIG = @DX_CONFIG@
+DX_DOCDIR = @DX_DOCDIR@
+DX_DOT = @DX_DOT@
+DX_DOXYGEN = @DX_DOXYGEN@
+DX_DVIPS = @DX_DVIPS@
+DX_EGREP = @DX_EGREP@
+DX_ENV = @DX_ENV@
+DX_FLAG_chi = @DX_FLAG_chi@
+DX_FLAG_chm = @DX_FLAG_chm@
+DX_FLAG_doc = @DX_FLAG_doc@
+DX_FLAG_dot = @DX_FLAG_dot@
+DX_FLAG_html = @DX_FLAG_html@
+DX_FLAG_man = @DX_FLAG_man@
+DX_FLAG_pdf = @DX_FLAG_pdf@
+DX_FLAG_ps = @DX_FLAG_ps@
+DX_FLAG_rtf = @DX_FLAG_rtf@
+DX_FLAG_xml = @DX_FLAG_xml@
+DX_HHC = @DX_HHC@
+DX_LATEX = @DX_LATEX@
+DX_MAKEINDEX = @DX_MAKEINDEX@
+DX_PDFLATEX = @DX_PDFLATEX@
+DX_PERL = @DX_PERL@
+DX_PROJECT = @DX_PROJECT@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GACUTIL = @GACUTIL@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB20_CFLAGS = @GLIB20_CFLAGS@
+GLIB20_LIBS = @GLIB20_LIBS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GOBJECT_CFLAGS = @GOBJECT_CFLAGS@
+GOBJECT_LIBS = @GOBJECT_LIBS@
+GREP = @GREP@
+GTK20_CFLAGS = @GTK20_CFLAGS@
+GTK20_LIBS = @GTK20_LIBS@
+GTK30_CFLAGS = @GTK30_CFLAGS@
+GTK30_LIBS = @GTK30_LIBS@
+HOWL_COMPAT_VERSION = @HOWL_COMPAT_VERSION@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
+INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
+INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
+INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
+INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
+INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
+INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBAVAHI_CLIENT_VERSION_INFO = @LIBAVAHI_CLIENT_VERSION_INFO@
+LIBAVAHI_COMMON_VERSION_INFO = @LIBAVAHI_COMMON_VERSION_INFO@
+LIBAVAHI_COMPAT_HOWL_VERSION_INFO = @LIBAVAHI_COMPAT_HOWL_VERSION_INFO@
+LIBAVAHI_COMPAT_LIBDNS_SD_VERSION_INFO = @LIBAVAHI_COMPAT_LIBDNS_SD_VERSION_INFO@
+LIBAVAHI_CORE_VERSION_INFO = @LIBAVAHI_CORE_VERSION_INFO@
+LIBAVAHI_GLIB_VERSION_INFO = @LIBAVAHI_GLIB_VERSION_INFO@
+LIBAVAHI_GOBJECT_VERSION_INFO = @LIBAVAHI_GOBJECT_VERSION_INFO@
+LIBAVAHI_QT3_VERSION_INFO = @LIBAVAHI_QT3_VERSION_INFO@
+LIBAVAHI_QT4_VERSION_INFO = @LIBAVAHI_QT4_VERSION_INFO@
+LIBAVAHI_UI_VERSION_INFO = @LIBAVAHI_UI_VERSION_INFO@
+LIBDAEMON_CFLAGS = @LIBDAEMON_CFLAGS@
+LIBDAEMON_LIBS = @LIBDAEMON_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MCS = @MCS@
+MDASSEMBLER = @MDASSEMBLER@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MOC_QT3 = @MOC_QT3@
+MOC_QT4 = @MOC_QT4@
+MONODOCER = @MONODOCER@
+MONODOC_CFLAGS = @MONODOC_CFLAGS@
+MONODOC_DIR = @MONODOC_DIR@
+MONODOC_LIBS = @MONODOC_LIBS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+QT3_CFLAGS = @QT3_CFLAGS@
+QT3_LIBS = @QT3_LIBS@
+QT4_CFLAGS = @QT4_CFLAGS@
+QT4_LIBS = @QT4_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STOW = @STOW@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+VISIBILITY_HIDDEN_CFLAGS = @VISIBILITY_HIDDEN_CFLAGS@
+XGETTEXT = @XGETTEXT@
+XML_CFLAGS = @XML_CFLAGS@
+XML_LIBS = @XML_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+avahi_runtime_dir = @avahi_runtime_dir@
+avahi_socket = @avahi_socket@
+avahilocaledir = @avahilocaledir@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+have_pkg_config = @have_pkg_config@
+have_xmltoman = @have_xmltoman@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+interfacesdir = @interfacesdir@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+systemdsystemunitdir = @systemdsystemunitdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# This cool debug trap works on i386/gcc only
+AM_CFLAGS = -I$(top_srcdir) '-DDEBUG_TRAP=__asm__("int $$3")'
+avahiincludedir = $(includedir)/avahi-core
+avahiinclude_HEADERS = \
+	core.h \
+	log.h \
+	rr.h \
+	publish.h \
+	lookup.h
+
+lib_LTLIBRARIES = \
+	libavahi-core.la
+
+libavahi_core_la_SOURCES = timeeventq.c timeeventq.h iface.c iface.h \
+	server.c internal.h entry.c prioq.c prioq.h cache.c cache.h \
+	socket.c socket.h response-sched.c response-sched.h \
+	query-sched.c query-sched.h probe-sched.c probe-sched.h \
+	announce.c announce.h browse.c browse.h rrlist.c rrlist.h \
+	resolve-host-name.c resolve-address.c browse-domain.c \
+	browse-service-type.c browse-service.c resolve-service.c dns.c \
+	dns.h rr.c rr.h rr-util.h core.h lookup.h publish.h log.c \
+	log.h browse-dns-server.c fdutil.h fdutil.c util.c util.h \
+	hashmap.c hashmap.h wide-area.c wide-area.h multicast-lookup.c \
+	multicast-lookup.h querier.c querier.h addr-util.h addr-util.c \
+	domain-util.h domain-util.c dns-srv-rr.h $(am__append_1) \
+	$(am__append_2) $(am__append_3)
+libavahi_core_la_CFLAGS = $(AM_CFLAGS)
+libavahi_core_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la
+libavahi_core_la_LDFLAGS = $(AM_LDFLAGS)  -version-info $(LIBAVAHI_CORE_VERSION_INFO)
+prioq_test_SOURCES = \
+	prioq-test.c  \
+	prioq.c prioq.h
+
+prioq_test_CFLAGS = $(AM_CFLAGS)
+prioq_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la
+avahi_test_SOURCES = \
+	avahi-test.c
+
+avahi_test_CFLAGS = $(AM_CFLAGS)
+avahi_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la libavahi-core.la
+update_test_SOURCES = \
+	update-test.c
+
+update_test_CFLAGS = $(AM_CFLAGS)
+update_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la libavahi-core.la
+querier_test_SOURCES = \
+	querier-test.c
+
+querier_test_CFLAGS = $(AM_CFLAGS)
+querier_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la libavahi-core.la
+conformance_test_SOURCES = \
+	conformance-test.c
+
+conformance_test_CFLAGS = $(AM_CFLAGS)
+conformance_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la libavahi-core.la
+avahi_reflector_SOURCES = \
+	avahi-reflector.c
+
+avahi_reflector_CFLAGS = $(AM_CFLAGS)
+avahi_reflector_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la libavahi-core.la
+dns_test_SOURCES = \
+	dns.c dns.h \
+	dns-test.c \
+	log.c log.h \
+	util.c util.h \
+	rr.c rr.h \
+	hashmap.c hashmap.h \
+	domain-util.c domain-util.h \
+	addr-util.c addr-util.h
+
+dns_test_CFLAGS = $(AM_CFLAGS)
+dns_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la
+dns_spin_test_SOURCES = \
+	dns-spin-test.c
+
+dns_spin_test_CFLAGS = $(AM_CFLAGS)
+dns_spin_test_LDADD = $(AM_LDADD) libavahi-core.la
+timeeventq_test_SOURCES = \
+	timeeventq-test.c \
+	timeeventq.h timeeventq.c \
+	prioq.h prioq.c \
+	log.c log.h
+
+timeeventq_test_CFLAGS = $(AM_CFLAGS)
+timeeventq_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la
+hashmap_test_SOURCES = \
+	hashmap-test.c \
+	hashmap.h hashmap.c \
+	util.h util.c
+
+hashmap_test_CFLAGS = $(AM_CFLAGS)
+hashmap_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign avahi-core/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign avahi-core/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	list2=; for p in $$list; do \
+	  if test -f $$p; then \
+	    list2="$$list2 $$p"; \
+	  else :; fi; \
+	done; \
+	test -z "$$list2" || { \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+	}
+
+uninstall-libLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	for p in $$list; do \
+	  $(am__strip_dir) \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+	done
+
+clean-libLTLIBRARIES:
+	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libavahi-core.la: $(libavahi_core_la_OBJECTS) $(libavahi_core_la_DEPENDENCIES) $(EXTRA_libavahi_core_la_DEPENDENCIES) 
+	$(AM_V_CCLD)$(libavahi_core_la_LINK) -rpath $(libdir) $(libavahi_core_la_OBJECTS) $(libavahi_core_la_LIBADD) $(LIBS)
+
+clean-noinstPROGRAMS:
+	@list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+avahi-reflector$(EXEEXT): $(avahi_reflector_OBJECTS) $(avahi_reflector_DEPENDENCIES) $(EXTRA_avahi_reflector_DEPENDENCIES) 
+	@rm -f avahi-reflector$(EXEEXT)
+	$(AM_V_CCLD)$(avahi_reflector_LINK) $(avahi_reflector_OBJECTS) $(avahi_reflector_LDADD) $(LIBS)
+avahi-test$(EXEEXT): $(avahi_test_OBJECTS) $(avahi_test_DEPENDENCIES) $(EXTRA_avahi_test_DEPENDENCIES) 
+	@rm -f avahi-test$(EXEEXT)
+	$(AM_V_CCLD)$(avahi_test_LINK) $(avahi_test_OBJECTS) $(avahi_test_LDADD) $(LIBS)
+conformance-test$(EXEEXT): $(conformance_test_OBJECTS) $(conformance_test_DEPENDENCIES) $(EXTRA_conformance_test_DEPENDENCIES) 
+	@rm -f conformance-test$(EXEEXT)
+	$(AM_V_CCLD)$(conformance_test_LINK) $(conformance_test_OBJECTS) $(conformance_test_LDADD) $(LIBS)
+dns-spin-test$(EXEEXT): $(dns_spin_test_OBJECTS) $(dns_spin_test_DEPENDENCIES) $(EXTRA_dns_spin_test_DEPENDENCIES) 
+	@rm -f dns-spin-test$(EXEEXT)
+	$(AM_V_CCLD)$(dns_spin_test_LINK) $(dns_spin_test_OBJECTS) $(dns_spin_test_LDADD) $(LIBS)
+dns-test$(EXEEXT): $(dns_test_OBJECTS) $(dns_test_DEPENDENCIES) $(EXTRA_dns_test_DEPENDENCIES) 
+	@rm -f dns-test$(EXEEXT)
+	$(AM_V_CCLD)$(dns_test_LINK) $(dns_test_OBJECTS) $(dns_test_LDADD) $(LIBS)
+hashmap-test$(EXEEXT): $(hashmap_test_OBJECTS) $(hashmap_test_DEPENDENCIES) $(EXTRA_hashmap_test_DEPENDENCIES) 
+	@rm -f hashmap-test$(EXEEXT)
+	$(AM_V_CCLD)$(hashmap_test_LINK) $(hashmap_test_OBJECTS) $(hashmap_test_LDADD) $(LIBS)
+prioq-test$(EXEEXT): $(prioq_test_OBJECTS) $(prioq_test_DEPENDENCIES) $(EXTRA_prioq_test_DEPENDENCIES) 
+	@rm -f prioq-test$(EXEEXT)
+	$(AM_V_CCLD)$(prioq_test_LINK) $(prioq_test_OBJECTS) $(prioq_test_LDADD) $(LIBS)
+querier-test$(EXEEXT): $(querier_test_OBJECTS) $(querier_test_DEPENDENCIES) $(EXTRA_querier_test_DEPENDENCIES) 
+	@rm -f querier-test$(EXEEXT)
+	$(AM_V_CCLD)$(querier_test_LINK) $(querier_test_OBJECTS) $(querier_test_LDADD) $(LIBS)
+timeeventq-test$(EXEEXT): $(timeeventq_test_OBJECTS) $(timeeventq_test_DEPENDENCIES) $(EXTRA_timeeventq_test_DEPENDENCIES) 
+	@rm -f timeeventq-test$(EXEEXT)
+	$(AM_V_CCLD)$(timeeventq_test_LINK) $(timeeventq_test_OBJECTS) $(timeeventq_test_LDADD) $(LIBS)
+update-test$(EXEEXT): $(update_test_OBJECTS) $(update_test_DEPENDENCIES) $(EXTRA_update_test_DEPENDENCIES) 
+	@rm -f update-test$(EXEEXT)
+	$(AM_V_CCLD)$(update_test_LINK) $(update_test_OBJECTS) $(update_test_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avahi_reflector-avahi-reflector.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avahi_test-avahi-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conformance_test-conformance-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dns_spin_test-dns-spin-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dns_test-addr-util.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dns_test-dns-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dns_test-dns.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dns_test-domain-util.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dns_test-hashmap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dns_test-log.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dns_test-rr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dns_test-util.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hashmap_test-hashmap-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hashmap_test-hashmap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hashmap_test-util.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_core_la-addr-util.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_core_la-announce.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_core_la-browse-dns-server.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_core_la-browse-domain.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_core_la-browse-service-type.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_core_la-browse-service.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_core_la-browse.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_core_la-cache.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_core_la-dns.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_core_la-domain-util.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_core_la-entry.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_core_la-fdutil.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_core_la-hashmap.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_core_la-iface-linux.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_core_la-iface-none.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_core_la-iface-pfroute.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_core_la-iface.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_core_la-log.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_core_la-multicast-lookup.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_core_la-netlink.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_core_la-prioq.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_core_la-probe-sched.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_core_la-querier.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_core_la-query-sched.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_core_la-resolve-address.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_core_la-resolve-host-name.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_core_la-resolve-service.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_core_la-response-sched.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_core_la-rr.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_core_la-rrlist.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_core_la-server.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_core_la-socket.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_core_la-timeeventq.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_core_la-util.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libavahi_core_la-wide-area.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prioq_test-prioq-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prioq_test-prioq.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/querier_test-querier-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeeventq_test-log.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeeventq_test-prioq.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeeventq_test-timeeventq-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeeventq_test-timeeventq.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/update_test-update-test.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+libavahi_core_la-timeeventq.lo: timeeventq.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -MT libavahi_core_la-timeeventq.lo -MD -MP -MF $(DEPDIR)/libavahi_core_la-timeeventq.Tpo -c -o libavahi_core_la-timeeventq.lo `test -f 'timeeventq.c' || echo '$(srcdir)/'`timeeventq.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_core_la-timeeventq.Tpo $(DEPDIR)/libavahi_core_la-timeeventq.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='timeeventq.c' object='libavahi_core_la-timeeventq.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -c -o libavahi_core_la-timeeventq.lo `test -f 'timeeventq.c' || echo '$(srcdir)/'`timeeventq.c
+
+libavahi_core_la-iface.lo: iface.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -MT libavahi_core_la-iface.lo -MD -MP -MF $(DEPDIR)/libavahi_core_la-iface.Tpo -c -o libavahi_core_la-iface.lo `test -f 'iface.c' || echo '$(srcdir)/'`iface.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_core_la-iface.Tpo $(DEPDIR)/libavahi_core_la-iface.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='iface.c' object='libavahi_core_la-iface.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -c -o libavahi_core_la-iface.lo `test -f 'iface.c' || echo '$(srcdir)/'`iface.c
+
+libavahi_core_la-server.lo: server.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -MT libavahi_core_la-server.lo -MD -MP -MF $(DEPDIR)/libavahi_core_la-server.Tpo -c -o libavahi_core_la-server.lo `test -f 'server.c' || echo '$(srcdir)/'`server.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_core_la-server.Tpo $(DEPDIR)/libavahi_core_la-server.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='server.c' object='libavahi_core_la-server.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -c -o libavahi_core_la-server.lo `test -f 'server.c' || echo '$(srcdir)/'`server.c
+
+libavahi_core_la-entry.lo: entry.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -MT libavahi_core_la-entry.lo -MD -MP -MF $(DEPDIR)/libavahi_core_la-entry.Tpo -c -o libavahi_core_la-entry.lo `test -f 'entry.c' || echo '$(srcdir)/'`entry.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_core_la-entry.Tpo $(DEPDIR)/libavahi_core_la-entry.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='entry.c' object='libavahi_core_la-entry.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -c -o libavahi_core_la-entry.lo `test -f 'entry.c' || echo '$(srcdir)/'`entry.c
+
+libavahi_core_la-prioq.lo: prioq.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -MT libavahi_core_la-prioq.lo -MD -MP -MF $(DEPDIR)/libavahi_core_la-prioq.Tpo -c -o libavahi_core_la-prioq.lo `test -f 'prioq.c' || echo '$(srcdir)/'`prioq.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_core_la-prioq.Tpo $(DEPDIR)/libavahi_core_la-prioq.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='prioq.c' object='libavahi_core_la-prioq.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -c -o libavahi_core_la-prioq.lo `test -f 'prioq.c' || echo '$(srcdir)/'`prioq.c
+
+libavahi_core_la-cache.lo: cache.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -MT libavahi_core_la-cache.lo -MD -MP -MF $(DEPDIR)/libavahi_core_la-cache.Tpo -c -o libavahi_core_la-cache.lo `test -f 'cache.c' || echo '$(srcdir)/'`cache.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_core_la-cache.Tpo $(DEPDIR)/libavahi_core_la-cache.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='cache.c' object='libavahi_core_la-cache.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -c -o libavahi_core_la-cache.lo `test -f 'cache.c' || echo '$(srcdir)/'`cache.c
+
+libavahi_core_la-socket.lo: socket.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -MT libavahi_core_la-socket.lo -MD -MP -MF $(DEPDIR)/libavahi_core_la-socket.Tpo -c -o libavahi_core_la-socket.lo `test -f 'socket.c' || echo '$(srcdir)/'`socket.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_core_la-socket.Tpo $(DEPDIR)/libavahi_core_la-socket.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='socket.c' object='libavahi_core_la-socket.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -c -o libavahi_core_la-socket.lo `test -f 'socket.c' || echo '$(srcdir)/'`socket.c
+
+libavahi_core_la-response-sched.lo: response-sched.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -MT libavahi_core_la-response-sched.lo -MD -MP -MF $(DEPDIR)/libavahi_core_la-response-sched.Tpo -c -o libavahi_core_la-response-sched.lo `test -f 'response-sched.c' || echo '$(srcdir)/'`response-sched.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_core_la-response-sched.Tpo $(DEPDIR)/libavahi_core_la-response-sched.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='response-sched.c' object='libavahi_core_la-response-sched.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -c -o libavahi_core_la-response-sched.lo `test -f 'response-sched.c' || echo '$(srcdir)/'`response-sched.c
+
+libavahi_core_la-query-sched.lo: query-sched.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -MT libavahi_core_la-query-sched.lo -MD -MP -MF $(DEPDIR)/libavahi_core_la-query-sched.Tpo -c -o libavahi_core_la-query-sched.lo `test -f 'query-sched.c' || echo '$(srcdir)/'`query-sched.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_core_la-query-sched.Tpo $(DEPDIR)/libavahi_core_la-query-sched.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='query-sched.c' object='libavahi_core_la-query-sched.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -c -o libavahi_core_la-query-sched.lo `test -f 'query-sched.c' || echo '$(srcdir)/'`query-sched.c
+
+libavahi_core_la-probe-sched.lo: probe-sched.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -MT libavahi_core_la-probe-sched.lo -MD -MP -MF $(DEPDIR)/libavahi_core_la-probe-sched.Tpo -c -o libavahi_core_la-probe-sched.lo `test -f 'probe-sched.c' || echo '$(srcdir)/'`probe-sched.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_core_la-probe-sched.Tpo $(DEPDIR)/libavahi_core_la-probe-sched.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='probe-sched.c' object='libavahi_core_la-probe-sched.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -c -o libavahi_core_la-probe-sched.lo `test -f 'probe-sched.c' || echo '$(srcdir)/'`probe-sched.c
+
+libavahi_core_la-announce.lo: announce.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -MT libavahi_core_la-announce.lo -MD -MP -MF $(DEPDIR)/libavahi_core_la-announce.Tpo -c -o libavahi_core_la-announce.lo `test -f 'announce.c' || echo '$(srcdir)/'`announce.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_core_la-announce.Tpo $(DEPDIR)/libavahi_core_la-announce.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='announce.c' object='libavahi_core_la-announce.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -c -o libavahi_core_la-announce.lo `test -f 'announce.c' || echo '$(srcdir)/'`announce.c
+
+libavahi_core_la-browse.lo: browse.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -MT libavahi_core_la-browse.lo -MD -MP -MF $(DEPDIR)/libavahi_core_la-browse.Tpo -c -o libavahi_core_la-browse.lo `test -f 'browse.c' || echo '$(srcdir)/'`browse.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_core_la-browse.Tpo $(DEPDIR)/libavahi_core_la-browse.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='browse.c' object='libavahi_core_la-browse.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -c -o libavahi_core_la-browse.lo `test -f 'browse.c' || echo '$(srcdir)/'`browse.c
+
+libavahi_core_la-rrlist.lo: rrlist.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -MT libavahi_core_la-rrlist.lo -MD -MP -MF $(DEPDIR)/libavahi_core_la-rrlist.Tpo -c -o libavahi_core_la-rrlist.lo `test -f 'rrlist.c' || echo '$(srcdir)/'`rrlist.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_core_la-rrlist.Tpo $(DEPDIR)/libavahi_core_la-rrlist.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='rrlist.c' object='libavahi_core_la-rrlist.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -c -o libavahi_core_la-rrlist.lo `test -f 'rrlist.c' || echo '$(srcdir)/'`rrlist.c
+
+libavahi_core_la-resolve-host-name.lo: resolve-host-name.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -MT libavahi_core_la-resolve-host-name.lo -MD -MP -MF $(DEPDIR)/libavahi_core_la-resolve-host-name.Tpo -c -o libavahi_core_la-resolve-host-name.lo `test -f 'resolve-host-name.c' || echo '$(srcdir)/'`resolve-host-name.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_core_la-resolve-host-name.Tpo $(DEPDIR)/libavahi_core_la-resolve-host-name.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='resolve-host-name.c' object='libavahi_core_la-resolve-host-name.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -c -o libavahi_core_la-resolve-host-name.lo `test -f 'resolve-host-name.c' || echo '$(srcdir)/'`resolve-host-name.c
+
+libavahi_core_la-resolve-address.lo: resolve-address.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -MT libavahi_core_la-resolve-address.lo -MD -MP -MF $(DEPDIR)/libavahi_core_la-resolve-address.Tpo -c -o libavahi_core_la-resolve-address.lo `test -f 'resolve-address.c' || echo '$(srcdir)/'`resolve-address.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_core_la-resolve-address.Tpo $(DEPDIR)/libavahi_core_la-resolve-address.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='resolve-address.c' object='libavahi_core_la-resolve-address.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -c -o libavahi_core_la-resolve-address.lo `test -f 'resolve-address.c' || echo '$(srcdir)/'`resolve-address.c
+
+libavahi_core_la-browse-domain.lo: browse-domain.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -MT libavahi_core_la-browse-domain.lo -MD -MP -MF $(DEPDIR)/libavahi_core_la-browse-domain.Tpo -c -o libavahi_core_la-browse-domain.lo `test -f 'browse-domain.c' || echo '$(srcdir)/'`browse-domain.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_core_la-browse-domain.Tpo $(DEPDIR)/libavahi_core_la-browse-domain.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='browse-domain.c' object='libavahi_core_la-browse-domain.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -c -o libavahi_core_la-browse-domain.lo `test -f 'browse-domain.c' || echo '$(srcdir)/'`browse-domain.c
+
+libavahi_core_la-browse-service-type.lo: browse-service-type.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -MT libavahi_core_la-browse-service-type.lo -MD -MP -MF $(DEPDIR)/libavahi_core_la-browse-service-type.Tpo -c -o libavahi_core_la-browse-service-type.lo `test -f 'browse-service-type.c' || echo '$(srcdir)/'`browse-service-type.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_core_la-browse-service-type.Tpo $(DEPDIR)/libavahi_core_la-browse-service-type.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='browse-service-type.c' object='libavahi_core_la-browse-service-type.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -c -o libavahi_core_la-browse-service-type.lo `test -f 'browse-service-type.c' || echo '$(srcdir)/'`browse-service-type.c
+
+libavahi_core_la-browse-service.lo: browse-service.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -MT libavahi_core_la-browse-service.lo -MD -MP -MF $(DEPDIR)/libavahi_core_la-browse-service.Tpo -c -o libavahi_core_la-browse-service.lo `test -f 'browse-service.c' || echo '$(srcdir)/'`browse-service.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_core_la-browse-service.Tpo $(DEPDIR)/libavahi_core_la-browse-service.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='browse-service.c' object='libavahi_core_la-browse-service.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -c -o libavahi_core_la-browse-service.lo `test -f 'browse-service.c' || echo '$(srcdir)/'`browse-service.c
+
+libavahi_core_la-resolve-service.lo: resolve-service.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -MT libavahi_core_la-resolve-service.lo -MD -MP -MF $(DEPDIR)/libavahi_core_la-resolve-service.Tpo -c -o libavahi_core_la-resolve-service.lo `test -f 'resolve-service.c' || echo '$(srcdir)/'`resolve-service.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_core_la-resolve-service.Tpo $(DEPDIR)/libavahi_core_la-resolve-service.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='resolve-service.c' object='libavahi_core_la-resolve-service.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -c -o libavahi_core_la-resolve-service.lo `test -f 'resolve-service.c' || echo '$(srcdir)/'`resolve-service.c
+
+libavahi_core_la-dns.lo: dns.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -MT libavahi_core_la-dns.lo -MD -MP -MF $(DEPDIR)/libavahi_core_la-dns.Tpo -c -o libavahi_core_la-dns.lo `test -f 'dns.c' || echo '$(srcdir)/'`dns.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_core_la-dns.Tpo $(DEPDIR)/libavahi_core_la-dns.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dns.c' object='libavahi_core_la-dns.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -c -o libavahi_core_la-dns.lo `test -f 'dns.c' || echo '$(srcdir)/'`dns.c
+
+libavahi_core_la-rr.lo: rr.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -MT libavahi_core_la-rr.lo -MD -MP -MF $(DEPDIR)/libavahi_core_la-rr.Tpo -c -o libavahi_core_la-rr.lo `test -f 'rr.c' || echo '$(srcdir)/'`rr.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_core_la-rr.Tpo $(DEPDIR)/libavahi_core_la-rr.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='rr.c' object='libavahi_core_la-rr.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -c -o libavahi_core_la-rr.lo `test -f 'rr.c' || echo '$(srcdir)/'`rr.c
+
+libavahi_core_la-log.lo: log.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -MT libavahi_core_la-log.lo -MD -MP -MF $(DEPDIR)/libavahi_core_la-log.Tpo -c -o libavahi_core_la-log.lo `test -f 'log.c' || echo '$(srcdir)/'`log.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_core_la-log.Tpo $(DEPDIR)/libavahi_core_la-log.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='log.c' object='libavahi_core_la-log.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -c -o libavahi_core_la-log.lo `test -f 'log.c' || echo '$(srcdir)/'`log.c
+
+libavahi_core_la-browse-dns-server.lo: browse-dns-server.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -MT libavahi_core_la-browse-dns-server.lo -MD -MP -MF $(DEPDIR)/libavahi_core_la-browse-dns-server.Tpo -c -o libavahi_core_la-browse-dns-server.lo `test -f 'browse-dns-server.c' || echo '$(srcdir)/'`browse-dns-server.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_core_la-browse-dns-server.Tpo $(DEPDIR)/libavahi_core_la-browse-dns-server.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='browse-dns-server.c' object='libavahi_core_la-browse-dns-server.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -c -o libavahi_core_la-browse-dns-server.lo `test -f 'browse-dns-server.c' || echo '$(srcdir)/'`browse-dns-server.c
+
+libavahi_core_la-fdutil.lo: fdutil.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -MT libavahi_core_la-fdutil.lo -MD -MP -MF $(DEPDIR)/libavahi_core_la-fdutil.Tpo -c -o libavahi_core_la-fdutil.lo `test -f 'fdutil.c' || echo '$(srcdir)/'`fdutil.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_core_la-fdutil.Tpo $(DEPDIR)/libavahi_core_la-fdutil.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='fdutil.c' object='libavahi_core_la-fdutil.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -c -o libavahi_core_la-fdutil.lo `test -f 'fdutil.c' || echo '$(srcdir)/'`fdutil.c
+
+libavahi_core_la-util.lo: util.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -MT libavahi_core_la-util.lo -MD -MP -MF $(DEPDIR)/libavahi_core_la-util.Tpo -c -o libavahi_core_la-util.lo `test -f 'util.c' || echo '$(srcdir)/'`util.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_core_la-util.Tpo $(DEPDIR)/libavahi_core_la-util.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='util.c' object='libavahi_core_la-util.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -c -o libavahi_core_la-util.lo `test -f 'util.c' || echo '$(srcdir)/'`util.c
+
+libavahi_core_la-hashmap.lo: hashmap.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -MT libavahi_core_la-hashmap.lo -MD -MP -MF $(DEPDIR)/libavahi_core_la-hashmap.Tpo -c -o libavahi_core_la-hashmap.lo `test -f 'hashmap.c' || echo '$(srcdir)/'`hashmap.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_core_la-hashmap.Tpo $(DEPDIR)/libavahi_core_la-hashmap.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='hashmap.c' object='libavahi_core_la-hashmap.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -c -o libavahi_core_la-hashmap.lo `test -f 'hashmap.c' || echo '$(srcdir)/'`hashmap.c
+
+libavahi_core_la-wide-area.lo: wide-area.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -MT libavahi_core_la-wide-area.lo -MD -MP -MF $(DEPDIR)/libavahi_core_la-wide-area.Tpo -c -o libavahi_core_la-wide-area.lo `test -f 'wide-area.c' || echo '$(srcdir)/'`wide-area.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_core_la-wide-area.Tpo $(DEPDIR)/libavahi_core_la-wide-area.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='wide-area.c' object='libavahi_core_la-wide-area.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -c -o libavahi_core_la-wide-area.lo `test -f 'wide-area.c' || echo '$(srcdir)/'`wide-area.c
+
+libavahi_core_la-multicast-lookup.lo: multicast-lookup.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -MT libavahi_core_la-multicast-lookup.lo -MD -MP -MF $(DEPDIR)/libavahi_core_la-multicast-lookup.Tpo -c -o libavahi_core_la-multicast-lookup.lo `test -f 'multicast-lookup.c' || echo '$(srcdir)/'`multicast-lookup.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_core_la-multicast-lookup.Tpo $(DEPDIR)/libavahi_core_la-multicast-lookup.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='multicast-lookup.c' object='libavahi_core_la-multicast-lookup.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -c -o libavahi_core_la-multicast-lookup.lo `test -f 'multicast-lookup.c' || echo '$(srcdir)/'`multicast-lookup.c
+
+libavahi_core_la-querier.lo: querier.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -MT libavahi_core_la-querier.lo -MD -MP -MF $(DEPDIR)/libavahi_core_la-querier.Tpo -c -o libavahi_core_la-querier.lo `test -f 'querier.c' || echo '$(srcdir)/'`querier.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_core_la-querier.Tpo $(DEPDIR)/libavahi_core_la-querier.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='querier.c' object='libavahi_core_la-querier.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -c -o libavahi_core_la-querier.lo `test -f 'querier.c' || echo '$(srcdir)/'`querier.c
+
+libavahi_core_la-addr-util.lo: addr-util.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -MT libavahi_core_la-addr-util.lo -MD -MP -MF $(DEPDIR)/libavahi_core_la-addr-util.Tpo -c -o libavahi_core_la-addr-util.lo `test -f 'addr-util.c' || echo '$(srcdir)/'`addr-util.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_core_la-addr-util.Tpo $(DEPDIR)/libavahi_core_la-addr-util.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='addr-util.c' object='libavahi_core_la-addr-util.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -c -o libavahi_core_la-addr-util.lo `test -f 'addr-util.c' || echo '$(srcdir)/'`addr-util.c
+
+libavahi_core_la-domain-util.lo: domain-util.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -MT libavahi_core_la-domain-util.lo -MD -MP -MF $(DEPDIR)/libavahi_core_la-domain-util.Tpo -c -o libavahi_core_la-domain-util.lo `test -f 'domain-util.c' || echo '$(srcdir)/'`domain-util.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_core_la-domain-util.Tpo $(DEPDIR)/libavahi_core_la-domain-util.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='domain-util.c' object='libavahi_core_la-domain-util.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -c -o libavahi_core_la-domain-util.lo `test -f 'domain-util.c' || echo '$(srcdir)/'`domain-util.c
+
+libavahi_core_la-iface-linux.lo: iface-linux.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -MT libavahi_core_la-iface-linux.lo -MD -MP -MF $(DEPDIR)/libavahi_core_la-iface-linux.Tpo -c -o libavahi_core_la-iface-linux.lo `test -f 'iface-linux.c' || echo '$(srcdir)/'`iface-linux.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_core_la-iface-linux.Tpo $(DEPDIR)/libavahi_core_la-iface-linux.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='iface-linux.c' object='libavahi_core_la-iface-linux.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -c -o libavahi_core_la-iface-linux.lo `test -f 'iface-linux.c' || echo '$(srcdir)/'`iface-linux.c
+
+libavahi_core_la-netlink.lo: netlink.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -MT libavahi_core_la-netlink.lo -MD -MP -MF $(DEPDIR)/libavahi_core_la-netlink.Tpo -c -o libavahi_core_la-netlink.lo `test -f 'netlink.c' || echo '$(srcdir)/'`netlink.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_core_la-netlink.Tpo $(DEPDIR)/libavahi_core_la-netlink.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='netlink.c' object='libavahi_core_la-netlink.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -c -o libavahi_core_la-netlink.lo `test -f 'netlink.c' || echo '$(srcdir)/'`netlink.c
+
+libavahi_core_la-iface-pfroute.lo: iface-pfroute.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -MT libavahi_core_la-iface-pfroute.lo -MD -MP -MF $(DEPDIR)/libavahi_core_la-iface-pfroute.Tpo -c -o libavahi_core_la-iface-pfroute.lo `test -f 'iface-pfroute.c' || echo '$(srcdir)/'`iface-pfroute.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_core_la-iface-pfroute.Tpo $(DEPDIR)/libavahi_core_la-iface-pfroute.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='iface-pfroute.c' object='libavahi_core_la-iface-pfroute.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -c -o libavahi_core_la-iface-pfroute.lo `test -f 'iface-pfroute.c' || echo '$(srcdir)/'`iface-pfroute.c
+
+libavahi_core_la-iface-none.lo: iface-none.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -MT libavahi_core_la-iface-none.lo -MD -MP -MF $(DEPDIR)/libavahi_core_la-iface-none.Tpo -c -o libavahi_core_la-iface-none.lo `test -f 'iface-none.c' || echo '$(srcdir)/'`iface-none.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libavahi_core_la-iface-none.Tpo $(DEPDIR)/libavahi_core_la-iface-none.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='iface-none.c' object='libavahi_core_la-iface-none.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libavahi_core_la_CFLAGS) $(CFLAGS) -c -o libavahi_core_la-iface-none.lo `test -f 'iface-none.c' || echo '$(srcdir)/'`iface-none.c
+
+avahi_reflector-avahi-reflector.o: avahi-reflector.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_reflector_CFLAGS) $(CFLAGS) -MT avahi_reflector-avahi-reflector.o -MD -MP -MF $(DEPDIR)/avahi_reflector-avahi-reflector.Tpo -c -o avahi_reflector-avahi-reflector.o `test -f 'avahi-reflector.c' || echo '$(srcdir)/'`avahi-reflector.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_reflector-avahi-reflector.Tpo $(DEPDIR)/avahi_reflector-avahi-reflector.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='avahi-reflector.c' object='avahi_reflector-avahi-reflector.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_reflector_CFLAGS) $(CFLAGS) -c -o avahi_reflector-avahi-reflector.o `test -f 'avahi-reflector.c' || echo '$(srcdir)/'`avahi-reflector.c
+
+avahi_reflector-avahi-reflector.obj: avahi-reflector.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_reflector_CFLAGS) $(CFLAGS) -MT avahi_reflector-avahi-reflector.obj -MD -MP -MF $(DEPDIR)/avahi_reflector-avahi-reflector.Tpo -c -o avahi_reflector-avahi-reflector.obj `if test -f 'avahi-reflector.c'; then $(CYGPATH_W) 'avahi-reflector.c'; else $(CYGPATH_W) '$(srcdir)/avahi-reflector.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_reflector-avahi-reflector.Tpo $(DEPDIR)/avahi_reflector-avahi-reflector.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='avahi-reflector.c' object='avahi_reflector-avahi-reflector.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_reflector_CFLAGS) $(CFLAGS) -c -o avahi_reflector-avahi-reflector.obj `if test -f 'avahi-reflector.c'; then $(CYGPATH_W) 'avahi-reflector.c'; else $(CYGPATH_W) '$(srcdir)/avahi-reflector.c'; fi`
+
+avahi_test-avahi-test.o: avahi-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_test_CFLAGS) $(CFLAGS) -MT avahi_test-avahi-test.o -MD -MP -MF $(DEPDIR)/avahi_test-avahi-test.Tpo -c -o avahi_test-avahi-test.o `test -f 'avahi-test.c' || echo '$(srcdir)/'`avahi-test.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_test-avahi-test.Tpo $(DEPDIR)/avahi_test-avahi-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='avahi-test.c' object='avahi_test-avahi-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_test_CFLAGS) $(CFLAGS) -c -o avahi_test-avahi-test.o `test -f 'avahi-test.c' || echo '$(srcdir)/'`avahi-test.c
+
+avahi_test-avahi-test.obj: avahi-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_test_CFLAGS) $(CFLAGS) -MT avahi_test-avahi-test.obj -MD -MP -MF $(DEPDIR)/avahi_test-avahi-test.Tpo -c -o avahi_test-avahi-test.obj `if test -f 'avahi-test.c'; then $(CYGPATH_W) 'avahi-test.c'; else $(CYGPATH_W) '$(srcdir)/avahi-test.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_test-avahi-test.Tpo $(DEPDIR)/avahi_test-avahi-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='avahi-test.c' object='avahi_test-avahi-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_test_CFLAGS) $(CFLAGS) -c -o avahi_test-avahi-test.obj `if test -f 'avahi-test.c'; then $(CYGPATH_W) 'avahi-test.c'; else $(CYGPATH_W) '$(srcdir)/avahi-test.c'; fi`
+
+conformance_test-conformance-test.o: conformance-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(conformance_test_CFLAGS) $(CFLAGS) -MT conformance_test-conformance-test.o -MD -MP -MF $(DEPDIR)/conformance_test-conformance-test.Tpo -c -o conformance_test-conformance-test.o `test -f 'conformance-test.c' || echo '$(srcdir)/'`conformance-test.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/conformance_test-conformance-test.Tpo $(DEPDIR)/conformance_test-conformance-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='conformance-test.c' object='conformance_test-conformance-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(conformance_test_CFLAGS) $(CFLAGS) -c -o conformance_test-conformance-test.o `test -f 'conformance-test.c' || echo '$(srcdir)/'`conformance-test.c
+
+conformance_test-conformance-test.obj: conformance-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(conformance_test_CFLAGS) $(CFLAGS) -MT conformance_test-conformance-test.obj -MD -MP -MF $(DEPDIR)/conformance_test-conformance-test.Tpo -c -o conformance_test-conformance-test.obj `if test -f 'conformance-test.c'; then $(CYGPATH_W) 'conformance-test.c'; else $(CYGPATH_W) '$(srcdir)/conformance-test.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/conformance_test-conformance-test.Tpo $(DEPDIR)/conformance_test-conformance-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='conformance-test.c' object='conformance_test-conformance-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(conformance_test_CFLAGS) $(CFLAGS) -c -o conformance_test-conformance-test.obj `if test -f 'conformance-test.c'; then $(CYGPATH_W) 'conformance-test.c'; else $(CYGPATH_W) '$(srcdir)/conformance-test.c'; fi`
+
+dns_spin_test-dns-spin-test.o: dns-spin-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dns_spin_test_CFLAGS) $(CFLAGS) -MT dns_spin_test-dns-spin-test.o -MD -MP -MF $(DEPDIR)/dns_spin_test-dns-spin-test.Tpo -c -o dns_spin_test-dns-spin-test.o `test -f 'dns-spin-test.c' || echo '$(srcdir)/'`dns-spin-test.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/dns_spin_test-dns-spin-test.Tpo $(DEPDIR)/dns_spin_test-dns-spin-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dns-spin-test.c' object='dns_spin_test-dns-spin-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dns_spin_test_CFLAGS) $(CFLAGS) -c -o dns_spin_test-dns-spin-test.o `test -f 'dns-spin-test.c' || echo '$(srcdir)/'`dns-spin-test.c
+
+dns_spin_test-dns-spin-test.obj: dns-spin-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dns_spin_test_CFLAGS) $(CFLAGS) -MT dns_spin_test-dns-spin-test.obj -MD -MP -MF $(DEPDIR)/dns_spin_test-dns-spin-test.Tpo -c -o dns_spin_test-dns-spin-test.obj `if test -f 'dns-spin-test.c'; then $(CYGPATH_W) 'dns-spin-test.c'; else $(CYGPATH_W) '$(srcdir)/dns-spin-test.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/dns_spin_test-dns-spin-test.Tpo $(DEPDIR)/dns_spin_test-dns-spin-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dns-spin-test.c' object='dns_spin_test-dns-spin-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dns_spin_test_CFLAGS) $(CFLAGS) -c -o dns_spin_test-dns-spin-test.obj `if test -f 'dns-spin-test.c'; then $(CYGPATH_W) 'dns-spin-test.c'; else $(CYGPATH_W) '$(srcdir)/dns-spin-test.c'; fi`
+
+dns_test-dns.o: dns.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dns_test_CFLAGS) $(CFLAGS) -MT dns_test-dns.o -MD -MP -MF $(DEPDIR)/dns_test-dns.Tpo -c -o dns_test-dns.o `test -f 'dns.c' || echo '$(srcdir)/'`dns.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/dns_test-dns.Tpo $(DEPDIR)/dns_test-dns.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dns.c' object='dns_test-dns.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dns_test_CFLAGS) $(CFLAGS) -c -o dns_test-dns.o `test -f 'dns.c' || echo '$(srcdir)/'`dns.c
+
+dns_test-dns.obj: dns.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dns_test_CFLAGS) $(CFLAGS) -MT dns_test-dns.obj -MD -MP -MF $(DEPDIR)/dns_test-dns.Tpo -c -o dns_test-dns.obj `if test -f 'dns.c'; then $(CYGPATH_W) 'dns.c'; else $(CYGPATH_W) '$(srcdir)/dns.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/dns_test-dns.Tpo $(DEPDIR)/dns_test-dns.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dns.c' object='dns_test-dns.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dns_test_CFLAGS) $(CFLAGS) -c -o dns_test-dns.obj `if test -f 'dns.c'; then $(CYGPATH_W) 'dns.c'; else $(CYGPATH_W) '$(srcdir)/dns.c'; fi`
+
+dns_test-dns-test.o: dns-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dns_test_CFLAGS) $(CFLAGS) -MT dns_test-dns-test.o -MD -MP -MF $(DEPDIR)/dns_test-dns-test.Tpo -c -o dns_test-dns-test.o `test -f 'dns-test.c' || echo '$(srcdir)/'`dns-test.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/dns_test-dns-test.Tpo $(DEPDIR)/dns_test-dns-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dns-test.c' object='dns_test-dns-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dns_test_CFLAGS) $(CFLAGS) -c -o dns_test-dns-test.o `test -f 'dns-test.c' || echo '$(srcdir)/'`dns-test.c
+
+dns_test-dns-test.obj: dns-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dns_test_CFLAGS) $(CFLAGS) -MT dns_test-dns-test.obj -MD -MP -MF $(DEPDIR)/dns_test-dns-test.Tpo -c -o dns_test-dns-test.obj `if test -f 'dns-test.c'; then $(CYGPATH_W) 'dns-test.c'; else $(CYGPATH_W) '$(srcdir)/dns-test.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/dns_test-dns-test.Tpo $(DEPDIR)/dns_test-dns-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dns-test.c' object='dns_test-dns-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dns_test_CFLAGS) $(CFLAGS) -c -o dns_test-dns-test.obj `if test -f 'dns-test.c'; then $(CYGPATH_W) 'dns-test.c'; else $(CYGPATH_W) '$(srcdir)/dns-test.c'; fi`
+
+dns_test-log.o: log.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dns_test_CFLAGS) $(CFLAGS) -MT dns_test-log.o -MD -MP -MF $(DEPDIR)/dns_test-log.Tpo -c -o dns_test-log.o `test -f 'log.c' || echo '$(srcdir)/'`log.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/dns_test-log.Tpo $(DEPDIR)/dns_test-log.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='log.c' object='dns_test-log.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dns_test_CFLAGS) $(CFLAGS) -c -o dns_test-log.o `test -f 'log.c' || echo '$(srcdir)/'`log.c
+
+dns_test-log.obj: log.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dns_test_CFLAGS) $(CFLAGS) -MT dns_test-log.obj -MD -MP -MF $(DEPDIR)/dns_test-log.Tpo -c -o dns_test-log.obj `if test -f 'log.c'; then $(CYGPATH_W) 'log.c'; else $(CYGPATH_W) '$(srcdir)/log.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/dns_test-log.Tpo $(DEPDIR)/dns_test-log.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='log.c' object='dns_test-log.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dns_test_CFLAGS) $(CFLAGS) -c -o dns_test-log.obj `if test -f 'log.c'; then $(CYGPATH_W) 'log.c'; else $(CYGPATH_W) '$(srcdir)/log.c'; fi`
+
+dns_test-util.o: util.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dns_test_CFLAGS) $(CFLAGS) -MT dns_test-util.o -MD -MP -MF $(DEPDIR)/dns_test-util.Tpo -c -o dns_test-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/dns_test-util.Tpo $(DEPDIR)/dns_test-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='util.c' object='dns_test-util.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dns_test_CFLAGS) $(CFLAGS) -c -o dns_test-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
+
+dns_test-util.obj: util.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dns_test_CFLAGS) $(CFLAGS) -MT dns_test-util.obj -MD -MP -MF $(DEPDIR)/dns_test-util.Tpo -c -o dns_test-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/dns_test-util.Tpo $(DEPDIR)/dns_test-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='util.c' object='dns_test-util.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dns_test_CFLAGS) $(CFLAGS) -c -o dns_test-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
+
+dns_test-rr.o: rr.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dns_test_CFLAGS) $(CFLAGS) -MT dns_test-rr.o -MD -MP -MF $(DEPDIR)/dns_test-rr.Tpo -c -o dns_test-rr.o `test -f 'rr.c' || echo '$(srcdir)/'`rr.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/dns_test-rr.Tpo $(DEPDIR)/dns_test-rr.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='rr.c' object='dns_test-rr.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dns_test_CFLAGS) $(CFLAGS) -c -o dns_test-rr.o `test -f 'rr.c' || echo '$(srcdir)/'`rr.c
+
+dns_test-rr.obj: rr.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dns_test_CFLAGS) $(CFLAGS) -MT dns_test-rr.obj -MD -MP -MF $(DEPDIR)/dns_test-rr.Tpo -c -o dns_test-rr.obj `if test -f 'rr.c'; then $(CYGPATH_W) 'rr.c'; else $(CYGPATH_W) '$(srcdir)/rr.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/dns_test-rr.Tpo $(DEPDIR)/dns_test-rr.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='rr.c' object='dns_test-rr.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dns_test_CFLAGS) $(CFLAGS) -c -o dns_test-rr.obj `if test -f 'rr.c'; then $(CYGPATH_W) 'rr.c'; else $(CYGPATH_W) '$(srcdir)/rr.c'; fi`
+
+dns_test-hashmap.o: hashmap.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dns_test_CFLAGS) $(CFLAGS) -MT dns_test-hashmap.o -MD -MP -MF $(DEPDIR)/dns_test-hashmap.Tpo -c -o dns_test-hashmap.o `test -f 'hashmap.c' || echo '$(srcdir)/'`hashmap.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/dns_test-hashmap.Tpo $(DEPDIR)/dns_test-hashmap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='hashmap.c' object='dns_test-hashmap.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dns_test_CFLAGS) $(CFLAGS) -c -o dns_test-hashmap.o `test -f 'hashmap.c' || echo '$(srcdir)/'`hashmap.c
+
+dns_test-hashmap.obj: hashmap.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dns_test_CFLAGS) $(CFLAGS) -MT dns_test-hashmap.obj -MD -MP -MF $(DEPDIR)/dns_test-hashmap.Tpo -c -o dns_test-hashmap.obj `if test -f 'hashmap.c'; then $(CYGPATH_W) 'hashmap.c'; else $(CYGPATH_W) '$(srcdir)/hashmap.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/dns_test-hashmap.Tpo $(DEPDIR)/dns_test-hashmap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='hashmap.c' object='dns_test-hashmap.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dns_test_CFLAGS) $(CFLAGS) -c -o dns_test-hashmap.obj `if test -f 'hashmap.c'; then $(CYGPATH_W) 'hashmap.c'; else $(CYGPATH_W) '$(srcdir)/hashmap.c'; fi`
+
+dns_test-domain-util.o: domain-util.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dns_test_CFLAGS) $(CFLAGS) -MT dns_test-domain-util.o -MD -MP -MF $(DEPDIR)/dns_test-domain-util.Tpo -c -o dns_test-domain-util.o `test -f 'domain-util.c' || echo '$(srcdir)/'`domain-util.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/dns_test-domain-util.Tpo $(DEPDIR)/dns_test-domain-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='domain-util.c' object='dns_test-domain-util.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dns_test_CFLAGS) $(CFLAGS) -c -o dns_test-domain-util.o `test -f 'domain-util.c' || echo '$(srcdir)/'`domain-util.c
+
+dns_test-domain-util.obj: domain-util.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dns_test_CFLAGS) $(CFLAGS) -MT dns_test-domain-util.obj -MD -MP -MF $(DEPDIR)/dns_test-domain-util.Tpo -c -o dns_test-domain-util.obj `if test -f 'domain-util.c'; then $(CYGPATH_W) 'domain-util.c'; else $(CYGPATH_W) '$(srcdir)/domain-util.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/dns_test-domain-util.Tpo $(DEPDIR)/dns_test-domain-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='domain-util.c' object='dns_test-domain-util.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dns_test_CFLAGS) $(CFLAGS) -c -o dns_test-domain-util.obj `if test -f 'domain-util.c'; then $(CYGPATH_W) 'domain-util.c'; else $(CYGPATH_W) '$(srcdir)/domain-util.c'; fi`
+
+dns_test-addr-util.o: addr-util.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dns_test_CFLAGS) $(CFLAGS) -MT dns_test-addr-util.o -MD -MP -MF $(DEPDIR)/dns_test-addr-util.Tpo -c -o dns_test-addr-util.o `test -f 'addr-util.c' || echo '$(srcdir)/'`addr-util.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/dns_test-addr-util.Tpo $(DEPDIR)/dns_test-addr-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='addr-util.c' object='dns_test-addr-util.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dns_test_CFLAGS) $(CFLAGS) -c -o dns_test-addr-util.o `test -f 'addr-util.c' || echo '$(srcdir)/'`addr-util.c
+
+dns_test-addr-util.obj: addr-util.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dns_test_CFLAGS) $(CFLAGS) -MT dns_test-addr-util.obj -MD -MP -MF $(DEPDIR)/dns_test-addr-util.Tpo -c -o dns_test-addr-util.obj `if test -f 'addr-util.c'; then $(CYGPATH_W) 'addr-util.c'; else $(CYGPATH_W) '$(srcdir)/addr-util.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/dns_test-addr-util.Tpo $(DEPDIR)/dns_test-addr-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='addr-util.c' object='dns_test-addr-util.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dns_test_CFLAGS) $(CFLAGS) -c -o dns_test-addr-util.obj `if test -f 'addr-util.c'; then $(CYGPATH_W) 'addr-util.c'; else $(CYGPATH_W) '$(srcdir)/addr-util.c'; fi`
+
+hashmap_test-hashmap-test.o: hashmap-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hashmap_test_CFLAGS) $(CFLAGS) -MT hashmap_test-hashmap-test.o -MD -MP -MF $(DEPDIR)/hashmap_test-hashmap-test.Tpo -c -o hashmap_test-hashmap-test.o `test -f 'hashmap-test.c' || echo '$(srcdir)/'`hashmap-test.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/hashmap_test-hashmap-test.Tpo $(DEPDIR)/hashmap_test-hashmap-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='hashmap-test.c' object='hashmap_test-hashmap-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hashmap_test_CFLAGS) $(CFLAGS) -c -o hashmap_test-hashmap-test.o `test -f 'hashmap-test.c' || echo '$(srcdir)/'`hashmap-test.c
+
+hashmap_test-hashmap-test.obj: hashmap-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hashmap_test_CFLAGS) $(CFLAGS) -MT hashmap_test-hashmap-test.obj -MD -MP -MF $(DEPDIR)/hashmap_test-hashmap-test.Tpo -c -o hashmap_test-hashmap-test.obj `if test -f 'hashmap-test.c'; then $(CYGPATH_W) 'hashmap-test.c'; else $(CYGPATH_W) '$(srcdir)/hashmap-test.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/hashmap_test-hashmap-test.Tpo $(DEPDIR)/hashmap_test-hashmap-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='hashmap-test.c' object='hashmap_test-hashmap-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hashmap_test_CFLAGS) $(CFLAGS) -c -o hashmap_test-hashmap-test.obj `if test -f 'hashmap-test.c'; then $(CYGPATH_W) 'hashmap-test.c'; else $(CYGPATH_W) '$(srcdir)/hashmap-test.c'; fi`
+
+hashmap_test-hashmap.o: hashmap.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hashmap_test_CFLAGS) $(CFLAGS) -MT hashmap_test-hashmap.o -MD -MP -MF $(DEPDIR)/hashmap_test-hashmap.Tpo -c -o hashmap_test-hashmap.o `test -f 'hashmap.c' || echo '$(srcdir)/'`hashmap.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/hashmap_test-hashmap.Tpo $(DEPDIR)/hashmap_test-hashmap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='hashmap.c' object='hashmap_test-hashmap.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hashmap_test_CFLAGS) $(CFLAGS) -c -o hashmap_test-hashmap.o `test -f 'hashmap.c' || echo '$(srcdir)/'`hashmap.c
+
+hashmap_test-hashmap.obj: hashmap.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hashmap_test_CFLAGS) $(CFLAGS) -MT hashmap_test-hashmap.obj -MD -MP -MF $(DEPDIR)/hashmap_test-hashmap.Tpo -c -o hashmap_test-hashmap.obj `if test -f 'hashmap.c'; then $(CYGPATH_W) 'hashmap.c'; else $(CYGPATH_W) '$(srcdir)/hashmap.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/hashmap_test-hashmap.Tpo $(DEPDIR)/hashmap_test-hashmap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='hashmap.c' object='hashmap_test-hashmap.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hashmap_test_CFLAGS) $(CFLAGS) -c -o hashmap_test-hashmap.obj `if test -f 'hashmap.c'; then $(CYGPATH_W) 'hashmap.c'; else $(CYGPATH_W) '$(srcdir)/hashmap.c'; fi`
+
+hashmap_test-util.o: util.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hashmap_test_CFLAGS) $(CFLAGS) -MT hashmap_test-util.o -MD -MP -MF $(DEPDIR)/hashmap_test-util.Tpo -c -o hashmap_test-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/hashmap_test-util.Tpo $(DEPDIR)/hashmap_test-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='util.c' object='hashmap_test-util.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hashmap_test_CFLAGS) $(CFLAGS) -c -o hashmap_test-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
+
+hashmap_test-util.obj: util.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hashmap_test_CFLAGS) $(CFLAGS) -MT hashmap_test-util.obj -MD -MP -MF $(DEPDIR)/hashmap_test-util.Tpo -c -o hashmap_test-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/hashmap_test-util.Tpo $(DEPDIR)/hashmap_test-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='util.c' object='hashmap_test-util.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hashmap_test_CFLAGS) $(CFLAGS) -c -o hashmap_test-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
+
+prioq_test-prioq-test.o: prioq-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(prioq_test_CFLAGS) $(CFLAGS) -MT prioq_test-prioq-test.o -MD -MP -MF $(DEPDIR)/prioq_test-prioq-test.Tpo -c -o prioq_test-prioq-test.o `test -f 'prioq-test.c' || echo '$(srcdir)/'`prioq-test.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/prioq_test-prioq-test.Tpo $(DEPDIR)/prioq_test-prioq-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='prioq-test.c' object='prioq_test-prioq-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(prioq_test_CFLAGS) $(CFLAGS) -c -o prioq_test-prioq-test.o `test -f 'prioq-test.c' || echo '$(srcdir)/'`prioq-test.c
+
+prioq_test-prioq-test.obj: prioq-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(prioq_test_CFLAGS) $(CFLAGS) -MT prioq_test-prioq-test.obj -MD -MP -MF $(DEPDIR)/prioq_test-prioq-test.Tpo -c -o prioq_test-prioq-test.obj `if test -f 'prioq-test.c'; then $(CYGPATH_W) 'prioq-test.c'; else $(CYGPATH_W) '$(srcdir)/prioq-test.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/prioq_test-prioq-test.Tpo $(DEPDIR)/prioq_test-prioq-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='prioq-test.c' object='prioq_test-prioq-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(prioq_test_CFLAGS) $(CFLAGS) -c -o prioq_test-prioq-test.obj `if test -f 'prioq-test.c'; then $(CYGPATH_W) 'prioq-test.c'; else $(CYGPATH_W) '$(srcdir)/prioq-test.c'; fi`
+
+prioq_test-prioq.o: prioq.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(prioq_test_CFLAGS) $(CFLAGS) -MT prioq_test-prioq.o -MD -MP -MF $(DEPDIR)/prioq_test-prioq.Tpo -c -o prioq_test-prioq.o `test -f 'prioq.c' || echo '$(srcdir)/'`prioq.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/prioq_test-prioq.Tpo $(DEPDIR)/prioq_test-prioq.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='prioq.c' object='prioq_test-prioq.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(prioq_test_CFLAGS) $(CFLAGS) -c -o prioq_test-prioq.o `test -f 'prioq.c' || echo '$(srcdir)/'`prioq.c
+
+prioq_test-prioq.obj: prioq.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(prioq_test_CFLAGS) $(CFLAGS) -MT prioq_test-prioq.obj -MD -MP -MF $(DEPDIR)/prioq_test-prioq.Tpo -c -o prioq_test-prioq.obj `if test -f 'prioq.c'; then $(CYGPATH_W) 'prioq.c'; else $(CYGPATH_W) '$(srcdir)/prioq.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/prioq_test-prioq.Tpo $(DEPDIR)/prioq_test-prioq.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='prioq.c' object='prioq_test-prioq.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(prioq_test_CFLAGS) $(CFLAGS) -c -o prioq_test-prioq.obj `if test -f 'prioq.c'; then $(CYGPATH_W) 'prioq.c'; else $(CYGPATH_W) '$(srcdir)/prioq.c'; fi`
+
+querier_test-querier-test.o: querier-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(querier_test_CFLAGS) $(CFLAGS) -MT querier_test-querier-test.o -MD -MP -MF $(DEPDIR)/querier_test-querier-test.Tpo -c -o querier_test-querier-test.o `test -f 'querier-test.c' || echo '$(srcdir)/'`querier-test.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/querier_test-querier-test.Tpo $(DEPDIR)/querier_test-querier-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='querier-test.c' object='querier_test-querier-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(querier_test_CFLAGS) $(CFLAGS) -c -o querier_test-querier-test.o `test -f 'querier-test.c' || echo '$(srcdir)/'`querier-test.c
+
+querier_test-querier-test.obj: querier-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(querier_test_CFLAGS) $(CFLAGS) -MT querier_test-querier-test.obj -MD -MP -MF $(DEPDIR)/querier_test-querier-test.Tpo -c -o querier_test-querier-test.obj `if test -f 'querier-test.c'; then $(CYGPATH_W) 'querier-test.c'; else $(CYGPATH_W) '$(srcdir)/querier-test.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/querier_test-querier-test.Tpo $(DEPDIR)/querier_test-querier-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='querier-test.c' object='querier_test-querier-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(querier_test_CFLAGS) $(CFLAGS) -c -o querier_test-querier-test.obj `if test -f 'querier-test.c'; then $(CYGPATH_W) 'querier-test.c'; else $(CYGPATH_W) '$(srcdir)/querier-test.c'; fi`
+
+timeeventq_test-timeeventq-test.o: timeeventq-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(timeeventq_test_CFLAGS) $(CFLAGS) -MT timeeventq_test-timeeventq-test.o -MD -MP -MF $(DEPDIR)/timeeventq_test-timeeventq-test.Tpo -c -o timeeventq_test-timeeventq-test.o `test -f 'timeeventq-test.c' || echo '$(srcdir)/'`timeeventq-test.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/timeeventq_test-timeeventq-test.Tpo $(DEPDIR)/timeeventq_test-timeeventq-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='timeeventq-test.c' object='timeeventq_test-timeeventq-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(timeeventq_test_CFLAGS) $(CFLAGS) -c -o timeeventq_test-timeeventq-test.o `test -f 'timeeventq-test.c' || echo '$(srcdir)/'`timeeventq-test.c
+
+timeeventq_test-timeeventq-test.obj: timeeventq-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(timeeventq_test_CFLAGS) $(CFLAGS) -MT timeeventq_test-timeeventq-test.obj -MD -MP -MF $(DEPDIR)/timeeventq_test-timeeventq-test.Tpo -c -o timeeventq_test-timeeventq-test.obj `if test -f 'timeeventq-test.c'; then $(CYGPATH_W) 'timeeventq-test.c'; else $(CYGPATH_W) '$(srcdir)/timeeventq-test.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/timeeventq_test-timeeventq-test.Tpo $(DEPDIR)/timeeventq_test-timeeventq-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='timeeventq-test.c' object='timeeventq_test-timeeventq-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(timeeventq_test_CFLAGS) $(CFLAGS) -c -o timeeventq_test-timeeventq-test.obj `if test -f 'timeeventq-test.c'; then $(CYGPATH_W) 'timeeventq-test.c'; else $(CYGPATH_W) '$(srcdir)/timeeventq-test.c'; fi`
+
+timeeventq_test-timeeventq.o: timeeventq.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(timeeventq_test_CFLAGS) $(CFLAGS) -MT timeeventq_test-timeeventq.o -MD -MP -MF $(DEPDIR)/timeeventq_test-timeeventq.Tpo -c -o timeeventq_test-timeeventq.o `test -f 'timeeventq.c' || echo '$(srcdir)/'`timeeventq.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/timeeventq_test-timeeventq.Tpo $(DEPDIR)/timeeventq_test-timeeventq.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='timeeventq.c' object='timeeventq_test-timeeventq.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(timeeventq_test_CFLAGS) $(CFLAGS) -c -o timeeventq_test-timeeventq.o `test -f 'timeeventq.c' || echo '$(srcdir)/'`timeeventq.c
+
+timeeventq_test-timeeventq.obj: timeeventq.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(timeeventq_test_CFLAGS) $(CFLAGS) -MT timeeventq_test-timeeventq.obj -MD -MP -MF $(DEPDIR)/timeeventq_test-timeeventq.Tpo -c -o timeeventq_test-timeeventq.obj `if test -f 'timeeventq.c'; then $(CYGPATH_W) 'timeeventq.c'; else $(CYGPATH_W) '$(srcdir)/timeeventq.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/timeeventq_test-timeeventq.Tpo $(DEPDIR)/timeeventq_test-timeeventq.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='timeeventq.c' object='timeeventq_test-timeeventq.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(timeeventq_test_CFLAGS) $(CFLAGS) -c -o timeeventq_test-timeeventq.obj `if test -f 'timeeventq.c'; then $(CYGPATH_W) 'timeeventq.c'; else $(CYGPATH_W) '$(srcdir)/timeeventq.c'; fi`
+
+timeeventq_test-prioq.o: prioq.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(timeeventq_test_CFLAGS) $(CFLAGS) -MT timeeventq_test-prioq.o -MD -MP -MF $(DEPDIR)/timeeventq_test-prioq.Tpo -c -o timeeventq_test-prioq.o `test -f 'prioq.c' || echo '$(srcdir)/'`prioq.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/timeeventq_test-prioq.Tpo $(DEPDIR)/timeeventq_test-prioq.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='prioq.c' object='timeeventq_test-prioq.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(timeeventq_test_CFLAGS) $(CFLAGS) -c -o timeeventq_test-prioq.o `test -f 'prioq.c' || echo '$(srcdir)/'`prioq.c
+
+timeeventq_test-prioq.obj: prioq.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(timeeventq_test_CFLAGS) $(CFLAGS) -MT timeeventq_test-prioq.obj -MD -MP -MF $(DEPDIR)/timeeventq_test-prioq.Tpo -c -o timeeventq_test-prioq.obj `if test -f 'prioq.c'; then $(CYGPATH_W) 'prioq.c'; else $(CYGPATH_W) '$(srcdir)/prioq.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/timeeventq_test-prioq.Tpo $(DEPDIR)/timeeventq_test-prioq.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='prioq.c' object='timeeventq_test-prioq.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(timeeventq_test_CFLAGS) $(CFLAGS) -c -o timeeventq_test-prioq.obj `if test -f 'prioq.c'; then $(CYGPATH_W) 'prioq.c'; else $(CYGPATH_W) '$(srcdir)/prioq.c'; fi`
+
+timeeventq_test-log.o: log.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(timeeventq_test_CFLAGS) $(CFLAGS) -MT timeeventq_test-log.o -MD -MP -MF $(DEPDIR)/timeeventq_test-log.Tpo -c -o timeeventq_test-log.o `test -f 'log.c' || echo '$(srcdir)/'`log.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/timeeventq_test-log.Tpo $(DEPDIR)/timeeventq_test-log.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='log.c' object='timeeventq_test-log.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(timeeventq_test_CFLAGS) $(CFLAGS) -c -o timeeventq_test-log.o `test -f 'log.c' || echo '$(srcdir)/'`log.c
+
+timeeventq_test-log.obj: log.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(timeeventq_test_CFLAGS) $(CFLAGS) -MT timeeventq_test-log.obj -MD -MP -MF $(DEPDIR)/timeeventq_test-log.Tpo -c -o timeeventq_test-log.obj `if test -f 'log.c'; then $(CYGPATH_W) 'log.c'; else $(CYGPATH_W) '$(srcdir)/log.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/timeeventq_test-log.Tpo $(DEPDIR)/timeeventq_test-log.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='log.c' object='timeeventq_test-log.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(timeeventq_test_CFLAGS) $(CFLAGS) -c -o timeeventq_test-log.obj `if test -f 'log.c'; then $(CYGPATH_W) 'log.c'; else $(CYGPATH_W) '$(srcdir)/log.c'; fi`
+
+update_test-update-test.o: update-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(update_test_CFLAGS) $(CFLAGS) -MT update_test-update-test.o -MD -MP -MF $(DEPDIR)/update_test-update-test.Tpo -c -o update_test-update-test.o `test -f 'update-test.c' || echo '$(srcdir)/'`update-test.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/update_test-update-test.Tpo $(DEPDIR)/update_test-update-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='update-test.c' object='update_test-update-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(update_test_CFLAGS) $(CFLAGS) -c -o update_test-update-test.o `test -f 'update-test.c' || echo '$(srcdir)/'`update-test.c
+
+update_test-update-test.obj: update-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(update_test_CFLAGS) $(CFLAGS) -MT update_test-update-test.obj -MD -MP -MF $(DEPDIR)/update_test-update-test.Tpo -c -o update_test-update-test.obj `if test -f 'update-test.c'; then $(CYGPATH_W) 'update-test.c'; else $(CYGPATH_W) '$(srcdir)/update-test.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/update_test-update-test.Tpo $(DEPDIR)/update_test-update-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='update-test.c' object='update_test-update-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(update_test_CFLAGS) $(CFLAGS) -c -o update_test-update-test.obj `if test -f 'update-test.c'; then $(CYGPATH_W) 'update-test.c'; else $(CYGPATH_W) '$(srcdir)/update-test.c'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+install-avahiincludeHEADERS: $(avahiinclude_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(avahiincludedir)" || $(MKDIR_P) "$(DESTDIR)$(avahiincludedir)"
+	@list='$(avahiinclude_HEADERS)'; test -n "$(avahiincludedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(avahiincludedir)'"; \
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(avahiincludedir)" || exit $$?; \
+	done
+
+uninstall-avahiincludeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(avahiinclude_HEADERS)'; test -n "$(avahiincludedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(avahiincludedir)'; $(am__uninstall_files_from_dir)
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+check-TESTS: $(TESTS)
+	@failed=0; all=0; xfail=0; xpass=0; skip=0; \
+	srcdir=$(srcdir); export srcdir; \
+	list=' $(TESTS) '; \
+	$(am__tty_colors); \
+	if test -n "$$list"; then \
+	  for tst in $$list; do \
+	    if test -f ./$$tst; then dir=./; \
+	    elif test -f $$tst; then dir=; \
+	    else dir="$(srcdir)/"; fi; \
+	    if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+	      all=`expr $$all + 1`; \
+	      case " $(XFAIL_TESTS) " in \
+	      *[\ \	]$$tst[\ \	]*) \
+		xpass=`expr $$xpass + 1`; \
+		failed=`expr $$failed + 1`; \
+		col=$$red; res=XPASS; \
+	      ;; \
+	      *) \
+		col=$$grn; res=PASS; \
+	      ;; \
+	      esac; \
+	    elif test $$? -ne 77; then \
+	      all=`expr $$all + 1`; \
+	      case " $(XFAIL_TESTS) " in \
+	      *[\ \	]$$tst[\ \	]*) \
+		xfail=`expr $$xfail + 1`; \
+		col=$$lgn; res=XFAIL; \
+	      ;; \
+	      *) \
+		failed=`expr $$failed + 1`; \
+		col=$$red; res=FAIL; \
+	      ;; \
+	      esac; \
+	    else \
+	      skip=`expr $$skip + 1`; \
+	      col=$$blu; res=SKIP; \
+	    fi; \
+	    echo "$${col}$$res$${std}: $$tst"; \
+	  done; \
+	  if test "$$all" -eq 1; then \
+	    tests="test"; \
+	    All=""; \
+	  else \
+	    tests="tests"; \
+	    All="All "; \
+	  fi; \
+	  if test "$$failed" -eq 0; then \
+	    if test "$$xfail" -eq 0; then \
+	      banner="$$All$$all $$tests passed"; \
+	    else \
+	      if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+	      banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
+	    fi; \
+	  else \
+	    if test "$$xpass" -eq 0; then \
+	      banner="$$failed of $$all $$tests failed"; \
+	    else \
+	      if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+	      banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+	    fi; \
+	  fi; \
+	  dashes="$$banner"; \
+	  skipped=""; \
+	  if test "$$skip" -ne 0; then \
+	    if test "$$skip" -eq 1; then \
+	      skipped="($$skip test was not run)"; \
+	    else \
+	      skipped="($$skip tests were not run)"; \
+	    fi; \
+	    test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+	      dashes="$$skipped"; \
+	  fi; \
+	  report=""; \
+	  if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+	    report="Please report to $(PACKAGE_BUGREPORT)"; \
+	    test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+	      dashes="$$report"; \
+	  fi; \
+	  dashes=`echo "$$dashes" | sed s/./=/g`; \
+	  if test "$$failed" -eq 0; then \
+	    col="$$grn"; \
+	  else \
+	    col="$$red"; \
+	  fi; \
+	  echo "$${col}$$dashes$${std}"; \
+	  echo "$${col}$$banner$${std}"; \
+	  test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
+	  test -z "$$report" || echo "$${col}$$report$${std}"; \
+	  echo "$${col}$$dashes$${std}"; \
+	  test "$$failed" -eq 0; \
+	else :; fi
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+	$(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(avahiincludedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+	clean-noinstPROGRAMS mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-avahiincludeHEADERS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-avahiincludeHEADERS uninstall-libLTLIBRARIES
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
+	clean-generic clean-libLTLIBRARIES clean-libtool \
+	clean-noinstPROGRAMS ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-avahiincludeHEADERS install-data install-data-am \
+	install-dvi install-dvi-am install-exec install-exec-am \
+	install-html install-html-am install-info install-info-am \
+	install-libLTLIBRARIES install-man install-pdf install-pdf-am \
+	install-ps install-ps-am install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-avahiincludeHEADERS \
+	uninstall-libLTLIBRARIES
+
+
+valgrind: avahi-test
+	libtool --mode=execute valgrind ./avahi-test
+
+gdb: avahi-test
+	libtool --mode=execute gdb ./avahi-test
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/avahi-0.6.31/avahi-core/addr-util.c b/avahi-0.6.31/avahi-core/addr-util.c
new file mode 100644
index 0000000..979b1b7
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/addr-util.c
@@ -0,0 +1,94 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <sys/socket.h>
+#include <arpa/inet.h>
+#include <string.h>
+#include <assert.h>
+
+#include "addr-util.h"
+
+AvahiAddress *avahi_address_from_sockaddr(const struct sockaddr* sa, AvahiAddress *ret_addr) {
+    assert(sa);
+    assert(ret_addr);
+
+    assert(sa->sa_family == AF_INET || sa->sa_family == AF_INET6);
+
+    ret_addr->proto = avahi_af_to_proto(sa->sa_family);
+
+    if (sa->sa_family == AF_INET)
+        memcpy(&ret_addr->data.ipv4, &((const struct sockaddr_in*) sa)->sin_addr, sizeof(ret_addr->data.ipv4));
+    else
+        memcpy(&ret_addr->data.ipv6, &((const struct sockaddr_in6*) sa)->sin6_addr, sizeof(ret_addr->data.ipv6));
+
+    return ret_addr;
+}
+
+uint16_t avahi_port_from_sockaddr(const struct sockaddr* sa) {
+    assert(sa);
+
+    assert(sa->sa_family == AF_INET || sa->sa_family == AF_INET6);
+
+    if (sa->sa_family == AF_INET)
+        return ntohs(((const struct sockaddr_in*) sa)->sin_port);
+    else
+        return ntohs(((const struct sockaddr_in6*) sa)->sin6_port);
+}
+
+int avahi_address_is_ipv4_in_ipv6(const AvahiAddress *a) {
+
+    static const uint8_t ipv4_in_ipv6[] = {
+        0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00,
+        0xFF, 0xFF, 0xFF, 0xFF
+    };
+
+    assert(a);
+
+    if (a->proto != AVAHI_PROTO_INET6)
+        return 0;
+
+    return memcmp(a->data.ipv6.address, ipv4_in_ipv6, sizeof(ipv4_in_ipv6)) == 0;
+}
+
+#define IPV4LL_NETWORK 0xA9FE0000L
+#define IPV4LL_NETMASK 0xFFFF0000L
+#define IPV6LL_NETWORK 0xFE80
+#define IPV6LL_NETMASK 0xFFC0
+
+int avahi_address_is_link_local(const AvahiAddress *a) {
+    assert(a);
+
+    if (a->proto == AVAHI_PROTO_INET) {
+        uint32_t n = ntohl(a->data.ipv4.address);
+        return (n & IPV4LL_NETMASK) == IPV4LL_NETWORK;
+    }
+    else if (a->proto == AVAHI_PROTO_INET6) {
+        unsigned n = (a->data.ipv6.address[0] << 8) | (a->data.ipv6.address[1] << 0);
+        return (n & IPV6LL_NETMASK) == IPV6LL_NETWORK;
+    }
+
+    return 0;
+}
diff --git a/avahi-0.6.31/avahi-core/addr-util.h b/avahi-0.6.31/avahi-core/addr-util.h
new file mode 100644
index 0000000..66a9422
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/addr-util.h
@@ -0,0 +1,47 @@
+#ifndef fooaddrutilhfoo
+#define fooaddrutilhfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#include <inttypes.h>
+#include <sys/socket.h>
+
+#include <avahi-common/cdecl.h>
+#include <avahi-common/address.h>
+
+AVAHI_C_DECL_BEGIN
+
+/** Make an address structture of a sockaddr structure */
+AvahiAddress *avahi_address_from_sockaddr(const struct sockaddr* sa, AvahiAddress *ret_addr);
+
+/** Return the port number of a sockaddr structure (either IPv4 or IPv6) */
+uint16_t avahi_port_from_sockaddr(const struct sockaddr* sa);
+
+/** Check whether the specified IPv6 address is in fact an
+ * encapsulated IPv4 address, returns 1 if yes, 0 otherwise */
+int avahi_address_is_ipv4_in_ipv6(const AvahiAddress *a);
+
+/** Check whether the specified address is a link-local IPv4 or IPv6 address;
+ * returns 1 if yes, 0 otherwise */
+int avahi_address_is_link_local(const AvahiAddress *a);
+
+AVAHI_C_DECL_END
+
+#endif
diff --git a/avahi-0.6.31/avahi-core/announce.c b/avahi-0.6.31/avahi-core/announce.c
new file mode 100644
index 0000000..ccdbf15
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/announce.c
@@ -0,0 +1,524 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+
+#include <avahi-common/timeval.h>
+#include <avahi-common/malloc.h>
+
+#include "announce.h"
+#include "log.h"
+#include "rr-util.h"
+
+#define AVAHI_ANNOUNCEMENT_JITTER_MSEC 250
+#define AVAHI_PROBE_JITTER_MSEC 250
+#define AVAHI_PROBE_INTERVAL_MSEC 250
+
+static void remove_announcer(AvahiServer *s, AvahiAnnouncer *a) {
+    assert(s);
+    assert(a);
+
+    if (a->time_event)
+        avahi_time_event_free(a->time_event);
+
+    AVAHI_LLIST_REMOVE(AvahiAnnouncer, by_interface, a->interface->announcers, a);
+    AVAHI_LLIST_REMOVE(AvahiAnnouncer, by_entry, a->entry->announcers, a);
+
+    avahi_free(a);
+}
+
+static void elapse_announce(AvahiTimeEvent *e, void *userdata);
+
+static void set_timeout(AvahiAnnouncer *a, const struct timeval *tv) {
+    assert(a);
+
+    if (!tv) {
+        if (a->time_event) {
+            avahi_time_event_free(a->time_event);
+            a->time_event = NULL;
+        }
+    } else {
+
+        if (a->time_event)
+            avahi_time_event_update(a->time_event, tv);
+        else
+            a->time_event = avahi_time_event_new(a->server->time_event_queue, tv, elapse_announce, a);
+    }
+}
+
+static void next_state(AvahiAnnouncer *a);
+
+void avahi_s_entry_group_check_probed(AvahiSEntryGroup *g, int immediately) {
+    AvahiEntry *e;
+    assert(g);
+    assert(!g->dead);
+
+    /* Check whether all group members have been probed */
+
+    if (g->state != AVAHI_ENTRY_GROUP_REGISTERING || g->n_probing > 0)
+        return;
+
+    avahi_s_entry_group_change_state(g, AVAHI_ENTRY_GROUP_ESTABLISHED);
+
+    if (g->dead)
+        return;
+
+    for (e = g->entries; e; e = e->by_group_next) {
+        AvahiAnnouncer *a;
+
+        for (a = e->announcers; a; a = a->by_entry_next) {
+
+            if (a->state != AVAHI_WAITING)
+                continue;
+
+            a->state = AVAHI_ANNOUNCING;
+
+            if (immediately) {
+                /* Shortcut */
+
+                a->n_iteration = 1;
+                next_state(a);
+            } else {
+                struct timeval tv;
+                a->n_iteration = 0;
+                avahi_elapse_time(&tv, 0, AVAHI_ANNOUNCEMENT_JITTER_MSEC);
+                set_timeout(a, &tv);
+            }
+        }
+    }
+}
+
+static void next_state(AvahiAnnouncer *a) {
+    assert(a);
+
+    if (a->state == AVAHI_WAITING) {
+
+        assert(a->entry->group);
+
+        avahi_s_entry_group_check_probed(a->entry->group, 1);
+
+    } else if (a->state == AVAHI_PROBING) {
+
+        if (a->n_iteration >= 4) {
+            /* Probing done */
+
+            if (a->entry->group) {
+                assert(a->entry->group->n_probing);
+                a->entry->group->n_probing--;
+            }
+
+            if (a->entry->group && a->entry->group->state == AVAHI_ENTRY_GROUP_REGISTERING)
+                a->state = AVAHI_WAITING;
+            else {
+                a->state = AVAHI_ANNOUNCING;
+                a->n_iteration = 1;
+            }
+
+            set_timeout(a, NULL);
+            next_state(a);
+        } else {
+            struct timeval tv;
+
+            avahi_interface_post_probe(a->interface, a->entry->record, 0);
+
+            avahi_elapse_time(&tv, AVAHI_PROBE_INTERVAL_MSEC, 0);
+            set_timeout(a, &tv);
+
+            a->n_iteration++;
+        }
+
+    } else if (a->state == AVAHI_ANNOUNCING) {
+
+        if (a->entry->flags & AVAHI_PUBLISH_UNIQUE)
+            /* Send the whole rrset at once */
+            avahi_server_prepare_matching_responses(a->server, a->interface, a->entry->record->key, 0);
+        else
+            avahi_server_prepare_response(a->server, a->interface, a->entry, 0, 0);
+
+        avahi_server_generate_response(a->server, a->interface, NULL, NULL, 0, 0, 0);
+
+        if (++a->n_iteration >= 4) {
+            /* Announcing done */
+
+            a->state = AVAHI_ESTABLISHED;
+
+            set_timeout(a, NULL);
+        } else {
+            struct timeval tv;
+            avahi_elapse_time(&tv, a->sec_delay*1000, AVAHI_ANNOUNCEMENT_JITTER_MSEC);
+
+            if (a->n_iteration < 10)
+                a->sec_delay *= 2;
+
+            set_timeout(a, &tv);
+        }
+    }
+}
+
+static void elapse_announce(AvahiTimeEvent *e, void *userdata) {
+    assert(e);
+
+    next_state(userdata);
+}
+
+static AvahiAnnouncer *get_announcer(AvahiServer *s, AvahiEntry *e, AvahiInterface *i) {
+    AvahiAnnouncer *a;
+
+    assert(s);
+    assert(e);
+    assert(i);
+
+    for (a = e->announcers; a; a = a->by_entry_next)
+        if (a->interface == i)
+            return a;
+
+    return NULL;
+}
+
+static void go_to_initial_state(AvahiAnnouncer *a) {
+    AvahiEntry *e;
+    struct timeval tv;
+
+    assert(a);
+    e = a->entry;
+
+    if ((e->flags & AVAHI_PUBLISH_UNIQUE) && !(e->flags & AVAHI_PUBLISH_NO_PROBE))
+        a->state = AVAHI_PROBING;
+    else if (!(e->flags & AVAHI_PUBLISH_NO_ANNOUNCE)) {
+
+        if (!e->group || e->group->state == AVAHI_ENTRY_GROUP_ESTABLISHED)
+            a->state = AVAHI_ANNOUNCING;
+        else
+            a->state = AVAHI_WAITING;
+
+    } else
+        a->state = AVAHI_ESTABLISHED;
+
+    a->n_iteration = 1;
+    a->sec_delay = 1;
+
+    if (a->state == AVAHI_PROBING && e->group)
+        e->group->n_probing++;
+
+    if (a->state == AVAHI_PROBING)
+        set_timeout(a, avahi_elapse_time(&tv, 0, AVAHI_PROBE_JITTER_MSEC));
+    else if (a->state == AVAHI_ANNOUNCING)
+        set_timeout(a, avahi_elapse_time(&tv, 0, AVAHI_ANNOUNCEMENT_JITTER_MSEC));
+    else
+        set_timeout(a, NULL);
+}
+
+static void new_announcer(AvahiServer *s, AvahiInterface *i, AvahiEntry *e) {
+    AvahiAnnouncer *a;
+
+    assert(s);
+    assert(i);
+    assert(e);
+    assert(!e->dead);
+
+    if (!avahi_interface_match(i, e->interface, e->protocol) || !i->announcing || !avahi_entry_is_commited(e))
+        return;
+
+    /* We don't want duplicate announcers */
+    if (get_announcer(s, e, i))
+        return;
+
+    if ((!(a = avahi_new(AvahiAnnouncer, 1)))) {
+        avahi_log_error(__FILE__": Out of memory.");
+        return;
+    }
+
+    a->server = s;
+    a->interface = i;
+    a->entry = e;
+    a->time_event = NULL;
+
+    AVAHI_LLIST_PREPEND(AvahiAnnouncer, by_interface, i->announcers, a);
+    AVAHI_LLIST_PREPEND(AvahiAnnouncer, by_entry, e->announcers, a);
+
+    go_to_initial_state(a);
+}
+
+void avahi_announce_interface(AvahiServer *s, AvahiInterface *i) {
+    AvahiEntry *e;
+
+    assert(s);
+    assert(i);
+
+    if (!i->announcing)
+        return;
+
+    for (e = s->entries; e; e = e->entries_next)
+        if (!e->dead)
+            new_announcer(s, i, e);
+}
+
+static void announce_walk_callback(AvahiInterfaceMonitor *m, AvahiInterface *i, void* userdata) {
+    AvahiEntry *e = userdata;
+
+    assert(m);
+    assert(i);
+    assert(e);
+    assert(!e->dead);
+
+    new_announcer(m->server, i, e);
+}
+
+void avahi_announce_entry(AvahiServer *s, AvahiEntry *e) {
+    assert(s);
+    assert(e);
+    assert(!e->dead);
+
+    avahi_interface_monitor_walk(s->monitor, e->interface, e->protocol, announce_walk_callback, e);
+}
+
+void avahi_announce_group(AvahiServer *s, AvahiSEntryGroup *g) {
+    AvahiEntry *e;
+
+    assert(s);
+    assert(g);
+
+    for (e = g->entries; e; e = e->by_group_next)
+        if (!e->dead)
+            avahi_announce_entry(s, e);
+}
+
+int avahi_entry_is_registered(AvahiServer *s, AvahiEntry *e, AvahiInterface *i) {
+    AvahiAnnouncer *a;
+
+    assert(s);
+    assert(e);
+    assert(i);
+    assert(!e->dead);
+
+    if (!(a = get_announcer(s, e, i)))
+        return 0;
+
+    return
+        a->state == AVAHI_ANNOUNCING ||
+        a->state == AVAHI_ESTABLISHED ||
+        (a->state == AVAHI_WAITING && !(e->flags & AVAHI_PUBLISH_UNIQUE));
+}
+
+int avahi_entry_is_probing(AvahiServer *s, AvahiEntry *e, AvahiInterface *i) {
+    AvahiAnnouncer *a;
+
+    assert(s);
+    assert(e);
+    assert(i);
+    assert(!e->dead);
+
+    if (!(a = get_announcer(s, e, i)))
+        return 0;
+
+    return
+        a->state == AVAHI_PROBING ||
+        (a->state == AVAHI_WAITING && (e->flags & AVAHI_PUBLISH_UNIQUE));
+}
+
+void avahi_entry_return_to_initial_state(AvahiServer *s, AvahiEntry *e, AvahiInterface *i) {
+    AvahiAnnouncer *a;
+
+    assert(s);
+    assert(e);
+    assert(i);
+
+    if (!(a = get_announcer(s, e, i)))
+        return;
+
+    if (a->state == AVAHI_PROBING && a->entry->group)
+        a->entry->group->n_probing--;
+
+    go_to_initial_state(a);
+}
+
+static AvahiRecord *make_goodbye_record(AvahiRecord *r) {
+    AvahiRecord *g;
+
+    assert(r);
+
+    if (!(g = avahi_record_copy(r)))
+        return NULL; /* OOM */
+
+    assert(g->ref == 1);
+    g->ttl = 0;
+
+    return g;
+}
+
+static int is_duplicate_entry(AvahiServer *s, AvahiEntry *e) {
+    AvahiEntry *i;
+
+    assert(s);
+    assert(e);
+
+    for (i = avahi_hashmap_lookup(s->entries_by_key, e->record->key); i; i = i->by_key_next) {
+
+        if ((i == e) || (i->dead))
+            continue;
+
+        if (!avahi_record_equal_no_ttl(i->record, e->record))
+            continue;
+
+        return 1;
+    }
+
+    return 0;
+}
+
+static void send_goodbye_callback(AvahiInterfaceMonitor *m, AvahiInterface *i, void* userdata) {
+    AvahiEntry *e = userdata;
+    AvahiRecord *g;
+
+    assert(m);
+    assert(i);
+    assert(e);
+    assert(!e->dead);
+
+    if (!avahi_interface_match(i, e->interface, e->protocol))
+        return;
+
+    if (e->flags & AVAHI_PUBLISH_NO_ANNOUNCE)
+        return;
+
+    if (!avahi_entry_is_registered(m->server, e, i))
+        return;
+
+    if (is_duplicate_entry(m->server, e))
+        return;
+
+    if (!(g = make_goodbye_record(e->record)))
+        return; /* OOM */
+
+    avahi_interface_post_response(i, g, e->flags & AVAHI_PUBLISH_UNIQUE, NULL, 1);
+    avahi_record_unref(g);
+}
+
+static void reannounce(AvahiAnnouncer *a) {
+    AvahiEntry *e;
+    struct timeval tv;
+
+    assert(a);
+    e = a->entry;
+
+    /* If the group this entry belongs to is not even commited, there's nothing to reannounce */
+    if (e->group && (e->group->state == AVAHI_ENTRY_GROUP_UNCOMMITED || e->group->state == AVAHI_ENTRY_GROUP_COLLISION))
+        return;
+
+    /* Because we might change state we decrease the probing counter first */
+    if (a->state == AVAHI_PROBING && a->entry->group)
+        a->entry->group->n_probing--;
+
+    if (a->state == AVAHI_PROBING ||
+        (a->state == AVAHI_WAITING && (e->flags & AVAHI_PUBLISH_UNIQUE) && !(e->flags & AVAHI_PUBLISH_NO_PROBE)))
+
+        /* We were probing or waiting after probe, so we restart probing from the beginning here */
+
+        a->state = AVAHI_PROBING;
+    else if (a->state == AVAHI_WAITING)
+
+        /* We were waiting, but were not probing before, so we continue waiting  */
+        a->state = AVAHI_WAITING;
+
+    else if (e->flags & AVAHI_PUBLISH_NO_ANNOUNCE)
+
+        /* No announcer needed */
+        a->state = AVAHI_ESTABLISHED;
+
+    else {
+
+        /* Ok, let's restart announcing */
+        a->state = AVAHI_ANNOUNCING;
+    }
+
+    /* Now let's increase the probing counter again */
+    if (a->state == AVAHI_PROBING && e->group)
+        e->group->n_probing++;
+
+    a->n_iteration = 1;
+    a->sec_delay = 1;
+
+    if (a->state == AVAHI_PROBING)
+        set_timeout(a, avahi_elapse_time(&tv, 0, AVAHI_PROBE_JITTER_MSEC));
+    else if (a->state == AVAHI_ANNOUNCING)
+        set_timeout(a, avahi_elapse_time(&tv, 0, AVAHI_ANNOUNCEMENT_JITTER_MSEC));
+    else
+        set_timeout(a, NULL);
+}
+
+
+static void reannounce_walk_callback(AvahiInterfaceMonitor *m, AvahiInterface *i, void* userdata) {
+    AvahiEntry *e = userdata;
+    AvahiAnnouncer *a;
+
+    assert(m);
+    assert(i);
+    assert(e);
+    assert(!e->dead);
+
+    if (!(a = get_announcer(m->server, e, i)))
+        return;
+
+    reannounce(a);
+}
+
+void avahi_reannounce_entry(AvahiServer *s, AvahiEntry *e) {
+
+    assert(s);
+    assert(e);
+    assert(!e->dead);
+
+    avahi_interface_monitor_walk(s->monitor, e->interface, e->protocol, reannounce_walk_callback, e);
+}
+
+void avahi_goodbye_interface(AvahiServer *s, AvahiInterface *i, int send_goodbye, int remove) {
+    assert(s);
+    assert(i);
+
+    if (send_goodbye)
+        if (i->announcing) {
+            AvahiEntry *e;
+
+            for (e = s->entries; e; e = e->entries_next)
+                if (!e->dead)
+                    send_goodbye_callback(s->monitor, i, e);
+        }
+
+    if (remove)
+        while (i->announcers)
+            remove_announcer(s, i->announcers);
+}
+
+void avahi_goodbye_entry(AvahiServer *s, AvahiEntry *e, int send_goodbye, int remove) {
+    assert(s);
+    assert(e);
+
+    if (send_goodbye)
+        if (!e->dead)
+            avahi_interface_monitor_walk(s->monitor, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, send_goodbye_callback, e);
+
+    if (remove)
+        while (e->announcers)
+            remove_announcer(s, e->announcers);
+}
+
diff --git a/avahi-0.6.31/avahi-core/announce.h b/avahi-0.6.31/avahi-core/announce.h
new file mode 100644
index 0000000..fd23d8b
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/announce.h
@@ -0,0 +1,69 @@
+#ifndef fooannouncehfoo
+#define fooannouncehfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+typedef struct AvahiAnnouncer AvahiAnnouncer;
+
+#include <avahi-common/llist.h>
+#include "iface.h"
+#include "internal.h"
+#include "timeeventq.h"
+#include "publish.h"
+
+typedef enum {
+    AVAHI_PROBING,         /* probing phase */
+    AVAHI_WAITING,         /* wait for other records in group */
+    AVAHI_ANNOUNCING,      /* announcing phase */
+    AVAHI_ESTABLISHED      /* we'e established */
+} AvahiAnnouncerState;
+
+struct AvahiAnnouncer {
+    AvahiServer *server;
+    AvahiInterface *interface;
+    AvahiEntry *entry;
+
+    AvahiTimeEvent *time_event;
+
+    AvahiAnnouncerState state;
+    unsigned n_iteration;
+    unsigned sec_delay;
+
+    AVAHI_LLIST_FIELDS(AvahiAnnouncer, by_interface);
+    AVAHI_LLIST_FIELDS(AvahiAnnouncer, by_entry);
+};
+
+void avahi_announce_interface(AvahiServer *s, AvahiInterface *i);
+void avahi_announce_entry(AvahiServer *s, AvahiEntry *e);
+void avahi_announce_group(AvahiServer *s, AvahiSEntryGroup *g);
+
+void avahi_entry_return_to_initial_state(AvahiServer *s, AvahiEntry *e, AvahiInterface *i);
+
+void avahi_s_entry_group_check_probed(AvahiSEntryGroup *g, int immediately);
+
+int avahi_entry_is_registered(AvahiServer *s, AvahiEntry *e, AvahiInterface *i);
+int avahi_entry_is_probing(AvahiServer *s, AvahiEntry *e, AvahiInterface *i);
+
+void avahi_goodbye_interface(AvahiServer *s, AvahiInterface *i, int send_goodbye, int rem);
+void avahi_goodbye_entry(AvahiServer *s, AvahiEntry *e, int send_goodbye, int rem);
+
+void avahi_reannounce_entry(AvahiServer *s, AvahiEntry *e);
+
+#endif
diff --git a/avahi-0.6.31/avahi-core/avahi-reflector.c b/avahi-0.6.31/avahi-core/avahi-reflector.c
new file mode 100644
index 0000000..dee1e93
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/avahi-reflector.c
@@ -0,0 +1,61 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+#include <avahi-common/simple-watch.h>
+#include <avahi-core/core.h>
+
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char*argv[]) {
+    AvahiServer *server;
+    AvahiServerConfig config;
+    int error;
+    AvahiSimplePoll *simple_poll;
+
+    simple_poll = avahi_simple_poll_new();
+
+    avahi_server_config_init(&config);
+    config.publish_hinfo = 0;
+    config.publish_addresses = 0;
+    config.publish_workstation = 0;
+    config.publish_domain = 0;
+    config.use_ipv6 = 0;
+    config.enable_reflector = 1;
+
+    server = avahi_server_new(avahi_simple_poll_get(simple_poll), &config, NULL, NULL, &error);
+    avahi_server_config_free(&config);
+
+    for (;;)
+        if (avahi_simple_poll_iterate(simple_poll, -1) != 0)
+            break;
+
+    avahi_server_free(server);
+    avahi_simple_poll_free(simple_poll);
+
+    return 0;
+}
diff --git a/avahi-0.6.31/avahi-core/avahi-test.c b/avahi-0.6.31/avahi-core/avahi-test.c
new file mode 100644
index 0000000..8b2376f
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/avahi-test.c
@@ -0,0 +1,402 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <assert.h>
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+#include <avahi-common/malloc.h>
+#include <avahi-common/simple-watch.h>
+#include <avahi-common/alternative.h>
+#include <avahi-common/timeval.h>
+
+#include <avahi-core/core.h>
+#include <avahi-core/log.h>
+#include <avahi-core/publish.h>
+#include <avahi-core/lookup.h>
+#include <avahi-core/dns-srv-rr.h>
+
+static AvahiSEntryGroup *group = NULL;
+static AvahiServer *server = NULL;
+static char *service_name = NULL;
+
+static const AvahiPoll *poll_api;
+
+static void quit_timeout_callback(AVAHI_GCC_UNUSED AvahiTimeout *timeout, void* userdata) {
+    AvahiSimplePoll *simple_poll = userdata;
+
+    avahi_simple_poll_quit(simple_poll);
+}
+
+static void dump_line(const char *text, AVAHI_GCC_UNUSED void* userdata) {
+    printf("%s\n", text);
+}
+
+static void dump_timeout_callback(AvahiTimeout *timeout, void* userdata) {
+    struct timeval tv;
+
+    AvahiServer *avahi = userdata;
+    avahi_server_dump(avahi, dump_line, NULL);
+
+    avahi_elapse_time(&tv, 5000, 0);
+    poll_api->timeout_update(timeout, &tv);
+}
+
+static const char *browser_event_to_string(AvahiBrowserEvent event) {
+    switch (event) {
+        case AVAHI_BROWSER_NEW : return "NEW";
+        case AVAHI_BROWSER_REMOVE : return "REMOVE";
+        case AVAHI_BROWSER_CACHE_EXHAUSTED : return "CACHE_EXHAUSTED";
+        case AVAHI_BROWSER_ALL_FOR_NOW : return "ALL_FOR_NOW";
+        case AVAHI_BROWSER_FAILURE : return "FAILURE";
+    }
+
+    abort();
+}
+
+static const char *resolver_event_to_string(AvahiResolverEvent event) {
+    switch (event) {
+        case AVAHI_RESOLVER_FOUND: return "FOUND";
+        case AVAHI_RESOLVER_FAILURE: return "FAILURE";
+    }
+    abort();
+}
+
+static void record_browser_callback(
+    AvahiSRecordBrowser *r,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiBrowserEvent event,
+    AvahiRecord *record,
+    AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+    AVAHI_GCC_UNUSED void* userdata) {
+    char *t;
+
+    assert(r);
+
+    if (record) {
+        avahi_log_debug("RB: record [%s] on %i.%i is %s", t = avahi_record_to_string(record), interface, protocol, browser_event_to_string(event));
+        avahi_free(t);
+    } else
+        avahi_log_debug("RB: [%s]", browser_event_to_string(event));
+
+}
+
+static void remove_entries(void);
+static void create_entries(int new_name);
+
+static void entry_group_callback(AVAHI_GCC_UNUSED AvahiServer *s, AVAHI_GCC_UNUSED AvahiSEntryGroup *g, AvahiEntryGroupState state, AVAHI_GCC_UNUSED void* userdata) {
+    avahi_log_debug("entry group state: %i", state);
+
+    if (state == AVAHI_ENTRY_GROUP_COLLISION) {
+        remove_entries();
+        create_entries(1);
+        avahi_log_debug("Service name conflict, retrying with <%s>", service_name);
+    } else if (state == AVAHI_ENTRY_GROUP_ESTABLISHED) {
+        avahi_log_debug("Service established under name <%s>", service_name);
+    }
+}
+
+static void server_callback(AvahiServer *s, AvahiServerState state, AVAHI_GCC_UNUSED void* userdata) {
+
+    server = s;
+    avahi_log_debug("server state: %i", state);
+
+    if (state == AVAHI_SERVER_RUNNING) {
+        avahi_log_debug("Server startup complete. Host name is <%s>. Service cookie is %u", avahi_server_get_host_name_fqdn(s), avahi_server_get_local_service_cookie(s));
+        create_entries(0);
+    } else if (state == AVAHI_SERVER_COLLISION) {
+        char *n;
+        remove_entries();
+
+        n = avahi_alternative_host_name(avahi_server_get_host_name(s));
+
+        avahi_log_debug("Host name conflict, retrying with <%s>", n);
+        avahi_server_set_host_name(s, n);
+        avahi_free(n);
+    }
+}
+
+static void remove_entries(void) {
+    if (group)
+        avahi_s_entry_group_reset(group);
+}
+
+static void create_entries(int new_name) {
+    AvahiAddress a;
+    AvahiRecord *r;
+
+    remove_entries();
+
+    if (!group)
+        group = avahi_s_entry_group_new(server, entry_group_callback, NULL);
+
+    assert(avahi_s_entry_group_is_empty(group));
+
+    if (!service_name)
+        service_name = avahi_strdup("Test Service");
+    else if (new_name) {
+        char *n = avahi_alternative_service_name(service_name);
+        avahi_free(service_name);
+        service_name = n;
+    }
+
+    if (avahi_server_add_service(server, group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, service_name, "_http._tcp", NULL, NULL, 80, "foo", NULL) < 0) {
+        avahi_log_error("Failed to add HTTP service");
+        goto fail;
+    }
+
+    if (avahi_server_add_service(server, group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, service_name, "_ftp._tcp", NULL, NULL, 21, "foo", NULL) < 0) {
+        avahi_log_error("Failed to add FTP service");
+        goto fail;
+    }
+
+    if (avahi_server_add_service(server, group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0,service_name, "_webdav._tcp", NULL, NULL, 80, "foo", NULL) < 0) {
+        avahi_log_error("Failed to add WEBDAV service");
+        goto fail;
+    }
+
+    if (avahi_server_add_dns_server_address(server, group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, NULL, AVAHI_DNS_SERVER_RESOLVE, avahi_address_parse("192.168.50.1", AVAHI_PROTO_UNSPEC, &a), 53) < 0) {
+        avahi_log_error("Failed to add new DNS Server address");
+        goto fail;
+    }
+
+    r = avahi_record_new_full("cname.local", AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_CNAME, AVAHI_DEFAULT_TTL);
+    r->data.cname.name = avahi_strdup("cocaine.local");
+
+    if (avahi_server_add(server, group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, r) < 0) {
+        avahi_record_unref(r);
+        avahi_log_error("Failed to add CNAME record");
+        goto fail;
+    }
+    avahi_record_unref(r);
+
+    avahi_s_entry_group_commit(group);
+    return;
+
+fail:
+    if (group)
+        avahi_s_entry_group_free(group);
+
+    group = NULL;
+}
+
+static void hnr_callback(
+    AVAHI_GCC_UNUSED AvahiSHostNameResolver *r,
+    AvahiIfIndex iface,
+    AvahiProtocol protocol,
+    AvahiResolverEvent event,
+    const char *hostname,
+    const AvahiAddress *a,
+    AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+    AVAHI_GCC_UNUSED void* userdata) {
+    char t[AVAHI_ADDRESS_STR_MAX];
+
+    if (a)
+        avahi_address_snprint(t, sizeof(t), a);
+
+    avahi_log_debug("HNR: (%i.%i) <%s> -> %s [%s]", iface, protocol, hostname, a ? t : "n/a", resolver_event_to_string(event));
+}
+
+static void ar_callback(
+    AVAHI_GCC_UNUSED AvahiSAddressResolver *r,
+    AvahiIfIndex iface,
+    AvahiProtocol protocol,
+    AvahiResolverEvent event,
+    const AvahiAddress *a,
+    const char *hostname,
+    AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+    AVAHI_GCC_UNUSED void* userdata) {
+    char t[AVAHI_ADDRESS_STR_MAX];
+
+    avahi_address_snprint(t, sizeof(t), a);
+
+    avahi_log_debug("AR: (%i.%i) %s -> <%s> [%s]", iface, protocol, t, hostname ? hostname : "n/a", resolver_event_to_string(event));
+}
+
+static void db_callback(
+    AVAHI_GCC_UNUSED AvahiSDomainBrowser *b,
+    AvahiIfIndex iface,
+    AvahiProtocol protocol,
+    AvahiBrowserEvent event,
+    const char *domain,
+    AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+    AVAHI_GCC_UNUSED void* userdata) {
+
+    avahi_log_debug("DB: (%i.%i) <%s> [%s]", iface, protocol, domain ? domain : "NULL", browser_event_to_string(event));
+}
+
+static void stb_callback(
+    AVAHI_GCC_UNUSED AvahiSServiceTypeBrowser *b,
+    AvahiIfIndex iface,
+    AvahiProtocol protocol,
+    AvahiBrowserEvent event,
+    const char *service_type,
+    const char *domain,
+    AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+    AVAHI_GCC_UNUSED void* userdata) {
+
+    avahi_log_debug("STB: (%i.%i) %s in <%s> [%s]", iface, protocol, service_type ? service_type : "NULL", domain ? domain : "NULL", browser_event_to_string(event));
+}
+
+static void sb_callback(
+    AVAHI_GCC_UNUSED AvahiSServiceBrowser *b,
+    AvahiIfIndex iface,
+    AvahiProtocol protocol,
+    AvahiBrowserEvent event,
+    const char *name,
+    const char *service_type,
+    const char *domain,
+    AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+    AVAHI_GCC_UNUSED void* userdata) {
+    avahi_log_debug("SB: (%i.%i) <%s> as %s in <%s> [%s]", iface, protocol, name ? name : "NULL", service_type ? service_type : "NULL", domain ? domain : "NULL", browser_event_to_string(event));
+}
+
+static void sr_callback(
+    AVAHI_GCC_UNUSED AvahiSServiceResolver *r,
+    AvahiIfIndex iface,
+    AvahiProtocol protocol,
+    AvahiResolverEvent event,
+    const char *name,
+    const char*service_type,
+    const char*domain_name,
+    const char*hostname,
+    const AvahiAddress *a,
+    uint16_t port,
+    AvahiStringList *txt,
+    AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+    AVAHI_GCC_UNUSED void* userdata) {
+
+    if (event != AVAHI_RESOLVER_FOUND)
+        avahi_log_debug("SR: (%i.%i) <%s> as %s in <%s> [%s]", iface, protocol, name, service_type, domain_name, resolver_event_to_string(event));
+    else {
+        char t[AVAHI_ADDRESS_STR_MAX], *s;
+
+        avahi_address_snprint(t, sizeof(t), a);
+
+        s = avahi_string_list_to_string(txt);
+        avahi_log_debug("SR: (%i.%i) <%s> as %s in <%s>: %s/%s:%i (%s) [%s]", iface, protocol, name, service_type, domain_name, hostname, t, port, s, resolver_event_to_string(event));
+        avahi_free(s);
+    }
+}
+
+static void dsb_callback(
+    AVAHI_GCC_UNUSED AvahiSDNSServerBrowser *b,
+    AvahiIfIndex iface,
+    AvahiProtocol protocol,
+    AvahiBrowserEvent event,
+    const char*hostname,
+    const AvahiAddress *a,
+    uint16_t port,
+    AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+    AVAHI_GCC_UNUSED void* userdata) {
+
+    char t[AVAHI_ADDRESS_STR_MAX] = "n/a";
+
+    if (a)
+        avahi_address_snprint(t, sizeof(t), a);
+
+    avahi_log_debug("DSB: (%i.%i): %s/%s:%i [%s]", iface, protocol, hostname ? hostname : "NULL", t, port, browser_event_to_string(event));
+}
+
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
+    AvahiSRecordBrowser *r;
+    AvahiSHostNameResolver *hnr;
+    AvahiSAddressResolver *ar;
+    AvahiKey *k;
+    AvahiServerConfig config;
+    AvahiAddress a;
+    AvahiSDomainBrowser *db;
+    AvahiSServiceTypeBrowser *stb;
+    AvahiSServiceBrowser *sb;
+    AvahiSServiceResolver *sr;
+    AvahiSDNSServerBrowser *dsb;
+    AvahiSimplePoll *simple_poll;
+    int error;
+    struct timeval tv;
+
+    simple_poll = avahi_simple_poll_new();
+    poll_api = avahi_simple_poll_get(simple_poll);
+
+    avahi_server_config_init(&config);
+
+    avahi_address_parse("192.168.50.1", AVAHI_PROTO_UNSPEC, &config.wide_area_servers[0]);
+    config.n_wide_area_servers = 1;
+    config.enable_wide_area = 1;
+
+    server = avahi_server_new(poll_api, &config, server_callback, NULL, &error);
+    avahi_server_config_free(&config);
+
+    k = avahi_key_new("_http._tcp.0pointer.de", AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_PTR);
+    r = avahi_s_record_browser_new(server, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, k, 0, record_browser_callback, NULL);
+    avahi_key_unref(k);
+
+    hnr = avahi_s_host_name_resolver_new(server, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, "cname.local", AVAHI_PROTO_UNSPEC, 0, hnr_callback, NULL);
+
+    ar = avahi_s_address_resolver_new(server, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, avahi_address_parse("192.168.50.1", AVAHI_PROTO_INET, &a), 0, ar_callback, NULL);
+
+    db = avahi_s_domain_browser_new(server, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, NULL, AVAHI_DOMAIN_BROWSER_BROWSE, 0, db_callback, NULL);
+
+    stb = avahi_s_service_type_browser_new(server, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, NULL, 0, stb_callback, NULL);
+
+    sb = avahi_s_service_browser_new(server, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, "_http._tcp", NULL, 0, sb_callback, NULL);
+
+    sr = avahi_s_service_resolver_new(server, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, "Ecstasy HTTP", "_http._tcp", "local", AVAHI_PROTO_UNSPEC, 0, sr_callback, NULL);
+
+    dsb = avahi_s_dns_server_browser_new(server, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, "local", AVAHI_DNS_SERVER_RESOLVE, AVAHI_PROTO_UNSPEC, 0, dsb_callback, NULL);
+
+    avahi_elapse_time(&tv, 1000*5, 0);
+    poll_api->timeout_new(poll_api, &tv, dump_timeout_callback, server);
+
+    avahi_elapse_time(&tv, 1000*60, 0);
+    poll_api->timeout_new(poll_api, &tv, quit_timeout_callback, simple_poll);
+
+    avahi_simple_poll_loop(simple_poll);
+
+    avahi_s_record_browser_free(r);
+    avahi_s_host_name_resolver_free(hnr);
+    avahi_s_address_resolver_free(ar);
+    avahi_s_domain_browser_free(db);
+    avahi_s_service_type_browser_free(stb);
+    avahi_s_service_browser_free(sb);
+    avahi_s_service_resolver_free(sr);
+    avahi_s_dns_server_browser_free(dsb);
+
+    if (group)
+        avahi_s_entry_group_free(group);
+
+    if (server)
+        avahi_server_free(server);
+
+    if (simple_poll)
+        avahi_simple_poll_free(simple_poll);
+
+    avahi_free(service_name);
+
+    return 0;
+}
diff --git a/avahi-0.6.31/avahi-core/browse-dns-server.c b/avahi-0.6.31/avahi-core/browse-dns-server.c
new file mode 100644
index 0000000..a51c38f
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/browse-dns-server.c
@@ -0,0 +1,322 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+
+#include <avahi-common/domain.h>
+#include <avahi-common/malloc.h>
+#include <avahi-common/error.h>
+
+#include "browse.h"
+#include "log.h"
+#include "rr.h"
+
+typedef struct AvahiDNSServerInfo AvahiDNSServerInfo;
+
+struct AvahiDNSServerInfo {
+    AvahiSDNSServerBrowser *browser;
+
+    AvahiIfIndex interface;
+    AvahiProtocol protocol;
+    AvahiRecord *srv_record;
+    AvahiSHostNameResolver *host_name_resolver;
+    AvahiAddress address;
+    AvahiLookupResultFlags flags;
+
+    AVAHI_LLIST_FIELDS(AvahiDNSServerInfo, info);
+};
+
+struct AvahiSDNSServerBrowser {
+    AvahiServer *server;
+
+    AvahiSRecordBrowser *record_browser;
+    AvahiSDNSServerBrowserCallback callback;
+    void* userdata;
+    AvahiProtocol aprotocol;
+    AvahiLookupFlags user_flags;
+
+    unsigned n_info;
+
+    AVAHI_LLIST_FIELDS(AvahiSDNSServerBrowser, browser);
+    AVAHI_LLIST_HEAD(AvahiDNSServerInfo, info);
+};
+
+static AvahiDNSServerInfo* get_server_info(AvahiSDNSServerBrowser *b, AvahiIfIndex interface, AvahiProtocol protocol, AvahiRecord *r) {
+    AvahiDNSServerInfo *i;
+
+    assert(b);
+    assert(r);
+
+    for (i = b->info; i; i = i->info_next)
+        if (i->interface == interface &&
+            i->protocol == protocol &&
+            avahi_record_equal_no_ttl(r, i->srv_record))
+            return i;
+
+    return NULL;
+}
+
+static void server_info_free(AvahiSDNSServerBrowser *b, AvahiDNSServerInfo *i) {
+    assert(b);
+    assert(i);
+
+    avahi_record_unref(i->srv_record);
+    if (i->host_name_resolver)
+        avahi_s_host_name_resolver_free(i->host_name_resolver);
+
+    AVAHI_LLIST_REMOVE(AvahiDNSServerInfo, info, b->info, i);
+
+    assert(b->n_info >= 1);
+    b->n_info--;
+
+    avahi_free(i);
+}
+
+static void host_name_resolver_callback(
+    AvahiSHostNameResolver *r,
+    AVAHI_GCC_UNUSED AvahiIfIndex interface,
+    AVAHI_GCC_UNUSED AvahiProtocol protocol,
+    AvahiResolverEvent event,
+    const char *host_name,
+    const AvahiAddress *a,
+    AvahiLookupResultFlags flags,
+    void* userdata) {
+
+    AvahiDNSServerInfo *i = userdata;
+
+    assert(r);
+    assert(host_name);
+    assert(i);
+
+    switch (event) {
+        case AVAHI_RESOLVER_FOUND: {
+            i->address = *a;
+
+            i->browser->callback(
+                i->browser,
+                i->interface,
+                i->protocol,
+                AVAHI_BROWSER_NEW,
+                i->srv_record->data.srv.name,
+                &i->address,
+                i->srv_record->data.srv.port,
+                i->flags | flags,
+                i->browser->userdata);
+
+            break;
+        }
+
+        case AVAHI_RESOLVER_FAILURE:
+            /* Ignore */
+            break;
+    }
+
+    avahi_s_host_name_resolver_free(i->host_name_resolver);
+    i->host_name_resolver = NULL;
+}
+
+static void record_browser_callback(
+    AvahiSRecordBrowser*rr,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiBrowserEvent event,
+    AvahiRecord *record,
+    AvahiLookupResultFlags flags,
+    void* userdata) {
+
+    AvahiSDNSServerBrowser *b = userdata;
+
+    assert(rr);
+    assert(b);
+
+    /* Filter flags */
+    flags &= AVAHI_LOOKUP_RESULT_CACHED | AVAHI_LOOKUP_RESULT_MULTICAST | AVAHI_LOOKUP_RESULT_WIDE_AREA;
+
+    switch (event) {
+        case AVAHI_BROWSER_NEW: {
+            AvahiDNSServerInfo *i;
+
+            assert(record);
+            assert(record->key->type == AVAHI_DNS_TYPE_SRV);
+
+            if (get_server_info(b, interface, protocol, record))
+                return;
+
+            if (b->n_info >= 10)
+                return;
+
+            if (!(i = avahi_new(AvahiDNSServerInfo, 1)))
+                return; /* OOM */
+
+            i->browser = b;
+            i->interface = interface;
+            i->protocol = protocol;
+            i->srv_record = avahi_record_ref(record);
+            i->host_name_resolver = avahi_s_host_name_resolver_new(
+                b->server,
+                interface, protocol,
+                record->data.srv.name,
+                b->aprotocol,
+                b->user_flags,
+                host_name_resolver_callback, i);
+            i->flags = flags;
+
+            AVAHI_LLIST_PREPEND(AvahiDNSServerInfo, info, b->info, i);
+
+            b->n_info++;
+            break;
+        }
+
+        case AVAHI_BROWSER_REMOVE: {
+            AvahiDNSServerInfo *i;
+
+            assert(record);
+            assert(record->key->type == AVAHI_DNS_TYPE_SRV);
+
+            if (!(i = get_server_info(b, interface, protocol, record)))
+                return;
+
+            if (!i->host_name_resolver)
+                b->callback(
+                    b,
+                    interface,
+                    protocol,
+                    event,
+                    i->srv_record->data.srv.name,
+                    &i->address,
+                    i->srv_record->data.srv.port,
+                    i->flags | flags,
+                    b->userdata);
+
+            server_info_free(b, i);
+            break;
+        }
+
+        case AVAHI_BROWSER_FAILURE:
+        case AVAHI_BROWSER_ALL_FOR_NOW:
+        case AVAHI_BROWSER_CACHE_EXHAUSTED:
+
+            b->callback(
+                b,
+                interface,
+                protocol,
+                event,
+                NULL,
+                NULL,
+                0,
+                flags,
+                b->userdata);
+
+            break;
+    }
+}
+
+AvahiSDNSServerBrowser *avahi_s_dns_server_browser_new(
+    AvahiServer *server,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    const char *domain,
+    AvahiDNSServerType type,
+    AvahiProtocol aprotocol,
+    AvahiLookupFlags flags,
+    AvahiSDNSServerBrowserCallback callback,
+    void* userdata) {
+
+    static const char * const type_table[AVAHI_DNS_SERVER_MAX] = {
+        "_domain._udp",
+        "_dns-update._udp"
+    };
+
+    AvahiSDNSServerBrowser *b;
+    AvahiKey *k = NULL;
+    char n[AVAHI_DOMAIN_NAME_MAX];
+    int r;
+
+    assert(server);
+    assert(callback);
+
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, AVAHI_IF_VALID(interface), AVAHI_ERR_INVALID_INTERFACE);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, AVAHI_PROTO_VALID(protocol), AVAHI_ERR_INVALID_PROTOCOL);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, AVAHI_PROTO_VALID(aprotocol), AVAHI_ERR_INVALID_PROTOCOL);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, !domain || avahi_is_valid_domain_name(domain), AVAHI_ERR_INVALID_DOMAIN_NAME);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, AVAHI_FLAGS_VALID(flags, AVAHI_LOOKUP_USE_WIDE_AREA|AVAHI_LOOKUP_USE_MULTICAST), AVAHI_ERR_INVALID_FLAGS);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, type < AVAHI_DNS_SERVER_MAX, AVAHI_ERR_INVALID_FLAGS);
+
+    if (!domain)
+        domain = server->domain_name;
+
+    if ((r = avahi_service_name_join(n, sizeof(n), NULL, type_table[type], domain)) < 0) {
+        avahi_server_set_errno(server, r);
+        return NULL;
+    }
+
+    if (!(b = avahi_new(AvahiSDNSServerBrowser, 1))) {
+        avahi_server_set_errno(server, AVAHI_ERR_NO_MEMORY);
+        return NULL;
+    }
+
+    b->server = server;
+    b->callback = callback;
+    b->userdata = userdata;
+    b->aprotocol = aprotocol;
+    b->n_info = 0;
+    b->user_flags = flags;
+
+    AVAHI_LLIST_HEAD_INIT(AvahiDNSServerInfo, b->info);
+    AVAHI_LLIST_PREPEND(AvahiSDNSServerBrowser, browser, server->dns_server_browsers, b);
+
+    if (!(k = avahi_key_new(n, AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_SRV))) {
+        avahi_server_set_errno(server, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    if (!(b->record_browser = avahi_s_record_browser_new(server, interface, protocol, k, flags, record_browser_callback, b)))
+        goto fail;
+
+    avahi_key_unref(k);
+
+    return b;
+
+fail:
+
+    if (k)
+        avahi_key_unref(k);
+
+    avahi_s_dns_server_browser_free(b);
+    return NULL;
+}
+
+void avahi_s_dns_server_browser_free(AvahiSDNSServerBrowser *b) {
+    assert(b);
+
+    while (b->info)
+        server_info_free(b, b->info);
+
+    AVAHI_LLIST_REMOVE(AvahiSDNSServerBrowser, browser, b->server->dns_server_browsers, b);
+
+    if (b->record_browser)
+        avahi_s_record_browser_free(b->record_browser);
+
+    avahi_free(b);
+}
+
diff --git a/avahi-0.6.31/avahi-core/browse-domain.c b/avahi-0.6.31/avahi-core/browse-domain.c
new file mode 100644
index 0000000..9705b2a
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/browse-domain.c
@@ -0,0 +1,235 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+
+#include <avahi-common/domain.h>
+#include <avahi-common/malloc.h>
+#include <avahi-common/error.h>
+
+#include "browse.h"
+#include "log.h"
+
+struct AvahiSDomainBrowser {
+    int ref;
+
+    AvahiServer *server;
+
+    AvahiSRecordBrowser *record_browser;
+
+    AvahiDomainBrowserType type;
+    AvahiSDomainBrowserCallback callback;
+    void* userdata;
+
+    AvahiTimeEvent *defer_event;
+
+    int all_for_now_scheduled;
+
+    AVAHI_LLIST_FIELDS(AvahiSDomainBrowser, browser);
+};
+
+static void inc_ref(AvahiSDomainBrowser *b) {
+    assert(b);
+    assert(b->ref >= 1);
+
+    b->ref++;
+}
+
+static void record_browser_callback(
+    AvahiSRecordBrowser*rr,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiBrowserEvent event,
+    AvahiRecord *record,
+    AvahiLookupResultFlags flags,
+    void* userdata) {
+
+    AvahiSDomainBrowser *b = userdata;
+    char *n = NULL;
+
+    assert(rr);
+    assert(b);
+
+    if (event == AVAHI_BROWSER_ALL_FOR_NOW &&
+        b->defer_event) {
+
+        b->all_for_now_scheduled = 1;
+        return;
+    }
+
+    /* Filter flags */
+    flags &= AVAHI_LOOKUP_RESULT_CACHED | AVAHI_LOOKUP_RESULT_MULTICAST | AVAHI_LOOKUP_RESULT_WIDE_AREA;
+
+    if (record) {
+        assert(record->key->type == AVAHI_DNS_TYPE_PTR);
+        n = record->data.ptr.name;
+
+        if (b->type == AVAHI_DOMAIN_BROWSER_BROWSE) {
+            AvahiStringList *l;
+
+            /* Filter out entries defined statically */
+
+            for (l = b->server->config.browse_domains; l; l = l->next)
+                if (avahi_domain_equal((char*) l->text, n))
+                    return;
+        }
+
+    }
+
+    b->callback(b, interface, protocol, event, n, flags, b->userdata);
+}
+
+static void defer_callback(AvahiTimeEvent *e, void *userdata) {
+    AvahiSDomainBrowser *b = userdata;
+    AvahiStringList *l;
+
+    assert(e);
+    assert(b);
+
+    assert(b->type == AVAHI_DOMAIN_BROWSER_BROWSE);
+
+    avahi_time_event_free(b->defer_event);
+    b->defer_event = NULL;
+
+    /* Increase ref counter */
+    inc_ref(b);
+
+    for (l = b->server->config.browse_domains; l; l = l->next) {
+
+        /* Check whether this object still exists outside our own
+         * stack frame */
+        if (b->ref <= 1)
+            break;
+
+        b->callback(b, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, AVAHI_BROWSER_NEW, (char*) l->text, AVAHI_LOOKUP_RESULT_STATIC, b->userdata);
+    }
+
+    if (b->ref > 1) {
+        /* If the ALL_FOR_NOW event has already been scheduled, execute it now */
+
+        if (b->all_for_now_scheduled)
+            b->callback(b, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, AVAHI_BROWSER_ALL_FOR_NOW, NULL, 0, b->userdata);
+    }
+
+    /* Decrease ref counter */
+    avahi_s_domain_browser_free(b);
+}
+
+AvahiSDomainBrowser *avahi_s_domain_browser_new(
+    AvahiServer *server,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    const char *domain,
+    AvahiDomainBrowserType type,
+    AvahiLookupFlags flags,
+    AvahiSDomainBrowserCallback callback,
+    void* userdata) {
+
+    static const char * const type_table[AVAHI_DOMAIN_BROWSER_MAX] = {
+        "b",
+        "db",
+        "r",
+        "dr",
+        "lb"
+    };
+
+    AvahiSDomainBrowser *b;
+    AvahiKey *k = NULL;
+    char n[AVAHI_DOMAIN_NAME_MAX];
+    int r;
+
+    assert(server);
+    assert(callback);
+
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, AVAHI_IF_VALID(interface), AVAHI_ERR_INVALID_INTERFACE);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, AVAHI_PROTO_VALID(protocol), AVAHI_ERR_INVALID_PROTOCOL);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, type < AVAHI_DOMAIN_BROWSER_MAX, AVAHI_ERR_INVALID_FLAGS);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, !domain || avahi_is_valid_domain_name(domain), AVAHI_ERR_INVALID_DOMAIN_NAME);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, AVAHI_FLAGS_VALID(flags, AVAHI_LOOKUP_USE_WIDE_AREA|AVAHI_LOOKUP_USE_MULTICAST), AVAHI_ERR_INVALID_FLAGS);
+
+    if (!domain)
+        domain = server->domain_name;
+
+    if ((r = avahi_service_name_join(n, sizeof(n), type_table[type], "_dns-sd._udp", domain)) < 0) {
+        avahi_server_set_errno(server, r);
+        return NULL;
+    }
+
+    if (!(b = avahi_new(AvahiSDomainBrowser, 1))) {
+        avahi_server_set_errno(server, AVAHI_ERR_NO_MEMORY);
+        return NULL;
+    }
+
+    b->ref = 1;
+    b->server = server;
+    b->callback = callback;
+    b->userdata = userdata;
+    b->record_browser = NULL;
+    b->type = type;
+    b->all_for_now_scheduled = 0;
+    b->defer_event = NULL;
+
+    AVAHI_LLIST_PREPEND(AvahiSDomainBrowser, browser, server->domain_browsers, b);
+
+    if (!(k = avahi_key_new(n, AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_PTR))) {
+        avahi_server_set_errno(server, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    if (!(b->record_browser = avahi_s_record_browser_new(server, interface, protocol, k, flags, record_browser_callback, b)))
+        goto fail;
+
+    avahi_key_unref(k);
+
+    if (type == AVAHI_DOMAIN_BROWSER_BROWSE && b->server->config.browse_domains)
+        b->defer_event = avahi_time_event_new(server->time_event_queue, NULL, defer_callback, b);
+
+    return b;
+
+fail:
+
+    if (k)
+        avahi_key_unref(k);
+
+    avahi_s_domain_browser_free(b);
+
+    return NULL;
+}
+
+void avahi_s_domain_browser_free(AvahiSDomainBrowser *b) {
+    assert(b);
+
+    assert(b->ref >= 1);
+    if (--b->ref > 0)
+        return;
+
+    AVAHI_LLIST_REMOVE(AvahiSDomainBrowser, browser, b->server->domain_browsers, b);
+
+    if (b->record_browser)
+        avahi_s_record_browser_free(b->record_browser);
+
+    if (b->defer_event)
+        avahi_time_event_free(b->defer_event);
+
+    avahi_free(b);
+}
diff --git a/avahi-0.6.31/avahi-core/browse-service-type.c b/avahi-0.6.31/avahi-core/browse-service-type.c
new file mode 100644
index 0000000..6fff071
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/browse-service-type.c
@@ -0,0 +1,157 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+
+#include <avahi-common/domain.h>
+#include <avahi-common/malloc.h>
+#include <avahi-common/error.h>
+
+#include "browse.h"
+#include "log.h"
+
+struct AvahiSServiceTypeBrowser {
+    AvahiServer *server;
+    char *domain_name;
+
+    AvahiSRecordBrowser *record_browser;
+
+    AvahiSServiceTypeBrowserCallback callback;
+    void* userdata;
+
+    AVAHI_LLIST_FIELDS(AvahiSServiceTypeBrowser, browser);
+};
+
+static void record_browser_callback(
+    AvahiSRecordBrowser*rr,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiBrowserEvent event,
+    AvahiRecord *record,
+    AvahiLookupResultFlags flags,
+    void* userdata) {
+
+    AvahiSServiceTypeBrowser *b = userdata;
+
+    assert(rr);
+    assert(b);
+
+    /* Filter flags */
+    flags &= AVAHI_LOOKUP_RESULT_CACHED | AVAHI_LOOKUP_RESULT_MULTICAST | AVAHI_LOOKUP_RESULT_WIDE_AREA;
+
+    if (record) {
+        char type[AVAHI_DOMAIN_NAME_MAX], domain[AVAHI_DOMAIN_NAME_MAX];
+
+        assert(record->key->type == AVAHI_DNS_TYPE_PTR);
+
+        if (avahi_service_name_split(record->data.ptr.name, NULL, 0, type, sizeof(type), domain, sizeof(domain)) < 0) {
+            avahi_log_warn("Invalid service type '%s'", record->key->name);
+            return;
+        }
+
+        b->callback(b, interface, protocol, event, type, domain, flags, b->userdata);
+    } else
+        b->callback(b, interface, protocol, event, NULL, b->domain_name, flags, b->userdata);
+}
+
+AvahiSServiceTypeBrowser *avahi_s_service_type_browser_new(
+    AvahiServer *server,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    const char *domain,
+    AvahiLookupFlags flags,
+    AvahiSServiceTypeBrowserCallback callback,
+    void* userdata) {
+
+    AvahiSServiceTypeBrowser *b;
+    AvahiKey *k = NULL;
+    char n[AVAHI_DOMAIN_NAME_MAX];
+    int r;
+
+    assert(server);
+    assert(callback);
+
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, AVAHI_IF_VALID(interface), AVAHI_ERR_INVALID_INTERFACE);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, AVAHI_PROTO_VALID(protocol), AVAHI_ERR_INVALID_PROTOCOL);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, !domain || avahi_is_valid_domain_name(domain), AVAHI_ERR_INVALID_DOMAIN_NAME);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, AVAHI_FLAGS_VALID(flags, AVAHI_LOOKUP_USE_WIDE_AREA|AVAHI_LOOKUP_USE_MULTICAST), AVAHI_ERR_INVALID_FLAGS);
+
+    if (!domain)
+        domain = server->domain_name;
+
+    if ((r = avahi_service_name_join(n, sizeof(n), NULL, "_services._dns-sd._udp", domain)) < 0) {
+        avahi_server_set_errno(server, r);
+        return NULL;
+    }
+
+    if (!(b = avahi_new(AvahiSServiceTypeBrowser, 1))) {
+        avahi_server_set_errno(server, AVAHI_ERR_NO_MEMORY);
+        return NULL;
+    }
+
+    b->server = server;
+    b->callback = callback;
+    b->userdata = userdata;
+    b->record_browser = NULL;
+
+    AVAHI_LLIST_PREPEND(AvahiSServiceTypeBrowser, browser, server->service_type_browsers, b);
+
+    if (!(b->domain_name = avahi_normalize_name_strdup(domain))) {
+        avahi_server_set_errno(server, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    if (!(k = avahi_key_new(n, AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_PTR))) {
+        avahi_server_set_errno(server, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    if (!(b->record_browser = avahi_s_record_browser_new(server, interface, protocol, k, flags, record_browser_callback, b)))
+        goto fail;
+
+    avahi_key_unref(k);
+
+    return b;
+
+fail:
+    if (k)
+        avahi_key_unref(k);
+
+    avahi_s_service_type_browser_free(b);
+
+    return NULL;
+}
+
+void avahi_s_service_type_browser_free(AvahiSServiceTypeBrowser *b) {
+    assert(b);
+
+    AVAHI_LLIST_REMOVE(AvahiSServiceTypeBrowser, browser, b->server->service_type_browsers, b);
+
+    if (b->record_browser)
+        avahi_s_record_browser_free(b->record_browser);
+
+    avahi_free(b->domain_name);
+    avahi_free(b);
+}
+
+
diff --git a/avahi-0.6.31/avahi-core/browse-service.c b/avahi-0.6.31/avahi-core/browse-service.c
new file mode 100644
index 0000000..dde36bc
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/browse-service.c
@@ -0,0 +1,167 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+
+#include <avahi-common/domain.h>
+#include <avahi-common/malloc.h>
+#include <avahi-common/error.h>
+
+#include "browse.h"
+#include "log.h"
+
+struct AvahiSServiceBrowser {
+    AvahiServer *server;
+    char *domain_name;
+    char *service_type;
+
+    AvahiSRecordBrowser *record_browser;
+
+    AvahiSServiceBrowserCallback callback;
+    void* userdata;
+
+    AVAHI_LLIST_FIELDS(AvahiSServiceBrowser, browser);
+};
+
+static void record_browser_callback(
+    AvahiSRecordBrowser*rr,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiBrowserEvent event,
+    AvahiRecord *record,
+    AvahiLookupResultFlags flags,
+    void* userdata) {
+
+    AvahiSServiceBrowser *b = userdata;
+
+    assert(rr);
+    assert(b);
+
+    /* Filter flags */
+    flags &= AVAHI_LOOKUP_RESULT_CACHED | AVAHI_LOOKUP_RESULT_MULTICAST | AVAHI_LOOKUP_RESULT_WIDE_AREA;
+
+    if (record) {
+        char service[AVAHI_LABEL_MAX], type[AVAHI_DOMAIN_NAME_MAX], domain[AVAHI_DOMAIN_NAME_MAX];
+
+        assert(record->key->type == AVAHI_DNS_TYPE_PTR);
+
+        if (event == AVAHI_BROWSER_NEW && avahi_server_is_service_local(b->server, interface, protocol, record->data.ptr.name))
+            flags |= AVAHI_LOOKUP_RESULT_LOCAL;
+
+        if (avahi_service_name_split(record->data.ptr.name, service, sizeof(service), type, sizeof(type), domain, sizeof(domain)) < 0) {
+            avahi_log_warn("Failed to split '%s'", record->key->name);
+            return;
+        }
+
+        b->callback(b, interface, protocol, event, service, type, domain, flags, b->userdata);
+
+    } else
+        b->callback(b, interface, protocol, event, NULL, b->service_type, b->domain_name, flags, b->userdata);
+
+}
+
+AvahiSServiceBrowser *avahi_s_service_browser_new(
+    AvahiServer *server,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    const char *service_type,
+    const char *domain,
+    AvahiLookupFlags flags,
+    AvahiSServiceBrowserCallback callback,
+    void* userdata) {
+
+    AvahiSServiceBrowser *b;
+    AvahiKey *k = NULL;
+    char n[AVAHI_DOMAIN_NAME_MAX];
+    int r;
+
+    assert(server);
+    assert(callback);
+    assert(service_type);
+
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, AVAHI_IF_VALID(interface), AVAHI_ERR_INVALID_INTERFACE);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, AVAHI_PROTO_VALID(protocol), AVAHI_ERR_INVALID_PROTOCOL);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, !domain || avahi_is_valid_domain_name(domain), AVAHI_ERR_INVALID_DOMAIN_NAME);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, AVAHI_FLAGS_VALID(flags, AVAHI_LOOKUP_USE_WIDE_AREA|AVAHI_LOOKUP_USE_MULTICAST), AVAHI_ERR_INVALID_FLAGS);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, avahi_is_valid_service_type_generic(service_type), AVAHI_ERR_INVALID_SERVICE_TYPE);
+
+    if (!domain)
+        domain = server->domain_name;
+
+    if ((r = avahi_service_name_join(n, sizeof(n), NULL, service_type, domain)) < 0) {
+        avahi_server_set_errno(server, r);
+        return NULL;
+    }
+
+    if (!(b = avahi_new(AvahiSServiceBrowser, 1))) {
+        avahi_server_set_errno(server, AVAHI_ERR_NO_MEMORY);
+        return NULL;
+    }
+
+    b->server = server;
+    b->domain_name = b->service_type = NULL;
+    b->callback = callback;
+    b->userdata = userdata;
+    b->record_browser = NULL;
+
+    AVAHI_LLIST_PREPEND(AvahiSServiceBrowser, browser, server->service_browsers, b);
+
+    if (!(b->domain_name = avahi_normalize_name_strdup(domain)) ||
+        !(b->service_type = avahi_normalize_name_strdup(service_type))) {
+        avahi_server_set_errno(server, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    if (!(k = avahi_key_new(n, AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_PTR))) {
+        avahi_server_set_errno(server, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    if (!(b->record_browser = avahi_s_record_browser_new(server, interface, protocol, k, flags, record_browser_callback, b)))
+        goto fail;
+
+    avahi_key_unref(k);
+
+    return b;
+
+fail:
+
+    if (k)
+        avahi_key_unref(k);
+
+    avahi_s_service_browser_free(b);
+    return NULL;
+}
+
+void avahi_s_service_browser_free(AvahiSServiceBrowser *b) {
+    assert(b);
+
+    AVAHI_LLIST_REMOVE(AvahiSServiceBrowser, browser, b->server->service_browsers, b);
+
+    if (b->record_browser)
+        avahi_s_record_browser_free(b->record_browser);
+
+    avahi_free(b->domain_name);
+    avahi_free(b->service_type);
+    avahi_free(b);
+}
diff --git a/avahi-0.6.31/avahi-core/browse.c b/avahi-0.6.31/avahi-core/browse.c
new file mode 100644
index 0000000..eabd7ea
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/browse.c
@@ -0,0 +1,613 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+
+#include <avahi-common/timeval.h>
+#include <avahi-common/malloc.h>
+#include <avahi-common/error.h>
+#include <avahi-common/domain.h>
+#include <avahi-common/rlist.h>
+#include <avahi-common/address.h>
+
+#include "browse.h"
+#include "log.h"
+#include "querier.h"
+#include "domain-util.h"
+#include "rr-util.h"
+
+#define AVAHI_LOOKUPS_PER_BROWSER_MAX 15
+
+struct AvahiSRBLookup {
+    AvahiSRecordBrowser *record_browser;
+
+    unsigned ref;
+
+    AvahiIfIndex interface;
+    AvahiProtocol protocol;
+    AvahiLookupFlags flags;
+
+    AvahiKey *key;
+
+    AvahiWideAreaLookup *wide_area;
+    AvahiMulticastLookup *multicast;
+
+    AvahiRList *cname_lookups;
+
+    AVAHI_LLIST_FIELDS(AvahiSRBLookup, lookups);
+};
+
+static void lookup_handle_cname(AvahiSRBLookup *l, AvahiIfIndex interface, AvahiProtocol protocol, AvahiLookupFlags flags, AvahiRecord *r);
+static void lookup_drop_cname(AvahiSRBLookup *l, AvahiIfIndex interface, AvahiProtocol protocol, AvahiLookupFlags flags, AvahiRecord *r);
+
+static void transport_flags_from_domain(AvahiServer *s, AvahiLookupFlags *flags, const char *domain) {
+    assert(flags);
+    assert(domain);
+
+    assert(!((*flags & AVAHI_LOOKUP_USE_MULTICAST) && (*flags & AVAHI_LOOKUP_USE_WIDE_AREA)));
+
+    if (*flags & (AVAHI_LOOKUP_USE_MULTICAST|AVAHI_LOOKUP_USE_WIDE_AREA))
+        return;
+
+    if (!s->wide_area_lookup_engine ||
+        !avahi_wide_area_has_servers(s->wide_area_lookup_engine) ||
+        avahi_domain_ends_with(domain, AVAHI_MDNS_SUFFIX_LOCAL) ||
+        avahi_domain_ends_with(domain, AVAHI_MDNS_SUFFIX_ADDR_IPV4) ||
+        avahi_domain_ends_with(domain, AVAHI_MDNS_SUFFIX_ADDR_IPV6))
+        *flags |= AVAHI_LOOKUP_USE_MULTICAST;
+    else
+        *flags |= AVAHI_LOOKUP_USE_WIDE_AREA;
+}
+
+static AvahiSRBLookup* lookup_new(
+    AvahiSRecordBrowser *b,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiLookupFlags flags,
+    AvahiKey *key) {
+
+    AvahiSRBLookup *l;
+
+    assert(b);
+    assert(AVAHI_IF_VALID(interface));
+    assert(AVAHI_PROTO_VALID(protocol));
+
+    if (b->n_lookups >= AVAHI_LOOKUPS_PER_BROWSER_MAX)
+        /* We don't like cyclic CNAMEs */
+        return NULL;
+
+    if (!(l = avahi_new(AvahiSRBLookup, 1)))
+        return NULL;
+
+    l->ref = 1;
+    l->record_browser = b;
+    l->interface = interface;
+    l->protocol = protocol;
+    l->key = avahi_key_ref(key);
+    l->wide_area = NULL;
+    l->multicast = NULL;
+    l->cname_lookups = NULL;
+    l->flags = flags;
+
+    transport_flags_from_domain(b->server, &l->flags, key->name);
+
+    AVAHI_LLIST_PREPEND(AvahiSRBLookup, lookups, b->lookups, l);
+
+    b->n_lookups ++;
+
+    return l;
+}
+
+static void lookup_unref(AvahiSRBLookup *l) {
+    assert(l);
+    assert(l->ref >= 1);
+
+    if (--l->ref >= 1)
+        return;
+
+    AVAHI_LLIST_REMOVE(AvahiSRBLookup, lookups, l->record_browser->lookups, l);
+    l->record_browser->n_lookups --;
+
+    if (l->wide_area) {
+        avahi_wide_area_lookup_free(l->wide_area);
+        l->wide_area = NULL;
+    }
+
+    if (l->multicast) {
+        avahi_multicast_lookup_free(l->multicast);
+        l->multicast = NULL;
+    }
+
+    while (l->cname_lookups) {
+        lookup_unref(l->cname_lookups->data);
+        l->cname_lookups = avahi_rlist_remove_by_link(l->cname_lookups, l->cname_lookups);
+    }
+
+    avahi_key_unref(l->key);
+    avahi_free(l);
+}
+
+static AvahiSRBLookup* lookup_ref(AvahiSRBLookup *l) {
+    assert(l);
+    assert(l->ref >= 1);
+
+    l->ref++;
+    return l;
+}
+
+static AvahiSRBLookup *lookup_find(
+    AvahiSRecordBrowser *b,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiLookupFlags flags,
+    AvahiKey *key) {
+
+    AvahiSRBLookup *l;
+
+    assert(b);
+
+    for (l = b->lookups; l; l = l->lookups_next) {
+
+        if ((l->interface == AVAHI_IF_UNSPEC || l->interface == interface) &&
+            (l->interface == AVAHI_PROTO_UNSPEC || l->protocol == protocol) &&
+            l->flags == flags &&
+            avahi_key_equal(l->key, key))
+
+            return l;
+    }
+
+    return NULL;
+}
+
+static void browser_cancel(AvahiSRecordBrowser *b) {
+    assert(b);
+
+    if (b->root_lookup) {
+        lookup_unref(b->root_lookup);
+        b->root_lookup = NULL;
+    }
+
+    if (b->defer_time_event) {
+        avahi_time_event_free(b->defer_time_event);
+        b->defer_time_event = NULL;
+    }
+}
+
+static void lookup_wide_area_callback(
+    AvahiWideAreaLookupEngine *e,
+    AvahiBrowserEvent event,
+    AvahiLookupResultFlags flags,
+    AvahiRecord *r,
+    void *userdata) {
+
+    AvahiSRBLookup *l = userdata;
+    AvahiSRecordBrowser *b;
+
+    assert(e);
+    assert(l);
+    assert(l->ref >= 1);
+
+    b = l->record_browser;
+
+    if (b->dead)
+        return;
+
+    lookup_ref(l);
+
+    switch (event) {
+        case AVAHI_BROWSER_NEW:
+            assert(r);
+
+            if (r->key->clazz == AVAHI_DNS_CLASS_IN &&
+                r->key->type == AVAHI_DNS_TYPE_CNAME)
+                /* It's a CNAME record, so let's follow it. We only follow it on wide area DNS! */
+                lookup_handle_cname(l, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, AVAHI_LOOKUP_USE_WIDE_AREA, r);
+            else {
+                /* It's a normal record, so let's call the user callback */
+                assert(avahi_key_equal(r->key, l->key));
+
+                b->callback(b, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, event, r, flags, b->userdata);
+            }
+            break;
+
+        case AVAHI_BROWSER_REMOVE:
+        case AVAHI_BROWSER_CACHE_EXHAUSTED:
+            /* Not defined for wide area DNS */
+            abort();
+
+        case AVAHI_BROWSER_ALL_FOR_NOW:
+        case AVAHI_BROWSER_FAILURE:
+
+            b->callback(b, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, event, NULL, flags, b->userdata);
+            break;
+    }
+
+    lookup_unref(l);
+
+}
+
+static void lookup_multicast_callback(
+    AvahiMulticastLookupEngine *e,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiBrowserEvent event,
+    AvahiLookupResultFlags flags,
+    AvahiRecord *r,
+    void *userdata) {
+
+    AvahiSRBLookup *l = userdata;
+    AvahiSRecordBrowser *b;
+
+    assert(e);
+    assert(l);
+
+    b = l->record_browser;
+
+    if (b->dead)
+        return;
+
+    lookup_ref(l);
+
+    switch (event) {
+        case AVAHI_BROWSER_NEW:
+            assert(r);
+
+            if (r->key->clazz == AVAHI_DNS_CLASS_IN &&
+                r->key->type == AVAHI_DNS_TYPE_CNAME)
+                /* It's a CNAME record, so let's follow it. We allow browsing on both multicast and wide area. */
+                lookup_handle_cname(l, interface, protocol, b->flags, r);
+            else {
+                /* It's a normal record, so let's call the user callback */
+
+                if (avahi_server_is_record_local(b->server, interface, protocol, r))
+                    flags |= AVAHI_LOOKUP_RESULT_LOCAL;
+
+                b->callback(b, interface, protocol, event, r, flags, b->userdata);
+            }
+            break;
+
+        case AVAHI_BROWSER_REMOVE:
+            assert(r);
+
+            if (r->key->clazz == AVAHI_DNS_CLASS_IN &&
+                r->key->type == AVAHI_DNS_TYPE_CNAME)
+                /* It's a CNAME record, so let's drop that query! */
+                lookup_drop_cname(l, interface, protocol, 0, r);
+            else {
+                /* It's a normal record, so let's call the user callback */
+                assert(avahi_key_equal(b->key, l->key));
+
+                b->callback(b, interface, protocol, event, r, flags, b->userdata);
+            }
+            break;
+
+        case AVAHI_BROWSER_ALL_FOR_NOW:
+
+            b->callback(b, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, event, NULL, flags, b->userdata);
+            break;
+
+        case AVAHI_BROWSER_CACHE_EXHAUSTED:
+        case AVAHI_BROWSER_FAILURE:
+            /* Not defined for multicast DNS */
+            abort();
+
+    }
+
+    lookup_unref(l);
+}
+
+static int lookup_start(AvahiSRBLookup *l) {
+    assert(l);
+
+    assert(!(l->flags & AVAHI_LOOKUP_USE_WIDE_AREA) != !(l->flags & AVAHI_LOOKUP_USE_MULTICAST));
+    assert(!l->wide_area && !l->multicast);
+
+    if (l->flags & AVAHI_LOOKUP_USE_WIDE_AREA) {
+
+        if (!(l->wide_area = avahi_wide_area_lookup_new(l->record_browser->server->wide_area_lookup_engine, l->key, lookup_wide_area_callback, l)))
+            return -1;
+
+    } else {
+        assert(l->flags & AVAHI_LOOKUP_USE_MULTICAST);
+
+        if (!(l->multicast = avahi_multicast_lookup_new(l->record_browser->server->multicast_lookup_engine, l->interface, l->protocol, l->key, lookup_multicast_callback, l)))
+            return -1;
+    }
+
+    return 0;
+}
+
+static int lookup_scan_cache(AvahiSRBLookup *l) {
+    int n = 0;
+
+    assert(l);
+
+    assert(!(l->flags & AVAHI_LOOKUP_USE_WIDE_AREA) != !(l->flags & AVAHI_LOOKUP_USE_MULTICAST));
+
+
+    if (l->flags & AVAHI_LOOKUP_USE_WIDE_AREA) {
+        n = (int) avahi_wide_area_scan_cache(l->record_browser->server->wide_area_lookup_engine, l->key, lookup_wide_area_callback, l);
+
+    } else {
+        assert(l->flags & AVAHI_LOOKUP_USE_MULTICAST);
+        n = (int) avahi_multicast_lookup_engine_scan_cache(l->record_browser->server->multicast_lookup_engine, l->interface, l->protocol, l->key, lookup_multicast_callback, l);
+    }
+
+    return n;
+}
+
+static AvahiSRBLookup* lookup_add(AvahiSRecordBrowser *b, AvahiIfIndex interface, AvahiProtocol protocol, AvahiLookupFlags flags, AvahiKey *key) {
+    AvahiSRBLookup *l;
+
+    assert(b);
+    assert(!b->dead);
+
+    if ((l = lookup_find(b, interface, protocol, flags, key)))
+        return lookup_ref(l);
+
+    if (!(l = lookup_new(b, interface, protocol, flags, key)))
+        return NULL;
+
+    return l;
+}
+
+static int lookup_go(AvahiSRBLookup *l) {
+    int n = 0;
+    assert(l);
+
+    if (l->record_browser->dead)
+        return 0;
+
+    lookup_ref(l);
+
+    /* Browse the cache for the root request */
+    n = lookup_scan_cache(l);
+
+    /* Start the lookup */
+    if (!l->record_browser->dead && l->ref > 1) {
+
+        if ((l->flags & AVAHI_LOOKUP_USE_MULTICAST) || n == 0)
+            /* We do no start a query if the cache contained entries and we're on wide area */
+
+            if (lookup_start(l) < 0)
+                n = -1;
+    }
+
+    lookup_unref(l);
+
+    return n;
+}
+
+static void lookup_handle_cname(AvahiSRBLookup *l, AvahiIfIndex interface, AvahiProtocol protocol, AvahiLookupFlags flags, AvahiRecord *r) {
+    AvahiKey *k;
+    AvahiSRBLookup *n;
+
+    assert(l);
+    assert(r);
+
+    assert(r->key->clazz == AVAHI_DNS_CLASS_IN);
+    assert(r->key->type == AVAHI_DNS_TYPE_CNAME);
+
+    k = avahi_key_new(r->data.ptr.name, l->record_browser->key->clazz, l->record_browser->key->type);
+    n = lookup_add(l->record_browser, interface, protocol, flags, k);
+    avahi_key_unref(k);
+
+    if (!n) {
+        avahi_log_debug(__FILE__": Failed to create SRBLookup.");
+        return;
+    }
+
+    l->cname_lookups = avahi_rlist_prepend(l->cname_lookups, lookup_ref(n));
+
+    lookup_go(n);
+    lookup_unref(n);
+}
+
+static void lookup_drop_cname(AvahiSRBLookup *l, AvahiIfIndex interface, AvahiProtocol protocol, AvahiLookupFlags flags, AvahiRecord *r) {
+    AvahiKey *k;
+    AvahiSRBLookup *n = NULL;
+    AvahiRList *rl;
+
+    assert(r->key->clazz == AVAHI_DNS_CLASS_IN);
+    assert(r->key->type == AVAHI_DNS_TYPE_CNAME);
+
+    k = avahi_key_new(r->data.ptr.name, l->record_browser->key->clazz, l->record_browser->key->type);
+
+    for (rl = l->cname_lookups; rl; rl = rl->rlist_next) {
+        n = rl->data;
+
+        assert(n);
+
+        if ((n->interface == AVAHI_IF_UNSPEC || n->interface == interface) &&
+            (n->interface == AVAHI_PROTO_UNSPEC || n->protocol == protocol) &&
+            n->flags == flags &&
+            avahi_key_equal(n->key, k))
+            break;
+    }
+
+    avahi_key_unref(k);
+
+    if (rl) {
+        l->cname_lookups = avahi_rlist_remove_by_link(l->cname_lookups, rl);
+        lookup_unref(n);
+    }
+}
+
+static void defer_callback(AVAHI_GCC_UNUSED AvahiTimeEvent *e, void *userdata) {
+    AvahiSRecordBrowser *b = userdata;
+    int n;
+
+    assert(b);
+    assert(!b->dead);
+
+    /* Remove the defer timeout */
+    if (b->defer_time_event) {
+        avahi_time_event_free(b->defer_time_event);
+        b->defer_time_event = NULL;
+    }
+
+    /* Create initial query */
+    assert(!b->root_lookup);
+    b->root_lookup = lookup_add(b, b->interface, b->protocol, b->flags, b->key);
+    assert(b->root_lookup);
+
+    n = lookup_go(b->root_lookup);
+
+    if (b->dead)
+        return;
+
+    if (n < 0) {
+        /* sending of the initial query failed */
+
+        avahi_server_set_errno(b->server, AVAHI_ERR_FAILURE);
+
+        b->callback(
+            b, b->interface, b->protocol, AVAHI_BROWSER_FAILURE, NULL,
+            b->flags & AVAHI_LOOKUP_USE_WIDE_AREA ? AVAHI_LOOKUP_RESULT_WIDE_AREA : AVAHI_LOOKUP_RESULT_MULTICAST,
+            b->userdata);
+
+        browser_cancel(b);
+        return;
+    }
+
+    /* Tell the client that we're done with the cache */
+    b->callback(
+        b, b->interface, b->protocol, AVAHI_BROWSER_CACHE_EXHAUSTED, NULL,
+        b->flags & AVAHI_LOOKUP_USE_WIDE_AREA ? AVAHI_LOOKUP_RESULT_WIDE_AREA : AVAHI_LOOKUP_RESULT_MULTICAST,
+        b->userdata);
+
+    if (!b->dead && b->root_lookup && b->root_lookup->flags & AVAHI_LOOKUP_USE_WIDE_AREA && n > 0) {
+
+        /* If we do wide area lookups and the the cache contained
+         * entries, we assume that it is complete, and tell the user
+         * so by firing ALL_FOR_NOW. */
+
+        b->callback(b, b->interface, b->protocol, AVAHI_BROWSER_ALL_FOR_NOW, NULL, AVAHI_LOOKUP_RESULT_WIDE_AREA, b->userdata);
+    }
+}
+
+void avahi_s_record_browser_restart(AvahiSRecordBrowser *b) {
+    assert(b);
+    assert(!b->dead);
+
+    browser_cancel(b);
+
+    /* Request a new iteration of the cache scanning */
+    if (!b->defer_time_event) {
+        b->defer_time_event = avahi_time_event_new(b->server->time_event_queue, NULL, defer_callback, b);
+        assert(b->defer_time_event);
+    }
+}
+
+AvahiSRecordBrowser *avahi_s_record_browser_new(
+    AvahiServer *server,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiKey *key,
+    AvahiLookupFlags flags,
+    AvahiSRecordBrowserCallback callback,
+    void* userdata) {
+
+    AvahiSRecordBrowser *b;
+
+    assert(server);
+    assert(key);
+    assert(callback);
+
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, AVAHI_IF_VALID(interface), AVAHI_ERR_INVALID_INTERFACE);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, AVAHI_PROTO_VALID(protocol), AVAHI_ERR_INVALID_PROTOCOL);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, !avahi_key_is_pattern(key), AVAHI_ERR_IS_PATTERN);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, avahi_key_is_valid(key), AVAHI_ERR_INVALID_KEY);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, AVAHI_FLAGS_VALID(flags, AVAHI_LOOKUP_USE_WIDE_AREA|AVAHI_LOOKUP_USE_MULTICAST), AVAHI_ERR_INVALID_FLAGS);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, !(flags & AVAHI_LOOKUP_USE_WIDE_AREA) || !(flags & AVAHI_LOOKUP_USE_MULTICAST), AVAHI_ERR_INVALID_FLAGS);
+
+    if (!(b = avahi_new(AvahiSRecordBrowser, 1))) {
+        avahi_server_set_errno(server, AVAHI_ERR_NO_MEMORY);
+        return NULL;
+    }
+
+    b->dead = 0;
+    b->server = server;
+    b->interface = interface;
+    b->protocol = protocol;
+    b->key = avahi_key_ref(key);
+    b->flags = flags;
+    b->callback = callback;
+    b->userdata = userdata;
+    b->n_lookups = 0;
+    AVAHI_LLIST_HEAD_INIT(AvahiSRBLookup, b->lookups);
+    b->root_lookup = NULL;
+
+    AVAHI_LLIST_PREPEND(AvahiSRecordBrowser, browser, server->record_browsers, b);
+
+    /* The currently cached entries are scanned a bit later, and than we will start querying, too */
+    b->defer_time_event = avahi_time_event_new(server->time_event_queue, NULL, defer_callback, b);
+    assert(b->defer_time_event);
+
+    return b;
+}
+
+void avahi_s_record_browser_free(AvahiSRecordBrowser *b) {
+    assert(b);
+    assert(!b->dead);
+
+    b->dead = 1;
+    b->server->need_browser_cleanup = 1;
+
+    browser_cancel(b);
+}
+
+void avahi_s_record_browser_destroy(AvahiSRecordBrowser *b) {
+    assert(b);
+
+    browser_cancel(b);
+
+    AVAHI_LLIST_REMOVE(AvahiSRecordBrowser, browser, b->server->record_browsers, b);
+
+    avahi_key_unref(b->key);
+
+    avahi_free(b);
+}
+
+void avahi_browser_cleanup(AvahiServer *server) {
+    AvahiSRecordBrowser *b;
+    AvahiSRecordBrowser *n;
+
+    assert(server);
+
+    while (server->need_browser_cleanup) {
+        server->need_browser_cleanup = 0;
+
+        for (b = server->record_browsers; b; b = n) {
+            n = b->browser_next;
+
+            if (b->dead)
+                avahi_s_record_browser_destroy(b);
+        }
+    }
+
+    if (server->wide_area_lookup_engine)
+        avahi_wide_area_cleanup(server->wide_area_lookup_engine);
+    avahi_multicast_lookup_engine_cleanup(server->multicast_lookup_engine);
+}
+
diff --git a/avahi-0.6.31/avahi-core/browse.h b/avahi-0.6.31/avahi-core/browse.h
new file mode 100644
index 0000000..a0dc207
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/browse.h
@@ -0,0 +1,60 @@
+#ifndef foobrowsehfoo
+#define foobrowsehfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#include <avahi-common/llist.h>
+
+#include "core.h"
+#include "timeeventq.h"
+#include "internal.h"
+#include "dns.h"
+#include "lookup.h"
+
+typedef struct AvahiSRBLookup AvahiSRBLookup;
+
+struct AvahiSRecordBrowser {
+    AVAHI_LLIST_FIELDS(AvahiSRecordBrowser, browser);
+    int dead;
+    AvahiServer *server;
+
+    AvahiKey *key;
+    AvahiIfIndex interface;
+    AvahiProtocol protocol;
+    AvahiLookupFlags flags;
+
+    AvahiTimeEvent *defer_time_event;
+
+    AvahiSRecordBrowserCallback callback;
+    void* userdata;
+
+    /* Lookup data */
+    AVAHI_LLIST_HEAD(AvahiSRBLookup, lookups);
+    unsigned n_lookups;
+
+    AvahiSRBLookup *root_lookup;
+};
+
+void avahi_browser_cleanup(AvahiServer *server);
+
+void avahi_s_record_browser_destroy(AvahiSRecordBrowser *b);
+void avahi_s_record_browser_restart(AvahiSRecordBrowser *b);
+
+#endif
diff --git a/avahi-0.6.31/avahi-core/cache.c b/avahi-0.6.31/avahi-core/cache.c
new file mode 100644
index 0000000..454aac5
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/cache.c
@@ -0,0 +1,513 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+#include <stdlib.h>
+#include <time.h>
+
+#include <avahi-common/timeval.h>
+#include <avahi-common/malloc.h>
+
+#include "cache.h"
+#include "log.h"
+#include "rr-util.h"
+
+static void remove_entry(AvahiCache *c, AvahiCacheEntry *e) {
+    AvahiCacheEntry *t;
+
+    assert(c);
+    assert(e);
+
+/*     avahi_log_debug("removing from cache: %p %p", c, e); */
+
+    /* Remove from hash table */
+    t = avahi_hashmap_lookup(c->hashmap, e->record->key);
+    AVAHI_LLIST_REMOVE(AvahiCacheEntry, by_key, t, e);
+    if (t)
+        avahi_hashmap_replace(c->hashmap, t->record->key, t);
+    else
+        avahi_hashmap_remove(c->hashmap, e->record->key);
+
+    /* Remove from linked list */
+    AVAHI_LLIST_REMOVE(AvahiCacheEntry, entry, c->entries, e);
+
+    if (e->time_event)
+        avahi_time_event_free(e->time_event);
+
+    avahi_multicast_lookup_engine_notify(c->server->multicast_lookup_engine, c->interface, e->record, AVAHI_BROWSER_REMOVE);
+
+    avahi_record_unref(e->record);
+
+    avahi_free(e);
+
+    assert(c->n_entries >= 1);
+    --c->n_entries;
+}
+
+AvahiCache *avahi_cache_new(AvahiServer *server, AvahiInterface *iface) {
+    AvahiCache *c;
+    assert(server);
+
+    if (!(c = avahi_new(AvahiCache, 1))) {
+        avahi_log_error(__FILE__": Out of memory.");
+        return NULL; /* OOM */
+    }
+
+    c->server = server;
+    c->interface = iface;
+
+    if (!(c->hashmap = avahi_hashmap_new((AvahiHashFunc) avahi_key_hash, (AvahiEqualFunc) avahi_key_equal, NULL, NULL))) {
+        avahi_log_error(__FILE__": Out of memory.");
+        avahi_free(c);
+        return NULL; /* OOM */
+    }
+
+    AVAHI_LLIST_HEAD_INIT(AvahiCacheEntry, c->entries);
+    c->n_entries = 0;
+
+    c->last_rand_timestamp = 0;
+
+    return c;
+}
+
+void avahi_cache_free(AvahiCache *c) {
+    assert(c);
+
+    while (c->entries)
+        remove_entry(c, c->entries);
+    assert(c->n_entries == 0);
+
+    avahi_hashmap_free(c->hashmap);
+
+    avahi_free(c);
+}
+
+static AvahiCacheEntry *lookup_key(AvahiCache *c, AvahiKey *k) {
+    assert(c);
+    assert(k);
+
+    assert(!avahi_key_is_pattern(k));
+
+    return avahi_hashmap_lookup(c->hashmap, k);
+}
+
+void* avahi_cache_walk(AvahiCache *c, AvahiKey *pattern, AvahiCacheWalkCallback cb, void* userdata) {
+    void* ret;
+
+    assert(c);
+    assert(pattern);
+    assert(cb);
+
+    if (avahi_key_is_pattern(pattern)) {
+        AvahiCacheEntry *e, *n;
+
+        for (e = c->entries; e; e = n) {
+            n = e->entry_next;
+
+            if (avahi_key_pattern_match(pattern, e->record->key))
+                if ((ret = cb(c, pattern, e, userdata)))
+                    return ret;
+        }
+
+    } else {
+        AvahiCacheEntry *e, *n;
+
+        for (e = lookup_key(c, pattern); e; e = n) {
+            n = e->by_key_next;
+
+            if ((ret = cb(c, pattern, e, userdata)))
+                return ret;
+        }
+    }
+
+    return NULL;
+}
+
+static void* lookup_record_callback(AvahiCache *c, AvahiKey *pattern, AvahiCacheEntry *e, void *userdata) {
+    assert(c);
+    assert(pattern);
+    assert(e);
+
+    if (avahi_record_equal_no_ttl(e->record, userdata))
+        return e;
+
+    return NULL;
+}
+
+static AvahiCacheEntry *lookup_record(AvahiCache *c, AvahiRecord *r) {
+    assert(c);
+    assert(r);
+
+    return avahi_cache_walk(c, r->key, lookup_record_callback, r);
+}
+
+static void next_expiry(AvahiCache *c, AvahiCacheEntry *e, unsigned percent);
+
+static void elapse_func(AvahiTimeEvent *t, void *userdata) {
+    AvahiCacheEntry *e = userdata;
+/*     char *txt; */
+    unsigned percent = 0;
+
+    assert(t);
+    assert(e);
+
+/*     txt = avahi_record_to_string(e->record); */
+
+    switch (e->state) {
+
+        case AVAHI_CACHE_EXPIRY_FINAL:
+        case AVAHI_CACHE_POOF_FINAL:
+        case AVAHI_CACHE_GOODBYE_FINAL:
+        case AVAHI_CACHE_REPLACE_FINAL:
+
+            remove_entry(e->cache, e);
+
+            e = NULL;
+/*         avahi_log_debug("Removing entry from cache due to expiration (%s)", txt); */
+            break;
+
+        case AVAHI_CACHE_VALID:
+        case AVAHI_CACHE_POOF:
+            e->state = AVAHI_CACHE_EXPIRY1;
+            percent = 85;
+            break;
+
+        case AVAHI_CACHE_EXPIRY1:
+            e->state = AVAHI_CACHE_EXPIRY2;
+            percent = 90;
+            break;
+        case AVAHI_CACHE_EXPIRY2:
+            e->state = AVAHI_CACHE_EXPIRY3;
+            percent = 95;
+            break;
+
+        case AVAHI_CACHE_EXPIRY3:
+            e->state = AVAHI_CACHE_EXPIRY_FINAL;
+            percent = 100;
+            break;
+    }
+
+    if (e) {
+
+        assert(percent > 0);
+
+        /* Request a cache update if we are subscribed to this entry */
+        if (avahi_querier_shall_refresh_cache(e->cache->interface, e->record->key))
+            avahi_interface_post_query(e->cache->interface, e->record->key, 0, NULL);
+
+        /* Check again later */
+        next_expiry(e->cache, e, percent);
+
+    }
+
+/*     avahi_free(txt); */
+}
+
+static void update_time_event(AvahiCache *c, AvahiCacheEntry *e) {
+    assert(c);
+    assert(e);
+
+    if (e->time_event)
+        avahi_time_event_update(e->time_event, &e->expiry);
+    else
+        e->time_event = avahi_time_event_new(c->server->time_event_queue, &e->expiry, elapse_func, e);
+}
+
+static void next_expiry(AvahiCache *c, AvahiCacheEntry *e, unsigned percent) {
+    AvahiUsec usec, left, right;
+    time_t now;
+
+    assert(c);
+    assert(e);
+    assert(percent > 0 && percent <= 100);
+
+    usec = (AvahiUsec) e->record->ttl * 10000;
+
+    left = usec * percent;
+    right = usec * (percent+2); /* 2% jitter */
+
+    now = time(NULL);
+
+    if (now >= c->last_rand_timestamp + 10) {
+        c->last_rand = rand();
+        c->last_rand_timestamp = now;
+    }
+
+    usec = left + (AvahiUsec) ((double) (right-left) * c->last_rand / (RAND_MAX+1.0));
+
+    e->expiry = e->timestamp;
+    avahi_timeval_add(&e->expiry, usec);
+
+/*     g_message("wake up in +%lu seconds", e->expiry.tv_sec - e->timestamp.tv_sec); */
+
+    update_time_event(c, e);
+}
+
+static void expire_in_one_second(AvahiCache *c, AvahiCacheEntry *e, AvahiCacheEntryState state) {
+    assert(c);
+    assert(e);
+
+    e->state = state;
+    gettimeofday(&e->expiry, NULL);
+    avahi_timeval_add(&e->expiry, 1000000); /* 1s */
+    update_time_event(c, e);
+}
+
+void avahi_cache_update(AvahiCache *c, AvahiRecord *r, int cache_flush, const AvahiAddress *a) {
+/*     char *txt; */
+
+    assert(c);
+    assert(r && r->ref >= 1);
+
+/*     txt = avahi_record_to_string(r); */
+
+    if (r->ttl == 0) {
+        /* This is a goodbye request */
+
+        AvahiCacheEntry *e;
+
+        if ((e = lookup_record(c, r)))
+            expire_in_one_second(c, e, AVAHI_CACHE_GOODBYE_FINAL);
+
+    } else {
+        AvahiCacheEntry *e = NULL, *first;
+        struct timeval now;
+
+        gettimeofday(&now, NULL);
+
+        /* This is an update request */
+
+        if ((first = lookup_key(c, r->key))) {
+
+            if (cache_flush) {
+
+                /* For unique entries drop all entries older than one second */
+                for (e = first; e; e = e->by_key_next) {
+                    AvahiUsec t;
+
+                    t = avahi_timeval_diff(&now, &e->timestamp);
+
+                    if (t > 1000000)
+                        expire_in_one_second(c, e, AVAHI_CACHE_REPLACE_FINAL);
+                }
+            }
+
+            /* Look for exactly the same entry */
+            for (e = first; e; e = e->by_key_next)
+                if (avahi_record_equal_no_ttl(e->record, r))
+                    break;
+        }
+
+        if (e) {
+
+/*             avahi_log_debug("found matching cache entry");  */
+
+            /* We need to update the hash table key if we replace the
+             * record */
+            if (e->by_key_prev == NULL)
+                avahi_hashmap_replace(c->hashmap, r->key, e);
+
+            /* Update the record */
+            avahi_record_unref(e->record);
+            e->record = avahi_record_ref(r);
+
+/*             avahi_log_debug("cache: updating %s", txt);   */
+
+        } else {
+            /* No entry found, therefore we create a new one */
+
+/*             avahi_log_debug("cache: couldn't find matching cache entry for %s", txt);   */
+
+            if (c->n_entries >= c->server->config.n_cache_entries_max)
+                return;
+
+            if (!(e = avahi_new(AvahiCacheEntry, 1))) {
+                avahi_log_error(__FILE__": Out of memory");
+                return;
+            }
+
+            e->cache = c;
+            e->time_event = NULL;
+            e->record = avahi_record_ref(r);
+
+            /* Append to hash table */
+            AVAHI_LLIST_PREPEND(AvahiCacheEntry, by_key, first, e);
+            avahi_hashmap_replace(c->hashmap, e->record->key, first);
+
+            /* Append to linked list */
+            AVAHI_LLIST_PREPEND(AvahiCacheEntry, entry, c->entries, e);
+
+            c->n_entries++;
+
+            /* Notify subscribers */
+            avahi_multicast_lookup_engine_notify(c->server->multicast_lookup_engine, c->interface, e->record, AVAHI_BROWSER_NEW);
+        }
+
+        e->origin = *a;
+        e->timestamp = now;
+        next_expiry(c, e, 80);
+        e->state = AVAHI_CACHE_VALID;
+        e->cache_flush = cache_flush;
+    }
+
+/*     avahi_free(txt);  */
+}
+
+struct dump_data {
+    AvahiDumpCallback callback;
+    void* userdata;
+};
+
+static void dump_callback(void* key, void* data, void* userdata) {
+    AvahiCacheEntry *e = data;
+    AvahiKey *k = key;
+    struct dump_data *dump_data = userdata;
+
+    assert(k);
+    assert(e);
+    assert(data);
+
+    for (; e; e = e->by_key_next) {
+        char *t;
+
+        if (!(t = avahi_record_to_string(e->record)))
+            continue; /* OOM */
+
+        dump_data->callback(t, dump_data->userdata);
+        avahi_free(t);
+    }
+}
+
+int avahi_cache_dump(AvahiCache *c, AvahiDumpCallback callback, void* userdata) {
+    struct dump_data data;
+
+    assert(c);
+    assert(callback);
+
+    callback(";;; CACHE DUMP FOLLOWS ;;;", userdata);
+
+    data.callback = callback;
+    data.userdata = userdata;
+
+    avahi_hashmap_foreach(c->hashmap, dump_callback, &data);
+
+    return 0;
+}
+
+int avahi_cache_entry_half_ttl(AvahiCache *c, AvahiCacheEntry *e) {
+    struct timeval now;
+    unsigned age;
+
+    assert(c);
+    assert(e);
+
+    gettimeofday(&now, NULL);
+
+    age = (unsigned) (avahi_timeval_diff(&now, &e->timestamp)/1000000);
+
+/*     avahi_log_debug("age: %lli, ttl/2: %u", age, e->record->ttl);  */
+
+    return age >= e->record->ttl/2;
+}
+
+void avahi_cache_flush(AvahiCache *c) {
+    assert(c);
+
+    while (c->entries)
+        remove_entry(c, c->entries);
+}
+
+/*** Passive observation of failure ***/
+
+static void* start_poof_callback(AvahiCache *c, AvahiKey *pattern, AvahiCacheEntry *e, void *userdata) {
+    AvahiAddress *a = userdata;
+    struct timeval now;
+
+    assert(c);
+    assert(pattern);
+    assert(e);
+    assert(a);
+
+    gettimeofday(&now, NULL);
+
+    switch (e->state) {
+        case AVAHI_CACHE_VALID:
+
+            /* The entry was perfectly valid till, now, so let's enter
+             * POOF mode */
+
+            e->state = AVAHI_CACHE_POOF;
+            e->poof_address = *a;
+            e->poof_timestamp = now;
+            e->poof_num = 0;
+
+            break;
+
+        case AVAHI_CACHE_POOF:
+            if (avahi_timeval_diff(&now, &e->poof_timestamp) < 1000000)
+              break;
+
+            e->poof_timestamp = now;
+            e->poof_address = *a;
+            e->poof_num ++;
+
+            /* This is the 4th time we got no response, so let's
+             * fucking remove this entry. */
+            if (e->poof_num > 3)
+              expire_in_one_second(c, e, AVAHI_CACHE_POOF_FINAL);
+            break;
+
+        default:
+            ;
+    }
+
+    return NULL;
+}
+
+void avahi_cache_start_poof(AvahiCache *c, AvahiKey *key, const AvahiAddress *a) {
+    assert(c);
+    assert(key);
+
+    avahi_cache_walk(c, key, start_poof_callback, (void*) a);
+}
+
+void avahi_cache_stop_poof(AvahiCache *c, AvahiRecord *record, const AvahiAddress *a) {
+    AvahiCacheEntry *e;
+
+    assert(c);
+    assert(record);
+    assert(a);
+
+    if (!(e = lookup_record(c, record)))
+        return;
+
+    /* This function is called for each response suppression
+       record. If the matching cache entry is in POOF state and the
+       query address is the same, we put it back into valid mode */
+
+    if (e->state == AVAHI_CACHE_POOF || e->state == AVAHI_CACHE_POOF_FINAL)
+        if (avahi_address_cmp(a, &e->poof_address) == 0) {
+            e->state = AVAHI_CACHE_VALID;
+            next_expiry(c, e, 80);
+        }
+}
diff --git a/avahi-0.6.31/avahi-core/cache.h b/avahi-0.6.31/avahi-core/cache.h
new file mode 100644
index 0000000..49ba9b9
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/cache.h
@@ -0,0 +1,101 @@
+#ifndef foocachehfoo
+#define foocachehfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+typedef struct AvahiCache AvahiCache;
+
+#include <avahi-common/llist.h>
+#include "prioq.h"
+#include "internal.h"
+#include "timeeventq.h"
+#include "hashmap.h"
+
+typedef enum {
+    AVAHI_CACHE_VALID,
+    AVAHI_CACHE_EXPIRY1,
+    AVAHI_CACHE_EXPIRY2,
+    AVAHI_CACHE_EXPIRY3,
+    AVAHI_CACHE_EXPIRY_FINAL,
+    AVAHI_CACHE_POOF,       /* Passive observation of failure */
+    AVAHI_CACHE_POOF_FINAL,
+    AVAHI_CACHE_GOODBYE_FINAL,
+    AVAHI_CACHE_REPLACE_FINAL
+} AvahiCacheEntryState;
+
+typedef struct AvahiCacheEntry AvahiCacheEntry;
+
+struct AvahiCacheEntry {
+    AvahiCache *cache;
+    AvahiRecord *record;
+    struct timeval timestamp;
+    struct timeval poof_timestamp;
+    struct timeval expiry;
+    int cache_flush;
+    int poof_num;
+
+    AvahiAddress origin;
+
+    AvahiCacheEntryState state;
+    AvahiTimeEvent *time_event;
+
+    AvahiAddress poof_address;
+
+    AVAHI_LLIST_FIELDS(AvahiCacheEntry, by_key);
+    AVAHI_LLIST_FIELDS(AvahiCacheEntry, entry);
+};
+
+struct AvahiCache {
+    AvahiServer *server;
+
+    AvahiInterface *interface;
+
+    AvahiHashmap *hashmap;
+
+    AVAHI_LLIST_HEAD(AvahiCacheEntry, entries);
+
+    unsigned n_entries;
+
+    int last_rand;
+    time_t last_rand_timestamp;
+};
+
+AvahiCache *avahi_cache_new(AvahiServer *server, AvahiInterface *interface);
+void avahi_cache_free(AvahiCache *c);
+
+void avahi_cache_update(AvahiCache *c, AvahiRecord *r, int cache_flush, const AvahiAddress *a);
+
+int avahi_cache_dump(AvahiCache *c, AvahiDumpCallback callback, void* userdata);
+
+typedef void* AvahiCacheWalkCallback(AvahiCache *c, AvahiKey *pattern, AvahiCacheEntry *e, void* userdata);
+void* avahi_cache_walk(AvahiCache *c, AvahiKey *pattern, AvahiCacheWalkCallback cb, void* userdata);
+
+int avahi_cache_entry_half_ttl(AvahiCache *c, AvahiCacheEntry *e);
+
+/** Start the "Passive observation of Failure" algorithm for all
+ * records of the specified key. The specified address is  */
+void avahi_cache_start_poof(AvahiCache *c, AvahiKey *key, const AvahiAddress *a);
+
+/* Stop a previously started POOF algorithm for a record. (Used for response suppresions records */
+void avahi_cache_stop_poof(AvahiCache *c, AvahiRecord *record, const AvahiAddress *a);
+
+void avahi_cache_flush(AvahiCache *c);
+
+#endif
diff --git a/avahi-0.6.31/avahi-core/conformance-test.c b/avahi-0.6.31/avahi-core/conformance-test.c
new file mode 100644
index 0000000..632f66b
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/conformance-test.c
@@ -0,0 +1,158 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <assert.h>
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+#include <avahi-common/alternative.h>
+#include <avahi-common/malloc.h>
+#include <avahi-common/simple-watch.h>
+#include <avahi-common/timeval.h>
+
+#include <avahi-core/core.h>
+#include <avahi-core/log.h>
+#include <avahi-core/lookup.h>
+#include <avahi-core/publish.h>
+
+static char *name = NULL;
+static AvahiSEntryGroup *group = NULL;
+static int try = 0;
+static AvahiServer *avahi = NULL;
+static const AvahiPoll *poll_api;
+
+static void dump_line(const char *text, AVAHI_GCC_UNUSED void* userdata) {
+    printf("%s\n", text);
+}
+
+static void dump_timeout_callback(AvahiTimeout *timeout, AVAHI_GCC_UNUSED void* userdata) {
+    struct timeval tv;
+
+    avahi_server_dump(avahi, dump_line, NULL);
+
+    avahi_elapse_time(&tv, 5000, 0);
+    poll_api->timeout_update(timeout, &tv);
+}
+
+static void entry_group_callback(AvahiServer *s, AvahiSEntryGroup *g, AvahiEntryGroupState state, void* userdata);
+
+static void create_service(const char *t) {
+    char *n;
+
+    assert(t || name);
+
+    n = t ? avahi_strdup(t) : avahi_alternative_service_name(name);
+    avahi_free(name);
+    name = n;
+
+    if (group)
+        avahi_s_entry_group_reset(group);
+    else
+        group = avahi_s_entry_group_new(avahi, entry_group_callback, NULL);
+
+    avahi_server_add_service(avahi, group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, name, "_http._tcp", NULL, NULL, 80, "foo", NULL);
+    avahi_s_entry_group_commit(group);
+
+    try++;
+}
+
+static void rename_timeout_callback(AvahiTimeout *timeout, AVAHI_GCC_UNUSED void *userdata) {
+    struct timeval tv;
+
+    if (access("flag", F_OK) == 0) {
+        create_service("New - Bonjour Service Name");
+        return;
+    }
+
+    avahi_elapse_time(&tv, 5000, 0);
+    poll_api->timeout_update(timeout, &tv);
+}
+
+static void entry_group_callback(AVAHI_GCC_UNUSED AvahiServer *s, AVAHI_GCC_UNUSED AvahiSEntryGroup *g, AvahiEntryGroupState state, AVAHI_GCC_UNUSED void* userdata) {
+    if (state == AVAHI_ENTRY_GROUP_COLLISION)
+        create_service(NULL);
+    else if (state == AVAHI_ENTRY_GROUP_ESTABLISHED) {
+        avahi_log_debug("ESTABLISHED !!!!");
+        try = 0;
+    }
+}
+
+static void server_callback(AvahiServer *s, AvahiServerState state, AVAHI_GCC_UNUSED void* userdata) {
+    avahi_log_debug("server state: %i", state);
+
+    if (state == AVAHI_SERVER_RUNNING) {
+        avahi_server_dump(avahi, dump_line, NULL);
+    } else if (state == AVAHI_SERVER_COLLISION) {
+        char *n;
+
+        n = avahi_alternative_host_name(avahi_server_get_host_name(s));
+        avahi_log_warn("Host name conflict, retrying with <%s>", n);
+        avahi_server_set_host_name(s, n);
+        avahi_free(n);
+
+    }
+}
+
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
+    int error;
+    AvahiSimplePoll *simple_poll;
+    struct timeval tv;
+    struct AvahiServerConfig config;
+
+    simple_poll = avahi_simple_poll_new();
+    poll_api = avahi_simple_poll_get(simple_poll);
+
+    avahi_server_config_init(&config);
+    config.publish_workstation = 0;
+    config.use_ipv6 = 0;
+    config.publish_domain = 0;
+    config.publish_hinfo = 0;
+    avahi = avahi_server_new(poll_api, &config, server_callback, NULL, &error);
+    avahi_server_config_free(&config);
+
+    avahi_elapse_time(&tv, 5000, 0);
+    poll_api->timeout_new(poll_api, &tv, dump_timeout_callback, avahi);
+
+    avahi_elapse_time(&tv, 5000, 0);
+    poll_api->timeout_new(poll_api, &tv, rename_timeout_callback, avahi);
+
+    /* Evil, but the conformace test requires that*/
+    create_service("gurke");
+
+
+    avahi_simple_poll_loop(simple_poll);
+
+    if (group)
+        avahi_s_entry_group_free(group);
+    avahi_server_free(avahi);
+
+    avahi_simple_poll_free(simple_poll);
+
+    return 0;
+}
diff --git a/avahi-0.6.31/avahi-core/core.h b/avahi-0.6.31/avahi-core/core.h
new file mode 100644
index 0000000..f50c612
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/core.h
@@ -0,0 +1,165 @@
+#ifndef foocorehfoo
+#define foocorehfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+/** \file core.h The Avahi Multicast DNS and DNS Service Discovery implementation. */
+
+/** An mDNS responder object */
+typedef struct AvahiServer AvahiServer;
+
+#include <avahi-common/cdecl.h>
+#include <avahi-common/address.h>
+#include <avahi-common/defs.h>
+#include <avahi-common/watch.h>
+#include <avahi-common/timeval.h>
+#include <avahi-core/rr.h>
+
+AVAHI_C_DECL_BEGIN
+
+/** Maximum number of defined DNS servers for wide area DNS */
+#define AVAHI_WIDE_AREA_SERVERS_MAX 4
+
+/** Prototype for callback functions which are called whenever the state of an AvahiServer object changes */
+typedef void (*AvahiServerCallback) (AvahiServer *s, AvahiServerState state, void* userdata);
+
+/** Stores configuration options for a server instance */
+typedef struct AvahiServerConfig {
+    char *host_name;                  /**< Default host name. If left empty defaults to the result of gethostname(2) of the libc */
+    char *domain_name;                /**< Default domain name. If left empty defaults to .local */
+    int use_ipv4;                     /**< Enable IPv4 support */
+    int use_ipv6;                     /**< Enable IPv6 support */
+    AvahiStringList *allow_interfaces;/**< Allow specific interface to be used for Avahi */
+    AvahiStringList *deny_interfaces; /**< Deny specific interfaces to be used for Avahi */
+    int publish_hinfo;                /**< Register a HINFO record for the host containing the local OS and CPU type */
+    int publish_addresses;            /**< Register A, AAAA and PTR records for all local IP addresses */
+    int publish_workstation;          /**< Register a _workstation._tcp service */
+    int publish_domain;               /**< Announce the local domain for browsing */
+    int check_response_ttl;           /**< If enabled the server ignores all incoming responses with IP TTL != 255. Newer versions of the RFC do no longer contain this check, so it is disabled by default. */
+    int use_iff_running;              /**< Require IFF_RUNNING on local network interfaces. This is the official way to check for link beat. Unfortunately this doesn't work with all drivers. So bettere leave this off. */
+    int enable_reflector;             /**< Reflect incoming mDNS traffic to all local networks. This allows mDNS based network browsing beyond ethernet borders */
+    int reflect_ipv;                  /**< if enable_reflector is 1, enable/disable reflecting between IPv4 and IPv6 */
+    int add_service_cookie;           /**< Add magic service cookie to all locally generated records implicitly */
+    int enable_wide_area;             /**< Enable wide area support */
+    AvahiAddress wide_area_servers[AVAHI_WIDE_AREA_SERVERS_MAX]; /** Unicast DNS server to use for wide area lookup */
+    unsigned n_wide_area_servers;     /**< Number of servers in wide_area_servers[] */
+    int disallow_other_stacks;        /**< Make sure that only one mDNS responder is run at the same time on the local machine. If this is enable Avahi will not set SO_REUSADDR on its sockets, effectively preventing other stacks from running on the local machine */
+    AvahiStringList *browse_domains;  /**< Additional browsing domains */
+    int disable_publishing;           /**< Disable publishing of any record */
+    int allow_point_to_point;         /**< Enable publishing on POINTOPOINT interfaces */
+    int publish_a_on_ipv6;            /**< Publish an IPv4 A RR on IPv6 sockets */
+    int publish_aaaa_on_ipv4;         /**< Publish an IPv4 A RR on IPv6 sockets */
+    unsigned n_cache_entries_max;     /**< Maximum number of cache entries per interface */
+    AvahiUsec ratelimit_interval;     /**< If non-zero, rate-limiting interval parameter. */
+    unsigned ratelimit_burst;         /**< If ratelimit_interval is non-zero, rate-limiting burst parameter. */
+} AvahiServerConfig;
+
+/** Allocate a new mDNS responder object. */
+AvahiServer *avahi_server_new(
+    const AvahiPoll *api,          /**< The main loop adapter */
+    const AvahiServerConfig *sc,   /**< If non-NULL a pointer to a configuration structure for the server. The server makes an internal deep copy of this structure, so you may free it using avahi_server_config_done() immediately after calling this function. */
+    AvahiServerCallback callback,  /**< A callback which is called whenever the state of the server changes */
+    void* userdata,                /**< An opaque pointer which is passed to the callback function */
+    int *error);
+
+/** Free an mDNS responder object */
+void avahi_server_free(AvahiServer* s);
+
+/** Fill in default values for a server configuration structure. If you
+ * make use of an AvahiServerConfig structure be sure to initialize
+ * it with this function for the sake of upwards library
+ * compatibility. This call may allocate strings on the heap. To
+ * release this memory make sure to call
+ * avahi_server_config_done(). If you want to replace any strings in
+ * the structure be sure to free the strings filled in by this
+ * function with avahi_free() first and allocate the replacements with
+ * g_malloc() (or g_strdup()).*/
+AvahiServerConfig* avahi_server_config_init(
+   AvahiServerConfig *c /**< A structure which shall be filled in */ );
+
+/** Make a deep copy of the configuration structure *c to *ret. */
+AvahiServerConfig* avahi_server_config_copy(
+    AvahiServerConfig *ret /**< destination */,
+    const AvahiServerConfig *c /**< source */);
+
+/** Free the data in a server configuration structure. */
+void avahi_server_config_free(AvahiServerConfig *c);
+
+/** Return the currently chosen domain name of the server object. The
+ * return value points to an internally allocated string. Be sure to
+ * make a copy of the string before calling any other library
+ * functions. */
+const char* avahi_server_get_domain_name(AvahiServer *s);
+
+/** Return the currently chosen host name. The return value points to a internally allocated string. */
+const char* avahi_server_get_host_name(AvahiServer *s);
+
+/** Return the currently chosen host name as a FQDN ("fully qualified
+ * domain name", i.e. the concatenation of the host and domain
+ * name). The return value points to a internally allocated string. */
+const char* avahi_server_get_host_name_fqdn(AvahiServer *s);
+
+/** Change the host name of a running mDNS responder. This will drop
+all automicatilly generated RRs and readd them with the new
+name. Since the responder has to probe for the new RRs this function
+takes some time to take effect altough it returns immediately. This
+function is intended to be called when a host name conflict is
+reported using AvahiServerCallback. The caller should readd all user
+defined RRs too since they otherwise continue to point to the outdated
+host name..*/
+int avahi_server_set_host_name(AvahiServer *s, const char *host_name);
+
+/** Change the domain name of a running mDNS responder. The same rules
+ * as with avahi_server_set_host_name() apply. */
+int avahi_server_set_domain_name(AvahiServer *s, const char *domain_name);
+
+/** Return the opaque user data pointer attached to a server object */
+void* avahi_server_get_data(AvahiServer *s);
+
+/** Change the opaque user data pointer attached to a server object */
+void avahi_server_set_data(AvahiServer *s, void* userdata);
+
+/** Return the current state of the server object */
+AvahiServerState avahi_server_get_state(AvahiServer *s);
+
+/** Callback prototype for avahi_server_dump() */
+typedef void (*AvahiDumpCallback)(const char *text, void* userdata);
+
+/** Dump the current server status by calling "callback" for each line.  */
+int avahi_server_dump(AvahiServer *s, AvahiDumpCallback callback, void* userdata);
+
+/** Return the last error code */
+int avahi_server_errno(AvahiServer *s);
+
+/** Return the local service cookie */
+uint32_t avahi_server_get_local_service_cookie(AvahiServer *s);
+
+/** Set the wide area DNS servers */
+int avahi_server_set_wide_area_servers(AvahiServer *s, const AvahiAddress *a, unsigned n);
+
+/** Set the browsing domains */
+int avahi_server_set_browse_domains(AvahiServer *s, AvahiStringList *domains);
+
+/** Return the current configuration of the server \since 0.6.17 */
+const AvahiServerConfig* avahi_server_get_config(AvahiServer *s);
+
+AVAHI_C_DECL_END
+
+#endif
diff --git a/avahi-0.6.31/avahi-core/dns-spin-test.c b/avahi-0.6.31/avahi-core/dns-spin-test.c
new file mode 100644
index 0000000..f50e691
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/dns-spin-test.c
@@ -0,0 +1,122 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+/* Regression test for Avahi bug #84.
+ * This program tests whether the avahi_dns_packet_consume_name function
+ * returns (rather than spinning forever). For a function as simple as
+ * avahi_dns_packet_consume_name, we assume that 1 second of CPU time ≈ forever
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <string.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <sys/time.h>
+
+#include "dns.h"
+
+#define MAX_CPU_SECONDS 1
+
+#define TEST_NAME "dns-spin-test"
+
+static void fail(const char *fmt, ...) __attribute__((format(printf, 1, 2), noreturn));
+static void unresolved(const char *fmt, ...) __attribute__((format(printf, 1, 2), noreturn));
+static void stdlib_fail(const char *msg) __attribute__((noreturn));
+static void handle(int sig) __attribute__((noreturn));
+
+void stdlib_fail(const char *msg) {
+    perror(msg);
+
+    printf("UNRESOLVED: " TEST_NAME " (stdlib failure)\n");
+
+    exit(77);
+}
+
+void unresolved(const char *fmt, ...) {
+    va_list ap;
+
+    printf("UNRESOLVED: " TEST_NAME ": ");
+    va_start(ap, fmt);
+    vprintf(fmt, ap);
+    va_end(ap);
+    printf("\n");
+
+    exit(77);
+}
+
+void fail(const char *fmt, ...) {
+    va_list ap;
+
+    va_start(ap, fmt);
+    vprintf(fmt, ap);
+    va_end(ap);
+    printf("\n");
+
+    exit(EXIT_FAILURE);
+}
+
+void handle(AVAHI_GCC_UNUSED int sig) {
+    fail("Interrupted after %d second of CPU time", MAX_CPU_SECONDS);
+}
+
+#define TRY_EXCEPT(cmd, badresult) \
+    do { \
+        if ((cmd) == (badresult)) \
+            unresolved("%s returned %s", #cmd, #badresult); \
+    } while (0)
+
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
+    struct itimerval itval;
+    AvahiDnsPacket *packet;
+    char name[512];
+    int ret;
+    uint8_t badrr[] = {
+        0xC0, AVAHI_DNS_PACKET_HEADER_SIZE, /* self-referential QNAME pointer */
+        0, 1, /* QTYPE A (host addr) */
+        0, 1, /* QCLASS IN (internet/ipv4) */
+    };
+
+    if (signal(SIGVTALRM, handle) == SIG_ERR)
+        stdlib_fail("signal(SIGVTALRM)");
+
+    memset(&itval, 0, sizeof(itval));
+    itval.it_value.tv_sec = MAX_CPU_SECONDS;
+
+    if (setitimer(ITIMER_VIRTUAL, &itval, NULL) == -1)
+        stdlib_fail("setitimer()");
+
+    TRY_EXCEPT(packet = avahi_dns_packet_new_query(512), NULL);
+    TRY_EXCEPT(avahi_dns_packet_append_bytes(packet, badrr, sizeof(badrr)), NULL);
+
+    /* This is expected to fail (if it returns) */
+    ret = avahi_dns_packet_consume_name(packet, name, sizeof(name));
+
+    if (ret != -1)
+        fail("avahi_dns_packet_consume_name() returned %d; -1 was expected", ret);
+
+    return EXIT_SUCCESS;
+}
+
+/* vim:ts=4:sw=4:et
+ */
diff --git a/avahi-0.6.31/avahi-core/dns-srv-rr.h b/avahi-0.6.31/avahi-core/dns-srv-rr.h
new file mode 100644
index 0000000..fdd9010
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/dns-srv-rr.h
@@ -0,0 +1,87 @@
+#ifndef foodnssrvhfoo
+#define foodnssrvhfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+/** \file avahi-core/dns-srv-rr.h Functions for announcing and browsing for unicast DNS servers via mDNS */
+
+/** A domain service browser object. Use this to browse for
+ * conventional unicast DNS servers which may be used to resolve
+ * conventional domain names */
+typedef struct AvahiSDNSServerBrowser AvahiSDNSServerBrowser;
+
+#include <avahi-common/cdecl.h>
+#include <avahi-common/defs.h>
+#include <avahi-core/core.h>
+#include <avahi-core/publish.h>
+
+AVAHI_C_DECL_BEGIN
+
+/** The type of DNS server */
+typedef enum {
+    AVAHI_DNS_SERVER_RESOLVE,         /**< Unicast DNS servers for normal resolves (_domain._udp)*/
+    AVAHI_DNS_SERVER_UPDATE,           /**< Unicast DNS servers for updates (_dns-update._udp)*/
+    AVAHI_DNS_SERVER_MAX
+} AvahiDNSServerType;
+
+/** Publish the specified unicast DNS server address via mDNS. You may
+ * browse for records create this way wit
+ * avahi_s_dns_server_browser_new(). */
+int avahi_server_add_dns_server_address(
+    AvahiServer *s,
+    AvahiSEntryGroup *g,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiPublishFlags flags,
+    const char *domain,
+    AvahiDNSServerType type,
+    const AvahiAddress *address,
+    uint16_t port /** should be 53 */);
+
+/** Callback prototype for AvahiSDNSServerBrowser events */
+typedef void (*AvahiSDNSServerBrowserCallback)(
+    AvahiSDNSServerBrowser *b,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiBrowserEvent event,
+    const char *host_name,       /**< Host name of the DNS server, probably useless */
+    const AvahiAddress *a,        /**< Address of the DNS server */
+    uint16_t port,                 /**< Port number of the DNS servers, probably 53 */
+    AvahiLookupResultFlags flags,  /**< Lookup flags */
+    void* userdata);
+
+/** Create a new AvahiSDNSServerBrowser object */
+AvahiSDNSServerBrowser *avahi_s_dns_server_browser_new(
+    AvahiServer *server,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    const char *domain,
+    AvahiDNSServerType type,
+    AvahiProtocol aprotocol,  /**< Address protocol for the DNS server */
+    AvahiLookupFlags flags,                 /**< Lookup flags. */
+    AvahiSDNSServerBrowserCallback callback,
+    void* userdata);
+
+/** Free an AvahiSDNSServerBrowser object */
+void avahi_s_dns_server_browser_free(AvahiSDNSServerBrowser *b);
+
+AVAHI_C_DECL_END
+
+#endif
diff --git a/avahi-0.6.31/avahi-core/dns-test.c b/avahi-0.6.31/avahi-core/dns-test.c
new file mode 100644
index 0000000..ebe2305
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/dns-test.c
@@ -0,0 +1,113 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <assert.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+#include <avahi-common/domain.h>
+#include <avahi-common/defs.h>
+#include <avahi-common/malloc.h>
+
+#include "dns.h"
+#include "log.h"
+#include "util.h"
+
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
+    char t[AVAHI_DOMAIN_NAME_MAX], *m;
+    const char *a, *b, *c, *d;
+    AvahiDnsPacket *p;
+    AvahiRecord *r, *r2;
+    uint8_t rdata[AVAHI_DNS_RDATA_MAX];
+    size_t l;
+
+    p = avahi_dns_packet_new(0);
+
+    assert(avahi_dns_packet_append_name(p, a = "Ahello.hello.hello.de."));
+    assert(avahi_dns_packet_append_name(p, b = "Bthis is a test.hello.de."));
+    assert(avahi_dns_packet_append_name(p, c = "Cthis\\.is\\.a\\.test\\.with\\.dots.hello.de."));
+    assert(avahi_dns_packet_append_name(p, d = "Dthis\\\\is another test.hello.de."));
+
+    avahi_hexdump(AVAHI_DNS_PACKET_DATA(p), p->size);
+
+    assert(avahi_dns_packet_consume_name(p, t, sizeof(t)) == 0);
+    avahi_log_debug(">%s<", t);
+    assert(avahi_domain_equal(a, t));
+
+    assert(avahi_dns_packet_consume_name(p, t, sizeof(t)) == 0);
+    avahi_log_debug(">%s<", t);
+    assert(avahi_domain_equal(b, t));
+
+    assert(avahi_dns_packet_consume_name(p, t, sizeof(t)) == 0);
+    avahi_log_debug(">%s<", t);
+    assert(avahi_domain_equal(c, t));
+
+    assert(avahi_dns_packet_consume_name(p, t, sizeof(t)) == 0);
+    avahi_log_debug(">%s<", t);
+    assert(avahi_domain_equal(d, t));
+
+    avahi_dns_packet_free(p);
+
+    /* RDATA PARSING AND SERIALIZATION */
+
+    /* Create an AvahiRecord with some usful data */
+    r = avahi_record_new_full("foobar.local", AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_HINFO, AVAHI_DEFAULT_TTL);
+    assert(r);
+    r->data.hinfo.cpu = avahi_strdup("FOO");
+    r->data.hinfo.os = avahi_strdup("BAR");
+
+    /* Serialize it into a blob */
+    assert((l = avahi_rdata_serialize(r, rdata, sizeof(rdata))) != (size_t) -1);
+
+    /* Print it */
+    avahi_hexdump(rdata, l);
+
+    /* Create a new record and fill in the data from the blob */
+    r2 = avahi_record_new(r->key, AVAHI_DEFAULT_TTL);
+    assert(r2);
+    assert(avahi_rdata_parse(r2, rdata, l) >= 0);
+
+    /* Compare both versions */
+    assert(avahi_record_equal_no_ttl(r, r2));
+
+    /* Free the records */
+    avahi_record_unref(r);
+    avahi_record_unref(r2);
+
+    r = avahi_record_new_full("foobar", 77, 77, AVAHI_DEFAULT_TTL);
+    assert(r);
+
+    assert(r->data.generic.data = avahi_memdup("HALLO", r->data.generic.size = 5));
+
+    m = avahi_record_to_string(r);
+    assert(m);
+
+    avahi_log_debug(">%s<", m);
+
+    avahi_free(m);
+    avahi_record_unref(r);
+
+    return 0;
+}
diff --git a/avahi-0.6.31/avahi-core/dns.c b/avahi-0.6.31/avahi-core/dns.c
new file mode 100644
index 0000000..2fcd91f
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/dns.c
@@ -0,0 +1,877 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <assert.h>
+
+#include <sys/types.h>
+#include <netinet/in.h>
+
+#include <avahi-common/defs.h>
+#include <avahi-common/domain.h>
+#include <avahi-common/malloc.h>
+
+#include "dns.h"
+#include "log.h"
+
+AvahiDnsPacket* avahi_dns_packet_new(unsigned mtu) {
+    AvahiDnsPacket *p;
+    size_t max_size;
+
+    if (mtu <= 0)
+        max_size = AVAHI_DNS_PACKET_SIZE_MAX;
+    else if (mtu >= AVAHI_DNS_PACKET_EXTRA_SIZE)
+        max_size = mtu - AVAHI_DNS_PACKET_EXTRA_SIZE;
+    else
+        max_size = 0;
+
+    if (max_size < AVAHI_DNS_PACKET_HEADER_SIZE)
+        max_size = AVAHI_DNS_PACKET_HEADER_SIZE;
+
+    if (!(p = avahi_malloc(sizeof(AvahiDnsPacket) + max_size)))
+        return p;
+
+    p->size = p->rindex = AVAHI_DNS_PACKET_HEADER_SIZE;
+    p->max_size = max_size;
+    p->name_table = NULL;
+    p->data = NULL;
+
+    memset(AVAHI_DNS_PACKET_DATA(p), 0, p->size);
+    return p;
+}
+
+AvahiDnsPacket* avahi_dns_packet_new_query(unsigned mtu) {
+    AvahiDnsPacket *p;
+
+    if (!(p = avahi_dns_packet_new(mtu)))
+        return NULL;
+
+    avahi_dns_packet_set_field(p, AVAHI_DNS_FIELD_FLAGS, AVAHI_DNS_FLAGS(0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
+    return p;
+}
+
+AvahiDnsPacket* avahi_dns_packet_new_response(unsigned mtu, int aa) {
+    AvahiDnsPacket *p;
+
+    if (!(p = avahi_dns_packet_new(mtu)))
+        return NULL;
+
+    avahi_dns_packet_set_field(p, AVAHI_DNS_FIELD_FLAGS, AVAHI_DNS_FLAGS(1, 0, aa, 0, 0, 0, 0, 0, 0, 0));
+    return p;
+}
+
+AvahiDnsPacket* avahi_dns_packet_new_reply(AvahiDnsPacket* p, unsigned mtu, int copy_queries, int aa) {
+    AvahiDnsPacket *r;
+    assert(p);
+
+    if (!(r = avahi_dns_packet_new_response(mtu, aa)))
+        return NULL;
+
+    if (copy_queries) {
+        unsigned saved_rindex;
+        uint32_t n;
+
+        saved_rindex = p->rindex;
+        p->rindex = AVAHI_DNS_PACKET_HEADER_SIZE;
+
+        for (n = avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_QDCOUNT); n > 0; n--) {
+            AvahiKey *k;
+            int unicast_response;
+
+            if ((k = avahi_dns_packet_consume_key(p, &unicast_response))) {
+                avahi_dns_packet_append_key(r, k, unicast_response);
+                avahi_key_unref(k);
+            }
+        }
+
+        p->rindex = saved_rindex;
+
+        avahi_dns_packet_set_field(r, AVAHI_DNS_FIELD_QDCOUNT, avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_QDCOUNT));
+    }
+
+    avahi_dns_packet_set_field(r, AVAHI_DNS_FIELD_ID, avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_ID));
+
+    avahi_dns_packet_set_field(r, AVAHI_DNS_FIELD_FLAGS,
+                               (avahi_dns_packet_get_field(r, AVAHI_DNS_FIELD_FLAGS) & ~AVAHI_DNS_FLAG_OPCODE) |
+                               (avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_FLAGS) & AVAHI_DNS_FLAG_OPCODE));
+
+    return r;
+}
+
+
+void avahi_dns_packet_free(AvahiDnsPacket *p) {
+    assert(p);
+
+    if (p->name_table)
+        avahi_hashmap_free(p->name_table);
+
+    avahi_free(p);
+}
+
+void avahi_dns_packet_set_field(AvahiDnsPacket *p, unsigned idx, uint16_t v) {
+    assert(p);
+    assert(idx < AVAHI_DNS_PACKET_HEADER_SIZE);
+
+    ((uint16_t*) AVAHI_DNS_PACKET_DATA(p))[idx] = htons(v);
+}
+
+uint16_t avahi_dns_packet_get_field(AvahiDnsPacket *p, unsigned idx) {
+    assert(p);
+    assert(idx < AVAHI_DNS_PACKET_HEADER_SIZE);
+
+    return ntohs(((uint16_t*) AVAHI_DNS_PACKET_DATA(p))[idx]);
+}
+
+void avahi_dns_packet_inc_field(AvahiDnsPacket *p, unsigned idx) {
+    assert(p);
+    assert(idx < AVAHI_DNS_PACKET_HEADER_SIZE);
+
+    avahi_dns_packet_set_field(p, idx, avahi_dns_packet_get_field(p, idx) + 1);
+}
+
+
+static void name_table_cleanup(void *key, void *value, void *user_data) {
+    AvahiDnsPacket *p = user_data;
+
+    if ((uint8_t*) value >= AVAHI_DNS_PACKET_DATA(p) + p->size)
+        avahi_hashmap_remove(p->name_table, key);
+}
+
+void avahi_dns_packet_cleanup_name_table(AvahiDnsPacket *p) {
+    if (p->name_table)
+        avahi_hashmap_foreach(p->name_table, name_table_cleanup, p);
+}
+
+uint8_t* avahi_dns_packet_append_name(AvahiDnsPacket *p, const char *name) {
+    uint8_t *d, *saved_ptr = NULL;
+    size_t saved_size;
+
+    assert(p);
+    assert(name);
+
+    saved_size = p->size;
+    saved_ptr = avahi_dns_packet_extend(p, 0);
+
+    while (*name) {
+        uint8_t* prev;
+        const char *pname;
+        char label[64], *u;
+
+        /* Check whether we can compress this name. */
+
+        if (p->name_table && (prev = avahi_hashmap_lookup(p->name_table, name))) {
+            unsigned idx;
+
+            assert(prev >= AVAHI_DNS_PACKET_DATA(p));
+            idx = (unsigned) (prev - AVAHI_DNS_PACKET_DATA(p));
+
+            assert(idx < p->size);
+
+            if (idx < 0x4000) {
+                uint8_t *t;
+                if (!(t = (uint8_t*) avahi_dns_packet_extend(p, sizeof(uint16_t))))
+                    return NULL;
+
+		t[0] = (uint8_t) ((0xC000 | idx) >> 8);
+		t[1] = (uint8_t) idx;
+                return saved_ptr;
+            }
+        }
+
+        pname = name;
+
+        if (!(avahi_unescape_label(&name, label, sizeof(label))))
+            goto fail;
+
+        if (!(d = avahi_dns_packet_append_string(p, label)))
+            goto fail;
+
+        if (!p->name_table)
+            /* This works only for normalized domain names */
+            p->name_table = avahi_hashmap_new(avahi_string_hash, avahi_string_equal, avahi_free, NULL);
+
+        if (!(u = avahi_strdup(pname)))
+            avahi_log_error("avahi_strdup() failed.");
+        else
+            avahi_hashmap_insert(p->name_table, u, d);
+    }
+
+    if (!(d = avahi_dns_packet_extend(p, 1)))
+        goto fail;
+
+    *d = 0;
+
+    return saved_ptr;
+
+fail:
+    p->size = saved_size;
+    avahi_dns_packet_cleanup_name_table(p);
+
+    return NULL;
+}
+
+uint8_t* avahi_dns_packet_append_uint16(AvahiDnsPacket *p, uint16_t v) {
+    uint8_t *d;
+    assert(p);
+
+    if (!(d = avahi_dns_packet_extend(p, sizeof(uint16_t))))
+        return NULL;
+
+    d[0] = (uint8_t) (v >> 8);
+    d[1] = (uint8_t) v;
+    return d;
+}
+
+uint8_t *avahi_dns_packet_append_uint32(AvahiDnsPacket *p, uint32_t v) {
+    uint8_t *d;
+    assert(p);
+
+    if (!(d = avahi_dns_packet_extend(p, sizeof(uint32_t))))
+        return NULL;
+
+    d[0] = (uint8_t) (v >> 24);
+    d[1] = (uint8_t) (v >> 16);
+    d[2] = (uint8_t) (v >> 8);
+    d[3] = (uint8_t) v;
+
+    return d;
+}
+
+uint8_t *avahi_dns_packet_append_bytes(AvahiDnsPacket  *p, const void *b, size_t l) {
+    uint8_t* d;
+
+    assert(p);
+    assert(b);
+    assert(l);
+
+    if (!(d = avahi_dns_packet_extend(p, l)))
+        return NULL;
+
+    memcpy(d, b, l);
+    return d;
+}
+
+uint8_t* avahi_dns_packet_append_string(AvahiDnsPacket *p, const char *s) {
+    uint8_t* d;
+    size_t k;
+
+    assert(p);
+    assert(s);
+
+    if ((k = strlen(s)) >= 255)
+        k = 255;
+
+    if (!(d = avahi_dns_packet_extend(p, k+1)))
+        return NULL;
+
+    *d = (uint8_t) k;
+    memcpy(d+1, s, k);
+
+    return d;
+}
+
+uint8_t *avahi_dns_packet_extend(AvahiDnsPacket *p, size_t l) {
+    uint8_t *d;
+
+    assert(p);
+
+    if (p->size+l > p->max_size)
+        return NULL;
+
+    d = AVAHI_DNS_PACKET_DATA(p) + p->size;
+    p->size += l;
+
+    return d;
+}
+
+int avahi_dns_packet_check_valid(AvahiDnsPacket *p) {
+    uint16_t flags;
+    assert(p);
+
+    if (p->size < AVAHI_DNS_PACKET_HEADER_SIZE)
+        return -1;
+
+    flags = avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_FLAGS);
+
+    if (flags & AVAHI_DNS_FLAG_OPCODE)
+        return -1;
+
+    return 0;
+}
+
+int avahi_dns_packet_check_valid_multicast(AvahiDnsPacket *p) {
+    uint16_t flags;
+    assert(p);
+
+    if (avahi_dns_packet_check_valid(p) < 0)
+        return -1;
+
+    flags = avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_FLAGS);
+
+    if (flags & AVAHI_DNS_FLAG_RCODE)
+        return -1;
+
+    return 0;
+}
+
+int avahi_dns_packet_is_query(AvahiDnsPacket *p) {
+    assert(p);
+
+    return !(avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_FLAGS) & AVAHI_DNS_FLAG_QR);
+}
+
+static int consume_labels(AvahiDnsPacket *p, unsigned idx, char *ret_name, size_t l) {
+    int ret = 0;
+    int compressed = 0;
+    int first_label = 1;
+    unsigned label_ptr;
+    int i;
+    assert(p && ret_name && l);
+
+    for (i = 0; i < AVAHI_DNS_LABELS_MAX; i++) {
+        uint8_t n;
+
+        if (idx+1 > p->size)
+            return -1;
+
+        n = AVAHI_DNS_PACKET_DATA(p)[idx];
+
+        if (!n) {
+            idx++;
+            if (!compressed)
+                ret++;
+
+            if (l < 1)
+                return -1;
+            *ret_name = 0;
+
+            return ret;
+
+        } else if (n <= 63) {
+            /* Uncompressed label */
+            idx++;
+            if (!compressed)
+                ret++;
+
+            if (idx + n > p->size)
+                return -1;
+
+            if ((size_t) n + 1 > l)
+                return -1;
+
+            if (!first_label) {
+                *(ret_name++) = '.';
+                l--;
+            } else
+                first_label = 0;
+
+            if (!(avahi_escape_label((char*) AVAHI_DNS_PACKET_DATA(p) + idx, n, &ret_name, &l)))
+                return -1;
+
+            idx += n;
+
+            if (!compressed)
+                ret += n;
+        } else if ((n & 0xC0) == 0xC0) {
+            /* Compressed label */
+
+            if (idx+2 > p->size)
+                return -1;
+
+            label_ptr = ((unsigned) (AVAHI_DNS_PACKET_DATA(p)[idx] & ~0xC0)) << 8 | AVAHI_DNS_PACKET_DATA(p)[idx+1];
+
+            if ((label_ptr < AVAHI_DNS_PACKET_HEADER_SIZE) || (label_ptr >= idx))
+                return -1;
+
+            idx = label_ptr;
+
+            if (!compressed)
+                ret += 2;
+
+            compressed = 1;
+        } else
+            return -1;
+    }
+
+    return -1;
+}
+
+int avahi_dns_packet_consume_name(AvahiDnsPacket *p, char *ret_name, size_t l) {
+    int r;
+
+    if ((r = consume_labels(p, p->rindex, ret_name, l)) < 0)
+        return -1;
+
+    p->rindex += r;
+    return 0;
+}
+
+int avahi_dns_packet_consume_uint16(AvahiDnsPacket *p, uint16_t *ret_v) {
+    uint8_t *d;
+
+    assert(p);
+    assert(ret_v);
+
+    if (p->rindex + sizeof(uint16_t) > p->size)
+        return -1;
+
+    d = (uint8_t*) (AVAHI_DNS_PACKET_DATA(p) + p->rindex);
+    *ret_v = (d[0] << 8) | d[1];
+    p->rindex += sizeof(uint16_t);
+
+    return 0;
+}
+
+int avahi_dns_packet_consume_uint32(AvahiDnsPacket *p, uint32_t *ret_v) {
+    uint8_t* d;
+
+    assert(p);
+    assert(ret_v);
+
+    if (p->rindex + sizeof(uint32_t) > p->size)
+        return -1;
+
+    d = (uint8_t*) (AVAHI_DNS_PACKET_DATA(p) + p->rindex);
+    *ret_v = (d[0] << 24) | (d[1] << 16) | (d[2] << 8) | d[3];
+    p->rindex += sizeof(uint32_t);
+
+    return 0;
+}
+
+int avahi_dns_packet_consume_bytes(AvahiDnsPacket *p, void * ret_data, size_t l) {
+    assert(p);
+    assert(ret_data);
+    assert(l > 0);
+
+    if (p->rindex + l > p->size)
+        return -1;
+
+    memcpy(ret_data, AVAHI_DNS_PACKET_DATA(p) + p->rindex, l);
+    p->rindex += l;
+
+    return 0;
+}
+
+int avahi_dns_packet_consume_string(AvahiDnsPacket *p, char *ret_string, size_t l) {
+    size_t k;
+
+    assert(p);
+    assert(ret_string);
+    assert(l > 0);
+
+    if (p->rindex >= p->size)
+        return -1;
+
+    k = AVAHI_DNS_PACKET_DATA(p)[p->rindex];
+
+    if (p->rindex+1+k > p->size)
+        return -1;
+
+    if (l > k+1)
+        l = k+1;
+
+    memcpy(ret_string, AVAHI_DNS_PACKET_DATA(p)+p->rindex+1, l-1);
+    ret_string[l-1] = 0;
+
+    p->rindex += 1+k;
+
+    return 0;
+}
+
+const void* avahi_dns_packet_get_rptr(AvahiDnsPacket *p) {
+    assert(p);
+
+    if (p->rindex > p->size)
+        return NULL;
+
+    return AVAHI_DNS_PACKET_DATA(p) + p->rindex;
+}
+
+int avahi_dns_packet_skip(AvahiDnsPacket *p, size_t length) {
+    assert(p);
+
+    if (p->rindex + length > p->size)
+        return -1;
+
+    p->rindex += length;
+    return 0;
+}
+
+static int parse_rdata(AvahiDnsPacket *p, AvahiRecord *r, uint16_t rdlength) {
+    char buf[AVAHI_DOMAIN_NAME_MAX];
+    const void* start;
+
+    assert(p);
+    assert(r);
+
+    start = avahi_dns_packet_get_rptr(p);
+
+    switch (r->key->type) {
+        case AVAHI_DNS_TYPE_PTR:
+        case AVAHI_DNS_TYPE_CNAME:
+        case AVAHI_DNS_TYPE_NS:
+
+            if (avahi_dns_packet_consume_name(p, buf, sizeof(buf)) < 0)
+                return -1;
+
+            r->data.ptr.name = avahi_strdup(buf);
+            break;
+
+
+        case AVAHI_DNS_TYPE_SRV:
+
+            if (avahi_dns_packet_consume_uint16(p, &r->data.srv.priority) < 0 ||
+                avahi_dns_packet_consume_uint16(p, &r->data.srv.weight) < 0 ||
+                avahi_dns_packet_consume_uint16(p, &r->data.srv.port) < 0 ||
+                avahi_dns_packet_consume_name(p, buf, sizeof(buf)) < 0)
+                return -1;
+
+            r->data.srv.name = avahi_strdup(buf);
+            break;
+
+        case AVAHI_DNS_TYPE_HINFO:
+
+            if (avahi_dns_packet_consume_string(p, buf, sizeof(buf)) < 0)
+                return -1;
+
+            r->data.hinfo.cpu = avahi_strdup(buf);
+
+            if (avahi_dns_packet_consume_string(p, buf, sizeof(buf)) < 0)
+                return -1;
+
+            r->data.hinfo.os = avahi_strdup(buf);
+            break;
+
+        case AVAHI_DNS_TYPE_TXT:
+
+            if (rdlength > 0) {
+                if (avahi_string_list_parse(avahi_dns_packet_get_rptr(p), rdlength, &r->data.txt.string_list) < 0)
+                    return -1;
+
+                if (avahi_dns_packet_skip(p, rdlength) < 0)
+                    return -1;
+            } else
+                r->data.txt.string_list = NULL;
+
+            break;
+
+        case AVAHI_DNS_TYPE_A:
+
+/*             avahi_log_debug("A"); */
+
+            if (avahi_dns_packet_consume_bytes(p, &r->data.a.address, sizeof(AvahiIPv4Address)) < 0)
+                return -1;
+
+            break;
+
+        case AVAHI_DNS_TYPE_AAAA:
+
+/*             avahi_log_debug("aaaa"); */
+
+            if (avahi_dns_packet_consume_bytes(p, &r->data.aaaa.address, sizeof(AvahiIPv6Address)) < 0)
+                return -1;
+
+            break;
+
+        default:
+
+/*             avahi_log_debug("generic"); */
+
+            if (rdlength > 0) {
+
+                r->data.generic.data = avahi_memdup(avahi_dns_packet_get_rptr(p), rdlength);
+                r->data.generic.size = rdlength;
+
+                if (avahi_dns_packet_skip(p, rdlength) < 0)
+                    return -1;
+            }
+
+            break;
+    }
+
+    /* Check if we read enough data */
+    if ((const uint8_t*) avahi_dns_packet_get_rptr(p) - (const uint8_t*) start != rdlength)
+        return -1;
+
+    return 0;
+}
+
+AvahiRecord* avahi_dns_packet_consume_record(AvahiDnsPacket *p, int *ret_cache_flush) {
+    char name[AVAHI_DOMAIN_NAME_MAX];
+    uint16_t type, class;
+    uint32_t ttl;
+    uint16_t rdlength;
+    AvahiRecord *r = NULL;
+
+    assert(p);
+
+    if (avahi_dns_packet_consume_name(p, name, sizeof(name)) < 0 ||
+        avahi_dns_packet_consume_uint16(p, &type) < 0 ||
+        avahi_dns_packet_consume_uint16(p, &class) < 0 ||
+        avahi_dns_packet_consume_uint32(p, &ttl) < 0 ||
+        avahi_dns_packet_consume_uint16(p, &rdlength) < 0 ||
+        p->rindex + rdlength > p->size)
+        goto fail;
+
+    if (ret_cache_flush)
+        *ret_cache_flush = !!(class & AVAHI_DNS_CACHE_FLUSH);
+    class &= ~AVAHI_DNS_CACHE_FLUSH;
+
+    if (!(r = avahi_record_new_full(name, class, type, ttl)))
+        goto fail;
+
+    if (parse_rdata(p, r, rdlength) < 0)
+        goto fail;
+
+    if (!avahi_record_is_valid(r))
+        goto fail;
+
+    return r;
+
+fail:
+    if (r)
+        avahi_record_unref(r);
+
+    return NULL;
+}
+
+AvahiKey* avahi_dns_packet_consume_key(AvahiDnsPacket *p, int *ret_unicast_response) {
+    char name[256];
+    uint16_t type, class;
+    AvahiKey *k;
+
+    assert(p);
+
+    if (avahi_dns_packet_consume_name(p, name, sizeof(name)) < 0 ||
+        avahi_dns_packet_consume_uint16(p, &type) < 0 ||
+        avahi_dns_packet_consume_uint16(p, &class) < 0)
+        return NULL;
+
+    if (ret_unicast_response)
+        *ret_unicast_response = !!(class & AVAHI_DNS_UNICAST_RESPONSE);
+
+    class &= ~AVAHI_DNS_UNICAST_RESPONSE;
+
+    if (!(k = avahi_key_new(name, class, type)))
+        return NULL;
+
+    if (!avahi_key_is_valid(k)) {
+        avahi_key_unref(k);
+        return NULL;
+    }
+
+    return k;
+}
+
+uint8_t* avahi_dns_packet_append_key(AvahiDnsPacket *p, AvahiKey *k, int unicast_response) {
+    uint8_t *t;
+    size_t size;
+
+    assert(p);
+    assert(k);
+
+    size = p->size;
+
+    if (!(t = avahi_dns_packet_append_name(p, k->name)) ||
+        !avahi_dns_packet_append_uint16(p, k->type) ||
+        !avahi_dns_packet_append_uint16(p, k->clazz | (unicast_response ? AVAHI_DNS_UNICAST_RESPONSE : 0))) {
+        p->size = size;
+        avahi_dns_packet_cleanup_name_table(p);
+
+        return NULL;
+    }
+
+    return t;
+}
+
+static int append_rdata(AvahiDnsPacket *p, AvahiRecord *r) {
+    assert(p);
+    assert(r);
+
+    switch (r->key->type) {
+
+        case AVAHI_DNS_TYPE_PTR:
+        case AVAHI_DNS_TYPE_CNAME:
+        case AVAHI_DNS_TYPE_NS:
+
+            if (!(avahi_dns_packet_append_name(p, r->data.ptr.name)))
+                return -1;
+
+            break;
+
+        case AVAHI_DNS_TYPE_SRV:
+
+            if (!avahi_dns_packet_append_uint16(p, r->data.srv.priority) ||
+                !avahi_dns_packet_append_uint16(p, r->data.srv.weight) ||
+                !avahi_dns_packet_append_uint16(p, r->data.srv.port) ||
+                !avahi_dns_packet_append_name(p, r->data.srv.name))
+                return -1;
+
+            break;
+
+        case AVAHI_DNS_TYPE_HINFO:
+            if (!avahi_dns_packet_append_string(p, r->data.hinfo.cpu) ||
+                !avahi_dns_packet_append_string(p, r->data.hinfo.os))
+                return -1;
+
+            break;
+
+        case AVAHI_DNS_TYPE_TXT: {
+
+            uint8_t *data;
+            size_t n;
+
+            n = avahi_string_list_serialize(r->data.txt.string_list, NULL, 0);
+
+            if (!(data = avahi_dns_packet_extend(p, n)))
+                return -1;
+
+            avahi_string_list_serialize(r->data.txt.string_list, data, n);
+            break;
+        }
+
+
+        case AVAHI_DNS_TYPE_A:
+
+            if (!avahi_dns_packet_append_bytes(p, &r->data.a.address, sizeof(r->data.a.address)))
+                return -1;
+
+            break;
+
+        case AVAHI_DNS_TYPE_AAAA:
+
+            if (!avahi_dns_packet_append_bytes(p, &r->data.aaaa.address, sizeof(r->data.aaaa.address)))
+                return -1;
+
+            break;
+
+        default:
+
+            if (r->data.generic.size)
+                if (!avahi_dns_packet_append_bytes(p, r->data.generic.data, r->data.generic.size))
+                    return -1;
+
+            break;
+    }
+
+    return 0;
+}
+
+
+uint8_t* avahi_dns_packet_append_record(AvahiDnsPacket *p, AvahiRecord *r, int cache_flush, unsigned max_ttl) {
+    uint8_t *t, *l, *start;
+    size_t size;
+
+    assert(p);
+    assert(r);
+
+    size = p->size;
+
+    if (!(t = avahi_dns_packet_append_name(p, r->key->name)) ||
+        !avahi_dns_packet_append_uint16(p, r->key->type) ||
+        !avahi_dns_packet_append_uint16(p, cache_flush ? (r->key->clazz | AVAHI_DNS_CACHE_FLUSH) : (r->key->clazz &~ AVAHI_DNS_CACHE_FLUSH)) ||
+        !avahi_dns_packet_append_uint32(p, (max_ttl && r->ttl > max_ttl) ? max_ttl : r->ttl) ||
+        !(l = avahi_dns_packet_append_uint16(p, 0)))
+        goto fail;
+
+    start = avahi_dns_packet_extend(p, 0);
+
+    if (append_rdata(p, r) < 0)
+        goto fail;
+
+    size = avahi_dns_packet_extend(p, 0) - start;
+    assert(size <= AVAHI_DNS_RDATA_MAX);
+
+/*     avahi_log_debug("appended %u", size); */
+
+    l[0] = (uint8_t) ((uint16_t) size >> 8);
+    l[1] = (uint8_t) ((uint16_t) size);
+
+    return t;
+
+
+fail:
+    p->size = size;
+    avahi_dns_packet_cleanup_name_table(p);
+
+    return NULL;
+}
+
+int avahi_dns_packet_is_empty(AvahiDnsPacket *p) {
+    assert(p);
+
+    return p->size <= AVAHI_DNS_PACKET_HEADER_SIZE;
+}
+
+size_t avahi_dns_packet_space(AvahiDnsPacket *p) {
+    assert(p);
+
+    assert(p->size <= p->max_size);
+
+    return p->max_size - p->size;
+}
+
+int avahi_rdata_parse(AvahiRecord *record, const void* rdata, size_t size) {
+    int ret;
+    AvahiDnsPacket p;
+
+    assert(record);
+    assert(rdata);
+
+    p.data = (void*) rdata;
+    p.max_size = p.size = size;
+    p.rindex = 0;
+    p.name_table = NULL;
+
+    ret = parse_rdata(&p, record, size);
+
+    assert(!p.name_table);
+
+    return ret;
+}
+
+size_t avahi_rdata_serialize(AvahiRecord *record, void *rdata, size_t max_size) {
+    int ret;
+    AvahiDnsPacket p;
+
+    assert(record);
+    assert(rdata);
+    assert(max_size > 0);
+
+    p.data = (void*) rdata;
+    p.max_size = max_size;
+    p.size = p.rindex = 0;
+    p.name_table = NULL;
+
+    ret = append_rdata(&p, record);
+
+    if (p.name_table)
+         avahi_hashmap_free(p.name_table);
+
+    if (ret < 0)
+        return (size_t) -1;
+
+    return p.size;
+}
diff --git a/avahi-0.6.31/avahi-core/dns.h b/avahi-0.6.31/avahi-core/dns.h
new file mode 100644
index 0000000..52e8d88
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/dns.h
@@ -0,0 +1,111 @@
+#ifndef foodnshfoo
+#define foodnshfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#include "rr.h"
+#include "hashmap.h"
+
+#define AVAHI_DNS_PACKET_HEADER_SIZE 12
+#define AVAHI_DNS_PACKET_EXTRA_SIZE 48
+#define AVAHI_DNS_LABELS_MAX 127
+#define AVAHI_DNS_RDATA_MAX 0xFFFF
+#define AVAHI_DNS_PACKET_SIZE_MAX (AVAHI_DNS_PACKET_HEADER_SIZE + 256 + 2 + 2 + 4 + 2 + AVAHI_DNS_RDATA_MAX)
+
+typedef struct AvahiDnsPacket {
+    size_t size, rindex, max_size;
+    AvahiHashmap *name_table; /* for name compression */
+    uint8_t *data;
+} AvahiDnsPacket;
+
+#define AVAHI_DNS_PACKET_DATA(p) ((p)->data ? (p)->data : ((uint8_t*) p) + sizeof(AvahiDnsPacket))
+
+AvahiDnsPacket* avahi_dns_packet_new(unsigned mtu);
+AvahiDnsPacket* avahi_dns_packet_new_query(unsigned mtu);
+AvahiDnsPacket* avahi_dns_packet_new_response(unsigned mtu, int aa);
+
+AvahiDnsPacket* avahi_dns_packet_new_reply(AvahiDnsPacket* p, unsigned mtu, int copy_queries, int aa);
+
+void avahi_dns_packet_free(AvahiDnsPacket *p);
+void avahi_dns_packet_set_field(AvahiDnsPacket *p, unsigned idx, uint16_t v);
+uint16_t avahi_dns_packet_get_field(AvahiDnsPacket *p, unsigned idx);
+void avahi_dns_packet_inc_field(AvahiDnsPacket *p, unsigned idx);
+
+uint8_t *avahi_dns_packet_extend(AvahiDnsPacket *p, size_t l);
+
+void avahi_dns_packet_cleanup_name_table(AvahiDnsPacket *p);
+
+uint8_t *avahi_dns_packet_append_uint16(AvahiDnsPacket *p, uint16_t v);
+uint8_t *avahi_dns_packet_append_uint32(AvahiDnsPacket *p, uint32_t v);
+uint8_t *avahi_dns_packet_append_name(AvahiDnsPacket *p, const char *name);
+uint8_t *avahi_dns_packet_append_bytes(AvahiDnsPacket  *p, const void *d, size_t l);
+uint8_t* avahi_dns_packet_append_key(AvahiDnsPacket *p, AvahiKey *k, int unicast_response);
+uint8_t* avahi_dns_packet_append_record(AvahiDnsPacket *p, AvahiRecord *r, int cache_flush, unsigned max_ttl);
+uint8_t* avahi_dns_packet_append_string(AvahiDnsPacket *p, const char *s);
+
+int avahi_dns_packet_is_query(AvahiDnsPacket *p);
+int avahi_dns_packet_check_valid(AvahiDnsPacket *p);
+int avahi_dns_packet_check_valid_multicast(AvahiDnsPacket *p);
+
+int avahi_dns_packet_consume_uint16(AvahiDnsPacket *p, uint16_t *ret_v);
+int avahi_dns_packet_consume_uint32(AvahiDnsPacket *p, uint32_t *ret_v);
+int avahi_dns_packet_consume_name(AvahiDnsPacket *p, char *ret_name, size_t l);
+int avahi_dns_packet_consume_bytes(AvahiDnsPacket *p, void* ret_data, size_t l);
+AvahiKey* avahi_dns_packet_consume_key(AvahiDnsPacket *p, int *ret_unicast_response);
+AvahiRecord* avahi_dns_packet_consume_record(AvahiDnsPacket *p, int *ret_cache_flush);
+int avahi_dns_packet_consume_string(AvahiDnsPacket *p, char *ret_string, size_t l);
+
+const void* avahi_dns_packet_get_rptr(AvahiDnsPacket *p);
+
+int avahi_dns_packet_skip(AvahiDnsPacket *p, size_t length);
+
+int avahi_dns_packet_is_empty(AvahiDnsPacket *p);
+size_t avahi_dns_packet_space(AvahiDnsPacket *p);
+
+#define AVAHI_DNS_FIELD_ID 0
+#define AVAHI_DNS_FIELD_FLAGS 1
+#define AVAHI_DNS_FIELD_QDCOUNT 2
+#define AVAHI_DNS_FIELD_ANCOUNT 3
+#define AVAHI_DNS_FIELD_NSCOUNT 4
+#define AVAHI_DNS_FIELD_ARCOUNT 5
+
+#define AVAHI_DNS_FLAG_QR (1 << 15)
+#define AVAHI_DNS_FLAG_OPCODE (15 << 11)
+#define AVAHI_DNS_FLAG_RCODE (15)
+#define AVAHI_DNS_FLAG_TC (1 << 9)
+#define AVAHI_DNS_FLAG_AA (1 << 10)
+
+#define AVAHI_DNS_FLAGS(qr, opcode, aa, tc, rd, ra, z, ad, cd, rcode) \
+        (((uint16_t) !!qr << 15) |  \
+         ((uint16_t) (opcode & 15) << 11) | \
+         ((uint16_t) !!aa << 10) | \
+         ((uint16_t) !!tc << 9) | \
+         ((uint16_t) !!rd << 8) | \
+         ((uint16_t) !!ra << 7) | \
+         ((uint16_t) !!ad << 5) | \
+         ((uint16_t) !!cd << 4) | \
+         ((uint16_t) (rcode & 15)))
+
+#define AVAHI_MDNS_SUFFIX_LOCAL "local"
+#define AVAHI_MDNS_SUFFIX_ADDR_IPV4 "254.169.in-addr.arpa"
+#define AVAHI_MDNS_SUFFIX_ADDR_IPV6 "0.8.e.f.ip6.arpa"
+
+#endif
+
diff --git a/avahi-0.6.31/avahi-core/domain-util.c b/avahi-0.6.31/avahi-core/domain-util.c
new file mode 100644
index 0000000..6eed27f
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/domain-util.c
@@ -0,0 +1,188 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <assert.h>
+#include <string.h>
+#include <unistd.h>
+#include <ctype.h>
+#include <sys/utsname.h>
+#include <stdio.h>
+
+#include <avahi-common/malloc.h>
+
+#include "log.h"
+#include "domain-util.h"
+#include "util.h"
+
+static void strip_bad_chars(char *s) {
+    char *p, *d;
+
+    s[strcspn(s, ".")] = 0;
+
+    for (p = s, d = s; *p; p++)
+        if ((*p >= 'a' && *p <= 'z') ||
+            (*p >= 'A' && *p <= 'Z') ||
+            (*p >= '0' && *p <= '9') ||
+            *p == '-')
+            *(d++) = *p;
+
+    *d = 0;
+}
+
+#ifdef __linux__
+static int load_lsb_distrib_id(char *ret_s, size_t size) {
+    FILE *f;
+
+    assert(ret_s);
+    assert(size > 0);
+
+    if (!(f = fopen("/etc/lsb-release", "r")))
+        return -1;
+
+    while (!feof(f)) {
+        char ln[256], *p;
+
+        if (!fgets(ln, sizeof(ln), f))
+            break;
+
+        if (strncmp(ln, "DISTRIB_ID=", 11))
+            continue;
+
+        p = ln + 11;
+        p += strspn(p, "\"");
+        p[strcspn(p, "\"")] = 0;
+
+        snprintf(ret_s, size, "%s", p);
+
+        fclose(f);
+        return 0;
+    }
+
+    fclose(f);
+    return -1;
+}
+#endif
+
+char *avahi_get_host_name(char *ret_s, size_t size) {
+    assert(ret_s);
+    assert(size > 0);
+
+    if (gethostname(ret_s, size) >= 0) {
+        ret_s[size-1] = 0;
+        strip_bad_chars(ret_s);
+    } else
+        *ret_s = 0;
+
+    if (strcmp(ret_s, "localhost") == 0 || strncmp(ret_s, "localhost.", 10) == 0) {
+        *ret_s = 0;
+        avahi_log_warn("System host name is set to 'localhost'. This is not a suitable mDNS host name, looking for alternatives.");
+    }
+
+    if (*ret_s == 0) {
+        /* No hostname was set, so let's take the OS name */
+
+#ifdef __linux__
+
+        /* Try LSB distribution name first */
+        if (load_lsb_distrib_id(ret_s, size) >= 0) {
+            strip_bad_chars(ret_s);
+            avahi_strdown(ret_s);
+        }
+
+        if (*ret_s == 0)
+#endif
+
+        {
+            /* Try uname() second */
+            struct utsname utsname;
+
+            if (uname(&utsname) >= 0) {
+                snprintf(ret_s, size, "%s", utsname.sysname);
+                strip_bad_chars(ret_s);
+                avahi_strdown(ret_s);
+            }
+
+            /* Give up */
+            if (*ret_s == 0)
+                snprintf(ret_s, size, "unnamed");
+        }
+    }
+
+    if (size >= AVAHI_LABEL_MAX)
+	ret_s[AVAHI_LABEL_MAX-1] = 0;
+
+    return ret_s;
+}
+
+char *avahi_get_host_name_strdup(void) {
+    char t[AVAHI_DOMAIN_NAME_MAX];
+
+    if (!(avahi_get_host_name(t, sizeof(t))))
+        return NULL;
+
+    return avahi_strdup(t);
+}
+
+int avahi_binary_domain_cmp(const char *a, const char *b) {
+    assert(a);
+    assert(b);
+
+    if (a == b)
+        return 0;
+
+    for (;;) {
+        char ca[AVAHI_LABEL_MAX], cb[AVAHI_LABEL_MAX], *p;
+        int r;
+
+        p = avahi_unescape_label(&a, ca, sizeof(ca));
+        assert(p);
+        p = avahi_unescape_label(&b, cb, sizeof(cb));
+        assert(p);
+
+        if ((r = strcmp(ca, cb)))
+            return r;
+
+        if (!*a && !*b)
+            return 0;
+    }
+}
+
+int avahi_domain_ends_with(const char *domain, const char *suffix) {
+    assert(domain);
+    assert(suffix);
+
+    for (;;) {
+        char dummy[AVAHI_LABEL_MAX], *r;
+
+        if (*domain == 0)
+            return 0;
+
+        if (avahi_domain_equal(domain, suffix))
+            return 1;
+
+        r = avahi_unescape_label(&domain, dummy, sizeof(dummy));
+        assert(r);
+    }
+}
+
diff --git a/avahi-0.6.31/avahi-core/domain-util.h b/avahi-0.6.31/avahi-core/domain-util.h
new file mode 100644
index 0000000..082fde6
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/domain-util.h
@@ -0,0 +1,45 @@
+#ifndef foodomainutilhfoo
+#define foodomainutilhfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#include <inttypes.h>
+#include <sys/types.h>
+
+#include <avahi-common/cdecl.h>
+#include <avahi-common/domain.h>
+
+AVAHI_C_DECL_BEGIN
+
+/** Return the local host name. */
+char *avahi_get_host_name(char *ret_s, size_t size);
+
+/** Return the local host name. avahi_free() the result! */
+char *avahi_get_host_name_strdup(void);
+
+/** Do a binary comparison of to specified domain names, return -1, 0, or 1, depending on the order. */
+int avahi_binary_domain_cmp(const char *a, const char *b);
+
+/** Returns 1 if the the end labels of domain are eqal to suffix */
+int avahi_domain_ends_with(const char *domain, const char *suffix);
+
+AVAHI_C_DECL_END
+
+#endif
diff --git a/avahi-0.6.31/avahi-core/entry.c b/avahi-0.6.31/avahi-core/entry.c
new file mode 100644
index 0000000..0d86213
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/entry.c
@@ -0,0 +1,1233 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+#include <stdio.h>
+#include <assert.h>
+#include <stdlib.h>
+
+#include <arpa/inet.h>
+
+#include <sys/utsname.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#include <avahi-common/domain.h>
+#include <avahi-common/timeval.h>
+#include <avahi-common/malloc.h>
+#include <avahi-common/error.h>
+#include <avahi-common/domain.h>
+
+#include "internal.h"
+#include "iface.h"
+#include "socket.h"
+#include "browse.h"
+#include "log.h"
+#include "util.h"
+#include "dns-srv-rr.h"
+#include "rr-util.h"
+#include "domain-util.h"
+
+static void transport_flags_from_domain(AvahiServer *s, AvahiPublishFlags *flags, const char *domain) {
+    assert(flags);
+    assert(domain);
+
+    assert(!((*flags & AVAHI_PUBLISH_USE_MULTICAST) && (*flags & AVAHI_PUBLISH_USE_WIDE_AREA)));
+
+    if (*flags & (AVAHI_PUBLISH_USE_MULTICAST|AVAHI_PUBLISH_USE_WIDE_AREA))
+        return;
+
+    if (!s->wide_area_lookup_engine ||
+        !avahi_wide_area_has_servers(s->wide_area_lookup_engine) ||
+        avahi_domain_ends_with(domain, AVAHI_MDNS_SUFFIX_LOCAL) ||
+        avahi_domain_ends_with(domain, AVAHI_MDNS_SUFFIX_ADDR_IPV4) ||
+        avahi_domain_ends_with(domain, AVAHI_MDNS_SUFFIX_ADDR_IPV6))
+        *flags |= AVAHI_PUBLISH_USE_MULTICAST;
+    else
+        *flags |= AVAHI_PUBLISH_USE_WIDE_AREA;
+}
+
+void avahi_entry_free(AvahiServer*s, AvahiEntry *e) {
+    AvahiEntry *t;
+
+    assert(s);
+    assert(e);
+
+    avahi_goodbye_entry(s, e, 1, 1);
+
+    /* Remove from linked list */
+    AVAHI_LLIST_REMOVE(AvahiEntry, entries, s->entries, e);
+
+    /* Remove from hash table indexed by name */
+    t = avahi_hashmap_lookup(s->entries_by_key, e->record->key);
+    AVAHI_LLIST_REMOVE(AvahiEntry, by_key, t, e);
+    if (t)
+        avahi_hashmap_replace(s->entries_by_key, t->record->key, t);
+    else
+        avahi_hashmap_remove(s->entries_by_key, e->record->key);
+
+    /* Remove from associated group */
+    if (e->group)
+        AVAHI_LLIST_REMOVE(AvahiEntry, by_group, e->group->entries, e);
+
+    avahi_record_unref(e->record);
+    avahi_free(e);
+}
+
+void avahi_entry_group_free(AvahiServer *s, AvahiSEntryGroup *g) {
+    assert(s);
+    assert(g);
+
+    while (g->entries)
+        avahi_entry_free(s, g->entries);
+
+    if (g->register_time_event)
+        avahi_time_event_free(g->register_time_event);
+
+    AVAHI_LLIST_REMOVE(AvahiSEntryGroup, groups, s->groups, g);
+    avahi_free(g);
+}
+
+void avahi_cleanup_dead_entries(AvahiServer *s) {
+    assert(s);
+
+    if (s->need_group_cleanup) {
+        AvahiSEntryGroup *g, *next;
+
+        for (g = s->groups; g; g = next) {
+            next = g->groups_next;
+
+            if (g->dead)
+                avahi_entry_group_free(s, g);
+        }
+
+        s->need_group_cleanup = 0;
+    }
+
+    if (s->need_entry_cleanup) {
+        AvahiEntry *e, *next;
+
+        for (e = s->entries; e; e = next) {
+            next = e->entries_next;
+
+            if (e->dead)
+                avahi_entry_free(s, e);
+        }
+
+        s->need_entry_cleanup = 0;
+    }
+
+    if (s->need_browser_cleanup)
+        avahi_browser_cleanup(s);
+
+    if (s->cleanup_time_event) {
+        avahi_time_event_free(s->cleanup_time_event);
+        s->cleanup_time_event = NULL;
+    }
+}
+
+static int check_record_conflict(AvahiServer *s, AvahiIfIndex interface, AvahiProtocol protocol, AvahiRecord *r, AvahiPublishFlags flags) {
+    AvahiEntry *e;
+
+    assert(s);
+    assert(r);
+
+    for (e = avahi_hashmap_lookup(s->entries_by_key, r->key); e; e = e->by_key_next) {
+        if (e->dead)
+            continue;
+
+        if (!(flags & AVAHI_PUBLISH_UNIQUE) && !(e->flags & AVAHI_PUBLISH_UNIQUE))
+            continue;
+
+        if ((flags & AVAHI_PUBLISH_ALLOW_MULTIPLE) && (e->flags & AVAHI_PUBLISH_ALLOW_MULTIPLE) )
+            continue;
+
+        if (avahi_record_equal_no_ttl(r, e->record)) {
+            /* The records are the same, not a conflict in any case */
+            continue;
+        }
+
+        if ((interface <= 0 ||
+             e->interface <= 0 ||
+             e->interface == interface) &&
+            (protocol == AVAHI_PROTO_UNSPEC ||
+             e->protocol == AVAHI_PROTO_UNSPEC ||
+             e->protocol == protocol))
+
+            return -1;
+    }
+
+    return 0;
+}
+
+static AvahiEntry * server_add_internal(
+    AvahiServer *s,
+    AvahiSEntryGroup *g,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiPublishFlags flags,
+    AvahiRecord *r) {
+
+    AvahiEntry *e;
+
+    assert(s);
+    assert(r);
+
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(s, s->state != AVAHI_SERVER_FAILURE && s->state != AVAHI_SERVER_INVALID, AVAHI_ERR_BAD_STATE);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(s, AVAHI_IF_VALID(interface), AVAHI_ERR_INVALID_INTERFACE);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(s, AVAHI_PROTO_VALID(protocol), AVAHI_ERR_INVALID_PROTOCOL);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(s, AVAHI_FLAGS_VALID(
+                                         flags,
+                                         AVAHI_PUBLISH_NO_ANNOUNCE|
+                                         AVAHI_PUBLISH_NO_PROBE|
+                                         AVAHI_PUBLISH_UNIQUE|
+                                         AVAHI_PUBLISH_ALLOW_MULTIPLE|
+                                         AVAHI_PUBLISH_UPDATE|
+                                         AVAHI_PUBLISH_USE_WIDE_AREA|
+                                         AVAHI_PUBLISH_USE_MULTICAST), AVAHI_ERR_INVALID_FLAGS);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(s, avahi_is_valid_domain_name(r->key->name), AVAHI_ERR_INVALID_HOST_NAME);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(s, r->ttl != 0, AVAHI_ERR_INVALID_TTL);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(s, !avahi_key_is_pattern(r->key), AVAHI_ERR_IS_PATTERN);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(s, avahi_record_is_valid(r), AVAHI_ERR_INVALID_RECORD);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(s, r->key->clazz == AVAHI_DNS_CLASS_IN, AVAHI_ERR_INVALID_DNS_CLASS);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(s,
+                                     (r->key->type != 0) &&
+                                     (r->key->type != AVAHI_DNS_TYPE_ANY) &&
+                                     (r->key->type != AVAHI_DNS_TYPE_OPT) &&
+                                     (r->key->type != AVAHI_DNS_TYPE_TKEY) &&
+                                     (r->key->type != AVAHI_DNS_TYPE_TSIG) &&
+                                     (r->key->type != AVAHI_DNS_TYPE_IXFR) &&
+                                     (r->key->type != AVAHI_DNS_TYPE_AXFR), AVAHI_ERR_INVALID_DNS_TYPE);
+
+    transport_flags_from_domain(s, &flags, r->key->name);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(s, flags & AVAHI_PUBLISH_USE_MULTICAST, AVAHI_ERR_NOT_SUPPORTED);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(s, !s->config.disable_publishing, AVAHI_ERR_NOT_PERMITTED);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(s,
+                                     !g ||
+                                     (g->state != AVAHI_ENTRY_GROUP_ESTABLISHED && g->state != AVAHI_ENTRY_GROUP_REGISTERING) ||
+                                     (flags & AVAHI_PUBLISH_UPDATE), AVAHI_ERR_BAD_STATE);
+
+    if (flags & AVAHI_PUBLISH_UPDATE) {
+        AvahiRecord *old_record;
+        int is_first = 1;
+
+        /* Update and existing record */
+
+        /* Find the first matching entry */
+        for (e = avahi_hashmap_lookup(s->entries_by_key, r->key); e; e = e->by_key_next) {
+            if (!e->dead && e->group == g && e->interface == interface && e->protocol == protocol)
+                break;
+
+            is_first = 0;
+        }
+
+        /* Hmm, nothing found? */
+        if (!e) {
+            avahi_server_set_errno(s, AVAHI_ERR_NOT_FOUND);
+            return NULL;
+        }
+
+        /* Update the entry */
+        old_record = e->record;
+        e->record = avahi_record_ref(r);
+        e->flags = flags;
+
+        /* Announce our changes when needed */
+        if (!avahi_record_equal_no_ttl(old_record, r) && (!g || g->state != AVAHI_ENTRY_GROUP_UNCOMMITED)) {
+
+            /* Remove the old entry from all caches, if needed */
+            if (!(e->flags & AVAHI_PUBLISH_UNIQUE))
+                avahi_goodbye_entry(s, e, 1, 0);
+
+            /* Reannounce our updated entry */
+            avahi_reannounce_entry(s, e);
+        }
+
+        /* If we were the first entry in the list, we need to update the key */
+        if (is_first)
+            avahi_hashmap_replace(s->entries_by_key, e->record->key, e);
+
+        avahi_record_unref(old_record);
+
+    } else {
+        AvahiEntry *t;
+
+        /* Add a new record */
+
+        if (check_record_conflict(s, interface, protocol, r, flags) < 0) {
+            avahi_server_set_errno(s, AVAHI_ERR_COLLISION);
+            return NULL;
+        }
+
+        if (!(e = avahi_new(AvahiEntry, 1))) {
+            avahi_server_set_errno(s, AVAHI_ERR_NO_MEMORY);
+            return NULL;
+        }
+
+        e->server = s;
+        e->record = avahi_record_ref(r);
+        e->group = g;
+        e->interface = interface;
+        e->protocol = protocol;
+        e->flags = flags;
+        e->dead = 0;
+
+        AVAHI_LLIST_HEAD_INIT(AvahiAnnouncer, e->announcers);
+
+        AVAHI_LLIST_PREPEND(AvahiEntry, entries, s->entries, e);
+
+        /* Insert into hash table indexed by name */
+        t = avahi_hashmap_lookup(s->entries_by_key, e->record->key);
+        AVAHI_LLIST_PREPEND(AvahiEntry, by_key, t, e);
+        avahi_hashmap_replace(s->entries_by_key, e->record->key, t);
+
+        /* Insert into group list */
+        if (g)
+            AVAHI_LLIST_PREPEND(AvahiEntry, by_group, g->entries, e);
+
+        avahi_announce_entry(s, e);
+    }
+
+    return e;
+}
+
+int avahi_server_add(
+    AvahiServer *s,
+    AvahiSEntryGroup *g,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiPublishFlags flags,
+    AvahiRecord *r) {
+
+    if (!server_add_internal(s, g, interface, protocol, flags, r))
+        return avahi_server_errno(s);
+
+    return AVAHI_OK;
+}
+
+const AvahiRecord *avahi_server_iterate(AvahiServer *s, AvahiSEntryGroup *g, void **state) {
+    AvahiEntry **e = (AvahiEntry**) state;
+    assert(s);
+    assert(e);
+
+    if (!*e)
+        *e = g ? g->entries : s->entries;
+
+    while (*e && (*e)->dead)
+        *e = g ? (*e)->by_group_next : (*e)->entries_next;
+
+    if (!*e)
+        return NULL;
+
+    return avahi_record_ref((*e)->record);
+}
+
+int avahi_server_dump(AvahiServer *s, AvahiDumpCallback callback, void* userdata) {
+    AvahiEntry *e;
+
+    assert(s);
+    assert(callback);
+
+    callback(";;; ZONE DUMP FOLLOWS ;;;", userdata);
+
+    for (e = s->entries; e; e = e->entries_next) {
+        char *t;
+        char ln[256];
+
+        if (e->dead)
+            continue;
+
+        if (!(t = avahi_record_to_string(e->record)))
+            return avahi_server_set_errno(s, AVAHI_ERR_NO_MEMORY);
+
+        snprintf(ln, sizeof(ln), "%s ; iface=%i proto=%i", t, e->interface, e->protocol);
+        avahi_free(t);
+
+        callback(ln, userdata);
+    }
+
+    avahi_dump_caches(s->monitor, callback, userdata);
+
+    if (s->wide_area_lookup_engine)
+        avahi_wide_area_cache_dump(s->wide_area_lookup_engine, callback, userdata);
+    return AVAHI_OK;
+}
+
+static AvahiEntry *server_add_ptr_internal(
+    AvahiServer *s,
+    AvahiSEntryGroup *g,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiPublishFlags flags,
+    uint32_t ttl,
+    const char *name,
+    const char *dest) {
+
+    AvahiRecord *r;
+    AvahiEntry *e;
+
+    assert(s);
+    assert(dest);
+
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(s, !name || avahi_is_valid_domain_name(name), AVAHI_ERR_INVALID_HOST_NAME);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(s, avahi_is_valid_domain_name(dest), AVAHI_ERR_INVALID_HOST_NAME);
+
+    if (!name)
+        name = s->host_name_fqdn;
+
+    if (!(r = avahi_record_new_full(name, AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_PTR, ttl))) {
+        avahi_server_set_errno(s, AVAHI_ERR_NO_MEMORY);
+        return NULL;
+    }
+
+    r->data.ptr.name = avahi_normalize_name_strdup(dest);
+    e = server_add_internal(s, g, interface, protocol, flags, r);
+    avahi_record_unref(r);
+    return e;
+}
+
+int avahi_server_add_ptr(
+    AvahiServer *s,
+    AvahiSEntryGroup *g,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiPublishFlags flags,
+    uint32_t ttl,
+    const char *name,
+    const char *dest) {
+
+    AvahiEntry *e;
+
+    assert(s);
+
+    if (!(e = server_add_ptr_internal(s, g, interface, protocol, flags, ttl, name, dest)))
+        return avahi_server_errno(s);
+
+    return AVAHI_OK;
+}
+
+int avahi_server_add_address(
+    AvahiServer *s,
+    AvahiSEntryGroup *g,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiPublishFlags flags,
+    const char *name,
+    AvahiAddress *a) {
+
+    char n[AVAHI_DOMAIN_NAME_MAX];
+    int ret = AVAHI_OK;
+    AvahiEntry *entry = NULL, *reverse = NULL;
+    AvahiRecord  *r;
+
+    assert(s);
+    assert(a);
+
+    AVAHI_CHECK_VALIDITY(s, AVAHI_IF_VALID(interface), AVAHI_ERR_INVALID_INTERFACE);
+    AVAHI_CHECK_VALIDITY(s, AVAHI_PROTO_VALID(protocol) && AVAHI_PROTO_VALID(a->proto), AVAHI_ERR_INVALID_PROTOCOL);
+    AVAHI_CHECK_VALIDITY(s, AVAHI_FLAGS_VALID(flags,
+                                              AVAHI_PUBLISH_NO_REVERSE|
+                                              AVAHI_PUBLISH_NO_ANNOUNCE|
+                                              AVAHI_PUBLISH_NO_PROBE|
+                                              AVAHI_PUBLISH_UPDATE|
+                                              AVAHI_PUBLISH_USE_WIDE_AREA|
+                                              AVAHI_PUBLISH_USE_MULTICAST), AVAHI_ERR_INVALID_FLAGS);
+    AVAHI_CHECK_VALIDITY(s, !name || avahi_is_valid_fqdn(name), AVAHI_ERR_INVALID_HOST_NAME);
+
+    /* Prepare the host naem */
+
+    if (!name)
+        name = s->host_name_fqdn;
+    else {
+        AVAHI_ASSERT_TRUE(avahi_normalize_name(name, n, sizeof(n)));
+        name = n;
+    }
+
+    transport_flags_from_domain(s, &flags, name);
+    AVAHI_CHECK_VALIDITY(s, flags & AVAHI_PUBLISH_USE_MULTICAST, AVAHI_ERR_NOT_SUPPORTED);
+
+    /* Create the A/AAAA record */
+
+    if (a->proto == AVAHI_PROTO_INET) {
+
+        if (!(r = avahi_record_new_full(name, AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_A, AVAHI_DEFAULT_TTL_HOST_NAME))) {
+            ret = avahi_server_set_errno(s, AVAHI_ERR_NO_MEMORY);
+            goto finish;
+        }
+
+        r->data.a.address = a->data.ipv4;
+
+    } else {
+        assert(a->proto == AVAHI_PROTO_INET6);
+
+        if (!(r = avahi_record_new_full(name, AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_AAAA, AVAHI_DEFAULT_TTL_HOST_NAME))) {
+            ret = avahi_server_set_errno(s, AVAHI_ERR_NO_MEMORY);
+            goto finish;
+        }
+
+        r->data.aaaa.address = a->data.ipv6;
+    }
+
+    entry = server_add_internal(s, g, interface, protocol, (flags & ~ AVAHI_PUBLISH_NO_REVERSE) | AVAHI_PUBLISH_UNIQUE | AVAHI_PUBLISH_ALLOW_MULTIPLE, r);
+    avahi_record_unref(r);
+
+    if (!entry) {
+        ret = avahi_server_errno(s);
+        goto finish;
+    }
+
+    /* Create the reverse lookup entry */
+
+    if (!(flags & AVAHI_PUBLISH_NO_REVERSE)) {
+        char reverse_n[AVAHI_DOMAIN_NAME_MAX];
+        avahi_reverse_lookup_name(a, reverse_n, sizeof(reverse_n));
+
+        if (!(reverse = server_add_ptr_internal(s, g, interface, protocol, flags | AVAHI_PUBLISH_UNIQUE, AVAHI_DEFAULT_TTL_HOST_NAME, reverse_n, name))) {
+            ret = avahi_server_errno(s);
+            goto finish;
+        }
+    }
+
+finish:
+
+    if (ret != AVAHI_OK && !(flags & AVAHI_PUBLISH_UPDATE)) {
+        if (entry)
+            avahi_entry_free(s, entry);
+        if (reverse)
+            avahi_entry_free(s, reverse);
+    }
+
+    return ret;
+}
+
+static AvahiEntry *server_add_txt_strlst_nocopy(
+    AvahiServer *s,
+    AvahiSEntryGroup *g,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiPublishFlags flags,
+    uint32_t ttl,
+    const char *name,
+    AvahiStringList *strlst) {
+
+    AvahiRecord *r;
+    AvahiEntry *e;
+
+    assert(s);
+
+    if (!(r = avahi_record_new_full(name ? name : s->host_name_fqdn, AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_TXT, ttl))) {
+        avahi_string_list_free(strlst);
+        avahi_server_set_errno(s, AVAHI_ERR_NO_MEMORY);
+        return NULL;
+    }
+
+    r->data.txt.string_list = strlst;
+    e = server_add_internal(s, g, interface, protocol, flags, r);
+    avahi_record_unref(r);
+
+    return e;
+}
+
+static AvahiStringList *add_magic_cookie(
+    AvahiServer *s,
+    AvahiStringList *strlst) {
+
+    assert(s);
+
+    if (!s->config.add_service_cookie)
+        return strlst;
+
+    if (avahi_string_list_find(strlst, AVAHI_SERVICE_COOKIE))
+        /* This string list already contains a magic cookie */
+        return strlst;
+
+    return avahi_string_list_add_printf(strlst, AVAHI_SERVICE_COOKIE"=%u", s->local_service_cookie);
+}
+
+static int server_add_service_strlst_nocopy(
+    AvahiServer *s,
+    AvahiSEntryGroup *g,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiPublishFlags flags,
+    const char *name,
+    const char *type,
+    const char *domain,
+    const char *host,
+    uint16_t port,
+    AvahiStringList *strlst) {
+
+    char ptr_name[AVAHI_DOMAIN_NAME_MAX], svc_name[AVAHI_DOMAIN_NAME_MAX], enum_ptr[AVAHI_DOMAIN_NAME_MAX], *h = NULL;
+    AvahiRecord *r = NULL;
+    int ret = AVAHI_OK;
+    AvahiEntry *srv_entry = NULL, *txt_entry = NULL, *ptr_entry = NULL, *enum_entry = NULL;
+
+    assert(s);
+    assert(type);
+    assert(name);
+
+    AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(s, AVAHI_IF_VALID(interface), AVAHI_ERR_INVALID_INTERFACE);
+    AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(s, AVAHI_PROTO_VALID(protocol), AVAHI_ERR_INVALID_PROTOCOL);
+    AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(s, AVAHI_FLAGS_VALID(flags,
+                                                                AVAHI_PUBLISH_NO_COOKIE|
+                                                                AVAHI_PUBLISH_UPDATE|
+                                                                AVAHI_PUBLISH_USE_WIDE_AREA|
+                                                                AVAHI_PUBLISH_USE_MULTICAST), AVAHI_ERR_INVALID_FLAGS);
+    AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(s, avahi_is_valid_service_name(name), AVAHI_ERR_INVALID_SERVICE_NAME);
+    AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(s, avahi_is_valid_service_type_strict(type), AVAHI_ERR_INVALID_SERVICE_TYPE);
+    AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(s, !domain || avahi_is_valid_domain_name(domain), AVAHI_ERR_INVALID_DOMAIN_NAME);
+    AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(s, !host || avahi_is_valid_fqdn(host), AVAHI_ERR_INVALID_HOST_NAME);
+
+    if (!domain)
+        domain = s->domain_name;
+
+    if (!host)
+        host = s->host_name_fqdn;
+
+    transport_flags_from_domain(s, &flags, domain);
+    AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(s, flags & AVAHI_PUBLISH_USE_MULTICAST, AVAHI_ERR_NOT_SUPPORTED);
+
+    if (!(h = avahi_normalize_name_strdup(host))) {
+        ret = avahi_server_set_errno(s, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    if ((ret = avahi_service_name_join(svc_name, sizeof(svc_name), name, type, domain)) < 0 ||
+        (ret = avahi_service_name_join(ptr_name, sizeof(ptr_name), NULL, type, domain)) < 0 ||
+        (ret = avahi_service_name_join(enum_ptr, sizeof(enum_ptr), NULL, "_services._dns-sd._udp", domain)) < 0) {
+        avahi_server_set_errno(s, ret);
+        goto fail;
+    }
+
+    /* Add service enumeration PTR record */
+
+    if (!(ptr_entry = server_add_ptr_internal(s, g, interface, protocol, 0, AVAHI_DEFAULT_TTL, ptr_name, svc_name))) {
+        ret = avahi_server_errno(s);
+        goto fail;
+    }
+
+    /* Add SRV record */
+
+    if (!(r = avahi_record_new_full(svc_name, AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_SRV, AVAHI_DEFAULT_TTL_HOST_NAME))) {
+        ret = avahi_server_set_errno(s, AVAHI_ERR_NO_MEMORY);
+        goto fail;
+    }
+
+    r->data.srv.priority = 0;
+    r->data.srv.weight = 0;
+    r->data.srv.port = port;
+    r->data.srv.name = h;
+    h = NULL;
+    srv_entry = server_add_internal(s, g, interface, protocol, AVAHI_PUBLISH_UNIQUE, r);
+    avahi_record_unref(r);
+
+    if (!srv_entry) {
+        ret = avahi_server_errno(s);
+        goto fail;
+    }
+
+    /* Add TXT record */
+
+    if (!(flags & AVAHI_PUBLISH_NO_COOKIE))
+        strlst = add_magic_cookie(s, strlst);
+
+    txt_entry = server_add_txt_strlst_nocopy(s, g, interface, protocol, AVAHI_PUBLISH_UNIQUE, AVAHI_DEFAULT_TTL, svc_name, strlst);
+    strlst = NULL;
+
+    if (!txt_entry) {
+        ret = avahi_server_errno(s);
+        goto fail;
+    }
+
+    /* Add service type enumeration record */
+
+    if (!(enum_entry = server_add_ptr_internal(s, g, interface, protocol, 0, AVAHI_DEFAULT_TTL, enum_ptr, ptr_name))) {
+        ret = avahi_server_errno(s);
+        goto fail;
+    }
+
+fail:
+    if (ret != AVAHI_OK && !(flags & AVAHI_PUBLISH_UPDATE)) {
+        if (srv_entry)
+            avahi_entry_free(s, srv_entry);
+        if (txt_entry)
+            avahi_entry_free(s, txt_entry);
+        if (ptr_entry)
+            avahi_entry_free(s, ptr_entry);
+        if (enum_entry)
+            avahi_entry_free(s, enum_entry);
+    }
+
+    avahi_string_list_free(strlst);
+    avahi_free(h);
+
+    return ret;
+}
+
+int avahi_server_add_service_strlst(
+    AvahiServer *s,
+    AvahiSEntryGroup *g,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiPublishFlags flags,
+    const char *name,
+    const char *type,
+    const char *domain,
+    const char *host,
+    uint16_t port,
+    AvahiStringList *strlst) {
+
+    assert(s);
+    assert(type);
+    assert(name);
+
+    return server_add_service_strlst_nocopy(s, g, interface, protocol, flags, name, type, domain, host, port, avahi_string_list_copy(strlst));
+}
+
+int avahi_server_add_service(
+    AvahiServer *s,
+    AvahiSEntryGroup *g,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiPublishFlags flags,
+    const char *name,
+    const char *type,
+    const char *domain,
+    const char *host,
+    uint16_t port,
+    ... ){
+
+    va_list va;
+    int ret;
+
+    va_start(va, port);
+    ret = server_add_service_strlst_nocopy(s, g, interface, protocol, flags, name, type, domain, host, port, avahi_string_list_new_va(va));
+    va_end(va);
+
+    return ret;
+}
+
+static int server_update_service_txt_strlst_nocopy(
+    AvahiServer *s,
+    AvahiSEntryGroup *g,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiPublishFlags flags,
+    const char *name,
+    const char *type,
+    const char *domain,
+    AvahiStringList *strlst) {
+
+    char svc_name[AVAHI_DOMAIN_NAME_MAX];
+    int ret = AVAHI_OK;
+    AvahiEntry *e;
+
+    assert(s);
+    assert(type);
+    assert(name);
+
+    AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(s, AVAHI_IF_VALID(interface), AVAHI_ERR_INVALID_INTERFACE);
+    AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(s, AVAHI_PROTO_VALID(protocol), AVAHI_ERR_INVALID_PROTOCOL);
+    AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(s, AVAHI_FLAGS_VALID(flags,
+                                                                AVAHI_PUBLISH_NO_COOKIE|
+                                                                AVAHI_PUBLISH_USE_WIDE_AREA|
+                                                                AVAHI_PUBLISH_USE_MULTICAST), AVAHI_ERR_INVALID_FLAGS);
+    AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(s, avahi_is_valid_service_name(name), AVAHI_ERR_INVALID_SERVICE_NAME);
+    AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(s, avahi_is_valid_service_type_strict(type), AVAHI_ERR_INVALID_SERVICE_TYPE);
+    AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(s, !domain || avahi_is_valid_domain_name(domain), AVAHI_ERR_INVALID_DOMAIN_NAME);
+
+    if (!domain)
+        domain = s->domain_name;
+
+    transport_flags_from_domain(s, &flags, domain);
+    AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(s, flags & AVAHI_PUBLISH_USE_MULTICAST, AVAHI_ERR_NOT_SUPPORTED);
+
+    if ((ret = avahi_service_name_join(svc_name, sizeof(svc_name), name, type, domain)) < 0) {
+        avahi_server_set_errno(s, ret);
+        goto fail;
+    }
+
+    /* Add TXT record */
+    if (!(flags & AVAHI_PUBLISH_NO_COOKIE))
+        strlst = add_magic_cookie(s, strlst);
+
+    e = server_add_txt_strlst_nocopy(s, g, interface, protocol, AVAHI_PUBLISH_UNIQUE | AVAHI_PUBLISH_UPDATE, AVAHI_DEFAULT_TTL, svc_name, strlst);
+    strlst = NULL;
+
+    if (!e)
+        ret = avahi_server_errno(s);
+
+fail:
+
+    avahi_string_list_free(strlst);
+
+    return ret;
+}
+
+int avahi_server_update_service_txt_strlst(
+    AvahiServer *s,
+    AvahiSEntryGroup *g,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiPublishFlags flags,
+    const char *name,
+    const char *type,
+    const char *domain,
+    AvahiStringList *strlst) {
+
+    return server_update_service_txt_strlst_nocopy(s, g, interface, protocol, flags, name, type, domain, avahi_string_list_copy(strlst));
+}
+
+/** Update the TXT record for a service with the NULL termonate list of strings */
+int avahi_server_update_service_txt(
+    AvahiServer *s,
+    AvahiSEntryGroup *g,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiPublishFlags flags,
+    const char *name,
+    const char *type,
+    const char *domain,
+    ...) {
+
+    va_list va;
+    int ret;
+
+    va_start(va, domain);
+    ret = server_update_service_txt_strlst_nocopy(s, g, interface, protocol, flags, name, type, domain, avahi_string_list_new_va(va));
+    va_end(va);
+
+    return ret;
+}
+
+int avahi_server_add_service_subtype(
+    AvahiServer *s,
+    AvahiSEntryGroup *g,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiPublishFlags flags,
+    const char *name,
+    const char *type,
+    const char *domain,
+    const char *subtype) {
+
+    int ret = AVAHI_OK;
+    char svc_name[AVAHI_DOMAIN_NAME_MAX], ptr_name[AVAHI_DOMAIN_NAME_MAX];
+
+    assert(name);
+    assert(type);
+    assert(subtype);
+
+    AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(s, AVAHI_IF_VALID(interface), AVAHI_ERR_INVALID_INTERFACE);
+    AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(s, AVAHI_PROTO_VALID(protocol), AVAHI_ERR_INVALID_PROTOCOL);
+    AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(s, AVAHI_FLAGS_VALID(flags, AVAHI_PUBLISH_USE_MULTICAST|AVAHI_PUBLISH_USE_WIDE_AREA), AVAHI_ERR_INVALID_FLAGS);
+    AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(s, avahi_is_valid_service_name(name), AVAHI_ERR_INVALID_SERVICE_NAME);
+    AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(s, avahi_is_valid_service_type_strict(type), AVAHI_ERR_INVALID_SERVICE_TYPE);
+    AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(s, !domain || avahi_is_valid_domain_name(domain), AVAHI_ERR_INVALID_DOMAIN_NAME);
+    AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(s, avahi_is_valid_service_subtype(subtype), AVAHI_ERR_INVALID_SERVICE_SUBTYPE);
+
+    if (!domain)
+        domain = s->domain_name;
+
+    transport_flags_from_domain(s, &flags, domain);
+    AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(s, flags & AVAHI_PUBLISH_USE_MULTICAST, AVAHI_ERR_NOT_SUPPORTED);
+
+    if ((ret = avahi_service_name_join(svc_name, sizeof(svc_name), name, type, domain)) < 0 ||
+        (ret = avahi_service_name_join(ptr_name, sizeof(ptr_name), NULL, subtype, domain)) < 0) {
+        avahi_server_set_errno(s, ret);
+        goto fail;
+    }
+
+    if ((ret = avahi_server_add_ptr(s, g, interface, protocol, 0, AVAHI_DEFAULT_TTL, ptr_name, svc_name)) < 0)
+        goto fail;
+
+fail:
+
+    return ret;
+}
+
+static void hexstring(char *s, size_t sl, const void *p, size_t pl) {
+    static const char hex[] = "0123456789abcdef";
+    int b = 0;
+    const uint8_t *k = p;
+
+    while (sl > 1 && pl > 0) {
+        *(s++) = hex[(b ? *k : *k >> 4) & 0xF];
+
+        if (b) {
+            k++;
+            pl--;
+        }
+
+        b = !b;
+
+        sl--;
+    }
+
+    if (sl > 0)
+        *s = 0;
+}
+
+static AvahiEntry *server_add_dns_server_name(
+    AvahiServer *s,
+    AvahiSEntryGroup *g,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiPublishFlags flags,
+    const char *domain,
+    AvahiDNSServerType type,
+    const char *name,
+    uint16_t port /** should be 53 */) {
+
+    AvahiEntry *e;
+    char t[AVAHI_DOMAIN_NAME_MAX], normalized_d[AVAHI_DOMAIN_NAME_MAX], *n;
+
+    AvahiRecord *r;
+
+    assert(s);
+    assert(name);
+
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(s, AVAHI_FLAGS_VALID(flags, AVAHI_PUBLISH_USE_WIDE_AREA|AVAHI_PUBLISH_USE_MULTICAST), AVAHI_ERR_INVALID_FLAGS);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(s, type == AVAHI_DNS_SERVER_UPDATE || type == AVAHI_DNS_SERVER_RESOLVE, AVAHI_ERR_INVALID_FLAGS);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(s, port != 0, AVAHI_ERR_INVALID_PORT);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(s, avahi_is_valid_fqdn(name), AVAHI_ERR_INVALID_HOST_NAME);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(s, !domain || avahi_is_valid_domain_name(domain), AVAHI_ERR_INVALID_DOMAIN_NAME);
+
+    if (!domain)
+        domain = s->domain_name;
+
+    transport_flags_from_domain(s, &flags, domain);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(s, flags & AVAHI_PUBLISH_USE_MULTICAST, AVAHI_ERR_NOT_SUPPORTED);
+
+    if (!(n = avahi_normalize_name_strdup(name))) {
+        avahi_server_set_errno(s, AVAHI_ERR_NO_MEMORY);
+        return NULL;
+    }
+
+    AVAHI_ASSERT_TRUE(avahi_normalize_name(domain, normalized_d, sizeof(normalized_d)));
+
+    snprintf(t, sizeof(t), "%s.%s", type == AVAHI_DNS_SERVER_RESOLVE ? "_domain._udp" : "_dns-update._udp", normalized_d);
+
+    if (!(r = avahi_record_new_full(t, AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_SRV, AVAHI_DEFAULT_TTL_HOST_NAME))) {
+        avahi_server_set_errno(s, AVAHI_ERR_NO_MEMORY);
+        avahi_free(n);
+        return NULL;
+    }
+
+    r->data.srv.priority = 0;
+    r->data.srv.weight = 0;
+    r->data.srv.port = port;
+    r->data.srv.name = n;
+    e = server_add_internal(s, g, interface, protocol, 0, r);
+    avahi_record_unref(r);
+
+    return e;
+}
+
+int avahi_server_add_dns_server_address(
+    AvahiServer *s,
+    AvahiSEntryGroup *g,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiPublishFlags flags,
+    const char *domain,
+    AvahiDNSServerType type,
+    const AvahiAddress *address,
+    uint16_t port /** should be 53 */) {
+
+    AvahiRecord *r;
+    char n[64], h[64];
+    AvahiEntry *a_entry, *s_entry;
+
+    assert(s);
+    assert(address);
+
+    AVAHI_CHECK_VALIDITY(s, AVAHI_IF_VALID(interface), AVAHI_ERR_INVALID_INTERFACE);
+    AVAHI_CHECK_VALIDITY(s, AVAHI_PROTO_VALID(protocol) && AVAHI_PROTO_VALID(address->proto), AVAHI_ERR_INVALID_PROTOCOL);
+    AVAHI_CHECK_VALIDITY(s, AVAHI_FLAGS_VALID(flags, AVAHI_PUBLISH_USE_MULTICAST|AVAHI_PUBLISH_USE_WIDE_AREA), AVAHI_ERR_INVALID_FLAGS);
+    AVAHI_CHECK_VALIDITY(s, type == AVAHI_DNS_SERVER_UPDATE || type == AVAHI_DNS_SERVER_RESOLVE, AVAHI_ERR_INVALID_FLAGS);
+    AVAHI_CHECK_VALIDITY(s, port != 0, AVAHI_ERR_INVALID_PORT);
+    AVAHI_CHECK_VALIDITY(s, !domain || avahi_is_valid_domain_name(domain), AVAHI_ERR_INVALID_DOMAIN_NAME);
+
+    if (!domain)
+        domain = s->domain_name;
+
+    transport_flags_from_domain(s, &flags, domain);
+    AVAHI_CHECK_VALIDITY(s, flags & AVAHI_PUBLISH_USE_MULTICAST, AVAHI_ERR_NOT_SUPPORTED);
+
+    if (address->proto == AVAHI_PROTO_INET) {
+        hexstring(h, sizeof(h), &address->data, sizeof(AvahiIPv4Address));
+        snprintf(n, sizeof(n), "ip-%s.%s", h, domain);
+        r = avahi_record_new_full(n, AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_A, AVAHI_DEFAULT_TTL_HOST_NAME);
+        r->data.a.address = address->data.ipv4;
+    } else {
+        hexstring(h, sizeof(h), &address->data, sizeof(AvahiIPv6Address));
+        snprintf(n, sizeof(n), "ip6-%s.%s", h, domain);
+        r = avahi_record_new_full(n, AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_AAAA, AVAHI_DEFAULT_TTL_HOST_NAME);
+        r->data.aaaa.address = address->data.ipv6;
+    }
+
+    if (!r)
+        return avahi_server_set_errno(s, AVAHI_ERR_NO_MEMORY);
+
+    a_entry = server_add_internal(s, g, interface, protocol, AVAHI_PUBLISH_UNIQUE | AVAHI_PUBLISH_ALLOW_MULTIPLE, r);
+    avahi_record_unref(r);
+
+    if (!a_entry)
+        return avahi_server_errno(s);
+
+    if (!(s_entry = server_add_dns_server_name(s, g, interface, protocol, flags, domain, type, n, port))) {
+        if (!(flags & AVAHI_PUBLISH_UPDATE))
+            avahi_entry_free(s, a_entry);
+        return avahi_server_errno(s);
+    }
+
+    return AVAHI_OK;
+}
+
+void avahi_s_entry_group_change_state(AvahiSEntryGroup *g, AvahiEntryGroupState state) {
+    assert(g);
+
+    if (g->state == state)
+        return;
+
+    assert(state <= AVAHI_ENTRY_GROUP_COLLISION);
+
+    if (g->state == AVAHI_ENTRY_GROUP_ESTABLISHED) {
+
+        /* If the entry group was established for a time longer then
+         * 5s, reset the establishment trial counter */
+
+        if (avahi_age(&g->established_at) > 5000000)
+            g->n_register_try = 0;
+    } else if (g->state == AVAHI_ENTRY_GROUP_REGISTERING) {
+        if (g->register_time_event) {
+            avahi_time_event_free(g->register_time_event);
+            g->register_time_event = NULL;
+        }
+    }
+
+    if (state == AVAHI_ENTRY_GROUP_ESTABLISHED)
+
+        /* If the entry group is now established, remember the time
+         * this happened */
+
+        gettimeofday(&g->established_at, NULL);
+
+    g->state = state;
+
+    if (g->callback)
+        g->callback(g->server, g, state, g->userdata);
+}
+
+AvahiSEntryGroup *avahi_s_entry_group_new(AvahiServer *s, AvahiSEntryGroupCallback callback, void* userdata) {
+    AvahiSEntryGroup *g;
+
+    assert(s);
+
+    if (!(g = avahi_new(AvahiSEntryGroup, 1))) {
+        avahi_server_set_errno(s, AVAHI_ERR_NO_MEMORY);
+        return NULL;
+    }
+
+    g->server = s;
+    g->callback = callback;
+    g->userdata = userdata;
+    g->dead = 0;
+    g->state = AVAHI_ENTRY_GROUP_UNCOMMITED;
+    g->n_probing = 0;
+    g->n_register_try = 0;
+    g->register_time_event = NULL;
+    g->register_time.tv_sec = 0;
+    g->register_time.tv_usec = 0;
+    AVAHI_LLIST_HEAD_INIT(AvahiEntry, g->entries);
+
+    AVAHI_LLIST_PREPEND(AvahiSEntryGroup, groups, s->groups, g);
+    return g;
+}
+
+static void cleanup_time_event_callback(AVAHI_GCC_UNUSED AvahiTimeEvent *e, void* userdata) {
+    AvahiServer *s = userdata;
+
+    assert(s);
+
+    avahi_cleanup_dead_entries(s);
+}
+
+static void schedule_cleanup(AvahiServer *s) {
+    struct timeval tv;
+
+    assert(s);
+
+    if (!s->cleanup_time_event)
+        s->cleanup_time_event = avahi_time_event_new(s->time_event_queue, avahi_elapse_time(&tv, 1000, 0), &cleanup_time_event_callback, s);
+}
+
+void avahi_s_entry_group_free(AvahiSEntryGroup *g) {
+    AvahiEntry *e;
+
+    assert(g);
+    assert(g->server);
+
+    for (e = g->entries; e; e = e->by_group_next) {
+        if (!e->dead) {
+            avahi_goodbye_entry(g->server, e, 1, 1);
+            e->dead = 1;
+        }
+    }
+
+    if (g->register_time_event) {
+        avahi_time_event_free(g->register_time_event);
+        g->register_time_event = NULL;
+    }
+
+    g->dead = 1;
+
+    g->server->need_group_cleanup = 1;
+    g->server->need_entry_cleanup = 1;
+
+    schedule_cleanup(g->server);
+}
+
+static void entry_group_commit_real(AvahiSEntryGroup *g) {
+    assert(g);
+
+    gettimeofday(&g->register_time, NULL);
+
+    avahi_s_entry_group_change_state(g, AVAHI_ENTRY_GROUP_REGISTERING);
+
+    if (g->dead)
+        return;
+
+    avahi_announce_group(g->server, g);
+    avahi_s_entry_group_check_probed(g, 0);
+}
+
+static void entry_group_register_time_event_callback(AVAHI_GCC_UNUSED AvahiTimeEvent *e, void* userdata) {
+    AvahiSEntryGroup *g = userdata;
+    assert(g);
+
+    avahi_time_event_free(g->register_time_event);
+    g->register_time_event = NULL;
+
+    /* Holdoff time passed, so let's start probing */
+    entry_group_commit_real(g);
+}
+
+int avahi_s_entry_group_commit(AvahiSEntryGroup *g) {
+    struct timeval now;
+
+    assert(g);
+    assert(!g->dead);
+
+    if (g->state != AVAHI_ENTRY_GROUP_UNCOMMITED && g->state != AVAHI_ENTRY_GROUP_COLLISION)
+        return avahi_server_set_errno(g->server, AVAHI_ERR_BAD_STATE);
+
+    if (avahi_s_entry_group_is_empty(g))
+        return avahi_server_set_errno(g->server, AVAHI_ERR_IS_EMPTY);
+
+    g->n_register_try++;
+
+    avahi_timeval_add(&g->register_time,
+                      1000*(g->n_register_try >= AVAHI_RR_RATE_LIMIT_COUNT ?
+                            AVAHI_RR_HOLDOFF_MSEC_RATE_LIMIT :
+                            AVAHI_RR_HOLDOFF_MSEC));
+
+    gettimeofday(&now, NULL);
+
+    if (avahi_timeval_compare(&g->register_time, &now) <= 0) {
+
+        /* Holdoff time passed, so let's start probing */
+        entry_group_commit_real(g);
+    } else {
+
+         /* Holdoff time has not yet passed, so let's wait */
+        assert(!g->register_time_event);
+        g->register_time_event = avahi_time_event_new(g->server->time_event_queue, &g->register_time, entry_group_register_time_event_callback, g);
+
+        avahi_s_entry_group_change_state(g, AVAHI_ENTRY_GROUP_REGISTERING);
+    }
+
+    return AVAHI_OK;
+}
+
+void avahi_s_entry_group_reset(AvahiSEntryGroup *g) {
+    AvahiEntry *e;
+    assert(g);
+
+    for (e = g->entries; e; e = e->by_group_next) {
+        if (!e->dead) {
+            avahi_goodbye_entry(g->server, e, 1, 1);
+            e->dead = 1;
+        }
+    }
+    g->server->need_entry_cleanup = 1;
+
+    g->n_probing = 0;
+
+    avahi_s_entry_group_change_state(g, AVAHI_ENTRY_GROUP_UNCOMMITED);
+
+    schedule_cleanup(g->server);
+}
+
+int avahi_entry_is_commited(AvahiEntry *e) {
+    assert(e);
+    assert(!e->dead);
+
+    return !e->group ||
+        e->group->state == AVAHI_ENTRY_GROUP_REGISTERING ||
+        e->group->state == AVAHI_ENTRY_GROUP_ESTABLISHED;
+}
+
+AvahiEntryGroupState avahi_s_entry_group_get_state(AvahiSEntryGroup *g) {
+    assert(g);
+    assert(!g->dead);
+
+    return g->state;
+}
+
+void avahi_s_entry_group_set_data(AvahiSEntryGroup *g, void* userdata) {
+    assert(g);
+
+    g->userdata = userdata;
+}
+
+void* avahi_s_entry_group_get_data(AvahiSEntryGroup *g) {
+    assert(g);
+
+    return g->userdata;
+}
+
+int avahi_s_entry_group_is_empty(AvahiSEntryGroup *g) {
+    AvahiEntry *e;
+    assert(g);
+
+    /* Look for an entry that is not dead */
+    for (e = g->entries; e; e = e->by_group_next)
+        if (!e->dead)
+            return 0;
+
+    return 1;
+}
diff --git a/avahi-0.6.31/avahi-core/fdutil.c b/avahi-0.6.31/avahi-core/fdutil.c
new file mode 100644
index 0000000..c294754
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/fdutil.c
@@ -0,0 +1,72 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <sys/select.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <assert.h>
+
+#include "fdutil.h"
+
+int avahi_set_cloexec(int fd) {
+    int n;
+
+    assert(fd >= 0);
+
+    if ((n = fcntl(fd, F_GETFD)) < 0)
+        return -1;
+
+    if (n & FD_CLOEXEC)
+        return 0;
+
+    return fcntl(fd, F_SETFD, n|FD_CLOEXEC);
+}
+
+int avahi_set_nonblock(int fd) {
+    int n;
+
+    assert(fd >= 0);
+
+    if ((n = fcntl(fd, F_GETFL)) < 0)
+        return -1;
+
+    if (n & O_NONBLOCK)
+        return 0;
+
+    return fcntl(fd, F_SETFL, n|O_NONBLOCK);
+}
+
+int avahi_wait_for_write(int fd) {
+    fd_set fds;
+    int r;
+
+    FD_ZERO(&fds);
+    FD_SET(fd, &fds);
+
+    if ((r = select(fd+1, NULL, &fds, NULL, NULL)) < 0)
+        return -1;
+
+    assert(r > 0);
+
+    return 0;
+}
diff --git a/avahi-0.6.31/avahi-core/fdutil.h b/avahi-0.6.31/avahi-core/fdutil.h
new file mode 100644
index 0000000..68607f8
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/fdutil.h
@@ -0,0 +1,33 @@
+#ifndef foofdutilhfoo
+#define foofdutilhfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#include <avahi-common/cdecl.h>
+
+AVAHI_C_DECL_BEGIN
+
+int avahi_set_cloexec(int fd);
+int avahi_set_nonblock(int fd);
+int avahi_wait_for_write(int fd);
+
+AVAHI_C_DECL_END
+
+#endif
diff --git a/avahi-0.6.31/avahi-core/hashmap-test.c b/avahi-0.6.31/avahi-core/hashmap-test.c
new file mode 100644
index 0000000..209d0e5
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/hashmap-test.c
@@ -0,0 +1,62 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+
+#include <avahi-common/domain.h>
+#include <avahi-common/malloc.h>
+
+#include "hashmap.h"
+#include "util.h"
+
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
+    unsigned n;
+    AvahiHashmap *m;
+    const char *t;
+
+    m = avahi_hashmap_new(avahi_string_hash, avahi_string_equal, avahi_free, avahi_free);
+
+    avahi_hashmap_insert(m, avahi_strdup("bla"), avahi_strdup("#1"));
+    avahi_hashmap_insert(m, avahi_strdup("bla2"), avahi_strdup("asdf"));
+    avahi_hashmap_insert(m, avahi_strdup("gurke"), avahi_strdup("ffsdf"));
+    avahi_hashmap_insert(m, avahi_strdup("blubb"), avahi_strdup("sadfsd"));
+    avahi_hashmap_insert(m, avahi_strdup("bla"), avahi_strdup("#2"));
+
+    for (n = 0; n < 1000; n ++)
+        avahi_hashmap_insert(m, avahi_strdup_printf("key %u", n), avahi_strdup_printf("value %u", n));
+
+    printf("%s\n", (const char*) avahi_hashmap_lookup(m, "bla"));
+
+    avahi_hashmap_replace(m, avahi_strdup("bla"), avahi_strdup("#3"));
+
+    printf("%s\n", (const char*) avahi_hashmap_lookup(m, "bla"));
+
+    avahi_hashmap_remove(m, "bla");
+
+    t = (const char*) avahi_hashmap_lookup(m, "bla");
+    printf("%s\n", t ? t : "(null)");
+
+    avahi_hashmap_free(m);
+
+    return 0;
+}
diff --git a/avahi-0.6.31/avahi-core/hashmap.c b/avahi-0.6.31/avahi-core/hashmap.c
new file mode 100644
index 0000000..9b55bd3
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/hashmap.c
@@ -0,0 +1,248 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+
+#include <avahi-common/llist.h>
+#include <avahi-common/domain.h>
+#include <avahi-common/malloc.h>
+
+#include "hashmap.h"
+#include "util.h"
+
+#define HASH_MAP_SIZE 123
+
+typedef struct Entry Entry;
+struct Entry {
+    AvahiHashmap *hashmap;
+    void *key;
+    void *value;
+
+    AVAHI_LLIST_FIELDS(Entry, bucket);
+    AVAHI_LLIST_FIELDS(Entry, entries);
+};
+
+struct AvahiHashmap {
+    AvahiHashFunc hash_func;
+    AvahiEqualFunc equal_func;
+    AvahiFreeFunc key_free_func, value_free_func;
+
+    Entry *entries[HASH_MAP_SIZE];
+    AVAHI_LLIST_HEAD(Entry, entries_list);
+};
+
+static Entry* entry_get(AvahiHashmap *m, const void *key) {
+    unsigned idx;
+    Entry *e;
+
+    idx = m->hash_func(key) % HASH_MAP_SIZE;
+
+    for (e = m->entries[idx]; e; e = e->bucket_next)
+        if (m->equal_func(key, e->key))
+            return e;
+
+    return NULL;
+}
+
+static void entry_free(AvahiHashmap *m, Entry *e, int stolen) {
+    unsigned idx;
+    assert(m);
+    assert(e);
+
+    idx = m->hash_func(e->key) % HASH_MAP_SIZE;
+
+    AVAHI_LLIST_REMOVE(Entry, bucket, m->entries[idx], e);
+    AVAHI_LLIST_REMOVE(Entry, entries, m->entries_list, e);
+
+    if (m->key_free_func)
+        m->key_free_func(e->key);
+    if (m->value_free_func && !stolen)
+        m->value_free_func(e->value);
+
+    avahi_free(e);
+}
+
+AvahiHashmap* avahi_hashmap_new(AvahiHashFunc hash_func, AvahiEqualFunc equal_func, AvahiFreeFunc key_free_func, AvahiFreeFunc value_free_func) {
+    AvahiHashmap *m;
+
+    assert(hash_func);
+    assert(equal_func);
+
+    if (!(m = avahi_new0(AvahiHashmap, 1)))
+        return NULL;
+
+    m->hash_func = hash_func;
+    m->equal_func = equal_func;
+    m->key_free_func = key_free_func;
+    m->value_free_func = value_free_func;
+
+    AVAHI_LLIST_HEAD_INIT(Entry, m->entries_list);
+
+    return m;
+}
+
+void avahi_hashmap_free(AvahiHashmap *m) {
+    assert(m);
+
+    while (m->entries_list)
+        entry_free(m, m->entries_list, 0);
+
+    avahi_free(m);
+}
+
+void* avahi_hashmap_lookup(AvahiHashmap *m, const void *key) {
+    Entry *e;
+
+    assert(m);
+
+    if (!(e = entry_get(m, key)))
+        return NULL;
+
+    return e->value;
+}
+
+int avahi_hashmap_insert(AvahiHashmap *m, void *key, void *value) {
+    unsigned idx;
+    Entry *e;
+
+    assert(m);
+
+    if ((e = entry_get(m, key))) {
+        if (m->key_free_func)
+            m->key_free_func(key);
+        if (m->value_free_func)
+            m->value_free_func(value);
+
+        return 1;
+    }
+
+    if (!(e = avahi_new(Entry, 1)))
+        return -1;
+
+    e->hashmap = m;
+    e->key = key;
+    e->value = value;
+
+    AVAHI_LLIST_PREPEND(Entry, entries, m->entries_list, e);
+
+    idx = m->hash_func(key) % HASH_MAP_SIZE;
+    AVAHI_LLIST_PREPEND(Entry, bucket, m->entries[idx], e);
+
+    return 0;
+}
+
+
+int avahi_hashmap_replace(AvahiHashmap *m, void *key, void *value) {
+    unsigned idx;
+    Entry *e;
+
+    assert(m);
+
+    if ((e = entry_get(m, key))) {
+        if (m->key_free_func)
+            m->key_free_func(e->key);
+        if (m->value_free_func)
+            m->value_free_func(e->value);
+
+        e->key = key;
+        e->value = value;
+
+        return 1;
+    }
+
+    if (!(e = avahi_new(Entry, 1)))
+        return -1;
+
+    e->hashmap = m;
+    e->key = key;
+    e->value = value;
+
+    AVAHI_LLIST_PREPEND(Entry, entries, m->entries_list, e);
+
+    idx = m->hash_func(key) % HASH_MAP_SIZE;
+    AVAHI_LLIST_PREPEND(Entry, bucket, m->entries[idx], e);
+
+    return 0;
+}
+
+void avahi_hashmap_remove(AvahiHashmap *m, const void *key) {
+    Entry *e;
+
+    assert(m);
+
+    if (!(e = entry_get(m, key)))
+        return;
+
+    entry_free(m, e, 0);
+}
+
+void avahi_hashmap_foreach(AvahiHashmap *m, AvahiHashmapForeachCallback callback, void *userdata) {
+    Entry *e, *next;
+    assert(m);
+    assert(callback);
+
+    for (e = m->entries_list; e; e = next) {
+        next = e->entries_next;
+
+        callback(e->key, e->value, userdata);
+    }
+}
+
+unsigned avahi_string_hash(const void *data) {
+    const char *p = data;
+    unsigned hash = 0;
+
+    assert(p);
+
+    for (; *p; p++)
+        hash = 31 * hash + *p;
+
+    return hash;
+}
+
+int avahi_string_equal(const void *a, const void *b) {
+    const char *p = a, *q = b;
+
+    assert(p);
+    assert(q);
+
+    return strcmp(p, q) == 0;
+}
+
+unsigned avahi_int_hash(const void *data) {
+    const int *i = data;
+
+    assert(i);
+
+    return (unsigned) *i;
+}
+
+int avahi_int_equal(const void *a, const void *b) {
+    const int *_a = a, *_b = b;
+
+    assert(_a);
+    assert(_b);
+
+    return *_a == *_b;
+}
diff --git a/avahi-0.6.31/avahi-core/hashmap.h b/avahi-0.6.31/avahi-core/hashmap.h
new file mode 100644
index 0000000..9d7e81f
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/hashmap.h
@@ -0,0 +1,53 @@
+#ifndef foohashmaphfoo
+#define foohashmaphfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#include <avahi-common/cdecl.h>
+
+AVAHI_C_DECL_BEGIN
+
+typedef struct AvahiHashmap AvahiHashmap;
+
+typedef unsigned (*AvahiHashFunc)(const void *data);
+typedef int (*AvahiEqualFunc)(const void *a, const void *b);
+typedef void (*AvahiFreeFunc)(void *p);
+
+AvahiHashmap* avahi_hashmap_new(AvahiHashFunc hash_func, AvahiEqualFunc equal_func, AvahiFreeFunc key_free_func, AvahiFreeFunc value_free_func);
+
+void avahi_hashmap_free(AvahiHashmap *m);
+void* avahi_hashmap_lookup(AvahiHashmap *m, const void *key);
+int avahi_hashmap_insert(AvahiHashmap *m, void *key, void *value);
+int avahi_hashmap_replace(AvahiHashmap *m, void *key, void *value);
+void avahi_hashmap_remove(AvahiHashmap *m, const void *key);
+
+typedef void (*AvahiHashmapForeachCallback)(void *key, void *value, void *userdata);
+
+void avahi_hashmap_foreach(AvahiHashmap *m, AvahiHashmapForeachCallback callback, void *userdata);
+
+unsigned avahi_string_hash(const void *data);
+int avahi_string_equal(const void *a, const void *b);
+
+unsigned avahi_int_hash(const void *data);
+int avahi_int_equal(const void *a, const void *b);
+
+AVAHI_C_DECL_END
+
+#endif
diff --git a/avahi-0.6.31/avahi-core/iface-linux.c b/avahi-0.6.31/avahi-core/iface-linux.c
new file mode 100644
index 0000000..da497bc
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/iface-linux.c
@@ -0,0 +1,391 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+#include <net/if.h>
+#include <errno.h>
+#include <string.h>
+
+#include <avahi-common/malloc.h>
+
+#include "log.h"
+#include "iface.h"
+#include "iface-linux.h"
+
+#ifndef IFLA_RTA
+#include <linux/if_addr.h>
+#define IFLA_RTA(r)  ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg))))
+#endif
+
+#ifndef IFA_RTA
+#include <linux/if_addr.h>
+#define IFA_RTA(r)  ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg))))
+#endif
+
+static int netlink_list_items(AvahiNetlink *nl, uint16_t type, unsigned *ret_seq) {
+    struct nlmsghdr *n;
+    struct rtgenmsg *gen;
+    uint8_t req[1024];
+
+    /* Issue a wild dump NETLINK request */
+
+    memset(&req, 0, sizeof(req));
+    n = (struct nlmsghdr*) req;
+    n->nlmsg_len = NLMSG_LENGTH(sizeof(struct rtgenmsg));
+    n->nlmsg_type = type;
+    n->nlmsg_flags = NLM_F_REQUEST|NLM_F_DUMP;
+    n->nlmsg_pid = 0;
+
+    gen = NLMSG_DATA(n);
+    memset(gen, 0, sizeof(struct rtgenmsg));
+    gen->rtgen_family = AF_UNSPEC;
+
+    return avahi_netlink_send(nl, n, ret_seq);
+}
+
+static void netlink_callback(AvahiNetlink *nl, struct nlmsghdr *n, void* userdata) {
+    AvahiInterfaceMonitor *m = userdata;
+
+    /* This routine is called for every RTNETLINK response packet */
+
+    assert(m);
+    assert(n);
+    assert(m->osdep.netlink == nl);
+
+    if (n->nlmsg_type == RTM_NEWLINK) {
+
+        /* A new interface appeared or an existing one has been modified */
+
+        struct ifinfomsg *ifinfomsg = NLMSG_DATA(n);
+        AvahiHwInterface *hw;
+        struct rtattr *a = NULL;
+        size_t l;
+
+        /* A (superfluous?) sanity check */
+        if (ifinfomsg->ifi_family != AF_UNSPEC)
+            return;
+
+        /* Check whether there already is an AvahiHwInterface object
+         * for this link, so that we can update its data. Note that
+         * Netlink sends us an RTM_NEWLINK not only when a new
+         * interface appears, but when it changes, too */
+
+        if (!(hw = avahi_interface_monitor_get_hw_interface(m, ifinfomsg->ifi_index)))
+
+            /* No object found, so let's create a new
+             * one. avahi_hw_interface_new() will call
+             * avahi_interface_new() internally twice for IPv4 and
+             * IPv6, so there is no need for us to do that
+             * ourselves */
+            if (!(hw = avahi_hw_interface_new(m, (AvahiIfIndex) ifinfomsg->ifi_index)))
+                return; /* OOM */
+
+        /* Check whether the flags of this interface are OK for us */
+        hw->flags_ok =
+            (ifinfomsg->ifi_flags & IFF_UP) &&
+            (!m->server->config.use_iff_running || (ifinfomsg->ifi_flags & IFF_RUNNING)) &&
+            !(ifinfomsg->ifi_flags & IFF_LOOPBACK) &&
+            (ifinfomsg->ifi_flags & IFF_MULTICAST) &&
+            (m->server->config.allow_point_to_point || !(ifinfomsg->ifi_flags & IFF_POINTOPOINT));
+
+        /* Handle interface attributes */
+        l = NLMSG_PAYLOAD(n, sizeof(struct ifinfomsg));
+        a = IFLA_RTA(ifinfomsg);
+
+        while (RTA_OK(a, l)) {
+            switch(a->rta_type) {
+                case IFLA_IFNAME:
+
+                    /* Fill in interface name */
+                    avahi_free(hw->name);
+                    hw->name = avahi_strndup(RTA_DATA(a), RTA_PAYLOAD(a));
+                    break;
+
+                case IFLA_MTU:
+
+                    /* Fill in MTU */
+                    assert(RTA_PAYLOAD(a) == sizeof(unsigned int));
+                    hw->mtu = *((unsigned int*) RTA_DATA(a));
+                    break;
+
+                case IFLA_ADDRESS:
+
+                    /* Fill in hardware (MAC) address */
+                    hw->mac_address_size = RTA_PAYLOAD(a);
+                    if (hw->mac_address_size > AVAHI_MAC_ADDRESS_MAX)
+                        hw->mac_address_size = AVAHI_MAC_ADDRESS_MAX;
+
+                    memcpy(hw->mac_address, RTA_DATA(a), hw->mac_address_size);
+                    break;
+
+                default:
+                    ;
+            }
+
+            a = RTA_NEXT(a, l);
+        }
+
+        /* Check whether this interface is now "relevant" for us. If
+         * it is Avahi will start to announce its records on this
+         * interface and send out queries for subscribed records on
+         * it */
+        avahi_hw_interface_check_relevant(hw);
+
+        /* Update any associated RRs of this interface. (i.e. the
+         * _workstation._tcp record containing the MAC address) */
+        avahi_hw_interface_update_rrs(hw, 0);
+
+    } else if (n->nlmsg_type == RTM_DELLINK) {
+
+        /* An interface has been removed */
+
+        struct ifinfomsg *ifinfomsg = NLMSG_DATA(n);
+        AvahiHwInterface *hw;
+
+        /* A (superfluous?) sanity check */
+        if (ifinfomsg->ifi_family != AF_UNSPEC)
+            return;
+
+        /* Get a reference to our AvahiHwInterface object of this interface */
+        if (!(hw = avahi_interface_monitor_get_hw_interface(m, (AvahiIfIndex) ifinfomsg->ifi_index)))
+            return;
+
+        /* Free our object */
+        avahi_hw_interface_free(hw, 0);
+
+    } else if (n->nlmsg_type == RTM_NEWADDR || n->nlmsg_type == RTM_DELADDR) {
+
+        /* An address has been added, modified or removed */
+
+        struct ifaddrmsg *ifaddrmsg = NLMSG_DATA(n);
+        AvahiInterface *i;
+        struct rtattr *a = NULL;
+        size_t l;
+        AvahiAddress raddr, rlocal, *r;
+        int raddr_valid = 0, rlocal_valid = 0;
+
+        /* We are only interested in IPv4 and IPv6 */
+        if (ifaddrmsg->ifa_family != AF_INET && ifaddrmsg->ifa_family != AF_INET6)
+            return;
+
+        /* Try to get a reference to our AvahiInterface object for the
+         * interface this address is assigned to. If ther is no object
+         * for this interface, we ignore this address. */
+        if (!(i = avahi_interface_monitor_get_interface(m, (AvahiIfIndex) ifaddrmsg->ifa_index, avahi_af_to_proto(ifaddrmsg->ifa_family))))
+            return;
+
+        /* Fill in address family for our new address */
+        rlocal.proto = raddr.proto = avahi_af_to_proto(ifaddrmsg->ifa_family);
+
+        l = NLMSG_PAYLOAD(n, sizeof(struct ifaddrmsg));
+        a = IFA_RTA(ifaddrmsg);
+
+        while (RTA_OK(a, l)) {
+
+            switch(a->rta_type) {
+
+                case IFA_ADDRESS:
+
+                    if ((rlocal.proto == AVAHI_PROTO_INET6 && RTA_PAYLOAD(a) != 16) ||
+                        (rlocal.proto == AVAHI_PROTO_INET && RTA_PAYLOAD(a) != 4))
+                        return;
+
+                    memcpy(rlocal.data.data, RTA_DATA(a), RTA_PAYLOAD(a));
+                    rlocal_valid = 1;
+
+                    break;
+
+                case IFA_LOCAL:
+
+                    /* Fill in local address data. Usually this is
+                     * preferable over IFA_ADDRESS if both are set,
+                     * since this refers to the local address of a PPP
+                     * link while IFA_ADDRESS refers to the other
+                     * end. */
+
+                    if ((raddr.proto == AVAHI_PROTO_INET6 && RTA_PAYLOAD(a) != 16) ||
+                        (raddr.proto == AVAHI_PROTO_INET && RTA_PAYLOAD(a) != 4))
+                        return;
+
+                    memcpy(raddr.data.data, RTA_DATA(a), RTA_PAYLOAD(a));
+                    raddr_valid = 1;
+
+                    break;
+
+                default:
+                    ;
+            }
+
+            a = RTA_NEXT(a, l);
+        }
+
+        /* If there was no adress attached to this message, let's quit. */
+        if (rlocal_valid)
+            r = &rlocal;
+        else if (raddr_valid)
+            r = &raddr;
+        else
+            return;
+
+        if (n->nlmsg_type == RTM_NEWADDR) {
+            AvahiInterfaceAddress *addr;
+
+            /* This address is new or has been modified, so let's get an object for it */
+            if (!(addr = avahi_interface_monitor_get_address(m, i, r)))
+
+                /* Mmm, no object existing yet, so let's create a new one */
+                if (!(addr = avahi_interface_address_new(m, i, r, ifaddrmsg->ifa_prefixlen)))
+                    return; /* OOM */
+
+            /* Update the scope field for the address */
+            addr->global_scope = ifaddrmsg->ifa_scope == RT_SCOPE_UNIVERSE || ifaddrmsg->ifa_scope == RT_SCOPE_SITE;
+            addr->deprecated = !!(ifaddrmsg->ifa_flags & IFA_F_DEPRECATED);
+        } else {
+            AvahiInterfaceAddress *addr;
+            assert(n->nlmsg_type == RTM_DELADDR);
+
+            /* Try to get a reference to our AvahiInterfaceAddress object for this address */
+            if (!(addr = avahi_interface_monitor_get_address(m, i, r)))
+                return;
+
+            /* And free it */
+            avahi_interface_address_free(addr);
+        }
+
+        /* Avahi only considers interfaces with at least one address
+         * attached relevant. Since we migh have added or removed an
+         * address, let's have it check again whether the interface is
+         * now relevant */
+        avahi_interface_check_relevant(i);
+
+        /* Update any associated RRs, like A or AAAA for our new/removed address */
+        avahi_interface_update_rrs(i, 0);
+
+    } else if (n->nlmsg_type == NLMSG_DONE) {
+
+        /* This wild dump request ended, so let's see what we do next */
+
+        if (m->osdep.list == LIST_IFACE) {
+
+            /* Mmmm, interfaces have been wild dumped already, so
+             * let's go on with wild dumping the addresses */
+
+            if (netlink_list_items(m->osdep.netlink, RTM_GETADDR, &m->osdep.query_addr_seq) < 0) {
+                avahi_log_warn("NETLINK: Failed to list addrs: %s", strerror(errno));
+                m->osdep.list = LIST_DONE;
+            } else
+
+                /* Update state information */
+                m->osdep.list = LIST_ADDR;
+
+        } else
+            /* We're done. Tell avahi_interface_monitor_sync() to finish. */
+            m->osdep.list = LIST_DONE;
+
+        if (m->osdep.list == LIST_DONE) {
+
+            /* Only after this boolean variable has been set, Avahi
+             * will start to announce or browse on all interfaces. It
+             * is originaly set to 0, which means that relevancy
+             * checks and RR updates are disabled during the wild
+             * dumps. */
+            m->list_complete = 1;
+
+            /* So let's check if any interfaces are relevant now */
+            avahi_interface_monitor_check_relevant(m);
+
+            /* And update all RRs attached to any interface */
+            avahi_interface_monitor_update_rrs(m, 0);
+
+            /* Tell the user that the wild dump is complete */
+            avahi_log_info("Network interface enumeration completed.");
+        }
+
+    } else if (n->nlmsg_type == NLMSG_ERROR &&
+               (n->nlmsg_seq == m->osdep.query_link_seq || n->nlmsg_seq == m->osdep.query_addr_seq)) {
+        struct nlmsgerr *e = NLMSG_DATA (n);
+
+        /* Some kind of error happened. Let's just tell the user and
+         * ignore it otherwise */
+
+        if (e->error)
+            avahi_log_warn("NETLINK: Failed to browse: %s", strerror(-e->error));
+    }
+}
+
+int avahi_interface_monitor_init_osdep(AvahiInterfaceMonitor *m) {
+    assert(m);
+
+    /* Initialize our own data */
+
+    m->osdep.netlink = NULL;
+    m->osdep.query_addr_seq = m->osdep.query_link_seq = 0;
+
+    /* Create a netlink object for us. It abstracts some things and
+     * makes netlink easier to use. It will attach to the main loop
+     * for us and call netlink_callback() whenever an event
+     * happens. */
+    if (!(m->osdep.netlink = avahi_netlink_new(m->server->poll_api, RTMGRP_LINK|RTMGRP_IPV4_IFADDR|RTMGRP_IPV6_IFADDR, netlink_callback, m)))
+        goto fail;
+
+    /* Set the initial state. */
+    m->osdep.list = LIST_IFACE;
+
+    /* Start the wild dump for the interfaces */
+    if (netlink_list_items(m->osdep.netlink, RTM_GETLINK, &m->osdep.query_link_seq) < 0)
+        goto fail;
+
+    return 0;
+
+fail:
+
+    if (m->osdep.netlink) {
+        avahi_netlink_free(m->osdep.netlink);
+        m->osdep.netlink = NULL;
+    }
+
+    return -1;
+}
+
+void avahi_interface_monitor_free_osdep(AvahiInterfaceMonitor *m) {
+    assert(m);
+
+    if (m->osdep.netlink) {
+        avahi_netlink_free(m->osdep.netlink);
+        m->osdep.netlink = NULL;
+    }
+}
+
+void avahi_interface_monitor_sync(AvahiInterfaceMonitor *m) {
+    assert(m);
+
+    /* Let's handle netlink events until we are done with wild
+     * dumping */
+
+    while (!m->list_complete)
+        if (!avahi_netlink_work(m->osdep.netlink, 1) == 0)
+            break;
+
+    /* At this point Avahi knows about all local interfaces and
+     * addresses in existance. */
+}
diff --git a/avahi-0.6.31/avahi-core/iface-linux.h b/avahi-0.6.31/avahi-core/iface-linux.h
new file mode 100644
index 0000000..677f86d
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/iface-linux.h
@@ -0,0 +1,40 @@
+#ifndef fooifacelinuxhfoo
+#define fooifacelinuxhfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+typedef struct AvahiInterfaceMonitorOSDep AvahiInterfaceMonitorOSDep;
+
+#include "netlink.h"
+
+struct AvahiInterfaceMonitorOSDep {
+    AvahiNetlink *netlink;
+
+    unsigned query_addr_seq, query_link_seq;
+
+    enum {
+        LIST_IFACE,
+        LIST_ADDR,
+        LIST_DONE
+    } list;
+};
+
+
+#endif
diff --git a/avahi-0.6.31/avahi-core/iface-none.c b/avahi-0.6.31/avahi-core/iface-none.c
new file mode 100644
index 0000000..715e497
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/iface-none.c
@@ -0,0 +1,30 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#include "iface.h"
+
+int avahi_interface_monitor_init_osdep(AvahiInterfaceMonitor *m) {
+    return 0;
+}
+
+void avahi_interface_monitor_free_osdep(AvahiInterfaceMonitor *m) {
+}
+
+void avahi_interface_monitor_sync(AvahiInterfaceMonitor *m) {
+}
diff --git a/avahi-0.6.31/avahi-core/iface-pfroute.c b/avahi-0.6.31/avahi-core/iface-pfroute.c
new file mode 100644
index 0000000..9a2e953
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/iface-pfroute.c
@@ -0,0 +1,543 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <avahi-common/malloc.h>
+
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/param.h>
+#ifdef HAVE_SYS_SYSCTL_H
+#include <sys/sysctl.h>
+#else
+#include <sys/sockio.h>
+#endif
+
+#include <net/route.h>
+#include <net/if.h>
+#include <net/if_dl.h>
+#include <netinet/in.h>
+
+#include "log.h"
+#include "iface.h"
+#include "iface-pfroute.h"
+#include "util.h"
+
+static int bitcount (unsigned int n)
+{
+  int count=0 ;
+  while (n)
+    {
+      count++ ;
+      n &= (n - 1) ;
+    }
+  return count ;
+}
+
+static void rtm_info(struct rt_msghdr *rtm, AvahiInterfaceMonitor *m)
+{
+  AvahiHwInterface *hw;
+  struct if_msghdr *ifm = (struct if_msghdr *)rtm;
+  struct sockaddr_dl *sdl = (struct sockaddr_dl *)(ifm + 1);
+
+  if (sdl->sdl_family != AF_LINK)
+    return;
+
+  if (ifm->ifm_addrs == 0 && ifm->ifm_index > 0) {
+    if (!(hw = avahi_interface_monitor_get_hw_interface(m, (AvahiIfIndex) ifm->ifm_index)))
+      return;
+    avahi_hw_interface_free(hw, 0);
+    return;
+  }
+
+  if (!(hw = avahi_interface_monitor_get_hw_interface(m, ifm->ifm_index)))
+    if (!(hw = avahi_hw_interface_new(m, (AvahiIfIndex) ifm->ifm_index)))
+      return; /* OOM */
+
+  hw->flags_ok =
+    (ifm->ifm_flags & IFF_UP) &&
+    (!m->server->config.use_iff_running || (ifm->ifm_flags & IFF_RUNNING)) &&
+    !(ifm->ifm_flags & IFF_LOOPBACK) &&
+    (ifm->ifm_flags & IFF_MULTICAST) &&
+    (m->server->config.allow_point_to_point || !(ifm->ifm_flags & IFF_POINTOPOINT));
+
+  avahi_free(hw->name);
+  hw->name = avahi_strndup(sdl->sdl_data, sdl->sdl_nlen);
+
+  hw->mtu = ifm->ifm_data.ifi_mtu;
+
+  hw->mac_address_size = sdl->sdl_alen;
+  if (hw->mac_address_size > AVAHI_MAC_ADDRESS_MAX)
+    hw->mac_address_size = AVAHI_MAC_ADDRESS_MAX;
+
+  memcpy(hw->mac_address, sdl->sdl_data + sdl->sdl_nlen, hw->mac_address_size);
+
+/*   { */
+/*     char mac[256]; */
+/*     avahi_log_debug("======\n name: %s\n index:%d\n mtu:%d\n mac:%s\n flags_ok:%d\n======",  */
+/* 		    hw->name, hw->index,  */
+/* 		    hw->mtu,  */
+/* 		    avahi_format_mac_address(mac, sizeof(mac), hw->mac_address, hw->mac_address_size), */
+/* 		    hw->flags_ok); */
+/*   } */
+
+  avahi_hw_interface_check_relevant(hw);
+  avahi_hw_interface_update_rrs(hw, 0);
+}
+
+#define ROUNDUP(a) \
+     ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long))
+#ifdef HAVE_SYS_SYSCTL_H
+#define ADVANCE(x, n) (x += ROUNDUP((n)->sa_len))
+#else
+#define ADVANCE(x, n) (x += ROUNDUP(sizeof(struct sockaddr)))
+#endif
+
+static void rtm_addr(struct rt_msghdr *rtm, AvahiInterfaceMonitor *m)
+{
+  AvahiInterface *iface;
+  AvahiAddress raddr;
+  int raddr_valid = 0;
+  struct ifa_msghdr *ifam = (struct ifa_msghdr *) rtm;
+  char *cp = (char *)(ifam + 1);
+  char *cp0;
+  int i;
+  int prefixlen = 0;
+  struct sockaddr *sa  =NULL;
+
+#if defined(__NetBSD__) || defined(__OpenBSD__)
+  if(((struct sockaddr *)cp)->sa_family == AF_UNSPEC)
+    ((struct sockaddr *)cp)->sa_family = AF_INET;
+#endif
+
+  for (cp0 = cp, i = 0; i < RTAX_MAX; i++) {
+    if (!(ifam->ifam_addrs & (1<<i)))
+      continue;
+    sa = (struct sockaddr *)cp;
+    if (i == RTAX_IFA)
+      break;
+#ifdef SA_SIZE
+    cp += SA_SIZE(sa);
+#else
+    ADVANCE(cp, sa);
+#endif
+  }
+
+  if(sa->sa_family != AF_INET && sa->sa_family != AF_INET6)
+    return;
+
+  if (!(iface = avahi_interface_monitor_get_interface(m, (AvahiIfIndex) ifam->ifam_index, avahi_af_to_proto(sa->sa_family))))
+    return;
+
+  raddr.proto = avahi_af_to_proto(sa->sa_family);
+
+  for(cp = cp0, i = 0; i < RTAX_MAX; i++)
+    {
+      if (!(ifam->ifam_addrs & (1<<i)))
+	continue;
+      sa = (struct sockaddr *)cp;
+#ifdef HAVE_SYS_SYSCTL_H
+      if (sa->sa_len == 0)
+	continue;
+#endif
+      switch(sa->sa_family) {
+      case AF_INET:
+	switch (1<<i) {
+	case RTA_NETMASK:
+	  prefixlen = bitcount((unsigned int)((struct sockaddr_in *)sa)->sin_addr.s_addr);
+	  break;
+	case RTA_IFA:
+	  memcpy(raddr.data.data, &((struct sockaddr_in *)sa)->sin_addr,  sizeof(struct in_addr));
+	  raddr_valid = 1;
+	default:
+	  break;
+	}
+	break;
+      case AF_INET6:
+	switch (1<<i) {
+	case RTA_NETMASK:
+	  prefixlen = bitcount((unsigned int)((struct sockaddr_in6 *)sa)->sin6_addr.s6_addr);
+	  break;
+	case RTA_IFA:
+	  memcpy(raddr.data.data, &((struct sockaddr_in6 *)sa)->sin6_addr,  sizeof(struct in6_addr));
+#ifdef __KAME__
+	  if (IN6_IS_ADDR_LINKLOCAL((struct in6_addr *)raddr.data.data))
+	    {
+	      ((struct in6_addr *)raddr.data.data)->s6_addr[2] = 0;
+	      ((struct in6_addr *)raddr.data.data)->s6_addr[3] = 0;
+	    }
+#endif
+	  raddr_valid = 1;
+	default:
+	  break;
+	}
+	break;
+      default:
+	break;
+      }
+#ifdef SA_SIZE
+      cp += SA_SIZE(sa);
+#else
+      ADVANCE(cp, sa);
+#endif
+    }
+
+  if (!raddr_valid)
+    return;
+
+  if(rtm->rtm_type == RTM_NEWADDR)
+    {
+      AvahiInterfaceAddress *addriface;
+      if (!(addriface = avahi_interface_monitor_get_address(m, iface, &raddr)))
+	if (!(addriface = avahi_interface_address_new(m, iface, &raddr, prefixlen)))
+	  return; /* OOM */
+      if (raddr.proto == AVAHI_PROTO_INET6)
+        {
+	  addriface->global_scope = !(IN6_IS_ADDR_LINKLOCAL((struct in6_addr *)raddr.data.data) || IN6_IS_ADDR_MULTICAST((struct in6_addr *)raddr.data.data));
+	}
+      else
+        addriface->global_scope = 1;
+    }
+  else
+    {
+      AvahiInterfaceAddress *addriface;
+      assert(rtm->rtm_type == RTM_DELADDR);
+      if (!(addriface = avahi_interface_monitor_get_address(m, iface, &raddr)))
+	return;
+      avahi_interface_address_free(addriface);
+    }
+
+  avahi_interface_check_relevant(iface);
+  avahi_interface_update_rrs(iface, 0);
+}
+
+static void parse_rtmsg(struct rt_msghdr *rtm, AvahiInterfaceMonitor *m)
+{
+  assert(m);
+  assert(rtm);
+
+  if (rtm->rtm_version != RTM_VERSION) {
+    avahi_log_warn("routing message version %d not understood",
+		   rtm->rtm_version);
+    return;
+  }
+
+  switch (rtm->rtm_type) {
+  case RTM_IFINFO:
+    rtm_info(rtm,m);
+    break;
+  case RTM_NEWADDR:
+  case RTM_DELADDR:
+    rtm_addr(rtm,m);
+    break;
+  default:
+    break;
+  }
+}
+
+static void socket_event(AvahiWatch *w, int fd, AVAHI_GCC_UNUSED AvahiWatchEvent event,void *userdata) {
+  AvahiInterfaceMonitor *m = (AvahiInterfaceMonitor *)userdata;
+  AvahiPfRoute *nl = m->osdep.pfroute;
+    ssize_t bytes;
+    char msg[2048];
+
+    assert(m);
+    assert(w);
+    assert(nl);
+    assert(fd == nl->fd);
+
+    do {
+      if((bytes = recv(nl->fd, msg, 2048, MSG_DONTWAIT)) < 0) {
+	if (errno == EAGAIN || errno == EINTR)
+	  return;
+	avahi_log_error(__FILE__": recv() failed: %s", strerror(errno));
+	return;
+      }
+      parse_rtmsg((struct rt_msghdr *)msg, m);
+    }
+    while (bytes > 0);
+}
+
+int avahi_interface_monitor_init_osdep(AvahiInterfaceMonitor *m) {
+    int fd = -1;
+
+    assert(m);
+
+    m->osdep.pfroute = NULL;
+
+    if ((fd = socket(PF_ROUTE, SOCK_RAW, AF_UNSPEC)) < 0) {
+        avahi_log_error(__FILE__": socket(PF_ROUTE): %s", strerror(errno));
+        goto fail;
+    }
+
+    if (!(m->osdep.pfroute = avahi_new(AvahiPfRoute , 1))) {
+        avahi_log_error(__FILE__": avahi_new() failed.");
+        goto fail;
+    }
+    m->osdep.pfroute->fd = fd;
+
+    if (!(m->osdep.pfroute->watch = m->server->poll_api->watch_new(m->server->poll_api,
+								   m->osdep.pfroute->fd,
+								   AVAHI_WATCH_IN,
+								   socket_event,
+								   m))) {
+      avahi_log_error(__FILE__": Failed to create watch.");
+      goto fail;
+    }
+
+    return 0;
+
+fail:
+
+    if (m->osdep.pfroute) {
+      if (m->osdep.pfroute->watch)
+        m->server->poll_api->watch_free(m->osdep.pfroute->watch);
+
+      if (fd >= 0)
+        close(fd);
+
+      m->osdep.pfroute = NULL;
+    }
+
+    return -1;
+}
+
+void avahi_interface_monitor_free_osdep(AvahiInterfaceMonitor *m) {
+    assert(m);
+
+    if (m->osdep.pfroute) {
+      if (m->osdep.pfroute->watch)
+        m->server->poll_api->watch_free(m->osdep.pfroute->watch);
+
+      if (m->osdep.pfroute->fd >= 0)
+        close(m->osdep.pfroute->fd);
+
+      avahi_free(m->osdep.pfroute);
+      m->osdep.pfroute = NULL;
+    }
+}
+
+#if defined (SIOCGLIFNUM) && defined(HAVE_STRUCT_LIFCONF) /* Solaris 8 and later; Sol 7? */
+/*
+ * I got this function from GNU zsbra
+ */
+static int ip6_masklen (struct in6_addr netmask) {
+    int len = 0;
+    unsigned char val;
+    unsigned char *pnt;
+
+    pnt = (unsigned char *) & netmask;
+
+    while ((*pnt == 0xff) && len < 128) {
+        len += 8;
+        pnt++;
+    }
+
+    if (len < 128) {
+        val = *pnt;
+        while (val) {
+            len++;
+            val <<= 1;
+        }
+    }
+    return len;
+}
+
+static void if_add_interface(struct lifreq *lifreq, AvahiInterfaceMonitor *m, int fd, int count)
+{
+    AvahiHwInterface *hw;
+    AvahiAddress addr;
+    struct lifreq lifrcopy;
+    unsigned int index;
+    int flags;
+    int mtu;
+    int prefixlen;
+    AvahiInterfaceAddress *addriface;
+    AvahiInterface *iface;
+    struct sockaddr_in mask;
+    struct sockaddr_in6 mask6;
+    char caddr[AVAHI_ADDRESS_STR_MAX];
+
+    lifrcopy = *lifreq;
+
+    if (ioctl(fd, SIOCGLIFFLAGS, &lifrcopy) < 0) {
+        avahi_log_error(__FILE__": ioctl(SIOCGLIFFLAGS) %s", strerror(errno));
+        return;
+    }
+    flags = lifrcopy.lifr_flags;
+
+    if (ioctl(fd, SIOCGLIFMTU, &lifrcopy) < 0) {
+        avahi_log_error(__FILE__": ioctl(SIOCGLIFMTU) %s", strerror(errno));
+        return;
+    }
+    mtu = lifrcopy.lifr_metric;
+
+    if (ioctl(fd, SIOCGLIFADDR, &lifrcopy) < 0) {
+        avahi_log_error(__FILE__": ioctl(SIOCGLIFADDR) %s", strerror(errno));
+        return;
+    }
+    addr.proto = avahi_af_to_proto(lifreq->lifr_addr.ss_family);
+    if (ioctl(fd, SIOCGLIFNETMASK, &lifrcopy) < 0) {
+        avahi_log_error(__FILE__": ioctl(SIOCGLIFNETMASK) %s", strerror(errno));
+        return;
+    }
+    switch (lifreq->lifr_addr.ss_family) {
+        case AF_INET:
+	    memcpy(addr.data.data, &((struct sockaddr_in *)&lifreq->lifr_addr)->sin_addr,  sizeof(struct in_addr));
+	    memcpy(&mask, &((struct sockaddr_in *)&lifrcopy.lifr_addr)->sin_addr,  sizeof(struct in_addr));
+            prefixlen = bitcount((unsigned int) mask.sin_addr.s_addr);
+            break;
+        case AF_INET6:
+	    memcpy(addr.data.data, &((struct sockaddr_in6 *)&lifreq->lifr_addr)->sin6_addr,  sizeof(struct in6_addr));
+	    memcpy(&mask6, &((struct sockaddr_in6 *)&lifrcopy.lifr_addr)->sin6_addr,  sizeof(struct in6_addr));
+            prefixlen = lifrcopy.lifr_addrlen;
+            break;
+        default:
+            break;
+    }
+    index = if_nametoindex(lifreq->lifr_name);
+
+    if (!(hw = avahi_interface_monitor_get_hw_interface(m, (AvahiIfIndex) index))) {
+        if (!(hw = avahi_hw_interface_new(m, (AvahiIfIndex) index)))
+            return; /* OOM */
+
+        hw->flags_ok =
+            (flags & IFF_UP) &&
+            (!m->server->config.use_iff_running || (flags & IFF_RUNNING)) &&
+            !(flags & IFF_LOOPBACK) &&
+            (flags & IFF_MULTICAST) &&
+            (m->server->config.allow_point_to_point || !(flags & IFF_POINTOPOINT));
+        hw->name = avahi_strdup(lifreq->lifr_name);
+        hw->mtu = mtu;
+        /* TODO get mac address */
+    }
+
+    if (!(iface = avahi_interface_monitor_get_interface(m, (AvahiIfIndex)index, addr.proto)))
+        return;
+
+    if (!(addriface = avahi_interface_monitor_get_address(m, iface, &addr)))
+        if (!(addriface = avahi_interface_address_new(m, iface, &addr, prefixlen)))
+            return; /* OOM */
+
+    addriface->global_scope = 1;
+
+    avahi_hw_interface_check_relevant(hw);
+    avahi_hw_interface_update_rrs(hw, 0);
+}
+#endif
+
+void avahi_interface_monitor_sync(AvahiInterfaceMonitor *m) {
+#ifndef HAVE_STRUCT_LIFCONF
+  size_t needed;
+  int mib[6];
+  char *buf, *lim, *next, count = 0;
+  struct rt_msghdr *rtm;
+
+  assert(m);
+
+ retry2:
+  mib[0] = CTL_NET;
+  mib[1] = PF_ROUTE;
+  mib[2] = 0;             /* protocol */
+  mib[3] = 0;             /* wildcard address family */
+  mib[4] = NET_RT_IFLIST;
+  mib[5] = 0;             /* no flags */
+  if (sysctl(mib, 6, NULL, &needed, NULL, 0) < 0)
+    {
+      avahi_log_error("sysctl failed: %s", strerror(errno));
+      avahi_log_error("route-sysctl-estimate");
+      return;
+    }
+  if ((buf = avahi_malloc(needed)) == NULL)
+    {
+      avahi_log_error("malloc failed in avahi_interface_monitor_sync");
+      return;
+    }
+  if (sysctl(mib, 6, buf, &needed, NULL, 0) < 0) {
+    avahi_log_warn("sysctl failed: %s", strerror(errno));
+    if (errno == ENOMEM && count++ < 10) {
+      avahi_log_warn("Routing table grew, retrying");
+      sleep(1);
+      avahi_free(buf);
+      goto retry2;
+    }
+  }
+  lim = buf + needed;
+  for (next = buf; next < lim; next += rtm->rtm_msglen) {
+    rtm = (struct rt_msghdr *)next;
+    parse_rtmsg(rtm, m);
+  }
+
+  m->list_complete = 1;
+  avahi_interface_monitor_check_relevant(m);
+  avahi_interface_monitor_update_rrs(m, 0);
+  avahi_log_info("Network interface enumeration completed.");
+#elif defined (SIOCGLIFNUM) && defined(HAVE_STRUCT_LIFCONF) /* Solaris 8 and later; Sol 7? */
+    int sockfd;
+    int ret;
+    int n;
+    struct lifnum lifn;
+    struct lifconf lifc;
+    struct lifreq *lifreq;
+
+    if ((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
+        avahi_log_error(__FILE__": socket(PFROUTE): %s", strerror(errno));
+        return;
+    }
+    lifc.lifc_buf = NULL;
+    lifn.lifn_family = AF_UNSPEC;
+    lifn.lifn_flags = 0;
+    if (ioctl(sockfd, SIOCGLIFNUM, &lifn) < 0) {
+        avahi_log_error(__FILE__": ioctl(SIOCGLIFNUM): %s", strerror(errno));
+        goto end;
+    }
+    lifc.lifc_len = lifn.lifn_count * sizeof (struct lifreq);
+    if ((lifc.lifc_buf = avahi_malloc(lifc.lifc_len)) == NULL) {
+            avahi_log_error("malloc failed in avahi_interface_monitor_sync");
+            goto end;
+    }
+    lifc.lifc_family = NULL;
+    lifc.lifc_flags = 0;
+    if(ioctl(sockfd, SIOCGLIFCONF, &lifc) < 0) {
+        avahi_log_error(__FILE__": ioctl(SIOCGLIFCONF): %s", strerror(errno));
+        goto end;
+    }
+    lifreq = lifc.lifc_req;
+
+    for (n = 0; n < lifc.lifc_len; n += sizeof(struct lifreq)) {
+        if_add_interface(lifreq, m, sockfd, lifn.lifn_count);
+        lifreq++;
+    }
+    m->list_complete = 1;
+    avahi_interface_monitor_check_relevant(m);
+    avahi_interface_monitor_update_rrs(m, 0);
+end:
+    close(sockfd);
+    avahi_free(lifc.lifc_buf);
+
+    avahi_log_info("Network interface enumeration completed.");
+#endif
+}
diff --git a/avahi-0.6.31/avahi-core/iface-pfroute.h b/avahi-0.6.31/avahi-core/iface-pfroute.h
new file mode 100644
index 0000000..3766cb0
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/iface-pfroute.h
@@ -0,0 +1,37 @@
+#ifndef fooifacepfroutehfoo
+#define fooifacepfroutehfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+#include <avahi-common/watch.h>
+
+typedef struct AvahiPfRoute AvahiPfRoute;
+struct AvahiPfRoute {
+  int fd;
+  AvahiWatch *watch;
+  AvahiInterfaceMonitor *m;
+};
+
+typedef struct AvahiInterfaceMonitorOSDep AvahiInterfaceMonitorOSDep;
+
+struct AvahiInterfaceMonitorOSDep {
+    AvahiPfRoute *pfroute;
+};
+
+#endif
diff --git a/avahi-0.6.31/avahi-core/iface.c b/avahi-0.6.31/avahi-core/iface.c
new file mode 100644
index 0000000..39a860a
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/iface.c
@@ -0,0 +1,865 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+
+#include <avahi-common/error.h>
+#include <avahi-common/malloc.h>
+#include <avahi-common/domain.h>
+
+#include "iface.h"
+#include "dns.h"
+#include "socket.h"
+#include "announce.h"
+#include "util.h"
+#include "log.h"
+#include "multicast-lookup.h"
+#include "querier.h"
+
+void avahi_interface_address_update_rrs(AvahiInterfaceAddress *a, int remove_rrs) {
+    AvahiInterfaceMonitor *m;
+
+    assert(a);
+    m = a->monitor;
+
+    if (m->list_complete &&
+        avahi_interface_address_is_relevant(a) &&
+        avahi_interface_is_relevant(a->interface) &&
+        !remove_rrs &&
+        m->server->config.publish_addresses &&
+        (m->server->state == AVAHI_SERVER_RUNNING ||
+        m->server->state == AVAHI_SERVER_REGISTERING)) {
+
+        /* Fill the entry group */
+        if (!a->entry_group)
+            a->entry_group = avahi_s_entry_group_new(m->server, avahi_host_rr_entry_group_callback, NULL);
+
+        if (!a->entry_group) /* OOM */
+            return;
+
+        if (avahi_s_entry_group_is_empty(a->entry_group)) {
+            char t[AVAHI_ADDRESS_STR_MAX];
+            AvahiProtocol p;
+
+            p = (a->interface->protocol == AVAHI_PROTO_INET && m->server->config.publish_a_on_ipv6) ||
+                (a->interface->protocol == AVAHI_PROTO_INET6 && m->server->config.publish_aaaa_on_ipv4) ? AVAHI_PROTO_UNSPEC : a->interface->protocol;
+
+            avahi_address_snprint(t, sizeof(t), &a->address);
+            avahi_log_info("Registering new address record for %s on %s.%s.", t, a->interface->hardware->name, p == AVAHI_PROTO_UNSPEC ? "*" : avahi_proto_to_string(p));
+
+            if (avahi_server_add_address(m->server, a->entry_group, a->interface->hardware->index, p, 0, NULL, &a->address) < 0) {
+                avahi_log_warn(__FILE__": avahi_server_add_address() failed: %s", avahi_strerror(m->server->error));
+                avahi_s_entry_group_free(a->entry_group);
+                a->entry_group = NULL;
+                return;
+            }
+
+            avahi_s_entry_group_commit(a->entry_group);
+        }
+    } else {
+
+        /* Clear the entry group */
+
+        if (a->entry_group && !avahi_s_entry_group_is_empty(a->entry_group)) {
+            char t[AVAHI_ADDRESS_STR_MAX];
+            avahi_address_snprint(t, sizeof(t), &a->address);
+
+            avahi_log_info("Withdrawing address record for %s on %s.", t, a->interface->hardware->name);
+
+            if (avahi_s_entry_group_get_state(a->entry_group) == AVAHI_ENTRY_GROUP_REGISTERING &&
+                m->server->state == AVAHI_SERVER_REGISTERING)
+                avahi_server_decrease_host_rr_pending(m->server);
+
+            avahi_s_entry_group_reset(a->entry_group);
+        }
+    }
+}
+
+void avahi_interface_update_rrs(AvahiInterface *i, int remove_rrs) {
+    AvahiInterfaceAddress *a;
+
+    assert(i);
+
+    for (a = i->addresses; a; a = a->address_next)
+        avahi_interface_address_update_rrs(a, remove_rrs);
+}
+
+void avahi_hw_interface_update_rrs(AvahiHwInterface *hw, int remove_rrs) {
+    AvahiInterface *i;
+    AvahiInterfaceMonitor *m;
+
+    assert(hw);
+    m = hw->monitor;
+
+    for (i = hw->interfaces; i; i = i->by_hardware_next)
+        avahi_interface_update_rrs(i, remove_rrs);
+
+    if (m->list_complete &&
+        !remove_rrs &&
+        m->server->config.publish_workstation &&
+        (m->server->state == AVAHI_SERVER_RUNNING)) {
+
+        if (!hw->entry_group)
+            hw->entry_group = avahi_s_entry_group_new(m->server, avahi_host_rr_entry_group_callback, NULL);
+
+        if (!hw->entry_group)
+            return; /* OOM */
+
+        if (avahi_s_entry_group_is_empty(hw->entry_group)) {
+            char name[AVAHI_LABEL_MAX], unescaped[AVAHI_LABEL_MAX], mac[256];
+            const char *p = m->server->host_name;
+
+            avahi_unescape_label(&p, unescaped, sizeof(unescaped));
+            avahi_format_mac_address(mac, sizeof(mac), hw->mac_address, hw->mac_address_size);
+            snprintf(name, sizeof(name), "%s [%s]", unescaped, mac);
+
+            if (avahi_server_add_service(m->server, hw->entry_group, hw->index, AVAHI_PROTO_UNSPEC, 0, name, "_workstation._tcp", NULL, NULL, 9, NULL) < 0) {
+                avahi_log_warn(__FILE__": avahi_server_add_service() failed: %s", avahi_strerror(m->server->error));
+                avahi_s_entry_group_free(hw->entry_group);
+                hw->entry_group = NULL;
+            } else
+                avahi_s_entry_group_commit(hw->entry_group);
+        }
+
+    } else {
+
+        if (hw->entry_group && !avahi_s_entry_group_is_empty(hw->entry_group)) {
+
+            avahi_log_info("Withdrawing workstation service for %s.", hw->name);
+
+            if (avahi_s_entry_group_get_state(hw->entry_group) == AVAHI_ENTRY_GROUP_REGISTERING &&
+                m->server->state == AVAHI_SERVER_REGISTERING)
+                avahi_server_decrease_host_rr_pending(m->server);
+
+            avahi_s_entry_group_reset(hw->entry_group);
+        }
+    }
+}
+
+void avahi_interface_monitor_update_rrs(AvahiInterfaceMonitor *m, int remove_rrs) {
+    AvahiHwInterface *hw;
+
+    assert(m);
+
+    for (hw = m->hw_interfaces; hw; hw = hw->hardware_next)
+        avahi_hw_interface_update_rrs(hw, remove_rrs);
+}
+
+static int interface_mdns_mcast_join(AvahiInterface *i, int join) {
+    char at[AVAHI_ADDRESS_STR_MAX];
+    int r;
+    assert(i);
+
+    if (!!join  == !!i->mcast_joined)
+        return 0;
+
+    if ((i->protocol == AVAHI_PROTO_INET6 && i->monitor->server->fd_ipv6 < 0) ||
+        (i->protocol == AVAHI_PROTO_INET && i->monitor->server->fd_ipv4 < 0))
+        return -1;
+
+    if (join) {
+        AvahiInterfaceAddress *a;
+
+        /* Look if there's an address with global scope */
+        for (a = i->addresses; a; a = a->address_next)
+            if (a->global_scope)
+                break;
+
+        /* No address with a global scope has been found, so let's use
+         * any. */
+        if (!a)
+            a = i->addresses;
+
+        /* Hmm, there is no address available. */
+        if (!a)
+            return -1;
+
+        i->local_mcast_address = a->address;
+    }
+
+    avahi_log_info("%s mDNS multicast group on interface %s.%s with address %s.",
+                   join ? "Joining" : "Leaving",
+                   i->hardware->name,
+                   avahi_proto_to_string(i->protocol),
+                   avahi_address_snprint(at, sizeof(at), &i->local_mcast_address));
+
+    if (i->protocol == AVAHI_PROTO_INET6)
+        r = avahi_mdns_mcast_join_ipv6(i->monitor->server->fd_ipv6, &i->local_mcast_address.data.ipv6, i->hardware->index, join);
+    else {
+        assert(i->protocol == AVAHI_PROTO_INET);
+
+        r = avahi_mdns_mcast_join_ipv4(i->monitor->server->fd_ipv4, &i->local_mcast_address.data.ipv4, i->hardware->index, join);
+    }
+
+    if (r < 0)
+        i->mcast_joined = 0;
+    else
+        i->mcast_joined = join;
+
+    return 0;
+}
+
+static int interface_mdns_mcast_rejoin(AvahiInterface *i) {
+    AvahiInterfaceAddress *a, *usable = NULL, *found = NULL;
+    assert(i);
+
+    if (!i->mcast_joined)
+        return 0;
+
+    /* Check whether old address we joined with is still available. If
+     * not, rejoin using an other address. */
+
+    for (a = i->addresses; a; a = a->address_next) {
+        if (a->global_scope && !usable)
+            usable = a;
+
+        if (avahi_address_cmp(&a->address, &i->local_mcast_address) == 0) {
+
+            if (a->global_scope)
+                /* No action necessary: the address still exists and
+                 * has global scope. */
+                return 0;
+
+            found = a;
+        }
+    }
+
+    if (found && !usable)
+        /* No action necessary: the address still exists and no better one has been found */
+        return 0;
+
+    interface_mdns_mcast_join(i, 0);
+    return interface_mdns_mcast_join(i, 1);
+}
+
+void avahi_interface_address_free(AvahiInterfaceAddress *a) {
+    assert(a);
+    assert(a->interface);
+
+    avahi_interface_address_update_rrs(a, 1);
+    AVAHI_LLIST_REMOVE(AvahiInterfaceAddress, address, a->interface->addresses, a);
+
+    if (a->entry_group)
+        avahi_s_entry_group_free(a->entry_group);
+
+    interface_mdns_mcast_rejoin(a->interface);
+
+    avahi_free(a);
+}
+
+void avahi_interface_free(AvahiInterface *i, int send_goodbye) {
+    assert(i);
+
+    /* Handle goodbyes and remove announcers */
+    avahi_goodbye_interface(i->monitor->server, i, send_goodbye, 1);
+    avahi_response_scheduler_force(i->response_scheduler);
+    assert(!i->announcers);
+
+    if (i->mcast_joined)
+        interface_mdns_mcast_join(i, 0);
+
+    /* Remove queriers */
+    avahi_querier_free_all(i);
+    avahi_hashmap_free(i->queriers_by_key);
+
+    /* Remove local RRs */
+    avahi_interface_update_rrs(i, 1);
+
+    while (i->addresses)
+        avahi_interface_address_free(i->addresses);
+
+    avahi_response_scheduler_free(i->response_scheduler);
+    avahi_query_scheduler_free(i->query_scheduler);
+    avahi_probe_scheduler_free(i->probe_scheduler);
+    avahi_cache_free(i->cache);
+
+    AVAHI_LLIST_REMOVE(AvahiInterface, interface, i->monitor->interfaces, i);
+    AVAHI_LLIST_REMOVE(AvahiInterface, by_hardware, i->hardware->interfaces, i);
+
+    avahi_free(i);
+}
+
+void avahi_hw_interface_free(AvahiHwInterface *hw, int send_goodbye) {
+    assert(hw);
+
+    avahi_hw_interface_update_rrs(hw, 1);
+
+    while (hw->interfaces)
+        avahi_interface_free(hw->interfaces, send_goodbye);
+
+    if (hw->entry_group)
+        avahi_s_entry_group_free(hw->entry_group);
+
+    AVAHI_LLIST_REMOVE(AvahiHwInterface, hardware, hw->monitor->hw_interfaces, hw);
+    avahi_hashmap_remove(hw->monitor->hashmap, &hw->index);
+
+    avahi_free(hw->name);
+    avahi_free(hw);
+}
+
+AvahiInterface* avahi_interface_new(AvahiInterfaceMonitor *m, AvahiHwInterface *hw, AvahiProtocol protocol) {
+    AvahiInterface *i;
+
+    assert(m);
+    assert(hw);
+    assert(AVAHI_PROTO_VALID(protocol));
+
+    if (!(i = avahi_new(AvahiInterface, 1)))
+        goto fail; /* OOM */
+
+    i->monitor = m;
+    i->hardware = hw;
+    i->protocol = protocol;
+    i->announcing = 0;
+    i->mcast_joined = 0;
+
+    AVAHI_LLIST_HEAD_INIT(AvahiInterfaceAddress, i->addresses);
+    AVAHI_LLIST_HEAD_INIT(AvahiAnnouncer, i->announcers);
+
+    AVAHI_LLIST_HEAD_INIT(AvahiQuerier, i->queriers);
+    i->queriers_by_key = avahi_hashmap_new((AvahiHashFunc) avahi_key_hash, (AvahiEqualFunc) avahi_key_equal, NULL, NULL);
+
+    i->cache = avahi_cache_new(m->server, i);
+    i->response_scheduler = avahi_response_scheduler_new(i);
+    i->query_scheduler = avahi_query_scheduler_new(i);
+    i->probe_scheduler = avahi_probe_scheduler_new(i);
+
+    if (!i->cache || !i->response_scheduler || !i->query_scheduler || !i->probe_scheduler)
+        goto fail; /* OOM */
+
+    AVAHI_LLIST_PREPEND(AvahiInterface, by_hardware, hw->interfaces, i);
+    AVAHI_LLIST_PREPEND(AvahiInterface, interface, m->interfaces, i);
+
+    return i;
+
+fail:
+
+    if (i) {
+        if (i->cache)
+            avahi_cache_free(i->cache);
+        if (i->response_scheduler)
+            avahi_response_scheduler_free(i->response_scheduler);
+        if (i->query_scheduler)
+            avahi_query_scheduler_free(i->query_scheduler);
+        if (i->probe_scheduler)
+            avahi_probe_scheduler_free(i->probe_scheduler);
+    }
+
+    return NULL;
+}
+
+AvahiHwInterface *avahi_hw_interface_new(AvahiInterfaceMonitor *m, AvahiIfIndex idx) {
+    AvahiHwInterface *hw;
+
+    assert(m);
+    assert(AVAHI_IF_VALID(idx));
+
+    if  (!(hw = avahi_new(AvahiHwInterface, 1)))
+        return NULL;
+
+    hw->monitor = m;
+    hw->name = NULL;
+    hw->flags_ok = 0;
+    hw->mtu = 1500;
+    hw->index = idx;
+    hw->mac_address_size = 0;
+    hw->entry_group = NULL;
+    hw->ratelimit_begin.tv_sec = 0;
+    hw->ratelimit_begin.tv_usec = 0;
+    hw->ratelimit_counter = 0;
+
+    AVAHI_LLIST_HEAD_INIT(AvahiInterface, hw->interfaces);
+    AVAHI_LLIST_PREPEND(AvahiHwInterface, hardware, m->hw_interfaces, hw);
+
+    avahi_hashmap_insert(m->hashmap, &hw->index, hw);
+
+    if (m->server->fd_ipv4 >= 0 || m->server->config.publish_a_on_ipv6)
+        avahi_interface_new(m, hw, AVAHI_PROTO_INET);
+    if (m->server->fd_ipv6 >= 0 || m->server->config.publish_aaaa_on_ipv4)
+        avahi_interface_new(m, hw, AVAHI_PROTO_INET6);
+
+    return hw;
+}
+
+AvahiInterfaceAddress *avahi_interface_address_new(AvahiInterfaceMonitor *m, AvahiInterface *i, const AvahiAddress *addr, unsigned prefix_len) {
+    AvahiInterfaceAddress *a;
+
+    assert(m);
+    assert(i);
+
+    if (!(a = avahi_new(AvahiInterfaceAddress, 1)))
+        return NULL;
+
+    a->interface = i;
+    a->monitor = m;
+    a->address = *addr;
+    a->prefix_len = prefix_len;
+    a->global_scope = 0;
+    a->deprecated = 0;
+    a->entry_group = NULL;
+
+    AVAHI_LLIST_PREPEND(AvahiInterfaceAddress, address, i->addresses, a);
+
+    return a;
+}
+
+void avahi_interface_check_relevant(AvahiInterface *i) {
+    int b;
+    AvahiInterfaceMonitor *m;
+
+    assert(i);
+    m = i->monitor;
+
+    b = avahi_interface_is_relevant(i);
+
+    if (m->list_complete && b && !i->announcing) {
+        interface_mdns_mcast_join(i, 1);
+
+        if (i->mcast_joined) {
+            avahi_log_info("New relevant interface %s.%s for mDNS.", i->hardware->name, avahi_proto_to_string(i->protocol));
+
+            i->announcing = 1;
+            avahi_announce_interface(m->server, i);
+            avahi_multicast_lookup_engine_new_interface(m->server->multicast_lookup_engine, i);
+        }
+
+    } else if (!b && i->announcing) {
+        avahi_log_info("Interface %s.%s no longer relevant for mDNS.", i->hardware->name, avahi_proto_to_string(i->protocol));
+
+        interface_mdns_mcast_join(i, 0);
+
+        avahi_goodbye_interface(m->server, i, 0, 1);
+        avahi_querier_free_all(i);
+
+        avahi_response_scheduler_clear(i->response_scheduler);
+        avahi_query_scheduler_clear(i->query_scheduler);
+        avahi_probe_scheduler_clear(i->probe_scheduler);
+        avahi_cache_flush(i->cache);
+
+        i->announcing = 0;
+
+    } else
+        interface_mdns_mcast_rejoin(i);
+}
+
+void avahi_hw_interface_check_relevant(AvahiHwInterface *hw) {
+    AvahiInterface *i;
+
+    assert(hw);
+
+    for (i = hw->interfaces; i; i = i->by_hardware_next)
+        avahi_interface_check_relevant(i);
+}
+
+void avahi_interface_monitor_check_relevant(AvahiInterfaceMonitor *m) {
+    AvahiInterface *i;
+
+    assert(m);
+
+    for (i = m->interfaces; i; i = i->interface_next)
+        avahi_interface_check_relevant(i);
+}
+
+AvahiInterfaceMonitor *avahi_interface_monitor_new(AvahiServer *s) {
+    AvahiInterfaceMonitor *m = NULL;
+
+    if (!(m = avahi_new0(AvahiInterfaceMonitor, 1)))
+        return NULL; /* OOM */
+
+    m->server = s;
+    m->list_complete = 0;
+    m->hashmap = avahi_hashmap_new(avahi_int_hash, avahi_int_equal, NULL, NULL);
+
+    AVAHI_LLIST_HEAD_INIT(AvahiInterface, m->interfaces);
+    AVAHI_LLIST_HEAD_INIT(AvahiHwInterface, m->hw_interfaces);
+
+    if (avahi_interface_monitor_init_osdep(m) < 0)
+        goto fail;
+
+    return m;
+
+fail:
+    avahi_interface_monitor_free(m);
+    return NULL;
+}
+
+void avahi_interface_monitor_free(AvahiInterfaceMonitor *m) {
+    assert(m);
+
+    while (m->hw_interfaces)
+        avahi_hw_interface_free(m->hw_interfaces, 1);
+
+    assert(!m->interfaces);
+
+    avahi_interface_monitor_free_osdep(m);
+
+    if (m->hashmap)
+        avahi_hashmap_free(m->hashmap);
+
+    avahi_free(m);
+}
+
+
+AvahiInterface* avahi_interface_monitor_get_interface(AvahiInterfaceMonitor *m, AvahiIfIndex idx, AvahiProtocol protocol) {
+    AvahiHwInterface *hw;
+    AvahiInterface *i;
+
+    assert(m);
+    assert(idx >= 0);
+    assert(protocol != AVAHI_PROTO_UNSPEC);
+
+    if (!(hw = avahi_interface_monitor_get_hw_interface(m, idx)))
+        return NULL;
+
+    for (i = hw->interfaces; i; i = i->by_hardware_next)
+        if (i->protocol == protocol)
+            return i;
+
+    return NULL;
+}
+
+AvahiHwInterface* avahi_interface_monitor_get_hw_interface(AvahiInterfaceMonitor *m, AvahiIfIndex idx) {
+    assert(m);
+    assert(idx >= 0);
+
+    return avahi_hashmap_lookup(m->hashmap, &idx);
+}
+
+AvahiInterfaceAddress* avahi_interface_monitor_get_address(AvahiInterfaceMonitor *m, AvahiInterface *i, const AvahiAddress *raddr) {
+    AvahiInterfaceAddress *ia;
+
+    assert(m);
+    assert(i);
+    assert(raddr);
+
+    for (ia = i->addresses; ia; ia = ia->address_next)
+        if (avahi_address_cmp(&ia->address, raddr) == 0)
+            return ia;
+
+    return NULL;
+}
+
+void avahi_interface_send_packet_unicast(AvahiInterface *i, AvahiDnsPacket *p, const AvahiAddress *a, uint16_t port) {
+    assert(i);
+    assert(p);
+
+    if (!i->announcing)
+        return;
+
+    assert(!a || a->proto == i->protocol);
+
+    if (i->monitor->server->config.ratelimit_interval > 0) {
+        struct timeval now, end;
+
+        gettimeofday(&now, NULL);
+
+        end = i->hardware->ratelimit_begin;
+        avahi_timeval_add(&end, i->monitor->server->config.ratelimit_interval);
+
+        if (i->hardware->ratelimit_begin.tv_sec <= 0 ||
+            avahi_timeval_compare(&end, &now) < 0) {
+
+            i->hardware->ratelimit_begin = now;
+            i->hardware->ratelimit_counter = 0;
+        }
+
+        if (i->hardware->ratelimit_counter > i->monitor->server->config.ratelimit_burst)
+            return;
+
+        i->hardware->ratelimit_counter++;
+    }
+
+    if (i->protocol == AVAHI_PROTO_INET && i->monitor->server->fd_ipv4 >= 0)
+        avahi_send_dns_packet_ipv4(i->monitor->server->fd_ipv4, i->hardware->index, p, i->mcast_joined ? &i->local_mcast_address.data.ipv4 : NULL, a ? &a->data.ipv4 : NULL, port);
+    else if (i->protocol == AVAHI_PROTO_INET6 && i->monitor->server->fd_ipv6 >= 0)
+        avahi_send_dns_packet_ipv6(i->monitor->server->fd_ipv6, i->hardware->index, p, i->mcast_joined ? &i->local_mcast_address.data.ipv6 : NULL, a ? &a->data.ipv6 : NULL, port);
+}
+
+void avahi_interface_send_packet(AvahiInterface *i, AvahiDnsPacket *p) {
+    assert(i);
+    assert(p);
+
+    avahi_interface_send_packet_unicast(i, p, NULL, 0);
+}
+
+int avahi_interface_post_query(AvahiInterface *i, AvahiKey *key, int immediately, unsigned *ret_id) {
+    assert(i);
+    assert(key);
+
+    if (!i->announcing)
+        return 0;
+
+    return avahi_query_scheduler_post(i->query_scheduler, key, immediately, ret_id);
+}
+
+int avahi_interface_withraw_query(AvahiInterface *i, unsigned id) {
+
+    return avahi_query_scheduler_withdraw_by_id(i->query_scheduler, id);
+}
+
+int avahi_interface_post_response(AvahiInterface *i, AvahiRecord *record, int flush_cache, const AvahiAddress *querier, int immediately) {
+    assert(i);
+    assert(record);
+
+    if (!i->announcing)
+        return 0;
+
+    return avahi_response_scheduler_post(i->response_scheduler, record, flush_cache, querier, immediately);
+}
+
+int avahi_interface_post_probe(AvahiInterface *i, AvahiRecord *record, int immediately) {
+    assert(i);
+    assert(record);
+
+    if (!i->announcing)
+        return 0;
+
+    return avahi_probe_scheduler_post(i->probe_scheduler, record, immediately);
+}
+
+int avahi_dump_caches(AvahiInterfaceMonitor *m, AvahiDumpCallback callback, void* userdata) {
+    AvahiInterface *i;
+    assert(m);
+
+    for (i = m->interfaces; i; i = i->interface_next) {
+        if (avahi_interface_is_relevant(i)) {
+            char ln[256];
+            snprintf(ln, sizeof(ln), ";;; INTERFACE %s.%s ;;;", i->hardware->name, avahi_proto_to_string(i->protocol));
+            callback(ln, userdata);
+            if (avahi_cache_dump(i->cache, callback, userdata) < 0)
+                return -1;
+        }
+    }
+
+    return 0;
+}
+
+static int avahi_interface_is_relevant_internal(AvahiInterface *i) {
+    AvahiInterfaceAddress *a;
+
+    assert(i);
+
+    if (!i->hardware->flags_ok)
+        return 0;
+
+    for (a = i->addresses; a; a = a->address_next)
+        if (avahi_interface_address_is_relevant(a))
+            return 1;
+
+    return 0;
+}
+
+int avahi_interface_is_relevant(AvahiInterface *i) {
+    AvahiStringList *l;
+    assert(i);
+
+    for (l = i->monitor->server->config.deny_interfaces; l; l = l->next)
+        if (strcasecmp((char*) l->text, i->hardware->name) == 0)
+            return 0;
+
+    if (i->monitor->server->config.allow_interfaces) {
+
+        for (l = i->monitor->server->config.allow_interfaces; l; l = l->next)
+            if (strcasecmp((char*) l->text, i->hardware->name) == 0)
+                goto good;
+
+        return 0;
+    }
+
+good:
+    return avahi_interface_is_relevant_internal(i);
+}
+
+int avahi_interface_address_is_relevant(AvahiInterfaceAddress *a) {
+    AvahiInterfaceAddress *b;
+    assert(a);
+
+    /* Publish public and non-deprecated IP addresses */
+    if (a->global_scope && !a->deprecated)
+        return 1;
+
+    /* Publish link-local and deprecated IP addresses only if they are
+     * the only ones on the link */
+    for (b = a->interface->addresses; b; b = b->address_next) {
+        if (b == a)
+            continue;
+
+        if (b->global_scope && !b->deprecated)
+            return 0;
+    }
+
+    return 1;
+}
+
+int avahi_interface_match(AvahiInterface *i, AvahiIfIndex idx, AvahiProtocol protocol) {
+    assert(i);
+
+    if (idx != AVAHI_IF_UNSPEC && idx != i->hardware->index)
+        return 0;
+
+    if (protocol != AVAHI_PROTO_UNSPEC && protocol != i->protocol)
+        return 0;
+
+    return 1;
+}
+
+void avahi_interface_monitor_walk(AvahiInterfaceMonitor *m, AvahiIfIndex interface, AvahiProtocol protocol, AvahiInterfaceMonitorWalkCallback callback, void* userdata) {
+    assert(m);
+    assert(callback);
+
+    if (interface != AVAHI_IF_UNSPEC) {
+        if (protocol != AVAHI_PROTO_UNSPEC) {
+            AvahiInterface *i;
+
+            if ((i = avahi_interface_monitor_get_interface(m, interface, protocol)))
+                callback(m, i, userdata);
+
+        } else {
+            AvahiHwInterface *hw;
+            AvahiInterface *i;
+
+            if ((hw = avahi_interface_monitor_get_hw_interface(m, interface)))
+                for (i = hw->interfaces; i; i = i->by_hardware_next)
+                    if (avahi_interface_match(i, interface, protocol))
+                        callback(m, i, userdata);
+        }
+
+    } else {
+        AvahiInterface *i;
+
+        for (i = m->interfaces; i; i = i->interface_next)
+            if (avahi_interface_match(i, interface, protocol))
+                callback(m, i, userdata);
+    }
+}
+
+
+int avahi_address_is_local(AvahiInterfaceMonitor *m, const AvahiAddress *a) {
+    AvahiInterface *i;
+    AvahiInterfaceAddress *ia;
+    assert(m);
+    assert(a);
+
+    for (i = m->interfaces; i; i = i->interface_next)
+        for (ia = i->addresses; ia; ia = ia->address_next)
+            if (avahi_address_cmp(a, &ia->address) == 0)
+                return 1;
+
+    return 0;
+}
+
+int avahi_interface_address_on_link(AvahiInterface *i, const AvahiAddress *a) {
+    AvahiInterfaceAddress *ia;
+
+    assert(i);
+    assert(a);
+
+    if (a->proto != i->protocol)
+        return 0;
+
+    for (ia = i->addresses; ia; ia = ia->address_next) {
+
+        if (a->proto == AVAHI_PROTO_INET) {
+            uint32_t m;
+
+            m = ~(((uint32_t) -1) >> ia->prefix_len);
+
+            if ((ntohl(a->data.ipv4.address) & m) == (ntohl(ia->address.data.ipv4.address) & m))
+                return 1;
+        } else {
+            unsigned j;
+            unsigned char pl;
+            assert(a->proto == AVAHI_PROTO_INET6);
+
+            pl = ia->prefix_len;
+
+            for (j = 0; j < 16; j++) {
+                uint8_t m;
+
+                if (pl == 0)
+                    return 1;
+
+                if (pl >= 8) {
+                    m = 0xFF;
+                    pl -= 8;
+                } else {
+                    m = ~(0xFF >> pl);
+                    pl = 0;
+                }
+
+                if ((a->data.ipv6.address[j] & m) != (ia->address.data.ipv6.address[j] & m))
+                    break;
+            }
+        }
+    }
+
+    return 0;
+}
+
+int avahi_interface_has_address(AvahiInterfaceMonitor *m, AvahiIfIndex iface, const AvahiAddress *a) {
+    AvahiInterface *i;
+    AvahiInterfaceAddress *j;
+
+    assert(m);
+    assert(iface != AVAHI_IF_UNSPEC);
+    assert(a);
+
+    if (!(i = avahi_interface_monitor_get_interface(m, iface, a->proto)))
+        return 0;
+
+    for (j = i->addresses; j; j = j->address_next)
+        if (avahi_address_cmp(a, &j->address) == 0)
+            return 1;
+
+    return 0;
+}
+
+AvahiIfIndex avahi_find_interface_for_address(AvahiInterfaceMonitor *m, const AvahiAddress *a) {
+    AvahiInterface *i;
+    assert(m);
+
+    /* Some stupid OS don't support passing the interface index when a
+     * packet is received. We have to work around that limitation by
+     * looking for an interface that has the incoming address
+     * attached. This is sometimes ambiguous, but we have to live with
+     * it. */
+
+    for (i = m->interfaces; i; i = i->interface_next) {
+        AvahiInterfaceAddress *ai;
+
+        if (i->protocol != a->proto)
+            continue;
+
+        for (ai = i->addresses; ai; ai = ai->address_next)
+            if (avahi_address_cmp(a, &ai->address) == 0)
+                return i->hardware->index;
+    }
+
+    return AVAHI_IF_UNSPEC;
+}
diff --git a/avahi-0.6.31/avahi-core/iface.h b/avahi-0.6.31/avahi-core/iface.h
new file mode 100644
index 0000000..c3f24af
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/iface.h
@@ -0,0 +1,195 @@
+#ifndef fooifacehfoo
+#define fooifacehfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+typedef struct AvahiInterfaceMonitor AvahiInterfaceMonitor;
+typedef struct AvahiInterfaceAddress AvahiInterfaceAddress;
+typedef struct AvahiInterface AvahiInterface;
+typedef struct AvahiHwInterface AvahiHwInterface;
+
+#include <avahi-common/llist.h>
+#include <avahi-common/address.h>
+
+#include "internal.h"
+#include "cache.h"
+#include "response-sched.h"
+#include "query-sched.h"
+#include "probe-sched.h"
+#include "dns.h"
+#include "announce.h"
+#include "browse.h"
+#include "querier.h"
+
+#ifdef HAVE_NETLINK
+#include "iface-linux.h"
+#elif defined(HAVE_PF_ROUTE)
+#include "iface-pfroute.h"
+#else
+typedef struct AvahiInterfaceMonitorOSDep AvahiInterfaceMonitorOSDep;
+struct AvahiInterfaceMonitorOSDep {
+
+    unsigned query_addr_seq, query_link_seq;
+
+    enum {
+        LIST_IFACE,
+        LIST_ADDR,
+        LIST_DONE
+    } list;
+};
+#endif
+
+#define AVAHI_MAC_ADDRESS_MAX 32
+
+struct AvahiInterfaceMonitor {
+    AvahiServer *server;
+    AvahiHashmap *hashmap;
+
+    AVAHI_LLIST_HEAD(AvahiInterface, interfaces);
+    AVAHI_LLIST_HEAD(AvahiHwInterface, hw_interfaces);
+
+    int list_complete;
+    AvahiInterfaceMonitorOSDep osdep;
+};
+
+struct AvahiHwInterface {
+    AvahiInterfaceMonitor *monitor;
+
+    AVAHI_LLIST_FIELDS(AvahiHwInterface, hardware);
+
+    char *name;
+    AvahiIfIndex index;
+    int flags_ok;
+
+    unsigned mtu;
+
+    uint8_t mac_address[AVAHI_MAC_ADDRESS_MAX];
+    size_t mac_address_size;
+
+    AvahiSEntryGroup *entry_group;
+
+    /* Packet rate limiting */
+    struct timeval ratelimit_begin;
+    unsigned ratelimit_counter;
+
+    AVAHI_LLIST_HEAD(AvahiInterface, interfaces);
+};
+
+struct AvahiInterface {
+    AvahiInterfaceMonitor *monitor;
+    AvahiHwInterface *hardware;
+
+    AVAHI_LLIST_FIELDS(AvahiInterface, interface);
+    AVAHI_LLIST_FIELDS(AvahiInterface, by_hardware);
+
+    AvahiProtocol protocol;
+    int announcing;
+    AvahiAddress local_mcast_address;
+    int mcast_joined;
+
+    AvahiCache *cache;
+
+    AvahiQueryScheduler *query_scheduler;
+    AvahiResponseScheduler * response_scheduler;
+    AvahiProbeScheduler *probe_scheduler;
+
+    AVAHI_LLIST_HEAD(AvahiInterfaceAddress, addresses);
+    AVAHI_LLIST_HEAD(AvahiAnnouncer, announcers);
+
+    AvahiHashmap *queriers_by_key;
+    AVAHI_LLIST_HEAD(AvahiQuerier, queriers);
+};
+
+struct AvahiInterfaceAddress {
+    AvahiInterfaceMonitor *monitor;
+    AvahiInterface *interface;
+
+    AVAHI_LLIST_FIELDS(AvahiInterfaceAddress, address);
+
+    AvahiAddress address;
+    unsigned prefix_len;
+
+    int global_scope;
+    int deprecated;
+
+    AvahiSEntryGroup *entry_group;
+};
+
+AvahiInterfaceMonitor *avahi_interface_monitor_new(AvahiServer *server);
+void avahi_interface_monitor_free(AvahiInterfaceMonitor *m);
+
+int avahi_interface_monitor_init_osdep(AvahiInterfaceMonitor *m);
+void avahi_interface_monitor_free_osdep(AvahiInterfaceMonitor *m);
+void avahi_interface_monitor_sync(AvahiInterfaceMonitor *m);
+
+typedef void (*AvahiInterfaceMonitorWalkCallback)(AvahiInterfaceMonitor *m, AvahiInterface *i, void* userdata);
+void avahi_interface_monitor_walk(AvahiInterfaceMonitor *m, AvahiIfIndex idx, AvahiProtocol protocol, AvahiInterfaceMonitorWalkCallback callback, void* userdata);
+int avahi_dump_caches(AvahiInterfaceMonitor *m, AvahiDumpCallback callback, void* userdata);
+
+void avahi_interface_monitor_update_rrs(AvahiInterfaceMonitor *m, int remove_rrs);
+int avahi_address_is_local(AvahiInterfaceMonitor *m, const AvahiAddress *a);
+void avahi_interface_monitor_check_relevant(AvahiInterfaceMonitor *m);
+
+/* AvahiHwInterface */
+
+AvahiHwInterface *avahi_hw_interface_new(AvahiInterfaceMonitor *m, AvahiIfIndex idx);
+void avahi_hw_interface_free(AvahiHwInterface *hw, int send_goodbye);
+
+void avahi_hw_interface_update_rrs(AvahiHwInterface *hw, int remove_rrs);
+void avahi_hw_interface_check_relevant(AvahiHwInterface *hw);
+
+AvahiHwInterface* avahi_interface_monitor_get_hw_interface(AvahiInterfaceMonitor *m, int idx);
+
+/* AvahiInterface */
+
+AvahiInterface* avahi_interface_new(AvahiInterfaceMonitor *m, AvahiHwInterface *hw, AvahiProtocol protocol);
+void avahi_interface_free(AvahiInterface *i, int send_goodbye);
+
+void avahi_interface_update_rrs(AvahiInterface *i, int remove_rrs);
+void avahi_interface_check_relevant(AvahiInterface *i);
+int avahi_interface_is_relevant(AvahiInterface *i);
+
+void avahi_interface_send_packet(AvahiInterface *i, AvahiDnsPacket *p);
+void avahi_interface_send_packet_unicast(AvahiInterface *i, AvahiDnsPacket *p, const AvahiAddress *a, uint16_t port);
+
+int avahi_interface_post_query(AvahiInterface *i, AvahiKey *k, int immediately, unsigned *ret_id);
+int avahi_interface_withraw_query(AvahiInterface *i, unsigned id);
+int avahi_interface_post_response(AvahiInterface *i, AvahiRecord *record, int flush_cache, const AvahiAddress *querier, int immediately);
+int avahi_interface_post_probe(AvahiInterface *i, AvahiRecord *p, int immediately);
+
+int avahi_interface_match(AvahiInterface *i, AvahiIfIndex idx, AvahiProtocol protocol);
+int avahi_interface_address_on_link(AvahiInterface *i, const AvahiAddress *a);
+int avahi_interface_has_address(AvahiInterfaceMonitor *m, AvahiIfIndex iface, const AvahiAddress *a);
+
+AvahiInterface* avahi_interface_monitor_get_interface(AvahiInterfaceMonitor *m, AvahiIfIndex idx, AvahiProtocol protocol);
+
+/* AvahiInterfaceAddress */
+
+AvahiInterfaceAddress *avahi_interface_address_new(AvahiInterfaceMonitor *m, AvahiInterface *i, const AvahiAddress *addr, unsigned prefix_len);
+void avahi_interface_address_free(AvahiInterfaceAddress *a);
+
+void avahi_interface_address_update_rrs(AvahiInterfaceAddress *a, int remove_rrs);
+int avahi_interface_address_is_relevant(AvahiInterfaceAddress *a);
+
+AvahiInterfaceAddress* avahi_interface_monitor_get_address(AvahiInterfaceMonitor *m, AvahiInterface *i, const AvahiAddress *raddr);
+
+AvahiIfIndex avahi_find_interface_for_address(AvahiInterfaceMonitor *m, const AvahiAddress *a);
+
+#endif
diff --git a/avahi-0.6.31/avahi-core/internal.h b/avahi-0.6.31/avahi-core/internal.h
new file mode 100644
index 0000000..b8f9302
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/internal.h
@@ -0,0 +1,227 @@
+#ifndef foointernalhfoo
+#define foointernalhfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+/** A locally registered DNS resource record */
+typedef struct AvahiEntry AvahiEntry;
+
+#include <avahi-common/llist.h>
+#include <avahi-common/watch.h>
+#include <avahi-common/timeval.h>
+
+#include "core.h"
+#include "iface.h"
+#include "prioq.h"
+#include "timeeventq.h"
+#include "announce.h"
+#include "browse.h"
+#include "dns.h"
+#include "rrlist.h"
+#include "hashmap.h"
+#include "wide-area.h"
+#include "multicast-lookup.h"
+#include "dns-srv-rr.h"
+
+#define AVAHI_LEGACY_UNICAST_REFLECT_SLOTS_MAX 100
+
+#define AVAHI_FLAGS_VALID(flags, max) (!((flags) & ~(max)))
+
+#define AVAHI_RR_HOLDOFF_MSEC 1000
+#define AVAHI_RR_HOLDOFF_MSEC_RATE_LIMIT 20000
+#define AVAHI_RR_RATE_LIMIT_COUNT 15
+
+typedef struct AvahiLegacyUnicastReflectSlot AvahiLegacyUnicastReflectSlot;
+
+struct AvahiLegacyUnicastReflectSlot {
+    AvahiServer *server;
+
+    uint16_t id, original_id;
+    AvahiAddress address;
+    uint16_t port;
+    int interface;
+    struct timeval elapse_time;
+    AvahiTimeEvent *time_event;
+};
+
+struct AvahiEntry {
+    AvahiServer *server;
+    AvahiSEntryGroup *group;
+
+    int dead;
+
+    AvahiPublishFlags flags;
+    AvahiRecord *record;
+    AvahiIfIndex interface;
+    AvahiProtocol protocol;
+
+    AVAHI_LLIST_FIELDS(AvahiEntry, entries);
+    AVAHI_LLIST_FIELDS(AvahiEntry, by_key);
+    AVAHI_LLIST_FIELDS(AvahiEntry, by_group);
+
+    AVAHI_LLIST_HEAD(AvahiAnnouncer, announcers);
+};
+
+struct AvahiSEntryGroup {
+    AvahiServer *server;
+    int dead;
+
+    AvahiEntryGroupState state;
+    void* userdata;
+    AvahiSEntryGroupCallback callback;
+
+    unsigned n_probing;
+
+    unsigned n_register_try;
+    struct timeval register_time;
+    AvahiTimeEvent *register_time_event;
+
+    struct timeval established_at;
+
+    AVAHI_LLIST_FIELDS(AvahiSEntryGroup, groups);
+    AVAHI_LLIST_HEAD(AvahiEntry, entries);
+};
+
+struct AvahiServer {
+    const AvahiPoll *poll_api;
+
+    AvahiInterfaceMonitor *monitor;
+    AvahiServerConfig config;
+
+    AVAHI_LLIST_HEAD(AvahiEntry, entries);
+    AvahiHashmap *entries_by_key;
+
+    AVAHI_LLIST_HEAD(AvahiSEntryGroup, groups);
+
+    AVAHI_LLIST_HEAD(AvahiSRecordBrowser, record_browsers);
+    AvahiHashmap *record_browser_hashmap;
+    AVAHI_LLIST_HEAD(AvahiSHostNameResolver, host_name_resolvers);
+    AVAHI_LLIST_HEAD(AvahiSAddressResolver, address_resolvers);
+    AVAHI_LLIST_HEAD(AvahiSDomainBrowser, domain_browsers);
+    AVAHI_LLIST_HEAD(AvahiSServiceTypeBrowser, service_type_browsers);
+    AVAHI_LLIST_HEAD(AvahiSServiceBrowser, service_browsers);
+    AVAHI_LLIST_HEAD(AvahiSServiceResolver, service_resolvers);
+    AVAHI_LLIST_HEAD(AvahiSDNSServerBrowser, dns_server_browsers);
+
+    int need_entry_cleanup, need_group_cleanup, need_browser_cleanup;
+
+    /* Used for scheduling RR cleanup */
+    AvahiTimeEvent *cleanup_time_event;
+
+    AvahiTimeEventQueue *time_event_queue;
+
+    char *host_name, *host_name_fqdn, *domain_name;
+
+    int fd_ipv4, fd_ipv6,
+        /* The following two sockets two are used for reflection only */
+        fd_legacy_unicast_ipv4, fd_legacy_unicast_ipv6;
+
+    AvahiWatch *watch_ipv4, *watch_ipv6,
+        *watch_legacy_unicast_ipv4, *watch_legacy_unicast_ipv6;
+
+    AvahiServerState state;
+    AvahiServerCallback callback;
+    void* userdata;
+
+    AvahiSEntryGroup *hinfo_entry_group;
+    AvahiSEntryGroup *browse_domain_entry_group;
+    unsigned n_host_rr_pending;
+
+    /* Used for assembling responses */
+    AvahiRecordList *record_list;
+
+    /* Used for reflection of legacy unicast packets */
+    AvahiLegacyUnicastReflectSlot **legacy_unicast_reflect_slots;
+    uint16_t legacy_unicast_reflect_id;
+
+    /* The last error code */
+    int error;
+
+    /* The local service cookie */
+    uint32_t local_service_cookie;
+
+    AvahiMulticastLookupEngine *multicast_lookup_engine;
+    AvahiWideAreaLookupEngine *wide_area_lookup_engine;
+};
+
+void avahi_entry_free(AvahiServer*s, AvahiEntry *e);
+void avahi_entry_group_free(AvahiServer *s, AvahiSEntryGroup *g);
+
+void avahi_cleanup_dead_entries(AvahiServer *s);
+
+void avahi_server_prepare_response(AvahiServer *s, AvahiInterface *i, AvahiEntry *e, int unicast_response, int auxiliary);
+void avahi_server_prepare_matching_responses(AvahiServer *s, AvahiInterface *i, AvahiKey *k, int unicast_response);
+void avahi_server_generate_response(AvahiServer *s, AvahiInterface *i, AvahiDnsPacket *p, const AvahiAddress *a, uint16_t port, int legacy_unicast, int is_probe);
+
+void avahi_s_entry_group_change_state(AvahiSEntryGroup *g, AvahiEntryGroupState state);
+
+int avahi_entry_is_commited(AvahiEntry *e);
+
+void avahi_server_enumerate_aux_records(AvahiServer *s, AvahiInterface *i, AvahiRecord *r, void (*callback)(AvahiServer *s, AvahiRecord *r, int flush_cache, void* userdata), void* userdata);
+
+void avahi_host_rr_entry_group_callback(AvahiServer *s, AvahiSEntryGroup *g, AvahiEntryGroupState state, void *userdata);
+
+void avahi_server_decrease_host_rr_pending(AvahiServer *s);
+
+int avahi_server_set_errno(AvahiServer *s, int error);
+
+int avahi_server_is_service_local(AvahiServer *s, AvahiIfIndex interface, AvahiProtocol protocol, const char *name);
+int avahi_server_is_record_local(AvahiServer *s, AvahiIfIndex interface, AvahiProtocol protocol, AvahiRecord *record);
+
+int avahi_server_add_ptr(
+    AvahiServer *s,
+    AvahiSEntryGroup *g,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiPublishFlags flags,
+    uint32_t ttl,
+    const char *name,
+    const char *dest);
+
+#define AVAHI_CHECK_VALIDITY(server, expression, error) { \
+        if (!(expression)) \
+            return avahi_server_set_errno((server), (error)); \
+}
+
+#define AVAHI_CHECK_VALIDITY_RETURN_NULL(server, expression, error) { \
+        if (!(expression)) { \
+            avahi_server_set_errno((server), (error)); \
+            return NULL; \
+        } \
+}
+
+#define AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(server, expression, error) {\
+    if (!(expression)) { \
+        ret = avahi_server_set_errno((server), (error)); \
+        goto fail; \
+    } \
+}
+
+#define AVAHI_ASSERT_TRUE(expression) { \
+    int __tmp = !!(expression); \
+    assert(__tmp); \
+}
+
+#define AVAHI_ASSERT_SUCCESS(expression) { \
+    int __tmp = (expression); \
+    assert(__tmp == 0); \
+}
+
+#endif
diff --git a/avahi-0.6.31/avahi-core/log.c b/avahi-0.6.31/avahi-core/log.c
new file mode 100644
index 0000000..d110765
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/log.c
@@ -0,0 +1,86 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdarg.h>
+
+#include "log.h"
+
+static AvahiLogFunction log_function = NULL;
+
+void avahi_set_log_function(AvahiLogFunction function) {
+    log_function = function;
+}
+
+void avahi_log_ap(AvahiLogLevel level, const char*format, va_list ap) {
+    char txt[256];
+
+    vsnprintf(txt, sizeof(txt), format, ap);
+
+    if (log_function)
+        log_function(level, txt);
+    else
+        fprintf(stderr, "%s\n", txt);
+}
+
+void avahi_log(AvahiLogLevel level, const char*format, ...) {
+    va_list ap;
+    va_start(ap, format);
+    avahi_log_ap(level, format, ap);
+    va_end(ap);
+}
+
+void avahi_log_error(const char*format, ...) {
+    va_list ap;
+    va_start(ap, format);
+    avahi_log_ap(AVAHI_LOG_ERROR, format, ap);
+    va_end(ap);
+}
+
+void avahi_log_warn(const char*format, ...) {
+    va_list ap;
+    va_start(ap, format);
+    avahi_log_ap(AVAHI_LOG_WARN, format, ap);
+    va_end(ap);
+}
+
+void avahi_log_notice(const char*format, ...) {
+    va_list ap;
+    va_start(ap, format);
+    avahi_log_ap(AVAHI_LOG_NOTICE, format, ap);
+    va_end(ap);
+}
+
+void avahi_log_info(const char*format, ...) {
+    va_list ap;
+    va_start(ap, format);
+    avahi_log_ap(AVAHI_LOG_INFO, format, ap);
+    va_end(ap);
+}
+
+void avahi_log_debug(const char*format, ...) {
+    va_list ap;
+    va_start(ap, format);
+    avahi_log_ap(AVAHI_LOG_DEBUG, format, ap);
+    va_end(ap);
+}
diff --git a/avahi-0.6.31/avahi-core/log.h b/avahi-0.6.31/avahi-core/log.h
new file mode 100644
index 0000000..878f07a
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/log.h
@@ -0,0 +1,73 @@
+#ifndef foologhfoo
+#define foologhfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#include <stdarg.h>
+
+#include <avahi-common/cdecl.h>
+#include <avahi-common/gccmacro.h>
+
+/** \file log.h Extensible logging subsystem */
+
+AVAHI_C_DECL_BEGIN
+
+/** Log level for avahi_log_xxx() */
+typedef enum {
+    AVAHI_LOG_ERROR  = 0,    /**< Error messages */
+    AVAHI_LOG_WARN   = 1,    /**< Warning messages */
+    AVAHI_LOG_NOTICE = 2,    /**< Notice messages */
+    AVAHI_LOG_INFO   = 3,    /**< Info messages */
+    AVAHI_LOG_DEBUG  = 4,    /**< Debug messages */
+    AVAHI_LOG_LEVEL_MAX
+} AvahiLogLevel;
+
+/** Prototype for a user supplied log function */
+typedef void (*AvahiLogFunction)(AvahiLogLevel level, const char *txt);
+
+/** Set a user supplied log function, replacing the default which
+ * prints to log messages unconditionally to STDERR. Pass NULL for
+ * resetting to the default log function */
+void avahi_set_log_function(AvahiLogFunction function);
+
+/** Issue a log message using a va_list object */
+void avahi_log_ap(AvahiLogLevel level, const char *format, va_list ap);
+
+/** Issue a log message by passing a log level and a format string */
+void avahi_log(AvahiLogLevel level, const char*format, ...) AVAHI_GCC_PRINTF_ATTR23;
+
+/** Shortcut for avahi_log(AVAHI_LOG_ERROR, ...) */
+void avahi_log_error(const char*format, ...) AVAHI_GCC_PRINTF_ATTR12;
+
+/** Shortcut for avahi_log(AVAHI_LOG_WARN, ...) */
+void avahi_log_warn(const char*format, ...) AVAHI_GCC_PRINTF_ATTR12;
+
+/** Shortcut for avahi_log(AVAHI_LOG_NOTICE, ...) */
+void avahi_log_notice(const char*format, ...) AVAHI_GCC_PRINTF_ATTR12;
+
+/** Shortcut for avahi_log(AVAHI_LOG_INFO, ...) */
+void avahi_log_info(const char*format, ...) AVAHI_GCC_PRINTF_ATTR12;
+
+/** Shortcut for avahi_log(AVAHI_LOG_DEBUG, ...) */
+void avahi_log_debug(const char*format, ...) AVAHI_GCC_PRINTF_ATTR12;
+
+AVAHI_C_DECL_END
+
+#endif
diff --git a/avahi-0.6.31/avahi-core/lookup.h b/avahi-0.6.31/avahi-core/lookup.h
new file mode 100644
index 0000000..06dec6e
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/lookup.h
@@ -0,0 +1,235 @@
+#ifndef foolookuphfoo
+#define foolookuphfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+/** \file avahi-core/lookup.h Functions for browsing/resolving services and other RRs */
+
+/** \example core-browse-services.c Example how to browse for DNS-SD
+ * services using an embedded mDNS stack. */
+
+/** A browsing object for arbitrary RRs */
+typedef struct AvahiSRecordBrowser AvahiSRecordBrowser;
+
+/** A host name to IP adddress resolver object */
+typedef struct AvahiSHostNameResolver AvahiSHostNameResolver;
+
+/** An IP address to host name resolver object ("reverse lookup") */
+typedef struct AvahiSAddressResolver AvahiSAddressResolver;
+
+/** A local domain browsing object. May be used to enumerate domains used on the local LAN */
+typedef struct AvahiSDomainBrowser AvahiSDomainBrowser;
+
+/** A DNS-SD service type browsing object. May be used to enumerate the service types of all available services on the local LAN */
+typedef struct AvahiSServiceTypeBrowser AvahiSServiceTypeBrowser;
+
+/** A DNS-SD service browser. Use this to enumerate available services of a certain kind on the local LAN. Use AvahiSServiceResolver to get specific service data like address and port for a service. */
+typedef struct AvahiSServiceBrowser AvahiSServiceBrowser;
+
+/** A DNS-SD service resolver.  Use this to retrieve addres, port and TXT data for a DNS-SD service */
+typedef struct AvahiSServiceResolver AvahiSServiceResolver;
+
+#include <avahi-common/cdecl.h>
+#include <avahi-common/defs.h>
+#include <avahi-core/core.h>
+
+AVAHI_C_DECL_BEGIN
+
+/** Callback prototype for AvahiSRecordBrowser events */
+typedef void (*AvahiSRecordBrowserCallback)(
+    AvahiSRecordBrowser *b,          /**< The AvahiSRecordBrowser object that is emitting this callback */
+    AvahiIfIndex interface,          /**< Logical OS network interface number the record was found on */
+    AvahiProtocol protocol,          /**< Protocol number the record was found. */
+    AvahiBrowserEvent event,         /**< Browsing event, either AVAHI_BROWSER_NEW or AVAHI_BROWSER_REMOVE */
+    AvahiRecord *record,             /**< The record that was found */
+    AvahiLookupResultFlags flags,  /**< Lookup flags */
+    void* userdata                   /**< Arbitrary user data passed to avahi_s_record_browser_new() */ );
+
+/** Create a new browsing object for arbitrary RRs */
+AvahiSRecordBrowser *avahi_s_record_browser_new(
+    AvahiServer *server,                    /**< The server object to which attach this query */
+    AvahiIfIndex interface,                 /**< Logical OS interface number where to look for the records, or AVAHI_IF_UNSPEC to look on interfaces */
+    AvahiProtocol protocol,                 /**< Protocol number to use when looking for the record, or AVAHI_PROTO_UNSPEC to look on all protocols */
+    AvahiKey *key,                          /**< The search key */
+    AvahiLookupFlags flags,                 /**< Lookup flags. Must have set either AVAHI_LOOKUP_FORCE_WIDE_AREA or AVAHI_LOOKUP_FORCE_MULTICAST, since domain based detection is not available here. */
+    AvahiSRecordBrowserCallback callback,   /**< The callback to call on browsing events */
+    void* userdata                          /**< Arbitrary use suppliable data which is passed to the callback */);
+
+/** Free an AvahiSRecordBrowser object */
+void avahi_s_record_browser_free(AvahiSRecordBrowser *b);
+
+/** Callback prototype for AvahiSHostNameResolver events */
+typedef void (*AvahiSHostNameResolverCallback)(
+    AvahiSHostNameResolver *r,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiResolverEvent event, /**< Resolving event */
+    const char *host_name,   /**< Host name which should be resolved. May differ in case from the query */
+    const AvahiAddress *a,    /**< The address, or NULL if the host name couldn't be resolved. */
+    AvahiLookupResultFlags flags,  /**< Lookup flags */
+    void* userdata);
+
+/** Create an AvahiSHostNameResolver object for resolving a host name to an adddress. See AvahiSRecordBrowser for more info on the paramters. */
+AvahiSHostNameResolver *avahi_s_host_name_resolver_new(
+    AvahiServer *server,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    const char *host_name,                  /**< The host name to look for */
+    AvahiProtocol aprotocol,                /**< The address family of the desired address or AVAHI_PROTO_UNSPEC if doesn't matter. */
+    AvahiLookupFlags flags,                 /**< Lookup flags. */
+    AvahiSHostNameResolverCallback calback,
+    void* userdata);
+
+/** Free a AvahiSHostNameResolver object */
+void avahi_s_host_name_resolver_free(AvahiSHostNameResolver *r);
+
+/** Callback prototype for AvahiSAddressResolver events */
+typedef void (*AvahiSAddressResolverCallback)(
+    AvahiSAddressResolver *r,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiResolverEvent event,
+    const AvahiAddress *a,
+    const char *host_name,   /**< A host name for the specified address, if one was found, i.e. event == AVAHI_RESOLVER_FOUND */
+    AvahiLookupResultFlags flags,  /**< Lookup flags */
+    void* userdata);
+
+/** Create an AvahiSAddressResolver object. See AvahiSRecordBrowser for more info on the paramters. */
+AvahiSAddressResolver *avahi_s_address_resolver_new(
+    AvahiServer *server,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    const AvahiAddress *address,
+    AvahiLookupFlags flags,                 /**< Lookup flags. */
+    AvahiSAddressResolverCallback calback,
+    void* userdata);
+
+/** Free an AvahiSAddressResolver object */
+void avahi_s_address_resolver_free(AvahiSAddressResolver *r);
+
+/** Callback prototype for AvahiSDomainBrowser events */
+typedef void (*AvahiSDomainBrowserCallback)(
+    AvahiSDomainBrowser *b,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiBrowserEvent event,
+    const char *domain,
+    AvahiLookupResultFlags flags,  /**< Lookup flags */
+    void* userdata);
+
+/** Create a new AvahiSDomainBrowser object */
+AvahiSDomainBrowser *avahi_s_domain_browser_new(
+    AvahiServer *server,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    const char *domain,
+    AvahiDomainBrowserType type,
+    AvahiLookupFlags flags,                 /**< Lookup flags. */
+    AvahiSDomainBrowserCallback callback,
+    void* userdata);
+
+/** Free an AvahiSDomainBrowser object */
+void avahi_s_domain_browser_free(AvahiSDomainBrowser *b);
+
+/** Callback prototype for AvahiSServiceTypeBrowser events */
+typedef void (*AvahiSServiceTypeBrowserCallback)(
+    AvahiSServiceTypeBrowser *b,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiBrowserEvent event,
+    const char *type,
+    const char *domain,
+    AvahiLookupResultFlags flags,  /**< Lookup flags */
+    void* userdata);
+
+/** Create a new AvahiSServiceTypeBrowser object. */
+AvahiSServiceTypeBrowser *avahi_s_service_type_browser_new(
+    AvahiServer *server,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    const char *domain,
+    AvahiLookupFlags flags,                 /**< Lookup flags. */
+    AvahiSServiceTypeBrowserCallback callback,
+    void* userdata);
+
+/** Free an AvahiSServiceTypeBrowser object */
+void avahi_s_service_type_browser_free(AvahiSServiceTypeBrowser *b);
+
+/** Callback prototype for AvahiSServiceBrowser events */
+typedef void (*AvahiSServiceBrowserCallback)(
+    AvahiSServiceBrowser *b,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiBrowserEvent event,
+    const char *name     /**< Service name, e.g. "Lennart's Files" */,
+    const char *type     /**< DNS-SD type, e.g. "_http._tcp" */,
+    const char *domain   /**< Domain of this service, e.g. "local" */,
+    AvahiLookupResultFlags flags,  /**< Lookup flags */
+    void* userdata);
+
+/** Create a new AvahiSServiceBrowser object. */
+AvahiSServiceBrowser *avahi_s_service_browser_new(
+    AvahiServer *server,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    const char *service_type /** DNS-SD service type, e.g. "_http._tcp" */,
+    const char *domain,
+    AvahiLookupFlags flags,                 /**< Lookup flags. */
+    AvahiSServiceBrowserCallback callback,
+    void* userdata);
+
+/** Free an AvahiSServiceBrowser object */
+void avahi_s_service_browser_free(AvahiSServiceBrowser *b);
+
+/** Callback prototype for AvahiSServiceResolver events */
+typedef void (*AvahiSServiceResolverCallback)(
+    AvahiSServiceResolver *r,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiResolverEvent event,  /**< Is AVAHI_RESOLVER_FOUND when the service was resolved successfully, and everytime it changes. Is AVAHI_RESOLVER_TIMOUT when the service failed to resolve or disappeared. */
+    const char *name,       /**< Service name */
+    const char *type,       /**< Service Type */
+    const char *domain,
+    const char *host_name,  /**< Host name of the service */
+    const AvahiAddress *a,   /**< The resolved host name */
+    uint16_t port,            /**< Service name */
+    AvahiStringList *txt,    /**< TXT record data */
+    AvahiLookupResultFlags flags,  /**< Lookup flags */
+    void* userdata);
+
+/** Create a new AvahiSServiceResolver object. The specified callback function will be called with the resolved service data. */
+AvahiSServiceResolver *avahi_s_service_resolver_new(
+    AvahiServer *server,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    const char *name,
+    const char *type,
+    const char *domain,
+    AvahiProtocol aprotocol,    /**< Address family of the desired service address. Use AVAHI_PROTO_UNSPEC if you don't care */
+    AvahiLookupFlags flags,                 /**< Lookup flags. */
+    AvahiSServiceResolverCallback calback,
+    void* userdata);
+
+/** Free an AvahiSServiceResolver object */
+void avahi_s_service_resolver_free(AvahiSServiceResolver *r);
+
+AVAHI_C_DECL_END
+
+#endif
diff --git a/avahi-0.6.31/avahi-core/multicast-lookup.c b/avahi-0.6.31/avahi-core/multicast-lookup.c
new file mode 100644
index 0000000..75988bf
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/multicast-lookup.c
@@ -0,0 +1,350 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+
+#include <avahi-common/malloc.h>
+#include <avahi-common/timeval.h>
+
+#include "internal.h"
+#include "browse.h"
+#include "socket.h"
+#include "log.h"
+#include "hashmap.h"
+#include "multicast-lookup.h"
+#include "rr-util.h"
+
+struct AvahiMulticastLookup {
+    AvahiMulticastLookupEngine *engine;
+    int dead;
+
+    AvahiKey *key, *cname_key;
+
+    AvahiMulticastLookupCallback callback;
+    void *userdata;
+
+    AvahiIfIndex interface;
+    AvahiProtocol protocol;
+
+    int queriers_added;
+
+    AvahiTimeEvent *all_for_now_event;
+
+    AVAHI_LLIST_FIELDS(AvahiMulticastLookup, lookups);
+    AVAHI_LLIST_FIELDS(AvahiMulticastLookup, by_key);
+};
+
+struct AvahiMulticastLookupEngine {
+    AvahiServer *server;
+
+    /* Lookups */
+    AVAHI_LLIST_HEAD(AvahiMulticastLookup, lookups);
+    AvahiHashmap *lookups_by_key;
+
+    int cleanup_dead;
+};
+
+static void all_for_now_callback(AvahiTimeEvent *e, void* userdata) {
+    AvahiMulticastLookup *l = userdata;
+
+    assert(e);
+    assert(l);
+
+    avahi_time_event_free(l->all_for_now_event);
+    l->all_for_now_event = NULL;
+
+    l->callback(l->engine, l->interface, l->protocol, AVAHI_BROWSER_ALL_FOR_NOW, AVAHI_LOOKUP_RESULT_MULTICAST, NULL, l->userdata);
+}
+
+AvahiMulticastLookup *avahi_multicast_lookup_new(
+    AvahiMulticastLookupEngine *e,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiKey *key,
+    AvahiMulticastLookupCallback callback,
+    void *userdata) {
+
+    AvahiMulticastLookup *l, *t;
+    struct timeval tv;
+
+    assert(e);
+    assert(AVAHI_IF_VALID(interface));
+    assert(AVAHI_PROTO_VALID(protocol));
+    assert(key);
+    assert(callback);
+
+    l = avahi_new(AvahiMulticastLookup, 1);
+    l->engine = e;
+    l->dead = 0;
+    l->key = avahi_key_ref(key);
+    l->cname_key = avahi_key_new_cname(l->key);
+    l->callback = callback;
+    l->userdata = userdata;
+    l->interface = interface;
+    l->protocol = protocol;
+    l->all_for_now_event = NULL;
+    l->queriers_added = 0;
+
+    t = avahi_hashmap_lookup(e->lookups_by_key, l->key);
+    AVAHI_LLIST_PREPEND(AvahiMulticastLookup, by_key, t, l);
+    avahi_hashmap_replace(e->lookups_by_key, avahi_key_ref(l->key), t);
+
+    AVAHI_LLIST_PREPEND(AvahiMulticastLookup, lookups, e->lookups, l);
+
+    avahi_querier_add_for_all(e->server, interface, protocol, l->key, &tv);
+    l->queriers_added = 1;
+
+    /* Add a second */
+    avahi_timeval_add(&tv, 1000000);
+
+    /* Issue the ALL_FOR_NOW event one second after the querier was initially created */
+    l->all_for_now_event = avahi_time_event_new(e->server->time_event_queue, &tv, all_for_now_callback, l);
+
+    return l;
+}
+
+static void lookup_stop(AvahiMulticastLookup *l) {
+    assert(l);
+
+    l->callback = NULL;
+
+    if (l->queriers_added) {
+        avahi_querier_remove_for_all(l->engine->server, l->interface, l->protocol, l->key);
+        l->queriers_added = 0;
+    }
+
+    if (l->all_for_now_event) {
+        avahi_time_event_free(l->all_for_now_event);
+        l->all_for_now_event = NULL;
+    }
+}
+
+static void lookup_destroy(AvahiMulticastLookup *l) {
+    AvahiMulticastLookup *t;
+    assert(l);
+
+    lookup_stop(l);
+
+    t = avahi_hashmap_lookup(l->engine->lookups_by_key, l->key);
+    AVAHI_LLIST_REMOVE(AvahiMulticastLookup, by_key, t, l);
+    if (t)
+        avahi_hashmap_replace(l->engine->lookups_by_key, avahi_key_ref(l->key), t);
+    else
+        avahi_hashmap_remove(l->engine->lookups_by_key, l->key);
+
+    AVAHI_LLIST_REMOVE(AvahiMulticastLookup, lookups, l->engine->lookups, l);
+
+    if (l->key)
+        avahi_key_unref(l->key);
+
+    if (l->cname_key)
+        avahi_key_unref(l->cname_key);
+
+    avahi_free(l);
+}
+
+void avahi_multicast_lookup_free(AvahiMulticastLookup *l) {
+    assert(l);
+
+    if (l->dead)
+        return;
+
+    l->dead = 1;
+    l->engine->cleanup_dead = 1;
+    lookup_stop(l);
+}
+
+void avahi_multicast_lookup_engine_cleanup(AvahiMulticastLookupEngine *e) {
+    AvahiMulticastLookup *l, *n;
+    assert(e);
+
+    while (e->cleanup_dead) {
+        e->cleanup_dead = 0;
+
+        for (l = e->lookups; l; l = n) {
+            n = l->lookups_next;
+
+            if (l->dead)
+                lookup_destroy(l);
+        }
+    }
+}
+
+struct cbdata {
+    AvahiMulticastLookupEngine *engine;
+    AvahiMulticastLookupCallback callback;
+    void *userdata;
+    AvahiKey *key, *cname_key;
+    AvahiInterface *interface;
+    unsigned n_found;
+};
+
+static void* scan_cache_callback(AvahiCache *c, AvahiKey *pattern, AvahiCacheEntry *e, void* userdata) {
+    struct cbdata *cbdata = userdata;
+
+    assert(c);
+    assert(pattern);
+    assert(e);
+    assert(cbdata);
+
+    cbdata->callback(
+        cbdata->engine,
+        cbdata->interface->hardware->index,
+        cbdata->interface->protocol,
+        AVAHI_BROWSER_NEW,
+        AVAHI_LOOKUP_RESULT_CACHED|AVAHI_LOOKUP_RESULT_MULTICAST,
+        e->record,
+        cbdata->userdata);
+
+    cbdata->n_found ++;
+
+    return NULL;
+}
+
+static void scan_interface_callback(AvahiInterfaceMonitor *m, AvahiInterface *i, void* userdata) {
+    struct cbdata *cbdata = userdata;
+
+    assert(m);
+    assert(i);
+    assert(cbdata);
+
+    cbdata->interface = i;
+
+    avahi_cache_walk(i->cache, cbdata->key, scan_cache_callback, cbdata);
+
+    if (cbdata->cname_key)
+        avahi_cache_walk(i->cache, cbdata->cname_key, scan_cache_callback, cbdata);
+
+    cbdata->interface = NULL;
+}
+
+unsigned avahi_multicast_lookup_engine_scan_cache(
+    AvahiMulticastLookupEngine *e,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiKey *key,
+    AvahiMulticastLookupCallback callback,
+    void *userdata) {
+
+    struct cbdata cbdata;
+
+    assert(e);
+    assert(key);
+    assert(callback);
+
+    assert(AVAHI_IF_VALID(interface));
+    assert(AVAHI_PROTO_VALID(protocol));
+
+    cbdata.engine = e;
+    cbdata.key = key;
+    cbdata.cname_key = avahi_key_new_cname(key);
+    cbdata.callback = callback;
+    cbdata.userdata = userdata;
+    cbdata.interface = NULL;
+    cbdata.n_found = 0;
+
+    avahi_interface_monitor_walk(e->server->monitor, interface, protocol, scan_interface_callback, &cbdata);
+
+    if (cbdata.cname_key)
+        avahi_key_unref(cbdata.cname_key);
+
+    return cbdata.n_found;
+}
+
+void avahi_multicast_lookup_engine_new_interface(AvahiMulticastLookupEngine *e, AvahiInterface *i) {
+    AvahiMulticastLookup *l;
+
+    assert(e);
+    assert(i);
+
+    for (l = e->lookups; l; l = l->lookups_next) {
+
+        if (l->dead || !l->callback)
+            continue;
+
+        if (l->queriers_added && avahi_interface_match(i, l->interface, l->protocol))
+            avahi_querier_add(i, l->key, NULL);
+    }
+}
+
+void avahi_multicast_lookup_engine_notify(AvahiMulticastLookupEngine *e, AvahiInterface *i, AvahiRecord *record, AvahiBrowserEvent event) {
+    AvahiMulticastLookup *l;
+
+    assert(e);
+    assert(record);
+    assert(i);
+
+    for (l = avahi_hashmap_lookup(e->lookups_by_key, record->key); l; l = l->by_key_next) {
+        if (l->dead || !l->callback)
+            continue;
+
+        if (avahi_interface_match(i, l->interface, l->protocol))
+            l->callback(e, i->hardware->index, i->protocol, event, AVAHI_LOOKUP_RESULT_MULTICAST, record, l->userdata);
+    }
+
+
+    if (record->key->clazz == AVAHI_DNS_CLASS_IN && record->key->type == AVAHI_DNS_TYPE_CNAME) {
+        /* It's a CNAME record, so we have to scan the all lookups to see if one matches */
+
+        for (l = e->lookups; l; l = l->lookups_next) {
+            AvahiKey *key;
+
+            if (l->dead || !l->callback)
+                continue;
+
+            if ((key = avahi_key_new_cname(l->key))) {
+                if (avahi_key_equal(record->key, key))
+                    l->callback(e, i->hardware->index, i->protocol, event, AVAHI_LOOKUP_RESULT_MULTICAST, record, l->userdata);
+
+                avahi_key_unref(key);
+            }
+        }
+    }
+}
+
+AvahiMulticastLookupEngine *avahi_multicast_lookup_engine_new(AvahiServer *s) {
+    AvahiMulticastLookupEngine *e;
+
+    assert(s);
+
+    e = avahi_new(AvahiMulticastLookupEngine, 1);
+    e->server = s;
+    e->cleanup_dead = 0;
+
+    /* Initialize lookup list */
+    e->lookups_by_key = avahi_hashmap_new((AvahiHashFunc) avahi_key_hash, (AvahiEqualFunc) avahi_key_equal, (AvahiFreeFunc) avahi_key_unref, NULL);
+    AVAHI_LLIST_HEAD_INIT(AvahiWideAreaLookup, e->lookups);
+
+    return e;
+}
+
+void avahi_multicast_lookup_engine_free(AvahiMulticastLookupEngine *e) {
+    assert(e);
+
+    while (e->lookups)
+        lookup_destroy(e->lookups);
+
+    avahi_hashmap_free(e->lookups_by_key);
+    avahi_free(e);
+}
+
diff --git a/avahi-0.6.31/avahi-core/multicast-lookup.h b/avahi-0.6.31/avahi-core/multicast-lookup.h
new file mode 100644
index 0000000..2707666
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/multicast-lookup.h
@@ -0,0 +1,51 @@
+#ifndef foomulticastlookuphfoo
+#define foomulticastlookuphfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#include "lookup.h"
+#include "browse.h"
+
+typedef struct AvahiMulticastLookupEngine AvahiMulticastLookupEngine;
+typedef struct AvahiMulticastLookup AvahiMulticastLookup;
+
+typedef void (*AvahiMulticastLookupCallback)(
+    AvahiMulticastLookupEngine *e,
+    AvahiIfIndex idx,
+    AvahiProtocol protocol,
+    AvahiBrowserEvent event,
+    AvahiLookupResultFlags flags,
+    AvahiRecord *r,
+    void *userdata);
+
+AvahiMulticastLookupEngine *avahi_multicast_lookup_engine_new(AvahiServer *s);
+void avahi_multicast_lookup_engine_free(AvahiMulticastLookupEngine *e);
+
+unsigned avahi_multicast_lookup_engine_scan_cache(AvahiMulticastLookupEngine *e, AvahiIfIndex idx, AvahiProtocol protocol, AvahiKey *key, AvahiMulticastLookupCallback callback, void *userdata);
+void avahi_multicast_lookup_engine_new_interface(AvahiMulticastLookupEngine *e, AvahiInterface *i);
+void avahi_multicast_lookup_engine_cleanup(AvahiMulticastLookupEngine *e);
+void avahi_multicast_lookup_engine_notify(AvahiMulticastLookupEngine *e, AvahiInterface *i, AvahiRecord *record, AvahiBrowserEvent event);
+
+AvahiMulticastLookup *avahi_multicast_lookup_new(AvahiMulticastLookupEngine *e, AvahiIfIndex idx, AvahiProtocol protocol, AvahiKey *key, AvahiMulticastLookupCallback callback, void *userdata);
+void avahi_multicast_lookup_free(AvahiMulticastLookup *q);
+
+
+#endif
+
diff --git a/avahi-0.6.31/avahi-core/netlink.c b/avahi-0.6.31/avahi-core/netlink.c
new file mode 100644
index 0000000..4ded5ec
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/netlink.c
@@ -0,0 +1,208 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <unistd.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/ioctl.h>
+#include <assert.h>
+
+#include <avahi-common/malloc.h>
+#include "netlink.h"
+#include "log.h"
+
+struct AvahiNetlink {
+    int fd;
+    unsigned seq;
+    AvahiNetlinkCallback callback;
+    void* userdata;
+    uint8_t* buffer;
+    size_t buffer_length;
+
+    const AvahiPoll *poll_api;
+    AvahiWatch *watch;
+};
+
+int avahi_netlink_work(AvahiNetlink *nl, int block) {
+    ssize_t bytes;
+    struct msghdr smsg;
+    struct cmsghdr *cmsg;
+    struct ucred *cred;
+    struct iovec iov;
+    struct nlmsghdr *p;
+    char cred_msg[CMSG_SPACE(sizeof(struct ucred))];
+
+    assert(nl);
+
+    iov.iov_base = nl->buffer;
+    iov.iov_len = nl->buffer_length;
+
+    smsg.msg_name = NULL;
+    smsg.msg_namelen = 0;
+    smsg.msg_iov = &iov;
+    smsg.msg_iovlen = 1;
+    smsg.msg_control = cred_msg;
+    smsg.msg_controllen = sizeof(cred_msg);
+    smsg.msg_flags = (block ? 0 : MSG_DONTWAIT);
+
+    if ((bytes = recvmsg(nl->fd, &smsg, 0)) < 0) {
+        if (errno == EAGAIN || errno == EINTR)
+            return 0;
+
+        avahi_log_error(__FILE__": recvmsg() failed: %s", strerror(errno));
+        return -1;
+    }
+
+    cmsg = CMSG_FIRSTHDR(&smsg);
+
+    if (!cmsg || cmsg->cmsg_type != SCM_CREDENTIALS) {
+        avahi_log_warn("No sender credentials received, ignoring data.");
+        return -1;
+    }
+
+    cred = (struct ucred*) CMSG_DATA(cmsg);
+
+    if (cred->uid != 0)
+        return -1;
+
+    p = (struct nlmsghdr *) nl->buffer;
+
+    assert(nl->callback);
+
+    for (; bytes > 0; p = NLMSG_NEXT(p, bytes)) {
+        if (!NLMSG_OK(p, (size_t) bytes)) {
+            avahi_log_warn(__FILE__": packet truncated");
+            return -1;
+        }
+
+        nl->callback(nl, p, nl->userdata);
+    }
+
+    return 0;
+}
+
+static void socket_event(AvahiWatch *w, int fd, AVAHI_GCC_UNUSED AvahiWatchEvent event, void *userdata) {
+    AvahiNetlink *nl = userdata;
+
+    assert(w);
+    assert(nl);
+    assert(fd == nl->fd);
+
+    avahi_netlink_work(nl, 0);
+}
+
+AvahiNetlink *avahi_netlink_new(const AvahiPoll *poll_api, uint32_t groups, void (*cb) (AvahiNetlink *nl, struct nlmsghdr *n, void* userdata), void* userdata) {
+    int fd = -1;
+    const int on = 1;
+    struct sockaddr_nl addr;
+    AvahiNetlink *nl = NULL;
+
+    assert(poll_api);
+    assert(cb);
+
+    if ((fd = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE)) < 0) {
+        avahi_log_error(__FILE__": socket(PF_NETLINK): %s", strerror(errno));
+        return NULL;
+    }
+
+    memset(&addr, 0, sizeof(addr));
+    addr.nl_family = AF_NETLINK;
+    addr.nl_groups = groups;
+    addr.nl_pid = getpid();
+
+    if (bind(fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
+        avahi_log_error(__FILE__": bind(): %s", strerror(errno));
+        goto fail;
+    }
+
+    if (setsockopt(fd, SOL_SOCKET, SO_PASSCRED, &on, sizeof(on)) < 0) {
+        avahi_log_error(__FILE__": SO_PASSCRED: %s", strerror(errno));
+        goto fail;
+    }
+
+    if (!(nl = avahi_new(AvahiNetlink, 1))) {
+        avahi_log_error(__FILE__": avahi_new() failed.");
+        goto fail;
+    }
+
+    nl->poll_api = poll_api;
+    nl->fd = fd;
+    nl->seq = 0;
+    nl->callback = cb;
+    nl->userdata = userdata;
+
+    if (!(nl->buffer = avahi_new(uint8_t, nl->buffer_length = 64*1024))) {
+        avahi_log_error(__FILE__": avahi_new() failed.");
+        goto fail;
+    }
+
+    if (!(nl->watch = poll_api->watch_new(poll_api, fd, AVAHI_WATCH_IN, socket_event, nl))) {
+        avahi_log_error(__FILE__": Failed to create watch.");
+        goto fail;
+    }
+
+    return nl;
+
+fail:
+
+    if (fd >= 0)
+        close(fd);
+
+    if (nl) {
+        avahi_free(nl->buffer);
+        avahi_free(nl);
+    }
+
+    return NULL;
+}
+
+void avahi_netlink_free(AvahiNetlink *nl) {
+    assert(nl);
+
+    if (nl->watch)
+        nl->poll_api->watch_free(nl->watch);
+
+    if (nl->fd >= 0)
+        close(nl->fd);
+
+    avahi_free(nl->buffer);
+    avahi_free(nl);
+}
+
+int avahi_netlink_send(AvahiNetlink *nl, struct nlmsghdr *m, unsigned *ret_seq) {
+    assert(nl);
+    assert(m);
+
+    m->nlmsg_seq = nl->seq++;
+    m->nlmsg_flags |= NLM_F_ACK;
+
+    if (send(nl->fd, m, m->nlmsg_len, 0) < 0) {
+        avahi_log_error(__FILE__": send(): %s", strerror(errno));
+        return -1;
+    }
+
+    if (ret_seq)
+        *ret_seq = m->nlmsg_seq;
+
+    return 0;
+}
diff --git a/avahi-0.6.31/avahi-core/netlink.h b/avahi-0.6.31/avahi-core/netlink.h
new file mode 100644
index 0000000..9c6eb28
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/netlink.h
@@ -0,0 +1,41 @@
+#ifndef foonetlinkhfoo
+#define foonetlinkhfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#include <sys/socket.h>
+#include <asm/types.h>
+#include <inttypes.h>
+
+#include <linux/netlink.h>
+#include <linux/rtnetlink.h>
+
+#include <avahi-common/watch.h>
+
+typedef struct AvahiNetlink AvahiNetlink;
+
+typedef void (*AvahiNetlinkCallback)(AvahiNetlink *n, struct nlmsghdr *m, void* userdata);
+
+AvahiNetlink *avahi_netlink_new(const AvahiPoll *poll_api, uint32_t groups, AvahiNetlinkCallback callback, void* userdata);
+void avahi_netlink_free(AvahiNetlink *n);
+int avahi_netlink_send(AvahiNetlink *n, struct nlmsghdr *m, unsigned *ret_seq);
+int avahi_netlink_work(AvahiNetlink *n, int block);
+
+#endif
diff --git a/avahi-0.6.31/avahi-core/prioq-test.c b/avahi-0.6.31/avahi-core/prioq-test.c
new file mode 100644
index 0000000..6d0fd62
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/prioq-test.c
@@ -0,0 +1,120 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <time.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <assert.h>
+
+#include <avahi-common/gccmacro.h>
+
+#include "prioq.h"
+
+#define POINTER_TO_INT(p) ((int) (long) (p))
+#define INT_TO_POINTER(i) ((void*) (long) (i))
+
+static int compare_int(const void* a, const void* b) {
+    int i = POINTER_TO_INT(a), j = POINTER_TO_INT(b);
+
+    return i < j ? -1 : (i > j ? 1 : 0);
+}
+
+static int compare_ptr(const void* a, const void* b) {
+    return a < b ? -1 : (a > b ? 1 : 0);
+}
+
+static void rec(AvahiPrioQueueNode *n) {
+    if (!n)
+        return;
+
+    if (n->left)
+        assert(n->left->parent == n);
+
+    if (n->right)
+        assert(n->right->parent == n);
+
+    if (n->parent) {
+        assert(n->parent->left == n || n->parent->right == n);
+
+        if (n->parent->left == n)
+            assert(n->next == n->parent->right);
+    }
+
+    if (!n->next) {
+        assert(n->queue->last == n);
+
+        if (n->parent && n->parent->left == n)
+            assert(n->parent->right == NULL);
+    }
+
+
+    if (n->parent) {
+        int a = POINTER_TO_INT(n->parent->data), b = POINTER_TO_INT(n->data);
+        if (a > b) {
+            printf("%i <= %i: NO\n", a, b);
+            abort();
+        }
+    }
+
+    rec(n->left);
+    rec(n->right);
+}
+
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
+    AvahiPrioQueue *q, *q2;
+    int i;
+
+    q = avahi_prio_queue_new(compare_int);
+    q2 = avahi_prio_queue_new(compare_ptr);
+
+    srand(time(NULL));
+
+    for (i = 0; i < 10000; i++)
+        avahi_prio_queue_put(q2, avahi_prio_queue_put(q, INT_TO_POINTER(random() & 0xFFFF)));
+
+    while (q2->root) {
+        rec(q->root);
+        rec(q2->root);
+
+        assert(q->n_nodes == q2->n_nodes);
+
+        printf("%i\n", POINTER_TO_INT(((AvahiPrioQueueNode*)q2->root->data)->data));
+
+        avahi_prio_queue_remove(q, q2->root->data);
+        avahi_prio_queue_remove(q2, q2->root);
+    }
+
+
+/*     prev = 0; */
+/*     while (q->root) { */
+/*         int v = GPOINTER_TO_INT(q->root->data); */
+/*         rec(q->root); */
+/*         printf("%i\n", v); */
+/*         avahi_prio_queue_remove(q, q->root); */
+/*         assert(v >= prev); */
+/*         prev = v; */
+/*     } */
+
+    avahi_prio_queue_free(q);
+    return 0;
+}
diff --git a/avahi-0.6.31/avahi-core/prioq.c b/avahi-0.6.31/avahi-core/prioq.c
new file mode 100644
index 0000000..28b5018
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/prioq.c
@@ -0,0 +1,388 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <assert.h>
+#include <stdlib.h>
+
+#include <avahi-common/malloc.h>
+
+#include "prioq.h"
+
+AvahiPrioQueue* avahi_prio_queue_new(AvahiPQCompareFunc compare) {
+    AvahiPrioQueue *q;
+    assert(compare);
+
+    if (!(q = avahi_new(AvahiPrioQueue, 1)))
+        return NULL; /* OOM */
+
+    q->root = q->last = NULL;
+    q->n_nodes = 0;
+    q->compare = compare;
+
+    return q;
+}
+
+void avahi_prio_queue_free(AvahiPrioQueue *q) {
+    assert(q);
+
+    while (q->last)
+        avahi_prio_queue_remove(q, q->last);
+
+    assert(!q->n_nodes);
+    avahi_free(q);
+}
+
+static AvahiPrioQueueNode* get_node_at_xy(AvahiPrioQueue *q, unsigned x, unsigned y) {
+    unsigned r;
+    AvahiPrioQueueNode *n;
+    assert(q);
+
+    n = q->root;
+    assert(n);
+
+    for (r = 0; r < y; r++) {
+        assert(n);
+
+        if ((x >> (y-r-1)) & 1)
+            n = n->right;
+        else
+            n = n->left;
+    }
+
+    assert(n->x == x);
+    assert(n->y == y);
+
+    return n;
+}
+
+static void exchange_nodes(AvahiPrioQueue *q, AvahiPrioQueueNode *a, AvahiPrioQueueNode *b) {
+    AvahiPrioQueueNode *l, *r, *p, *ap, *an, *bp, *bn;
+    unsigned t;
+    assert(q);
+    assert(a);
+    assert(b);
+    assert(a != b);
+
+    /* Swap positions */
+    t = a->x; a->x = b->x; b->x = t;
+    t = a->y; a->y = b->y; b->y = t;
+
+    if (a->parent == b) {
+        /* B is parent of A */
+
+        p = b->parent;
+        b->parent = a;
+
+        if ((a->parent = p)) {
+            if (a->parent->left == b)
+                a->parent->left = a;
+            else
+                a->parent->right = a;
+        } else
+            q->root = a;
+
+        if (b->left == a) {
+            if ((b->left = a->left))
+                b->left->parent = b;
+            a->left = b;
+
+            r = a->right;
+            if ((a->right = b->right))
+                a->right->parent = a;
+            if ((b->right = r))
+                b->right->parent = b;
+
+        } else {
+            if ((b->right = a->right))
+                b->right->parent = b;
+            a->right = b;
+
+            l = a->left;
+            if ((a->left = b->left))
+                a->left->parent = a;
+            if ((b->left = l))
+                b->left->parent = b;
+        }
+    } else if (b->parent == a) {
+        /* A ist parent of B */
+
+        p = a->parent;
+        a->parent = b;
+
+        if ((b->parent = p)) {
+            if (b->parent->left == a)
+                b->parent->left = b;
+            else
+                b->parent->right = b;
+        } else
+            q->root = b;
+
+        if (a->left == b) {
+            if ((a->left = b->left))
+                a->left->parent = a;
+            b->left = a;
+
+            r = a->right;
+            if ((a->right = b->right))
+                a->right->parent = a;
+            if ((b->right = r))
+                b->right->parent = b;
+        } else {
+            if ((a->right = b->right))
+                a->right->parent = a;
+            b->right = a;
+
+            l = a->left;
+            if ((a->left = b->left))
+                a->left->parent = a;
+            if ((b->left = l))
+                b->left->parent = b;
+        }
+    } else {
+        AvahiPrioQueueNode *apl = NULL, *bpl = NULL;
+
+        /* Swap parents */
+        ap = a->parent;
+        bp = b->parent;
+
+        if (ap)
+            apl = ap->left;
+        if (bp)
+            bpl = bp->left;
+
+        if ((a->parent = bp)) {
+            if (bpl == b)
+                bp->left = a;
+            else
+                bp->right = a;
+        } else
+            q->root = a;
+
+        if ((b->parent = ap)) {
+            if (apl == a)
+                ap->left = b;
+            else
+                ap->right = b;
+        } else
+            q->root = b;
+
+        /* Swap children */
+        l = a->left;
+        r = a->right;
+
+        if ((a->left = b->left))
+            a->left->parent = a;
+
+        if ((b->left = l))
+            b->left->parent = b;
+
+        if ((a->right = b->right))
+            a->right->parent = a;
+
+        if ((b->right = r))
+            b->right->parent = b;
+    }
+
+    /* Swap siblings */
+    ap = a->prev; an = a->next;
+    bp = b->prev; bn = b->next;
+
+    if (a->next == b) {
+        /* A is predecessor of B */
+        a->prev = b;
+        b->next = a;
+
+        if ((a->next = bn))
+            a->next->prev = a;
+        else
+            q->last = a;
+
+        if ((b->prev = ap))
+            b->prev->next = b;
+
+    } else if (b->next == a) {
+        /* B is predecessor of A */
+        a->next = b;
+        b->prev = a;
+
+        if ((a->prev = bp))
+            a->prev->next = a;
+
+        if ((b->next = an))
+            b->next->prev = b;
+        else
+            q->last = b;
+
+    } else {
+        /* A is no neighbour of B */
+
+        if ((a->prev = bp))
+            a->prev->next = a;
+
+        if ((a->next = bn))
+            a->next->prev = a;
+        else
+            q->last = a;
+
+        if ((b->prev = ap))
+            b->prev->next = b;
+
+        if ((b->next = an))
+            b->next->prev = b;
+        else
+            q->last = b;
+    }
+}
+
+/* Move a node to the correct position */
+void avahi_prio_queue_shuffle(AvahiPrioQueue *q, AvahiPrioQueueNode *n) {
+    assert(q);
+    assert(n);
+    assert(n->queue == q);
+
+    /* Move up until the position is OK */
+    while (n->parent && q->compare(n->parent->data, n->data) > 0)
+        exchange_nodes(q, n, n->parent);
+
+    /* Move down until the position is OK */
+    for (;;) {
+        AvahiPrioQueueNode *min;
+
+        if (!(min = n->left)) {
+            /* No children */
+            assert(!n->right);
+            break;
+        }
+
+        if (n->right && q->compare(n->right->data, min->data) < 0)
+            min = n->right;
+
+        /* min now contains the smaller one of our two children */
+
+        if (q->compare(n->data, min->data) <= 0)
+            /* Order OK */
+            break;
+
+        exchange_nodes(q, n, min);
+    }
+}
+
+AvahiPrioQueueNode* avahi_prio_queue_put(AvahiPrioQueue *q, void* data) {
+    AvahiPrioQueueNode *n;
+    assert(q);
+
+    if (!(n = avahi_new(AvahiPrioQueueNode, 1)))
+        return NULL; /* OOM */
+
+    n->queue = q;
+    n->data = data;
+
+    if (q->last) {
+        assert(q->root);
+        assert(q->n_nodes);
+
+        n->y = q->last->y;
+        n->x = q->last->x+1;
+
+        if (n->x >= ((unsigned) 1 << n->y)) {
+            n->x = 0;
+            n->y++;
+        }
+
+        q->last->next = n;
+        n->prev = q->last;
+
+        assert(n->y > 0);
+        n->parent = get_node_at_xy(q, n->x/2, n->y-1);
+
+        if (n->x & 1)
+            n->parent->right = n;
+        else
+            n->parent->left = n;
+    } else {
+        assert(!q->root);
+        assert(!q->n_nodes);
+
+        n->y = n->x = 0;
+        q->root = n;
+        n->prev = n->parent = NULL;
+    }
+
+    n->next = n->left = n->right = NULL;
+    q->last = n;
+    q->n_nodes++;
+
+    avahi_prio_queue_shuffle(q, n);
+
+    return n;
+}
+
+void avahi_prio_queue_remove(AvahiPrioQueue *q, AvahiPrioQueueNode *n) {
+    assert(q);
+    assert(n);
+    assert(q == n->queue);
+
+    if (n != q->last) {
+        AvahiPrioQueueNode *replacement = q->last;
+        exchange_nodes(q, replacement, n);
+        avahi_prio_queue_remove(q, n);
+        avahi_prio_queue_shuffle(q, replacement);
+        return;
+    }
+
+    assert(n == q->last);
+    assert(!n->next);
+    assert(!n->left);
+    assert(!n->right);
+
+    q->last = n->prev;
+
+    if (n->prev) {
+        n->prev->next = NULL;
+        assert(n->parent);
+    } else
+        assert(!n->parent);
+
+    if (n->parent) {
+        assert(n->prev);
+        if (n->parent->left == n) {
+            assert(n->parent->right == NULL);
+            n->parent->left = NULL;
+        } else {
+            assert(n->parent->right == n);
+            assert(n->parent->left != NULL);
+            n->parent->right = NULL;
+        }
+    } else {
+        assert(q->root == n);
+        assert(!n->prev);
+        assert(q->n_nodes == 1);
+        q->root = NULL;
+    }
+
+    avahi_free(n);
+
+    assert(q->n_nodes > 0);
+    q->n_nodes--;
+}
+
diff --git a/avahi-0.6.31/avahi-core/prioq.h b/avahi-0.6.31/avahi-core/prioq.h
new file mode 100644
index 0000000..b3d31eb
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/prioq.h
@@ -0,0 +1,49 @@
+#ifndef fooprioqhfoo
+#define fooprioqhfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+typedef struct AvahiPrioQueue AvahiPrioQueue;
+typedef struct AvahiPrioQueueNode AvahiPrioQueueNode;
+
+typedef int (*AvahiPQCompareFunc)(const void* a, const void* b);
+
+struct AvahiPrioQueue {
+    AvahiPrioQueueNode *root, *last;
+    unsigned n_nodes;
+    AvahiPQCompareFunc compare;
+};
+
+struct AvahiPrioQueueNode {
+    AvahiPrioQueue *queue;
+    void* data;
+    unsigned x, y;
+    AvahiPrioQueueNode *left, *right, *parent, *next, *prev;
+};
+
+AvahiPrioQueue* avahi_prio_queue_new(AvahiPQCompareFunc compare);
+void avahi_prio_queue_free(AvahiPrioQueue *q);
+
+AvahiPrioQueueNode* avahi_prio_queue_put(AvahiPrioQueue *q, void* data);
+void avahi_prio_queue_remove(AvahiPrioQueue *q, AvahiPrioQueueNode *n);
+
+void avahi_prio_queue_shuffle(AvahiPrioQueue *q, AvahiPrioQueueNode *n);
+
+#endif
diff --git a/avahi-0.6.31/avahi-core/probe-sched.c b/avahi-0.6.31/avahi-core/probe-sched.c
new file mode 100644
index 0000000..1e63411
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/probe-sched.c
@@ -0,0 +1,397 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+
+#include <avahi-common/domain.h>
+#include <avahi-common/timeval.h>
+#include <avahi-common/malloc.h>
+
+#include "probe-sched.h"
+#include "log.h"
+#include "rr-util.h"
+
+#define AVAHI_PROBE_HISTORY_MSEC 150
+#define AVAHI_PROBE_DEFER_MSEC 50
+
+typedef struct AvahiProbeJob AvahiProbeJob;
+
+struct AvahiProbeJob {
+    AvahiProbeScheduler *scheduler;
+    AvahiTimeEvent *time_event;
+
+    int chosen; /* Use for packet assembling */
+    int done;
+    struct timeval delivery;
+
+    AvahiRecord *record;
+
+    AVAHI_LLIST_FIELDS(AvahiProbeJob, jobs);
+};
+
+struct AvahiProbeScheduler {
+    AvahiInterface *interface;
+    AvahiTimeEventQueue *time_event_queue;
+
+    AVAHI_LLIST_HEAD(AvahiProbeJob, jobs);
+    AVAHI_LLIST_HEAD(AvahiProbeJob, history);
+};
+
+static AvahiProbeJob* job_new(AvahiProbeScheduler *s, AvahiRecord *record, int done) {
+    AvahiProbeJob *pj;
+
+    assert(s);
+    assert(record);
+
+    if (!(pj = avahi_new(AvahiProbeJob, 1))) {
+        avahi_log_error(__FILE__": Out of memory");
+        return NULL; /* OOM */
+    }
+
+    pj->scheduler = s;
+    pj->record = avahi_record_ref(record);
+    pj->time_event = NULL;
+    pj->chosen = 0;
+
+    if ((pj->done = done))
+        AVAHI_LLIST_PREPEND(AvahiProbeJob, jobs, s->history, pj);
+    else
+        AVAHI_LLIST_PREPEND(AvahiProbeJob, jobs, s->jobs, pj);
+
+    return pj;
+}
+
+static void job_free(AvahiProbeScheduler *s, AvahiProbeJob *pj) {
+    assert(pj);
+
+    if (pj->time_event)
+        avahi_time_event_free(pj->time_event);
+
+    if (pj->done)
+        AVAHI_LLIST_REMOVE(AvahiProbeJob, jobs, s->history, pj);
+    else
+        AVAHI_LLIST_REMOVE(AvahiProbeJob, jobs, s->jobs, pj);
+
+    avahi_record_unref(pj->record);
+    avahi_free(pj);
+}
+
+static void elapse_callback(AvahiTimeEvent *e, void* data);
+
+static void job_set_elapse_time(AvahiProbeScheduler *s, AvahiProbeJob *pj, unsigned msec, unsigned jitter) {
+    struct timeval tv;
+
+    assert(s);
+    assert(pj);
+
+    avahi_elapse_time(&tv, msec, jitter);
+
+    if (pj->time_event)
+        avahi_time_event_update(pj->time_event, &tv);
+    else
+        pj->time_event = avahi_time_event_new(s->time_event_queue, &tv, elapse_callback, pj);
+}
+
+static void job_mark_done(AvahiProbeScheduler *s, AvahiProbeJob *pj) {
+    assert(s);
+    assert(pj);
+
+    assert(!pj->done);
+
+    AVAHI_LLIST_REMOVE(AvahiProbeJob, jobs, s->jobs, pj);
+    AVAHI_LLIST_PREPEND(AvahiProbeJob, jobs, s->history, pj);
+
+    pj->done = 1;
+
+    job_set_elapse_time(s, pj, AVAHI_PROBE_HISTORY_MSEC, 0);
+    gettimeofday(&pj->delivery, NULL);
+}
+
+AvahiProbeScheduler *avahi_probe_scheduler_new(AvahiInterface *i) {
+    AvahiProbeScheduler *s;
+
+    assert(i);
+
+    if (!(s = avahi_new(AvahiProbeScheduler, 1))) {
+        avahi_log_error(__FILE__": Out of memory");
+        return NULL;
+    }
+
+    s->interface = i;
+    s->time_event_queue = i->monitor->server->time_event_queue;
+
+    AVAHI_LLIST_HEAD_INIT(AvahiProbeJob, s->jobs);
+    AVAHI_LLIST_HEAD_INIT(AvahiProbeJob, s->history);
+
+    return s;
+}
+
+void avahi_probe_scheduler_free(AvahiProbeScheduler *s) {
+    assert(s);
+
+    avahi_probe_scheduler_clear(s);
+    avahi_free(s);
+}
+
+void avahi_probe_scheduler_clear(AvahiProbeScheduler *s) {
+    assert(s);
+
+    while (s->jobs)
+        job_free(s, s->jobs);
+    while (s->history)
+        job_free(s, s->history);
+}
+
+static int packet_add_probe_query(AvahiProbeScheduler *s, AvahiDnsPacket *p, AvahiProbeJob *pj) {
+    size_t size;
+    AvahiKey *k;
+    int b;
+
+    assert(s);
+    assert(p);
+    assert(pj);
+
+    assert(!pj->chosen);
+
+    /* Estimate the size for this record */
+    size =
+        avahi_key_get_estimate_size(pj->record->key) +
+        avahi_record_get_estimate_size(pj->record);
+
+    /* Too large */
+    if (size > avahi_dns_packet_space(p))
+        return 0;
+
+    /* Create the probe query */
+    if (!(k = avahi_key_new(pj->record->key->name, pj->record->key->clazz, AVAHI_DNS_TYPE_ANY)))
+        return 0; /* OOM */
+
+    b = !!avahi_dns_packet_append_key(p, k, 0);
+    assert(b);
+
+    /* Mark this job for addition to the packet */
+    pj->chosen = 1;
+
+    /* Scan for more jobs whith matching key pattern */
+    for (pj = s->jobs; pj; pj = pj->jobs_next) {
+        if (pj->chosen)
+            continue;
+
+        /* Does the record match the probe? */
+        if (k->clazz != pj->record->key->clazz || !avahi_domain_equal(k->name, pj->record->key->name))
+            continue;
+
+        /* This job wouldn't fit in */
+        if (avahi_record_get_estimate_size(pj->record) > avahi_dns_packet_space(p))
+            break;
+
+        /* Mark this job for addition to the packet */
+        pj->chosen = 1;
+    }
+
+    avahi_key_unref(k);
+
+    return 1;
+}
+
+static void elapse_callback(AVAHI_GCC_UNUSED AvahiTimeEvent *e, void* data) {
+    AvahiProbeJob *pj = data, *next;
+    AvahiProbeScheduler *s;
+    AvahiDnsPacket *p;
+    unsigned n;
+
+    assert(pj);
+    s = pj->scheduler;
+
+    if (pj->done) {
+        /* Lets remove it  from the history */
+        job_free(s, pj);
+        return;
+    }
+
+    if (!(p = avahi_dns_packet_new_query(s->interface->hardware->mtu)))
+        return; /* OOM */
+    n = 1;
+
+    /* Add the import probe */
+    if (!packet_add_probe_query(s, p, pj)) {
+        size_t size;
+        AvahiKey *k;
+        int b;
+
+        avahi_dns_packet_free(p);
+
+        /* The probe didn't fit in the package, so let's allocate a larger one */
+
+        size =
+            avahi_key_get_estimate_size(pj->record->key) +
+            avahi_record_get_estimate_size(pj->record) +
+            AVAHI_DNS_PACKET_HEADER_SIZE;
+
+        if (!(p = avahi_dns_packet_new_query(size + AVAHI_DNS_PACKET_EXTRA_SIZE)))
+            return; /* OOM */
+
+        if (!(k = avahi_key_new(pj->record->key->name, pj->record->key->clazz, AVAHI_DNS_TYPE_ANY))) {
+            avahi_dns_packet_free(p);
+            return;  /* OOM */
+        }
+
+        b = avahi_dns_packet_append_key(p, k, 0) && avahi_dns_packet_append_record(p, pj->record, 0, 0);
+        avahi_key_unref(k);
+
+        if (b) {
+            avahi_dns_packet_set_field(p, AVAHI_DNS_FIELD_NSCOUNT, 1);
+            avahi_dns_packet_set_field(p, AVAHI_DNS_FIELD_QDCOUNT, 1);
+            avahi_interface_send_packet(s->interface, p);
+        } else
+            avahi_log_warn("Probe record too large, cannot send");
+
+        avahi_dns_packet_free(p);
+        job_mark_done(s, pj);
+
+        return;
+    }
+
+    /* Try to fill up packet with more probes, if available */
+    for (pj = s->jobs; pj; pj = pj->jobs_next) {
+
+        if (pj->chosen)
+            continue;
+
+        if (!packet_add_probe_query(s, p, pj))
+            break;
+
+        n++;
+    }
+
+    avahi_dns_packet_set_field(p, AVAHI_DNS_FIELD_QDCOUNT, n);
+
+    n = 0;
+
+    /* Now add the chosen records to the authorative section */
+    for (pj = s->jobs; pj; pj = next) {
+
+        next = pj->jobs_next;
+
+        if (!pj->chosen)
+            continue;
+
+        if (!avahi_dns_packet_append_record(p, pj->record, 0, 0)) {
+/*             avahi_log_warn("Bad probe size estimate!"); */
+
+            /* Unmark all following jobs */
+            for (; pj; pj = pj->jobs_next)
+                pj->chosen = 0;
+
+            break;
+        }
+
+        job_mark_done(s, pj);
+
+        n ++;
+    }
+
+    avahi_dns_packet_set_field(p, AVAHI_DNS_FIELD_NSCOUNT, n);
+
+    /* Send it now */
+    avahi_interface_send_packet(s->interface, p);
+    avahi_dns_packet_free(p);
+}
+
+static AvahiProbeJob* find_scheduled_job(AvahiProbeScheduler *s, AvahiRecord *record) {
+    AvahiProbeJob *pj;
+
+    assert(s);
+    assert(record);
+
+    for (pj = s->jobs; pj; pj = pj->jobs_next) {
+        assert(!pj->done);
+
+        if (avahi_record_equal_no_ttl(pj->record, record))
+            return pj;
+    }
+
+    return NULL;
+}
+
+static AvahiProbeJob* find_history_job(AvahiProbeScheduler *s, AvahiRecord *record) {
+    AvahiProbeJob *pj;
+
+    assert(s);
+    assert(record);
+
+    for (pj = s->history; pj; pj = pj->jobs_next) {
+        assert(pj->done);
+
+        if (avahi_record_equal_no_ttl(pj->record, record)) {
+            /* Check whether this entry is outdated */
+
+            if (avahi_age(&pj->delivery) > AVAHI_PROBE_HISTORY_MSEC*1000) {
+                /* it is outdated, so let's remove it */
+                job_free(s, pj);
+                return NULL;
+            }
+
+            return pj;
+        }
+    }
+
+    return NULL;
+}
+
+int avahi_probe_scheduler_post(AvahiProbeScheduler *s, AvahiRecord *record, int immediately) {
+    AvahiProbeJob *pj;
+    struct timeval tv;
+
+    assert(s);
+    assert(record);
+    assert(!avahi_key_is_pattern(record->key));
+
+    if ((pj = find_history_job(s, record)))
+        return 0;
+
+    avahi_elapse_time(&tv, immediately ? 0 : AVAHI_PROBE_DEFER_MSEC, 0);
+
+    if ((pj = find_scheduled_job(s, record))) {
+
+        if (avahi_timeval_compare(&tv, &pj->delivery) < 0) {
+            /* If the new entry should be scheduled earlier, update the old entry */
+            pj->delivery = tv;
+            avahi_time_event_update(pj->time_event, &pj->delivery);
+        }
+
+        return 1;
+    } else {
+        /* Create a new job and schedule it */
+        if (!(pj = job_new(s, record, 0)))
+            return 0; /* OOM */
+
+        pj->delivery = tv;
+        pj->time_event = avahi_time_event_new(s->time_event_queue, &pj->delivery, elapse_callback, pj);
+
+
+/*     avahi_log_debug("Accepted new probe job."); */
+
+        return 1;
+    }
+}
diff --git a/avahi-0.6.31/avahi-core/probe-sched.h b/avahi-0.6.31/avahi-core/probe-sched.h
new file mode 100644
index 0000000..e47de41
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/probe-sched.h
@@ -0,0 +1,34 @@
+#ifndef fooprobeschedhfoo
+#define fooprobeschedhfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+typedef struct AvahiProbeScheduler AvahiProbeScheduler;
+
+#include <avahi-common/address.h>
+#include "iface.h"
+
+AvahiProbeScheduler *avahi_probe_scheduler_new(AvahiInterface *i);
+void avahi_probe_scheduler_free(AvahiProbeScheduler *s);
+void avahi_probe_scheduler_clear(AvahiProbeScheduler *s);
+
+int avahi_probe_scheduler_post(AvahiProbeScheduler *s, AvahiRecord *record, int immediately);
+
+#endif
diff --git a/avahi-0.6.31/avahi-core/publish.h b/avahi-0.6.31/avahi-core/publish.h
new file mode 100644
index 0000000..90797de
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/publish.h
@@ -0,0 +1,175 @@
+#ifndef foopublishhfoo
+#define foopublishhfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+/** \file core/publish.h Functions for publising local services and RRs */
+
+/** \example core-publish-service.c Example how to register a DNS-SD
+ * service using an embedded mDNS stack. It behaves like a network
+ * printer registering both an IPP and a BSD LPR service. */
+
+/** A group of locally registered DNS RRs */
+typedef struct AvahiSEntryGroup AvahiSEntryGroup;
+
+#include <avahi-common/cdecl.h>
+#include <avahi-core/core.h>
+
+AVAHI_C_DECL_BEGIN
+
+/** Prototype for callback functions which are called whenever the state of an AvahiSEntryGroup object changes */
+typedef void (*AvahiSEntryGroupCallback) (AvahiServer *s, AvahiSEntryGroup *g, AvahiEntryGroupState state, void* userdata);
+
+/** Iterate through all local entries of the server. (when g is NULL)
+ * or of a specified entry group. At the first call state should point
+ * to a NULL initialized void pointer, That pointer is used to track
+ * the current iteration. It is not safe to call any other
+ * avahi_server_xxx() function during the iteration. If the last entry
+ * has been read, NULL is returned. */
+const AvahiRecord *avahi_server_iterate(AvahiServer *s, AvahiSEntryGroup *g, void **state);
+
+/** Create a new entry group. The specified callback function is
+ * called whenever the state of the group changes. Use entry group
+ * objects to keep track of you RRs. Add new RRs to a group using
+ * avahi_server_add_xxx(). Make sure to call avahi_s_entry_group_commit()
+ * to start the registration process for your RRs */
+AvahiSEntryGroup *avahi_s_entry_group_new(AvahiServer *s, AvahiSEntryGroupCallback callback, void* userdata);
+
+/** Free an entry group. All RRs assigned to the group are removed from the server */
+void avahi_s_entry_group_free(AvahiSEntryGroup *g);
+
+/** Commit an entry group. This starts the probing and registration process for all RRs in the group */
+int avahi_s_entry_group_commit(AvahiSEntryGroup *g);
+
+/** Remove all entries from the entry group and reset the state to AVAHI_ENTRY_GROUP_UNCOMMITED. */
+void avahi_s_entry_group_reset(AvahiSEntryGroup *g);
+
+/** Return 1 if the entry group is empty, i.e. has no records attached. */
+int avahi_s_entry_group_is_empty(AvahiSEntryGroup *g);
+
+/** Return the current state of the specified entry group */
+AvahiEntryGroupState avahi_s_entry_group_get_state(AvahiSEntryGroup *g);
+
+/** Change the opaque user data pointer attached to an entry group object */
+void avahi_s_entry_group_set_data(AvahiSEntryGroup *g, void* userdata);
+
+/** Return the opaque user data pointer currently set for the entry group object */
+void* avahi_s_entry_group_get_data(AvahiSEntryGroup *g);
+
+/** Add a new resource record to the server. Returns 0 on success, negative otherwise. */
+int avahi_server_add(
+    AvahiServer *s,           /**< The server object to add this record to */
+    AvahiSEntryGroup *g,       /**< An entry group object if this new record shall be attached to one, or NULL. If you plan to remove the record sometime later you a required to pass an entry group object here. */
+    AvahiIfIndex interface,   /**< A numeric index of a network interface to attach this record to, or AVAHI_IF_UNSPEC to attach this record to all interfaces */
+    AvahiProtocol protocol,   /**< A protocol family to attach this record to. One of the AVAHI_PROTO_xxx constants. Use AVAHI_PROTO_UNSPEC to make this record available on all protocols (wich means on both IPv4 and IPv6). */
+    AvahiPublishFlags flags,    /**< Special flags for this record */
+    AvahiRecord *r            /**< The record to add. This function increases the reference counter of this object. */);
+
+/** Add an IP address mapping to the server. This will add both the
+ * host-name-to-address and the reverse mapping to the server. See
+ * avahi_server_add() for more information. If adding one of the RRs
+ * fails, the function returns with an error, but it is not defined if
+ * the other RR is deleted from the server or not. Therefore, you have
+ * to free the AvahiSEntryGroup and create a new one before
+ * proceeding. */
+int avahi_server_add_address(
+    AvahiServer *s,
+    AvahiSEntryGroup *g,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiPublishFlags flags,
+    const char *name,
+    AvahiAddress *a);
+
+/** Add an DNS-SD service to the Server. This will add all required
+ * RRs to the server. See avahi_server_add() for more information.  If
+ * adding one of the RRs fails, the function returns with an error,
+ * but it is not defined if the other RR is deleted from the server or
+ * not. Therefore, you have to free the AvahiSEntryGroup and create a
+ * new one before proceeding. */
+int avahi_server_add_service(
+    AvahiServer *s,
+    AvahiSEntryGroup *g,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiPublishFlags flags,
+    const char *name,         /**< Service name, e.g. "Lennart's Files" */
+    const char *type,         /**< DNS-SD type, e.g. "_http._tcp" */
+    const char *domain,
+    const char *host,         /**< Host name where this servcie resides, or NULL if on the local host */
+    uint16_t port,              /**< Port number of the service */
+    ...  /**< Text records, terminated by NULL */) AVAHI_GCC_SENTINEL;
+
+/** Mostly identical to avahi_server_add_service(), but takes an AvahiStringList object for the TXT records.  The AvahiStringList object is copied. */
+int avahi_server_add_service_strlst(
+    AvahiServer *s,
+    AvahiSEntryGroup *g,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiPublishFlags flags,
+    const char *name,
+    const char *type,
+    const char *domain,
+    const char *host,
+    uint16_t port,
+    AvahiStringList *strlst);
+
+/** Add a subtype for an already existing service */
+int avahi_server_add_service_subtype(
+    AvahiServer *s,
+    AvahiSEntryGroup *g,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiPublishFlags flags,
+    const char *name,         /**< Specify the name of main service you already added here */
+    const char *type,         /**< Specify the main type of the service you already added here */
+    const char *domain,       /**< Specify the main type of the service you already added here */
+    const char *subtype       /**< The new subtype for the specified service */ );
+
+/** Update the TXT record for a service with the data from the specified string list */
+int avahi_server_update_service_txt_strlst(
+    AvahiServer *s,
+    AvahiSEntryGroup *g,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiPublishFlags flags,
+    const char *name,
+    const char *type,
+    const char *domain,
+    AvahiStringList *strlst);
+
+/** Update the TXT record for a service with the NULL termonate list of strings */
+int avahi_server_update_service_txt(
+    AvahiServer *s,
+    AvahiSEntryGroup *g,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiPublishFlags flags,
+    const char *name,
+    const char *type,
+    const char *domain,
+    ...) AVAHI_GCC_SENTINEL;
+
+/** Check if there is a service locally defined and return the entry group it is attached to. Returns NULL if the service isn't local*/
+int avahi_server_get_group_of_service(AvahiServer *s, AvahiIfIndex interface, AvahiProtocol protocol, const char *name, const char *type, const char *domain, AvahiSEntryGroup** ret_group);
+
+AVAHI_C_DECL_END
+
+#endif
diff --git a/avahi-0.6.31/avahi-core/querier-test.c b/avahi-0.6.31/avahi-core/querier-test.c
new file mode 100644
index 0000000..e1ce913
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/querier-test.c
@@ -0,0 +1,122 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <assert.h>
+
+#include <avahi-common/malloc.h>
+#include <avahi-common/simple-watch.h>
+#include <avahi-common/alternative.h>
+#include <avahi-common/timeval.h>
+
+#include <avahi-core/core.h>
+#include <avahi-core/log.h>
+#include <avahi-core/publish.h>
+#include <avahi-core/lookup.h>
+
+#define DOMAIN NULL
+#define SERVICE_TYPE "_http._tcp"
+
+static AvahiSServiceBrowser *service_browser1 = NULL, *service_browser2 = NULL;
+static const AvahiPoll * poll_api = NULL;
+static AvahiServer *server = NULL;
+static AvahiSimplePoll *simple_poll;
+
+static const char *browser_event_to_string(AvahiBrowserEvent event) {
+    switch (event) {
+        case AVAHI_BROWSER_NEW : return "NEW";
+        case AVAHI_BROWSER_REMOVE : return "REMOVE";
+        case AVAHI_BROWSER_CACHE_EXHAUSTED : return "CACHE_EXHAUSTED";
+        case AVAHI_BROWSER_ALL_FOR_NOW : return "ALL_FOR_NOW";
+        case AVAHI_BROWSER_FAILURE : return "FAILURE";
+    }
+
+    abort();
+}
+
+static void sb_callback(
+    AvahiSServiceBrowser *b,
+    AvahiIfIndex iface,
+    AvahiProtocol protocol,
+    AvahiBrowserEvent event,
+    const char *name,
+    const char *service_type,
+    const char *domain,
+    AvahiLookupResultFlags flags,
+    AVAHI_GCC_UNUSED void* userdata) {
+    avahi_log_debug("SB%i: (%i.%s) <%s> as <%s> in <%s> [%s] cached=%i", b == service_browser1 ? 1 : 2, iface, avahi_proto_to_string(protocol), name, service_type, domain, browser_event_to_string(event), !!(flags & AVAHI_LOOKUP_RESULT_CACHED));
+}
+
+static void create_second_service_browser(AvahiTimeout *timeout, AVAHI_GCC_UNUSED void* userdata) {
+
+    service_browser2 = avahi_s_service_browser_new(server, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, SERVICE_TYPE, DOMAIN, 0, sb_callback, NULL);
+    assert(service_browser2);
+
+    poll_api->timeout_free(timeout);
+}
+
+static void quit(AVAHI_GCC_UNUSED AvahiTimeout *timeout, AVAHI_GCC_UNUSED void *userdata) {
+    avahi_simple_poll_quit(simple_poll);
+}
+
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
+    struct timeval tv;
+    AvahiServerConfig config;
+
+    simple_poll = avahi_simple_poll_new();
+    assert(simple_poll);
+
+    poll_api = avahi_simple_poll_get(simple_poll);
+    assert(poll_api);
+
+    avahi_server_config_init(&config);
+    config.publish_hinfo = 0;
+    config.publish_addresses = 0;
+    config.publish_workstation = 0;
+    config.publish_domain = 0;
+
+    avahi_address_parse("192.168.50.1", AVAHI_PROTO_UNSPEC, &config.wide_area_servers[0]);
+    config.n_wide_area_servers = 1;
+    config.enable_wide_area = 1;
+
+    server = avahi_server_new(poll_api, &config, NULL, NULL, NULL);
+    assert(server);
+    avahi_server_config_free(&config);
+
+    service_browser1 = avahi_s_service_browser_new(server, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, SERVICE_TYPE, DOMAIN, 0, sb_callback, NULL);
+    assert(service_browser1);
+
+    poll_api->timeout_new(poll_api, avahi_elapse_time(&tv, 10000, 0), create_second_service_browser, NULL);
+
+    poll_api->timeout_new(poll_api, avahi_elapse_time(&tv, 60000, 0), quit, NULL);
+
+
+    for (;;)
+        if (avahi_simple_poll_iterate(simple_poll, -1) != 0)
+            break;
+
+    avahi_server_free(server);
+    avahi_simple_poll_free(simple_poll);
+
+    return 0;
+}
diff --git a/avahi-0.6.31/avahi-core/querier.c b/avahi-0.6.31/avahi-core/querier.c
new file mode 100644
index 0000000..d9dc1fb
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/querier.c
@@ -0,0 +1,268 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+
+#include <avahi-common/timeval.h>
+#include <avahi-common/malloc.h>
+#include <avahi-common/error.h>
+#include <avahi-common/domain.h>
+
+#include "querier.h"
+#include "log.h"
+
+struct AvahiQuerier {
+    AvahiInterface *interface;
+
+    AvahiKey *key;
+    int n_used;
+
+    unsigned sec_delay;
+
+    AvahiTimeEvent *time_event;
+
+    struct timeval creation_time;
+
+    unsigned post_id;
+    int post_id_valid;
+
+    AVAHI_LLIST_FIELDS(AvahiQuerier, queriers);
+};
+
+void avahi_querier_free(AvahiQuerier *q) {
+    assert(q);
+
+    AVAHI_LLIST_REMOVE(AvahiQuerier, queriers, q->interface->queriers, q);
+    avahi_hashmap_remove(q->interface->queriers_by_key, q->key);
+
+    avahi_key_unref(q->key);
+    avahi_time_event_free(q->time_event);
+
+    avahi_free(q);
+}
+
+static void querier_elapse_callback(AVAHI_GCC_UNUSED AvahiTimeEvent *e, void *userdata) {
+    AvahiQuerier *q = userdata;
+    struct timeval tv;
+
+    assert(q);
+
+    if (q->n_used <= 0) {
+
+        /* We are not referenced by anyone anymore, so let's free
+         * ourselves. We should not send out any further queries from
+         * this querier object anymore. */
+
+        avahi_querier_free(q);
+        return;
+    }
+
+    if (avahi_interface_post_query(q->interface, q->key, 0, &q->post_id)) {
+
+        /* The queue accepted our query. We store the query id here,
+         * that allows us to drop the query at a later point if the
+         * query is very short-lived. */
+
+        q->post_id_valid = 1;
+    }
+
+    q->sec_delay *= 2;
+
+    if (q->sec_delay >= 60*60)  /* 1h */
+        q->sec_delay = 60*60;
+
+    avahi_elapse_time(&tv, q->sec_delay*1000, 0);
+    avahi_time_event_update(q->time_event, &tv);
+}
+
+void avahi_querier_add(AvahiInterface *i, AvahiKey *key, struct timeval *ret_ctime) {
+    AvahiQuerier *q;
+    struct timeval tv;
+
+    assert(i);
+    assert(key);
+
+    if ((q = avahi_hashmap_lookup(i->queriers_by_key, key))) {
+
+        /* Someone is already browsing for records of this RR key */
+        q->n_used++;
+
+        /* Return the creation time. This is used for generating the
+         * ALL_FOR_NOW event one second after the querier was
+         * initially created. */
+        if (ret_ctime)
+            *ret_ctime = q->creation_time;
+        return;
+    }
+
+    /* No one is browsing for this RR key, so we add a new querier */
+    if (!(q = avahi_new(AvahiQuerier, 1)))
+        return; /* OOM */
+
+    q->key = avahi_key_ref(key);
+    q->interface = i;
+    q->n_used = 1;
+    q->sec_delay = 1;
+    q->post_id_valid = 0;
+    gettimeofday(&q->creation_time, NULL);
+
+    /* Do the initial query */
+    if (avahi_interface_post_query(i, key, 0, &q->post_id))
+        q->post_id_valid = 1;
+
+    /* Schedule next queries */
+    q->time_event = avahi_time_event_new(i->monitor->server->time_event_queue, avahi_elapse_time(&tv, q->sec_delay*1000, 0), querier_elapse_callback, q);
+
+    AVAHI_LLIST_PREPEND(AvahiQuerier, queriers, i->queriers, q);
+    avahi_hashmap_insert(i->queriers_by_key, q->key, q);
+
+    /* Return the creation time. This is used for generating the
+     * ALL_FOR_NOW event one second after the querier was initially
+     * created. */
+    if (ret_ctime)
+        *ret_ctime = q->creation_time;
+}
+
+void avahi_querier_remove(AvahiInterface *i, AvahiKey *key) {
+    AvahiQuerier *q;
+
+    /* There was no querier for this RR key, or it wasn't referenced
+     * by anyone. */
+    if (!(q = avahi_hashmap_lookup(i->queriers_by_key, key)) || q->n_used <= 0)
+        return;
+
+    if ((--q->n_used) <= 0) {
+
+        /* Nobody references us anymore. */
+
+        if (q->post_id_valid && avahi_interface_withraw_query(i, q->post_id)) {
+
+            /* We succeeded in withdrawing our query from the queue,
+             * so let's drop dead. */
+
+            avahi_querier_free(q);
+        }
+
+        /* If we failed to withdraw our query from the queue, we stay
+         * alive, in case someone else might recycle our querier at a
+         * later point. We are freed at our next expiry, in case
+         * nobody recycled us. */
+    }
+}
+
+static void remove_querier_callback(AvahiInterfaceMonitor *m, AvahiInterface *i, void* userdata) {
+    assert(m);
+    assert(i);
+    assert(userdata);
+
+    if (i->announcing)
+        avahi_querier_remove(i, (AvahiKey*) userdata);
+}
+
+void avahi_querier_remove_for_all(AvahiServer *s, AvahiIfIndex idx, AvahiProtocol protocol, AvahiKey *key) {
+    assert(s);
+    assert(key);
+
+    avahi_interface_monitor_walk(s->monitor, idx, protocol, remove_querier_callback, key);
+}
+
+struct cbdata {
+    AvahiKey *key;
+    struct timeval *ret_ctime;
+};
+
+static void add_querier_callback(AvahiInterfaceMonitor *m, AvahiInterface *i, void* userdata) {
+    struct cbdata *cbdata = userdata;
+
+    assert(m);
+    assert(i);
+    assert(cbdata);
+
+    if (i->announcing) {
+        struct timeval tv;
+        avahi_querier_add(i, cbdata->key, &tv);
+
+        if (cbdata->ret_ctime && avahi_timeval_compare(&tv, cbdata->ret_ctime) > 0)
+            *cbdata->ret_ctime = tv;
+    }
+}
+
+void avahi_querier_add_for_all(AvahiServer *s, AvahiIfIndex idx, AvahiProtocol protocol, AvahiKey *key, struct timeval *ret_ctime) {
+    struct cbdata cbdata;
+
+    assert(s);
+    assert(key);
+
+    cbdata.key = key;
+    cbdata.ret_ctime = ret_ctime;
+
+    if (ret_ctime)
+        ret_ctime->tv_sec = ret_ctime->tv_usec = 0;
+
+    avahi_interface_monitor_walk(s->monitor, idx, protocol, add_querier_callback, &cbdata);
+}
+
+int avahi_querier_shall_refresh_cache(AvahiInterface *i, AvahiKey *key) {
+    AvahiQuerier *q;
+
+    assert(i);
+    assert(key);
+
+    /* Called by the cache maintainer */
+
+    if (!(q = avahi_hashmap_lookup(i->queriers_by_key, key)))
+        /* This key is currently not subscribed at all, so no cache
+         * refresh is needed */
+        return 0;
+
+    if (q->n_used <= 0) {
+
+        /* If this is an entry nobody references right now, don't
+         * consider it "existing". */
+
+        /* Remove this querier since it is referenced by nobody
+         * and the cached data will soon be out of date */
+        avahi_querier_free(q);
+
+        /* Tell the cache that no refresh is needed */
+        return 0;
+
+    } else {
+        struct timeval tv;
+
+        /* We can defer our query a little, since the cache will now
+         * issue a refresh query anyway. */
+        avahi_elapse_time(&tv, q->sec_delay*1000, 0);
+        avahi_time_event_update(q->time_event, &tv);
+
+        /* Tell the cache that a refresh should be issued */
+        return 1;
+    }
+}
+
+void avahi_querier_free_all(AvahiInterface *i) {
+    assert(i);
+
+    while (i->queriers)
+        avahi_querier_free(i->queriers);
+}
diff --git a/avahi-0.6.31/avahi-core/querier.h b/avahi-0.6.31/avahi-core/querier.h
new file mode 100644
index 0000000..6a32a3b
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/querier.h
@@ -0,0 +1,48 @@
+#ifndef fooquerierhfoo
+#define fooquerierhfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+typedef struct AvahiQuerier AvahiQuerier;
+
+#include "iface.h"
+
+/** Add querier for the specified key to the specified interface */
+void avahi_querier_add(AvahiInterface *i, AvahiKey *key, struct timeval *ret_ctime);
+
+/** Remove a querier for the specified key from the specified interface */
+void avahi_querier_remove(AvahiInterface *i, AvahiKey *key);
+
+/** Add a querier for the specified key on all interfaces that mach */
+void avahi_querier_add_for_all(AvahiServer *s, AvahiIfIndex idx, AvahiProtocol protocol, AvahiKey *key, struct timeval *ret_ctime);
+
+/** Remove a querier for the specified key on all interfaces that mach */
+void avahi_querier_remove_for_all(AvahiServer *s, AvahiIfIndex idx, AvahiProtocol protocol, AvahiKey *key);
+
+/** Free all queriers */
+void avahi_querier_free(AvahiQuerier *q);
+
+/** Free all queriers on the specified interface */
+void avahi_querier_free_all(AvahiInterface *i);
+
+/** Return 1 if there is a querier for the specified key on the specified interface */
+int avahi_querier_shall_refresh_cache(AvahiInterface *i, AvahiKey *key);
+
+#endif
diff --git a/avahi-0.6.31/avahi-core/query-sched.c b/avahi-0.6.31/avahi-core/query-sched.c
new file mode 100644
index 0000000..ff833f9
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/query-sched.c
@@ -0,0 +1,450 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+
+#include <avahi-common/timeval.h>
+#include <avahi-common/malloc.h>
+
+#include "query-sched.h"
+#include "log.h"
+
+#define AVAHI_QUERY_HISTORY_MSEC 100
+#define AVAHI_QUERY_DEFER_MSEC 100
+
+typedef struct AvahiQueryJob AvahiQueryJob;
+typedef struct AvahiKnownAnswer AvahiKnownAnswer;
+
+struct AvahiQueryJob {
+    unsigned id;
+    int n_posted;
+
+    AvahiQueryScheduler *scheduler;
+    AvahiTimeEvent *time_event;
+
+    int done;
+    struct timeval delivery;
+
+    AvahiKey *key;
+
+    /* Jobs are stored in a simple linked list. It might turn out in
+     * the future that this list grows too long and we must switch to
+     * some other kind of data structure. This needs further
+     * investigation. I expect the list to be very short (< 20
+     * entries) most of the time, but this might be a wrong
+     * assumption, especially on setups where traffic reflection is
+     * involved. */
+
+    AVAHI_LLIST_FIELDS(AvahiQueryJob, jobs);
+};
+
+struct AvahiKnownAnswer {
+    AvahiQueryScheduler *scheduler;
+    AvahiRecord *record;
+
+    AVAHI_LLIST_FIELDS(AvahiKnownAnswer, known_answer);
+};
+
+struct AvahiQueryScheduler {
+    AvahiInterface *interface;
+    AvahiTimeEventQueue *time_event_queue;
+
+    unsigned next_id;
+
+    AVAHI_LLIST_HEAD(AvahiQueryJob, jobs);
+    AVAHI_LLIST_HEAD(AvahiQueryJob, history);
+    AVAHI_LLIST_HEAD(AvahiKnownAnswer, known_answers);
+};
+
+static AvahiQueryJob* job_new(AvahiQueryScheduler *s, AvahiKey *key, int done) {
+    AvahiQueryJob *qj;
+
+    assert(s);
+    assert(key);
+
+    if (!(qj = avahi_new(AvahiQueryJob, 1))) {
+        avahi_log_error(__FILE__": Out of memory");
+        return NULL;
+    }
+
+    qj->scheduler = s;
+    qj->key = avahi_key_ref(key);
+    qj->time_event = NULL;
+    qj->n_posted = 1;
+    qj->id = s->next_id++;
+
+    if ((qj->done = done))
+        AVAHI_LLIST_PREPEND(AvahiQueryJob, jobs, s->history, qj);
+    else
+        AVAHI_LLIST_PREPEND(AvahiQueryJob, jobs, s->jobs, qj);
+
+    return qj;
+}
+
+static void job_free(AvahiQueryScheduler *s, AvahiQueryJob *qj) {
+    assert(s);
+    assert(qj);
+
+    if (qj->time_event)
+        avahi_time_event_free(qj->time_event);
+
+    if (qj->done)
+        AVAHI_LLIST_REMOVE(AvahiQueryJob, jobs, s->history, qj);
+    else
+        AVAHI_LLIST_REMOVE(AvahiQueryJob, jobs, s->jobs, qj);
+
+    avahi_key_unref(qj->key);
+    avahi_free(qj);
+}
+
+static void elapse_callback(AvahiTimeEvent *e, void* data);
+
+static void job_set_elapse_time(AvahiQueryScheduler *s, AvahiQueryJob *qj, unsigned msec, unsigned jitter) {
+    struct timeval tv;
+
+    assert(s);
+    assert(qj);
+
+    avahi_elapse_time(&tv, msec, jitter);
+
+    if (qj->time_event)
+        avahi_time_event_update(qj->time_event, &tv);
+    else
+        qj->time_event = avahi_time_event_new(s->time_event_queue, &tv, elapse_callback, qj);
+}
+
+static void job_mark_done(AvahiQueryScheduler *s, AvahiQueryJob *qj) {
+    assert(s);
+    assert(qj);
+
+    assert(!qj->done);
+
+    AVAHI_LLIST_REMOVE(AvahiQueryJob, jobs, s->jobs, qj);
+    AVAHI_LLIST_PREPEND(AvahiQueryJob, jobs, s->history, qj);
+
+    qj->done = 1;
+
+    job_set_elapse_time(s, qj, AVAHI_QUERY_HISTORY_MSEC, 0);
+    gettimeofday(&qj->delivery, NULL);
+}
+
+AvahiQueryScheduler *avahi_query_scheduler_new(AvahiInterface *i) {
+    AvahiQueryScheduler *s;
+    assert(i);
+
+    if (!(s = avahi_new(AvahiQueryScheduler, 1))) {
+        avahi_log_error(__FILE__": Out of memory");
+        return NULL; /* OOM */
+    }
+
+    s->interface = i;
+    s->time_event_queue = i->monitor->server->time_event_queue;
+    s->next_id = 0;
+
+    AVAHI_LLIST_HEAD_INIT(AvahiQueryJob, s->jobs);
+    AVAHI_LLIST_HEAD_INIT(AvahiQueryJob, s->history);
+    AVAHI_LLIST_HEAD_INIT(AvahiKnownAnswer, s->known_answers);
+
+    return s;
+}
+
+void avahi_query_scheduler_free(AvahiQueryScheduler *s) {
+    assert(s);
+
+    assert(!s->known_answers);
+    avahi_query_scheduler_clear(s);
+    avahi_free(s);
+}
+
+void avahi_query_scheduler_clear(AvahiQueryScheduler *s) {
+    assert(s);
+
+    while (s->jobs)
+        job_free(s, s->jobs);
+    while (s->history)
+        job_free(s, s->history);
+}
+
+static void* known_answer_walk_callback(AvahiCache *c, AvahiKey *pattern, AvahiCacheEntry *e, void* userdata) {
+    AvahiQueryScheduler *s = userdata;
+    AvahiKnownAnswer *ka;
+
+    assert(c);
+    assert(pattern);
+    assert(e);
+    assert(s);
+
+    if (avahi_cache_entry_half_ttl(c, e))
+        return NULL;
+
+    if (!(ka = avahi_new0(AvahiKnownAnswer, 1))) {
+        avahi_log_error(__FILE__": Out of memory");
+        return NULL;
+    }
+
+    ka->scheduler = s;
+    ka->record = avahi_record_ref(e->record);
+
+    AVAHI_LLIST_PREPEND(AvahiKnownAnswer, known_answer, s->known_answers, ka);
+    return NULL;
+}
+
+static int packet_add_query_job(AvahiQueryScheduler *s, AvahiDnsPacket *p, AvahiQueryJob *qj) {
+    assert(s);
+    assert(p);
+    assert(qj);
+
+    if (!avahi_dns_packet_append_key(p, qj->key, 0))
+        return 0;
+
+    /* Add all matching known answers to the list */
+    avahi_cache_walk(s->interface->cache, qj->key, known_answer_walk_callback, s);
+
+    job_mark_done(s, qj);
+
+    return 1;
+}
+
+static void append_known_answers_and_send(AvahiQueryScheduler *s, AvahiDnsPacket *p) {
+    AvahiKnownAnswer *ka;
+    unsigned n;
+    assert(s);
+    assert(p);
+
+    n = 0;
+
+    while ((ka = s->known_answers)) {
+        int too_large = 0;
+
+        while (!avahi_dns_packet_append_record(p, ka->record, 0, 0)) {
+
+            if (avahi_dns_packet_is_empty(p)) {
+                /* The record is too large to fit into one packet, so
+                   there's no point in sending it. Better is letting
+                   the owner of the record send it as a response. This
+                   has the advantage of a cache refresh. */
+
+                too_large = 1;
+                break;
+            }
+
+            avahi_dns_packet_set_field(p, AVAHI_DNS_FIELD_FLAGS, avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_FLAGS) | AVAHI_DNS_FLAG_TC);
+            avahi_dns_packet_set_field(p, AVAHI_DNS_FIELD_ANCOUNT, n);
+            avahi_interface_send_packet(s->interface, p);
+            avahi_dns_packet_free(p);
+
+            p = avahi_dns_packet_new_query(s->interface->hardware->mtu);
+            n = 0;
+        }
+
+        AVAHI_LLIST_REMOVE(AvahiKnownAnswer, known_answer, s->known_answers, ka);
+        avahi_record_unref(ka->record);
+        avahi_free(ka);
+
+        if (!too_large)
+            n++;
+    }
+
+    avahi_dns_packet_set_field(p, AVAHI_DNS_FIELD_ANCOUNT, n);
+    avahi_interface_send_packet(s->interface, p);
+    avahi_dns_packet_free(p);
+}
+
+static void elapse_callback(AVAHI_GCC_UNUSED AvahiTimeEvent *e, void* data) {
+    AvahiQueryJob *qj = data;
+    AvahiQueryScheduler *s;
+    AvahiDnsPacket *p;
+    unsigned n;
+    int b;
+
+    assert(qj);
+    s = qj->scheduler;
+
+    if (qj->done) {
+        /* Lets remove it  from the history */
+        job_free(s, qj);
+        return;
+    }
+
+    assert(!s->known_answers);
+
+    if (!(p = avahi_dns_packet_new_query(s->interface->hardware->mtu)))
+        return; /* OOM */
+
+    b = packet_add_query_job(s, p, qj);
+    assert(b); /* An query must always fit in */
+    n = 1;
+
+    /* Try to fill up packet with more queries, if available */
+    while (s->jobs) {
+
+        if (!packet_add_query_job(s, p, s->jobs))
+            break;
+
+        n++;
+    }
+
+    avahi_dns_packet_set_field(p, AVAHI_DNS_FIELD_QDCOUNT, n);
+
+    /* Now add known answers */
+    append_known_answers_and_send(s, p);
+}
+
+static AvahiQueryJob* find_scheduled_job(AvahiQueryScheduler *s, AvahiKey *key) {
+    AvahiQueryJob *qj;
+
+    assert(s);
+    assert(key);
+
+    for (qj = s->jobs; qj; qj = qj->jobs_next) {
+        assert(!qj->done);
+
+        if (avahi_key_equal(qj->key, key))
+            return qj;
+    }
+
+    return NULL;
+}
+
+static AvahiQueryJob* find_history_job(AvahiQueryScheduler *s, AvahiKey *key) {
+    AvahiQueryJob *qj;
+
+    assert(s);
+    assert(key);
+
+    for (qj = s->history; qj; qj = qj->jobs_next) {
+        assert(qj->done);
+
+        if (avahi_key_equal(qj->key, key)) {
+            /* Check whether this entry is outdated */
+
+            if (avahi_age(&qj->delivery) > AVAHI_QUERY_HISTORY_MSEC*1000) {
+                /* it is outdated, so let's remove it */
+                job_free(s, qj);
+                return NULL;
+            }
+
+            return qj;
+        }
+    }
+
+    return NULL;
+}
+
+int avahi_query_scheduler_post(AvahiQueryScheduler *s, AvahiKey *key, int immediately, unsigned *ret_id) {
+    struct timeval tv;
+    AvahiQueryJob *qj;
+
+    assert(s);
+    assert(key);
+
+    if ((qj = find_history_job(s, key)))
+        return 0;
+
+    avahi_elapse_time(&tv, immediately ? 0 : AVAHI_QUERY_DEFER_MSEC, 0);
+
+    if ((qj = find_scheduled_job(s, key))) {
+        /* Duplicate questions suppression */
+
+        if (avahi_timeval_compare(&tv, &qj->delivery) < 0) {
+            /* If the new entry should be scheduled earlier,
+             * update the old entry */
+            qj->delivery = tv;
+            avahi_time_event_update(qj->time_event, &qj->delivery);
+        }
+
+        qj->n_posted++;
+
+    } else {
+
+        if (!(qj = job_new(s, key, 0)))
+            return 0; /* OOM */
+
+        qj->delivery = tv;
+        qj->time_event = avahi_time_event_new(s->time_event_queue, &qj->delivery, elapse_callback, qj);
+    }
+
+    if (ret_id)
+        *ret_id = qj->id;
+
+    return 1;
+}
+
+void avahi_query_scheduler_incoming(AvahiQueryScheduler *s, AvahiKey *key) {
+    AvahiQueryJob *qj;
+
+    assert(s);
+    assert(key);
+
+    /* This function is called whenever an incoming query was
+     * received. We drop scheduled queries that match. The keyword is
+     * "DUPLICATE QUESTION SUPPRESION". */
+
+    if ((qj = find_scheduled_job(s, key))) {
+        job_mark_done(s, qj);
+        return;
+    }
+
+    /* Look if there's a history job for this key. If there is, just
+     * update the elapse time */
+    if (!(qj = find_history_job(s, key)))
+        if (!(qj = job_new(s, key, 1)))
+            return; /* OOM */
+
+    gettimeofday(&qj->delivery, NULL);
+    job_set_elapse_time(s, qj, AVAHI_QUERY_HISTORY_MSEC, 0);
+}
+
+int avahi_query_scheduler_withdraw_by_id(AvahiQueryScheduler *s, unsigned id) {
+    AvahiQueryJob *qj;
+
+    assert(s);
+
+    /* Very short lived queries can withdraw an already scheduled item
+     * from the queue using this function, simply by passing the id
+     * returned by avahi_query_scheduler_post(). */
+
+    for (qj = s->jobs; qj; qj = qj->jobs_next) {
+        assert(!qj->done);
+
+        if (qj->id == id) {
+            /* Entry found */
+
+            assert(qj->n_posted >= 1);
+
+            if (--qj->n_posted <= 0) {
+
+                /* We withdraw this job only if the calling object was
+                 * the only remaining poster. (Usually this is the
+                 * case since there should exist only one querier per
+                 * key, but there are exceptions, notably reflected
+                 * traffic.) */
+
+                job_free(s, qj);
+                return 1;
+            }
+        }
+    }
+
+    return 0;
+}
diff --git a/avahi-0.6.31/avahi-core/query-sched.h b/avahi-0.6.31/avahi-core/query-sched.h
new file mode 100644
index 0000000..b45520c
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/query-sched.h
@@ -0,0 +1,36 @@
+#ifndef fooqueryschedhfoo
+#define fooqueryschedhfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+typedef struct AvahiQueryScheduler AvahiQueryScheduler;
+
+#include <avahi-common/address.h>
+#include "iface.h"
+
+AvahiQueryScheduler *avahi_query_scheduler_new(AvahiInterface *i);
+void avahi_query_scheduler_free(AvahiQueryScheduler *s);
+void avahi_query_scheduler_clear(AvahiQueryScheduler *s);
+
+int avahi_query_scheduler_post(AvahiQueryScheduler *s, AvahiKey *key, int immediately, unsigned *ret_id);
+int avahi_query_scheduler_withdraw_by_id(AvahiQueryScheduler *s, unsigned id);
+void avahi_query_scheduler_incoming(AvahiQueryScheduler *s, AvahiKey *key);
+
+#endif
diff --git a/avahi-0.6.31/avahi-core/resolve-address.c b/avahi-0.6.31/avahi-core/resolve-address.c
new file mode 100644
index 0000000..dd4adbc
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/resolve-address.c
@@ -0,0 +1,268 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+
+#include <avahi-common/timeval.h>
+#include <avahi-common/malloc.h>
+#include <avahi-common/error.h>
+#include <avahi-common/domain.h>
+
+#include "browse.h"
+
+#define TIMEOUT_MSEC 5000
+
+struct AvahiSAddressResolver {
+    AvahiServer *server;
+    AvahiAddress address;
+
+    AvahiSRecordBrowser *record_browser;
+
+    AvahiSAddressResolverCallback callback;
+    void* userdata;
+
+    AvahiRecord *ptr_record;
+    AvahiIfIndex interface;
+    AvahiProtocol protocol;
+    AvahiLookupResultFlags flags;
+
+    int retry_with_multicast;
+    AvahiKey *key;
+
+    AvahiTimeEvent *time_event;
+
+    AVAHI_LLIST_FIELDS(AvahiSAddressResolver, resolver);
+};
+
+static void finish(AvahiSAddressResolver *r, AvahiResolverEvent event) {
+    assert(r);
+
+    if (r->time_event) {
+        avahi_time_event_free(r->time_event);
+        r->time_event = NULL;
+    }
+
+    switch (event) {
+        case AVAHI_RESOLVER_FAILURE:
+            r->callback(r, r->interface, r->protocol, event, &r->address, NULL, r->flags, r->userdata);
+            break;
+
+        case AVAHI_RESOLVER_FOUND:
+            assert(r->ptr_record);
+            r->callback(r, r->interface, r->protocol, event, &r->address, r->ptr_record->data.ptr.name, r->flags, r->userdata);
+            break;
+    }
+}
+
+static void time_event_callback(AvahiTimeEvent *e, void *userdata) {
+    AvahiSAddressResolver *r = userdata;
+
+    assert(e);
+    assert(r);
+
+    avahi_server_set_errno(r->server, AVAHI_ERR_TIMEOUT);
+    finish(r, AVAHI_RESOLVER_FAILURE);
+}
+
+static void start_timeout(AvahiSAddressResolver *r) {
+    struct timeval tv;
+    assert(r);
+
+    if (r->time_event)
+        return;
+
+    avahi_elapse_time(&tv, TIMEOUT_MSEC, 0);
+    r->time_event = avahi_time_event_new(r->server->time_event_queue, &tv, time_event_callback, r);
+}
+
+static void record_browser_callback(
+    AvahiSRecordBrowser*rr,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiBrowserEvent event,
+    AvahiRecord *record,
+    AvahiLookupResultFlags flags,
+    void* userdata) {
+
+    AvahiSAddressResolver *r = userdata;
+
+    assert(rr);
+    assert(r);
+
+    switch (event) {
+        case AVAHI_BROWSER_NEW:
+            assert(record);
+            assert(record->key->type == AVAHI_DNS_TYPE_PTR);
+
+            if (r->interface > 0 && interface != r->interface)
+                return;
+
+            if (r->protocol != AVAHI_PROTO_UNSPEC && protocol != r->protocol)
+                return;
+
+            if (r->interface <= 0)
+                r->interface = interface;
+
+            if (r->protocol == AVAHI_PROTO_UNSPEC)
+                r->protocol = protocol;
+
+            if (!r->ptr_record) {
+                r->ptr_record = avahi_record_ref(record);
+                r->flags = flags;
+
+                finish(r, AVAHI_RESOLVER_FOUND);
+            }
+            break;
+
+        case AVAHI_BROWSER_REMOVE:
+            assert(record);
+            assert(record->key->type == AVAHI_DNS_TYPE_PTR);
+
+            if (r->ptr_record && avahi_record_equal_no_ttl(record, r->ptr_record)) {
+                avahi_record_unref(r->ptr_record);
+                r->ptr_record = NULL;
+                r->flags = flags;
+
+                /** Look for a replacement */
+                avahi_s_record_browser_restart(r->record_browser);
+                start_timeout(r);
+            }
+
+            break;
+
+        case AVAHI_BROWSER_CACHE_EXHAUSTED:
+        case AVAHI_BROWSER_ALL_FOR_NOW:
+            break;
+
+        case AVAHI_BROWSER_FAILURE:
+
+            if (r->retry_with_multicast) {
+                r->retry_with_multicast = 0;
+
+                avahi_s_record_browser_free(r->record_browser);
+                r->record_browser = avahi_s_record_browser_new(r->server, r->interface, r->protocol, r->key, AVAHI_LOOKUP_USE_MULTICAST, record_browser_callback, r);
+
+                if (r->record_browser) {
+                    start_timeout(r);
+                    break;
+                }
+            }
+
+            r->flags = flags;
+            finish(r, AVAHI_RESOLVER_FAILURE);
+            break;
+    }
+}
+
+AvahiSAddressResolver *avahi_s_address_resolver_new(
+    AvahiServer *server,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    const AvahiAddress *address,
+    AvahiLookupFlags flags,
+    AvahiSAddressResolverCallback callback,
+    void* userdata) {
+
+    AvahiSAddressResolver *r;
+    AvahiKey *k;
+    char n[AVAHI_DOMAIN_NAME_MAX];
+
+    assert(server);
+    assert(address);
+    assert(callback);
+
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, AVAHI_IF_VALID(interface), AVAHI_ERR_INVALID_INTERFACE);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, AVAHI_PROTO_VALID(protocol), AVAHI_ERR_INVALID_PROTOCOL);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, address->proto == AVAHI_PROTO_INET || address->proto == AVAHI_PROTO_INET6, AVAHI_ERR_INVALID_PROTOCOL);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, AVAHI_FLAGS_VALID(flags, AVAHI_LOOKUP_USE_WIDE_AREA|AVAHI_LOOKUP_USE_MULTICAST), AVAHI_ERR_INVALID_FLAGS);
+
+    avahi_reverse_lookup_name(address, n, sizeof(n));
+
+    if (!(k = avahi_key_new(n, AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_PTR))) {
+        avahi_server_set_errno(server, AVAHI_ERR_NO_MEMORY);
+        return NULL;
+    }
+
+    if (!(r = avahi_new(AvahiSAddressResolver, 1))) {
+        avahi_server_set_errno(server, AVAHI_ERR_NO_MEMORY);
+        avahi_key_unref(k);
+        return NULL;
+    }
+
+    r->server = server;
+    r->address = *address;
+    r->callback = callback;
+    r->userdata = userdata;
+    r->ptr_record = NULL;
+    r->interface = interface;
+    r->protocol = protocol;
+    r->flags = 0;
+    r->retry_with_multicast = 0;
+    r->key = k;
+
+    r->record_browser = NULL;
+    AVAHI_LLIST_PREPEND(AvahiSAddressResolver, resolver, server->address_resolvers, r);
+
+    r->time_event = NULL;
+
+    if (!(flags & (AVAHI_LOOKUP_USE_MULTICAST|AVAHI_LOOKUP_USE_WIDE_AREA))) {
+
+        if (!server->wide_area_lookup_engine || !avahi_wide_area_has_servers(server->wide_area_lookup_engine))
+            flags |= AVAHI_LOOKUP_USE_MULTICAST;
+        else {
+            flags |= AVAHI_LOOKUP_USE_WIDE_AREA;
+            r->retry_with_multicast = 1;
+        }
+    }
+
+    r->record_browser = avahi_s_record_browser_new(server, interface, protocol, k, flags, record_browser_callback, r);
+
+    if (!r->record_browser) {
+        avahi_s_address_resolver_free(r);
+        return NULL;
+    }
+
+    start_timeout(r);
+
+    return r;
+}
+
+void avahi_s_address_resolver_free(AvahiSAddressResolver *r) {
+    assert(r);
+
+    AVAHI_LLIST_REMOVE(AvahiSAddressResolver, resolver, r->server->address_resolvers, r);
+
+    if (r->record_browser)
+        avahi_s_record_browser_free(r->record_browser);
+
+    if (r->time_event)
+        avahi_time_event_free(r->time_event);
+
+    if (r->ptr_record)
+        avahi_record_unref(r->ptr_record);
+
+    if (r->key)
+        avahi_key_unref(r->key);
+
+    avahi_free(r);
+}
diff --git a/avahi-0.6.31/avahi-core/resolve-host-name.c b/avahi-0.6.31/avahi-core/resolve-host-name.c
new file mode 100644
index 0000000..08f209b
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/resolve-host-name.c
@@ -0,0 +1,297 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+
+#include <avahi-common/domain.h>
+#include <avahi-common/timeval.h>
+#include <avahi-common/malloc.h>
+#include <avahi-common/error.h>
+
+#include "browse.h"
+#include "log.h"
+
+#define TIMEOUT_MSEC 5000
+
+struct AvahiSHostNameResolver {
+    AvahiServer *server;
+    char *host_name;
+
+    AvahiSRecordBrowser *record_browser_a;
+    AvahiSRecordBrowser *record_browser_aaaa;
+
+    AvahiSHostNameResolverCallback callback;
+    void* userdata;
+
+    AvahiRecord *address_record;
+    AvahiIfIndex interface;
+    AvahiProtocol protocol;
+    AvahiLookupResultFlags flags;
+
+    AvahiTimeEvent *time_event;
+
+    AVAHI_LLIST_FIELDS(AvahiSHostNameResolver, resolver);
+};
+
+static void finish(AvahiSHostNameResolver *r, AvahiResolverEvent event) {
+    assert(r);
+
+    if (r->time_event) {
+        avahi_time_event_free(r->time_event);
+        r->time_event = NULL;
+    }
+
+    switch (event) {
+        case AVAHI_RESOLVER_FOUND: {
+            AvahiAddress a;
+
+            assert(r->address_record);
+
+            switch (r->address_record->key->type) {
+                case AVAHI_DNS_TYPE_A:
+                    a.proto = AVAHI_PROTO_INET;
+                    a.data.ipv4 = r->address_record->data.a.address;
+                    break;
+
+                case AVAHI_DNS_TYPE_AAAA:
+                    a.proto = AVAHI_PROTO_INET6;
+                    a.data.ipv6 = r->address_record->data.aaaa.address;
+                    break;
+
+                default:
+                    abort();
+            }
+
+            r->callback(r, r->interface, r->protocol, AVAHI_RESOLVER_FOUND, r->address_record->key->name, &a, r->flags, r->userdata);
+            break;
+
+        }
+
+        case AVAHI_RESOLVER_FAILURE:
+
+            r->callback(r, r->interface, r->protocol, event, r->host_name, NULL, r->flags, r->userdata);
+            break;
+    }
+}
+
+static void time_event_callback(AvahiTimeEvent *e, void *userdata) {
+    AvahiSHostNameResolver *r = userdata;
+
+    assert(e);
+    assert(r);
+
+    avahi_server_set_errno(r->server, AVAHI_ERR_TIMEOUT);
+    finish(r, AVAHI_RESOLVER_FAILURE);
+}
+
+static void start_timeout(AvahiSHostNameResolver *r) {
+    struct timeval tv;
+    assert(r);
+
+    if (r->time_event)
+        return;
+
+    avahi_elapse_time(&tv, TIMEOUT_MSEC, 0);
+
+    r->time_event = avahi_time_event_new(r->server->time_event_queue, &tv, time_event_callback, r);
+}
+
+static void record_browser_callback(
+    AvahiSRecordBrowser*rr,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiBrowserEvent event,
+    AvahiRecord *record,
+    AvahiLookupResultFlags flags,
+    void* userdata) {
+
+    AvahiSHostNameResolver *r = userdata;
+
+    assert(rr);
+    assert(r);
+
+
+    switch (event) {
+        case AVAHI_BROWSER_NEW:
+            assert(record);
+            assert(record->key->type == AVAHI_DNS_TYPE_A || record->key->type == AVAHI_DNS_TYPE_AAAA);
+
+            if (r->interface > 0 && interface != r->interface)
+                return;
+
+            if (r->protocol != AVAHI_PROTO_UNSPEC && protocol != r->protocol)
+                return;
+
+            if (r->interface <= 0)
+                r->interface = interface;
+
+            if (r->protocol == AVAHI_PROTO_UNSPEC)
+                r->protocol = protocol;
+
+            if (!r->address_record) {
+                r->address_record = avahi_record_ref(record);
+                r->flags = flags;
+
+                finish(r, AVAHI_RESOLVER_FOUND);
+            }
+
+            break;
+
+        case AVAHI_BROWSER_REMOVE:
+            assert(record);
+            assert(record->key->type == AVAHI_DNS_TYPE_A || record->key->type == AVAHI_DNS_TYPE_AAAA);
+
+            if (r->address_record && avahi_record_equal_no_ttl(record, r->address_record)) {
+                avahi_record_unref(r->address_record);
+                r->address_record = NULL;
+
+                r->flags = flags;
+
+
+                /** Look for a replacement */
+                if (r->record_browser_aaaa)
+                    avahi_s_record_browser_restart(r->record_browser_aaaa);
+                if (r->record_browser_a)
+                    avahi_s_record_browser_restart(r->record_browser_a);
+
+                start_timeout(r);
+            }
+
+            break;
+
+        case AVAHI_BROWSER_CACHE_EXHAUSTED:
+        case AVAHI_BROWSER_ALL_FOR_NOW:
+            /* Ignore */
+            break;
+
+        case AVAHI_BROWSER_FAILURE:
+
+            /* Stop browsers */
+
+            if (r->record_browser_aaaa)
+                avahi_s_record_browser_free(r->record_browser_aaaa);
+            if (r->record_browser_a)
+                avahi_s_record_browser_free(r->record_browser_a);
+
+            r->record_browser_a = r->record_browser_aaaa = NULL;
+            r->flags = flags;
+
+            finish(r, AVAHI_RESOLVER_FAILURE);
+            break;
+    }
+}
+
+AvahiSHostNameResolver *avahi_s_host_name_resolver_new(
+    AvahiServer *server,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    const char *host_name,
+    AvahiProtocol aprotocol,
+    AvahiLookupFlags flags,
+    AvahiSHostNameResolverCallback callback,
+    void* userdata) {
+
+    AvahiSHostNameResolver *r;
+    AvahiKey *k;
+
+    assert(server);
+    assert(host_name);
+    assert(callback);
+
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, AVAHI_IF_VALID(interface), AVAHI_ERR_INVALID_INTERFACE);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, AVAHI_PROTO_VALID(protocol), AVAHI_ERR_INVALID_PROTOCOL);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, avahi_is_valid_fqdn(host_name), AVAHI_ERR_INVALID_HOST_NAME);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, AVAHI_PROTO_VALID(aprotocol), AVAHI_ERR_INVALID_PROTOCOL);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, AVAHI_FLAGS_VALID(flags, AVAHI_LOOKUP_USE_WIDE_AREA|AVAHI_LOOKUP_USE_MULTICAST), AVAHI_ERR_INVALID_FLAGS);
+
+    if (!(r = avahi_new(AvahiSHostNameResolver, 1))) {
+        avahi_server_set_errno(server, AVAHI_ERR_NO_MEMORY);
+        return NULL;
+    }
+
+    r->server = server;
+    r->host_name = avahi_normalize_name_strdup(host_name);
+    r->callback = callback;
+    r->userdata = userdata;
+    r->address_record = NULL;
+    r->interface = interface;
+    r->protocol = protocol;
+    r->flags = 0;
+
+    r->record_browser_a = r->record_browser_aaaa = NULL;
+
+    r->time_event = NULL;
+
+    AVAHI_LLIST_PREPEND(AvahiSHostNameResolver, resolver, server->host_name_resolvers, r);
+
+    r->record_browser_aaaa = r->record_browser_a = NULL;
+
+    if (aprotocol == AVAHI_PROTO_INET || aprotocol == AVAHI_PROTO_UNSPEC) {
+        k = avahi_key_new(host_name, AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_A);
+        r->record_browser_a = avahi_s_record_browser_new(server, interface, protocol, k, flags, record_browser_callback, r);
+        avahi_key_unref(k);
+
+        if (!r->record_browser_a)
+            goto fail;
+    }
+
+    if (aprotocol == AVAHI_PROTO_INET6 || aprotocol == AVAHI_PROTO_UNSPEC) {
+        k = avahi_key_new(host_name, AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_AAAA);
+        r->record_browser_aaaa = avahi_s_record_browser_new(server, interface, protocol, k, flags, record_browser_callback, r);
+        avahi_key_unref(k);
+
+        if (!r->record_browser_aaaa)
+            goto fail;
+    }
+
+    assert(r->record_browser_aaaa || r->record_browser_a);
+
+    start_timeout(r);
+
+    return r;
+
+fail:
+    avahi_s_host_name_resolver_free(r);
+    return NULL;
+}
+
+void avahi_s_host_name_resolver_free(AvahiSHostNameResolver *r) {
+    assert(r);
+
+    AVAHI_LLIST_REMOVE(AvahiSHostNameResolver, resolver, r->server->host_name_resolvers, r);
+
+    if (r->record_browser_a)
+        avahi_s_record_browser_free(r->record_browser_a);
+
+    if (r->record_browser_aaaa)
+        avahi_s_record_browser_free(r->record_browser_aaaa);
+
+    if (r->time_event)
+        avahi_time_event_free(r->time_event);
+
+    if (r->address_record)
+        avahi_record_unref(r->address_record);
+
+    avahi_free(r->host_name);
+    avahi_free(r);
+}
diff --git a/avahi-0.6.31/avahi-core/resolve-service.c b/avahi-0.6.31/avahi-core/resolve-service.c
new file mode 100644
index 0000000..3377a50
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/resolve-service.c
@@ -0,0 +1,489 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <avahi-common/domain.h>
+#include <avahi-common/timeval.h>
+#include <avahi-common/malloc.h>
+#include <avahi-common/error.h>
+
+#include "browse.h"
+#include "log.h"
+
+#define TIMEOUT_MSEC 5000
+
+struct AvahiSServiceResolver {
+    AvahiServer *server;
+    char *service_name;
+    char *service_type;
+    char *domain_name;
+    AvahiProtocol address_protocol;
+
+    AvahiIfIndex interface;
+    AvahiProtocol protocol;
+
+    AvahiSRecordBrowser *record_browser_srv;
+    AvahiSRecordBrowser *record_browser_txt;
+    AvahiSRecordBrowser *record_browser_a;
+    AvahiSRecordBrowser *record_browser_aaaa;
+
+    AvahiRecord *srv_record, *txt_record, *address_record;
+    AvahiLookupResultFlags srv_flags, txt_flags, address_flags;
+
+    AvahiSServiceResolverCallback callback;
+    void* userdata;
+    AvahiLookupFlags user_flags;
+
+    AvahiTimeEvent *time_event;
+
+    AVAHI_LLIST_FIELDS(AvahiSServiceResolver, resolver);
+};
+
+static void finish(AvahiSServiceResolver *r, AvahiResolverEvent event) {
+    AvahiLookupResultFlags flags;
+
+    assert(r);
+
+    if (r->time_event) {
+        avahi_time_event_free(r->time_event);
+        r->time_event = NULL;
+    }
+
+    flags =
+        r->txt_flags |
+        r->srv_flags |
+        r->address_flags;
+
+    switch (event) {
+        case AVAHI_RESOLVER_FAILURE:
+
+            r->callback(
+                r,
+                r->interface,
+                r->protocol,
+                event,
+                r->service_name,
+                r->service_type,
+                r->domain_name,
+                NULL,
+                NULL,
+                0,
+                NULL,
+                flags,
+                r->userdata);
+
+            break;
+
+        case AVAHI_RESOLVER_FOUND: {
+            AvahiAddress a;
+
+            assert(event == AVAHI_RESOLVER_FOUND);
+
+            assert(r->srv_record);
+
+            if (r->address_record) {
+                switch (r->address_record->key->type) {
+                    case AVAHI_DNS_TYPE_A:
+                        a.proto = AVAHI_PROTO_INET;
+                        a.data.ipv4 = r->address_record->data.a.address;
+                        break;
+
+                    case AVAHI_DNS_TYPE_AAAA:
+                        a.proto = AVAHI_PROTO_INET6;
+                        a.data.ipv6 = r->address_record->data.aaaa.address;
+                        break;
+
+                    default:
+                        assert(0);
+                }
+            }
+
+            r->callback(
+                r,
+                r->interface,
+                r->protocol,
+                event,
+                r->service_name,
+                r->service_type,
+                r->domain_name,
+                r->srv_record->data.srv.name,
+                r->address_record ? &a : NULL,
+                r->srv_record->data.srv.port,
+                r->txt_record ? r->txt_record->data.txt.string_list : NULL,
+                flags,
+                r->userdata);
+
+            break;
+        }
+    }
+}
+
+static void time_event_callback(AvahiTimeEvent *e, void *userdata) {
+    AvahiSServiceResolver *r = userdata;
+
+    assert(e);
+    assert(r);
+
+    avahi_server_set_errno(r->server, AVAHI_ERR_TIMEOUT);
+    finish(r, AVAHI_RESOLVER_FAILURE);
+}
+
+static void start_timeout(AvahiSServiceResolver *r) {
+    struct timeval tv;
+    assert(r);
+
+    if (r->time_event)
+        return;
+
+    avahi_elapse_time(&tv, TIMEOUT_MSEC, 0);
+
+    r->time_event = avahi_time_event_new(r->server->time_event_queue, &tv, time_event_callback, r);
+}
+
+static void record_browser_callback(
+    AvahiSRecordBrowser*rr,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiBrowserEvent event,
+    AvahiRecord *record,
+    AvahiLookupResultFlags flags,
+    void* userdata) {
+
+    AvahiSServiceResolver *r = userdata;
+
+    assert(rr);
+    assert(r);
+
+    if (rr == r->record_browser_aaaa || rr == r->record_browser_a)
+        r->address_flags = flags;
+    else if (rr == r->record_browser_srv)
+        r->srv_flags = flags;
+    else if (rr == r->record_browser_txt)
+        r->txt_flags = flags;
+
+    switch (event) {
+
+        case AVAHI_BROWSER_NEW: {
+            int changed = 0;
+            assert(record);
+
+            if (r->interface > 0 && interface > 0 &&  interface != r->interface)
+                return;
+
+            if (r->protocol != AVAHI_PROTO_UNSPEC && protocol != AVAHI_PROTO_UNSPEC && protocol != r->protocol)
+                return;
+
+            if (r->interface <= 0)
+                r->interface = interface;
+
+            if (r->protocol == AVAHI_PROTO_UNSPEC)
+                r->protocol = protocol;
+
+            switch (record->key->type) {
+                case AVAHI_DNS_TYPE_SRV:
+                    if (!r->srv_record) {
+                        r->srv_record = avahi_record_ref(record);
+                        changed = 1;
+
+                        if (r->record_browser_a) {
+                            avahi_s_record_browser_free(r->record_browser_a);
+                            r->record_browser_a = NULL;
+                        }
+
+                        if (r->record_browser_aaaa) {
+                            avahi_s_record_browser_free(r->record_browser_aaaa);
+                            r->record_browser_aaaa = NULL;
+                        }
+
+                        if (!(r->user_flags & AVAHI_LOOKUP_NO_ADDRESS)) {
+
+                            if (r->address_protocol == AVAHI_PROTO_INET || r->address_protocol == AVAHI_PROTO_UNSPEC) {
+                                AvahiKey *k = avahi_key_new(r->srv_record->data.srv.name, AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_A);
+                                r->record_browser_a = avahi_s_record_browser_new(r->server, r->interface, r->protocol, k, r->user_flags & ~(AVAHI_LOOKUP_NO_TXT|AVAHI_LOOKUP_NO_ADDRESS), record_browser_callback, r);
+                                avahi_key_unref(k);
+                            }
+
+                            if (r->address_protocol == AVAHI_PROTO_INET6 || r->address_protocol == AVAHI_PROTO_UNSPEC) {
+                                AvahiKey *k = avahi_key_new(r->srv_record->data.srv.name, AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_AAAA);
+                                r->record_browser_aaaa = avahi_s_record_browser_new(r->server, r->interface, r->protocol, k, r->user_flags & ~(AVAHI_LOOKUP_NO_TXT|AVAHI_LOOKUP_NO_ADDRESS), record_browser_callback, r);
+                                avahi_key_unref(k);
+                            }
+                        }
+                    }
+                    break;
+
+                case AVAHI_DNS_TYPE_TXT:
+
+                    assert(!(r->user_flags & AVAHI_LOOKUP_NO_TXT));
+
+                    if (!r->txt_record) {
+                        r->txt_record = avahi_record_ref(record);
+                        changed = 1;
+                    }
+                    break;
+
+                case AVAHI_DNS_TYPE_A:
+                case AVAHI_DNS_TYPE_AAAA:
+
+                    assert(!(r->user_flags & AVAHI_LOOKUP_NO_ADDRESS));
+
+                    if (!r->address_record) {
+                        r->address_record = avahi_record_ref(record);
+                        changed = 1;
+                    }
+                    break;
+
+                default:
+                    abort();
+            }
+
+
+            if (changed &&
+                r->srv_record &&
+                (r->txt_record || (r->user_flags & AVAHI_LOOKUP_NO_TXT)) &&
+                (r->address_record || (r->user_flags & AVAHI_LOOKUP_NO_ADDRESS)))
+                finish(r, AVAHI_RESOLVER_FOUND);
+
+            break;
+
+        }
+
+        case AVAHI_BROWSER_REMOVE:
+
+            assert(record);
+
+            switch (record->key->type) {
+                case AVAHI_DNS_TYPE_SRV:
+
+                    if (r->srv_record && avahi_record_equal_no_ttl(record, r->srv_record)) {
+                        avahi_record_unref(r->srv_record);
+                        r->srv_record = NULL;
+
+                        if (r->record_browser_a) {
+                            avahi_s_record_browser_free(r->record_browser_a);
+                            r->record_browser_a = NULL;
+                        }
+
+                        if (r->record_browser_aaaa) {
+                            avahi_s_record_browser_free(r->record_browser_aaaa);
+                            r->record_browser_aaaa = NULL;
+                        }
+
+                        /** Look for a replacement */
+                        avahi_s_record_browser_restart(r->record_browser_srv);
+                        start_timeout(r);
+                    }
+
+                    break;
+
+                case AVAHI_DNS_TYPE_TXT:
+
+                    assert(!(r->user_flags & AVAHI_LOOKUP_NO_TXT));
+
+                    if (r->txt_record && avahi_record_equal_no_ttl(record, r->txt_record)) {
+                        avahi_record_unref(r->txt_record);
+                        r->txt_record = NULL;
+
+                        /** Look for a replacement */
+                        avahi_s_record_browser_restart(r->record_browser_txt);
+                        start_timeout(r);
+                    }
+                    break;
+
+                case AVAHI_DNS_TYPE_A:
+                case AVAHI_DNS_TYPE_AAAA:
+
+                    assert(!(r->user_flags & AVAHI_LOOKUP_NO_ADDRESS));
+
+                    if (r->address_record && avahi_record_equal_no_ttl(record, r->address_record)) {
+                        avahi_record_unref(r->address_record);
+                        r->address_record = NULL;
+
+                        /** Look for a replacement */
+                        if (r->record_browser_aaaa)
+                            avahi_s_record_browser_restart(r->record_browser_aaaa);
+                        if (r->record_browser_a)
+                            avahi_s_record_browser_restart(r->record_browser_a);
+                        start_timeout(r);
+                    }
+                    break;
+
+                default:
+                    abort();
+            }
+
+            break;
+
+        case AVAHI_BROWSER_CACHE_EXHAUSTED:
+        case AVAHI_BROWSER_ALL_FOR_NOW:
+            break;
+
+        case AVAHI_BROWSER_FAILURE:
+
+            if (rr == r->record_browser_a && r->record_browser_aaaa) {
+                /* We were looking for both AAAA and A, and the other query is still living, so we'll not die */
+                avahi_s_record_browser_free(r->record_browser_a);
+                r->record_browser_a = NULL;
+                break;
+            }
+
+            if (rr == r->record_browser_aaaa && r->record_browser_a) {
+                /* We were looking for both AAAA and A, and the other query is still living, so we'll not die */
+                avahi_s_record_browser_free(r->record_browser_aaaa);
+                r->record_browser_aaaa = NULL;
+                break;
+            }
+
+            /* Hmm, everything's lost, tell the user */
+
+            if (r->record_browser_srv)
+                avahi_s_record_browser_free(r->record_browser_srv);
+            if (r->record_browser_txt)
+                avahi_s_record_browser_free(r->record_browser_txt);
+            if (r->record_browser_a)
+                avahi_s_record_browser_free(r->record_browser_a);
+            if (r->record_browser_aaaa)
+                avahi_s_record_browser_free(r->record_browser_aaaa);
+
+            r->record_browser_srv = r->record_browser_txt = r->record_browser_a = r->record_browser_aaaa = NULL;
+
+            finish(r, AVAHI_RESOLVER_FAILURE);
+            break;
+    }
+}
+
+AvahiSServiceResolver *avahi_s_service_resolver_new(
+    AvahiServer *server,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    const char *name,
+    const char *type,
+    const char *domain,
+    AvahiProtocol aprotocol,
+    AvahiLookupFlags flags,
+    AvahiSServiceResolverCallback callback,
+    void* userdata) {
+
+    AvahiSServiceResolver *r;
+    AvahiKey *k;
+    char n[AVAHI_DOMAIN_NAME_MAX];
+    int ret;
+
+    assert(server);
+    assert(type);
+    assert(callback);
+
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, AVAHI_IF_VALID(interface), AVAHI_ERR_INVALID_INTERFACE);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, AVAHI_PROTO_VALID(protocol), AVAHI_ERR_INVALID_PROTOCOL);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, AVAHI_PROTO_VALID(aprotocol), AVAHI_ERR_INVALID_PROTOCOL);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, !domain || avahi_is_valid_domain_name(domain), AVAHI_ERR_INVALID_DOMAIN_NAME);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, !name || avahi_is_valid_service_name(name), AVAHI_ERR_INVALID_SERVICE_NAME);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, avahi_is_valid_service_type_strict(type), AVAHI_ERR_INVALID_SERVICE_TYPE);
+    AVAHI_CHECK_VALIDITY_RETURN_NULL(server, AVAHI_FLAGS_VALID(flags, AVAHI_LOOKUP_USE_WIDE_AREA|AVAHI_LOOKUP_USE_MULTICAST|AVAHI_LOOKUP_NO_TXT|AVAHI_LOOKUP_NO_ADDRESS), AVAHI_ERR_INVALID_FLAGS);
+
+    if (!domain)
+        domain = server->domain_name;
+
+    if ((ret = avahi_service_name_join(n, sizeof(n), name, type, domain)) < 0) {
+        avahi_server_set_errno(server, ret);
+        return NULL;
+    }
+
+    if (!(r = avahi_new(AvahiSServiceResolver, 1))) {
+        avahi_server_set_errno(server, AVAHI_ERR_NO_MEMORY);
+        return NULL;
+    }
+
+    r->server = server;
+    r->service_name = avahi_strdup(name);
+    r->service_type = avahi_normalize_name_strdup(type);
+    r->domain_name = avahi_normalize_name_strdup(domain);
+    r->callback = callback;
+    r->userdata = userdata;
+    r->address_protocol = aprotocol;
+    r->srv_record = r->txt_record = r->address_record = NULL;
+    r->srv_flags = r->txt_flags = r->address_flags = 0;
+    r->interface = interface;
+    r->protocol = protocol;
+    r->user_flags = flags;
+    r->record_browser_a = r->record_browser_aaaa = r->record_browser_srv = r->record_browser_txt = NULL;
+    r->time_event = NULL;
+    AVAHI_LLIST_PREPEND(AvahiSServiceResolver, resolver, server->service_resolvers, r);
+
+    k = avahi_key_new(n, AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_SRV);
+    r->record_browser_srv = avahi_s_record_browser_new(server, interface, protocol, k, flags & ~(AVAHI_LOOKUP_NO_TXT|AVAHI_LOOKUP_NO_ADDRESS), record_browser_callback, r);
+    avahi_key_unref(k);
+
+    if (!r->record_browser_srv) {
+        avahi_s_service_resolver_free(r);
+        return NULL;
+    }
+
+    if (!(flags & AVAHI_LOOKUP_NO_TXT)) {
+        k = avahi_key_new(n, AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_TXT);
+        r->record_browser_txt = avahi_s_record_browser_new(server, interface, protocol, k, flags & ~(AVAHI_LOOKUP_NO_TXT|AVAHI_LOOKUP_NO_ADDRESS),  record_browser_callback, r);
+        avahi_key_unref(k);
+
+        if (!r->record_browser_txt) {
+            avahi_s_service_resolver_free(r);
+            return NULL;
+        }
+    }
+
+    start_timeout(r);
+
+    return r;
+}
+
+void avahi_s_service_resolver_free(AvahiSServiceResolver *r) {
+    assert(r);
+
+    AVAHI_LLIST_REMOVE(AvahiSServiceResolver, resolver, r->server->service_resolvers, r);
+
+    if (r->time_event)
+        avahi_time_event_free(r->time_event);
+
+    if (r->record_browser_srv)
+        avahi_s_record_browser_free(r->record_browser_srv);
+    if (r->record_browser_txt)
+        avahi_s_record_browser_free(r->record_browser_txt);
+    if (r->record_browser_a)
+        avahi_s_record_browser_free(r->record_browser_a);
+    if (r->record_browser_aaaa)
+        avahi_s_record_browser_free(r->record_browser_aaaa);
+
+    if (r->srv_record)
+        avahi_record_unref(r->srv_record);
+    if (r->txt_record)
+        avahi_record_unref(r->txt_record);
+    if (r->address_record)
+        avahi_record_unref(r->address_record);
+
+    avahi_free(r->service_name);
+    avahi_free(r->service_type);
+    avahi_free(r->domain_name);
+    avahi_free(r);
+}
diff --git a/avahi-0.6.31/avahi-core/response-sched.c b/avahi-0.6.31/avahi-core/response-sched.c
new file mode 100644
index 0000000..abac0a1
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/response-sched.c
@@ -0,0 +1,511 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+
+#include <avahi-common/timeval.h>
+#include <avahi-common/malloc.h>
+
+#include "response-sched.h"
+#include "log.h"
+#include "rr-util.h"
+
+/* Local packets are supressed this long after sending them */
+#define AVAHI_RESPONSE_HISTORY_MSEC 500
+
+/* Local packets are deferred this long before sending them */
+#define AVAHI_RESPONSE_DEFER_MSEC 20
+
+/* Additional jitter for deferred packets */
+#define AVAHI_RESPONSE_JITTER_MSEC 100
+
+/* Remote packets can suppress local traffic as long as this value */
+#define AVAHI_RESPONSE_SUPPRESS_MSEC 700
+
+typedef struct AvahiResponseJob AvahiResponseJob;
+
+typedef enum {
+    AVAHI_SCHEDULED,
+    AVAHI_DONE,
+    AVAHI_SUPPRESSED
+} AvahiResponseJobState;
+
+struct AvahiResponseJob {
+    AvahiResponseScheduler *scheduler;
+    AvahiTimeEvent *time_event;
+
+    AvahiResponseJobState state;
+    struct timeval delivery;
+
+    AvahiRecord *record;
+    int flush_cache;
+    AvahiAddress querier;
+    int querier_valid;
+
+    AVAHI_LLIST_FIELDS(AvahiResponseJob, jobs);
+};
+
+struct AvahiResponseScheduler {
+    AvahiInterface *interface;
+    AvahiTimeEventQueue *time_event_queue;
+
+    AVAHI_LLIST_HEAD(AvahiResponseJob, jobs);
+    AVAHI_LLIST_HEAD(AvahiResponseJob, history);
+    AVAHI_LLIST_HEAD(AvahiResponseJob, suppressed);
+};
+
+static AvahiResponseJob* job_new(AvahiResponseScheduler *s, AvahiRecord *record, AvahiResponseJobState state) {
+    AvahiResponseJob *rj;
+
+    assert(s);
+    assert(record);
+
+    if (!(rj = avahi_new(AvahiResponseJob, 1))) {
+        avahi_log_error(__FILE__": Out of memory");
+        return NULL;
+    }
+
+    rj->scheduler = s;
+    rj->record = avahi_record_ref(record);
+    rj->time_event = NULL;
+    rj->flush_cache = 0;
+    rj->querier_valid = 0;
+
+    if ((rj->state = state) == AVAHI_SCHEDULED)
+        AVAHI_LLIST_PREPEND(AvahiResponseJob, jobs, s->jobs, rj);
+    else if (rj->state == AVAHI_DONE)
+        AVAHI_LLIST_PREPEND(AvahiResponseJob, jobs, s->history, rj);
+    else  /* rj->state == AVAHI_SUPPRESSED */
+        AVAHI_LLIST_PREPEND(AvahiResponseJob, jobs, s->suppressed, rj);
+
+    return rj;
+}
+
+static void job_free(AvahiResponseScheduler *s, AvahiResponseJob *rj) {
+    assert(s);
+    assert(rj);
+
+    if (rj->time_event)
+        avahi_time_event_free(rj->time_event);
+
+    if (rj->state == AVAHI_SCHEDULED)
+        AVAHI_LLIST_REMOVE(AvahiResponseJob, jobs, s->jobs, rj);
+    else if (rj->state == AVAHI_DONE)
+        AVAHI_LLIST_REMOVE(AvahiResponseJob, jobs, s->history, rj);
+    else /* rj->state == AVAHI_SUPPRESSED */
+        AVAHI_LLIST_REMOVE(AvahiResponseJob, jobs, s->suppressed, rj);
+
+    avahi_record_unref(rj->record);
+    avahi_free(rj);
+}
+
+static void elapse_callback(AvahiTimeEvent *e, void* data);
+
+static void job_set_elapse_time(AvahiResponseScheduler *s, AvahiResponseJob *rj, unsigned msec, unsigned jitter) {
+    struct timeval tv;
+
+    assert(s);
+    assert(rj);
+
+    avahi_elapse_time(&tv, msec, jitter);
+
+    if (rj->time_event)
+        avahi_time_event_update(rj->time_event, &tv);
+    else
+        rj->time_event = avahi_time_event_new(s->time_event_queue, &tv, elapse_callback, rj);
+}
+
+static void job_mark_done(AvahiResponseScheduler *s, AvahiResponseJob *rj) {
+    assert(s);
+    assert(rj);
+
+    assert(rj->state == AVAHI_SCHEDULED);
+
+    AVAHI_LLIST_REMOVE(AvahiResponseJob, jobs, s->jobs, rj);
+    AVAHI_LLIST_PREPEND(AvahiResponseJob, jobs, s->history, rj);
+
+    rj->state = AVAHI_DONE;
+
+    job_set_elapse_time(s, rj, AVAHI_RESPONSE_HISTORY_MSEC, 0);
+
+    gettimeofday(&rj->delivery, NULL);
+}
+
+AvahiResponseScheduler *avahi_response_scheduler_new(AvahiInterface *i) {
+    AvahiResponseScheduler *s;
+    assert(i);
+
+    if (!(s = avahi_new(AvahiResponseScheduler, 1))) {
+        avahi_log_error(__FILE__": Out of memory");
+        return NULL;
+    }
+
+    s->interface = i;
+    s->time_event_queue = i->monitor->server->time_event_queue;
+
+    AVAHI_LLIST_HEAD_INIT(AvahiResponseJob, s->jobs);
+    AVAHI_LLIST_HEAD_INIT(AvahiResponseJob, s->history);
+    AVAHI_LLIST_HEAD_INIT(AvahiResponseJob, s->suppressed);
+
+    return s;
+}
+
+void avahi_response_scheduler_free(AvahiResponseScheduler *s) {
+    assert(s);
+
+    avahi_response_scheduler_clear(s);
+    avahi_free(s);
+}
+
+void avahi_response_scheduler_clear(AvahiResponseScheduler *s) {
+    assert(s);
+
+    while (s->jobs)
+        job_free(s, s->jobs);
+    while (s->history)
+        job_free(s, s->history);
+    while (s->suppressed)
+        job_free(s, s->suppressed);
+}
+
+static void enumerate_aux_records_callback(AVAHI_GCC_UNUSED AvahiServer *s, AvahiRecord *r, int flush_cache, void* userdata) {
+    AvahiResponseJob *rj = userdata;
+
+    assert(r);
+    assert(rj);
+
+    avahi_response_scheduler_post(rj->scheduler, r, flush_cache, rj->querier_valid ? &rj->querier : NULL, 0);
+}
+
+static int packet_add_response_job(AvahiResponseScheduler *s, AvahiDnsPacket *p, AvahiResponseJob *rj) {
+    assert(s);
+    assert(p);
+    assert(rj);
+
+    /* Try to add this record to the packet */
+    if (!avahi_dns_packet_append_record(p, rj->record, rj->flush_cache, 0))
+        return 0;
+
+    /* Ok, this record will definitely be sent, so schedule the
+     * auxilliary packets, too */
+    avahi_server_enumerate_aux_records(s->interface->monitor->server, s->interface, rj->record, enumerate_aux_records_callback, rj);
+    job_mark_done(s, rj);
+
+    return 1;
+}
+
+static void send_response_packet(AvahiResponseScheduler *s, AvahiResponseJob *rj) {
+    AvahiDnsPacket *p;
+    unsigned n;
+
+    assert(s);
+    assert(rj);
+
+    if (!(p = avahi_dns_packet_new_response(s->interface->hardware->mtu, 1)))
+        return; /* OOM */
+    n = 1;
+
+    /* Put it in the packet. */
+    if (packet_add_response_job(s, p, rj)) {
+
+        /* Try to fill up packet with more responses, if available */
+        while (s->jobs) {
+
+            if (!packet_add_response_job(s, p, s->jobs))
+                break;
+
+            n++;
+        }
+
+    } else {
+        size_t size;
+
+        avahi_dns_packet_free(p);
+
+        /* OK, the packet was too small, so create one that fits */
+        size = avahi_record_get_estimate_size(rj->record) + AVAHI_DNS_PACKET_HEADER_SIZE;
+
+        if (!(p = avahi_dns_packet_new_response(size + AVAHI_DNS_PACKET_EXTRA_SIZE, 1)))
+            return; /* OOM */
+
+        if (!packet_add_response_job(s, p, rj)) {
+            avahi_dns_packet_free(p);
+
+            avahi_log_warn("Record too large, cannot send");
+            job_mark_done(s, rj);
+            return;
+        }
+    }
+
+    avahi_dns_packet_set_field(p, AVAHI_DNS_FIELD_ANCOUNT, n);
+    avahi_interface_send_packet(s->interface, p);
+    avahi_dns_packet_free(p);
+}
+
+static void elapse_callback(AVAHI_GCC_UNUSED AvahiTimeEvent *e, void* data) {
+    AvahiResponseJob *rj = data;
+
+    assert(rj);
+
+    if (rj->state == AVAHI_DONE || rj->state == AVAHI_SUPPRESSED)
+        job_free(rj->scheduler, rj);         /* Lets drop this entry */
+    else
+        send_response_packet(rj->scheduler, rj);
+}
+
+static AvahiResponseJob* find_scheduled_job(AvahiResponseScheduler *s, AvahiRecord *record) {
+    AvahiResponseJob *rj;
+
+    assert(s);
+    assert(record);
+
+    for (rj = s->jobs; rj; rj = rj->jobs_next) {
+        assert(rj->state == AVAHI_SCHEDULED);
+
+        if (avahi_record_equal_no_ttl(rj->record, record))
+            return rj;
+    }
+
+    return NULL;
+}
+
+static AvahiResponseJob* find_history_job(AvahiResponseScheduler *s, AvahiRecord *record) {
+    AvahiResponseJob *rj;
+
+    assert(s);
+    assert(record);
+
+    for (rj = s->history; rj; rj = rj->jobs_next) {
+        assert(rj->state == AVAHI_DONE);
+
+        if (avahi_record_equal_no_ttl(rj->record, record)) {
+            /* Check whether this entry is outdated */
+
+/*             avahi_log_debug("history age: %u", (unsigned) (avahi_age(&rj->delivery)/1000)); */
+
+            if (avahi_age(&rj->delivery)/1000 > AVAHI_RESPONSE_HISTORY_MSEC) {
+                /* it is outdated, so let's remove it */
+                job_free(s, rj);
+                return NULL;
+            }
+
+            return rj;
+        }
+    }
+
+    return NULL;
+}
+
+static AvahiResponseJob* find_suppressed_job(AvahiResponseScheduler *s, AvahiRecord *record, const AvahiAddress *querier) {
+    AvahiResponseJob *rj;
+
+    assert(s);
+    assert(record);
+    assert(querier);
+
+    for (rj = s->suppressed; rj; rj = rj->jobs_next) {
+        assert(rj->state == AVAHI_SUPPRESSED);
+        assert(rj->querier_valid);
+
+        if (avahi_record_equal_no_ttl(rj->record, record) &&
+            avahi_address_cmp(&rj->querier, querier) == 0) {
+            /* Check whether this entry is outdated */
+
+            if (avahi_age(&rj->delivery) > AVAHI_RESPONSE_SUPPRESS_MSEC*1000) {
+                /* it is outdated, so let's remove it */
+                job_free(s, rj);
+                return NULL;
+            }
+
+            return rj;
+        }
+    }
+
+    return NULL;
+}
+
+int avahi_response_scheduler_post(AvahiResponseScheduler *s, AvahiRecord *record, int flush_cache, const AvahiAddress *querier, int immediately) {
+    AvahiResponseJob *rj;
+    struct timeval tv;
+/*     char *t; */
+
+    assert(s);
+    assert(record);
+
+    assert(!avahi_key_is_pattern(record->key));
+
+/*     t = avahi_record_to_string(record); */
+/*     avahi_log_debug("post %i %s", immediately, t); */
+/*     avahi_free(t); */
+
+    /* Check whether this response is suppressed */
+    if (querier &&
+        (rj = find_suppressed_job(s, record, querier)) &&
+        avahi_record_is_goodbye(record) == avahi_record_is_goodbye(rj->record) &&
+        rj->record->ttl >= record->ttl/2) {
+
+/*         avahi_log_debug("Response suppressed by known answer suppression.");  */
+        return 0;
+    }
+
+    /* Check if we already sent this response recently */
+    if ((rj = find_history_job(s, record))) {
+
+        if (avahi_record_is_goodbye(record) == avahi_record_is_goodbye(rj->record) &&
+            rj->record->ttl >= record->ttl/2 &&
+            (rj->flush_cache || !flush_cache)) {
+/*             avahi_log_debug("Response suppressed by local duplicate suppression (history)");  */
+            return 0;
+        }
+
+        /* Outdated ... */
+        job_free(s, rj);
+    }
+
+    avahi_elapse_time(&tv, immediately ? 0 : AVAHI_RESPONSE_DEFER_MSEC, immediately ? 0 : AVAHI_RESPONSE_JITTER_MSEC);
+
+    if ((rj = find_scheduled_job(s, record))) {
+/*          avahi_log_debug("Response suppressed by local duplicate suppression (scheduled)"); */
+
+        /* Update a little ... */
+
+        /* Update the time if the new is prior to the old */
+        if (avahi_timeval_compare(&tv, &rj->delivery) < 0) {
+            rj->delivery = tv;
+            avahi_time_event_update(rj->time_event, &rj->delivery);
+        }
+
+        /* Update the flush cache bit */
+        if (flush_cache)
+            rj->flush_cache = 1;
+
+        /* Update the querier field */
+        if (!querier || (rj->querier_valid && avahi_address_cmp(querier, &rj->querier) != 0))
+            rj->querier_valid = 0;
+
+        /* Update record data (just for the TTL) */
+        avahi_record_unref(rj->record);
+        rj->record = avahi_record_ref(record);
+
+        return 1;
+    } else {
+/*         avahi_log_debug("Accepted new response job.");  */
+
+        /* Create a new job and schedule it */
+        if (!(rj = job_new(s, record, AVAHI_SCHEDULED)))
+            return 0; /* OOM */
+
+        rj->delivery = tv;
+        rj->time_event = avahi_time_event_new(s->time_event_queue, &rj->delivery, elapse_callback, rj);
+        rj->flush_cache = flush_cache;
+
+        if ((rj->querier_valid = !!querier))
+            rj->querier = *querier;
+
+        return 1;
+    }
+}
+
+void avahi_response_scheduler_incoming(AvahiResponseScheduler *s, AvahiRecord *record, int flush_cache) {
+    AvahiResponseJob *rj;
+    assert(s);
+
+    /* This function is called whenever an incoming response was
+     * receieved. We drop scheduled responses which match here. The
+     * keyword is "DUPLICATE ANSWER SUPPRESION". */
+
+    if ((rj = find_scheduled_job(s, record))) {
+
+        if ((!rj->flush_cache || flush_cache) &&    /* flush cache bit was set correctly */
+            avahi_record_is_goodbye(record) == avahi_record_is_goodbye(rj->record) &&   /* both goodbye packets, or both not */
+            record->ttl >= rj->record->ttl/2) {     /* sensible TTL */
+
+            /* A matching entry was found, so let's mark it done */
+/*             avahi_log_debug("Response suppressed by distributed duplicate suppression"); */
+            job_mark_done(s, rj);
+        }
+
+        return;
+    }
+
+    if ((rj = find_history_job(s, record))) {
+        /* Found a history job, let's update it */
+        avahi_record_unref(rj->record);
+        rj->record = avahi_record_ref(record);
+    } else
+        /* Found no existing history job, so let's create a new one */
+        if (!(rj = job_new(s, record, AVAHI_DONE)))
+            return; /* OOM */
+
+    rj->flush_cache = flush_cache;
+    rj->querier_valid = 0;
+
+    gettimeofday(&rj->delivery, NULL);
+    job_set_elapse_time(s, rj, AVAHI_RESPONSE_HISTORY_MSEC, 0);
+}
+
+void avahi_response_scheduler_suppress(AvahiResponseScheduler *s, AvahiRecord *record, const AvahiAddress *querier) {
+    AvahiResponseJob *rj;
+
+    assert(s);
+    assert(record);
+    assert(querier);
+
+    if ((rj = find_scheduled_job(s, record))) {
+
+        if (rj->querier_valid && avahi_address_cmp(querier, &rj->querier) == 0 && /* same originator */
+            avahi_record_is_goodbye(record) == avahi_record_is_goodbye(rj->record) && /* both goodbye packets, or both not */
+            record->ttl >= rj->record->ttl/2) {                                  /* sensible TTL */
+
+            /* A matching entry was found, so let's drop it */
+/*             avahi_log_debug("Known answer suppression active!"); */
+            job_free(s, rj);
+        }
+    }
+
+    if ((rj = find_suppressed_job(s, record, querier))) {
+
+        /* Let's update the old entry */
+        avahi_record_unref(rj->record);
+        rj->record = avahi_record_ref(record);
+
+    } else {
+
+        /* Create a new entry */
+        if (!(rj = job_new(s, record, AVAHI_SUPPRESSED)))
+            return; /* OOM */
+        rj->querier_valid = 1;
+        rj->querier = *querier;
+    }
+
+    gettimeofday(&rj->delivery, NULL);
+    job_set_elapse_time(s, rj, AVAHI_RESPONSE_SUPPRESS_MSEC, 0);
+}
+
+void avahi_response_scheduler_force(AvahiResponseScheduler *s) {
+    assert(s);
+
+    /* Send all scheduled responses immediately */
+    while (s->jobs)
+        send_response_packet(s, s->jobs);
+}
diff --git a/avahi-0.6.31/avahi-core/response-sched.h b/avahi-0.6.31/avahi-core/response-sched.h
new file mode 100644
index 0000000..548839e
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/response-sched.h
@@ -0,0 +1,37 @@
+#ifndef fooresponseschedhfoo
+#define fooresponseschedhfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+typedef struct AvahiResponseScheduler AvahiResponseScheduler;
+
+#include <avahi-common/address.h>
+#include "iface.h"
+
+AvahiResponseScheduler *avahi_response_scheduler_new(AvahiInterface *i);
+void avahi_response_scheduler_free(AvahiResponseScheduler *s);
+void avahi_response_scheduler_clear(AvahiResponseScheduler *s);
+void avahi_response_scheduler_force(AvahiResponseScheduler *s);
+
+int avahi_response_scheduler_post(AvahiResponseScheduler *s, AvahiRecord *record, int flush_cache, const AvahiAddress *querier, int immediately);
+void avahi_response_scheduler_incoming(AvahiResponseScheduler *s, AvahiRecord *record, int flush_cache);
+void avahi_response_scheduler_suppress(AvahiResponseScheduler *s, AvahiRecord *record, const AvahiAddress *querier);
+
+#endif
diff --git a/avahi-0.6.31/avahi-core/rr-util.h b/avahi-0.6.31/avahi-core/rr-util.h
new file mode 100644
index 0000000..0eebc00
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/rr-util.h
@@ -0,0 +1,62 @@
+#ifndef foorrutilhfoo
+#define foorrutilhfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#include "rr.h"
+
+AVAHI_C_DECL_BEGIN
+
+/** Creaze new AvahiKey object based on an existing key but replaceing the type by CNAME */
+AvahiKey *avahi_key_new_cname(AvahiKey *key);
+
+/** Match a key to a key pattern. The pattern has a type of
+AVAHI_DNS_CLASS_ANY, the classes are taken to be equal. Same for the
+type. If the pattern has neither class nor type with ANY constants,
+this function is identical to avahi_key_equal(). In contrast to
+avahi_equal() this function is not commutative. */
+int avahi_key_pattern_match(const AvahiKey *pattern, const AvahiKey *k);
+
+/** Check whether a key is a pattern key, i.e. the class/type has a
+ * value of AVAHI_DNS_CLASS_ANY/AVAHI_DNS_TYPE_ANY */
+int avahi_key_is_pattern(const AvahiKey *k);
+
+/** Returns a maximum estimate for the space that is needed to store
+ * this key in a DNS packet. */
+size_t avahi_key_get_estimate_size(AvahiKey *k);
+
+/** Returns a maximum estimate for the space that is needed to store
+ * the record in a DNS packet. */
+size_t avahi_record_get_estimate_size(AvahiRecord *r);
+
+/** Do a mDNS spec conforming lexicographical comparison of the two
+ * records. Return a negative value if a < b, a positive if a > b,
+ * zero if equal. */
+int avahi_record_lexicographical_compare(AvahiRecord *a, AvahiRecord *b);
+
+/** Return 1 if the specified record is an mDNS goodbye record. i.e. TTL is zero. */
+int avahi_record_is_goodbye(AvahiRecord *r);
+
+/** Make a deep copy of an AvahiRecord object */
+AvahiRecord *avahi_record_copy(AvahiRecord *r);
+
+AVAHI_C_DECL_END
+
+#endif
diff --git a/avahi-0.6.31/avahi-core/rr.c b/avahi-0.6.31/avahi-core/rr.c
new file mode 100644
index 0000000..7fa0bee
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/rr.c
@@ -0,0 +1,733 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <arpa/inet.h>
+#include <assert.h>
+
+#include <avahi-common/domain.h>
+#include <avahi-common/malloc.h>
+#include <avahi-common/defs.h>
+
+#include "rr.h"
+#include "log.h"
+#include "util.h"
+#include "hashmap.h"
+#include "domain-util.h"
+#include "rr-util.h"
+#include "addr-util.h"
+
+AvahiKey *avahi_key_new(const char *name, uint16_t class, uint16_t type) {
+    AvahiKey *k;
+    assert(name);
+
+    if (!(k = avahi_new(AvahiKey, 1))) {
+        avahi_log_error("avahi_new() failed.");
+        return NULL;
+    }
+
+    if (!(k->name = avahi_normalize_name_strdup(name))) {
+        avahi_log_error("avahi_normalize_name() failed.");
+        avahi_free(k);
+        return NULL;
+    }
+
+    k->ref = 1;
+    k->clazz = class;
+    k->type = type;
+
+    return k;
+}
+
+AvahiKey *avahi_key_new_cname(AvahiKey *key) {
+    assert(key);
+
+    if (key->clazz != AVAHI_DNS_CLASS_IN)
+        return NULL;
+
+    if (key->type == AVAHI_DNS_TYPE_CNAME)
+        return NULL;
+
+    return avahi_key_new(key->name, key->clazz, AVAHI_DNS_TYPE_CNAME);
+}
+
+AvahiKey *avahi_key_ref(AvahiKey *k) {
+    assert(k);
+    assert(k->ref >= 1);
+
+    k->ref++;
+
+    return k;
+}
+
+void avahi_key_unref(AvahiKey *k) {
+    assert(k);
+    assert(k->ref >= 1);
+
+    if ((--k->ref) <= 0) {
+        avahi_free(k->name);
+        avahi_free(k);
+    }
+}
+
+AvahiRecord *avahi_record_new(AvahiKey *k, uint32_t ttl) {
+    AvahiRecord *r;
+
+    assert(k);
+
+    if (!(r = avahi_new(AvahiRecord, 1))) {
+        avahi_log_error("avahi_new() failed.");
+        return NULL;
+    }
+
+    r->ref = 1;
+    r->key = avahi_key_ref(k);
+
+    memset(&r->data, 0, sizeof(r->data));
+
+    r->ttl = ttl != (uint32_t) -1 ? ttl : AVAHI_DEFAULT_TTL;
+
+    return r;
+}
+
+AvahiRecord *avahi_record_new_full(const char *name, uint16_t class, uint16_t type, uint32_t ttl) {
+    AvahiRecord *r;
+    AvahiKey *k;
+
+    assert(name);
+
+    if (!(k = avahi_key_new(name, class, type))) {
+        avahi_log_error("avahi_key_new() failed.");
+        return NULL;
+    }
+
+    r = avahi_record_new(k, ttl);
+    avahi_key_unref(k);
+
+    if (!r) {
+        avahi_log_error("avahi_record_new() failed.");
+        return NULL;
+    }
+
+    return r;
+}
+
+AvahiRecord *avahi_record_ref(AvahiRecord *r) {
+    assert(r);
+    assert(r->ref >= 1);
+
+    r->ref++;
+    return r;
+}
+
+void avahi_record_unref(AvahiRecord *r) {
+    assert(r);
+    assert(r->ref >= 1);
+
+    if ((--r->ref) <= 0) {
+        switch (r->key->type) {
+
+            case AVAHI_DNS_TYPE_SRV:
+                avahi_free(r->data.srv.name);
+                break;
+
+            case AVAHI_DNS_TYPE_PTR:
+            case AVAHI_DNS_TYPE_CNAME:
+            case AVAHI_DNS_TYPE_NS:
+                avahi_free(r->data.ptr.name);
+                break;
+
+            case AVAHI_DNS_TYPE_HINFO:
+                avahi_free(r->data.hinfo.cpu);
+                avahi_free(r->data.hinfo.os);
+                break;
+
+            case AVAHI_DNS_TYPE_TXT:
+                avahi_string_list_free(r->data.txt.string_list);
+                break;
+
+            case AVAHI_DNS_TYPE_A:
+            case AVAHI_DNS_TYPE_AAAA:
+                break;
+
+            default:
+                avahi_free(r->data.generic.data);
+        }
+
+        avahi_key_unref(r->key);
+        avahi_free(r);
+    }
+}
+
+const char *avahi_dns_class_to_string(uint16_t class) {
+    if (class & AVAHI_DNS_CACHE_FLUSH)
+        return "FLUSH";
+
+    switch (class) {
+        case AVAHI_DNS_CLASS_IN:
+            return "IN";
+        case AVAHI_DNS_CLASS_ANY:
+            return "ANY";
+        default:
+            return NULL;
+    }
+}
+
+const char *avahi_dns_type_to_string(uint16_t type) {
+    switch (type) {
+        case AVAHI_DNS_TYPE_CNAME:
+            return "CNAME";
+        case AVAHI_DNS_TYPE_A:
+            return "A";
+        case AVAHI_DNS_TYPE_AAAA:
+            return "AAAA";
+        case AVAHI_DNS_TYPE_PTR:
+            return "PTR";
+        case AVAHI_DNS_TYPE_HINFO:
+            return "HINFO";
+        case AVAHI_DNS_TYPE_TXT:
+            return "TXT";
+        case AVAHI_DNS_TYPE_SRV:
+            return "SRV";
+        case AVAHI_DNS_TYPE_ANY:
+            return "ANY";
+        case AVAHI_DNS_TYPE_SOA:
+            return "SOA";
+        case AVAHI_DNS_TYPE_NS:
+            return "NS";
+        default:
+            return NULL;
+    }
+}
+
+char *avahi_key_to_string(const AvahiKey *k) {
+    char class[16], type[16];
+    const char *c, *t;
+
+    assert(k);
+    assert(k->ref >= 1);
+
+    /* According to RFC3597 */
+
+    if (!(c = avahi_dns_class_to_string(k->clazz))) {
+        snprintf(class, sizeof(class), "CLASS%u", k->clazz);
+        c = class;
+    }
+
+    if (!(t = avahi_dns_type_to_string(k->type))) {
+        snprintf(type, sizeof(type), "TYPE%u", k->type);
+        t = type;
+    }
+
+    return avahi_strdup_printf("%s\t%s\t%s", k->name, c, t);
+}
+
+char *avahi_record_to_string(const AvahiRecord *r) {
+    char *p, *s;
+    char buf[1024], *t = NULL, *d = NULL;
+
+    assert(r);
+    assert(r->ref >= 1);
+
+    switch (r->key->type) {
+        case AVAHI_DNS_TYPE_A:
+            inet_ntop(AF_INET, &r->data.a.address.address, t = buf, sizeof(buf));
+            break;
+
+        case AVAHI_DNS_TYPE_AAAA:
+            inet_ntop(AF_INET6, &r->data.aaaa.address.address, t = buf, sizeof(buf));
+            break;
+
+        case AVAHI_DNS_TYPE_PTR:
+        case AVAHI_DNS_TYPE_CNAME:
+        case AVAHI_DNS_TYPE_NS:
+
+            t = r->data.ptr.name;
+            break;
+
+        case AVAHI_DNS_TYPE_TXT:
+            t = d = avahi_string_list_to_string(r->data.txt.string_list);
+            break;
+
+        case AVAHI_DNS_TYPE_HINFO:
+
+            snprintf(t = buf, sizeof(buf), "\"%s\" \"%s\"", r->data.hinfo.cpu, r->data.hinfo.os);
+            break;
+
+        case AVAHI_DNS_TYPE_SRV:
+
+            snprintf(t = buf, sizeof(buf), "%u %u %u %s",
+                     r->data.srv.priority,
+                     r->data.srv.weight,
+                     r->data.srv.port,
+                     r->data.srv.name);
+
+            break;
+
+        default: {
+
+            uint8_t *c;
+            uint16_t n;
+            int i;
+            char *e;
+
+            /* According to RFC3597 */
+
+            snprintf(t = buf, sizeof(buf), "\\# %u", r->data.generic.size);
+
+            e = strchr(t, 0);
+
+            for (c = r->data.generic.data, n = r->data.generic.size, i = 0;
+                 n > 0 && i < 20;
+                 c ++, n --, i++) {
+
+                sprintf(e, " %02X", *c);
+                e = strchr(e, 0);
+            }
+
+            break;
+        }
+    }
+
+    p = avahi_key_to_string(r->key);
+    s = avahi_strdup_printf("%s %s ; ttl=%u", p, t, r->ttl);
+    avahi_free(p);
+    avahi_free(d);
+
+    return s;
+}
+
+int avahi_key_equal(const AvahiKey *a, const AvahiKey *b) {
+    assert(a);
+    assert(b);
+
+    if (a == b)
+        return 1;
+
+    return avahi_domain_equal(a->name, b->name) &&
+        a->type == b->type &&
+        a->clazz == b->clazz;
+}
+
+int avahi_key_pattern_match(const AvahiKey *pattern, const AvahiKey *k) {
+    assert(pattern);
+    assert(k);
+
+    assert(!avahi_key_is_pattern(k));
+
+    if (pattern == k)
+        return 1;
+
+    return avahi_domain_equal(pattern->name, k->name) &&
+        (pattern->type == k->type || pattern->type == AVAHI_DNS_TYPE_ANY) &&
+        (pattern->clazz == k->clazz || pattern->clazz == AVAHI_DNS_CLASS_ANY);
+}
+
+int avahi_key_is_pattern(const AvahiKey *k) {
+    assert(k);
+
+    return
+        k->type == AVAHI_DNS_TYPE_ANY ||
+        k->clazz == AVAHI_DNS_CLASS_ANY;
+}
+
+unsigned avahi_key_hash(const AvahiKey *k) {
+    assert(k);
+
+    return
+        avahi_domain_hash(k->name) +
+        k->type +
+        k->clazz;
+}
+
+static int rdata_equal(const AvahiRecord *a, const AvahiRecord *b) {
+    assert(a);
+    assert(b);
+    assert(a->key->type == b->key->type);
+
+    switch (a->key->type) {
+        case AVAHI_DNS_TYPE_SRV:
+            return
+                a->data.srv.priority == b->data.srv.priority &&
+                a->data.srv.weight == b->data.srv.weight &&
+                a->data.srv.port == b->data.srv.port &&
+                avahi_domain_equal(a->data.srv.name, b->data.srv.name);
+
+        case AVAHI_DNS_TYPE_PTR:
+        case AVAHI_DNS_TYPE_CNAME:
+        case AVAHI_DNS_TYPE_NS:
+            return avahi_domain_equal(a->data.ptr.name, b->data.ptr.name);
+
+        case AVAHI_DNS_TYPE_HINFO:
+            return
+                !strcmp(a->data.hinfo.cpu, b->data.hinfo.cpu) &&
+                !strcmp(a->data.hinfo.os, b->data.hinfo.os);
+
+        case AVAHI_DNS_TYPE_TXT:
+            return avahi_string_list_equal(a->data.txt.string_list, b->data.txt.string_list);
+
+        case AVAHI_DNS_TYPE_A:
+            return memcmp(&a->data.a.address, &b->data.a.address, sizeof(AvahiIPv4Address)) == 0;
+
+        case AVAHI_DNS_TYPE_AAAA:
+            return memcmp(&a->data.aaaa.address, &b->data.aaaa.address, sizeof(AvahiIPv6Address)) == 0;
+
+        default:
+            return a->data.generic.size == b->data.generic.size &&
+                (a->data.generic.size == 0 || memcmp(a->data.generic.data, b->data.generic.data, a->data.generic.size) == 0);
+    }
+
+}
+
+int avahi_record_equal_no_ttl(const AvahiRecord *a, const AvahiRecord *b) {
+    assert(a);
+    assert(b);
+
+    if (a == b)
+        return 1;
+
+    return
+        avahi_key_equal(a->key, b->key) &&
+        rdata_equal(a, b);
+}
+
+
+AvahiRecord *avahi_record_copy(AvahiRecord *r) {
+    AvahiRecord *copy;
+
+    if (!(copy = avahi_new(AvahiRecord, 1))) {
+        avahi_log_error("avahi_new() failed.");
+        return NULL;
+    }
+
+    copy->ref = 1;
+    copy->key = avahi_key_ref(r->key);
+    copy->ttl = r->ttl;
+
+    switch (r->key->type) {
+        case AVAHI_DNS_TYPE_PTR:
+        case AVAHI_DNS_TYPE_CNAME:
+        case AVAHI_DNS_TYPE_NS:
+            if (!(copy->data.ptr.name = avahi_strdup(r->data.ptr.name)))
+                goto fail;
+            break;
+
+        case AVAHI_DNS_TYPE_SRV:
+            copy->data.srv.priority = r->data.srv.priority;
+            copy->data.srv.weight = r->data.srv.weight;
+            copy->data.srv.port = r->data.srv.port;
+            if (!(copy->data.srv.name = avahi_strdup(r->data.srv.name)))
+                goto fail;
+            break;
+
+        case AVAHI_DNS_TYPE_HINFO:
+            if (!(copy->data.hinfo.os = avahi_strdup(r->data.hinfo.os)))
+                goto fail;
+
+            if (!(copy->data.hinfo.cpu = avahi_strdup(r->data.hinfo.cpu))) {
+                avahi_free(r->data.hinfo.os);
+                goto fail;
+            }
+            break;
+
+        case AVAHI_DNS_TYPE_TXT:
+            copy->data.txt.string_list = avahi_string_list_copy(r->data.txt.string_list);
+            break;
+
+        case AVAHI_DNS_TYPE_A:
+            copy->data.a.address = r->data.a.address;
+            break;
+
+        case AVAHI_DNS_TYPE_AAAA:
+            copy->data.aaaa.address = r->data.aaaa.address;
+            break;
+
+        default:
+            if (!(copy->data.generic.data = avahi_memdup(r->data.generic.data, r->data.generic.size)))
+                goto fail;
+            copy->data.generic.size = r->data.generic.size;
+            break;
+
+    }
+
+    return copy;
+
+fail:
+    avahi_log_error("Failed to allocate memory");
+
+    avahi_key_unref(copy->key);
+    avahi_free(copy);
+
+    return NULL;
+}
+
+
+size_t avahi_key_get_estimate_size(AvahiKey *k) {
+    assert(k);
+
+    return strlen(k->name)+1+4;
+}
+
+size_t avahi_record_get_estimate_size(AvahiRecord *r) {
+    size_t n;
+    assert(r);
+
+    n = avahi_key_get_estimate_size(r->key) + 4 + 2;
+
+    switch (r->key->type) {
+        case AVAHI_DNS_TYPE_PTR:
+        case AVAHI_DNS_TYPE_CNAME:
+        case AVAHI_DNS_TYPE_NS:
+            n += strlen(r->data.ptr.name) + 1;
+            break;
+
+        case AVAHI_DNS_TYPE_SRV:
+            n += 6 + strlen(r->data.srv.name) + 1;
+            break;
+
+        case AVAHI_DNS_TYPE_HINFO:
+            n += strlen(r->data.hinfo.os) + 1 + strlen(r->data.hinfo.cpu) + 1;
+            break;
+
+        case AVAHI_DNS_TYPE_TXT:
+            n += avahi_string_list_serialize(r->data.txt.string_list, NULL, 0);
+            break;
+
+        case AVAHI_DNS_TYPE_A:
+            n += sizeof(AvahiIPv4Address);
+            break;
+
+        case AVAHI_DNS_TYPE_AAAA:
+            n += sizeof(AvahiIPv6Address);
+            break;
+
+        default:
+            n += r->data.generic.size;
+    }
+
+    return n;
+}
+
+static int lexicographical_memcmp(const void* a, size_t al, const void* b, size_t bl) {
+    size_t c;
+    int ret;
+
+    assert(a);
+    assert(b);
+
+    c = al < bl ? al : bl;
+    if ((ret = memcmp(a, b, c)))
+        return ret;
+
+    if (al == bl)
+        return 0;
+    else
+        return al == c ? 1 : -1;
+}
+
+static int uint16_cmp(uint16_t a, uint16_t b) {
+    return a == b ? 0 : (a < b ? -1 : 1);
+}
+
+int avahi_record_lexicographical_compare(AvahiRecord *a, AvahiRecord *b) {
+    int r;
+/*      char *t1, *t2; */
+
+    assert(a);
+    assert(b);
+
+/*     t1 = avahi_record_to_string(a); */
+/*     t2 = avahi_record_to_string(b); */
+/*     g_message("lexicocmp: %s %s", t1, t2); */
+/*     avahi_free(t1); */
+/*     avahi_free(t2); */
+
+    if (a == b)
+        return 0;
+
+    if ((r = uint16_cmp(a->key->clazz, b->key->clazz)) ||
+        (r = uint16_cmp(a->key->type, b->key->type)))
+        return r;
+
+    switch (a->key->type) {
+
+        case AVAHI_DNS_TYPE_PTR:
+        case AVAHI_DNS_TYPE_CNAME:
+        case AVAHI_DNS_TYPE_NS:
+            return avahi_binary_domain_cmp(a->data.ptr.name, b->data.ptr.name);
+
+        case AVAHI_DNS_TYPE_SRV: {
+            if ((r = uint16_cmp(a->data.srv.priority, b->data.srv.priority)) == 0 &&
+                (r = uint16_cmp(a->data.srv.weight, b->data.srv.weight)) == 0 &&
+                (r = uint16_cmp(a->data.srv.port, b->data.srv.port)) == 0)
+                r = avahi_binary_domain_cmp(a->data.srv.name, b->data.srv.name);
+
+            return r;
+        }
+
+        case AVAHI_DNS_TYPE_HINFO: {
+
+            if ((r = strcmp(a->data.hinfo.cpu, b->data.hinfo.cpu)) ||
+                (r = strcmp(a->data.hinfo.os, b->data.hinfo.os)))
+                return r;
+
+            return 0;
+
+        }
+
+        case AVAHI_DNS_TYPE_TXT: {
+
+            uint8_t *ma = NULL, *mb = NULL;
+            size_t asize, bsize;
+
+            asize = avahi_string_list_serialize(a->data.txt.string_list, NULL, 0);
+            bsize = avahi_string_list_serialize(b->data.txt.string_list, NULL, 0);
+
+            if (asize > 0 && !(ma = avahi_new(uint8_t, asize)))
+                goto fail;
+
+            if (bsize > 0 && !(mb = avahi_new(uint8_t, bsize))) {
+                avahi_free(ma);
+                goto fail;
+            }
+
+            avahi_string_list_serialize(a->data.txt.string_list, ma, asize);
+            avahi_string_list_serialize(b->data.txt.string_list, mb, bsize);
+
+            if (asize && bsize)
+                r = lexicographical_memcmp(ma, asize, mb, bsize);
+            else if (asize && !bsize)
+                r = 1;
+            else if (!asize && bsize)
+                r = -1;
+            else
+                r = 0;
+
+            avahi_free(ma);
+            avahi_free(mb);
+
+            return r;
+        }
+
+        case AVAHI_DNS_TYPE_A:
+            return memcmp(&a->data.a.address, &b->data.a.address, sizeof(AvahiIPv4Address));
+
+        case AVAHI_DNS_TYPE_AAAA:
+            return memcmp(&a->data.aaaa.address, &b->data.aaaa.address, sizeof(AvahiIPv6Address));
+
+        default:
+            return lexicographical_memcmp(a->data.generic.data, a->data.generic.size,
+                                          b->data.generic.data, b->data.generic.size);
+    }
+
+
+fail:
+    avahi_log_error(__FILE__": Out of memory");
+    return -1; /* or whatever ... */
+}
+
+int avahi_record_is_goodbye(AvahiRecord *r) {
+    assert(r);
+
+    return r->ttl == 0;
+}
+
+int avahi_key_is_valid(AvahiKey *k) {
+    assert(k);
+
+    if (!avahi_is_valid_domain_name(k->name))
+        return 0;
+
+    return 1;
+}
+
+int avahi_record_is_valid(AvahiRecord *r) {
+    assert(r);
+
+    if (!avahi_key_is_valid(r->key))
+        return 0;
+
+    switch (r->key->type) {
+
+        case AVAHI_DNS_TYPE_PTR:
+        case AVAHI_DNS_TYPE_CNAME:
+        case AVAHI_DNS_TYPE_NS:
+            return avahi_is_valid_domain_name(r->data.ptr.name);
+
+        case AVAHI_DNS_TYPE_SRV:
+            return avahi_is_valid_domain_name(r->data.srv.name);
+
+        case AVAHI_DNS_TYPE_HINFO:
+            return
+                strlen(r->data.hinfo.os) <= 255 &&
+                strlen(r->data.hinfo.cpu) <= 255;
+
+        case AVAHI_DNS_TYPE_TXT: {
+
+            AvahiStringList *strlst;
+
+            for (strlst = r->data.txt.string_list; strlst; strlst = strlst->next)
+                if (strlst->size > 255 || strlst->size <= 0)
+                    return 0;
+
+            return 1;
+        }
+    }
+
+    return 1;
+}
+
+static AvahiAddress *get_address(const AvahiRecord *r, AvahiAddress *a) {
+    assert(r);
+
+    switch (r->key->type) {
+        case AVAHI_DNS_TYPE_A:
+            a->proto = AVAHI_PROTO_INET;
+            a->data.ipv4 = r->data.a.address;
+            break;
+
+        case AVAHI_DNS_TYPE_AAAA:
+            a->proto = AVAHI_PROTO_INET6;
+            a->data.ipv6 = r->data.aaaa.address;
+            break;
+
+        default:
+            return NULL;
+    }
+
+    return a;
+}
+
+int avahi_record_is_link_local_address(const AvahiRecord *r) {
+    AvahiAddress a;
+
+    assert(r);
+
+    if (!get_address(r, &a))
+        return 0;
+
+    return avahi_address_is_link_local(&a);
+}
diff --git a/avahi-0.6.31/avahi-core/rr.h b/avahi-0.6.31/avahi-core/rr.h
new file mode 100644
index 0000000..794b83f
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/rr.h
@@ -0,0 +1,175 @@
+#ifndef foorrhfoo
+#define foorrhfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+/** \file rr.h Functions and definitions for manipulating DNS resource record (RR) data. */
+
+#include <inttypes.h>
+#include <sys/types.h>
+
+#include <avahi-common/strlst.h>
+#include <avahi-common/address.h>
+#include <avahi-common/cdecl.h>
+
+AVAHI_C_DECL_BEGIN
+
+/** DNS record types, see RFC 1035, in addition to those defined in defs.h */
+enum {
+    AVAHI_DNS_TYPE_ANY = 0xFF,   /**< Special query type for requesting all records */
+    AVAHI_DNS_TYPE_OPT = 41,     /**< EDNS0 option */
+    AVAHI_DNS_TYPE_TKEY = 249,
+    AVAHI_DNS_TYPE_TSIG = 250,
+    AVAHI_DNS_TYPE_IXFR = 251,
+    AVAHI_DNS_TYPE_AXFR = 252
+};
+
+/** DNS record classes, see RFC 1035, in addition to those defined in defs.h */
+enum {
+    AVAHI_DNS_CLASS_ANY = 0xFF,         /**< Special query type for requesting all records */
+    AVAHI_DNS_CACHE_FLUSH = 0x8000,     /**< Not really a class but a bit which may be set in response packets, see mDNS spec for more information */
+    AVAHI_DNS_UNICAST_RESPONSE = 0x8000 /**< Not really a class but a bit which may be set in query packets, see mDNS spec for more information */
+};
+
+/** Encapsulates a DNS query key consisting of class, type and
+    name. Use avahi_key_ref()/avahi_key_unref() for manipulating the
+    reference counter. The structure is intended to be treated as "immutable", no
+    changes should be imposed after creation */
+typedef struct AvahiKey {
+    int ref;           /**< Reference counter */
+    char *name;        /**< Record name */
+    uint16_t clazz;    /**< Record class, one of the AVAHI_DNS_CLASS_xxx constants */
+    uint16_t type;     /**< Record type, one of the AVAHI_DNS_TYPE_xxx constants */
+} AvahiKey;
+
+/** Encapsulates a DNS resource record. The structure is intended to
+ * be treated as "immutable", no changes should be imposed after
+ * creation. */
+typedef struct AvahiRecord {
+    int ref;         /**< Reference counter */
+    AvahiKey *key;   /**< Reference to the query key of this record */
+
+    uint32_t ttl;     /**< DNS TTL of this record */
+
+    union {
+
+        struct {
+            void* data;
+            uint16_t size;
+        } generic; /**< Generic record data for unknown types */
+
+        struct {
+            uint16_t priority;
+            uint16_t weight;
+            uint16_t port;
+            char *name;
+        } srv; /**< Data for SRV records */
+
+        struct {
+            char *name;
+        } ptr, ns, cname; /**< Data for PTR, NS and CNAME records */
+
+        struct {
+            char *cpu;
+            char *os;
+        } hinfo; /**< Data for HINFO records */
+
+        struct {
+            AvahiStringList *string_list;
+        } txt; /**< Data for TXT records */
+
+        struct {
+            AvahiIPv4Address address;
+        } a; /**< Data for A records */
+
+        struct {
+            AvahiIPv6Address address;
+        } aaaa; /**< Data for AAAA records */
+
+    } data; /**< Record data */
+
+} AvahiRecord;
+
+/** Create a new AvahiKey object. The reference counter will be set to 1. */
+AvahiKey *avahi_key_new(const char *name, uint16_t clazz, uint16_t type);
+
+/** Increase the reference counter of an AvahiKey object by one */
+AvahiKey *avahi_key_ref(AvahiKey *k);
+
+/** Decrease the reference counter of an AvahiKey object by one */
+void avahi_key_unref(AvahiKey *k);
+
+/** Check whether two AvahiKey object contain the same
+ * data. AVAHI_DNS_CLASS_ANY/AVAHI_DNS_TYPE_ANY are treated like any
+ * other class/type. */
+int avahi_key_equal(const AvahiKey *a, const AvahiKey *b);
+
+/** Return a numeric hash value for a key for usage in hash tables. */
+unsigned avahi_key_hash(const AvahiKey *k);
+
+/** Create a new record object. Record data should be filled in right after creation. The reference counter is set to 1. */
+AvahiRecord *avahi_record_new(AvahiKey *k, uint32_t ttl);
+
+/** Create a new record object. Record data should be filled in right after creation. The reference counter is set to 1. */
+AvahiRecord *avahi_record_new_full(const char *name, uint16_t clazz, uint16_t type, uint32_t ttl);
+
+/** Increase the reference counter of an AvahiRecord by one. */
+AvahiRecord *avahi_record_ref(AvahiRecord *r);
+
+/** Decrease the reference counter of an AvahiRecord by one. */
+void avahi_record_unref(AvahiRecord *r);
+
+/** Return a textual representation of the specified DNS class. The
+ * returned pointer points to a read only internal string. */
+const char *avahi_dns_class_to_string(uint16_t clazz);
+
+/** Return a textual representation of the specified DNS class. The
+ * returned pointer points to a read only internal string. */
+const char *avahi_dns_type_to_string(uint16_t type);
+
+/** Create a textual representation of the specified key. avahi_free() the
+ * result! */
+char *avahi_key_to_string(const AvahiKey *k);
+
+/** Create a textual representation of the specified record, similar
+ * in style to BIND zone file data. avahi_free() the result! */
+char *avahi_record_to_string(const AvahiRecord *r);
+
+/** Check whether two records are equal (regardless of the TTL */
+int avahi_record_equal_no_ttl(const AvahiRecord *a, const AvahiRecord *b);
+
+/** Check whether the specified key is valid */
+int avahi_key_is_valid(AvahiKey *k);
+
+/** Check whether the specified record is valid */
+int avahi_record_is_valid(AvahiRecord *r);
+
+/** Parse a binary rdata object and fill it into *record. This function is actually implemented in dns.c */
+int avahi_rdata_parse(AvahiRecord *record, const void* rdata, size_t size);
+
+/** Serialize an AvahiRecord object into binary rdata. This function is actually implemented in dns.c */
+size_t avahi_rdata_serialize(AvahiRecord *record, void *rdata, size_t max_size);
+
+/** Return TRUE if the AvahiRecord object is a link-local A or AAAA address */
+int avahi_record_is_link_local_address(const AvahiRecord *r);
+
+AVAHI_C_DECL_END
+
+#endif
diff --git a/avahi-0.6.31/avahi-core/rrlist.c b/avahi-0.6.31/avahi-core/rrlist.c
new file mode 100644
index 0000000..0a794ab
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/rrlist.c
@@ -0,0 +1,188 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <assert.h>
+
+#include <avahi-common/llist.h>
+#include <avahi-common/malloc.h>
+
+#include "rrlist.h"
+#include "log.h"
+
+typedef struct AvahiRecordListItem AvahiRecordListItem;
+
+struct AvahiRecordListItem {
+    int read;
+    AvahiRecord *record;
+    int unicast_response;
+    int flush_cache;
+    int auxiliary;
+    AVAHI_LLIST_FIELDS(AvahiRecordListItem, items);
+};
+
+struct AvahiRecordList {
+    AVAHI_LLIST_HEAD(AvahiRecordListItem, read);
+    AVAHI_LLIST_HEAD(AvahiRecordListItem, unread);
+
+    int all_flush_cache;
+};
+
+AvahiRecordList *avahi_record_list_new(void) {
+    AvahiRecordList *l;
+
+    if (!(l = avahi_new(AvahiRecordList, 1))) {
+        avahi_log_error("avahi_new() failed.");
+        return NULL;
+    }
+
+    AVAHI_LLIST_HEAD_INIT(AvahiRecordListItem, l->read);
+    AVAHI_LLIST_HEAD_INIT(AvahiRecordListItem, l->unread);
+
+    l->all_flush_cache = 1;
+    return l;
+}
+
+void avahi_record_list_free(AvahiRecordList *l) {
+    assert(l);
+
+    avahi_record_list_flush(l);
+    avahi_free(l);
+}
+
+static void item_free(AvahiRecordList *l, AvahiRecordListItem *i) {
+    assert(l);
+    assert(i);
+
+    if (i->read)
+        AVAHI_LLIST_REMOVE(AvahiRecordListItem, items, l->read, i);
+    else
+        AVAHI_LLIST_REMOVE(AvahiRecordListItem, items, l->unread, i);
+
+    avahi_record_unref(i->record);
+    avahi_free(i);
+}
+
+void avahi_record_list_flush(AvahiRecordList *l) {
+    assert(l);
+
+    while (l->read)
+        item_free(l, l->read);
+    while (l->unread)
+        item_free(l, l->unread);
+
+    l->all_flush_cache = 1;
+}
+
+AvahiRecord* avahi_record_list_next(AvahiRecordList *l, int *ret_flush_cache, int *ret_unicast_response, int *ret_auxiliary) {
+    AvahiRecord *r;
+    AvahiRecordListItem *i;
+
+    if (!(i = l->unread))
+        return NULL;
+
+    assert(!i->read);
+
+    r = avahi_record_ref(i->record);
+    if (ret_unicast_response)
+        *ret_unicast_response = i->unicast_response;
+    if (ret_flush_cache)
+        *ret_flush_cache = i->flush_cache;
+    if (ret_auxiliary)
+        *ret_auxiliary = i->auxiliary;
+
+    AVAHI_LLIST_REMOVE(AvahiRecordListItem, items, l->unread, i);
+    AVAHI_LLIST_PREPEND(AvahiRecordListItem, items, l->read, i);
+
+    i->read = 1;
+
+    return r;
+}
+
+static AvahiRecordListItem *get(AvahiRecordList *l, AvahiRecord *r) {
+    AvahiRecordListItem *i;
+
+    assert(l);
+    assert(r);
+
+    for (i = l->read; i; i = i->items_next)
+        if (avahi_record_equal_no_ttl(i->record, r))
+            return i;
+
+    for (i = l->unread; i; i = i->items_next)
+        if (avahi_record_equal_no_ttl(i->record, r))
+            return i;
+
+    return NULL;
+}
+
+void avahi_record_list_push(AvahiRecordList *l, AvahiRecord *r, int flush_cache, int unicast_response, int auxiliary) {
+    AvahiRecordListItem *i;
+
+    assert(l);
+    assert(r);
+
+    if (get(l, r))
+        return;
+
+    if (!(i = avahi_new(AvahiRecordListItem, 1))) {
+        avahi_log_error("avahi_new() failed.");
+        return;
+    }
+
+    i->unicast_response = unicast_response;
+    i->flush_cache = flush_cache;
+    i->auxiliary = auxiliary;
+    i->record = avahi_record_ref(r);
+    i->read = 0;
+
+    l->all_flush_cache = l->all_flush_cache && flush_cache;
+
+    AVAHI_LLIST_PREPEND(AvahiRecordListItem, items, l->unread, i);
+}
+
+void avahi_record_list_drop(AvahiRecordList *l, AvahiRecord *r) {
+    AvahiRecordListItem *i;
+
+    assert(l);
+    assert(r);
+
+    if (!(i = get(l, r)))
+        return;
+
+    item_free(l, i);
+}
+
+int avahi_record_list_is_empty(AvahiRecordList *l) {
+    assert(l);
+
+    return !l->unread && !l->read;
+}
+
+int avahi_record_list_all_flush_cache(AvahiRecordList *l) {
+    assert(l);
+
+    /* Return TRUE if all entries in this list have flush_cache set */
+
+    return l->all_flush_cache;
+}
diff --git a/avahi-0.6.31/avahi-core/rrlist.h b/avahi-0.6.31/avahi-core/rrlist.h
new file mode 100644
index 0000000..c7b5aba
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/rrlist.h
@@ -0,0 +1,40 @@
+#ifndef foorrlisthfoo
+#define foorrlisthfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+
+#include "rr.h"
+
+typedef struct AvahiRecordList AvahiRecordList;
+
+AvahiRecordList *avahi_record_list_new(void);
+void avahi_record_list_free(AvahiRecordList *l);
+void avahi_record_list_flush(AvahiRecordList *l);
+
+AvahiRecord* avahi_record_list_next(AvahiRecordList *l, int *ret_flush_cache, int *ret_unicast_response, int *ret_auxiliary);
+void avahi_record_list_push(AvahiRecordList *l, AvahiRecord *r, int flush_cache, int unicast_response, int auxiliary);
+void avahi_record_list_drop(AvahiRecordList *l, AvahiRecord *r);
+
+int avahi_record_list_all_flush_cache(AvahiRecordList *l);
+
+int avahi_record_list_is_empty(AvahiRecordList *l);
+
+#endif
diff --git a/avahi-0.6.31/avahi-core/server.c b/avahi-0.6.31/avahi-core/server.c
new file mode 100644
index 0000000..86fd4a5
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/server.c
@@ -0,0 +1,1805 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <string.h>
+#include <sys/utsname.h>
+#include <unistd.h>
+#include <errno.h>
+#include <stdio.h>
+#include <assert.h>
+#include <stdlib.h>
+
+#include <avahi-common/domain.h>
+#include <avahi-common/timeval.h>
+#include <avahi-common/malloc.h>
+#include <avahi-common/error.h>
+
+#include "internal.h"
+#include "iface.h"
+#include "socket.h"
+#include "browse.h"
+#include "log.h"
+#include "util.h"
+#include "dns-srv-rr.h"
+#include "addr-util.h"
+#include "domain-util.h"
+#include "rr-util.h"
+
+#define AVAHI_DEFAULT_CACHE_ENTRIES_MAX 4096
+
+static void enum_aux_records(AvahiServer *s, AvahiInterface *i, const char *name, uint16_t type, void (*callback)(AvahiServer *s, AvahiRecord *r, int flush_cache, void* userdata), void* userdata) {
+    assert(s);
+    assert(i);
+    assert(name);
+    assert(callback);
+
+    if (type == AVAHI_DNS_TYPE_ANY) {
+        AvahiEntry *e;
+
+        for (e = s->entries; e; e = e->entries_next)
+            if (!e->dead &&
+                avahi_entry_is_registered(s, e, i) &&
+                e->record->key->clazz == AVAHI_DNS_CLASS_IN &&
+                avahi_domain_equal(name, e->record->key->name))
+                callback(s, e->record, e->flags & AVAHI_PUBLISH_UNIQUE, userdata);
+
+    } else {
+        AvahiEntry *e;
+        AvahiKey *k;
+
+        if (!(k = avahi_key_new(name, AVAHI_DNS_CLASS_IN, type)))
+            return; /** OOM */
+
+        for (e = avahi_hashmap_lookup(s->entries_by_key, k); e; e = e->by_key_next)
+            if (!e->dead && avahi_entry_is_registered(s, e, i))
+                callback(s, e->record, e->flags & AVAHI_PUBLISH_UNIQUE, userdata);
+
+        avahi_key_unref(k);
+    }
+}
+
+void avahi_server_enumerate_aux_records(AvahiServer *s, AvahiInterface *i, AvahiRecord *r, void (*callback)(AvahiServer *s, AvahiRecord *r, int flush_cache, void* userdata), void* userdata) {
+    assert(s);
+    assert(i);
+    assert(r);
+    assert(callback);
+
+    /* Call the specified callback far all records referenced by the one specified in *r */
+
+    if (r->key->clazz == AVAHI_DNS_CLASS_IN) {
+        if (r->key->type == AVAHI_DNS_TYPE_PTR) {
+            enum_aux_records(s, i, r->data.ptr.name, AVAHI_DNS_TYPE_SRV, callback, userdata);
+            enum_aux_records(s, i, r->data.ptr.name, AVAHI_DNS_TYPE_TXT, callback, userdata);
+        } else if (r->key->type == AVAHI_DNS_TYPE_SRV) {
+            enum_aux_records(s, i, r->data.srv.name, AVAHI_DNS_TYPE_A, callback, userdata);
+            enum_aux_records(s, i, r->data.srv.name, AVAHI_DNS_TYPE_AAAA, callback, userdata);
+        } else if (r->key->type == AVAHI_DNS_TYPE_CNAME)
+            enum_aux_records(s, i, r->data.cname.name, AVAHI_DNS_TYPE_ANY, callback, userdata);
+    }
+}
+
+void avahi_server_prepare_response(AvahiServer *s, AvahiInterface *i, AvahiEntry *e, int unicast_response, int auxiliary) {
+    assert(s);
+    assert(i);
+    assert(e);
+
+    avahi_record_list_push(s->record_list, e->record, e->flags & AVAHI_PUBLISH_UNIQUE, unicast_response, auxiliary);
+}
+
+void avahi_server_prepare_matching_responses(AvahiServer *s, AvahiInterface *i, AvahiKey *k, int unicast_response) {
+    assert(s);
+    assert(i);
+    assert(k);
+
+    /* Push all records that match the specified key to the record list */
+
+    if (avahi_key_is_pattern(k)) {
+        AvahiEntry *e;
+
+        /* Handle ANY query */
+
+        for (e = s->entries; e; e = e->entries_next)
+            if (!e->dead && avahi_key_pattern_match(k, e->record->key) && avahi_entry_is_registered(s, e, i))
+                avahi_server_prepare_response(s, i, e, unicast_response, 0);
+
+    } else {
+        AvahiEntry *e;
+
+        /* Handle all other queries */
+
+        for (e = avahi_hashmap_lookup(s->entries_by_key, k); e; e = e->by_key_next)
+            if (!e->dead && avahi_entry_is_registered(s, e, i))
+                avahi_server_prepare_response(s, i, e, unicast_response, 0);
+    }
+
+    /* Look for CNAME records */
+
+    if ((k->clazz == AVAHI_DNS_CLASS_IN || k->clazz == AVAHI_DNS_CLASS_ANY)
+        && k->type != AVAHI_DNS_TYPE_CNAME && k->type != AVAHI_DNS_TYPE_ANY) {
+
+        AvahiKey *cname_key;
+
+        if (!(cname_key = avahi_key_new(k->name, AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_CNAME)))
+            return;
+
+        avahi_server_prepare_matching_responses(s, i, cname_key, unicast_response);
+        avahi_key_unref(cname_key);
+    }
+}
+
+static void withdraw_entry(AvahiServer *s, AvahiEntry *e) {
+    assert(s);
+    assert(e);
+
+    /* Withdraw the specified entry, and if is part of an entry group,
+     * put that into COLLISION state */
+
+    if (e->dead)
+        return;
+
+    if (e->group) {
+        AvahiEntry *k;
+
+        for (k = e->group->entries; k; k = k->by_group_next)
+            if (!k->dead) {
+                avahi_goodbye_entry(s, k, 0, 1);
+                k->dead = 1;
+            }
+
+        e->group->n_probing = 0;
+
+        avahi_s_entry_group_change_state(e->group, AVAHI_ENTRY_GROUP_COLLISION);
+    } else {
+        avahi_goodbye_entry(s, e, 0, 1);
+        e->dead = 1;
+    }
+
+    s->need_entry_cleanup = 1;
+}
+
+static void withdraw_rrset(AvahiServer *s, AvahiKey *key) {
+    AvahiEntry *e;
+
+    assert(s);
+    assert(key);
+
+    /* Withdraw an entry RRSset */
+
+    for (e = avahi_hashmap_lookup(s->entries_by_key, key); e; e = e->by_key_next)
+        withdraw_entry(s, e);
+}
+
+static void incoming_probe(AvahiServer *s, AvahiRecord *record, AvahiInterface *i) {
+    AvahiEntry *e, *n;
+    int ours = 0, won = 0, lost = 0;
+
+    assert(s);
+    assert(record);
+    assert(i);
+
+    /* Handle incoming probes and check if they conflict our own probes */
+
+    for (e = avahi_hashmap_lookup(s->entries_by_key, record->key); e; e = n) {
+        int cmp;
+        n = e->by_key_next;
+
+        if (e->dead)
+            continue;
+
+        if ((cmp = avahi_record_lexicographical_compare(e->record, record)) == 0) {
+            ours = 1;
+            break;
+        } else {
+
+            if (avahi_entry_is_probing(s, e, i)) {
+                if (cmp > 0)
+                    won = 1;
+                else /* cmp < 0 */
+                    lost = 1;
+            }
+        }
+    }
+
+    if (!ours) {
+        char *t = avahi_record_to_string(record);
+
+        if (won)
+            avahi_log_debug("Received conflicting probe [%s]. Local host won.", t);
+        else if (lost) {
+            avahi_log_debug("Received conflicting probe [%s]. Local host lost. Withdrawing.", t);
+            withdraw_rrset(s, record->key);
+        }
+
+        avahi_free(t);
+    }
+}
+
+static int handle_conflict(AvahiServer *s, AvahiInterface *i, AvahiRecord *record, int unique) {
+    int valid = 1, ours = 0, conflict = 0, withdraw_immediately = 0;
+    AvahiEntry *e, *n, *conflicting_entry = NULL;
+
+    assert(s);
+    assert(i);
+    assert(record);
+
+    /* Check whether an incoming record conflicts with one of our own */
+
+    for (e = avahi_hashmap_lookup(s->entries_by_key, record->key); e; e = n) {
+        n = e->by_key_next;
+
+        if (e->dead)
+            continue;
+
+        /* Check if the incoming is a goodbye record */
+        if (avahi_record_is_goodbye(record)) {
+
+            if (avahi_record_equal_no_ttl(e->record, record)) {
+                char *t;
+
+                /* Refresh */
+                t = avahi_record_to_string(record);
+                avahi_log_debug("Received goodbye record for one of our records [%s]. Refreshing.", t);
+                avahi_server_prepare_matching_responses(s, i, e->record->key, 0);
+
+                valid = 0;
+                avahi_free(t);
+                break;
+            }
+
+            /* If the goodybe packet doesn't match one of our own RRs, we simply ignore it. */
+            continue;
+        }
+
+        if (!(e->flags & AVAHI_PUBLISH_UNIQUE) && !unique)
+            continue;
+
+        /* Either our entry or the other is intended to be unique, so let's check */
+
+        if (avahi_record_equal_no_ttl(e->record, record)) {
+            ours = 1; /* We have an identical record, so this is no conflict */
+
+            /* Check wheter there is a TTL conflict */
+            if (record->ttl <= e->record->ttl/2 &&
+                avahi_entry_is_registered(s, e, i)) {
+                char *t;
+                /* Refresh */
+                t = avahi_record_to_string(record);
+
+                avahi_log_debug("Received record with bad TTL [%s]. Refreshing.", t);
+                avahi_server_prepare_matching_responses(s, i, e->record->key, 0);
+                valid = 0;
+
+                avahi_free(t);
+            }
+
+            /* There's no need to check the other entries of this RRset */
+            break;
+
+        } else {
+
+            if (avahi_entry_is_registered(s, e, i)) {
+
+                /* A conflict => we have to return to probe mode */
+                conflict = 1;
+                conflicting_entry = e;
+
+            } else if (avahi_entry_is_probing(s, e, i)) {
+
+                /* We are currently registering a matching record, but
+                 * someone else already claimed it, so let's
+                 * withdraw */
+                conflict = 1;
+                withdraw_immediately = 1;
+            }
+        }
+    }
+
+    if (!ours && conflict) {
+        char *t;
+
+        valid = 0;
+
+        t = avahi_record_to_string(record);
+
+        if (withdraw_immediately) {
+            avahi_log_debug("Received conflicting record [%s] with local record to be. Withdrawing.", t);
+            withdraw_rrset(s, record->key);
+        } else {
+            assert(conflicting_entry);
+            avahi_log_debug("Received conflicting record [%s]. Resetting our record.", t);
+            avahi_entry_return_to_initial_state(s, conflicting_entry, i);
+
+            /* Local unique records are returned to probing
+             * state. Local shared records are reannounced. */
+        }
+
+        avahi_free(t);
+    }
+
+    return valid;
+}
+
+static void append_aux_callback(AvahiServer *s, AvahiRecord *r, int flush_cache, void* userdata) {
+    int *unicast_response = userdata;
+
+    assert(s);
+    assert(r);
+    assert(unicast_response);
+
+    avahi_record_list_push(s->record_list, r, flush_cache, *unicast_response, 1);
+}
+
+static void append_aux_records_to_list(AvahiServer *s, AvahiInterface *i, AvahiRecord *r, int unicast_response) {
+    assert(s);
+    assert(r);
+
+    avahi_server_enumerate_aux_records(s, i, r, append_aux_callback, &unicast_response);
+}
+
+void avahi_server_generate_response(AvahiServer *s, AvahiInterface *i, AvahiDnsPacket *p, const AvahiAddress *a, uint16_t port, int legacy_unicast, int immediately) {
+
+    assert(s);
+    assert(i);
+    assert(!legacy_unicast || (a && port > 0 && p));
+
+    if (legacy_unicast) {
+        AvahiDnsPacket *reply;
+        AvahiRecord *r;
+
+        if (!(reply = avahi_dns_packet_new_reply(p, 512 + AVAHI_DNS_PACKET_EXTRA_SIZE /* unicast DNS maximum packet size is 512 */ , 1, 1)))
+            return; /* OOM */
+
+        while ((r = avahi_record_list_next(s->record_list, NULL, NULL, NULL))) {
+
+            append_aux_records_to_list(s, i, r, 0);
+
+            if (avahi_dns_packet_append_record(reply, r, 0, 10))
+                avahi_dns_packet_inc_field(reply, AVAHI_DNS_FIELD_ANCOUNT);
+            else {
+                char *t = avahi_record_to_string(r);
+                avahi_log_warn("Record [%s] not fitting in legacy unicast packet, dropping.", t);
+                avahi_free(t);
+            }
+
+            avahi_record_unref(r);
+        }
+
+        if (avahi_dns_packet_get_field(reply, AVAHI_DNS_FIELD_ANCOUNT) != 0)
+            avahi_interface_send_packet_unicast(i, reply, a, port);
+
+        avahi_dns_packet_free(reply);
+
+    } else {
+        int unicast_response, flush_cache, auxiliary;
+        AvahiDnsPacket *reply = NULL;
+        AvahiRecord *r;
+
+        /* In case the query packet was truncated never respond
+        immediately, because known answer suppression records might be
+        contained in later packets */
+        int tc = p && !!(avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_FLAGS) & AVAHI_DNS_FLAG_TC);
+
+        while ((r = avahi_record_list_next(s->record_list, &flush_cache, &unicast_response, &auxiliary))) {
+
+            int im = immediately;
+
+            /* Only send the response immediately if it contains a
+             * unique entry AND it is not in reply to a truncated
+             * packet AND it is not an auxiliary record AND all other
+             * responses for this record are unique too. */
+
+            if (flush_cache && !tc && !auxiliary && avahi_record_list_all_flush_cache(s->record_list))
+                im = 1;
+
+            if (!avahi_interface_post_response(i, r, flush_cache, a, im) && unicast_response) {
+
+                /* Due to some reasons the record has not been scheduled.
+                 * The client requested an unicast response in that
+                 * case. Therefore we prepare such a response */
+
+                append_aux_records_to_list(s, i, r, unicast_response);
+
+                for (;;) {
+
+                    if (!reply) {
+                        assert(p);
+
+                        if (!(reply = avahi_dns_packet_new_reply(p, i->hardware->mtu, 0, 0)))
+                            break; /* OOM */
+                    }
+
+                    if (avahi_dns_packet_append_record(reply, r, flush_cache, 0)) {
+
+                        /* Appending this record succeeded, so incremeant
+                         * the specific header field, and return to the caller */
+
+                        avahi_dns_packet_inc_field(reply, AVAHI_DNS_FIELD_ANCOUNT);
+                        break;
+                    }
+
+                    if (avahi_dns_packet_get_field(reply, AVAHI_DNS_FIELD_ANCOUNT) == 0) {
+                        size_t size;
+
+                        /* The record is too large for one packet, so create a larger packet */
+
+                        avahi_dns_packet_free(reply);
+                        size = avahi_record_get_estimate_size(r) + AVAHI_DNS_PACKET_HEADER_SIZE;
+
+                        if (!(reply = avahi_dns_packet_new_reply(p, size + AVAHI_DNS_PACKET_EXTRA_SIZE, 0, 1)))
+                            break; /* OOM */
+
+                        if (avahi_dns_packet_append_record(reply, r, flush_cache, 0)) {
+
+                            /* Appending this record succeeded, so incremeant
+                             * the specific header field, and return to the caller */
+
+                            avahi_dns_packet_inc_field(reply, AVAHI_DNS_FIELD_ANCOUNT);
+                            break;
+
+                        }  else {
+
+                            /* We completely fucked up, there's
+                             * nothing we can do. The RR just doesn't
+                             * fit in. Let's ignore it. */
+
+                            char *t;
+                            avahi_dns_packet_free(reply);
+                            reply = NULL;
+                            t = avahi_record_to_string(r);
+                            avahi_log_warn("Record [%s] too large, doesn't fit in any packet!", t);
+                            avahi_free(t);
+                            break;
+                        }
+                    }
+
+                    /* Appending the record didn't succeeed, so let's send this packet, and create a new one */
+                    avahi_interface_send_packet_unicast(i, reply, a, port);
+                    avahi_dns_packet_free(reply);
+                    reply = NULL;
+                }
+            }
+
+            avahi_record_unref(r);
+        }
+
+        if (reply) {
+            if (avahi_dns_packet_get_field(reply, AVAHI_DNS_FIELD_ANCOUNT) != 0)
+                avahi_interface_send_packet_unicast(i, reply, a, port);
+            avahi_dns_packet_free(reply);
+        }
+    }
+
+    avahi_record_list_flush(s->record_list);
+}
+
+static void reflect_response(AvahiServer *s, AvahiInterface *i, AvahiRecord *r, int flush_cache) {
+    AvahiInterface *j;
+
+    assert(s);
+    assert(i);
+    assert(r);
+
+    if (!s->config.enable_reflector)
+        return;
+
+    for (j = s->monitor->interfaces; j; j = j->interface_next)
+        if (j != i && (s->config.reflect_ipv || j->protocol == i->protocol))
+            avahi_interface_post_response(j, r, flush_cache, NULL, 1);
+}
+
+static void* reflect_cache_walk_callback(AvahiCache *c, AvahiKey *pattern, AvahiCacheEntry *e, void* userdata) {
+    AvahiServer *s = userdata;
+    AvahiRecord* r;
+
+    assert(c);
+    assert(pattern);
+    assert(e);
+    assert(s);
+
+    /* Don't reflect cache entry with ipv6 link-local addresses. */
+    r = e->record;
+    if ((r->key->type == AVAHI_DNS_TYPE_AAAA) &&
+            (r->data.aaaa.address.address[0] == 0xFE) &&
+            (r->data.aaaa.address.address[1] == 0x80))
+      return NULL;
+
+    avahi_record_list_push(s->record_list, e->record, e->cache_flush, 0, 0);
+    return NULL;
+}
+
+static void reflect_query(AvahiServer *s, AvahiInterface *i, AvahiKey *k) {
+    AvahiInterface *j;
+
+    assert(s);
+    assert(i);
+    assert(k);
+
+    if (!s->config.enable_reflector)
+        return;
+
+    for (j = s->monitor->interfaces; j; j = j->interface_next)
+        if (j != i && (s->config.reflect_ipv || j->protocol == i->protocol)) {
+            /* Post the query to other networks */
+            avahi_interface_post_query(j, k, 1, NULL);
+
+            /* Reply from caches of other network. This is needed to
+             * "work around" known answer suppression. */
+
+            avahi_cache_walk(j->cache, k, reflect_cache_walk_callback, s);
+        }
+}
+
+static void reflect_probe(AvahiServer *s, AvahiInterface *i, AvahiRecord *r) {
+    AvahiInterface *j;
+
+    assert(s);
+    assert(i);
+    assert(r);
+
+    if (!s->config.enable_reflector)
+        return;
+
+    for (j = s->monitor->interfaces; j; j = j->interface_next)
+        if (j != i && (s->config.reflect_ipv || j->protocol == i->protocol))
+            avahi_interface_post_probe(j, r, 1);
+}
+
+static void handle_query_packet(AvahiServer *s, AvahiDnsPacket *p, AvahiInterface *i, const AvahiAddress *a, uint16_t port, int legacy_unicast, int from_local_iface) {
+    size_t n;
+    int is_probe;
+
+    assert(s);
+    assert(p);
+    assert(i);
+    assert(a);
+
+    assert(avahi_record_list_is_empty(s->record_list));
+
+    is_probe = avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_NSCOUNT) > 0;
+
+    /* Handle the questions */
+    for (n = avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_QDCOUNT); n > 0; n --) {
+        AvahiKey *key;
+        int unicast_response = 0;
+
+        if (!(key = avahi_dns_packet_consume_key(p, &unicast_response))) {
+            avahi_log_warn(__FILE__": Packet too short or invalid while reading question key. (Maybe a UTF-8 problem?)");
+            goto fail;
+        }
+
+        if (!legacy_unicast && !from_local_iface) {
+            reflect_query(s, i, key);
+            if (!unicast_response)
+              avahi_cache_start_poof(i->cache, key, a);
+        }
+
+        if (avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_ANCOUNT) == 0 &&
+            !(avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_FLAGS) & AVAHI_DNS_FLAG_TC))
+            /* Allow our own queries to be suppressed by incoming
+             * queries only when they do not include known answers */
+            avahi_query_scheduler_incoming(i->query_scheduler, key);
+
+        avahi_server_prepare_matching_responses(s, i, key, unicast_response);
+        avahi_key_unref(key);
+    }
+
+    if (!legacy_unicast) {
+
+        /* Known Answer Suppression */
+        for (n = avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_ANCOUNT); n > 0; n --) {
+            AvahiRecord *record;
+            int unique = 0;
+
+            if (!(record = avahi_dns_packet_consume_record(p, &unique))) {
+                avahi_log_warn(__FILE__": Packet too short or invalid while reading known answer record. (Maybe a UTF-8 problem?)");
+                goto fail;
+            }
+
+            avahi_response_scheduler_suppress(i->response_scheduler, record, a);
+            avahi_record_list_drop(s->record_list, record);
+            avahi_cache_stop_poof(i->cache, record, a);
+
+            avahi_record_unref(record);
+        }
+
+        /* Probe record */
+        for (n = avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_NSCOUNT); n > 0; n --) {
+            AvahiRecord *record;
+            int unique = 0;
+
+            if (!(record = avahi_dns_packet_consume_record(p, &unique))) {
+                avahi_log_warn(__FILE__": Packet too short or invalid while reading probe record. (Maybe a UTF-8 problem?)");
+                goto fail;
+            }
+
+            if (!avahi_key_is_pattern(record->key)) {
+                if (!from_local_iface)
+                    reflect_probe(s, i, record);
+                incoming_probe(s, record, i);
+            }
+
+            avahi_record_unref(record);
+        }
+    }
+
+    if (!avahi_record_list_is_empty(s->record_list))
+        avahi_server_generate_response(s, i, p, a, port, legacy_unicast, is_probe);
+
+    return;
+
+fail:
+    avahi_record_list_flush(s->record_list);
+}
+
+static void handle_response_packet(AvahiServer *s, AvahiDnsPacket *p, AvahiInterface *i, const AvahiAddress *a, int from_local_iface) {
+    unsigned n;
+
+    assert(s);
+    assert(p);
+    assert(i);
+    assert(a);
+
+    for (n = avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_ANCOUNT) +
+             avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_ARCOUNT); n > 0; n--) {
+        AvahiRecord *record;
+        int cache_flush = 0;
+
+        if (!(record = avahi_dns_packet_consume_record(p, &cache_flush))) {
+            avahi_log_warn(__FILE__": Packet too short or invalid while reading response record. (Maybe a UTF-8 problem?)");
+            break;
+        }
+
+        if (!avahi_key_is_pattern(record->key)) {
+
+            if (handle_conflict(s, i, record, cache_flush)) {
+                if (!from_local_iface && !avahi_record_is_link_local_address(record))
+                    reflect_response(s, i, record, cache_flush);
+                avahi_cache_update(i->cache, record, cache_flush, a);
+                avahi_response_scheduler_incoming(i->response_scheduler, record, cache_flush);
+            }
+        }
+
+        avahi_record_unref(record);
+    }
+
+    /* If the incoming response contained a conflicting record, some
+       records have been scheduled for sending. We need to flush them
+       here. */
+    if (!avahi_record_list_is_empty(s->record_list))
+        avahi_server_generate_response(s, i, NULL, NULL, 0, 0, 1);
+}
+
+static AvahiLegacyUnicastReflectSlot* allocate_slot(AvahiServer *s) {
+    unsigned n, idx = (unsigned) -1;
+    AvahiLegacyUnicastReflectSlot *slot;
+
+    assert(s);
+
+    if (!s->legacy_unicast_reflect_slots)
+        s->legacy_unicast_reflect_slots = avahi_new0(AvahiLegacyUnicastReflectSlot*, AVAHI_LEGACY_UNICAST_REFLECT_SLOTS_MAX);
+
+    for (n = 0; n < AVAHI_LEGACY_UNICAST_REFLECT_SLOTS_MAX; n++, s->legacy_unicast_reflect_id++) {
+        idx = s->legacy_unicast_reflect_id % AVAHI_LEGACY_UNICAST_REFLECT_SLOTS_MAX;
+
+        if (!s->legacy_unicast_reflect_slots[idx])
+            break;
+    }
+
+    if (idx == (unsigned) -1 || s->legacy_unicast_reflect_slots[idx])
+        return NULL;
+
+    if (!(slot = avahi_new(AvahiLegacyUnicastReflectSlot, 1)))
+        return NULL; /* OOM */
+
+    s->legacy_unicast_reflect_slots[idx] = slot;
+    slot->id = s->legacy_unicast_reflect_id++;
+    slot->server = s;
+
+    return slot;
+}
+
+static void deallocate_slot(AvahiServer *s, AvahiLegacyUnicastReflectSlot *slot) {
+    unsigned idx;
+
+    assert(s);
+    assert(slot);
+
+    idx = slot->id % AVAHI_LEGACY_UNICAST_REFLECT_SLOTS_MAX;
+
+    assert(s->legacy_unicast_reflect_slots[idx] == slot);
+
+    avahi_time_event_free(slot->time_event);
+
+    avahi_free(slot);
+    s->legacy_unicast_reflect_slots[idx] = NULL;
+}
+
+static void free_slots(AvahiServer *s) {
+    unsigned idx;
+    assert(s);
+
+    if (!s->legacy_unicast_reflect_slots)
+        return;
+
+    for (idx = 0; idx < AVAHI_LEGACY_UNICAST_REFLECT_SLOTS_MAX; idx ++)
+        if (s->legacy_unicast_reflect_slots[idx])
+            deallocate_slot(s, s->legacy_unicast_reflect_slots[idx]);
+
+    avahi_free(s->legacy_unicast_reflect_slots);
+    s->legacy_unicast_reflect_slots = NULL;
+}
+
+static AvahiLegacyUnicastReflectSlot* find_slot(AvahiServer *s, uint16_t id) {
+    unsigned idx;
+
+    assert(s);
+
+    if (!s->legacy_unicast_reflect_slots)
+        return NULL;
+
+    idx = id % AVAHI_LEGACY_UNICAST_REFLECT_SLOTS_MAX;
+
+    if (!s->legacy_unicast_reflect_slots[idx] || s->legacy_unicast_reflect_slots[idx]->id != id)
+        return NULL;
+
+    return s->legacy_unicast_reflect_slots[idx];
+}
+
+static void legacy_unicast_reflect_slot_timeout(AvahiTimeEvent *e, void *userdata) {
+    AvahiLegacyUnicastReflectSlot *slot = userdata;
+
+    assert(e);
+    assert(slot);
+    assert(slot->time_event == e);
+
+    deallocate_slot(slot->server, slot);
+}
+
+static void reflect_legacy_unicast_query_packet(AvahiServer *s, AvahiDnsPacket *p, AvahiInterface *i, const AvahiAddress *a, uint16_t port) {
+    AvahiLegacyUnicastReflectSlot *slot;
+    AvahiInterface *j;
+
+    assert(s);
+    assert(p);
+    assert(i);
+    assert(a);
+    assert(port > 0);
+    assert(i->protocol == a->proto);
+
+    if (!s->config.enable_reflector)
+        return;
+
+    /* Reflecting legacy unicast queries is a little more complicated
+       than reflecting normal queries, since we must route the
+       responses back to the right client. Therefore we must store
+       some information for finding the right client contact data for
+       response packets. In contrast to normal queries legacy
+       unicast query and response packets are reflected untouched and
+       are not reassembled into larger packets */
+
+    if (!(slot = allocate_slot(s))) {
+        /* No slot available, we drop this legacy unicast query */
+        avahi_log_warn("No slot available for legacy unicast reflection, dropping query packet.");
+        return;
+    }
+
+    slot->original_id = avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_ID);
+    slot->address = *a;
+    slot->port = port;
+    slot->interface = i->hardware->index;
+
+    avahi_elapse_time(&slot->elapse_time, 2000, 0);
+    slot->time_event = avahi_time_event_new(s->time_event_queue, &slot->elapse_time, legacy_unicast_reflect_slot_timeout, slot);
+
+    /* Patch the packet with our new locally generatet id */
+    avahi_dns_packet_set_field(p, AVAHI_DNS_FIELD_ID, slot->id);
+
+    for (j = s->monitor->interfaces; j; j = j->interface_next)
+        if (j->announcing &&
+            j != i &&
+            (s->config.reflect_ipv || j->protocol == i->protocol)) {
+
+            if (j->protocol == AVAHI_PROTO_INET && s->fd_legacy_unicast_ipv4 >= 0) {
+                avahi_send_dns_packet_ipv4(s->fd_legacy_unicast_ipv4, j->hardware->index, p, NULL, NULL, 0);
+            } else if (j->protocol == AVAHI_PROTO_INET6 && s->fd_legacy_unicast_ipv6 >= 0)
+                avahi_send_dns_packet_ipv6(s->fd_legacy_unicast_ipv6, j->hardware->index, p, NULL, NULL, 0);
+        }
+
+    /* Reset the id */
+    avahi_dns_packet_set_field(p, AVAHI_DNS_FIELD_ID, slot->original_id);
+}
+
+static int originates_from_local_legacy_unicast_socket(AvahiServer *s, const AvahiAddress *address, uint16_t port) {
+    assert(s);
+    assert(address);
+    assert(port > 0);
+
+    if (!s->config.enable_reflector)
+        return 0;
+
+    if (!avahi_address_is_local(s->monitor, address))
+        return 0;
+
+    if (address->proto == AVAHI_PROTO_INET && s->fd_legacy_unicast_ipv4 >= 0) {
+        struct sockaddr_in lsa;
+        socklen_t l = sizeof(lsa);
+
+        if (getsockname(s->fd_legacy_unicast_ipv4, (struct sockaddr*) &lsa, &l) != 0)
+            avahi_log_warn("getsockname(): %s", strerror(errno));
+        else
+            return avahi_port_from_sockaddr((struct sockaddr*) &lsa) == port;
+
+    }
+
+    if (address->proto == AVAHI_PROTO_INET6 && s->fd_legacy_unicast_ipv6 >= 0) {
+        struct sockaddr_in6 lsa;
+        socklen_t l = sizeof(lsa);
+
+        if (getsockname(s->fd_legacy_unicast_ipv6, (struct sockaddr*) &lsa, &l) != 0)
+            avahi_log_warn("getsockname(): %s", strerror(errno));
+        else
+            return avahi_port_from_sockaddr((struct sockaddr*) &lsa) == port;
+    }
+
+    return 0;
+}
+
+static int is_mdns_mcast_address(const AvahiAddress *a) {
+    AvahiAddress b;
+    assert(a);
+
+    avahi_address_parse(a->proto == AVAHI_PROTO_INET ? AVAHI_IPV4_MCAST_GROUP : AVAHI_IPV6_MCAST_GROUP, a->proto, &b);
+    return avahi_address_cmp(a, &b) == 0;
+}
+
+static int originates_from_local_iface(AvahiServer *s, AvahiIfIndex iface, const AvahiAddress *a, uint16_t port) {
+    assert(s);
+    assert(iface != AVAHI_IF_UNSPEC);
+    assert(a);
+
+    /* If it isn't the MDNS port it can't be generated by us */
+    if (port != AVAHI_MDNS_PORT)
+        return 0;
+
+    return avahi_interface_has_address(s->monitor, iface, a);
+}
+
+static void dispatch_packet(AvahiServer *s, AvahiDnsPacket *p, const AvahiAddress *src_address, uint16_t port, const AvahiAddress *dst_address, AvahiIfIndex iface, int ttl) {
+    AvahiInterface *i;
+    int from_local_iface = 0;
+
+    assert(s);
+    assert(p);
+    assert(src_address);
+    assert(dst_address);
+    assert(iface > 0);
+    assert(src_address->proto == dst_address->proto);
+
+    if (!(i = avahi_interface_monitor_get_interface(s->monitor, iface, src_address->proto)) ||
+        !i->announcing) {
+        avahi_log_warn("Received packet from invalid interface.");
+        return;
+    }
+
+    if (port <= 0) {
+        /* This fixes RHBZ #475394 */
+        avahi_log_warn("Received packet from invalid source port %u.", (unsigned) port);
+        return;
+    }
+
+    if (avahi_address_is_ipv4_in_ipv6(src_address))
+        /* This is an IPv4 address encapsulated in IPv6, so let's ignore it. */
+        return;
+
+    if (originates_from_local_legacy_unicast_socket(s, src_address, port))
+        /* This originates from our local reflector, so let's ignore it */
+        return;
+
+    /* We don't want to reflect local traffic, so we check if this packet is generated locally. */
+    if (s->config.enable_reflector)
+        from_local_iface = originates_from_local_iface(s, iface, src_address, port);
+
+    if (avahi_dns_packet_check_valid_multicast(p) < 0) {
+        avahi_log_warn("Received invalid packet.");
+        return;
+    }
+
+    if (avahi_dns_packet_is_query(p)) {
+        int legacy_unicast = 0;
+
+        /* For queries EDNS0 might allow ARCOUNT != 0. We ignore the
+         * AR section completely here, so far. Until the day we add
+         * EDNS0 support. */
+
+        if (port != AVAHI_MDNS_PORT) {
+            /* Legacy Unicast */
+
+            if ((avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_ANCOUNT) != 0 ||
+                 avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_NSCOUNT) != 0)) {
+                avahi_log_warn("Invalid legacy unicast query packet.");
+                return;
+            }
+
+            legacy_unicast = 1;
+        }
+
+        if (legacy_unicast)
+            reflect_legacy_unicast_query_packet(s, p, i, src_address, port);
+
+        handle_query_packet(s, p, i, src_address, port, legacy_unicast, from_local_iface);
+
+    } else {
+        char t[AVAHI_ADDRESS_STR_MAX];
+
+        if (port != AVAHI_MDNS_PORT) {
+            avahi_log_warn("Received response from host %s with invalid source port %u on interface '%s.%i'", avahi_address_snprint(t, sizeof(t), src_address), port, i->hardware->name, i->protocol);
+            return;
+        }
+
+        if (ttl != 255 && s->config.check_response_ttl) {
+            avahi_log_warn("Received response from host %s with invalid TTL %u on interface '%s.%i'.", avahi_address_snprint(t, sizeof(t), src_address), ttl, i->hardware->name, i->protocol);
+            return;
+        }
+
+        if (!is_mdns_mcast_address(dst_address) &&
+            !avahi_interface_address_on_link(i, src_address)) {
+
+            avahi_log_warn("Received non-local response from host %s on interface '%s.%i'.", avahi_address_snprint(t, sizeof(t), src_address), i->hardware->name, i->protocol);
+            return;
+        }
+
+        if (avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_QDCOUNT) != 0 ||
+            avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_ANCOUNT) == 0 ||
+            avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_NSCOUNT) != 0) {
+
+            avahi_log_warn("Invalid response packet from host %s.", avahi_address_snprint(t, sizeof(t), src_address));
+            return;
+        }
+
+        handle_response_packet(s, p, i, src_address, from_local_iface);
+    }
+}
+
+static void dispatch_legacy_unicast_packet(AvahiServer *s, AvahiDnsPacket *p) {
+    AvahiInterface *j;
+    AvahiLegacyUnicastReflectSlot *slot;
+
+    assert(s);
+    assert(p);
+
+    if (avahi_dns_packet_check_valid(p) < 0 || avahi_dns_packet_is_query(p)) {
+        avahi_log_warn("Received invalid packet.");
+        return;
+    }
+
+    if (!(slot = find_slot(s, avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_ID)))) {
+        avahi_log_warn("Received legacy unicast response with unknown id");
+        return;
+    }
+
+    if (!(j = avahi_interface_monitor_get_interface(s->monitor, slot->interface, slot->address.proto)) ||
+        !j->announcing)
+        return;
+
+    /* Patch the original ID into this response */
+    avahi_dns_packet_set_field(p, AVAHI_DNS_FIELD_ID, slot->original_id);
+
+    /* Forward the response to the correct client */
+    avahi_interface_send_packet_unicast(j, p, &slot->address, slot->port);
+
+    /* Undo changes to packet */
+    avahi_dns_packet_set_field(p, AVAHI_DNS_FIELD_ID, slot->id);
+}
+
+static void mcast_socket_event(AvahiWatch *w, int fd, AvahiWatchEvent events, void *userdata) {
+    AvahiServer *s = userdata;
+    AvahiAddress dest, src;
+    AvahiDnsPacket *p = NULL;
+    AvahiIfIndex iface;
+    uint16_t port;
+    uint8_t ttl;
+
+    assert(w);
+    assert(fd >= 0);
+    assert(events & AVAHI_WATCH_IN);
+
+    if (fd == s->fd_ipv4) {
+        dest.proto = src.proto = AVAHI_PROTO_INET;
+        p = avahi_recv_dns_packet_ipv4(s->fd_ipv4, &src.data.ipv4, &port, &dest.data.ipv4, &iface, &ttl);
+    } else {
+        assert(fd == s->fd_ipv6);
+        dest.proto = src.proto = AVAHI_PROTO_INET6;
+        p = avahi_recv_dns_packet_ipv6(s->fd_ipv6, &src.data.ipv6, &port, &dest.data.ipv6, &iface, &ttl);
+    }
+
+    if (p) {
+        if (iface == AVAHI_IF_UNSPEC)
+            iface = avahi_find_interface_for_address(s->monitor, &dest);
+
+        if (iface != AVAHI_IF_UNSPEC)
+            dispatch_packet(s, p, &src, port, &dest, iface, ttl);
+        else
+            avahi_log_error("Incoming packet received on address that isn't local.");
+
+        avahi_dns_packet_free(p);
+
+        avahi_cleanup_dead_entries(s);
+    }
+}
+
+static void legacy_unicast_socket_event(AvahiWatch *w, int fd, AvahiWatchEvent events, void *userdata) {
+    AvahiServer *s = userdata;
+    AvahiDnsPacket *p = NULL;
+
+    assert(w);
+    assert(fd >= 0);
+    assert(events & AVAHI_WATCH_IN);
+
+    if (fd == s->fd_legacy_unicast_ipv4)
+        p = avahi_recv_dns_packet_ipv4(s->fd_legacy_unicast_ipv4, NULL, NULL, NULL, NULL, NULL);
+    else {
+        assert(fd == s->fd_legacy_unicast_ipv6);
+        p = avahi_recv_dns_packet_ipv6(s->fd_legacy_unicast_ipv6, NULL, NULL, NULL, NULL, NULL);
+    }
+
+    if (p) {
+        dispatch_legacy_unicast_packet(s, p);
+        avahi_dns_packet_free(p);
+
+        avahi_cleanup_dead_entries(s);
+    }
+}
+
+static void server_set_state(AvahiServer *s, AvahiServerState state) {
+    assert(s);
+
+    if (s->state == state)
+        return;
+
+    s->state = state;
+
+    avahi_interface_monitor_update_rrs(s->monitor, 0);
+
+    if (s->callback)
+        s->callback(s, state, s->userdata);
+}
+
+static void withdraw_host_rrs(AvahiServer *s) {
+    assert(s);
+
+    if (s->hinfo_entry_group)
+        avahi_s_entry_group_reset(s->hinfo_entry_group);
+
+    if (s->browse_domain_entry_group)
+        avahi_s_entry_group_reset(s->browse_domain_entry_group);
+
+    avahi_interface_monitor_update_rrs(s->monitor, 1);
+    s->n_host_rr_pending = 0;
+}
+
+void avahi_server_decrease_host_rr_pending(AvahiServer *s) {
+    assert(s);
+
+    assert(s->n_host_rr_pending > 0);
+
+    if (--s->n_host_rr_pending == 0)
+        server_set_state(s, AVAHI_SERVER_RUNNING);
+}
+
+void avahi_host_rr_entry_group_callback(AvahiServer *s, AvahiSEntryGroup *g, AvahiEntryGroupState state, AVAHI_GCC_UNUSED void *userdata) {
+    assert(s);
+    assert(g);
+
+    if (state == AVAHI_ENTRY_GROUP_REGISTERING &&
+        s->state == AVAHI_SERVER_REGISTERING)
+        s->n_host_rr_pending ++;
+
+    else if (state == AVAHI_ENTRY_GROUP_COLLISION &&
+        (s->state == AVAHI_SERVER_REGISTERING || s->state == AVAHI_SERVER_RUNNING)) {
+        withdraw_host_rrs(s);
+        server_set_state(s, AVAHI_SERVER_COLLISION);
+
+    } else if (state == AVAHI_ENTRY_GROUP_ESTABLISHED &&
+               s->state == AVAHI_SERVER_REGISTERING)
+        avahi_server_decrease_host_rr_pending(s);
+}
+
+static void register_hinfo(AvahiServer *s) {
+    struct utsname utsname;
+    AvahiRecord *r;
+
+    assert(s);
+
+    if (!s->config.publish_hinfo)
+        return;
+
+    if (s->hinfo_entry_group)
+        assert(avahi_s_entry_group_is_empty(s->hinfo_entry_group));
+    else
+        s->hinfo_entry_group = avahi_s_entry_group_new(s, avahi_host_rr_entry_group_callback, NULL);
+
+    if (!s->hinfo_entry_group) {
+        avahi_log_warn("Failed to create HINFO entry group: %s", avahi_strerror(s->error));
+        return;
+    }
+
+    /* Fill in HINFO rr */
+    if ((r = avahi_record_new_full(s->host_name_fqdn, AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_HINFO, AVAHI_DEFAULT_TTL_HOST_NAME))) {
+
+        if (uname(&utsname) < 0)
+            avahi_log_warn("uname() failed: %s\n", avahi_strerror(errno));
+        else {
+
+            r->data.hinfo.cpu = avahi_strdup(avahi_strup(utsname.machine));
+            r->data.hinfo.os = avahi_strdup(avahi_strup(utsname.sysname));
+
+            avahi_log_info("Registering HINFO record with values '%s'/'%s'.", r->data.hinfo.cpu, r->data.hinfo.os);
+
+            if (avahi_server_add(s, s->hinfo_entry_group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, AVAHI_PUBLISH_UNIQUE, r) < 0) {
+                avahi_log_warn("Failed to add HINFO RR: %s", avahi_strerror(s->error));
+                return;
+            }
+        }
+
+        avahi_record_unref(r);
+    }
+
+    if (avahi_s_entry_group_commit(s->hinfo_entry_group) < 0)
+        avahi_log_warn("Failed to commit HINFO entry group: %s", avahi_strerror(s->error));
+
+}
+
+static void register_localhost(AvahiServer *s) {
+    AvahiAddress a;
+    assert(s);
+
+    /* Add localhost entries */
+    avahi_address_parse("127.0.0.1", AVAHI_PROTO_INET, &a);
+    avahi_server_add_address(s, NULL, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, AVAHI_PUBLISH_NO_PROBE|AVAHI_PUBLISH_NO_ANNOUNCE, "localhost", &a);
+
+    avahi_address_parse("::1", AVAHI_PROTO_INET6, &a);
+    avahi_server_add_address(s, NULL, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, AVAHI_PUBLISH_NO_PROBE|AVAHI_PUBLISH_NO_ANNOUNCE, "ip6-localhost", &a);
+}
+
+static void register_browse_domain(AvahiServer *s) {
+    assert(s);
+
+    if (!s->config.publish_domain)
+        return;
+
+    if (avahi_domain_equal(s->domain_name, "local"))
+        return;
+
+    if (s->browse_domain_entry_group)
+        assert(avahi_s_entry_group_is_empty(s->browse_domain_entry_group));
+    else
+        s->browse_domain_entry_group = avahi_s_entry_group_new(s, NULL, NULL);
+
+    if (!s->browse_domain_entry_group) {
+        avahi_log_warn("Failed to create browse domain entry group: %s", avahi_strerror(s->error));
+        return;
+    }
+
+    if (avahi_server_add_ptr(s, s->browse_domain_entry_group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, AVAHI_DEFAULT_TTL, "b._dns-sd._udp.local", s->domain_name) < 0) {
+        avahi_log_warn("Failed to add browse domain RR: %s", avahi_strerror(s->error));
+        return;
+    }
+
+    if (avahi_s_entry_group_commit(s->browse_domain_entry_group) < 0)
+        avahi_log_warn("Failed to commit browse domain entry group: %s", avahi_strerror(s->error));
+}
+
+static void register_stuff(AvahiServer *s) {
+    assert(s);
+
+    server_set_state(s, AVAHI_SERVER_REGISTERING);
+    s->n_host_rr_pending ++; /** Make sure that the state isn't changed tp AVAHI_SERVER_RUNNING too early */
+
+    register_hinfo(s);
+    register_browse_domain(s);
+    avahi_interface_monitor_update_rrs(s->monitor, 0);
+
+    assert(s->n_host_rr_pending > 0);
+    s->n_host_rr_pending --;
+
+    if (s->n_host_rr_pending == 0)
+        server_set_state(s, AVAHI_SERVER_RUNNING);
+}
+
+static void update_fqdn(AvahiServer *s) {
+    char *n;
+
+    assert(s);
+    assert(s->host_name);
+    assert(s->domain_name);
+
+    if (!(n = avahi_strdup_printf("%s.%s", s->host_name, s->domain_name)))
+        return; /* OOM */
+
+    avahi_free(s->host_name_fqdn);
+    s->host_name_fqdn = n;
+}
+
+int avahi_server_set_host_name(AvahiServer *s, const char *host_name) {
+    char *hn = NULL;
+    assert(s);
+
+    AVAHI_CHECK_VALIDITY(s, !host_name || avahi_is_valid_host_name(host_name), AVAHI_ERR_INVALID_HOST_NAME);
+
+    if (!host_name)
+        hn = avahi_get_host_name_strdup();
+    else
+        hn = avahi_normalize_name_strdup(host_name);
+
+    hn[strcspn(hn, ".")] = 0;
+
+    if (avahi_domain_equal(s->host_name, hn) && s->state != AVAHI_SERVER_COLLISION) {
+        avahi_free(hn);
+        return avahi_server_set_errno(s, AVAHI_ERR_NO_CHANGE);
+    }
+
+    withdraw_host_rrs(s);
+
+    avahi_free(s->host_name);
+    s->host_name = hn;
+
+    update_fqdn(s);
+
+    register_stuff(s);
+    return AVAHI_OK;
+}
+
+int avahi_server_set_domain_name(AvahiServer *s, const char *domain_name) {
+    char *dn = NULL;
+    assert(s);
+
+    AVAHI_CHECK_VALIDITY(s, !domain_name || avahi_is_valid_domain_name(domain_name), AVAHI_ERR_INVALID_DOMAIN_NAME);
+
+    if (!domain_name)
+        dn = avahi_strdup("local");
+    else
+        dn = avahi_normalize_name_strdup(domain_name);
+
+    if (avahi_domain_equal(s->domain_name, domain_name)) {
+        avahi_free(dn);
+        return avahi_server_set_errno(s, AVAHI_ERR_NO_CHANGE);
+    }
+
+    withdraw_host_rrs(s);
+
+    avahi_free(s->domain_name);
+    s->domain_name = dn;
+    update_fqdn(s);
+
+    register_stuff(s);
+
+    avahi_free(dn);
+    return AVAHI_OK;
+}
+
+static int valid_server_config(const AvahiServerConfig *sc) {
+    AvahiStringList *l;
+
+    assert(sc);
+
+    if (sc->n_wide_area_servers > AVAHI_WIDE_AREA_SERVERS_MAX)
+        return AVAHI_ERR_INVALID_CONFIG;
+
+    if (sc->host_name && !avahi_is_valid_host_name(sc->host_name))
+        return AVAHI_ERR_INVALID_HOST_NAME;
+
+    if (sc->domain_name && !avahi_is_valid_domain_name(sc->domain_name))
+        return AVAHI_ERR_INVALID_DOMAIN_NAME;
+
+    for (l = sc->browse_domains; l; l = l->next)
+        if (!avahi_is_valid_domain_name((char*) l->text))
+            return AVAHI_ERR_INVALID_DOMAIN_NAME;
+
+    return AVAHI_OK;
+}
+
+static int setup_sockets(AvahiServer *s) {
+    assert(s);
+
+    s->fd_ipv4 = s->config.use_ipv4 ? avahi_open_socket_ipv4(s->config.disallow_other_stacks) : -1;
+    s->fd_ipv6 = s->config.use_ipv6 ? avahi_open_socket_ipv6(s->config.disallow_other_stacks) : -1;
+
+    if (s->fd_ipv6 < 0 && s->fd_ipv4 < 0)
+        return AVAHI_ERR_NO_NETWORK;
+
+    if (s->fd_ipv4 < 0 && s->config.use_ipv4)
+        avahi_log_notice("Failed to create IPv4 socket, proceeding in IPv6 only mode");
+    else if (s->fd_ipv6 < 0 && s->config.use_ipv6)
+        avahi_log_notice("Failed to create IPv6 socket, proceeding in IPv4 only mode");
+
+    s->fd_legacy_unicast_ipv4 = s->fd_ipv4 >= 0 && s->config.enable_reflector ? avahi_open_unicast_socket_ipv4() : -1;
+    s->fd_legacy_unicast_ipv6 = s->fd_ipv6 >= 0 && s->config.enable_reflector ? avahi_open_unicast_socket_ipv6() : -1;
+
+    s->watch_ipv4 =
+        s->watch_ipv6 =
+        s->watch_legacy_unicast_ipv4 =
+        s->watch_legacy_unicast_ipv6 = NULL;
+
+    if (s->fd_ipv4 >= 0)
+        s->watch_ipv4 = s->poll_api->watch_new(s->poll_api, s->fd_ipv4, AVAHI_WATCH_IN, mcast_socket_event, s);
+    if (s->fd_ipv6 >= 0)
+        s->watch_ipv6 = s->poll_api->watch_new(s->poll_api, s->fd_ipv6, AVAHI_WATCH_IN, mcast_socket_event, s);
+
+    if (s->fd_legacy_unicast_ipv4 >= 0)
+        s->watch_legacy_unicast_ipv4 = s->poll_api->watch_new(s->poll_api, s->fd_legacy_unicast_ipv4, AVAHI_WATCH_IN, legacy_unicast_socket_event, s);
+    if (s->fd_legacy_unicast_ipv6 >= 0)
+        s->watch_legacy_unicast_ipv6 = s->poll_api->watch_new(s->poll_api, s->fd_legacy_unicast_ipv6, AVAHI_WATCH_IN, legacy_unicast_socket_event, s);
+
+    return 0;
+}
+
+AvahiServer *avahi_server_new(const AvahiPoll *poll_api, const AvahiServerConfig *sc, AvahiServerCallback callback, void* userdata, int *error) {
+    AvahiServer *s;
+    int e;
+
+    if (sc && (e = valid_server_config(sc)) < 0) {
+        if (error)
+            *error = e;
+        return NULL;
+    }
+
+    if (!(s = avahi_new(AvahiServer, 1))) {
+        if (error)
+            *error = AVAHI_ERR_NO_MEMORY;
+
+        return NULL;
+    }
+
+    s->poll_api = poll_api;
+
+    if (sc)
+        avahi_server_config_copy(&s->config, sc);
+    else
+        avahi_server_config_init(&s->config);
+
+    if ((e = setup_sockets(s)) < 0) {
+        if (error)
+            *error = e;
+
+        avahi_server_config_free(&s->config);
+        avahi_free(s);
+
+        return NULL;
+    }
+
+    s->n_host_rr_pending = 0;
+    s->need_entry_cleanup = 0;
+    s->need_group_cleanup = 0;
+    s->need_browser_cleanup = 0;
+    s->cleanup_time_event = NULL;
+    s->hinfo_entry_group = NULL;
+    s->browse_domain_entry_group = NULL;
+    s->error = AVAHI_OK;
+    s->state = AVAHI_SERVER_INVALID;
+
+    s->callback = callback;
+    s->userdata = userdata;
+
+    s->time_event_queue = avahi_time_event_queue_new(poll_api);
+
+    s->entries_by_key = avahi_hashmap_new((AvahiHashFunc) avahi_key_hash, (AvahiEqualFunc) avahi_key_equal, NULL, NULL);
+    AVAHI_LLIST_HEAD_INIT(AvahiEntry, s->entries);
+    AVAHI_LLIST_HEAD_INIT(AvahiGroup, s->groups);
+
+    s->record_browser_hashmap = avahi_hashmap_new((AvahiHashFunc) avahi_key_hash, (AvahiEqualFunc) avahi_key_equal, NULL, NULL);
+    AVAHI_LLIST_HEAD_INIT(AvahiSRecordBrowser, s->record_browsers);
+    AVAHI_LLIST_HEAD_INIT(AvahiSHostNameResolver, s->host_name_resolvers);
+    AVAHI_LLIST_HEAD_INIT(AvahiSAddressResolver, s->address_resolvers);
+    AVAHI_LLIST_HEAD_INIT(AvahiSDomainBrowser, s->domain_browsers);
+    AVAHI_LLIST_HEAD_INIT(AvahiSServiceTypeBrowser, s->service_type_browsers);
+    AVAHI_LLIST_HEAD_INIT(AvahiSServiceBrowser, s->service_browsers);
+    AVAHI_LLIST_HEAD_INIT(AvahiSServiceResolver, s->service_resolvers);
+    AVAHI_LLIST_HEAD_INIT(AvahiSDNSServerBrowser, s->dns_server_browsers);
+
+    s->legacy_unicast_reflect_slots = NULL;
+    s->legacy_unicast_reflect_id = 0;
+
+    s->record_list = avahi_record_list_new();
+
+    /* Get host name */
+    s->host_name = s->config.host_name ? avahi_normalize_name_strdup(s->config.host_name) : avahi_get_host_name_strdup();
+    s->host_name[strcspn(s->host_name, ".")] = 0;
+    s->domain_name = s->config.domain_name ? avahi_normalize_name_strdup(s->config.domain_name) : avahi_strdup("local");
+    s->host_name_fqdn = NULL;
+    update_fqdn(s);
+
+    do {
+        s->local_service_cookie = (uint32_t) rand() * (uint32_t) rand();
+    } while (s->local_service_cookie == AVAHI_SERVICE_COOKIE_INVALID);
+
+    if (s->config.enable_wide_area) {
+        s->wide_area_lookup_engine = avahi_wide_area_engine_new(s);
+        avahi_wide_area_set_servers(s->wide_area_lookup_engine, s->config.wide_area_servers, s->config.n_wide_area_servers);
+    } else
+        s->wide_area_lookup_engine = NULL;
+
+    s->multicast_lookup_engine = avahi_multicast_lookup_engine_new(s);
+
+    s->monitor = avahi_interface_monitor_new(s);
+    avahi_interface_monitor_sync(s->monitor);
+
+    register_localhost(s);
+    register_stuff(s);
+
+    return s;
+}
+
+void avahi_server_free(AvahiServer* s) {
+    assert(s);
+
+    /* Remove all browsers */
+
+    while (s->dns_server_browsers)
+        avahi_s_dns_server_browser_free(s->dns_server_browsers);
+    while (s->host_name_resolvers)
+        avahi_s_host_name_resolver_free(s->host_name_resolvers);
+    while (s->address_resolvers)
+        avahi_s_address_resolver_free(s->address_resolvers);
+    while (s->domain_browsers)
+        avahi_s_domain_browser_free(s->domain_browsers);
+    while (s->service_type_browsers)
+        avahi_s_service_type_browser_free(s->service_type_browsers);
+    while (s->service_browsers)
+        avahi_s_service_browser_free(s->service_browsers);
+    while (s->service_resolvers)
+        avahi_s_service_resolver_free(s->service_resolvers);
+    while (s->record_browsers)
+        avahi_s_record_browser_destroy(s->record_browsers);
+
+    /* Remove all locally rgeistered stuff */
+
+    while(s->entries)
+        avahi_entry_free(s, s->entries);
+
+    avahi_interface_monitor_free(s->monitor);
+
+    while (s->groups)
+        avahi_entry_group_free(s, s->groups);
+
+    free_slots(s);
+
+    avahi_hashmap_free(s->entries_by_key);
+    avahi_record_list_free(s->record_list);
+    avahi_hashmap_free(s->record_browser_hashmap);
+
+    if (s->wide_area_lookup_engine)
+        avahi_wide_area_engine_free(s->wide_area_lookup_engine);
+    avahi_multicast_lookup_engine_free(s->multicast_lookup_engine);
+
+    if (s->cleanup_time_event)
+        avahi_time_event_free(s->cleanup_time_event);
+
+    avahi_time_event_queue_free(s->time_event_queue);
+
+    /* Free watches */
+
+    if (s->watch_ipv4)
+        s->poll_api->watch_free(s->watch_ipv4);
+    if (s->watch_ipv6)
+        s->poll_api->watch_free(s->watch_ipv6);
+
+    if (s->watch_legacy_unicast_ipv4)
+        s->poll_api->watch_free(s->watch_legacy_unicast_ipv4);
+    if (s->watch_legacy_unicast_ipv6)
+        s->poll_api->watch_free(s->watch_legacy_unicast_ipv6);
+
+    /* Free sockets */
+
+    if (s->fd_ipv4 >= 0)
+        close(s->fd_ipv4);
+    if (s->fd_ipv6 >= 0)
+        close(s->fd_ipv6);
+
+    if (s->fd_legacy_unicast_ipv4 >= 0)
+        close(s->fd_legacy_unicast_ipv4);
+    if (s->fd_legacy_unicast_ipv6 >= 0)
+        close(s->fd_legacy_unicast_ipv6);
+
+    /* Free other stuff */
+
+    avahi_free(s->host_name);
+    avahi_free(s->domain_name);
+    avahi_free(s->host_name_fqdn);
+
+    avahi_server_config_free(&s->config);
+
+    avahi_free(s);
+}
+
+const char* avahi_server_get_domain_name(AvahiServer *s) {
+    assert(s);
+
+    return s->domain_name;
+}
+
+const char* avahi_server_get_host_name(AvahiServer *s) {
+    assert(s);
+
+    return s->host_name;
+}
+
+const char* avahi_server_get_host_name_fqdn(AvahiServer *s) {
+    assert(s);
+
+    return s->host_name_fqdn;
+}
+
+void* avahi_server_get_data(AvahiServer *s) {
+    assert(s);
+
+    return s->userdata;
+}
+
+void avahi_server_set_data(AvahiServer *s, void* userdata) {
+    assert(s);
+
+    s->userdata = userdata;
+}
+
+AvahiServerState avahi_server_get_state(AvahiServer *s) {
+    assert(s);
+
+    return s->state;
+}
+
+AvahiServerConfig* avahi_server_config_init(AvahiServerConfig *c) {
+    assert(c);
+
+    memset(c, 0, sizeof(AvahiServerConfig));
+    c->use_ipv6 = 1;
+    c->use_ipv4 = 1;
+    c->allow_interfaces = NULL;
+    c->deny_interfaces = NULL;
+    c->host_name = NULL;
+    c->domain_name = NULL;
+    c->check_response_ttl = 0;
+    c->publish_hinfo = 1;
+    c->publish_addresses = 1;
+    c->publish_workstation = 1;
+    c->publish_domain = 1;
+    c->use_iff_running = 0;
+    c->enable_reflector = 0;
+    c->reflect_ipv = 0;
+    c->add_service_cookie = 0;
+    c->enable_wide_area = 0;
+    c->n_wide_area_servers = 0;
+    c->disallow_other_stacks = 0;
+    c->browse_domains = NULL;
+    c->disable_publishing = 0;
+    c->allow_point_to_point = 0;
+    c->publish_aaaa_on_ipv4 = 1;
+    c->publish_a_on_ipv6 = 0;
+    c->n_cache_entries_max = AVAHI_DEFAULT_CACHE_ENTRIES_MAX;
+    c->ratelimit_interval = 0;
+    c->ratelimit_burst = 0;
+
+    return c;
+}
+
+void avahi_server_config_free(AvahiServerConfig *c) {
+    assert(c);
+
+    avahi_free(c->host_name);
+    avahi_free(c->domain_name);
+    avahi_string_list_free(c->browse_domains);
+    avahi_string_list_free(c->allow_interfaces);
+    avahi_string_list_free(c->deny_interfaces);
+}
+
+AvahiServerConfig* avahi_server_config_copy(AvahiServerConfig *ret, const AvahiServerConfig *c) {
+    char *d = NULL, *h = NULL;
+    AvahiStringList *browse = NULL, *allow = NULL, *deny = NULL;
+    assert(ret);
+    assert(c);
+
+    if (c->host_name)
+        if (!(h = avahi_strdup(c->host_name)))
+            return NULL;
+
+    if (c->domain_name)
+        if (!(d = avahi_strdup(c->domain_name))) {
+            avahi_free(h);
+            return NULL;
+        }
+
+    if (!(browse = avahi_string_list_copy(c->browse_domains)) && c->browse_domains) {
+        avahi_free(h);
+        avahi_free(d);
+        return NULL;
+    }
+
+    if (!(allow = avahi_string_list_copy(c->allow_interfaces)) && c->allow_interfaces) {
+        avahi_string_list_free(browse);
+        avahi_free(h);
+        avahi_free(d);
+        return NULL;
+    }
+
+    if (!(deny = avahi_string_list_copy(c->deny_interfaces)) && c->deny_interfaces) {
+        avahi_string_list_free(allow);
+        avahi_string_list_free(browse);
+        avahi_free(h);
+        avahi_free(d);
+        return NULL;
+    }
+
+    *ret = *c;
+    ret->host_name = h;
+    ret->domain_name = d;
+    ret->browse_domains = browse;
+    ret->allow_interfaces = allow;
+    ret->deny_interfaces = deny;
+
+    return ret;
+}
+
+int avahi_server_errno(AvahiServer *s) {
+    assert(s);
+
+    return s->error;
+}
+
+/* Just for internal use */
+int avahi_server_set_errno(AvahiServer *s, int error) {
+    assert(s);
+
+    return s->error = error;
+}
+
+uint32_t avahi_server_get_local_service_cookie(AvahiServer *s) {
+    assert(s);
+
+    return s->local_service_cookie;
+}
+
+static AvahiEntry *find_entry(AvahiServer *s, AvahiIfIndex interface, AvahiProtocol protocol, AvahiKey *key) {
+    AvahiEntry *e;
+
+    assert(s);
+    assert(key);
+
+    for (e = avahi_hashmap_lookup(s->entries_by_key, key); e; e = e->by_key_next)
+
+        if ((e->interface == interface || e->interface <= 0 || interface <= 0) &&
+            (e->protocol == protocol || e->protocol == AVAHI_PROTO_UNSPEC || protocol == AVAHI_PROTO_UNSPEC) &&
+            (!e->group || e->group->state == AVAHI_ENTRY_GROUP_ESTABLISHED || e->group->state == AVAHI_ENTRY_GROUP_REGISTERING))
+
+            return e;
+
+    return NULL;
+}
+
+int avahi_server_get_group_of_service(AvahiServer *s, AvahiIfIndex interface, AvahiProtocol protocol, const char *name, const char *type, const char *domain, AvahiSEntryGroup** ret_group) {
+    AvahiKey *key = NULL;
+    AvahiEntry *e;
+    int ret;
+    char n[AVAHI_DOMAIN_NAME_MAX];
+
+    assert(s);
+    assert(name);
+    assert(type);
+    assert(ret_group);
+
+    AVAHI_CHECK_VALIDITY(s, AVAHI_IF_VALID(interface), AVAHI_ERR_INVALID_INTERFACE);
+    AVAHI_CHECK_VALIDITY(s, AVAHI_PROTO_VALID(protocol), AVAHI_ERR_INVALID_PROTOCOL);
+    AVAHI_CHECK_VALIDITY(s, avahi_is_valid_service_name(name), AVAHI_ERR_INVALID_SERVICE_NAME);
+    AVAHI_CHECK_VALIDITY(s, avahi_is_valid_service_type_strict(type), AVAHI_ERR_INVALID_SERVICE_TYPE);
+    AVAHI_CHECK_VALIDITY(s, !domain || avahi_is_valid_domain_name(domain), AVAHI_ERR_INVALID_DOMAIN_NAME);
+
+    if ((ret = avahi_service_name_join(n, sizeof(n), name, type, domain) < 0))
+        return avahi_server_set_errno(s, ret);
+
+    if (!(key = avahi_key_new(n, AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_SRV)))
+        return avahi_server_set_errno(s, AVAHI_ERR_NO_MEMORY);
+
+    e = find_entry(s, interface, protocol, key);
+    avahi_key_unref(key);
+
+    if (e) {
+        *ret_group = e->group;
+        return AVAHI_OK;
+    }
+
+    return avahi_server_set_errno(s, AVAHI_ERR_NOT_FOUND);
+}
+
+int avahi_server_is_service_local(AvahiServer *s, AvahiIfIndex interface, AvahiProtocol protocol, const char *name) {
+    AvahiKey *key = NULL;
+    AvahiEntry *e;
+
+    assert(s);
+    assert(name);
+
+    if (!s->host_name_fqdn)
+        return 0;
+
+    if (!(key = avahi_key_new(name, AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_SRV)))
+        return 0;
+
+    e = find_entry(s, interface, protocol, key);
+    avahi_key_unref(key);
+
+    if (!e)
+        return 0;
+
+    return avahi_domain_equal(s->host_name_fqdn, e->record->data.srv.name);
+}
+
+int avahi_server_is_record_local(AvahiServer *s, AvahiIfIndex interface, AvahiProtocol protocol, AvahiRecord *record) {
+    AvahiEntry *e;
+
+    assert(s);
+    assert(record);
+
+    for (e = avahi_hashmap_lookup(s->entries_by_key, record->key); e; e = e->by_key_next)
+
+        if ((e->interface == interface || e->interface <= 0 || interface <= 0) &&
+            (e->protocol == protocol || e->protocol == AVAHI_PROTO_UNSPEC || protocol == AVAHI_PROTO_UNSPEC) &&
+            (!e->group || e->group->state == AVAHI_ENTRY_GROUP_ESTABLISHED || e->group->state == AVAHI_ENTRY_GROUP_REGISTERING) &&
+            avahi_record_equal_no_ttl(record, e->record))
+            return 1;
+
+    return 0;
+}
+
+/** Set the wide area DNS servers */
+int avahi_server_set_wide_area_servers(AvahiServer *s, const AvahiAddress *a, unsigned n) {
+    assert(s);
+
+    if (!s->wide_area_lookup_engine)
+        return avahi_server_set_errno(s, AVAHI_ERR_INVALID_CONFIG);
+
+    avahi_wide_area_set_servers(s->wide_area_lookup_engine, a, n);
+    return AVAHI_OK;
+}
+
+const AvahiServerConfig* avahi_server_get_config(AvahiServer *s) {
+    assert(s);
+
+    return &s->config;
+}
+
+/** Set the browsing domains */
+int avahi_server_set_browse_domains(AvahiServer *s, AvahiStringList *domains) {
+    AvahiStringList *l;
+
+    assert(s);
+
+    for (l = s->config.browse_domains; l; l = l->next)
+        if (!avahi_is_valid_domain_name((char*) l->text))
+            return avahi_server_set_errno(s, AVAHI_ERR_INVALID_DOMAIN_NAME);
+
+    avahi_string_list_free(s->config.browse_domains);
+    s->config.browse_domains = avahi_string_list_copy(domains);
+
+    return AVAHI_OK;
+}
diff --git a/avahi-0.6.31/avahi-core/socket.c b/avahi-0.6.31/avahi-core/socket.c
new file mode 100644
index 0000000..17ab6e5
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/socket.c
@@ -0,0 +1,993 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <inttypes.h>
+#include <errno.h>
+#include <string.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/time.h>
+#include <sys/ioctl.h>
+#ifdef HAVE_SYS_FILIO_H
+#include <sys/filio.h>
+#endif
+#include <assert.h>
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <net/if.h>
+#include <sys/uio.h>
+
+#ifdef IP_RECVIF
+#include <net/if_dl.h>
+#endif
+
+#include "dns.h"
+#include "fdutil.h"
+#include "socket.h"
+#include "log.h"
+#include "addr-util.h"
+
+/* this is a portability hack */
+#ifndef IPV6_ADD_MEMBERSHIP
+#ifdef  IPV6_JOIN_GROUP
+#define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP
+#endif
+#endif
+
+#ifndef IPV6_DROP_MEMBERSHIP
+#ifdef  IPV6_LEAVE_GROUP
+#define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP
+#endif
+#endif
+
+static void mdns_mcast_group_ipv4(struct sockaddr_in *ret_sa) {
+    assert(ret_sa);
+
+    memset(ret_sa, 0, sizeof(struct sockaddr_in));
+    ret_sa->sin_family = AF_INET;
+    ret_sa->sin_port = htons(AVAHI_MDNS_PORT);
+    inet_pton(AF_INET, AVAHI_IPV4_MCAST_GROUP, &ret_sa->sin_addr);
+}
+
+static void mdns_mcast_group_ipv6(struct sockaddr_in6 *ret_sa) {
+    assert(ret_sa);
+
+    memset(ret_sa, 0, sizeof(struct sockaddr_in6));
+    ret_sa->sin6_family = AF_INET6;
+    ret_sa->sin6_port = htons(AVAHI_MDNS_PORT);
+    inet_pton(AF_INET6, AVAHI_IPV6_MCAST_GROUP, &ret_sa->sin6_addr);
+}
+
+static void ipv4_address_to_sockaddr(struct sockaddr_in *ret_sa, const AvahiIPv4Address *a, uint16_t port) {
+    assert(ret_sa);
+    assert(a);
+    assert(port > 0);
+
+    memset(ret_sa, 0, sizeof(struct sockaddr_in));
+    ret_sa->sin_family = AF_INET;
+    ret_sa->sin_port = htons(port);
+    memcpy(&ret_sa->sin_addr, a, sizeof(AvahiIPv4Address));
+}
+
+static void ipv6_address_to_sockaddr(struct sockaddr_in6 *ret_sa, const AvahiIPv6Address *a, uint16_t port) {
+    assert(ret_sa);
+    assert(a);
+    assert(port > 0);
+
+    memset(ret_sa, 0, sizeof(struct sockaddr_in6));
+    ret_sa->sin6_family = AF_INET6;
+    ret_sa->sin6_port = htons(port);
+    memcpy(&ret_sa->sin6_addr, a, sizeof(AvahiIPv6Address));
+}
+
+int avahi_mdns_mcast_join_ipv4(int fd, const AvahiIPv4Address *a, int idx, int join) {
+#ifdef HAVE_STRUCT_IP_MREQN
+    struct ip_mreqn mreq;
+#else
+    struct ip_mreq mreq;
+#endif
+    struct sockaddr_in sa;
+
+    assert(fd >= 0);
+    assert(idx >= 0);
+    assert(a);
+
+    memset(&mreq, 0, sizeof(mreq));
+#ifdef HAVE_STRUCT_IP_MREQN
+    mreq.imr_ifindex = idx;
+    mreq.imr_address.s_addr = a->address;
+#else
+    mreq.imr_interface.s_addr = a->address;
+#endif
+    mdns_mcast_group_ipv4(&sa);
+    mreq.imr_multiaddr = sa.sin_addr;
+
+    /* Some network drivers have issues with dropping membership of
+     * mcast groups when the iface is down, but don't allow rejoining
+     * when it comes back up. This is an ugly workaround */
+    if (join)
+        setsockopt(fd, IPPROTO_IP, IP_DROP_MEMBERSHIP, &mreq, sizeof(mreq));
+
+    if (setsockopt(fd, IPPROTO_IP, join ? IP_ADD_MEMBERSHIP : IP_DROP_MEMBERSHIP, &mreq, sizeof(mreq)) < 0) {
+        avahi_log_warn("%s failed: %s", join ? "IP_ADD_MEMBERSHIP" : "IP_DROP_MEMBERSHIP", strerror(errno));
+        return -1;
+    }
+
+    return 0;
+}
+
+int avahi_mdns_mcast_join_ipv6(int fd, const AvahiIPv6Address *a, int idx, int join) {
+    struct ipv6_mreq mreq6;
+    struct sockaddr_in6 sa6;
+
+    assert(fd >= 0);
+    assert(idx >= 0);
+    assert(a);
+
+    memset(&mreq6, 0, sizeof(mreq6));
+    mdns_mcast_group_ipv6 (&sa6);
+    mreq6.ipv6mr_multiaddr = sa6.sin6_addr;
+    mreq6.ipv6mr_interface = idx;
+
+    if (join)
+        setsockopt(fd, IPPROTO_IPV6, IPV6_DROP_MEMBERSHIP, &mreq6, sizeof(mreq6));
+
+    if (setsockopt(fd, IPPROTO_IPV6, join ? IPV6_ADD_MEMBERSHIP : IPV6_DROP_MEMBERSHIP, &mreq6, sizeof(mreq6)) < 0) {
+        avahi_log_warn("%s failed: %s", join ? "IPV6_ADD_MEMBERSHIP" : "IPV6_DROP_MEMBERSHIP", strerror(errno));
+        return -1;
+    }
+
+    return 0;
+}
+
+static int reuseaddr(int fd) {
+    int yes;
+
+    yes = 1;
+    if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes)) < 0) {
+        avahi_log_warn("SO_REUSEADDR failed: %s", strerror(errno));
+        return -1;
+    }
+
+#ifdef SO_REUSEPORT
+    yes = 1;
+    if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &yes, sizeof(yes)) < 0) {
+        avahi_log_warn("SO_REUSEPORT failed: %s", strerror(errno));
+        return -1;
+    }
+#endif
+
+    return 0;
+}
+
+static int bind_with_warn(int fd, const struct sockaddr *sa, socklen_t l) {
+
+    assert(fd >= 0);
+    assert(sa);
+    assert(l > 0);
+
+    if (bind(fd, sa, l) < 0) {
+
+        if (errno != EADDRINUSE) {
+            avahi_log_warn("bind() failed: %s", strerror(errno));
+            return -1;
+        }
+
+        avahi_log_warn("*** WARNING: Detected another %s mDNS stack running on this host. This makes mDNS unreliable and is thus not recommended. ***",
+                       sa->sa_family == AF_INET ? "IPv4" : "IPv6");
+
+        /* Try again, this time with SO_REUSEADDR set */
+        if (reuseaddr(fd) < 0)
+            return -1;
+
+        if (bind(fd, sa, l) < 0) {
+            avahi_log_warn("bind() failed: %s", strerror(errno));
+            return -1;
+        }
+    } else {
+
+        /* We enable SO_REUSEADDR afterwards, to make sure that the
+         * user may run other mDNS implementations if he really
+         * wants. */
+
+        if (reuseaddr(fd) < 0)
+            return -1;
+    }
+
+    return 0;
+}
+
+static int ipv4_pktinfo(int fd) {
+    int yes;
+
+#ifdef IP_PKTINFO
+    yes = 1;
+    if (setsockopt(fd, IPPROTO_IP, IP_PKTINFO, &yes, sizeof(yes)) < 0) {
+        avahi_log_warn("IP_PKTINFO failed: %s", strerror(errno));
+        return -1;
+    }
+#else
+
+#ifdef IP_RECVINTERFACE
+    yes = 1;
+    if (setsockopt (fd, IPPROTO_IP, IP_RECVINTERFACE, &yes, sizeof(yes)) < 0) {
+        avahi_log_warn("IP_RECVINTERFACE failed: %s", strerror(errno));
+        return -1;
+    }
+#elif defined(IP_RECVIF)
+    yes = 1;
+    if (setsockopt (fd, IPPROTO_IP, IP_RECVIF, &yes, sizeof(yes)) < 0) {
+        avahi_log_warn("IP_RECVIF failed: %s", strerror(errno));
+        return -1;
+    }
+#endif
+
+#ifdef IP_RECVDSTADDR
+    yes = 1;
+    if (setsockopt (fd, IPPROTO_IP, IP_RECVDSTADDR, &yes, sizeof(yes)) < 0) {
+        avahi_log_warn("IP_RECVDSTADDR failed: %s", strerror(errno));
+        return -1;
+    }
+#endif
+
+#endif /* IP_PKTINFO */
+
+#ifdef IP_RECVTTL
+    yes = 1;
+    if (setsockopt(fd, IPPROTO_IP, IP_RECVTTL, &yes, sizeof(yes)) < 0) {
+        avahi_log_warn("IP_RECVTTL failed: %s", strerror(errno));
+        return -1;
+    }
+#endif
+
+    return 0;
+}
+
+static int ipv6_pktinfo(int fd) {
+    int yes;
+
+#ifdef IPV6_RECVPKTINFO
+    yes = 1;
+    if (setsockopt(fd, IPPROTO_IPV6, IPV6_RECVPKTINFO, &yes, sizeof(yes)) < 0) {
+        avahi_log_warn("IPV6_RECVPKTINFO failed: %s", strerror(errno));
+        return -1;
+    }
+#elif defined(IPV6_PKTINFO)
+    yes = 1;
+    if (setsockopt(fd, IPPROTO_IPV6, IPV6_PKTINFO, &yes, sizeof(yes)) < 0) {
+        avahi_log_warn("IPV6_PKTINFO failed: %s", strerror(errno));
+        return -1;
+    }
+#endif
+
+#ifdef IPV6_RECVHOPS
+    yes = 1;
+    if (setsockopt(fd, IPPROTO_IPV6, IPV6_RECVHOPS, &yes, sizeof(yes)) < 0) {
+        avahi_log_warn("IPV6_RECVHOPS failed: %s", strerror(errno));
+        return -1;
+    }
+#elif defined(IPV6_RECVHOPLIMIT)
+    yes = 1;
+    if (setsockopt(fd, IPPROTO_IPV6, IPV6_RECVHOPLIMIT, &yes, sizeof(yes)) < 0) {
+        avahi_log_warn("IPV6_RECVHOPLIMIT failed: %s", strerror(errno));
+        return -1;
+    }
+#elif defined(IPV6_HOPLIMIT)
+    yes = 1;
+    if (setsockopt(fd, IPPROTO_IPV6, IPV6_HOPLIMIT, &yes, sizeof(yes)) < 0) {
+        avahi_log_warn("IPV6_HOPLIMIT failed: %s", strerror(errno));
+        return -1;
+    }
+#endif
+
+    return 0;
+}
+
+int avahi_open_socket_ipv4(int no_reuse) {
+    struct sockaddr_in local;
+    int fd = -1, r, ittl;
+    uint8_t ttl, cyes;
+
+    if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
+        avahi_log_warn("socket() failed: %s", strerror(errno));
+        goto fail;
+    }
+
+    ttl = 255;
+    if (setsockopt(fd, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, sizeof(ttl)) < 0) {
+        avahi_log_warn("IP_MULTICAST_TTL failed: %s", strerror(errno));
+        goto fail;
+    }
+
+    ittl = 255;
+    if (setsockopt(fd, IPPROTO_IP, IP_TTL, &ittl, sizeof(ittl)) < 0) {
+        avahi_log_warn("IP_TTL failed: %s", strerror(errno));
+        goto fail;
+    }
+
+    cyes = 1;
+    if (setsockopt(fd, IPPROTO_IP, IP_MULTICAST_LOOP, &cyes, sizeof(cyes)) < 0) {
+        avahi_log_warn("IP_MULTICAST_LOOP failed: %s", strerror(errno));
+        goto fail;
+    }
+
+    memset(&local, 0, sizeof(local));
+    local.sin_family = AF_INET;
+    local.sin_port = htons(AVAHI_MDNS_PORT);
+
+    if (no_reuse)
+        r = bind(fd, (struct sockaddr*) &local, sizeof(local));
+    else
+        r = bind_with_warn(fd, (struct sockaddr*) &local, sizeof(local));
+
+    if (r < 0)
+        goto fail;
+
+    if (ipv4_pktinfo (fd) < 0)
+         goto fail;
+
+    if (avahi_set_cloexec(fd) < 0) {
+        avahi_log_warn("FD_CLOEXEC failed: %s", strerror(errno));
+        goto fail;
+    }
+
+    if (avahi_set_nonblock(fd) < 0) {
+        avahi_log_warn("O_NONBLOCK failed: %s", strerror(errno));
+        goto fail;
+    }
+
+    return fd;
+
+fail:
+    if (fd >= 0)
+        close(fd);
+
+    return -1;
+}
+
+int avahi_open_socket_ipv6(int no_reuse) {
+    struct sockaddr_in6 sa, local;
+    int fd = -1, yes, r;
+    int ttl;
+
+    mdns_mcast_group_ipv6(&sa);
+
+    if ((fd = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) {
+        avahi_log_warn("socket() failed: %s", strerror(errno));
+        goto fail;
+    }
+
+    ttl = 255;
+    if (setsockopt(fd, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, &ttl, sizeof(ttl)) < 0) {
+        avahi_log_warn("IPV6_MULTICAST_HOPS failed: %s", strerror(errno));
+        goto fail;
+    }
+
+    ttl = 255;
+    if (setsockopt(fd, IPPROTO_IPV6, IPV6_UNICAST_HOPS, &ttl, sizeof(ttl)) < 0) {
+        avahi_log_warn("IPV6_UNICAST_HOPS failed: %s", strerror(errno));
+        goto fail;
+    }
+
+    yes = 1;
+    if (setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &yes, sizeof(yes)) < 0) {
+        avahi_log_warn("IPV6_V6ONLY failed: %s", strerror(errno));
+        goto fail;
+    }
+
+    yes = 1;
+    if (setsockopt(fd, IPPROTO_IPV6, IPV6_MULTICAST_LOOP, &yes, sizeof(yes)) < 0) {
+        avahi_log_warn("IPV6_MULTICAST_LOOP failed: %s", strerror(errno));
+        goto fail;
+    }
+
+    memset(&local, 0, sizeof(local));
+    local.sin6_family = AF_INET6;
+    local.sin6_port = htons(AVAHI_MDNS_PORT);
+
+    if (no_reuse)
+        r = bind(fd, (struct sockaddr*) &local, sizeof(local));
+    else
+        r = bind_with_warn(fd, (struct sockaddr*) &local, sizeof(local));
+
+    if (r < 0)
+        goto fail;
+
+    if (ipv6_pktinfo(fd) < 0)
+        goto fail;
+
+    if (avahi_set_cloexec(fd) < 0) {
+        avahi_log_warn("FD_CLOEXEC failed: %s", strerror(errno));
+        goto fail;
+    }
+
+    if (avahi_set_nonblock(fd) < 0) {
+        avahi_log_warn("O_NONBLOCK failed: %s", strerror(errno));
+        goto fail;
+    }
+
+    return fd;
+
+fail:
+    if (fd >= 0)
+        close(fd);
+
+    return -1;
+}
+
+static int sendmsg_loop(int fd, struct msghdr *msg, int flags) {
+    assert(fd >= 0);
+    assert(msg);
+
+    for (;;) {
+
+        if (sendmsg(fd, msg, flags) >= 0)
+            break;
+
+        if (errno == EINTR)
+            continue;
+
+        if (errno != EAGAIN) {
+            char where[64];
+            struct sockaddr_in *sin = msg->msg_name;
+
+            inet_ntop(sin->sin_family, &sin->sin_addr, where, sizeof(where));
+            avahi_log_debug("sendmsg() to %s failed: %s", where, strerror(errno));
+            return -1;
+        }
+
+        if (avahi_wait_for_write(fd) < 0)
+            return -1;
+    }
+
+    return 0;
+}
+
+int avahi_send_dns_packet_ipv4(
+        int fd,
+        AvahiIfIndex interface,
+        AvahiDnsPacket *p,
+        const AvahiIPv4Address *src_address,
+        const AvahiIPv4Address *dst_address,
+        uint16_t dst_port) {
+
+    struct sockaddr_in sa;
+    struct msghdr msg;
+    struct iovec io;
+#ifdef IP_PKTINFO
+    struct cmsghdr *cmsg;
+    size_t cmsg_data[( CMSG_SPACE(sizeof(struct in_pktinfo)) / sizeof(size_t)) + 1];
+#elif !defined(IP_MULTICAST_IF) && defined(IP_SENDSRCADDR)
+    struct cmsghdr *cmsg;
+    size_t cmsg_data[( CMSG_SPACE(sizeof(struct in_addr)) / sizeof(size_t)) + 1];
+#endif
+
+    assert(fd >= 0);
+    assert(p);
+    assert(avahi_dns_packet_check_valid(p) >= 0);
+    assert(!dst_address || dst_port > 0);
+
+    if (!dst_address)
+        mdns_mcast_group_ipv4(&sa);
+    else
+        ipv4_address_to_sockaddr(&sa, dst_address, dst_port);
+
+    memset(&io, 0, sizeof(io));
+    io.iov_base = AVAHI_DNS_PACKET_DATA(p);
+    io.iov_len = p->size;
+
+    memset(&msg, 0, sizeof(msg));
+    msg.msg_name = &sa;
+    msg.msg_namelen = sizeof(sa);
+    msg.msg_iov = &io;
+    msg.msg_iovlen = 1;
+    msg.msg_flags = 0;
+    msg.msg_control = NULL;
+    msg.msg_controllen = 0;
+
+#ifdef IP_PKTINFO
+    if (interface > 0 || src_address) {
+        struct in_pktinfo *pkti;
+
+        memset(cmsg_data, 0, sizeof(cmsg_data));
+        msg.msg_control = cmsg_data;
+        msg.msg_controllen = CMSG_LEN(sizeof(struct in_pktinfo));
+
+        cmsg = CMSG_FIRSTHDR(&msg);
+        cmsg->cmsg_len = msg.msg_controllen;
+        cmsg->cmsg_level = IPPROTO_IP;
+        cmsg->cmsg_type = IP_PKTINFO;
+
+        pkti = (struct in_pktinfo*) CMSG_DATA(cmsg);
+
+        if (interface > 0)
+            pkti->ipi_ifindex = interface;
+
+        if (src_address)
+            pkti->ipi_spec_dst.s_addr = src_address->address;
+    }
+#elif defined(IP_MULTICAST_IF)
+    if (src_address) {
+        struct in_addr any = { INADDR_ANY };
+        if (setsockopt(fd, IPPROTO_IP, IP_MULTICAST_IF, src_address ? &src_address->address : &any, sizeof(struct in_addr)) < 0) {
+            avahi_log_warn("IP_MULTICAST_IF failed: %s", strerror(errno));
+            return -1;
+        }
+    }
+#elif defined(IP_SENDSRCADDR)
+    if (src_address) {
+        struct in_addr *addr;
+
+        memset(cmsg_data, 0, sizeof(cmsg_data));
+        msg.msg_control = cmsg_data;
+        msg.msg_controllen = CMSG_LEN(sizeof(struct in_addr));
+
+        cmsg = CMSG_FIRSTHDR(&msg);
+        cmsg->cmsg_len = msg.msg_controllen;
+        cmsg->cmsg_level = IPPROTO_IP;
+        cmsg->cmsg_type = IP_SENDSRCADDR;
+
+        addr = (struct in_addr *)CMSG_DATA(cmsg);
+        addr->s_addr =  src_address->address;
+    }
+#elif defined(__GNUC__)
+#warning "FIXME: We need some code to set the outgoing interface/local address here if IP_PKTINFO/IP_MULTICAST_IF is not available"
+#endif
+
+    return sendmsg_loop(fd, &msg, 0);
+}
+
+int avahi_send_dns_packet_ipv6(
+        int fd,
+        AvahiIfIndex interface,
+        AvahiDnsPacket *p,
+        const AvahiIPv6Address *src_address,
+        const AvahiIPv6Address *dst_address,
+        uint16_t dst_port) {
+
+    struct sockaddr_in6 sa;
+    struct msghdr msg;
+    struct iovec io;
+    struct cmsghdr *cmsg;
+    size_t cmsg_data[(CMSG_SPACE(sizeof(struct in6_pktinfo))/sizeof(size_t)) + 1];
+
+    assert(fd >= 0);
+    assert(p);
+    assert(avahi_dns_packet_check_valid(p) >= 0);
+    assert(!dst_address || dst_port > 0);
+
+    if (!dst_address)
+        mdns_mcast_group_ipv6(&sa);
+    else
+        ipv6_address_to_sockaddr(&sa, dst_address, dst_port);
+
+    memset(&io, 0, sizeof(io));
+    io.iov_base = AVAHI_DNS_PACKET_DATA(p);
+    io.iov_len = p->size;
+
+    memset(&msg, 0, sizeof(msg));
+    msg.msg_name = &sa;
+    msg.msg_namelen = sizeof(sa);
+    msg.msg_iov = &io;
+    msg.msg_iovlen = 1;
+    msg.msg_flags = 0;
+
+    if (interface > 0 || src_address) {
+        struct in6_pktinfo *pkti;
+
+        memset(cmsg_data, 0, sizeof(cmsg_data));
+        msg.msg_control = cmsg_data;
+        msg.msg_controllen = CMSG_LEN(sizeof(struct in6_pktinfo));
+
+        cmsg = CMSG_FIRSTHDR(&msg);
+        cmsg->cmsg_len = msg.msg_controllen;
+        cmsg->cmsg_level = IPPROTO_IPV6;
+        cmsg->cmsg_type = IPV6_PKTINFO;
+
+        pkti = (struct in6_pktinfo*) CMSG_DATA(cmsg);
+
+        if (interface > 0)
+            pkti->ipi6_ifindex = interface;
+
+        if (src_address)
+            memcpy(&pkti->ipi6_addr, src_address->address, sizeof(src_address->address));
+    } else {
+        msg.msg_control = NULL;
+        msg.msg_controllen = 0;
+    }
+
+    return sendmsg_loop(fd, &msg, 0);
+}
+
+AvahiDnsPacket *avahi_recv_dns_packet_ipv4(
+        int fd,
+        AvahiIPv4Address *ret_src_address,
+        uint16_t *ret_src_port,
+        AvahiIPv4Address *ret_dst_address,
+        AvahiIfIndex *ret_iface,
+        uint8_t *ret_ttl) {
+
+    AvahiDnsPacket *p= NULL;
+    struct msghdr msg;
+    struct iovec io;
+    size_t aux[1024 / sizeof(size_t)]; /* for alignment on ia64 ! */
+    ssize_t l;
+    struct cmsghdr *cmsg;
+    int found_addr = 0;
+    int ms;
+    struct sockaddr_in sa;
+
+    assert(fd >= 0);
+
+    if (ioctl(fd, FIONREAD, &ms) < 0) {
+        avahi_log_warn("ioctl(): %s", strerror(errno));
+        goto fail;
+    }
+
+    if (ms < 0) {
+        avahi_log_warn("FIONREAD returned negative value.");
+        goto fail;
+    }
+
+    p = avahi_dns_packet_new(ms + AVAHI_DNS_PACKET_EXTRA_SIZE);
+
+    io.iov_base = AVAHI_DNS_PACKET_DATA(p);
+    io.iov_len = p->max_size;
+
+    memset(&msg, 0, sizeof(msg));
+    msg.msg_name = &sa;
+    msg.msg_namelen = sizeof(sa);
+    msg.msg_iov = &io;
+    msg.msg_iovlen = 1;
+    msg.msg_control = aux;
+    msg.msg_controllen = sizeof(aux);
+    msg.msg_flags = 0;
+
+    if ((l = recvmsg(fd, &msg, 0)) < 0) {
+        /* Linux returns EAGAIN when an invalid IP packet has been
+        received. We suppress warnings in this case because this might
+        create quite a bit of log traffic on machines with unstable
+        links. (See #60) */
+
+        if (errno != EAGAIN)
+            avahi_log_warn("recvmsg(): %s", strerror(errno));
+
+        goto fail;
+    }
+
+    /* For corrupt packets FIONREAD returns zero size (See rhbz #607297). So
+     * fail after having read them. */
+    if (!ms)
+        goto fail;
+
+    if (sa.sin_addr.s_addr == INADDR_ANY)
+        /* Linux 2.4 behaves very strangely sometimes! */
+        goto fail;
+
+    assert(!(msg.msg_flags & MSG_CTRUNC));
+    assert(!(msg.msg_flags & MSG_TRUNC));
+
+    p->size = (size_t) l;
+
+    if (ret_src_port)
+        *ret_src_port = avahi_port_from_sockaddr((struct sockaddr*) &sa);
+
+    if (ret_src_address) {
+        AvahiAddress a;
+        avahi_address_from_sockaddr((struct sockaddr*) &sa, &a);
+        *ret_src_address = a.data.ipv4;
+    }
+
+    if (ret_ttl)
+        *ret_ttl = 255;
+
+    if (ret_iface)
+        *ret_iface = AVAHI_IF_UNSPEC;
+
+    for (cmsg = CMSG_FIRSTHDR(&msg); cmsg != NULL; cmsg = CMSG_NXTHDR(&msg, cmsg)) {
+
+        if (cmsg->cmsg_level == IPPROTO_IP) {
+
+            switch (cmsg->cmsg_type) {
+#ifdef IP_RECVTTL
+                case IP_RECVTTL:
+#endif
+                case IP_TTL:
+                    if (ret_ttl)
+                        *ret_ttl = (uint8_t) (*(int *) CMSG_DATA(cmsg));
+
+                    break;
+
+#ifdef IP_PKTINFO
+                case IP_PKTINFO: {
+                    struct in_pktinfo *i = (struct in_pktinfo*) CMSG_DATA(cmsg);
+
+                    if (ret_iface && i->ipi_ifindex > 0)
+                        *ret_iface = (int) i->ipi_ifindex;
+
+                    if (ret_dst_address)
+                        ret_dst_address->address = i->ipi_addr.s_addr;
+
+                    found_addr = 1;
+
+                    break;
+                }
+#endif
+
+#ifdef IP_RECVIF
+                case IP_RECVIF: {
+                    struct sockaddr_dl *sdl = (struct sockaddr_dl *) CMSG_DATA (cmsg);
+
+                    if (ret_iface) {
+#ifdef __sun
+                        if (*(uint_t*) sdl > 0)
+                            *ret_iface = *(uint_t*) sdl;
+#else
+
+                        if (sdl->sdl_index > 0)
+                            *ret_iface = (int) sdl->sdl_index;
+#endif
+                    }
+
+                    break;
+                }
+#endif
+
+#ifdef IP_RECVDSTADDR
+                case IP_RECVDSTADDR:
+                    if (ret_dst_address)
+                        memcpy(&ret_dst_address->address, CMSG_DATA (cmsg), 4);
+
+                    found_addr = 1;
+                    break;
+#endif
+
+                default:
+                    avahi_log_warn("Unhandled cmsg_type: %d", cmsg->cmsg_type);
+                    break;
+            }
+        }
+    }
+
+    assert(found_addr);
+
+    return p;
+
+fail:
+    if (p)
+        avahi_dns_packet_free(p);
+
+    return NULL;
+}
+
+AvahiDnsPacket *avahi_recv_dns_packet_ipv6(
+        int fd,
+        AvahiIPv6Address *ret_src_address,
+        uint16_t *ret_src_port,
+        AvahiIPv6Address *ret_dst_address,
+        AvahiIfIndex *ret_iface,
+        uint8_t *ret_ttl) {
+
+    AvahiDnsPacket *p = NULL;
+    struct msghdr msg;
+    struct iovec io;
+    size_t aux[1024 / sizeof(size_t)];
+    ssize_t l;
+    int ms;
+    struct cmsghdr *cmsg;
+    int found_ttl = 0, found_iface = 0;
+    struct sockaddr_in6 sa;
+
+    assert(fd >= 0);
+
+    if (ioctl(fd, FIONREAD, &ms) < 0) {
+        avahi_log_warn("ioctl(): %s", strerror(errno));
+        goto fail;
+    }
+
+    if (ms < 0) {
+        avahi_log_warn("FIONREAD returned negative value.");
+        goto fail;
+    }
+
+    p = avahi_dns_packet_new(ms + AVAHI_DNS_PACKET_EXTRA_SIZE);
+
+    io.iov_base = AVAHI_DNS_PACKET_DATA(p);
+    io.iov_len = p->max_size;
+
+    memset(&msg, 0, sizeof(msg));
+    msg.msg_name = (struct sockaddr*) &sa;
+    msg.msg_namelen = sizeof(sa);
+
+    msg.msg_iov = &io;
+    msg.msg_iovlen = 1;
+    msg.msg_control = aux;
+    msg.msg_controllen = sizeof(aux);
+    msg.msg_flags = 0;
+
+    if ((l = recvmsg(fd, &msg, 0)) < 0) {
+        /* Linux returns EAGAIN when an invalid IP packet has been
+        received. We suppress warnings in this case because this might
+        create quite a bit of log traffic on machines with unstable
+        links. (See #60) */
+
+        if (errno != EAGAIN)
+            avahi_log_warn("recvmsg(): %s", strerror(errno));
+
+        goto fail;
+    }
+
+    /* For corrupt packets FIONREAD returns zero size (See rhbz #607297). So
+     * fail after having read them. */
+    if (!ms)
+        goto fail;
+
+    assert(!(msg.msg_flags & MSG_CTRUNC));
+    assert(!(msg.msg_flags & MSG_TRUNC));
+
+    p->size = (size_t) l;
+
+    if (ret_src_port)
+        *ret_src_port = avahi_port_from_sockaddr((struct sockaddr*) &sa);
+
+    if (ret_src_address) {
+        AvahiAddress a;
+        avahi_address_from_sockaddr((struct sockaddr*) &sa, &a);
+        *ret_src_address = a.data.ipv6;
+    }
+
+    for (cmsg = CMSG_FIRSTHDR(&msg); cmsg != NULL; cmsg = CMSG_NXTHDR(&msg, cmsg)) {
+
+        if (cmsg->cmsg_level == IPPROTO_IPV6) {
+
+            switch (cmsg->cmsg_type) {
+
+                case IPV6_HOPLIMIT:
+
+                    if (ret_ttl)
+                        *ret_ttl = (uint8_t) (*(int *) CMSG_DATA(cmsg));
+
+                    found_ttl = 1;
+
+                    break;
+
+                case IPV6_PKTINFO: {
+                    struct in6_pktinfo *i = (struct in6_pktinfo*) CMSG_DATA(cmsg);
+
+                    if (ret_iface && i->ipi6_ifindex > 0)
+                        *ret_iface = i->ipi6_ifindex;
+
+                    if (ret_dst_address)
+                        memcpy(ret_dst_address->address, i->ipi6_addr.s6_addr, 16);
+
+                    found_iface = 1;
+                    break;
+                }
+
+                default:
+                    avahi_log_warn("Unhandled cmsg_type: %d", cmsg->cmsg_type);
+                    break;
+            }
+        }
+    }
+
+    assert(found_iface);
+    assert(found_ttl);
+
+    return p;
+
+fail:
+    if (p)
+        avahi_dns_packet_free(p);
+
+    return NULL;
+}
+
+int avahi_open_unicast_socket_ipv4(void) {
+    struct sockaddr_in local;
+    int fd = -1;
+
+    if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
+        avahi_log_warn("socket() failed: %s", strerror(errno));
+        goto fail;
+    }
+
+    memset(&local, 0, sizeof(local));
+    local.sin_family = AF_INET;
+
+    if (bind(fd, (struct sockaddr*) &local, sizeof(local)) < 0) {
+        avahi_log_warn("bind() failed: %s", strerror(errno));
+        goto fail;
+    }
+
+    if (ipv4_pktinfo(fd) < 0) {
+         goto fail;
+    }
+
+    if (avahi_set_cloexec(fd) < 0) {
+        avahi_log_warn("FD_CLOEXEC failed: %s", strerror(errno));
+        goto fail;
+    }
+
+    if (avahi_set_nonblock(fd) < 0) {
+        avahi_log_warn("O_NONBLOCK failed: %s", strerror(errno));
+        goto fail;
+    }
+
+    return fd;
+
+fail:
+    if (fd >= 0)
+        close(fd);
+
+    return -1;
+}
+
+int avahi_open_unicast_socket_ipv6(void) {
+    struct sockaddr_in6 local;
+    int fd = -1, yes;
+
+    if ((fd = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) {
+        avahi_log_warn("socket() failed: %s", strerror(errno));
+        goto fail;
+    }
+
+    yes = 1;
+    if (setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &yes, sizeof(yes)) < 0) {
+        avahi_log_warn("IPV6_V6ONLY failed: %s", strerror(errno));
+        goto fail;
+    }
+
+    memset(&local, 0, sizeof(local));
+    local.sin6_family = AF_INET6;
+
+    if (bind(fd, (struct sockaddr*) &local, sizeof(local)) < 0) {
+        avahi_log_warn("bind() failed: %s", strerror(errno));
+        goto fail;
+    }
+
+    if (ipv6_pktinfo(fd) < 0)
+        goto fail;
+
+    if (avahi_set_cloexec(fd) < 0) {
+        avahi_log_warn("FD_CLOEXEC failed: %s", strerror(errno));
+        goto fail;
+    }
+
+    if (avahi_set_nonblock(fd) < 0) {
+        avahi_log_warn("O_NONBLOCK failed: %s", strerror(errno));
+        goto fail;
+    }
+
+    return fd;
+
+fail:
+    if (fd >= 0)
+        close(fd);
+
+    return -1;
+}
diff --git a/avahi-0.6.31/avahi-core/socket.h b/avahi-0.6.31/avahi-core/socket.h
new file mode 100644
index 0000000..92f12d7
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/socket.h
@@ -0,0 +1,47 @@
+#ifndef foosockethfoo
+#define foosockethfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#include <inttypes.h>
+
+#include "dns.h"
+
+#define AVAHI_MDNS_PORT 5353
+#define AVAHI_DNS_PORT 53
+#define AVAHI_IPV4_MCAST_GROUP "224.0.0.251"
+#define AVAHI_IPV6_MCAST_GROUP "ff02::fb"
+
+int avahi_open_socket_ipv4(int no_reuse);
+int avahi_open_socket_ipv6(int no_reuse);
+
+int avahi_open_unicast_socket_ipv4(void);
+int avahi_open_unicast_socket_ipv6(void);
+
+int avahi_send_dns_packet_ipv4(int fd, AvahiIfIndex iface, AvahiDnsPacket *p, const AvahiIPv4Address *src_address, const AvahiIPv4Address *dst_address, uint16_t dst_port);
+int avahi_send_dns_packet_ipv6(int fd, AvahiIfIndex iface, AvahiDnsPacket *p, const AvahiIPv6Address *src_address, const AvahiIPv6Address *dst_address, uint16_t dst_port);
+
+AvahiDnsPacket *avahi_recv_dns_packet_ipv4(int fd, AvahiIPv4Address *ret_src_address, uint16_t *ret_src_port, AvahiIPv4Address *ret_dst_address, AvahiIfIndex *ret_iface, uint8_t *ret_ttl);
+AvahiDnsPacket *avahi_recv_dns_packet_ipv6(int fd, AvahiIPv6Address *ret_src_address, uint16_t *ret_src_port, AvahiIPv6Address *ret_dst_address, AvahiIfIndex *ret_iface, uint8_t *ret_ttl);
+
+int avahi_mdns_mcast_join_ipv4(int fd, const AvahiIPv4Address *local_address, int iface, int join);
+int avahi_mdns_mcast_join_ipv6(int fd, const AvahiIPv6Address *local_address, int iface, int join);
+
+#endif
diff --git a/avahi-0.6.31/avahi-core/timeeventq-test.c b/avahi-0.6.31/avahi-core/timeeventq-test.c
new file mode 100644
index 0000000..d7b2e39
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/timeeventq-test.c
@@ -0,0 +1,67 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <assert.h>
+#include <stdlib.h>
+
+#include <avahi-common/timeval.h>
+#include <avahi-common/simple-watch.h>
+
+#include "timeeventq.h"
+#include "log.h"
+
+#define POINTER_TO_INT(p) ((int) (long) (p))
+#define INT_TO_POINTER(i) ((void*) (long) (i))
+
+static AvahiTimeEventQueue *q = NULL;
+
+static void callback(AvahiTimeEvent*e, void* userdata) {
+    struct timeval tv = {0, 0};
+    assert(e);
+    avahi_log_info("callback(%i)", POINTER_TO_INT(userdata));
+    avahi_elapse_time(&tv, 1000, 100);
+    avahi_time_event_update(e, &tv);
+}
+
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
+    struct timeval tv;
+    AvahiSimplePoll *s;
+
+    s = avahi_simple_poll_new();
+
+    q = avahi_time_event_queue_new(avahi_simple_poll_get(s));
+
+    avahi_time_event_new(q, avahi_elapse_time(&tv, 5000, 100), callback, INT_TO_POINTER(1));
+    avahi_time_event_new(q, avahi_elapse_time(&tv, 5000, 100), callback, INT_TO_POINTER(2));
+
+    avahi_log_info("starting");
+
+    for (;;)
+        if (avahi_simple_poll_iterate(s, -1) != 0)
+            break;
+
+    avahi_time_event_queue_free(q);
+    avahi_simple_poll_free(s);
+
+    return 0;
+}
diff --git a/avahi-0.6.31/avahi-core/timeeventq.c b/avahi-0.6.31/avahi-core/timeeventq.c
new file mode 100644
index 0000000..2799bf2
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/timeeventq.c
@@ -0,0 +1,225 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <assert.h>
+#include <stdlib.h>
+
+#include <avahi-common/timeval.h>
+#include <avahi-common/malloc.h>
+
+#include "timeeventq.h"
+#include "log.h"
+
+struct AvahiTimeEvent {
+    AvahiTimeEventQueue *queue;
+    AvahiPrioQueueNode *node;
+    struct timeval expiry;
+    struct timeval last_run;
+    AvahiTimeEventCallback callback;
+    void* userdata;
+};
+
+struct AvahiTimeEventQueue {
+    const AvahiPoll *poll_api;
+    AvahiPrioQueue *prioq;
+    AvahiTimeout *timeout;
+};
+
+static int compare(const void* _a, const void* _b) {
+    const AvahiTimeEvent *a = _a,  *b = _b;
+    int ret;
+
+    if ((ret = avahi_timeval_compare(&a->expiry, &b->expiry)) != 0)
+        return ret;
+
+    /* If both exevents are scheduled for the same time, put the entry
+     * that has been run earlier the last time first. */
+    return avahi_timeval_compare(&a->last_run, &b->last_run);
+}
+
+static AvahiTimeEvent* time_event_queue_root(AvahiTimeEventQueue *q) {
+    assert(q);
+
+    return q->prioq->root ? q->prioq->root->data : NULL;
+}
+
+static void update_timeout(AvahiTimeEventQueue *q) {
+    AvahiTimeEvent *e;
+    assert(q);
+
+    if ((e = time_event_queue_root(q)))
+        q->poll_api->timeout_update(q->timeout, &e->expiry);
+    else
+        q->poll_api->timeout_update(q->timeout, NULL);
+}
+
+static void expiration_event(AVAHI_GCC_UNUSED AvahiTimeout *timeout, void *userdata) {
+    AvahiTimeEventQueue *q = userdata;
+    AvahiTimeEvent *e;
+
+    if ((e = time_event_queue_root(q))) {
+        struct timeval now;
+
+        gettimeofday(&now, NULL);
+
+        /* Check if expired */
+        if (avahi_timeval_compare(&now, &e->expiry) >= 0) {
+
+            /* Make sure to move the entry away from the front */
+            e->last_run = now;
+            avahi_prio_queue_shuffle(q->prioq, e->node);
+
+            /* Run it */
+            assert(e->callback);
+            e->callback(e, e->userdata);
+
+            update_timeout(q);
+            return;
+        }
+    }
+
+    avahi_log_debug(__FILE__": Strange, expiration_event() called, but nothing really happened.");
+    update_timeout(q);
+}
+
+static void fix_expiry_time(AvahiTimeEvent *e) {
+    struct timeval now;
+    assert(e);
+
+    return; /*** DO WE REALLY NEED THIS? ***/
+
+    gettimeofday(&now, NULL);
+
+    if (avahi_timeval_compare(&now, &e->expiry) > 0)
+        e->expiry = now;
+}
+
+AvahiTimeEventQueue* avahi_time_event_queue_new(const AvahiPoll *poll_api) {
+    AvahiTimeEventQueue *q;
+
+    if (!(q = avahi_new(AvahiTimeEventQueue, 1))) {
+        avahi_log_error(__FILE__": Out of memory");
+        goto oom;
+    }
+
+    q->poll_api = poll_api;
+
+    if (!(q->prioq = avahi_prio_queue_new(compare)))
+        goto oom;
+
+    if (!(q->timeout = poll_api->timeout_new(poll_api, NULL, expiration_event, q)))
+        goto oom;
+
+    return q;
+
+oom:
+
+    if (q) {
+        avahi_free(q);
+
+        if (q->prioq)
+            avahi_prio_queue_free(q->prioq);
+    }
+
+    return NULL;
+}
+
+void avahi_time_event_queue_free(AvahiTimeEventQueue *q) {
+    AvahiTimeEvent *e;
+
+    assert(q);
+
+    while ((e = time_event_queue_root(q)))
+        avahi_time_event_free(e);
+    avahi_prio_queue_free(q->prioq);
+
+    q->poll_api->timeout_free(q->timeout);
+
+    avahi_free(q);
+}
+
+AvahiTimeEvent* avahi_time_event_new(
+    AvahiTimeEventQueue *q,
+    const struct timeval *timeval,
+    AvahiTimeEventCallback callback,
+    void* userdata) {
+
+    AvahiTimeEvent *e;
+
+    assert(q);
+    assert(callback);
+    assert(userdata);
+
+    if (!(e = avahi_new(AvahiTimeEvent, 1))) {
+        avahi_log_error(__FILE__": Out of memory");
+        return NULL; /* OOM */
+    }
+
+    e->queue = q;
+    e->callback = callback;
+    e->userdata = userdata;
+
+    if (timeval)
+        e->expiry = *timeval;
+    else {
+        e->expiry.tv_sec = 0;
+        e->expiry.tv_usec = 0;
+    }
+
+    fix_expiry_time(e);
+
+    e->last_run.tv_sec = 0;
+    e->last_run.tv_usec = 0;
+
+    if (!(e->node = avahi_prio_queue_put(q->prioq, e))) {
+        avahi_free(e);
+        return NULL;
+    }
+
+    update_timeout(q);
+    return e;
+}
+
+void avahi_time_event_free(AvahiTimeEvent *e) {
+    AvahiTimeEventQueue *q;
+    assert(e);
+
+    q = e->queue;
+
+    avahi_prio_queue_remove(q->prioq, e->node);
+    avahi_free(e);
+
+    update_timeout(q);
+}
+
+void avahi_time_event_update(AvahiTimeEvent *e, const struct timeval *timeval) {
+    assert(e);
+    assert(timeval);
+
+    e->expiry = *timeval;
+    fix_expiry_time(e);
+    avahi_prio_queue_shuffle(e->queue->prioq, e->node);
+
+    update_timeout(e->queue);
+}
+
diff --git a/avahi-0.6.31/avahi-core/timeeventq.h b/avahi-0.6.31/avahi-core/timeeventq.h
new file mode 100644
index 0000000..a695b6a
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/timeeventq.h
@@ -0,0 +1,46 @@
+#ifndef footimeeventqhfoo
+#define footimeeventqhfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#include <sys/types.h>
+
+typedef struct AvahiTimeEventQueue AvahiTimeEventQueue;
+typedef struct AvahiTimeEvent AvahiTimeEvent;
+
+#include <avahi-common/watch.h>
+
+#include "prioq.h"
+
+typedef void (*AvahiTimeEventCallback)(AvahiTimeEvent *e, void* userdata);
+
+AvahiTimeEventQueue* avahi_time_event_queue_new(const AvahiPoll *poll_api);
+void avahi_time_event_queue_free(AvahiTimeEventQueue *q);
+
+AvahiTimeEvent* avahi_time_event_new(
+    AvahiTimeEventQueue *q,
+    const struct timeval *timeval,
+    AvahiTimeEventCallback callback,
+    void* userdata);
+
+void avahi_time_event_free(AvahiTimeEvent *e);
+void avahi_time_event_update(AvahiTimeEvent *e, const struct timeval *timeval);
+
+#endif
diff --git a/avahi-0.6.31/avahi-core/update-test.c b/avahi-0.6.31/avahi-core/update-test.c
new file mode 100644
index 0000000..feb884a
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/update-test.c
@@ -0,0 +1,91 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <assert.h>
+#include <stdlib.h>
+
+#include <avahi-common/error.h>
+#include <avahi-common/watch.h>
+#include <avahi-common/simple-watch.h>
+#include <avahi-common/malloc.h>
+#include <avahi-common/alternative.h>
+#include <avahi-common/timeval.h>
+
+#include <avahi-core/core.h>
+#include <avahi-core/log.h>
+#include <avahi-core/publish.h>
+#include <avahi-core/lookup.h>
+
+static AvahiSEntryGroup *group = NULL;
+
+static void server_callback(AvahiServer *s, AvahiServerState state, AVAHI_GCC_UNUSED void* userdata) {
+
+    avahi_log_debug("server state: %i", state);
+
+    if (state == AVAHI_SERVER_RUNNING) {
+        int ret;
+
+        group = avahi_s_entry_group_new(s, NULL, NULL);
+        assert(group);
+
+        ret = avahi_server_add_service(s, group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "foo", "_http._tcp", NULL, NULL, 80, "test1", NULL);
+        assert(ret == AVAHI_OK);
+
+        avahi_s_entry_group_commit(group);
+    }
+}
+
+static void modify_txt_callback(AVAHI_GCC_UNUSED AvahiTimeout *e, void *userdata) {
+    int ret;
+    AvahiServer *s = userdata;
+
+    avahi_log_debug("modifying");
+
+    ret = avahi_server_update_service_txt(s, group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "foo", "_http._tcp", NULL, "test2", NULL);
+    assert(ret == AVAHI_OK);
+}
+
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
+    AvahiSimplePoll *simple_poll;
+    const AvahiPoll *poll_api;
+    AvahiServer *server;
+    struct timeval tv;
+    AvahiServerConfig config;
+
+    simple_poll = avahi_simple_poll_new();
+    assert(simple_poll);
+
+    poll_api = avahi_simple_poll_get(simple_poll);
+    assert(poll_api);
+
+    avahi_server_config_init(&config);
+    config.publish_domain = config.publish_workstation = config.use_ipv6 = config.publish_hinfo = 0;
+    server = avahi_server_new(poll_api, &config, server_callback, NULL, NULL);
+    assert(server);
+    avahi_server_config_free(&config);
+
+    poll_api->timeout_new(poll_api, avahi_elapse_time(&tv, 1000*10, 0), modify_txt_callback, server);
+
+    avahi_simple_poll_loop(simple_poll);
+    return 0;
+}
diff --git a/avahi-0.6.31/avahi-core/util.c b/avahi-0.6.31/avahi-core/util.c
new file mode 100644
index 0000000..21ef94c
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/util.c
@@ -0,0 +1,120 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <ctype.h>
+
+#include <avahi-common/malloc.h>
+#include "util.h"
+
+void avahi_hexdump(const void* p, size_t size) {
+    const uint8_t *c = p;
+    assert(p);
+
+    printf("Dumping %lu bytes from %p:\n", (unsigned long) size, p);
+
+    while (size > 0) {
+        unsigned i;
+
+        for (i = 0; i < 16; i++) {
+            if (i < size)
+                printf("%02x ", c[i]);
+            else
+                printf("   ");
+        }
+
+        for (i = 0; i < 16; i++) {
+            if (i < size)
+                printf("%c", c[i] >= 32 && c[i] < 127 ? c[i] : '.');
+            else
+                printf(" ");
+        }
+
+        printf("\n");
+
+        c += 16;
+
+        if (size <= 16)
+            break;
+
+        size -= 16;
+    }
+}
+
+char *avahi_format_mac_address(char *r, size_t l, const uint8_t* mac, size_t size) {
+    char *t = r;
+    unsigned i;
+    static const char hex[] = "0123456789abcdef";
+
+    assert(r);
+    assert(l > 0);
+    assert(mac);
+
+    if (size <= 0) {
+        *r = 0;
+        return r;
+    }
+
+    for (i = 0; i < size; i++) {
+        if (l < 3)
+            break;
+
+        *(t++) = hex[*mac >> 4];
+        *(t++) = hex[*mac & 0xF];
+        *(t++) = ':';
+
+        l -= 3;
+
+        mac++;
+    }
+
+    if (t > r)
+        *(t-1) = 0;
+    else
+        *r = 0;
+
+    return r;
+}
+
+char *avahi_strup(char *s) {
+    char *c;
+    assert(s);
+
+    for (c = s; *c; c++)
+        *c = (char) toupper(*c);
+
+    return s;
+}
+
+char *avahi_strdown(char *s) {
+    char *c;
+    assert(s);
+
+    for (c = s; *c; c++)
+        *c = (char) tolower(*c);
+
+    return s;
+}
diff --git a/avahi-0.6.31/avahi-core/util.h b/avahi-0.6.31/avahi-core/util.h
new file mode 100644
index 0000000..e13c334
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/util.h
@@ -0,0 +1,41 @@
+#ifndef fooutilhfoo
+#define fooutilhfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#include <inttypes.h>
+
+#include <avahi-common/cdecl.h>
+
+AVAHI_C_DECL_BEGIN
+
+void avahi_hexdump(const void *p, size_t size);
+
+char *avahi_format_mac_address(char *t, size_t l, const uint8_t* mac, size_t size);
+
+/** Change every character in the string to upper case (ASCII), return a pointer to the string */
+char *avahi_strup(char *s);
+
+/** Change every character in the string to lower case (ASCII), return a pointer to the string */
+char *avahi_strdown(char *s);
+
+AVAHI_C_DECL_END
+
+#endif
diff --git a/avahi-0.6.31/avahi-core/wide-area.c b/avahi-0.6.31/avahi-core/wide-area.c
new file mode 100644
index 0000000..d5e64e5
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/wide-area.c
@@ -0,0 +1,723 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <errno.h>
+#include <string.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <netinet/in.h>
+
+#include <avahi-common/malloc.h>
+#include <avahi-common/error.h>
+#include <avahi-common/timeval.h>
+
+#include "internal.h"
+#include "browse.h"
+#include "socket.h"
+#include "log.h"
+#include "hashmap.h"
+#include "wide-area.h"
+#include "addr-util.h"
+#include "rr-util.h"
+
+#define CACHE_ENTRIES_MAX 500
+
+typedef struct AvahiWideAreaCacheEntry AvahiWideAreaCacheEntry;
+
+struct AvahiWideAreaCacheEntry {
+    AvahiWideAreaLookupEngine *engine;
+
+    AvahiRecord *record;
+    struct timeval timestamp;
+    struct timeval expiry;
+
+    AvahiTimeEvent *time_event;
+
+    AVAHI_LLIST_FIELDS(AvahiWideAreaCacheEntry, by_key);
+    AVAHI_LLIST_FIELDS(AvahiWideAreaCacheEntry, cache);
+};
+
+struct AvahiWideAreaLookup {
+    AvahiWideAreaLookupEngine *engine;
+    int dead;
+
+    uint32_t id;  /* effectively just an uint16_t, but we need it as an index for a hash table */
+    AvahiTimeEvent *time_event;
+
+    AvahiKey *key, *cname_key;
+
+    int n_send;
+    AvahiDnsPacket *packet;
+
+    AvahiWideAreaLookupCallback callback;
+    void *userdata;
+
+    AvahiAddress dns_server_used;
+
+    AVAHI_LLIST_FIELDS(AvahiWideAreaLookup, lookups);
+    AVAHI_LLIST_FIELDS(AvahiWideAreaLookup, by_key);
+};
+
+struct AvahiWideAreaLookupEngine {
+    AvahiServer *server;
+
+    int fd_ipv4, fd_ipv6;
+    AvahiWatch *watch_ipv4, *watch_ipv6;
+
+    uint16_t next_id;
+
+    /* Cache */
+    AVAHI_LLIST_HEAD(AvahiWideAreaCacheEntry, cache);
+    AvahiHashmap *cache_by_key;
+    unsigned cache_n_entries;
+
+    /* Lookups */
+    AVAHI_LLIST_HEAD(AvahiWideAreaLookup, lookups);
+    AvahiHashmap *lookups_by_id;
+    AvahiHashmap *lookups_by_key;
+
+    int cleanup_dead;
+
+    AvahiAddress dns_servers[AVAHI_WIDE_AREA_SERVERS_MAX];
+    unsigned n_dns_servers;
+    unsigned current_dns_server;
+};
+
+static AvahiWideAreaLookup* find_lookup(AvahiWideAreaLookupEngine *e, uint16_t id) {
+    AvahiWideAreaLookup *l;
+    int i = (int) id;
+
+    assert(e);
+
+    if (!(l = avahi_hashmap_lookup(e->lookups_by_id, &i)))
+        return NULL;
+
+    assert(l->id == id);
+
+    if (l->dead)
+        return NULL;
+
+    return l;
+}
+
+static int send_to_dns_server(AvahiWideAreaLookup *l, AvahiDnsPacket *p) {
+    AvahiAddress *a;
+
+    assert(l);
+    assert(p);
+
+    if (l->engine->n_dns_servers <= 0)
+        return -1;
+
+    assert(l->engine->current_dns_server < l->engine->n_dns_servers);
+
+    a = &l->engine->dns_servers[l->engine->current_dns_server];
+    l->dns_server_used = *a;
+
+    if (a->proto == AVAHI_PROTO_INET) {
+
+        if (l->engine->fd_ipv4 < 0)
+            return -1;
+
+        return avahi_send_dns_packet_ipv4(l->engine->fd_ipv4, AVAHI_IF_UNSPEC, p, NULL, &a->data.ipv4, AVAHI_DNS_PORT);
+
+    } else {
+        assert(a->proto == AVAHI_PROTO_INET6);
+
+        if (l->engine->fd_ipv6 < 0)
+            return -1;
+
+        return avahi_send_dns_packet_ipv6(l->engine->fd_ipv6, AVAHI_IF_UNSPEC, p, NULL, &a->data.ipv6, AVAHI_DNS_PORT);
+    }
+}
+
+static void next_dns_server(AvahiWideAreaLookupEngine *e) {
+    assert(e);
+
+    e->current_dns_server++;
+
+    if (e->current_dns_server >= e->n_dns_servers)
+        e->current_dns_server = 0;
+}
+
+static void lookup_stop(AvahiWideAreaLookup *l) {
+    assert(l);
+
+    l->callback = NULL;
+
+    if (l->time_event) {
+        avahi_time_event_free(l->time_event);
+        l->time_event = NULL;
+    }
+}
+
+static void sender_timeout_callback(AvahiTimeEvent *e, void *userdata) {
+    AvahiWideAreaLookup *l = userdata;
+    struct timeval tv;
+
+    assert(l);
+
+    /* Try another DNS server after three retries */
+    if (l->n_send >= 3 && avahi_address_cmp(&l->engine->dns_servers[l->engine->current_dns_server], &l->dns_server_used) == 0) {
+        next_dns_server(l->engine);
+
+        if (avahi_address_cmp(&l->engine->dns_servers[l->engine->current_dns_server], &l->dns_server_used) == 0)
+            /* There is no other DNS server, fail */
+            l->n_send = 1000;
+    }
+
+    if (l->n_send >= 6) {
+        avahi_log_warn(__FILE__": Query timed out.");
+        avahi_server_set_errno(l->engine->server, AVAHI_ERR_TIMEOUT);
+        l->callback(l->engine, AVAHI_BROWSER_FAILURE, AVAHI_LOOKUP_RESULT_WIDE_AREA, NULL, l->userdata);
+        lookup_stop(l);
+        return;
+    }
+
+    assert(l->packet);
+    send_to_dns_server(l, l->packet);
+    l->n_send++;
+
+    avahi_time_event_update(e, avahi_elapse_time(&tv, 1000, 0));
+}
+
+AvahiWideAreaLookup *avahi_wide_area_lookup_new(
+    AvahiWideAreaLookupEngine *e,
+    AvahiKey *key,
+    AvahiWideAreaLookupCallback callback,
+    void *userdata) {
+
+    struct timeval tv;
+    AvahiWideAreaLookup *l, *t;
+    uint8_t *p;
+
+    assert(e);
+    assert(key);
+    assert(callback);
+    assert(userdata);
+
+    l = avahi_new(AvahiWideAreaLookup, 1);
+    l->engine = e;
+    l->dead = 0;
+    l->key = avahi_key_ref(key);
+    l->cname_key = avahi_key_new_cname(l->key);
+    l->callback = callback;
+    l->userdata = userdata;
+
+    /* If more than 65K wide area quries are issued simultaneously,
+     * this will break. This should be limited by some higher level */
+
+    for (;; e->next_id++)
+        if (!find_lookup(e, e->next_id))
+            break; /* This ID is not yet used. */
+
+    l->id = e->next_id++;
+
+    /* We keep the packet around in case we need to repeat our query */
+    l->packet = avahi_dns_packet_new(0);
+
+    avahi_dns_packet_set_field(l->packet, AVAHI_DNS_FIELD_ID, (uint16_t) l->id);
+    avahi_dns_packet_set_field(l->packet, AVAHI_DNS_FIELD_FLAGS, AVAHI_DNS_FLAGS(0, 0, 0, 0, 1, 0, 0, 0, 0, 0));
+
+    p = avahi_dns_packet_append_key(l->packet, key, 0);
+    assert(p);
+
+    avahi_dns_packet_set_field(l->packet, AVAHI_DNS_FIELD_QDCOUNT, 1);
+
+    if (send_to_dns_server(l, l->packet) < 0) {
+        avahi_log_error(__FILE__": Failed to send packet.");
+        avahi_dns_packet_free(l->packet);
+        avahi_key_unref(l->key);
+        if (l->cname_key)
+            avahi_key_unref(l->cname_key);
+        avahi_free(l);
+        return NULL;
+    }
+
+    l->n_send = 1;
+
+    l->time_event = avahi_time_event_new(e->server->time_event_queue, avahi_elapse_time(&tv, 500, 0), sender_timeout_callback, l);
+
+    avahi_hashmap_insert(e->lookups_by_id, &l->id, l);
+
+    t = avahi_hashmap_lookup(e->lookups_by_key, l->key);
+    AVAHI_LLIST_PREPEND(AvahiWideAreaLookup, by_key, t, l);
+    avahi_hashmap_replace(e->lookups_by_key, avahi_key_ref(l->key), t);
+
+    AVAHI_LLIST_PREPEND(AvahiWideAreaLookup, lookups, e->lookups, l);
+
+    return l;
+}
+
+static void lookup_destroy(AvahiWideAreaLookup *l) {
+    AvahiWideAreaLookup *t;
+    assert(l);
+
+    lookup_stop(l);
+
+    t = avahi_hashmap_lookup(l->engine->lookups_by_key, l->key);
+    AVAHI_LLIST_REMOVE(AvahiWideAreaLookup, by_key, t, l);
+    if (t)
+        avahi_hashmap_replace(l->engine->lookups_by_key, avahi_key_ref(l->key), t);
+    else
+        avahi_hashmap_remove(l->engine->lookups_by_key, l->key);
+
+    AVAHI_LLIST_REMOVE(AvahiWideAreaLookup, lookups, l->engine->lookups, l);
+
+    avahi_hashmap_remove(l->engine->lookups_by_id, &l->id);
+    avahi_dns_packet_free(l->packet);
+
+    if (l->key)
+        avahi_key_unref(l->key);
+
+    if (l->cname_key)
+        avahi_key_unref(l->cname_key);
+
+    avahi_free(l);
+}
+
+void avahi_wide_area_lookup_free(AvahiWideAreaLookup *l) {
+    assert(l);
+
+    if (l->dead)
+        return;
+
+    l->dead = 1;
+    l->engine->cleanup_dead = 1;
+    lookup_stop(l);
+}
+
+void avahi_wide_area_cleanup(AvahiWideAreaLookupEngine *e) {
+    AvahiWideAreaLookup *l, *n;
+    assert(e);
+
+    while (e->cleanup_dead) {
+        e->cleanup_dead = 0;
+
+        for (l = e->lookups; l; l = n) {
+            n = l->lookups_next;
+
+            if (l->dead)
+                lookup_destroy(l);
+        }
+    }
+}
+
+static void cache_entry_free(AvahiWideAreaCacheEntry *c) {
+    AvahiWideAreaCacheEntry *t;
+    assert(c);
+
+    if (c->time_event)
+        avahi_time_event_free(c->time_event);
+
+    AVAHI_LLIST_REMOVE(AvahiWideAreaCacheEntry, cache, c->engine->cache, c);
+
+    t = avahi_hashmap_lookup(c->engine->cache_by_key, c->record->key);
+    AVAHI_LLIST_REMOVE(AvahiWideAreaCacheEntry, by_key, t, c);
+    if (t)
+        avahi_hashmap_replace(c->engine->cache_by_key, avahi_key_ref(c->record->key), t);
+    else
+        avahi_hashmap_remove(c->engine->cache_by_key, c->record->key);
+
+    c->engine->cache_n_entries --;
+
+    avahi_record_unref(c->record);
+    avahi_free(c);
+}
+
+static void expiry_event(AvahiTimeEvent *te, void *userdata) {
+    AvahiWideAreaCacheEntry *e = userdata;
+
+    assert(te);
+    assert(e);
+
+    cache_entry_free(e);
+}
+
+static AvahiWideAreaCacheEntry* find_record_in_cache(AvahiWideAreaLookupEngine *e, AvahiRecord *r) {
+    AvahiWideAreaCacheEntry *c;
+
+    assert(e);
+    assert(r);
+
+    for (c = avahi_hashmap_lookup(e->cache_by_key, r->key); c; c = c->by_key_next)
+        if (avahi_record_equal_no_ttl(r, c->record))
+            return c;
+
+    return NULL;
+}
+
+static void run_callbacks(AvahiWideAreaLookupEngine *e, AvahiRecord *r) {
+    AvahiWideAreaLookup *l;
+
+    assert(e);
+    assert(r);
+
+    for (l = avahi_hashmap_lookup(e->lookups_by_key, r->key); l; l = l->by_key_next) {
+        if (l->dead || !l->callback)
+            continue;
+
+        l->callback(e, AVAHI_BROWSER_NEW, AVAHI_LOOKUP_RESULT_WIDE_AREA, r, l->userdata);
+    }
+
+    if (r->key->clazz == AVAHI_DNS_CLASS_IN && r->key->type == AVAHI_DNS_TYPE_CNAME) {
+        /* It's a CNAME record, so we have to scan the all lookups to see if one matches */
+
+        for (l = e->lookups; l; l = l->lookups_next) {
+            AvahiKey *key;
+
+            if (l->dead || !l->callback)
+                continue;
+
+            if ((key = avahi_key_new_cname(l->key))) {
+                if (avahi_key_equal(r->key, key))
+                    l->callback(e, AVAHI_BROWSER_NEW, AVAHI_LOOKUP_RESULT_WIDE_AREA, r, l->userdata);
+
+                avahi_key_unref(key);
+            }
+        }
+    }
+}
+
+static void add_to_cache(AvahiWideAreaLookupEngine *e, AvahiRecord *r) {
+    AvahiWideAreaCacheEntry *c;
+    int is_new;
+
+    assert(e);
+    assert(r);
+
+    if ((c = find_record_in_cache(e, r))) {
+        is_new = 0;
+
+        /* Update the existing entry */
+        avahi_record_unref(c->record);
+    } else {
+        AvahiWideAreaCacheEntry *t;
+
+        is_new = 1;
+
+        /* Enforce cache size */
+        if (e->cache_n_entries >= CACHE_ENTRIES_MAX)
+            /* Eventually we should improve the caching algorithm here */
+            goto finish;
+
+        c = avahi_new(AvahiWideAreaCacheEntry, 1);
+        c->engine = e;
+        c->time_event = NULL;
+
+        AVAHI_LLIST_PREPEND(AvahiWideAreaCacheEntry, cache, e->cache, c);
+
+        /* Add the new entry to the cache entry hash table */
+        t = avahi_hashmap_lookup(e->cache_by_key, r->key);
+        AVAHI_LLIST_PREPEND(AvahiWideAreaCacheEntry, by_key, t, c);
+        avahi_hashmap_replace(e->cache_by_key, avahi_key_ref(r->key), t);
+
+        e->cache_n_entries ++;
+    }
+
+    c->record = avahi_record_ref(r);
+
+    gettimeofday(&c->timestamp, NULL);
+    c->expiry = c->timestamp;
+    avahi_timeval_add(&c->expiry, r->ttl * 1000000);
+
+    if (c->time_event)
+        avahi_time_event_update(c->time_event, &c->expiry);
+    else
+        c->time_event = avahi_time_event_new(e->server->time_event_queue, &c->expiry, expiry_event, c);
+
+finish:
+
+    if (is_new)
+        run_callbacks(e, r);
+}
+
+static int map_dns_error(uint16_t error) {
+    static const int table[16] = {
+        AVAHI_OK,
+        AVAHI_ERR_DNS_FORMERR,
+        AVAHI_ERR_DNS_SERVFAIL,
+        AVAHI_ERR_DNS_NXDOMAIN,
+        AVAHI_ERR_DNS_NOTIMP,
+        AVAHI_ERR_DNS_REFUSED,
+        AVAHI_ERR_DNS_YXDOMAIN,
+        AVAHI_ERR_DNS_YXRRSET,
+        AVAHI_ERR_DNS_NXRRSET,
+        AVAHI_ERR_DNS_NOTAUTH,
+        AVAHI_ERR_DNS_NOTZONE,
+        AVAHI_ERR_INVALID_DNS_ERROR,
+        AVAHI_ERR_INVALID_DNS_ERROR,
+        AVAHI_ERR_INVALID_DNS_ERROR,
+        AVAHI_ERR_INVALID_DNS_ERROR,
+        AVAHI_ERR_INVALID_DNS_ERROR
+    };
+
+    assert(error <= 15);
+
+    return table[error];
+}
+
+static void handle_packet(AvahiWideAreaLookupEngine *e, AvahiDnsPacket *p) {
+    AvahiWideAreaLookup *l = NULL;
+    int i, r;
+
+    AvahiBrowserEvent final_event = AVAHI_BROWSER_ALL_FOR_NOW;
+
+    assert(e);
+    assert(p);
+
+    /* Some superficial validity tests */
+    if (avahi_dns_packet_check_valid(p) < 0 || avahi_dns_packet_is_query(p)) {
+        avahi_log_warn(__FILE__": Ignoring invalid response for wide area datagram.");
+        goto finish;
+    }
+
+    /* Look for the lookup that issued this query */
+    if (!(l = find_lookup(e, avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_ID))) || l->dead)
+        goto finish;
+
+    /* Check whether this a packet indicating a failure */
+    if ((r = avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_FLAGS) & 15) != 0 ||
+        avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_ANCOUNT) == 0) {
+
+        avahi_server_set_errno(e->server, r == 0 ? AVAHI_ERR_NOT_FOUND : map_dns_error(r));
+        /* Tell the user about the failure */
+        final_event = AVAHI_BROWSER_FAILURE;
+
+        /* We go on here, since some of the records contained in the
+           reply might be interesting in some way */
+    }
+
+    /* Skip over the question */
+    for (i = (int) avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_QDCOUNT); i > 0; i--) {
+        AvahiKey *k;
+
+        if (!(k = avahi_dns_packet_consume_key(p, NULL))) {
+            avahi_log_warn(__FILE__": Wide area response packet too short or invalid while reading question key. (Maybe a UTF-8 problem?)");
+            avahi_server_set_errno(e->server, AVAHI_ERR_INVALID_PACKET);
+            final_event = AVAHI_BROWSER_FAILURE;
+            goto finish;
+        }
+
+        avahi_key_unref(k);
+    }
+
+    /* Process responses */
+    for (i = (int) avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_ANCOUNT) +
+             (int) avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_NSCOUNT) +
+             (int) avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_ARCOUNT); i > 0; i--) {
+
+        AvahiRecord *rr;
+
+        if (!(rr = avahi_dns_packet_consume_record(p, NULL))) {
+            avahi_log_warn(__FILE__": Wide area response packet too short or invalid while reading response record. (Maybe a UTF-8 problem?)");
+            avahi_server_set_errno(e->server, AVAHI_ERR_INVALID_PACKET);
+            final_event = AVAHI_BROWSER_FAILURE;
+            goto finish;
+        }
+
+        add_to_cache(e, rr);
+        avahi_record_unref(rr);
+    }
+
+finish:
+
+    if (l && !l->dead) {
+        if (l->callback)
+            l->callback(e, final_event, AVAHI_LOOKUP_RESULT_WIDE_AREA, NULL, l->userdata);
+
+        lookup_stop(l);
+    }
+}
+
+static void socket_event(AVAHI_GCC_UNUSED AvahiWatch *w, int fd, AVAHI_GCC_UNUSED AvahiWatchEvent events, void *userdata) {
+    AvahiWideAreaLookupEngine *e = userdata;
+    AvahiDnsPacket *p = NULL;
+
+    if (fd == e->fd_ipv4)
+        p = avahi_recv_dns_packet_ipv4(e->fd_ipv4, NULL, NULL, NULL, NULL, NULL);
+    else {
+        assert(fd == e->fd_ipv6);
+        p = avahi_recv_dns_packet_ipv6(e->fd_ipv6, NULL, NULL, NULL, NULL, NULL);
+    }
+
+    if (p) {
+        handle_packet(e, p);
+        avahi_dns_packet_free(p);
+    }
+}
+
+AvahiWideAreaLookupEngine *avahi_wide_area_engine_new(AvahiServer *s) {
+    AvahiWideAreaLookupEngine *e;
+
+    assert(s);
+
+    e = avahi_new(AvahiWideAreaLookupEngine, 1);
+    e->server = s;
+    e->cleanup_dead = 0;
+
+    /* Create sockets */
+    e->fd_ipv4 = s->config.use_ipv4 ? avahi_open_unicast_socket_ipv4() : -1;
+    e->fd_ipv6 = s->config.use_ipv6 ? avahi_open_unicast_socket_ipv6() : -1;
+
+    if (e->fd_ipv4 < 0 && e->fd_ipv6 < 0) {
+        avahi_log_error(__FILE__": Failed to create wide area sockets: %s", strerror(errno));
+
+        if (e->fd_ipv6 >= 0)
+            close(e->fd_ipv6);
+
+        if (e->fd_ipv4 >= 0)
+            close(e->fd_ipv4);
+
+        avahi_free(e);
+        return NULL;
+    }
+
+    /* Create watches */
+
+    e->watch_ipv4 = e->watch_ipv6 = NULL;
+
+    if (e->fd_ipv4 >= 0)
+        e->watch_ipv4 = s->poll_api->watch_new(e->server->poll_api, e->fd_ipv4, AVAHI_WATCH_IN, socket_event, e);
+    if (e->fd_ipv6 >= 0)
+        e->watch_ipv6 = s->poll_api->watch_new(e->server->poll_api, e->fd_ipv6, AVAHI_WATCH_IN, socket_event, e);
+
+    e->n_dns_servers = e->current_dns_server = 0;
+    e->next_id = (uint16_t) rand();
+
+    /* Initialize cache */
+    AVAHI_LLIST_HEAD_INIT(AvahiWideAreaCacheEntry, e->cache);
+    e->cache_by_key = avahi_hashmap_new((AvahiHashFunc) avahi_key_hash, (AvahiEqualFunc) avahi_key_equal, (AvahiFreeFunc) avahi_key_unref, NULL);
+    e->cache_n_entries = 0;
+
+    /* Initialize lookup list */
+    e->lookups_by_id = avahi_hashmap_new((AvahiHashFunc) avahi_int_hash, (AvahiEqualFunc) avahi_int_equal, NULL, NULL);
+    e->lookups_by_key = avahi_hashmap_new((AvahiHashFunc) avahi_key_hash, (AvahiEqualFunc) avahi_key_equal, (AvahiFreeFunc) avahi_key_unref, NULL);
+    AVAHI_LLIST_HEAD_INIT(AvahiWideAreaLookup, e->lookups);
+
+    return e;
+}
+
+void avahi_wide_area_engine_free(AvahiWideAreaLookupEngine *e) {
+    assert(e);
+
+    avahi_wide_area_clear_cache(e);
+
+    while (e->lookups)
+        lookup_destroy(e->lookups);
+
+    avahi_hashmap_free(e->cache_by_key);
+    avahi_hashmap_free(e->lookups_by_id);
+    avahi_hashmap_free(e->lookups_by_key);
+
+    if (e->watch_ipv4)
+        e->server->poll_api->watch_free(e->watch_ipv4);
+
+    if (e->watch_ipv6)
+        e->server->poll_api->watch_free(e->watch_ipv6);
+
+    if (e->fd_ipv6 >= 0)
+        close(e->fd_ipv6);
+
+    if (e->fd_ipv4 >= 0)
+        close(e->fd_ipv4);
+
+    avahi_free(e);
+}
+
+void avahi_wide_area_clear_cache(AvahiWideAreaLookupEngine *e) {
+    assert(e);
+
+    while (e->cache)
+        cache_entry_free(e->cache);
+
+    assert(e->cache_n_entries == 0);
+}
+
+void avahi_wide_area_set_servers(AvahiWideAreaLookupEngine *e, const AvahiAddress *a, unsigned n) {
+    assert(e);
+
+    if (a) {
+        for (e->n_dns_servers = 0; n > 0 && e->n_dns_servers < AVAHI_WIDE_AREA_SERVERS_MAX; a++, n--)
+            if ((a->proto == AVAHI_PROTO_INET && e->fd_ipv4 >= 0) || (a->proto == AVAHI_PROTO_INET6 && e->fd_ipv6 >= 0))
+                e->dns_servers[e->n_dns_servers++] = *a;
+    } else {
+        assert(n == 0);
+        e->n_dns_servers = 0;
+    }
+
+    e->current_dns_server = 0;
+
+    avahi_wide_area_clear_cache(e);
+}
+
+void avahi_wide_area_cache_dump(AvahiWideAreaLookupEngine *e, AvahiDumpCallback callback, void* userdata) {
+    AvahiWideAreaCacheEntry *c;
+
+    assert(e);
+    assert(callback);
+
+    callback(";; WIDE AREA CACHE ;;; ", userdata);
+
+    for (c = e->cache; c; c = c->cache_next) {
+        char *t = avahi_record_to_string(c->record);
+        callback(t, userdata);
+        avahi_free(t);
+    }
+}
+
+unsigned avahi_wide_area_scan_cache(AvahiWideAreaLookupEngine *e, AvahiKey *key, AvahiWideAreaLookupCallback callback, void *userdata) {
+    AvahiWideAreaCacheEntry *c;
+    AvahiKey *cname_key;
+    unsigned n = 0;
+
+    assert(e);
+    assert(key);
+    assert(callback);
+
+    for (c = avahi_hashmap_lookup(e->cache_by_key, key); c; c = c->by_key_next) {
+        callback(e, AVAHI_BROWSER_NEW, AVAHI_LOOKUP_RESULT_WIDE_AREA|AVAHI_LOOKUP_RESULT_CACHED, c->record, userdata);
+        n++;
+    }
+
+    if ((cname_key = avahi_key_new_cname(key))) {
+
+        for (c = avahi_hashmap_lookup(e->cache_by_key, cname_key); c; c = c->by_key_next) {
+            callback(e, AVAHI_BROWSER_NEW, AVAHI_LOOKUP_RESULT_WIDE_AREA|AVAHI_LOOKUP_RESULT_CACHED, c->record, userdata);
+            n++;
+        }
+
+        avahi_key_unref(cname_key);
+    }
+
+    return n;
+}
+
+int avahi_wide_area_has_servers(AvahiWideAreaLookupEngine *e) {
+    assert(e);
+
+    return e->n_dns_servers > 0;
+}
+
+
+
diff --git a/avahi-0.6.31/avahi-core/wide-area.h b/avahi-0.6.31/avahi-core/wide-area.h
new file mode 100644
index 0000000..b1dc570
--- /dev/null
+++ b/avahi-0.6.31/avahi-core/wide-area.h
@@ -0,0 +1,52 @@
+#ifndef foowideareahfoo
+#define foowideareahfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#include "lookup.h"
+#include "browse.h"
+
+typedef struct AvahiWideAreaLookupEngine AvahiWideAreaLookupEngine;
+typedef struct AvahiWideAreaLookup AvahiWideAreaLookup;
+
+typedef void (*AvahiWideAreaLookupCallback)(
+    AvahiWideAreaLookupEngine *e,
+    AvahiBrowserEvent event,
+    AvahiLookupResultFlags flags,
+    AvahiRecord *r,
+    void *userdata);
+
+AvahiWideAreaLookupEngine *avahi_wide_area_engine_new(AvahiServer *s);
+void avahi_wide_area_engine_free(AvahiWideAreaLookupEngine *e);
+
+unsigned avahi_wide_area_scan_cache(AvahiWideAreaLookupEngine *e, AvahiKey *key, AvahiWideAreaLookupCallback callback, void *userdata);
+void avahi_wide_area_cache_dump(AvahiWideAreaLookupEngine *e, AvahiDumpCallback callback, void* userdata);
+void avahi_wide_area_set_servers(AvahiWideAreaLookupEngine *e, const AvahiAddress *a, unsigned n);
+void avahi_wide_area_clear_cache(AvahiWideAreaLookupEngine *e);
+void avahi_wide_area_cleanup(AvahiWideAreaLookupEngine *e);
+int avahi_wide_area_has_servers(AvahiWideAreaLookupEngine *e);
+
+AvahiWideAreaLookup *avahi_wide_area_lookup_new(AvahiWideAreaLookupEngine *e, AvahiKey *key, AvahiWideAreaLookupCallback callback, void *userdata);
+void avahi_wide_area_lookup_free(AvahiWideAreaLookup *q);
+
+
+
+#endif
+
diff --git a/avahi-0.6.31/avahi-daemon/Makefile.am b/avahi-0.6.31/avahi-daemon/Makefile.am
new file mode 100644
index 0000000..b5d2bf4
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/Makefile.am
@@ -0,0 +1,176 @@
+# This file is part of avahi.
+#
+# avahi 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 of the
+# License, or (at your option) any later version.
+#
+# avahi 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 General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+AM_CFLAGS=-I$(top_srcdir)
+
+# This cool debug trap works on i386/gcc only
+AM_CFLAGS+='-DDEBUG_TRAP=__asm__("int $$3")'
+
+if HAVE_LIBDAEMON
+if HAVE_XML
+
+pkgsysconfdir=$(sysconfdir)/avahi
+servicedir=$(pkgsysconfdir)/services
+introspectiondir=$(datadir)/dbus-1/interfaces
+dbussystemservicesdir=$(datadir)/dbus-1/system-services
+
+AM_CFLAGS+= \
+	-DAVAHI_DAEMON_RUNTIME_DIR=\"$(avahi_runtime_dir)/avahi-daemon/\" \
+	-DAVAHI_SOCKET=\"$(avahi_socket)\" \
+	-DAVAHI_SERVICE_DIR=\"$(servicedir)\" \
+	-DAVAHI_CONFIG_FILE=\"$(pkgsysconfdir)/avahi-daemon.conf\" \
+	-DAVAHI_HOSTS_FILE=\"$(pkgsysconfdir)/hosts\" \
+	-DAVAHI_DBUS_INTROSPECTION_DIR=\"$(introspectiondir)\" \
+	-DAVAHI_CONFIG_DIR=\"$(pkgsysconfdir)\"
+
+sbin_PROGRAMS = \
+	avahi-daemon
+
+if ENABLE_TESTS
+noinst_PROGRAMS = \
+	ini-file-parser-test
+endif
+
+avahi_daemon_SOURCES = \
+	main.c main.h \
+	simple-protocol.c simple-protocol.h \
+	static-services.c static-services.h \
+	static-hosts.c static-hosts.h \
+	ini-file-parser.c ini-file-parser.h \
+	setproctitle.c setproctitle.h \
+	sd-daemon.h sd-daemon.c \
+	../avahi-client/check-nss.c
+
+avahi_daemon_CFLAGS = $(AM_CFLAGS) $(LIBDAEMON_CFLAGS) $(XML_CFLAGS)
+avahi_daemon_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la ../avahi-core/libavahi-core.la $(LIBDAEMON_LIBS) $(XML_LIBS)
+
+ini_file_parser_test_SOURCES = \
+	ini-file-parser.c ini-file-parser.h \
+	ini-file-parser-test.c
+
+ini_file_parser_test_CFLAGS = $(AM_CFLAGS)
+ini_file_parser_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la ../avahi-core/libavahi-core.la
+
+pkgsysconf_DATA = \
+	avahi-daemon.conf \
+	hosts
+
+dist_service_DATA = \
+	ssh.service \
+	sftp-ssh.service
+
+dist_pkgdata_DATA = \
+	avahi-service.dtd
+
+%.service: %.service.in
+	$(AM_V_GEN)sed -e 's,@sbindir\@,$(sbindir),g' $< > $@
+
+%.socket: %.socket.in
+	$(AM_V_GEN)sed -e 's,@sbindir\@,$(sbindir),g' \
+		-e 's,@avahi_runtime_dir\@,$(avahi_runtime_dir),g' $< > $@
+
+if HAVE_SYSTEMD
+systemdsystemunit_DATA = \
+	avahi-daemon.service \
+	avahi-daemon.socket
+
+dist_dbussystemservices_DATA = \
+	org.freedesktop.Avahi.service
+endif
+
+CLEANFILES = $(systemdsystemunit_DATA)
+
+if ENABLE_CHROOT
+
+avahi_daemon_SOURCES += \
+	chroot.c chroot.h \
+	caps.c caps.h
+
+avahi_daemon_LDADD += -lcap
+
+endif
+
+if HAVE_DLOPEN
+avahi_daemon_LDADD += -ldl
+endif
+
+if HAVE_DBUS
+
+dbusservicedir=$(DBUS_SYS_DIR)
+
+avahi_daemon_SOURCES += \
+	dbus-protocol.c dbus-protocol.h \
+	dbus-util.c dbus-util.h \
+	dbus-internal.h \
+	dbus-async-address-resolver.c \
+	dbus-async-host-name-resolver.c \
+	dbus-async-service-resolver.c \
+	dbus-domain-browser.c \
+	dbus-entry-group.c \
+	dbus-service-browser.c \
+	dbus-service-type-browser.c \
+	dbus-sync-address-resolver.c \
+	dbus-sync-host-name-resolver.c \
+	dbus-sync-service-resolver.c \
+	dbus-record-browser.c  \
+	../avahi-common/dbus.c ../avahi-common/dbus.h \
+	../avahi-common/dbus-watch-glue.c ../avahi-common/dbus-watch-glue.h
+
+avahi_daemon_LDADD += \
+	$(DBUS_LIBS)
+
+avahi_daemon_CFLAGS += $(DBUS_CFLAGS) -DDBUS_SYSTEM_BUS_DEFAULT_ADDRESS=\"$(DBUS_SYSTEM_BUS_DEFAULT_ADDRESS)\"
+
+dist_dbusservice_DATA = avahi-dbus.conf
+
+dist_introspection_DATA = \
+	org.freedesktop.Avahi.Server.xml \
+	org.freedesktop.Avahi.EntryGroup.xml \
+	org.freedesktop.Avahi.DomainBrowser.xml \
+	org.freedesktop.Avahi.ServiceTypeBrowser.xml \
+	org.freedesktop.Avahi.ServiceBrowser.xml \
+	org.freedesktop.Avahi.ServiceResolver.xml \
+	org.freedesktop.Avahi.AddressResolver.xml \
+	org.freedesktop.Avahi.HostNameResolver.xml \
+	org.freedesktop.Avahi.RecordBrowser.xml
+
+endif
+endif
+endif
+
+EXTRA_DIST = \
+	avahi-daemon.conf \
+	example.service \
+	hosts \
+	example.service \
+	introspect.dtd \
+	introspect.xsl \
+	avahi-daemon.service.in \
+	avahi-daemon.socket.in
+
+xmllint:
+	xmllint --noout --valid example.service
+	for F in $(introspection_DATA) ; do \
+		xmllint --noout --valid $$F ; \
+	done
+
+install-data-local:
+	test -z "$(localstatedir)/run" || $(mkdir_p) "$(DESTDIR)$(localstatedir)/run"
+
+update-systemd:
+	curl http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.c > sd-daemon.c
+	curl http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.h > sd-daemon.h
diff --git a/avahi-0.6.31/avahi-daemon/Makefile.in b/avahi-0.6.31/avahi-daemon/Makefile.in
new file mode 100644
index 0000000..ac5ebc3
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/Makefile.in
@@ -0,0 +1,1509 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# This file is part of avahi.
+#
+# avahi 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 of the
+# License, or (at your option) any later version.
+#
+# avahi 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 General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@am__append_1 = \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	-DAVAHI_DAEMON_RUNTIME_DIR=\"$(avahi_runtime_dir)/avahi-daemon/\" \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	-DAVAHI_SOCKET=\"$(avahi_socket)\" \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	-DAVAHI_SERVICE_DIR=\"$(servicedir)\" \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	-DAVAHI_CONFIG_FILE=\"$(pkgsysconfdir)/avahi-daemon.conf\" \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	-DAVAHI_HOSTS_FILE=\"$(pkgsysconfdir)/hosts\" \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	-DAVAHI_DBUS_INTROSPECTION_DIR=\"$(introspectiondir)\" \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	-DAVAHI_CONFIG_DIR=\"$(pkgsysconfdir)\"
+
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@sbin_PROGRAMS =  \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	avahi-daemon$(EXEEXT)
+@ENABLE_TESTS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@noinst_PROGRAMS = ini-file-parser-test$(EXEEXT)
+@ENABLE_CHROOT_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@am__append_2 = \
+@ENABLE_CHROOT_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	chroot.c chroot.h \
+@ENABLE_CHROOT_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	caps.c caps.h
+
+@ENABLE_CHROOT_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@am__append_3 = -lcap
+@HAVE_DLOPEN_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@am__append_4 = -ldl
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@am__append_5 = \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	dbus-protocol.c dbus-protocol.h \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	dbus-util.c dbus-util.h \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	dbus-internal.h \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	dbus-async-address-resolver.c \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	dbus-async-host-name-resolver.c \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	dbus-async-service-resolver.c \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	dbus-domain-browser.c \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	dbus-entry-group.c \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	dbus-service-browser.c \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	dbus-service-type-browser.c \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	dbus-sync-address-resolver.c \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	dbus-sync-host-name-resolver.c \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	dbus-sync-service-resolver.c \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	dbus-record-browser.c  \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	../avahi-common/dbus.c ../avahi-common/dbus.h \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	../avahi-common/dbus-watch-glue.c ../avahi-common/dbus-watch-glue.h
+
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@am__append_6 = \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	$(DBUS_LIBS)
+
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@am__append_7 = $(DBUS_CFLAGS) -DDBUS_SYSTEM_BUS_DEFAULT_ADDRESS=\"$(DBUS_SYSTEM_BUS_DEFAULT_ADDRESS)\"
+subdir = avahi-daemon
+DIST_COMMON = $(am__dist_dbusservice_DATA_DIST) \
+	$(am__dist_dbussystemservices_DATA_DIST) \
+	$(am__dist_introspection_DATA_DIST) \
+	$(am__dist_pkgdata_DATA_DIST) $(am__dist_service_DATA_DIST) \
+	$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(srcdir)/avahi-dbus.conf.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/common/acx_pthread.m4 \
+	$(top_srcdir)/common/gcc_stack_protect.m4 \
+	$(top_srcdir)/common/gcc_visibility.m4 \
+	$(top_srcdir)/common/intltool.m4 \
+	$(top_srcdir)/common/introspection.m4 \
+	$(top_srcdir)/common/libtool.m4 \
+	$(top_srcdir)/common/ltoptions.m4 \
+	$(top_srcdir)/common/ltsugar.m4 \
+	$(top_srcdir)/common/ltversion.m4 \
+	$(top_srcdir)/common/lt~obsolete.m4 \
+	$(top_srcdir)/common/nls.m4 $(top_srcdir)/common/python.m4 \
+	$(top_srcdir)/acinclude.m4 $(top_srcdir)/common/doxygen.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = avahi-dbus.conf
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(dbusservicedir)" \
+	"$(DESTDIR)$(dbussystemservicesdir)" \
+	"$(DESTDIR)$(introspectiondir)" "$(DESTDIR)$(pkgdatadir)" \
+	"$(DESTDIR)$(servicedir)" "$(DESTDIR)$(pkgsysconfdir)" \
+	"$(DESTDIR)$(systemdsystemunitdir)"
+PROGRAMS = $(noinst_PROGRAMS) $(sbin_PROGRAMS)
+am__avahi_daemon_SOURCES_DIST = main.c main.h simple-protocol.c \
+	simple-protocol.h static-services.c static-services.h \
+	static-hosts.c static-hosts.h ini-file-parser.c \
+	ini-file-parser.h setproctitle.c setproctitle.h sd-daemon.h \
+	sd-daemon.c ../avahi-client/check-nss.c chroot.c chroot.h \
+	caps.c caps.h dbus-protocol.c dbus-protocol.h dbus-util.c \
+	dbus-util.h dbus-internal.h dbus-async-address-resolver.c \
+	dbus-async-host-name-resolver.c dbus-async-service-resolver.c \
+	dbus-domain-browser.c dbus-entry-group.c \
+	dbus-service-browser.c dbus-service-type-browser.c \
+	dbus-sync-address-resolver.c dbus-sync-host-name-resolver.c \
+	dbus-sync-service-resolver.c dbus-record-browser.c \
+	../avahi-common/dbus.c ../avahi-common/dbus.h \
+	../avahi-common/dbus-watch-glue.c \
+	../avahi-common/dbus-watch-glue.h
+@ENABLE_CHROOT_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@am__objects_1 = avahi_daemon-chroot.$(OBJEXT) \
+@ENABLE_CHROOT_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	avahi_daemon-caps.$(OBJEXT)
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@am__objects_2 = avahi_daemon-dbus-protocol.$(OBJEXT) \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	avahi_daemon-dbus-util.$(OBJEXT) \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	avahi_daemon-dbus-async-address-resolver.$(OBJEXT) \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	avahi_daemon-dbus-async-host-name-resolver.$(OBJEXT) \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	avahi_daemon-dbus-async-service-resolver.$(OBJEXT) \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	avahi_daemon-dbus-domain-browser.$(OBJEXT) \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	avahi_daemon-dbus-entry-group.$(OBJEXT) \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	avahi_daemon-dbus-service-browser.$(OBJEXT) \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	avahi_daemon-dbus-service-type-browser.$(OBJEXT) \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	avahi_daemon-dbus-sync-address-resolver.$(OBJEXT) \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	avahi_daemon-dbus-sync-host-name-resolver.$(OBJEXT) \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	avahi_daemon-dbus-sync-service-resolver.$(OBJEXT) \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	avahi_daemon-dbus-record-browser.$(OBJEXT) \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	avahi_daemon-dbus.$(OBJEXT) \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	avahi_daemon-dbus-watch-glue.$(OBJEXT)
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@am_avahi_daemon_OBJECTS = avahi_daemon-main.$(OBJEXT) \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	avahi_daemon-simple-protocol.$(OBJEXT) \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	avahi_daemon-static-services.$(OBJEXT) \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	avahi_daemon-static-hosts.$(OBJEXT) \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	avahi_daemon-ini-file-parser.$(OBJEXT) \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	avahi_daemon-setproctitle.$(OBJEXT) \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	avahi_daemon-sd-daemon.$(OBJEXT) \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	avahi_daemon-check-nss.$(OBJEXT) \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	$(am__objects_1) \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	$(am__objects_2)
+avahi_daemon_OBJECTS = $(am_avahi_daemon_OBJECTS)
+am__DEPENDENCIES_1 =
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@avahi_daemon_DEPENDENCIES = ../avahi-common/libavahi-common.la \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	../avahi-core/libavahi-core.la \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	$(am__DEPENDENCIES_1) \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	$(am__DEPENDENCIES_1) \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	$(am__DEPENDENCIES_1) \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	$(am__DEPENDENCIES_1) \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	$(am__DEPENDENCIES_2)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+avahi_daemon_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(avahi_daemon_CFLAGS) \
+	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am__ini_file_parser_test_SOURCES_DIST = ini-file-parser.c \
+	ini-file-parser.h ini-file-parser-test.c
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@am_ini_file_parser_test_OBJECTS = ini_file_parser_test-ini-file-parser.$(OBJEXT) \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	ini_file_parser_test-ini-file-parser-test.$(OBJEXT)
+ini_file_parser_test_OBJECTS = $(am_ini_file_parser_test_OBJECTS)
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@ini_file_parser_test_DEPENDENCIES = ../avahi-common/libavahi-common.la \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	../avahi-core/libavahi-core.la
+ini_file_parser_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(ini_file_parser_test_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC    " $@;
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(avahi_daemon_SOURCES) $(ini_file_parser_test_SOURCES)
+DIST_SOURCES = $(am__avahi_daemon_SOURCES_DIST) \
+	$(am__ini_file_parser_test_SOURCES_DIST)
+am__dist_dbusservice_DATA_DIST = avahi-dbus.conf
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+am__dist_dbussystemservices_DATA_DIST = org.freedesktop.Avahi.service
+am__dist_introspection_DATA_DIST = org.freedesktop.Avahi.Server.xml \
+	org.freedesktop.Avahi.EntryGroup.xml \
+	org.freedesktop.Avahi.DomainBrowser.xml \
+	org.freedesktop.Avahi.ServiceTypeBrowser.xml \
+	org.freedesktop.Avahi.ServiceBrowser.xml \
+	org.freedesktop.Avahi.ServiceResolver.xml \
+	org.freedesktop.Avahi.AddressResolver.xml \
+	org.freedesktop.Avahi.HostNameResolver.xml \
+	org.freedesktop.Avahi.RecordBrowser.xml
+am__dist_pkgdata_DATA_DIST = avahi-service.dtd
+am__dist_service_DATA_DIST = ssh.service sftp-ssh.service
+DATA = $(dist_dbusservice_DATA) $(dist_dbussystemservices_DATA) \
+	$(dist_introspection_DATA) $(dist_pkgdata_DATA) \
+	$(dist_service_DATA) $(pkgsysconf_DATA) \
+	$(systemdsystemunit_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AVAHI_AUTOIPD_GROUP = @AVAHI_AUTOIPD_GROUP@
+AVAHI_AUTOIPD_USER = @AVAHI_AUTOIPD_USER@
+AVAHI_GROUP = @AVAHI_GROUP@
+AVAHI_PRIV_ACCESS_GROUP = @AVAHI_PRIV_ACCESS_GROUP@
+AVAHI_USER = @AVAHI_USER@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
+DBUS_SYSTEM_BUS_DEFAULT_ADDRESS = @DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@
+DBUS_SYS_DIR = @DBUS_SYS_DIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+DX_CONFIG = @DX_CONFIG@
+DX_DOCDIR = @DX_DOCDIR@
+DX_DOT = @DX_DOT@
+DX_DOXYGEN = @DX_DOXYGEN@
+DX_DVIPS = @DX_DVIPS@
+DX_EGREP = @DX_EGREP@
+DX_ENV = @DX_ENV@
+DX_FLAG_chi = @DX_FLAG_chi@
+DX_FLAG_chm = @DX_FLAG_chm@
+DX_FLAG_doc = @DX_FLAG_doc@
+DX_FLAG_dot = @DX_FLAG_dot@
+DX_FLAG_html = @DX_FLAG_html@
+DX_FLAG_man = @DX_FLAG_man@
+DX_FLAG_pdf = @DX_FLAG_pdf@
+DX_FLAG_ps = @DX_FLAG_ps@
+DX_FLAG_rtf = @DX_FLAG_rtf@
+DX_FLAG_xml = @DX_FLAG_xml@
+DX_HHC = @DX_HHC@
+DX_LATEX = @DX_LATEX@
+DX_MAKEINDEX = @DX_MAKEINDEX@
+DX_PDFLATEX = @DX_PDFLATEX@
+DX_PERL = @DX_PERL@
+DX_PROJECT = @DX_PROJECT@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GACUTIL = @GACUTIL@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB20_CFLAGS = @GLIB20_CFLAGS@
+GLIB20_LIBS = @GLIB20_LIBS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GOBJECT_CFLAGS = @GOBJECT_CFLAGS@
+GOBJECT_LIBS = @GOBJECT_LIBS@
+GREP = @GREP@
+GTK20_CFLAGS = @GTK20_CFLAGS@
+GTK20_LIBS = @GTK20_LIBS@
+GTK30_CFLAGS = @GTK30_CFLAGS@
+GTK30_LIBS = @GTK30_LIBS@
+HOWL_COMPAT_VERSION = @HOWL_COMPAT_VERSION@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
+INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
+INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
+INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
+INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
+INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
+INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBAVAHI_CLIENT_VERSION_INFO = @LIBAVAHI_CLIENT_VERSION_INFO@
+LIBAVAHI_COMMON_VERSION_INFO = @LIBAVAHI_COMMON_VERSION_INFO@
+LIBAVAHI_COMPAT_HOWL_VERSION_INFO = @LIBAVAHI_COMPAT_HOWL_VERSION_INFO@
+LIBAVAHI_COMPAT_LIBDNS_SD_VERSION_INFO = @LIBAVAHI_COMPAT_LIBDNS_SD_VERSION_INFO@
+LIBAVAHI_CORE_VERSION_INFO = @LIBAVAHI_CORE_VERSION_INFO@
+LIBAVAHI_GLIB_VERSION_INFO = @LIBAVAHI_GLIB_VERSION_INFO@
+LIBAVAHI_GOBJECT_VERSION_INFO = @LIBAVAHI_GOBJECT_VERSION_INFO@
+LIBAVAHI_QT3_VERSION_INFO = @LIBAVAHI_QT3_VERSION_INFO@
+LIBAVAHI_QT4_VERSION_INFO = @LIBAVAHI_QT4_VERSION_INFO@
+LIBAVAHI_UI_VERSION_INFO = @LIBAVAHI_UI_VERSION_INFO@
+LIBDAEMON_CFLAGS = @LIBDAEMON_CFLAGS@
+LIBDAEMON_LIBS = @LIBDAEMON_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MCS = @MCS@
+MDASSEMBLER = @MDASSEMBLER@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MOC_QT3 = @MOC_QT3@
+MOC_QT4 = @MOC_QT4@
+MONODOCER = @MONODOCER@
+MONODOC_CFLAGS = @MONODOC_CFLAGS@
+MONODOC_DIR = @MONODOC_DIR@
+MONODOC_LIBS = @MONODOC_LIBS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+QT3_CFLAGS = @QT3_CFLAGS@
+QT3_LIBS = @QT3_LIBS@
+QT4_CFLAGS = @QT4_CFLAGS@
+QT4_LIBS = @QT4_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STOW = @STOW@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+VISIBILITY_HIDDEN_CFLAGS = @VISIBILITY_HIDDEN_CFLAGS@
+XGETTEXT = @XGETTEXT@
+XML_CFLAGS = @XML_CFLAGS@
+XML_LIBS = @XML_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+avahi_runtime_dir = @avahi_runtime_dir@
+avahi_socket = @avahi_socket@
+avahilocaledir = @avahilocaledir@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+have_pkg_config = @have_pkg_config@
+have_xmltoman = @have_xmltoman@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+interfacesdir = @interfacesdir@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+systemdsystemunitdir = @systemdsystemunitdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# This cool debug trap works on i386/gcc only
+AM_CFLAGS = -I$(top_srcdir) '-DDEBUG_TRAP=__asm__("int $$3")' \
+	$(am__append_1)
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@pkgsysconfdir = $(sysconfdir)/avahi
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@servicedir = $(pkgsysconfdir)/services
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@introspectiondir = $(datadir)/dbus-1/interfaces
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@dbussystemservicesdir = $(datadir)/dbus-1/system-services
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@avahi_daemon_SOURCES = main.c \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	main.h simple-protocol.c \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	simple-protocol.h \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	static-services.c \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	static-services.h \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	static-hosts.c \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	static-hosts.h \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	ini-file-parser.c \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	ini-file-parser.h \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	setproctitle.c \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	setproctitle.h sd-daemon.h \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	sd-daemon.c \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	../avahi-client/check-nss.c \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	$(am__append_2) \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	$(am__append_5)
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@avahi_daemon_CFLAGS =  \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	$(AM_CFLAGS) \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	$(LIBDAEMON_CFLAGS) \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	$(XML_CFLAGS) \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	$(am__append_7)
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@avahi_daemon_LDADD = $(AM_LDADD) \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	../avahi-common/libavahi-common.la \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	../avahi-core/libavahi-core.la \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	$(LIBDAEMON_LIBS) \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	$(XML_LIBS) \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	$(am__append_3) \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	$(am__append_4) \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	$(am__append_6)
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@ini_file_parser_test_SOURCES = \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	ini-file-parser.c ini-file-parser.h \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	ini-file-parser-test.c
+
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@ini_file_parser_test_CFLAGS = $(AM_CFLAGS)
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@ini_file_parser_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la ../avahi-core/libavahi-core.la
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@pkgsysconf_DATA = \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	avahi-daemon.conf \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	hosts
+
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@dist_service_DATA = \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	ssh.service \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	sftp-ssh.service
+
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@dist_pkgdata_DATA = \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	avahi-service.dtd
+
+@HAVE_LIBDAEMON_TRUE@@HAVE_SYSTEMD_TRUE@@HAVE_XML_TRUE@systemdsystemunit_DATA = \
+@HAVE_LIBDAEMON_TRUE@@HAVE_SYSTEMD_TRUE@@HAVE_XML_TRUE@	avahi-daemon.service \
+@HAVE_LIBDAEMON_TRUE@@HAVE_SYSTEMD_TRUE@@HAVE_XML_TRUE@	avahi-daemon.socket
+
+@HAVE_LIBDAEMON_TRUE@@HAVE_SYSTEMD_TRUE@@HAVE_XML_TRUE@dist_dbussystemservices_DATA = \
+@HAVE_LIBDAEMON_TRUE@@HAVE_SYSTEMD_TRUE@@HAVE_XML_TRUE@	org.freedesktop.Avahi.service
+
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@CLEANFILES = $(systemdsystemunit_DATA)
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@dbusservicedir = $(DBUS_SYS_DIR)
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@dist_dbusservice_DATA = avahi-dbus.conf
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@dist_introspection_DATA = \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	org.freedesktop.Avahi.Server.xml \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	org.freedesktop.Avahi.EntryGroup.xml \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	org.freedesktop.Avahi.DomainBrowser.xml \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	org.freedesktop.Avahi.ServiceTypeBrowser.xml \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	org.freedesktop.Avahi.ServiceBrowser.xml \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	org.freedesktop.Avahi.ServiceResolver.xml \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	org.freedesktop.Avahi.AddressResolver.xml \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	org.freedesktop.Avahi.HostNameResolver.xml \
+@HAVE_DBUS_TRUE@@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	org.freedesktop.Avahi.RecordBrowser.xml
+
+EXTRA_DIST = \
+	avahi-daemon.conf \
+	example.service \
+	hosts \
+	example.service \
+	introspect.dtd \
+	introspect.xsl \
+	avahi-daemon.service.in \
+	avahi-daemon.socket.in
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign avahi-daemon/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign avahi-daemon/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+avahi-dbus.conf: $(top_builddir)/config.status $(srcdir)/avahi-dbus.conf.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+
+clean-noinstPROGRAMS:
+	@list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+install-sbinPROGRAMS: $(sbin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
+	@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-sbinPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sbindir)" && rm -f $$files
+
+clean-sbinPROGRAMS:
+	@list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+avahi-daemon$(EXEEXT): $(avahi_daemon_OBJECTS) $(avahi_daemon_DEPENDENCIES) $(EXTRA_avahi_daemon_DEPENDENCIES) 
+	@rm -f avahi-daemon$(EXEEXT)
+	$(AM_V_CCLD)$(avahi_daemon_LINK) $(avahi_daemon_OBJECTS) $(avahi_daemon_LDADD) $(LIBS)
+ini-file-parser-test$(EXEEXT): $(ini_file_parser_test_OBJECTS) $(ini_file_parser_test_DEPENDENCIES) $(EXTRA_ini_file_parser_test_DEPENDENCIES) 
+	@rm -f ini-file-parser-test$(EXEEXT)
+	$(AM_V_CCLD)$(ini_file_parser_test_LINK) $(ini_file_parser_test_OBJECTS) $(ini_file_parser_test_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avahi_daemon-caps.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avahi_daemon-check-nss.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avahi_daemon-chroot.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avahi_daemon-dbus-async-address-resolver.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avahi_daemon-dbus-async-host-name-resolver.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avahi_daemon-dbus-async-service-resolver.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avahi_daemon-dbus-domain-browser.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avahi_daemon-dbus-entry-group.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avahi_daemon-dbus-protocol.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avahi_daemon-dbus-record-browser.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avahi_daemon-dbus-service-browser.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avahi_daemon-dbus-service-type-browser.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avahi_daemon-dbus-sync-address-resolver.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avahi_daemon-dbus-sync-host-name-resolver.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avahi_daemon-dbus-sync-service-resolver.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avahi_daemon-dbus-util.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avahi_daemon-dbus-watch-glue.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avahi_daemon-dbus.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avahi_daemon-ini-file-parser.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avahi_daemon-main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avahi_daemon-sd-daemon.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avahi_daemon-setproctitle.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avahi_daemon-simple-protocol.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avahi_daemon-static-hosts.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avahi_daemon-static-services.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ini_file_parser_test-ini-file-parser-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ini_file_parser_test-ini-file-parser.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+avahi_daemon-main.o: main.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-main.o -MD -MP -MF $(DEPDIR)/avahi_daemon-main.Tpo -c -o avahi_daemon-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-main.Tpo $(DEPDIR)/avahi_daemon-main.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='main.c' object='avahi_daemon-main.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c
+
+avahi_daemon-main.obj: main.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-main.obj -MD -MP -MF $(DEPDIR)/avahi_daemon-main.Tpo -c -o avahi_daemon-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-main.Tpo $(DEPDIR)/avahi_daemon-main.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='main.c' object='avahi_daemon-main.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi`
+
+avahi_daemon-simple-protocol.o: simple-protocol.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-simple-protocol.o -MD -MP -MF $(DEPDIR)/avahi_daemon-simple-protocol.Tpo -c -o avahi_daemon-simple-protocol.o `test -f 'simple-protocol.c' || echo '$(srcdir)/'`simple-protocol.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-simple-protocol.Tpo $(DEPDIR)/avahi_daemon-simple-protocol.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='simple-protocol.c' object='avahi_daemon-simple-protocol.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-simple-protocol.o `test -f 'simple-protocol.c' || echo '$(srcdir)/'`simple-protocol.c
+
+avahi_daemon-simple-protocol.obj: simple-protocol.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-simple-protocol.obj -MD -MP -MF $(DEPDIR)/avahi_daemon-simple-protocol.Tpo -c -o avahi_daemon-simple-protocol.obj `if test -f 'simple-protocol.c'; then $(CYGPATH_W) 'simple-protocol.c'; else $(CYGPATH_W) '$(srcdir)/simple-protocol.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-simple-protocol.Tpo $(DEPDIR)/avahi_daemon-simple-protocol.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='simple-protocol.c' object='avahi_daemon-simple-protocol.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-simple-protocol.obj `if test -f 'simple-protocol.c'; then $(CYGPATH_W) 'simple-protocol.c'; else $(CYGPATH_W) '$(srcdir)/simple-protocol.c'; fi`
+
+avahi_daemon-static-services.o: static-services.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-static-services.o -MD -MP -MF $(DEPDIR)/avahi_daemon-static-services.Tpo -c -o avahi_daemon-static-services.o `test -f 'static-services.c' || echo '$(srcdir)/'`static-services.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-static-services.Tpo $(DEPDIR)/avahi_daemon-static-services.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='static-services.c' object='avahi_daemon-static-services.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-static-services.o `test -f 'static-services.c' || echo '$(srcdir)/'`static-services.c
+
+avahi_daemon-static-services.obj: static-services.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-static-services.obj -MD -MP -MF $(DEPDIR)/avahi_daemon-static-services.Tpo -c -o avahi_daemon-static-services.obj `if test -f 'static-services.c'; then $(CYGPATH_W) 'static-services.c'; else $(CYGPATH_W) '$(srcdir)/static-services.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-static-services.Tpo $(DEPDIR)/avahi_daemon-static-services.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='static-services.c' object='avahi_daemon-static-services.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-static-services.obj `if test -f 'static-services.c'; then $(CYGPATH_W) 'static-services.c'; else $(CYGPATH_W) '$(srcdir)/static-services.c'; fi`
+
+avahi_daemon-static-hosts.o: static-hosts.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-static-hosts.o -MD -MP -MF $(DEPDIR)/avahi_daemon-static-hosts.Tpo -c -o avahi_daemon-static-hosts.o `test -f 'static-hosts.c' || echo '$(srcdir)/'`static-hosts.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-static-hosts.Tpo $(DEPDIR)/avahi_daemon-static-hosts.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='static-hosts.c' object='avahi_daemon-static-hosts.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-static-hosts.o `test -f 'static-hosts.c' || echo '$(srcdir)/'`static-hosts.c
+
+avahi_daemon-static-hosts.obj: static-hosts.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-static-hosts.obj -MD -MP -MF $(DEPDIR)/avahi_daemon-static-hosts.Tpo -c -o avahi_daemon-static-hosts.obj `if test -f 'static-hosts.c'; then $(CYGPATH_W) 'static-hosts.c'; else $(CYGPATH_W) '$(srcdir)/static-hosts.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-static-hosts.Tpo $(DEPDIR)/avahi_daemon-static-hosts.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='static-hosts.c' object='avahi_daemon-static-hosts.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-static-hosts.obj `if test -f 'static-hosts.c'; then $(CYGPATH_W) 'static-hosts.c'; else $(CYGPATH_W) '$(srcdir)/static-hosts.c'; fi`
+
+avahi_daemon-ini-file-parser.o: ini-file-parser.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-ini-file-parser.o -MD -MP -MF $(DEPDIR)/avahi_daemon-ini-file-parser.Tpo -c -o avahi_daemon-ini-file-parser.o `test -f 'ini-file-parser.c' || echo '$(srcdir)/'`ini-file-parser.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-ini-file-parser.Tpo $(DEPDIR)/avahi_daemon-ini-file-parser.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='ini-file-parser.c' object='avahi_daemon-ini-file-parser.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-ini-file-parser.o `test -f 'ini-file-parser.c' || echo '$(srcdir)/'`ini-file-parser.c
+
+avahi_daemon-ini-file-parser.obj: ini-file-parser.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-ini-file-parser.obj -MD -MP -MF $(DEPDIR)/avahi_daemon-ini-file-parser.Tpo -c -o avahi_daemon-ini-file-parser.obj `if test -f 'ini-file-parser.c'; then $(CYGPATH_W) 'ini-file-parser.c'; else $(CYGPATH_W) '$(srcdir)/ini-file-parser.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-ini-file-parser.Tpo $(DEPDIR)/avahi_daemon-ini-file-parser.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='ini-file-parser.c' object='avahi_daemon-ini-file-parser.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-ini-file-parser.obj `if test -f 'ini-file-parser.c'; then $(CYGPATH_W) 'ini-file-parser.c'; else $(CYGPATH_W) '$(srcdir)/ini-file-parser.c'; fi`
+
+avahi_daemon-setproctitle.o: setproctitle.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-setproctitle.o -MD -MP -MF $(DEPDIR)/avahi_daemon-setproctitle.Tpo -c -o avahi_daemon-setproctitle.o `test -f 'setproctitle.c' || echo '$(srcdir)/'`setproctitle.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-setproctitle.Tpo $(DEPDIR)/avahi_daemon-setproctitle.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='setproctitle.c' object='avahi_daemon-setproctitle.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-setproctitle.o `test -f 'setproctitle.c' || echo '$(srcdir)/'`setproctitle.c
+
+avahi_daemon-setproctitle.obj: setproctitle.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-setproctitle.obj -MD -MP -MF $(DEPDIR)/avahi_daemon-setproctitle.Tpo -c -o avahi_daemon-setproctitle.obj `if test -f 'setproctitle.c'; then $(CYGPATH_W) 'setproctitle.c'; else $(CYGPATH_W) '$(srcdir)/setproctitle.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-setproctitle.Tpo $(DEPDIR)/avahi_daemon-setproctitle.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='setproctitle.c' object='avahi_daemon-setproctitle.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-setproctitle.obj `if test -f 'setproctitle.c'; then $(CYGPATH_W) 'setproctitle.c'; else $(CYGPATH_W) '$(srcdir)/setproctitle.c'; fi`
+
+avahi_daemon-sd-daemon.o: sd-daemon.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-sd-daemon.o -MD -MP -MF $(DEPDIR)/avahi_daemon-sd-daemon.Tpo -c -o avahi_daemon-sd-daemon.o `test -f 'sd-daemon.c' || echo '$(srcdir)/'`sd-daemon.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-sd-daemon.Tpo $(DEPDIR)/avahi_daemon-sd-daemon.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='sd-daemon.c' object='avahi_daemon-sd-daemon.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-sd-daemon.o `test -f 'sd-daemon.c' || echo '$(srcdir)/'`sd-daemon.c
+
+avahi_daemon-sd-daemon.obj: sd-daemon.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-sd-daemon.obj -MD -MP -MF $(DEPDIR)/avahi_daemon-sd-daemon.Tpo -c -o avahi_daemon-sd-daemon.obj `if test -f 'sd-daemon.c'; then $(CYGPATH_W) 'sd-daemon.c'; else $(CYGPATH_W) '$(srcdir)/sd-daemon.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-sd-daemon.Tpo $(DEPDIR)/avahi_daemon-sd-daemon.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='sd-daemon.c' object='avahi_daemon-sd-daemon.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-sd-daemon.obj `if test -f 'sd-daemon.c'; then $(CYGPATH_W) 'sd-daemon.c'; else $(CYGPATH_W) '$(srcdir)/sd-daemon.c'; fi`
+
+avahi_daemon-check-nss.o: ../avahi-client/check-nss.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-check-nss.o -MD -MP -MF $(DEPDIR)/avahi_daemon-check-nss.Tpo -c -o avahi_daemon-check-nss.o `test -f '../avahi-client/check-nss.c' || echo '$(srcdir)/'`../avahi-client/check-nss.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-check-nss.Tpo $(DEPDIR)/avahi_daemon-check-nss.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../avahi-client/check-nss.c' object='avahi_daemon-check-nss.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-check-nss.o `test -f '../avahi-client/check-nss.c' || echo '$(srcdir)/'`../avahi-client/check-nss.c
+
+avahi_daemon-check-nss.obj: ../avahi-client/check-nss.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-check-nss.obj -MD -MP -MF $(DEPDIR)/avahi_daemon-check-nss.Tpo -c -o avahi_daemon-check-nss.obj `if test -f '../avahi-client/check-nss.c'; then $(CYGPATH_W) '../avahi-client/check-nss.c'; else $(CYGPATH_W) '$(srcdir)/../avahi-client/check-nss.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-check-nss.Tpo $(DEPDIR)/avahi_daemon-check-nss.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../avahi-client/check-nss.c' object='avahi_daemon-check-nss.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-check-nss.obj `if test -f '../avahi-client/check-nss.c'; then $(CYGPATH_W) '../avahi-client/check-nss.c'; else $(CYGPATH_W) '$(srcdir)/../avahi-client/check-nss.c'; fi`
+
+avahi_daemon-chroot.o: chroot.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-chroot.o -MD -MP -MF $(DEPDIR)/avahi_daemon-chroot.Tpo -c -o avahi_daemon-chroot.o `test -f 'chroot.c' || echo '$(srcdir)/'`chroot.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-chroot.Tpo $(DEPDIR)/avahi_daemon-chroot.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='chroot.c' object='avahi_daemon-chroot.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-chroot.o `test -f 'chroot.c' || echo '$(srcdir)/'`chroot.c
+
+avahi_daemon-chroot.obj: chroot.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-chroot.obj -MD -MP -MF $(DEPDIR)/avahi_daemon-chroot.Tpo -c -o avahi_daemon-chroot.obj `if test -f 'chroot.c'; then $(CYGPATH_W) 'chroot.c'; else $(CYGPATH_W) '$(srcdir)/chroot.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-chroot.Tpo $(DEPDIR)/avahi_daemon-chroot.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='chroot.c' object='avahi_daemon-chroot.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-chroot.obj `if test -f 'chroot.c'; then $(CYGPATH_W) 'chroot.c'; else $(CYGPATH_W) '$(srcdir)/chroot.c'; fi`
+
+avahi_daemon-caps.o: caps.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-caps.o -MD -MP -MF $(DEPDIR)/avahi_daemon-caps.Tpo -c -o avahi_daemon-caps.o `test -f 'caps.c' || echo '$(srcdir)/'`caps.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-caps.Tpo $(DEPDIR)/avahi_daemon-caps.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='caps.c' object='avahi_daemon-caps.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-caps.o `test -f 'caps.c' || echo '$(srcdir)/'`caps.c
+
+avahi_daemon-caps.obj: caps.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-caps.obj -MD -MP -MF $(DEPDIR)/avahi_daemon-caps.Tpo -c -o avahi_daemon-caps.obj `if test -f 'caps.c'; then $(CYGPATH_W) 'caps.c'; else $(CYGPATH_W) '$(srcdir)/caps.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-caps.Tpo $(DEPDIR)/avahi_daemon-caps.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='caps.c' object='avahi_daemon-caps.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-caps.obj `if test -f 'caps.c'; then $(CYGPATH_W) 'caps.c'; else $(CYGPATH_W) '$(srcdir)/caps.c'; fi`
+
+avahi_daemon-dbus-protocol.o: dbus-protocol.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-dbus-protocol.o -MD -MP -MF $(DEPDIR)/avahi_daemon-dbus-protocol.Tpo -c -o avahi_daemon-dbus-protocol.o `test -f 'dbus-protocol.c' || echo '$(srcdir)/'`dbus-protocol.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-dbus-protocol.Tpo $(DEPDIR)/avahi_daemon-dbus-protocol.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dbus-protocol.c' object='avahi_daemon-dbus-protocol.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-dbus-protocol.o `test -f 'dbus-protocol.c' || echo '$(srcdir)/'`dbus-protocol.c
+
+avahi_daemon-dbus-protocol.obj: dbus-protocol.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-dbus-protocol.obj -MD -MP -MF $(DEPDIR)/avahi_daemon-dbus-protocol.Tpo -c -o avahi_daemon-dbus-protocol.obj `if test -f 'dbus-protocol.c'; then $(CYGPATH_W) 'dbus-protocol.c'; else $(CYGPATH_W) '$(srcdir)/dbus-protocol.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-dbus-protocol.Tpo $(DEPDIR)/avahi_daemon-dbus-protocol.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dbus-protocol.c' object='avahi_daemon-dbus-protocol.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-dbus-protocol.obj `if test -f 'dbus-protocol.c'; then $(CYGPATH_W) 'dbus-protocol.c'; else $(CYGPATH_W) '$(srcdir)/dbus-protocol.c'; fi`
+
+avahi_daemon-dbus-util.o: dbus-util.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-dbus-util.o -MD -MP -MF $(DEPDIR)/avahi_daemon-dbus-util.Tpo -c -o avahi_daemon-dbus-util.o `test -f 'dbus-util.c' || echo '$(srcdir)/'`dbus-util.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-dbus-util.Tpo $(DEPDIR)/avahi_daemon-dbus-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dbus-util.c' object='avahi_daemon-dbus-util.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-dbus-util.o `test -f 'dbus-util.c' || echo '$(srcdir)/'`dbus-util.c
+
+avahi_daemon-dbus-util.obj: dbus-util.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-dbus-util.obj -MD -MP -MF $(DEPDIR)/avahi_daemon-dbus-util.Tpo -c -o avahi_daemon-dbus-util.obj `if test -f 'dbus-util.c'; then $(CYGPATH_W) 'dbus-util.c'; else $(CYGPATH_W) '$(srcdir)/dbus-util.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-dbus-util.Tpo $(DEPDIR)/avahi_daemon-dbus-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dbus-util.c' object='avahi_daemon-dbus-util.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-dbus-util.obj `if test -f 'dbus-util.c'; then $(CYGPATH_W) 'dbus-util.c'; else $(CYGPATH_W) '$(srcdir)/dbus-util.c'; fi`
+
+avahi_daemon-dbus-async-address-resolver.o: dbus-async-address-resolver.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-dbus-async-address-resolver.o -MD -MP -MF $(DEPDIR)/avahi_daemon-dbus-async-address-resolver.Tpo -c -o avahi_daemon-dbus-async-address-resolver.o `test -f 'dbus-async-address-resolver.c' || echo '$(srcdir)/'`dbus-async-address-resolver.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-dbus-async-address-resolver.Tpo $(DEPDIR)/avahi_daemon-dbus-async-address-resolver.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dbus-async-address-resolver.c' object='avahi_daemon-dbus-async-address-resolver.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-dbus-async-address-resolver.o `test -f 'dbus-async-address-resolver.c' || echo '$(srcdir)/'`dbus-async-address-resolver.c
+
+avahi_daemon-dbus-async-address-resolver.obj: dbus-async-address-resolver.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-dbus-async-address-resolver.obj -MD -MP -MF $(DEPDIR)/avahi_daemon-dbus-async-address-resolver.Tpo -c -o avahi_daemon-dbus-async-address-resolver.obj `if test -f 'dbus-async-address-resolver.c'; then $(CYGPATH_W) 'dbus-async-address-resolver.c'; else $(CYGPATH_W) '$(srcdir)/dbus-async-address-resolver.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-dbus-async-address-resolver.Tpo $(DEPDIR)/avahi_daemon-dbus-async-address-resolver.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dbus-async-address-resolver.c' object='avahi_daemon-dbus-async-address-resolver.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-dbus-async-address-resolver.obj `if test -f 'dbus-async-address-resolver.c'; then $(CYGPATH_W) 'dbus-async-address-resolver.c'; else $(CYGPATH_W) '$(srcdir)/dbus-async-address-resolver.c'; fi`
+
+avahi_daemon-dbus-async-host-name-resolver.o: dbus-async-host-name-resolver.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-dbus-async-host-name-resolver.o -MD -MP -MF $(DEPDIR)/avahi_daemon-dbus-async-host-name-resolver.Tpo -c -o avahi_daemon-dbus-async-host-name-resolver.o `test -f 'dbus-async-host-name-resolver.c' || echo '$(srcdir)/'`dbus-async-host-name-resolver.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-dbus-async-host-name-resolver.Tpo $(DEPDIR)/avahi_daemon-dbus-async-host-name-resolver.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dbus-async-host-name-resolver.c' object='avahi_daemon-dbus-async-host-name-resolver.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-dbus-async-host-name-resolver.o `test -f 'dbus-async-host-name-resolver.c' || echo '$(srcdir)/'`dbus-async-host-name-resolver.c
+
+avahi_daemon-dbus-async-host-name-resolver.obj: dbus-async-host-name-resolver.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-dbus-async-host-name-resolver.obj -MD -MP -MF $(DEPDIR)/avahi_daemon-dbus-async-host-name-resolver.Tpo -c -o avahi_daemon-dbus-async-host-name-resolver.obj `if test -f 'dbus-async-host-name-resolver.c'; then $(CYGPATH_W) 'dbus-async-host-name-resolver.c'; else $(CYGPATH_W) '$(srcdir)/dbus-async-host-name-resolver.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-dbus-async-host-name-resolver.Tpo $(DEPDIR)/avahi_daemon-dbus-async-host-name-resolver.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dbus-async-host-name-resolver.c' object='avahi_daemon-dbus-async-host-name-resolver.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-dbus-async-host-name-resolver.obj `if test -f 'dbus-async-host-name-resolver.c'; then $(CYGPATH_W) 'dbus-async-host-name-resolver.c'; else $(CYGPATH_W) '$(srcdir)/dbus-async-host-name-resolver.c'; fi`
+
+avahi_daemon-dbus-async-service-resolver.o: dbus-async-service-resolver.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-dbus-async-service-resolver.o -MD -MP -MF $(DEPDIR)/avahi_daemon-dbus-async-service-resolver.Tpo -c -o avahi_daemon-dbus-async-service-resolver.o `test -f 'dbus-async-service-resolver.c' || echo '$(srcdir)/'`dbus-async-service-resolver.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-dbus-async-service-resolver.Tpo $(DEPDIR)/avahi_daemon-dbus-async-service-resolver.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dbus-async-service-resolver.c' object='avahi_daemon-dbus-async-service-resolver.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-dbus-async-service-resolver.o `test -f 'dbus-async-service-resolver.c' || echo '$(srcdir)/'`dbus-async-service-resolver.c
+
+avahi_daemon-dbus-async-service-resolver.obj: dbus-async-service-resolver.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-dbus-async-service-resolver.obj -MD -MP -MF $(DEPDIR)/avahi_daemon-dbus-async-service-resolver.Tpo -c -o avahi_daemon-dbus-async-service-resolver.obj `if test -f 'dbus-async-service-resolver.c'; then $(CYGPATH_W) 'dbus-async-service-resolver.c'; else $(CYGPATH_W) '$(srcdir)/dbus-async-service-resolver.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-dbus-async-service-resolver.Tpo $(DEPDIR)/avahi_daemon-dbus-async-service-resolver.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dbus-async-service-resolver.c' object='avahi_daemon-dbus-async-service-resolver.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-dbus-async-service-resolver.obj `if test -f 'dbus-async-service-resolver.c'; then $(CYGPATH_W) 'dbus-async-service-resolver.c'; else $(CYGPATH_W) '$(srcdir)/dbus-async-service-resolver.c'; fi`
+
+avahi_daemon-dbus-domain-browser.o: dbus-domain-browser.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-dbus-domain-browser.o -MD -MP -MF $(DEPDIR)/avahi_daemon-dbus-domain-browser.Tpo -c -o avahi_daemon-dbus-domain-browser.o `test -f 'dbus-domain-browser.c' || echo '$(srcdir)/'`dbus-domain-browser.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-dbus-domain-browser.Tpo $(DEPDIR)/avahi_daemon-dbus-domain-browser.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dbus-domain-browser.c' object='avahi_daemon-dbus-domain-browser.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-dbus-domain-browser.o `test -f 'dbus-domain-browser.c' || echo '$(srcdir)/'`dbus-domain-browser.c
+
+avahi_daemon-dbus-domain-browser.obj: dbus-domain-browser.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-dbus-domain-browser.obj -MD -MP -MF $(DEPDIR)/avahi_daemon-dbus-domain-browser.Tpo -c -o avahi_daemon-dbus-domain-browser.obj `if test -f 'dbus-domain-browser.c'; then $(CYGPATH_W) 'dbus-domain-browser.c'; else $(CYGPATH_W) '$(srcdir)/dbus-domain-browser.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-dbus-domain-browser.Tpo $(DEPDIR)/avahi_daemon-dbus-domain-browser.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dbus-domain-browser.c' object='avahi_daemon-dbus-domain-browser.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-dbus-domain-browser.obj `if test -f 'dbus-domain-browser.c'; then $(CYGPATH_W) 'dbus-domain-browser.c'; else $(CYGPATH_W) '$(srcdir)/dbus-domain-browser.c'; fi`
+
+avahi_daemon-dbus-entry-group.o: dbus-entry-group.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-dbus-entry-group.o -MD -MP -MF $(DEPDIR)/avahi_daemon-dbus-entry-group.Tpo -c -o avahi_daemon-dbus-entry-group.o `test -f 'dbus-entry-group.c' || echo '$(srcdir)/'`dbus-entry-group.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-dbus-entry-group.Tpo $(DEPDIR)/avahi_daemon-dbus-entry-group.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dbus-entry-group.c' object='avahi_daemon-dbus-entry-group.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-dbus-entry-group.o `test -f 'dbus-entry-group.c' || echo '$(srcdir)/'`dbus-entry-group.c
+
+avahi_daemon-dbus-entry-group.obj: dbus-entry-group.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-dbus-entry-group.obj -MD -MP -MF $(DEPDIR)/avahi_daemon-dbus-entry-group.Tpo -c -o avahi_daemon-dbus-entry-group.obj `if test -f 'dbus-entry-group.c'; then $(CYGPATH_W) 'dbus-entry-group.c'; else $(CYGPATH_W) '$(srcdir)/dbus-entry-group.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-dbus-entry-group.Tpo $(DEPDIR)/avahi_daemon-dbus-entry-group.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dbus-entry-group.c' object='avahi_daemon-dbus-entry-group.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-dbus-entry-group.obj `if test -f 'dbus-entry-group.c'; then $(CYGPATH_W) 'dbus-entry-group.c'; else $(CYGPATH_W) '$(srcdir)/dbus-entry-group.c'; fi`
+
+avahi_daemon-dbus-service-browser.o: dbus-service-browser.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-dbus-service-browser.o -MD -MP -MF $(DEPDIR)/avahi_daemon-dbus-service-browser.Tpo -c -o avahi_daemon-dbus-service-browser.o `test -f 'dbus-service-browser.c' || echo '$(srcdir)/'`dbus-service-browser.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-dbus-service-browser.Tpo $(DEPDIR)/avahi_daemon-dbus-service-browser.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dbus-service-browser.c' object='avahi_daemon-dbus-service-browser.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-dbus-service-browser.o `test -f 'dbus-service-browser.c' || echo '$(srcdir)/'`dbus-service-browser.c
+
+avahi_daemon-dbus-service-browser.obj: dbus-service-browser.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-dbus-service-browser.obj -MD -MP -MF $(DEPDIR)/avahi_daemon-dbus-service-browser.Tpo -c -o avahi_daemon-dbus-service-browser.obj `if test -f 'dbus-service-browser.c'; then $(CYGPATH_W) 'dbus-service-browser.c'; else $(CYGPATH_W) '$(srcdir)/dbus-service-browser.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-dbus-service-browser.Tpo $(DEPDIR)/avahi_daemon-dbus-service-browser.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dbus-service-browser.c' object='avahi_daemon-dbus-service-browser.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-dbus-service-browser.obj `if test -f 'dbus-service-browser.c'; then $(CYGPATH_W) 'dbus-service-browser.c'; else $(CYGPATH_W) '$(srcdir)/dbus-service-browser.c'; fi`
+
+avahi_daemon-dbus-service-type-browser.o: dbus-service-type-browser.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-dbus-service-type-browser.o -MD -MP -MF $(DEPDIR)/avahi_daemon-dbus-service-type-browser.Tpo -c -o avahi_daemon-dbus-service-type-browser.o `test -f 'dbus-service-type-browser.c' || echo '$(srcdir)/'`dbus-service-type-browser.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-dbus-service-type-browser.Tpo $(DEPDIR)/avahi_daemon-dbus-service-type-browser.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dbus-service-type-browser.c' object='avahi_daemon-dbus-service-type-browser.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-dbus-service-type-browser.o `test -f 'dbus-service-type-browser.c' || echo '$(srcdir)/'`dbus-service-type-browser.c
+
+avahi_daemon-dbus-service-type-browser.obj: dbus-service-type-browser.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-dbus-service-type-browser.obj -MD -MP -MF $(DEPDIR)/avahi_daemon-dbus-service-type-browser.Tpo -c -o avahi_daemon-dbus-service-type-browser.obj `if test -f 'dbus-service-type-browser.c'; then $(CYGPATH_W) 'dbus-service-type-browser.c'; else $(CYGPATH_W) '$(srcdir)/dbus-service-type-browser.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-dbus-service-type-browser.Tpo $(DEPDIR)/avahi_daemon-dbus-service-type-browser.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dbus-service-type-browser.c' object='avahi_daemon-dbus-service-type-browser.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-dbus-service-type-browser.obj `if test -f 'dbus-service-type-browser.c'; then $(CYGPATH_W) 'dbus-service-type-browser.c'; else $(CYGPATH_W) '$(srcdir)/dbus-service-type-browser.c'; fi`
+
+avahi_daemon-dbus-sync-address-resolver.o: dbus-sync-address-resolver.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-dbus-sync-address-resolver.o -MD -MP -MF $(DEPDIR)/avahi_daemon-dbus-sync-address-resolver.Tpo -c -o avahi_daemon-dbus-sync-address-resolver.o `test -f 'dbus-sync-address-resolver.c' || echo '$(srcdir)/'`dbus-sync-address-resolver.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-dbus-sync-address-resolver.Tpo $(DEPDIR)/avahi_daemon-dbus-sync-address-resolver.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dbus-sync-address-resolver.c' object='avahi_daemon-dbus-sync-address-resolver.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-dbus-sync-address-resolver.o `test -f 'dbus-sync-address-resolver.c' || echo '$(srcdir)/'`dbus-sync-address-resolver.c
+
+avahi_daemon-dbus-sync-address-resolver.obj: dbus-sync-address-resolver.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-dbus-sync-address-resolver.obj -MD -MP -MF $(DEPDIR)/avahi_daemon-dbus-sync-address-resolver.Tpo -c -o avahi_daemon-dbus-sync-address-resolver.obj `if test -f 'dbus-sync-address-resolver.c'; then $(CYGPATH_W) 'dbus-sync-address-resolver.c'; else $(CYGPATH_W) '$(srcdir)/dbus-sync-address-resolver.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-dbus-sync-address-resolver.Tpo $(DEPDIR)/avahi_daemon-dbus-sync-address-resolver.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dbus-sync-address-resolver.c' object='avahi_daemon-dbus-sync-address-resolver.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-dbus-sync-address-resolver.obj `if test -f 'dbus-sync-address-resolver.c'; then $(CYGPATH_W) 'dbus-sync-address-resolver.c'; else $(CYGPATH_W) '$(srcdir)/dbus-sync-address-resolver.c'; fi`
+
+avahi_daemon-dbus-sync-host-name-resolver.o: dbus-sync-host-name-resolver.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-dbus-sync-host-name-resolver.o -MD -MP -MF $(DEPDIR)/avahi_daemon-dbus-sync-host-name-resolver.Tpo -c -o avahi_daemon-dbus-sync-host-name-resolver.o `test -f 'dbus-sync-host-name-resolver.c' || echo '$(srcdir)/'`dbus-sync-host-name-resolver.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-dbus-sync-host-name-resolver.Tpo $(DEPDIR)/avahi_daemon-dbus-sync-host-name-resolver.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dbus-sync-host-name-resolver.c' object='avahi_daemon-dbus-sync-host-name-resolver.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-dbus-sync-host-name-resolver.o `test -f 'dbus-sync-host-name-resolver.c' || echo '$(srcdir)/'`dbus-sync-host-name-resolver.c
+
+avahi_daemon-dbus-sync-host-name-resolver.obj: dbus-sync-host-name-resolver.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-dbus-sync-host-name-resolver.obj -MD -MP -MF $(DEPDIR)/avahi_daemon-dbus-sync-host-name-resolver.Tpo -c -o avahi_daemon-dbus-sync-host-name-resolver.obj `if test -f 'dbus-sync-host-name-resolver.c'; then $(CYGPATH_W) 'dbus-sync-host-name-resolver.c'; else $(CYGPATH_W) '$(srcdir)/dbus-sync-host-name-resolver.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-dbus-sync-host-name-resolver.Tpo $(DEPDIR)/avahi_daemon-dbus-sync-host-name-resolver.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dbus-sync-host-name-resolver.c' object='avahi_daemon-dbus-sync-host-name-resolver.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-dbus-sync-host-name-resolver.obj `if test -f 'dbus-sync-host-name-resolver.c'; then $(CYGPATH_W) 'dbus-sync-host-name-resolver.c'; else $(CYGPATH_W) '$(srcdir)/dbus-sync-host-name-resolver.c'; fi`
+
+avahi_daemon-dbus-sync-service-resolver.o: dbus-sync-service-resolver.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-dbus-sync-service-resolver.o -MD -MP -MF $(DEPDIR)/avahi_daemon-dbus-sync-service-resolver.Tpo -c -o avahi_daemon-dbus-sync-service-resolver.o `test -f 'dbus-sync-service-resolver.c' || echo '$(srcdir)/'`dbus-sync-service-resolver.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-dbus-sync-service-resolver.Tpo $(DEPDIR)/avahi_daemon-dbus-sync-service-resolver.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dbus-sync-service-resolver.c' object='avahi_daemon-dbus-sync-service-resolver.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-dbus-sync-service-resolver.o `test -f 'dbus-sync-service-resolver.c' || echo '$(srcdir)/'`dbus-sync-service-resolver.c
+
+avahi_daemon-dbus-sync-service-resolver.obj: dbus-sync-service-resolver.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-dbus-sync-service-resolver.obj -MD -MP -MF $(DEPDIR)/avahi_daemon-dbus-sync-service-resolver.Tpo -c -o avahi_daemon-dbus-sync-service-resolver.obj `if test -f 'dbus-sync-service-resolver.c'; then $(CYGPATH_W) 'dbus-sync-service-resolver.c'; else $(CYGPATH_W) '$(srcdir)/dbus-sync-service-resolver.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-dbus-sync-service-resolver.Tpo $(DEPDIR)/avahi_daemon-dbus-sync-service-resolver.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dbus-sync-service-resolver.c' object='avahi_daemon-dbus-sync-service-resolver.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-dbus-sync-service-resolver.obj `if test -f 'dbus-sync-service-resolver.c'; then $(CYGPATH_W) 'dbus-sync-service-resolver.c'; else $(CYGPATH_W) '$(srcdir)/dbus-sync-service-resolver.c'; fi`
+
+avahi_daemon-dbus-record-browser.o: dbus-record-browser.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-dbus-record-browser.o -MD -MP -MF $(DEPDIR)/avahi_daemon-dbus-record-browser.Tpo -c -o avahi_daemon-dbus-record-browser.o `test -f 'dbus-record-browser.c' || echo '$(srcdir)/'`dbus-record-browser.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-dbus-record-browser.Tpo $(DEPDIR)/avahi_daemon-dbus-record-browser.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dbus-record-browser.c' object='avahi_daemon-dbus-record-browser.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-dbus-record-browser.o `test -f 'dbus-record-browser.c' || echo '$(srcdir)/'`dbus-record-browser.c
+
+avahi_daemon-dbus-record-browser.obj: dbus-record-browser.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-dbus-record-browser.obj -MD -MP -MF $(DEPDIR)/avahi_daemon-dbus-record-browser.Tpo -c -o avahi_daemon-dbus-record-browser.obj `if test -f 'dbus-record-browser.c'; then $(CYGPATH_W) 'dbus-record-browser.c'; else $(CYGPATH_W) '$(srcdir)/dbus-record-browser.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-dbus-record-browser.Tpo $(DEPDIR)/avahi_daemon-dbus-record-browser.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='dbus-record-browser.c' object='avahi_daemon-dbus-record-browser.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-dbus-record-browser.obj `if test -f 'dbus-record-browser.c'; then $(CYGPATH_W) 'dbus-record-browser.c'; else $(CYGPATH_W) '$(srcdir)/dbus-record-browser.c'; fi`
+
+avahi_daemon-dbus.o: ../avahi-common/dbus.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-dbus.o -MD -MP -MF $(DEPDIR)/avahi_daemon-dbus.Tpo -c -o avahi_daemon-dbus.o `test -f '../avahi-common/dbus.c' || echo '$(srcdir)/'`../avahi-common/dbus.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-dbus.Tpo $(DEPDIR)/avahi_daemon-dbus.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../avahi-common/dbus.c' object='avahi_daemon-dbus.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-dbus.o `test -f '../avahi-common/dbus.c' || echo '$(srcdir)/'`../avahi-common/dbus.c
+
+avahi_daemon-dbus.obj: ../avahi-common/dbus.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-dbus.obj -MD -MP -MF $(DEPDIR)/avahi_daemon-dbus.Tpo -c -o avahi_daemon-dbus.obj `if test -f '../avahi-common/dbus.c'; then $(CYGPATH_W) '../avahi-common/dbus.c'; else $(CYGPATH_W) '$(srcdir)/../avahi-common/dbus.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-dbus.Tpo $(DEPDIR)/avahi_daemon-dbus.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../avahi-common/dbus.c' object='avahi_daemon-dbus.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-dbus.obj `if test -f '../avahi-common/dbus.c'; then $(CYGPATH_W) '../avahi-common/dbus.c'; else $(CYGPATH_W) '$(srcdir)/../avahi-common/dbus.c'; fi`
+
+avahi_daemon-dbus-watch-glue.o: ../avahi-common/dbus-watch-glue.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-dbus-watch-glue.o -MD -MP -MF $(DEPDIR)/avahi_daemon-dbus-watch-glue.Tpo -c -o avahi_daemon-dbus-watch-glue.o `test -f '../avahi-common/dbus-watch-glue.c' || echo '$(srcdir)/'`../avahi-common/dbus-watch-glue.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-dbus-watch-glue.Tpo $(DEPDIR)/avahi_daemon-dbus-watch-glue.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../avahi-common/dbus-watch-glue.c' object='avahi_daemon-dbus-watch-glue.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-dbus-watch-glue.o `test -f '../avahi-common/dbus-watch-glue.c' || echo '$(srcdir)/'`../avahi-common/dbus-watch-glue.c
+
+avahi_daemon-dbus-watch-glue.obj: ../avahi-common/dbus-watch-glue.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -MT avahi_daemon-dbus-watch-glue.obj -MD -MP -MF $(DEPDIR)/avahi_daemon-dbus-watch-glue.Tpo -c -o avahi_daemon-dbus-watch-glue.obj `if test -f '../avahi-common/dbus-watch-glue.c'; then $(CYGPATH_W) '../avahi-common/dbus-watch-glue.c'; else $(CYGPATH_W) '$(srcdir)/../avahi-common/dbus-watch-glue.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_daemon-dbus-watch-glue.Tpo $(DEPDIR)/avahi_daemon-dbus-watch-glue.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../avahi-common/dbus-watch-glue.c' object='avahi_daemon-dbus-watch-glue.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_daemon_CFLAGS) $(CFLAGS) -c -o avahi_daemon-dbus-watch-glue.obj `if test -f '../avahi-common/dbus-watch-glue.c'; then $(CYGPATH_W) '../avahi-common/dbus-watch-glue.c'; else $(CYGPATH_W) '$(srcdir)/../avahi-common/dbus-watch-glue.c'; fi`
+
+ini_file_parser_test-ini-file-parser.o: ini-file-parser.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ini_file_parser_test_CFLAGS) $(CFLAGS) -MT ini_file_parser_test-ini-file-parser.o -MD -MP -MF $(DEPDIR)/ini_file_parser_test-ini-file-parser.Tpo -c -o ini_file_parser_test-ini-file-parser.o `test -f 'ini-file-parser.c' || echo '$(srcdir)/'`ini-file-parser.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/ini_file_parser_test-ini-file-parser.Tpo $(DEPDIR)/ini_file_parser_test-ini-file-parser.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='ini-file-parser.c' object='ini_file_parser_test-ini-file-parser.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ini_file_parser_test_CFLAGS) $(CFLAGS) -c -o ini_file_parser_test-ini-file-parser.o `test -f 'ini-file-parser.c' || echo '$(srcdir)/'`ini-file-parser.c
+
+ini_file_parser_test-ini-file-parser.obj: ini-file-parser.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ini_file_parser_test_CFLAGS) $(CFLAGS) -MT ini_file_parser_test-ini-file-parser.obj -MD -MP -MF $(DEPDIR)/ini_file_parser_test-ini-file-parser.Tpo -c -o ini_file_parser_test-ini-file-parser.obj `if test -f 'ini-file-parser.c'; then $(CYGPATH_W) 'ini-file-parser.c'; else $(CYGPATH_W) '$(srcdir)/ini-file-parser.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/ini_file_parser_test-ini-file-parser.Tpo $(DEPDIR)/ini_file_parser_test-ini-file-parser.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='ini-file-parser.c' object='ini_file_parser_test-ini-file-parser.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ini_file_parser_test_CFLAGS) $(CFLAGS) -c -o ini_file_parser_test-ini-file-parser.obj `if test -f 'ini-file-parser.c'; then $(CYGPATH_W) 'ini-file-parser.c'; else $(CYGPATH_W) '$(srcdir)/ini-file-parser.c'; fi`
+
+ini_file_parser_test-ini-file-parser-test.o: ini-file-parser-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ini_file_parser_test_CFLAGS) $(CFLAGS) -MT ini_file_parser_test-ini-file-parser-test.o -MD -MP -MF $(DEPDIR)/ini_file_parser_test-ini-file-parser-test.Tpo -c -o ini_file_parser_test-ini-file-parser-test.o `test -f 'ini-file-parser-test.c' || echo '$(srcdir)/'`ini-file-parser-test.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/ini_file_parser_test-ini-file-parser-test.Tpo $(DEPDIR)/ini_file_parser_test-ini-file-parser-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='ini-file-parser-test.c' object='ini_file_parser_test-ini-file-parser-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ini_file_parser_test_CFLAGS) $(CFLAGS) -c -o ini_file_parser_test-ini-file-parser-test.o `test -f 'ini-file-parser-test.c' || echo '$(srcdir)/'`ini-file-parser-test.c
+
+ini_file_parser_test-ini-file-parser-test.obj: ini-file-parser-test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ini_file_parser_test_CFLAGS) $(CFLAGS) -MT ini_file_parser_test-ini-file-parser-test.obj -MD -MP -MF $(DEPDIR)/ini_file_parser_test-ini-file-parser-test.Tpo -c -o ini_file_parser_test-ini-file-parser-test.obj `if test -f 'ini-file-parser-test.c'; then $(CYGPATH_W) 'ini-file-parser-test.c'; else $(CYGPATH_W) '$(srcdir)/ini-file-parser-test.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/ini_file_parser_test-ini-file-parser-test.Tpo $(DEPDIR)/ini_file_parser_test-ini-file-parser-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='ini-file-parser-test.c' object='ini_file_parser_test-ini-file-parser-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ini_file_parser_test_CFLAGS) $(CFLAGS) -c -o ini_file_parser_test-ini-file-parser-test.obj `if test -f 'ini-file-parser-test.c'; then $(CYGPATH_W) 'ini-file-parser-test.c'; else $(CYGPATH_W) '$(srcdir)/ini-file-parser-test.c'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+install-dist_dbusserviceDATA: $(dist_dbusservice_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(dbusservicedir)" || $(MKDIR_P) "$(DESTDIR)$(dbusservicedir)"
+	@list='$(dist_dbusservice_DATA)'; test -n "$(dbusservicedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dbusservicedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(dbusservicedir)" || exit $$?; \
+	done
+
+uninstall-dist_dbusserviceDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_dbusservice_DATA)'; test -n "$(dbusservicedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(dbusservicedir)'; $(am__uninstall_files_from_dir)
+install-dist_dbussystemservicesDATA: $(dist_dbussystemservices_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(dbussystemservicesdir)" || $(MKDIR_P) "$(DESTDIR)$(dbussystemservicesdir)"
+	@list='$(dist_dbussystemservices_DATA)'; test -n "$(dbussystemservicesdir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dbussystemservicesdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(dbussystemservicesdir)" || exit $$?; \
+	done
+
+uninstall-dist_dbussystemservicesDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_dbussystemservices_DATA)'; test -n "$(dbussystemservicesdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(dbussystemservicesdir)'; $(am__uninstall_files_from_dir)
+install-dist_introspectionDATA: $(dist_introspection_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(introspectiondir)" || $(MKDIR_P) "$(DESTDIR)$(introspectiondir)"
+	@list='$(dist_introspection_DATA)'; test -n "$(introspectiondir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(introspectiondir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(introspectiondir)" || exit $$?; \
+	done
+
+uninstall-dist_introspectionDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_introspection_DATA)'; test -n "$(introspectiondir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(introspectiondir)'; $(am__uninstall_files_from_dir)
+install-dist_pkgdataDATA: $(dist_pkgdata_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)"
+	@list='$(dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgdatadir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgdatadir)" || exit $$?; \
+	done
+
+uninstall-dist_pkgdataDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(pkgdatadir)'; $(am__uninstall_files_from_dir)
+install-dist_serviceDATA: $(dist_service_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(servicedir)" || $(MKDIR_P) "$(DESTDIR)$(servicedir)"
+	@list='$(dist_service_DATA)'; test -n "$(servicedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(servicedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(servicedir)" || exit $$?; \
+	done
+
+uninstall-dist_serviceDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_service_DATA)'; test -n "$(servicedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(servicedir)'; $(am__uninstall_files_from_dir)
+install-pkgsysconfDATA: $(pkgsysconf_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(pkgsysconfdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgsysconfdir)"
+	@list='$(pkgsysconf_DATA)'; test -n "$(pkgsysconfdir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgsysconfdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgsysconfdir)" || exit $$?; \
+	done
+
+uninstall-pkgsysconfDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(pkgsysconf_DATA)'; test -n "$(pkgsysconfdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(pkgsysconfdir)'; $(am__uninstall_files_from_dir)
+install-systemdsystemunitDATA: $(systemdsystemunit_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(systemdsystemunitdir)" || $(MKDIR_P) "$(DESTDIR)$(systemdsystemunitdir)"
+	@list='$(systemdsystemunit_DATA)'; test -n "$(systemdsystemunitdir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(systemdsystemunitdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(systemdsystemunitdir)" || exit $$?; \
+	done
+
+uninstall-systemdsystemunitDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(systemdsystemunit_DATA)'; test -n "$(systemdsystemunitdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(systemdsystemunitdir)'; $(am__uninstall_files_from_dir)
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(dbusservicedir)" "$(DESTDIR)$(dbussystemservicesdir)" "$(DESTDIR)$(introspectiondir)" "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(servicedir)" "$(DESTDIR)$(pkgsysconfdir)" "$(DESTDIR)$(systemdsystemunitdir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+	clean-sbinPROGRAMS mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-data-local install-dist_dbusserviceDATA \
+	install-dist_dbussystemservicesDATA \
+	install-dist_introspectionDATA install-dist_pkgdataDATA \
+	install-dist_serviceDATA install-pkgsysconfDATA \
+	install-systemdsystemunitDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-sbinPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-dist_dbusserviceDATA \
+	uninstall-dist_dbussystemservicesDATA \
+	uninstall-dist_introspectionDATA uninstall-dist_pkgdataDATA \
+	uninstall-dist_serviceDATA uninstall-pkgsysconfDATA \
+	uninstall-sbinPROGRAMS uninstall-systemdsystemunitDATA
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstPROGRAMS clean-sbinPROGRAMS ctags \
+	distclean distclean-compile distclean-generic \
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-data-local \
+	install-dist_dbusserviceDATA \
+	install-dist_dbussystemservicesDATA \
+	install-dist_introspectionDATA install-dist_pkgdataDATA \
+	install-dist_serviceDATA install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-pdf \
+	install-pdf-am install-pkgsysconfDATA install-ps install-ps-am \
+	install-sbinPROGRAMS install-strip \
+	install-systemdsystemunitDATA installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-dist_dbusserviceDATA \
+	uninstall-dist_dbussystemservicesDATA \
+	uninstall-dist_introspectionDATA uninstall-dist_pkgdataDATA \
+	uninstall-dist_serviceDATA uninstall-pkgsysconfDATA \
+	uninstall-sbinPROGRAMS uninstall-systemdsystemunitDATA
+
+
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@%.service: %.service.in
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	$(AM_V_GEN)sed -e 's,@sbindir\@,$(sbindir),g' $< > $@
+
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@%.socket: %.socket.in
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	$(AM_V_GEN)sed -e 's,@sbindir\@,$(sbindir),g' \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@		-e 's,@avahi_runtime_dir\@,$(avahi_runtime_dir),g' $< > $@
+
+xmllint:
+	xmllint --noout --valid example.service
+	for F in $(introspection_DATA) ; do \
+		xmllint --noout --valid $$F ; \
+	done
+
+install-data-local:
+	test -z "$(localstatedir)/run" || $(mkdir_p) "$(DESTDIR)$(localstatedir)/run"
+
+update-systemd:
+	curl http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.c > sd-daemon.c
+	curl http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.h > sd-daemon.h
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/avahi-0.6.31/avahi-daemon/avahi-daemon.conf b/avahi-0.6.31/avahi-daemon/avahi-daemon.conf
new file mode 100644
index 0000000..c992842
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/avahi-daemon.conf
@@ -0,0 +1,68 @@
+# This file is part of avahi.
+#
+# avahi 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 of the
+# License, or (at your option) any later version.
+#
+# avahi 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 General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+# See avahi-daemon.conf(5) for more information on this configuration
+# file!
+
+[server]
+#host-name=foo
+#domain-name=local
+browse-domains=0pointer.de, zeroconf.org
+use-ipv4=yes
+use-ipv6=no
+#allow-interfaces=eth0
+#deny-interfaces=eth1
+#check-response-ttl=no
+#use-iff-running=no
+#enable-dbus=yes
+#disallow-other-stacks=no
+#allow-point-to-point=no
+#cache-entries-max=4096
+#clients-max=4096
+#objects-per-client-max=1024
+#entries-per-entry-group-max=32
+ratelimit-interval-usec=1000000
+ratelimit-burst=1000
+
+[wide-area]
+enable-wide-area=yes
+
+[publish]
+#disable-publishing=no
+#disable-user-service-publishing=no
+#add-service-cookie=no
+#publish-addresses=yes
+#publish-hinfo=yes
+#publish-workstation=yes
+#publish-domain=yes
+#publish-dns-servers=192.168.50.1, 192.168.50.2
+#publish-resolv-conf-dns-servers=yes
+#publish-aaaa-on-ipv4=yes
+#publish-a-on-ipv6=no
+
+[reflector]
+#enable-reflector=no
+#reflect-ipv=no
+
+[rlimits]
+#rlimit-as=
+rlimit-core=0
+rlimit-data=4194304
+rlimit-fsize=0
+rlimit-nofile=768
+rlimit-stack=4194304
+rlimit-nproc=3
diff --git a/avahi-0.6.31/avahi-daemon/avahi-daemon.service.in b/avahi-0.6.31/avahi-daemon/avahi-daemon.service.in
new file mode 100644
index 0000000..548c834
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/avahi-daemon.service.in
@@ -0,0 +1,32 @@
+# This file is part of avahi.
+#
+# avahi 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 of the
+# License, or (at your option) any later version.
+#
+# avahi 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 General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+[Unit]
+Description=Avahi mDNS/DNS-SD Stack
+Requires=avahi-daemon.socket
+
+[Service]
+Type=dbus
+BusName=org.freedesktop.Avahi
+ExecStart=@sbindir@/avahi-daemon -s
+ExecReload=@sbindir@/avahi-daemon -r
+NotifyAccess=main
+
+[Install]
+WantedBy=multi-user.target
+Also=avahi-daemon.socket
+Alias=dbus-org.freedesktop.Avahi.service
diff --git a/avahi-0.6.31/avahi-daemon/avahi-daemon.socket.in b/avahi-0.6.31/avahi-daemon/avahi-daemon.socket.in
new file mode 100644
index 0000000..13309b8
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/avahi-daemon.socket.in
@@ -0,0 +1,25 @@
+# This file is part of avahi.
+#
+# avahi 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 of the
+# License, or (at your option) any later version.
+#
+# avahi 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 General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+[Unit]
+Description=Avahi mDNS/DNS-SD Stack Activation Socket
+
+[Socket]
+ListenStream=@avahi_runtime_dir@/avahi-daemon/socket
+
+[Install]
+WantedBy=sockets.target
diff --git a/avahi-0.6.31/avahi-daemon/avahi-dbus.conf b/avahi-0.6.31/avahi-daemon/avahi-dbus.conf
new file mode 100644
index 0000000..44b1a67
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/avahi-dbus.conf
@@ -0,0 +1,32 @@
+<!DOCTYPE busconfig PUBLIC
+          "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+          "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+<busconfig>
+
+  <!-- Only root or user avahi can own the Avahi service -->
+  <policy user="avahi">
+    <allow own="org.freedesktop.Avahi"/>
+  </policy>
+  <policy user="root">
+    <allow own="org.freedesktop.Avahi"/>
+  </policy>
+
+  <!-- Allow anyone to invoke methods on Avahi server, except SetHostName -->
+  <policy context="default">
+    <allow send_destination="org.freedesktop.Avahi"/>
+    <allow receive_sender="org.freedesktop.Avahi"/>
+
+    <deny send_destination="org.freedesktop.Avahi"
+          send_interface="org.freedesktop.Avahi.Server" send_member="SetHostName"/>
+  </policy>
+
+  <!-- Allow everything, including access to SetHostName to users of the group "netdev" -->
+  <policy group="netdev">
+    <allow send_destination="org.freedesktop.Avahi"/>
+    <allow receive_sender="org.freedesktop.Avahi"/>
+  </policy>
+  <policy user="root">
+    <allow send_destination="org.freedesktop.Avahi"/>
+    <allow receive_sender="org.freedesktop.Avahi"/>
+  </policy>
+</busconfig>
diff --git a/avahi-0.6.31/avahi-daemon/avahi-dbus.conf.in b/avahi-0.6.31/avahi-daemon/avahi-dbus.conf.in
new file mode 100644
index 0000000..1df0cc4
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/avahi-dbus.conf.in
@@ -0,0 +1,32 @@
+<!DOCTYPE busconfig PUBLIC
+          "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+          "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+<busconfig>
+
+  <!-- Only root or user @AVAHI_USER@ can own the Avahi service -->
+  <policy user="@AVAHI_USER@">
+    <allow own="org.freedesktop.Avahi"/>
+  </policy>
+  <policy user="root">
+    <allow own="org.freedesktop.Avahi"/>
+  </policy>
+
+  <!-- Allow anyone to invoke methods on Avahi server, except SetHostName -->
+  <policy context="default">
+    <allow send_destination="org.freedesktop.Avahi"/>
+    <allow receive_sender="org.freedesktop.Avahi"/>
+
+    <deny send_destination="org.freedesktop.Avahi"
+          send_interface="org.freedesktop.Avahi.Server" send_member="SetHostName"/>
+  </policy>
+
+  <!-- Allow everything, including access to SetHostName to users of the group "@AVAHI_PRIV_ACCESS_GROUP@" -->
+  <policy group="@AVAHI_PRIV_ACCESS_GROUP@">
+    <allow send_destination="org.freedesktop.Avahi"/>
+    <allow receive_sender="org.freedesktop.Avahi"/>
+  </policy>
+  <policy user="root">
+    <allow send_destination="org.freedesktop.Avahi"/>
+    <allow receive_sender="org.freedesktop.Avahi"/>
+  </policy>
+</busconfig>
diff --git a/avahi-0.6.31/avahi-daemon/avahi-service.dtd b/avahi-0.6.31/avahi-daemon/avahi-service.dtd
new file mode 100644
index 0000000..daf9637
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/avahi-service.dtd
@@ -0,0 +1,18 @@
+<!ELEMENT service-group (name,service+)>
+<!ATTLIST service-group>
+<!ELEMENT name (#PCDATA)>
+<!ATTLIST name replace-wildcards (yes|no) "no">
+<!ELEMENT service (type,subtype*,domain-name?,host-name?,port,txt-record*)>
+<!ATTLIST service protocol (ipv4|ipv6|any) "any">
+<!ELEMENT type (#PCDATA)>
+<!ATTLIST type>
+<!ELEMENT subtype (#PCDATA)>
+<!ATTLIST subtype>
+<!ELEMENT domain-name (#PCDATA)>
+<!ATTLIST domain-name>
+<!ELEMENT host-name (#PCDATA)>
+<!ATTLIST host-name>
+<!ELEMENT port (#PCDATA)>
+<!ATTLIST port>
+<!ELEMENT txt-record (#PCDATA)>
+<!ATTLIST txt-record>
diff --git a/avahi-0.6.31/avahi-daemon/caps.c b/avahi-0.6.31/avahi-daemon/caps.c
new file mode 100644
index 0000000..0e21acf
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/caps.c
@@ -0,0 +1,115 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <sys/types.h>
+#include <assert.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/capability.h>
+#include <sys/prctl.h>
+
+#include <avahi-core/log.h>
+
+#include "caps.h"
+
+int avahi_caps_reduce(void) {
+    int ret = 0;
+    cap_t caps;
+    static cap_value_t cap_values[] = { CAP_SYS_CHROOT, CAP_SETUID, CAP_SETGID };
+
+    /* Let's reduce our caps to the minimum set and tell Linux to keep
+     * them across setuid(). This is called before we drop
+     * privileges. */
+
+    caps = cap_init();
+    assert(caps);
+    cap_clear(caps);
+
+    cap_set_flag(caps, CAP_EFFECTIVE, 3, cap_values, CAP_SET);
+    cap_set_flag(caps, CAP_PERMITTED, 3, cap_values, CAP_SET);
+
+    if (cap_set_proc(caps) < 0) {
+        avahi_log_error("cap_set_proc() failed: %s", strerror(errno));
+        ret = -1;
+    }
+    cap_free(caps);
+
+    /* Retain capabilities across setuid() */
+    if (prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0) < 0) {
+        avahi_log_error("prctl(PR_SET_KEEPCAPS) failed: %s", strerror(errno));
+        ret = -1;
+    }
+
+    return ret;
+}
+
+int avahi_caps_reduce2(void) {
+    int ret = 0;
+    cap_t caps;
+    static cap_value_t cap_values[] = { CAP_SYS_CHROOT };
+
+    /* Reduce our caps to the bare minimum and tell Linux not to keep
+     * them across setuid(). This is called after we drop
+     * privileges. */
+
+    /* No longer retain caps across setuid() */
+    if (prctl(PR_SET_KEEPCAPS, 0, 0, 0, 0) < 0) {
+        avahi_log_error("prctl(PR_SET_KEEPCAPS) failed: %s", strerror(errno));
+        ret = -1;
+    }
+
+    caps = cap_init();
+    assert(caps);
+    cap_clear(caps);
+
+    /* setuid() zeroed our effective caps, let's get them back */
+    cap_set_flag(caps, CAP_EFFECTIVE, 1, cap_values, CAP_SET);
+    cap_set_flag(caps, CAP_PERMITTED, 1, cap_values, CAP_SET);
+
+    if (cap_set_proc(caps) < 0) {
+        avahi_log_error("cap_set_proc() failed: %s", strerror(errno));
+        ret = -1;
+    }
+    cap_free(caps);
+
+    return ret;
+}
+
+int avahi_caps_drop_all(void) {
+    cap_t caps;
+    int ret = 0;
+
+    /* Drop all capabilities and turn ourselves into a normal user process */
+
+    caps = cap_init();
+    assert(caps);
+    cap_clear(caps);
+
+    if (cap_set_proc(caps) < 0) {
+        avahi_log_error("cap_set_proc() failed: %s", strerror(errno));
+        ret = -1;
+    }
+    cap_free(caps);
+
+    return ret;
+}
diff --git a/avahi-0.6.31/avahi-daemon/caps.h b/avahi-0.6.31/avahi-daemon/caps.h
new file mode 100644
index 0000000..5119bd0
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/caps.h
@@ -0,0 +1,27 @@
+#ifndef foocapshfoo
+#define foocapshfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+int avahi_caps_reduce(void);
+int avahi_caps_reduce2(void);
+int avahi_caps_drop_all(void);
+
+#endif
diff --git a/avahi-0.6.31/avahi-daemon/chroot.c b/avahi-0.6.31/avahi-daemon/chroot.c
new file mode 100644
index 0000000..ccd56be
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/chroot.c
@@ -0,0 +1,415 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <inttypes.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/un.h>
+#include <string.h>
+#include <errno.h>
+#include <assert.h>
+
+#include <avahi-core/log.h>
+#include <libdaemon/dfork.h>
+
+#include "chroot.h"
+#include "caps.h"
+#include "setproctitle.h"
+
+enum {
+    AVAHI_CHROOT_SUCCESS = 0,
+    AVAHI_CHROOT_FAILURE,
+    AVAHI_CHROOT_GET_RESOLV_CONF,
+#ifdef HAVE_DBUS
+    AVAHI_CHROOT_GET_SERVER_INTROSPECT,
+    AVAHI_CHROOT_GET_ENTRY_GROUP_INTROSPECT,
+    AVAHI_CHROOT_GET_ADDRESS_RESOLVER_INTROSPECT,
+    AVAHI_CHROOT_GET_DOMAIN_BROWSER_INTROSPECT,
+    AVAHI_CHROOT_GET_HOST_NAME_RESOLVER_INTROSPECT,
+    AVAHI_CHROOT_GET_SERVICE_BROWSER_INTROSPECT,
+    AVAHI_CHROOT_GET_SERVICE_RESOLVER_INTROSPECT,
+    AVAHI_CHROOT_GET_SERVICE_TYPE_BROWSER_INTROSPECT,
+    AVAHI_CHROOT_GET_RECORD_BROWSER_INTROSPECT,
+#endif
+    AVAHI_CHROOT_UNLINK_PID,
+    AVAHI_CHROOT_UNLINK_SOCKET,
+    AVAHI_CHROOT_MAX
+};
+
+static const char* const get_file_name_table[AVAHI_CHROOT_MAX] = {
+    NULL,
+    NULL,
+    "/etc/resolv.conf",
+#ifdef HAVE_DBUS
+    AVAHI_DBUS_INTROSPECTION_DIR"/org.freedesktop.Avahi.Server.xml",
+    AVAHI_DBUS_INTROSPECTION_DIR"/org.freedesktop.Avahi.EntryGroup.xml",
+    AVAHI_DBUS_INTROSPECTION_DIR"/org.freedesktop.Avahi.AddressResolver.xml",
+    AVAHI_DBUS_INTROSPECTION_DIR"/org.freedesktop.Avahi.DomainBrowser.xml",
+    AVAHI_DBUS_INTROSPECTION_DIR"/org.freedesktop.Avahi.HostNameResolver.xml",
+    AVAHI_DBUS_INTROSPECTION_DIR"/org.freedesktop.Avahi.ServiceBrowser.xml",
+    AVAHI_DBUS_INTROSPECTION_DIR"/org.freedesktop.Avahi.ServiceResolver.xml",
+    AVAHI_DBUS_INTROSPECTION_DIR"/org.freedesktop.Avahi.ServiceTypeBrowser.xml",
+    AVAHI_DBUS_INTROSPECTION_DIR"/org.freedesktop.Avahi.RecordBrowser.xml",
+#endif
+    NULL,
+    NULL
+};
+
+static const char *const unlink_file_name_table[AVAHI_CHROOT_MAX] = {
+    NULL,
+    NULL,
+    NULL,
+#ifdef HAVE_DBUS
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+#endif
+    AVAHI_DAEMON_RUNTIME_DIR"/pid",
+    AVAHI_SOCKET
+};
+
+static int helper_fd = -1;
+
+static int send_fd(int fd, int payload_fd) {
+    uint8_t dummy = AVAHI_CHROOT_SUCCESS;
+    struct iovec iov;
+    struct msghdr msg;
+    union {
+        struct cmsghdr hdr;
+        char buf[CMSG_SPACE(sizeof(int))];
+    } cmsg;
+
+    /* Send a file descriptor over the socket */
+
+    memset(&iov, 0, sizeof(iov));
+    memset(&msg, 0, sizeof(msg));
+    memset(&cmsg, 0, sizeof(cmsg));
+
+    iov.iov_base = &dummy;
+    iov.iov_len = sizeof(dummy);
+
+    msg.msg_iov = &iov;
+    msg.msg_iovlen = 1;
+    msg.msg_name = NULL;
+    msg.msg_namelen = 0;
+
+    msg.msg_control = &cmsg;
+    msg.msg_controllen = sizeof(cmsg);
+    msg.msg_flags = 0;
+
+    cmsg.hdr.cmsg_len = CMSG_LEN(sizeof(int));
+    cmsg.hdr.cmsg_level = SOL_SOCKET;
+    cmsg.hdr.cmsg_type = SCM_RIGHTS;
+    *((int*) CMSG_DATA(&cmsg.hdr)) = payload_fd;
+
+    if (sendmsg(fd, &msg, 0) < 0) {
+        avahi_log_error("sendmsg() failed: %s", strerror(errno));
+        return -1;
+    }
+
+    return 0;
+}
+
+static int recv_fd(int fd) {
+    uint8_t dummy;
+    struct iovec iov;
+    struct msghdr msg;
+    union {
+        struct cmsghdr hdr;
+        char buf[CMSG_SPACE(sizeof(int))];
+    } cmsg;
+
+    /* Receive a file descriptor from a socket */
+
+    memset(&iov, 0, sizeof(iov));
+    memset(&msg, 0, sizeof(msg));
+    memset(&cmsg, 0, sizeof(cmsg));
+
+    iov.iov_base = &dummy;
+    iov.iov_len = sizeof(dummy);
+
+    msg.msg_iov = &iov;
+    msg.msg_iovlen = 1;
+    msg.msg_name = NULL;
+    msg.msg_namelen = 0;
+
+    msg.msg_control = cmsg.buf;
+    msg.msg_controllen = sizeof(cmsg);
+    msg.msg_flags = 0;
+
+    cmsg.hdr.cmsg_len = CMSG_LEN(sizeof(int));
+    cmsg.hdr.cmsg_level = SOL_SOCKET;
+    cmsg.hdr.cmsg_type = SCM_RIGHTS;
+    *((int*) CMSG_DATA(&cmsg.hdr)) = -1;
+
+    if (recvmsg(fd, &msg, 0) <= 0) {
+        avahi_log_error("recvmsg() failed: %s", strerror(errno));
+        return -1;
+    } else {
+        struct cmsghdr* h;
+
+        if (dummy != AVAHI_CHROOT_SUCCESS) {
+            errno = EINVAL;
+            return -1;
+        }
+
+        if (!(h = CMSG_FIRSTHDR(&msg))) {
+            avahi_log_error("recvmsg() sent no fd.");
+            errno = EINVAL;
+            return -1;
+        }
+
+        assert(h->cmsg_len = CMSG_LEN(sizeof(int)));
+        assert(h->cmsg_level = SOL_SOCKET);
+        assert(h->cmsg_type == SCM_RIGHTS);
+
+        return *((int*)CMSG_DATA(h));
+    }
+}
+
+static int helper_main(int fd) {
+    int ret = 1;
+    assert(fd >= 0);
+
+    /* This is the main function of our helper process which is forked
+     * off to access files outside the chroot environment. Keep in
+     * mind that this code is security sensitive! */
+
+    avahi_log_debug(__FILE__": chroot() helper started");
+
+    for (;;) {
+        uint8_t command;
+        ssize_t r;
+
+        if ((r = read(fd, &command, sizeof(command))) <= 0) {
+
+            /* EOF? */
+            if (r == 0)
+                break;
+
+            avahi_log_error(__FILE__": read() failed: %s", strerror(errno));
+            goto fail;
+        }
+
+        assert(r == sizeof(command));
+
+        avahi_log_debug(__FILE__": chroot() helper got command %02x", command);
+
+        switch (command) {
+#ifdef HAVE_DBUS
+            case AVAHI_CHROOT_GET_SERVER_INTROSPECT:
+            case AVAHI_CHROOT_GET_ENTRY_GROUP_INTROSPECT:
+            case AVAHI_CHROOT_GET_ADDRESS_RESOLVER_INTROSPECT:
+            case AVAHI_CHROOT_GET_DOMAIN_BROWSER_INTROSPECT:
+            case AVAHI_CHROOT_GET_HOST_NAME_RESOLVER_INTROSPECT:
+            case AVAHI_CHROOT_GET_SERVICE_BROWSER_INTROSPECT:
+            case AVAHI_CHROOT_GET_SERVICE_RESOLVER_INTROSPECT:
+            case AVAHI_CHROOT_GET_SERVICE_TYPE_BROWSER_INTROSPECT:
+            case AVAHI_CHROOT_GET_RECORD_BROWSER_INTROSPECT:
+#endif
+            case AVAHI_CHROOT_GET_RESOLV_CONF: {
+                int payload;
+
+                if ((payload = open(get_file_name_table[(int) command], O_RDONLY)) < 0) {
+                    uint8_t c = AVAHI_CHROOT_FAILURE;
+
+                    avahi_log_error(__FILE__": open() failed: %s", strerror(errno));
+
+                    if (write(fd, &c, sizeof(c)) != sizeof(c)) {
+                        avahi_log_error(__FILE__": write() failed: %s\n", strerror(errno));
+                        goto fail;
+                    }
+
+                    break;
+                }
+
+                if (send_fd(fd, payload) < 0)
+                    goto fail;
+
+                close(payload);
+
+                break;
+            }
+
+            case AVAHI_CHROOT_UNLINK_SOCKET:
+            case AVAHI_CHROOT_UNLINK_PID: {
+                uint8_t c = AVAHI_CHROOT_SUCCESS;
+
+                unlink(unlink_file_name_table[(int) command]);
+
+                if (write(fd, &c, sizeof(c)) != sizeof(c)) {
+                    avahi_log_error(__FILE__": write() failed: %s\n", strerror(errno));
+                    goto fail;
+                }
+
+                break;
+            }
+
+            default:
+                avahi_log_error(__FILE__": Unknown command %02x.", command);
+                break;
+        }
+    }
+
+    ret = 0;
+
+fail:
+
+    avahi_log_debug(__FILE__": chroot() helper exiting with return value %i", ret);
+
+    return ret;
+}
+
+int avahi_chroot_helper_start(const char *argv0) {
+    int sock[2];
+    pid_t pid;
+
+    assert(helper_fd < 0);
+
+    if (socketpair(AF_UNIX, SOCK_STREAM, 0, sock) < 0) {
+        avahi_log_error("socketpair() failed: %s", strerror(errno));
+        return -1;
+    }
+
+    if ((pid = fork()) < 0) {
+        close(sock[0]);
+        close(sock[1]);
+        avahi_log_error(__FILE__": fork() failed: %s", strerror(errno));
+        return -1;
+    } else if (pid == 0) {
+
+        /* Drop all remaining capabilities */
+        avahi_caps_drop_all();
+
+        avahi_set_proc_title(argv0, "%s: chroot helper", argv0);
+
+        daemon_retval_done();
+
+        close(sock[0]);
+        helper_main(sock[1]);
+        _exit(0);
+    }
+
+    close(sock[1]);
+    helper_fd = sock[0];
+
+    return 0;
+}
+
+void avahi_chroot_helper_shutdown(void) {
+
+    if (helper_fd <= 0)
+        return;
+
+    close(helper_fd);
+    helper_fd = -1;
+}
+
+int avahi_chroot_helper_get_fd(const char *fname) {
+
+    if (helper_fd >= 0) {
+        uint8_t command;
+
+        for (command = 2; command < AVAHI_CHROOT_MAX; command++)
+            if (get_file_name_table[(int) command] &&
+                strcmp(fname, get_file_name_table[(int) command]) == 0)
+                break;
+
+        if (command >= AVAHI_CHROOT_MAX) {
+            avahi_log_error("chroot() helper accessed for invalid file name");
+            errno = EACCES;
+            return -1;
+        }
+
+        assert(get_file_name_table[(int) command]);
+
+        if (write(helper_fd, &command, sizeof(command)) < 0) {
+            avahi_log_error("write() failed: %s\n", strerror(errno));
+            return -1;
+        }
+
+        return recv_fd(helper_fd);
+
+    } else
+        return open(fname, O_RDONLY);
+}
+
+
+FILE *avahi_chroot_helper_get_file(const char *fname) {
+    FILE *f;
+    int fd;
+
+    if ((fd = avahi_chroot_helper_get_fd(fname)) < 0)
+        return NULL;
+
+    f = fdopen(fd, "r");
+    assert(f);
+
+    return f;
+}
+
+int avahi_chroot_helper_unlink(const char *fname) {
+
+    if (helper_fd >= 0) {
+        uint8_t c, command;
+        ssize_t r;
+
+        for (command = 2; command < AVAHI_CHROOT_MAX; command++)
+            if (unlink_file_name_table[(int) command] &&
+                strcmp(fname, unlink_file_name_table[(int) command]) == 0)
+                break;
+
+        if (command >= AVAHI_CHROOT_MAX) {
+            avahi_log_error("chroot() helper accessed for invalid file name");
+            errno = EACCES;
+            return -1;
+        }
+
+        if (write(helper_fd, &command, sizeof(command)) < 0 &&
+            (errno != EPIPE && errno != ECONNRESET)) {
+            avahi_log_error("write() failed: %s\n", strerror(errno));
+            return -1;
+        }
+
+        if ((r = read(helper_fd, &c, sizeof(c))) < 0 &&
+            (errno != EPIPE && errno != ECONNRESET)) {
+            avahi_log_error("read() failed: %s\n", r < 0 ? strerror(errno) : "EOF");
+            return -1;
+        }
+
+        return 0;
+
+    } else
+
+        return unlink(fname);
+
+}
diff --git a/avahi-0.6.31/avahi-daemon/chroot.h b/avahi-0.6.31/avahi-daemon/chroot.h
new file mode 100644
index 0000000..2828d54
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/chroot.h
@@ -0,0 +1,34 @@
+#ifndef foochroothelperhfoo
+#define foochroothelperhfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#include <stdio.h>
+
+int avahi_chroot_helper_start(const char *argv0);
+void avahi_chroot_helper_shutdown(void);
+int avahi_chroot_helper_get(const char *fname);
+
+int avahi_chroot_helper_get_fd(const char *fname);
+FILE *avahi_chroot_helper_get_file(const char *fname);
+
+int avahi_chroot_helper_unlink(const char *fname);
+
+#endif
diff --git a/avahi-0.6.31/avahi-daemon/dbus-async-address-resolver.c b/avahi-0.6.31/avahi-daemon/dbus-async-address-resolver.c
new file mode 100644
index 0000000..a77e03c
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/dbus-async-address-resolver.c
@@ -0,0 +1,142 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+
+#include <avahi-common/malloc.h>
+#include <avahi-common/dbus.h>
+#include <avahi-common/error.h>
+#include <avahi-core/log.h>
+
+#include "dbus-util.h"
+#include "dbus-internal.h"
+
+void avahi_dbus_async_address_resolver_free(AsyncAddressResolverInfo *i) {
+    assert(i);
+
+    if (i->address_resolver)
+        avahi_s_address_resolver_free(i->address_resolver);
+
+    if (i->path) {
+        dbus_connection_unregister_object_path(server->bus, i->path);
+        avahi_free(i->path);
+    }
+
+    AVAHI_LLIST_REMOVE(AsyncAddressResolverInfo, async_address_resolvers, i->client->async_address_resolvers, i);
+
+    assert(i->client->n_objects >= 1);
+    i->client->n_objects--;
+
+    avahi_free(i);
+}
+
+void avahi_dbus_async_address_resolver_callback(AvahiSAddressResolver *r, AvahiIfIndex interface, AvahiProtocol protocol, AvahiResolverEvent event, const AvahiAddress *address, const char *host_name, AvahiLookupResultFlags flags, void* userdata) {
+    AsyncAddressResolverInfo *i = userdata;
+    DBusMessage *reply;
+
+    assert(r);
+    assert(i);
+
+    reply = dbus_message_new_signal(i->path, AVAHI_DBUS_INTERFACE_ADDRESS_RESOLVER, avahi_dbus_map_resolve_signal_name(event));
+
+    if (!reply) {
+        avahi_log_error("Failed allocate message");
+        return;
+    }
+
+    if (event == AVAHI_RESOLVER_FOUND) {
+        char t[AVAHI_ADDRESS_STR_MAX], *pt = t;
+        int32_t i_interface, i_protocol, i_aprotocol;
+        uint32_t u_flags;
+
+        assert(address);
+        assert(host_name);
+        avahi_address_snprint(t, sizeof(t), address);
+
+        i_interface = (int32_t) interface;
+        i_protocol = (int32_t) protocol;
+        i_aprotocol = (int32_t) address->proto;
+        u_flags = (uint32_t) flags;
+
+        dbus_message_append_args(
+            reply,
+            DBUS_TYPE_INT32, &i_interface,
+            DBUS_TYPE_INT32, &i_protocol,
+            DBUS_TYPE_INT32, &i_aprotocol,
+            DBUS_TYPE_STRING, &pt,
+            DBUS_TYPE_STRING, &host_name,
+            DBUS_TYPE_UINT32, &u_flags,
+            DBUS_TYPE_INVALID);
+
+    }  else {
+        assert(event == AVAHI_RESOLVER_FAILURE);
+        avahi_dbus_append_server_error(reply);
+    }
+
+    dbus_message_set_destination(reply, i->client->name);
+    dbus_connection_send(server->bus, reply, NULL);
+    dbus_message_unref(reply);
+}
+
+DBusHandlerResult avahi_dbus_msg_async_address_resolver_impl(DBusConnection *c, DBusMessage *m, void *userdata) {
+    DBusError error;
+    AsyncAddressResolverInfo *i = userdata;
+
+    assert(c);
+    assert(m);
+    assert(i);
+
+    dbus_error_init(&error);
+
+    avahi_log_debug(__FILE__": interface=%s, path=%s, member=%s",
+                    dbus_message_get_interface(m),
+                    dbus_message_get_path(m),
+                    dbus_message_get_member(m));
+
+    /* Introspection */
+    if (dbus_message_is_method_call(m, DBUS_INTERFACE_INTROSPECTABLE, "Introspect"))
+        return avahi_dbus_handle_introspect(c, m, "org.freedesktop.Avahi.AddressResolver.xml");
+
+    /* Access control */
+    if (strcmp(dbus_message_get_sender(m), i->client->name))
+        return avahi_dbus_respond_error(c, m, AVAHI_ERR_ACCESS_DENIED, NULL);
+
+    if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_ADDRESS_RESOLVER, "Free")) {
+
+        if (!dbus_message_get_args(m, &error, DBUS_TYPE_INVALID)) {
+            avahi_log_warn("Error parsing AddressResolver::Free message");
+            goto fail;
+        }
+
+        avahi_dbus_async_address_resolver_free(i);
+        return avahi_dbus_respond_ok(c, m);
+    }
+
+    avahi_log_warn("Missed message %s::%s()", dbus_message_get_interface(m), dbus_message_get_member(m));
+
+fail:
+    if (dbus_error_is_set(&error))
+        dbus_error_free(&error);
+
+    return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
diff --git a/avahi-0.6.31/avahi-daemon/dbus-async-host-name-resolver.c b/avahi-0.6.31/avahi-daemon/dbus-async-host-name-resolver.c
new file mode 100644
index 0000000..7c2d063
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/dbus-async-host-name-resolver.c
@@ -0,0 +1,140 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+
+#include <avahi-common/malloc.h>
+#include <avahi-common/dbus.h>
+#include <avahi-common/error.h>
+#include <avahi-core/log.h>
+
+#include "dbus-util.h"
+#include "dbus-internal.h"
+
+void avahi_dbus_async_host_name_resolver_free(AsyncHostNameResolverInfo *i) {
+    assert(i);
+
+    if (i->host_name_resolver)
+        avahi_s_host_name_resolver_free(i->host_name_resolver);
+
+    if (i->path) {
+        dbus_connection_unregister_object_path(server->bus, i->path);
+        avahi_free(i->path);
+    }
+    AVAHI_LLIST_REMOVE(AsyncHostNameResolverInfo, async_host_name_resolvers, i->client->async_host_name_resolvers, i);
+
+    assert(i->client->n_objects >= 1);
+    i->client->n_objects--;
+
+    avahi_free(i);
+}
+
+void avahi_dbus_async_host_name_resolver_callback(AvahiSHostNameResolver *r, AvahiIfIndex interface, AvahiProtocol protocol, AvahiResolverEvent event, const char *host_name, const AvahiAddress *a, AvahiLookupResultFlags flags, void* userdata) {
+    AsyncHostNameResolverInfo *i = userdata;
+    DBusMessage *reply;
+
+    assert(r);
+    assert(i);
+
+    reply = dbus_message_new_signal(i->path, AVAHI_DBUS_INTERFACE_HOST_NAME_RESOLVER, avahi_dbus_map_resolve_signal_name(event));
+
+    if (!reply) {
+        avahi_log_error("Failed allocate message");
+        return;
+    }
+
+    if (event == AVAHI_RESOLVER_FOUND) {
+        char t[AVAHI_ADDRESS_STR_MAX], *pt = t;
+        int32_t i_interface, i_protocol, i_aprotocol;
+        uint32_t u_flags;
+
+        assert(a);
+        assert(host_name);
+        avahi_address_snprint(t, sizeof(t), a);
+
+        i_interface = (int32_t) interface;
+        i_protocol = (int32_t) protocol;
+        i_aprotocol = (int32_t) a->proto;
+        u_flags = (uint32_t) flags;
+
+        dbus_message_append_args(
+            reply,
+            DBUS_TYPE_INT32, &i_interface,
+            DBUS_TYPE_INT32, &i_protocol,
+            DBUS_TYPE_STRING, &host_name,
+            DBUS_TYPE_INT32, &i_aprotocol,
+            DBUS_TYPE_STRING, &pt,
+            DBUS_TYPE_UINT32, &u_flags,
+            DBUS_TYPE_INVALID);
+    }  else {
+        assert(event == AVAHI_RESOLVER_FAILURE);
+        avahi_dbus_append_server_error(reply);
+    }
+
+    dbus_message_set_destination(reply, i->client->name);
+    dbus_connection_send(server->bus, reply, NULL);
+    dbus_message_unref(reply);
+}
+
+DBusHandlerResult avahi_dbus_msg_async_host_name_resolver_impl(DBusConnection *c, DBusMessage *m, void *userdata) {
+    DBusError error;
+    AsyncHostNameResolverInfo *i = userdata;
+
+    assert(c);
+    assert(m);
+    assert(i);
+
+    dbus_error_init(&error);
+
+    avahi_log_debug(__FILE__": interface=%s, path=%s, member=%s",
+                    dbus_message_get_interface(m),
+                    dbus_message_get_path(m),
+                    dbus_message_get_member(m));
+
+    /* Introspection */
+    if (dbus_message_is_method_call(m, DBUS_INTERFACE_INTROSPECTABLE, "Introspect"))
+        return avahi_dbus_handle_introspect(c, m, "org.freedesktop.Avahi.HostNameResolver.xml");
+
+    /* Access control */
+    if (strcmp(dbus_message_get_sender(m), i->client->name))
+        return avahi_dbus_respond_error(c, m, AVAHI_ERR_ACCESS_DENIED, NULL);
+
+    if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_HOST_NAME_RESOLVER, "Free")) {
+
+        if (!dbus_message_get_args(m, &error, DBUS_TYPE_INVALID)) {
+            avahi_log_warn("Error parsing HostNameResolver::Free message");
+            goto fail;
+        }
+
+        avahi_dbus_async_host_name_resolver_free(i);
+        return avahi_dbus_respond_ok(c, m);
+    }
+
+    avahi_log_warn("Missed message %s::%s()", dbus_message_get_interface(m), dbus_message_get_member(m));
+
+fail:
+    if (dbus_error_is_set(&error))
+        dbus_error_free(&error);
+
+    return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
diff --git a/avahi-0.6.31/avahi-daemon/dbus-async-service-resolver.c b/avahi-0.6.31/avahi-daemon/dbus-async-service-resolver.c
new file mode 100644
index 0000000..2b58e2d
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/dbus-async-service-resolver.c
@@ -0,0 +1,179 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+
+#include <avahi-common/malloc.h>
+#include <avahi-common/dbus.h>
+#include <avahi-common/error.h>
+#include <avahi-core/log.h>
+
+#include "dbus-util.h"
+#include "dbus-internal.h"
+
+void avahi_dbus_async_service_resolver_free(AsyncServiceResolverInfo *i) {
+    assert(i);
+
+    if (i->service_resolver)
+        avahi_s_service_resolver_free(i->service_resolver);
+
+    if (i->path) {
+        dbus_connection_unregister_object_path(server->bus, i->path);
+        avahi_free(i->path);
+    }
+
+    AVAHI_LLIST_REMOVE(AsyncServiceResolverInfo, async_service_resolvers, i->client->async_service_resolvers, i);
+
+    assert(i->client->n_objects >= 1);
+    i->client->n_objects--;
+
+    avahi_free(i);
+}
+
+void avahi_dbus_async_service_resolver_callback(
+    AvahiSServiceResolver *r,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiResolverEvent event,
+    const char *name,
+    const char *type,
+    const char *domain,
+    const char *host_name,
+    const AvahiAddress *a,
+    uint16_t port,
+    AvahiStringList *txt,
+    AvahiLookupResultFlags flags,
+    void* userdata) {
+
+    AsyncServiceResolverInfo *i = userdata;
+    DBusMessage *reply;
+
+    assert(r);
+    assert(i);
+
+    reply = dbus_message_new_signal(i->path, AVAHI_DBUS_INTERFACE_SERVICE_RESOLVER, avahi_dbus_map_resolve_signal_name(event));
+
+    if (!reply) {
+        avahi_log_error("Failed allocate message");
+        return;
+    }
+
+    if (event == AVAHI_RESOLVER_FOUND) {
+        char t[AVAHI_ADDRESS_STR_MAX], *pt = t;
+        int32_t i_interface, i_protocol, i_aprotocol;
+        uint32_t u_flags;
+
+        assert(host_name);
+
+/*         avahi_log_debug(__FILE__": [%s] Successfully resolved service <%s.%s.%s>", i->path, name, type, domain); */
+
+        if (a)
+            avahi_address_snprint(t, sizeof(t), a);
+        else
+            t[0] = 0;
+
+        if (!name)
+            name = "";
+
+        if (avahi_dbus_is_our_own_service(i->client, interface, protocol, name, type, domain) > 0)
+            flags |= AVAHI_LOOKUP_RESULT_OUR_OWN;
+
+        i_interface = (int32_t) interface;
+        i_protocol = (int32_t) protocol;
+        if (a)
+	    i_aprotocol = (int32_t) a->proto;
+	else
+	    i_aprotocol = AVAHI_PROTO_UNSPEC;
+        u_flags = (uint32_t) flags;
+
+        dbus_message_append_args(
+            reply,
+            DBUS_TYPE_INT32, &i_interface,
+            DBUS_TYPE_INT32, &i_protocol,
+            DBUS_TYPE_STRING, &name,
+            DBUS_TYPE_STRING, &type,
+            DBUS_TYPE_STRING, &domain,
+            DBUS_TYPE_STRING, &host_name,
+            DBUS_TYPE_INT32, &i_aprotocol,
+            DBUS_TYPE_STRING, &pt,
+            DBUS_TYPE_UINT16, &port,
+            DBUS_TYPE_INVALID);
+
+        avahi_dbus_append_string_list(reply, txt);
+
+        dbus_message_append_args(
+            reply,
+            DBUS_TYPE_UINT32, &u_flags,
+            DBUS_TYPE_INVALID);
+    }  else {
+        assert(event == AVAHI_RESOLVER_FAILURE);
+        avahi_dbus_append_server_error(reply);
+    }
+
+    dbus_message_set_destination(reply, i->client->name);
+    dbus_connection_send(server->bus, reply, NULL);
+    dbus_message_unref(reply);
+}
+
+DBusHandlerResult avahi_dbus_msg_async_service_resolver_impl(DBusConnection *c, DBusMessage *m, void *userdata) {
+    DBusError error;
+    AsyncServiceResolverInfo *i = userdata;
+
+    assert(c);
+    assert(m);
+    assert(i);
+
+    dbus_error_init(&error);
+
+    avahi_log_debug(__FILE__": interface=%s, path=%s, member=%s",
+                    dbus_message_get_interface(m),
+                    dbus_message_get_path(m),
+                    dbus_message_get_member(m));
+
+    /* Introspection */
+    if (dbus_message_is_method_call(m, DBUS_INTERFACE_INTROSPECTABLE, "Introspect"))
+        return avahi_dbus_handle_introspect(c, m, "org.freedesktop.Avahi.ServiceResolver.xml");
+
+    /* Access control */
+    if (strcmp(dbus_message_get_sender(m), i->client->name))
+        return avahi_dbus_respond_error(c, m, AVAHI_ERR_ACCESS_DENIED, NULL);
+
+    if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVICE_RESOLVER, "Free")) {
+
+        if (!dbus_message_get_args(m, &error, DBUS_TYPE_INVALID)) {
+            avahi_log_warn("Error parsing ServiceResolver::Free message");
+            goto fail;
+        }
+
+        avahi_dbus_async_service_resolver_free(i);
+        return avahi_dbus_respond_ok(c, m);
+    }
+
+    avahi_log_warn("Missed message %s::%s()", dbus_message_get_interface(m), dbus_message_get_member(m));
+
+fail:
+    if (dbus_error_is_set(&error))
+        dbus_error_free(&error);
+
+    return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
diff --git a/avahi-0.6.31/avahi-daemon/dbus-domain-browser.c b/avahi-0.6.31/avahi-daemon/dbus-domain-browser.c
new file mode 100644
index 0000000..e51996f
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/dbus-domain-browser.c
@@ -0,0 +1,132 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+
+#include <avahi-common/malloc.h>
+#include <avahi-common/dbus.h>
+#include <avahi-common/error.h>
+#include <avahi-core/log.h>
+
+#include "dbus-util.h"
+#include "dbus-internal.h"
+
+void avahi_dbus_domain_browser_free(DomainBrowserInfo *i) {
+    assert(i);
+
+    if (i->domain_browser)
+        avahi_s_domain_browser_free(i->domain_browser);
+
+    if (i->path) {
+        dbus_connection_unregister_object_path(server->bus, i->path);
+        avahi_free(i->path);
+    }
+
+    AVAHI_LLIST_REMOVE(DomainBrowserInfo, domain_browsers, i->client->domain_browsers, i);
+
+    assert(i->client->n_objects >= 1);
+    i->client->n_objects--;
+
+    avahi_free(i);
+}
+
+DBusHandlerResult avahi_dbus_msg_domain_browser_impl(DBusConnection *c, DBusMessage *m, void *userdata) {
+    DBusError error;
+    DomainBrowserInfo *i = userdata;
+
+    assert(c);
+    assert(m);
+    assert(i);
+
+    dbus_error_init(&error);
+
+    avahi_log_debug(__FILE__": interface=%s, path=%s, member=%s",
+                    dbus_message_get_interface(m),
+                    dbus_message_get_path(m),
+                    dbus_message_get_member(m));
+
+    /* Introspection */
+    if (dbus_message_is_method_call(m, DBUS_INTERFACE_INTROSPECTABLE, "Introspect"))
+        return avahi_dbus_handle_introspect(c, m, "org.freedesktop.Avahi.DomainBrowser.xml");
+
+    /* Access control */
+    if (strcmp(dbus_message_get_sender(m), i->client->name))
+        return avahi_dbus_respond_error(c, m, AVAHI_ERR_ACCESS_DENIED, NULL);
+
+    if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_DOMAIN_BROWSER, "Free")) {
+
+        if (!dbus_message_get_args(m, &error, DBUS_TYPE_INVALID)) {
+            avahi_log_warn("Error parsing DomainBrowser::Free message");
+            goto fail;
+        }
+
+        avahi_dbus_domain_browser_free(i);
+        return avahi_dbus_respond_ok(c, m);
+
+    }
+
+    avahi_log_warn("Missed message %s::%s()", dbus_message_get_interface(m), dbus_message_get_member(m));
+
+fail:
+    if (dbus_error_is_set(&error))
+        dbus_error_free(&error);
+
+    return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
+
+void avahi_dbus_domain_browser_callback(AvahiSDomainBrowser *b, AvahiIfIndex interface, AvahiProtocol protocol, AvahiBrowserEvent event, const char *domain, AvahiLookupResultFlags flags,  void* userdata) {
+    DomainBrowserInfo *i = userdata;
+    DBusMessage *m;
+    int32_t i_interface, i_protocol;
+    uint32_t u_flags;
+
+    assert(b);
+    assert(i);
+
+    i_interface = (int32_t) interface;
+    i_protocol = (int32_t) protocol;
+    u_flags = (uint32_t) flags;
+
+    m = dbus_message_new_signal(i->path, AVAHI_DBUS_INTERFACE_DOMAIN_BROWSER, avahi_dbus_map_browse_signal_name(event));
+
+    if (!m) {
+        avahi_log_error("Failed allocate message");
+        return;
+    }
+
+    if (event == AVAHI_BROWSER_NEW || event == AVAHI_BROWSER_REMOVE) {
+        assert(domain);
+        dbus_message_append_args(
+            m,
+            DBUS_TYPE_INT32, &i_interface,
+            DBUS_TYPE_INT32, &i_protocol,
+            DBUS_TYPE_STRING, &domain,
+            DBUS_TYPE_UINT32, &u_flags,
+            DBUS_TYPE_INVALID);
+    } else if (event == AVAHI_BROWSER_FAILURE)
+        avahi_dbus_append_server_error(m);
+
+    dbus_message_set_destination(m, i->client->name);
+    dbus_connection_send(server->bus, m, NULL);
+    dbus_message_unref(m);
+}
diff --git a/avahi-0.6.31/avahi-daemon/dbus-entry-group.c b/avahi-0.6.31/avahi-daemon/dbus-entry-group.c
new file mode 100644
index 0000000..4e879a5
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/dbus-entry-group.c
@@ -0,0 +1,369 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+
+#include <avahi-common/malloc.h>
+#include <avahi-common/dbus.h>
+#include <avahi-common/error.h>
+#include <avahi-common/domain.h>
+#include <avahi-core/log.h>
+
+#include "dbus-util.h"
+#include "dbus-internal.h"
+#include "main.h"
+
+void avahi_dbus_entry_group_free(EntryGroupInfo *i) {
+    assert(i);
+
+    if (i->entry_group)
+        avahi_s_entry_group_free(i->entry_group);
+
+    if (i->path) {
+        dbus_connection_unregister_object_path(server->bus, i->path);
+        avahi_free(i->path);
+    }
+    AVAHI_LLIST_REMOVE(EntryGroupInfo, entry_groups, i->client->entry_groups, i);
+
+    assert(i->client->n_objects >= 1);
+    i->client->n_objects--;
+
+    avahi_free(i);
+}
+
+void avahi_dbus_entry_group_callback(AvahiServer *s, AvahiSEntryGroup *g, AvahiEntryGroupState state, void* userdata) {
+    EntryGroupInfo *i = userdata;
+    DBusMessage *m;
+    int32_t t;
+    const char *e;
+
+    assert(s);
+    assert(g);
+    assert(i);
+
+    m = dbus_message_new_signal(i->path, AVAHI_DBUS_INTERFACE_ENTRY_GROUP, "StateChanged");
+
+    if (!m) {
+        avahi_log_error("Failed allocate message");
+        return;
+    }
+
+    t = (int32_t) state;
+    if (state == AVAHI_ENTRY_GROUP_FAILURE)
+        e = avahi_error_number_to_dbus(avahi_server_errno(s));
+    else if (state == AVAHI_ENTRY_GROUP_COLLISION)
+        e = AVAHI_DBUS_ERR_COLLISION;
+    else
+        e = AVAHI_DBUS_ERR_OK;
+
+    dbus_message_append_args(
+        m,
+        DBUS_TYPE_INT32, &t,
+        DBUS_TYPE_STRING, &e,
+        DBUS_TYPE_INVALID);
+    dbus_message_set_destination(m, i->client->name);
+    dbus_connection_send(server->bus, m, NULL);
+    dbus_message_unref(m);
+}
+
+DBusHandlerResult avahi_dbus_msg_entry_group_impl(DBusConnection *c, DBusMessage *m, void *userdata) {
+    DBusError error;
+    EntryGroupInfo *i = userdata;
+
+    assert(c);
+    assert(m);
+    assert(i);
+
+    dbus_error_init(&error);
+
+    avahi_log_debug(__FILE__": interface=%s, path=%s, member=%s",
+                    dbus_message_get_interface(m),
+                    dbus_message_get_path(m),
+                    dbus_message_get_member(m));
+
+    /* Introspection */
+    if (dbus_message_is_method_call(m, DBUS_INTERFACE_INTROSPECTABLE, "Introspect"))
+        return avahi_dbus_handle_introspect(c, m, "org.freedesktop.Avahi.EntryGroup.xml");
+
+    /* Access control */
+    if (strcmp(dbus_message_get_sender(m), i->client->name))
+        return avahi_dbus_respond_error(c, m, AVAHI_ERR_ACCESS_DENIED, NULL);
+
+    if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_ENTRY_GROUP, "Free")) {
+
+        if (!dbus_message_get_args(m, &error, DBUS_TYPE_INVALID)) {
+            avahi_log_warn("Error parsing EntryGroup::Free message");
+            goto fail;
+        }
+
+        avahi_dbus_entry_group_free(i);
+        return avahi_dbus_respond_ok(c, m);
+
+    } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_ENTRY_GROUP, "Commit")) {
+
+        if (!dbus_message_get_args(m, &error, DBUS_TYPE_INVALID)) {
+            avahi_log_warn("Error parsing EntryGroup::Commit message");
+            goto fail;
+        }
+
+        if (avahi_s_entry_group_commit(i->entry_group) < 0)
+            return avahi_dbus_respond_error(c, m, avahi_server_errno(avahi_server), NULL);
+
+        return avahi_dbus_respond_ok(c, m);
+
+
+    } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_ENTRY_GROUP, "Reset")) {
+
+        if (!dbus_message_get_args(m, &error, DBUS_TYPE_INVALID)) {
+            avahi_log_warn("Error parsing EntryGroup::Reset message");
+            goto fail;
+        }
+
+        avahi_s_entry_group_reset(i->entry_group);
+        i->n_entries = 0;
+        return avahi_dbus_respond_ok(c, m);
+
+    } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_ENTRY_GROUP, "IsEmpty")) {
+
+        if (!dbus_message_get_args(m, &error, DBUS_TYPE_INVALID)) {
+            avahi_log_warn("Error parsing EntryGroup::IsEmpty message");
+            goto fail;
+        }
+
+        return avahi_dbus_respond_boolean(c, m, !!avahi_s_entry_group_is_empty(i->entry_group));
+
+    } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_ENTRY_GROUP, "GetState")) {
+        AvahiEntryGroupState state;
+
+        if (!dbus_message_get_args(m, &error, DBUS_TYPE_INVALID)) {
+            avahi_log_warn("Error parsing EntryGroup::GetState message");
+            goto fail;
+        }
+
+        state = avahi_s_entry_group_get_state(i->entry_group);
+        return avahi_dbus_respond_int32(c, m, (int32_t) state);
+
+    } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_ENTRY_GROUP, "AddService")) {
+        int32_t interface, protocol;
+        uint32_t flags;
+        char *type, *name, *domain, *host;
+        uint16_t port;
+        AvahiStringList *strlst = NULL;
+
+        if (!dbus_message_get_args(
+                m, &error,
+                DBUS_TYPE_INT32, &interface,
+                DBUS_TYPE_INT32, &protocol,
+                DBUS_TYPE_UINT32, &flags,
+                DBUS_TYPE_STRING, &name,
+                DBUS_TYPE_STRING, &type,
+                DBUS_TYPE_STRING, &domain,
+                DBUS_TYPE_STRING, &host,
+                DBUS_TYPE_UINT16, &port,
+                DBUS_TYPE_INVALID) ||
+            !type || !name ||
+            avahi_dbus_read_strlst(m, 8, &strlst) < 0) {
+            avahi_log_warn("Error parsing EntryGroup::AddService message");
+            goto fail;
+        }
+
+        if (!(flags & AVAHI_PUBLISH_UPDATE) && i->n_entries >= server->n_entries_per_entry_group_max) {
+            avahi_string_list_free(strlst);
+            return avahi_dbus_respond_error(c, m, AVAHI_ERR_TOO_MANY_ENTRIES, NULL);
+        }
+
+        if (domain && !*domain)
+            domain = NULL;
+
+        if (host && !*host)
+            host = NULL;
+
+        if (avahi_server_add_service_strlst(avahi_server, i->entry_group, (AvahiIfIndex) interface, (AvahiProtocol) protocol, (AvahiPublishFlags) flags, name, type, domain, host, port, strlst) < 0) {
+            avahi_string_list_free(strlst);
+            return avahi_dbus_respond_error(c, m, avahi_server_errno(avahi_server), NULL);
+        }
+
+        if (!(flags & AVAHI_PUBLISH_UPDATE))
+            i->n_entries ++;
+
+        avahi_string_list_free(strlst);
+
+        return avahi_dbus_respond_ok(c, m);
+
+    } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_ENTRY_GROUP, "AddServiceSubtype")) {
+
+        int32_t interface, protocol;
+        uint32_t flags;
+        char *type, *name, *domain, *subtype;
+
+        if (!dbus_message_get_args(
+                m, &error,
+                DBUS_TYPE_INT32, &interface,
+                DBUS_TYPE_INT32, &protocol,
+                DBUS_TYPE_UINT32, &flags,
+                DBUS_TYPE_STRING, &name,
+                DBUS_TYPE_STRING, &type,
+                DBUS_TYPE_STRING, &domain,
+                DBUS_TYPE_STRING, &subtype,
+                DBUS_TYPE_INVALID) || !type || !name || !subtype) {
+            avahi_log_warn("Error parsing EntryGroup::AddServiceSubtype message");
+            goto fail;
+        }
+
+        if (!(flags & AVAHI_PUBLISH_UPDATE) && i->n_entries >= server->n_entries_per_entry_group_max)
+            return avahi_dbus_respond_error(c, m, AVAHI_ERR_TOO_MANY_ENTRIES, NULL);
+
+        if (domain && !*domain)
+            domain = NULL;
+
+        if (avahi_server_add_service_subtype(avahi_server, i->entry_group, (AvahiIfIndex) interface, (AvahiProtocol) protocol, (AvahiPublishFlags) flags, name, type, domain, subtype) < 0)
+            return avahi_dbus_respond_error(c, m, avahi_server_errno(avahi_server), NULL);
+
+        if (!(flags & AVAHI_PUBLISH_UPDATE))
+            i->n_entries ++;
+
+        return avahi_dbus_respond_ok(c, m);
+
+    } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_ENTRY_GROUP, "UpdateServiceTxt")) {
+        int32_t interface, protocol;
+        uint32_t flags;
+        char *type, *name, *domain;
+        AvahiStringList *strlst;
+
+        if (!dbus_message_get_args(
+                m, &error,
+                DBUS_TYPE_INT32, &interface,
+                DBUS_TYPE_INT32, &protocol,
+                DBUS_TYPE_UINT32, &flags,
+                DBUS_TYPE_STRING, &name,
+                DBUS_TYPE_STRING, &type,
+                DBUS_TYPE_STRING, &domain,
+                DBUS_TYPE_INVALID) ||
+            !type || !name ||
+            avahi_dbus_read_strlst(m, 6, &strlst)) {
+            avahi_log_warn("Error parsing EntryGroup::UpdateServiceTxt message");
+            goto fail;
+        }
+
+        if (domain && !*domain)
+            domain = NULL;
+
+        if (avahi_server_update_service_txt_strlst(avahi_server, i->entry_group, (AvahiIfIndex) interface, (AvahiProtocol) protocol, (AvahiPublishFlags) flags, name, type, domain, strlst) < 0) {
+            avahi_string_list_free(strlst);
+            return avahi_dbus_respond_error(c, m, avahi_server_errno(avahi_server), NULL);
+        }
+
+        avahi_string_list_free(strlst);
+
+        return avahi_dbus_respond_ok(c, m);
+
+    } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_ENTRY_GROUP, "AddAddress")) {
+        int32_t interface, protocol;
+        uint32_t flags;
+        char *name, *address;
+        AvahiAddress a;
+
+        if (!dbus_message_get_args(
+                m, &error,
+                DBUS_TYPE_INT32, &interface,
+                DBUS_TYPE_INT32, &protocol,
+                DBUS_TYPE_UINT32, &flags,
+                DBUS_TYPE_STRING, &name,
+                DBUS_TYPE_STRING, &address,
+                DBUS_TYPE_INVALID) || !name || !address) {
+            avahi_log_warn("Error parsing EntryGroup::AddAddress message");
+            goto fail;
+        }
+
+        if (!(flags & AVAHI_PUBLISH_UPDATE) && i->n_entries >= server->n_entries_per_entry_group_max)
+            return avahi_dbus_respond_error(c, m, AVAHI_ERR_TOO_MANY_ENTRIES, NULL);
+
+        if (!(avahi_address_parse(address, AVAHI_PROTO_UNSPEC, &a)))
+            return avahi_dbus_respond_error(c, m, AVAHI_ERR_INVALID_ADDRESS, NULL);
+
+        if (avahi_server_add_address(avahi_server, i->entry_group, (AvahiIfIndex) interface, (AvahiProtocol) protocol, (AvahiPublishFlags) flags, name, &a) < 0)
+            return avahi_dbus_respond_error(c, m, avahi_server_errno(avahi_server), NULL);
+
+        if (!(flags & AVAHI_PUBLISH_UPDATE))
+            i->n_entries ++;
+
+        return avahi_dbus_respond_ok(c, m);
+    } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_ENTRY_GROUP, "AddRecord")) {
+        int32_t interface, protocol;
+        uint32_t flags, ttl, size;
+        uint16_t clazz, type;
+        char *name;
+        void *rdata;
+        AvahiRecord *r;
+
+        if (!dbus_message_get_args(
+                m, &error,
+                DBUS_TYPE_INT32, &interface,
+                DBUS_TYPE_INT32, &protocol,
+                DBUS_TYPE_UINT32, &flags,
+                DBUS_TYPE_STRING, &name,
+                DBUS_TYPE_UINT16, &clazz,
+                DBUS_TYPE_UINT16, &type,
+                DBUS_TYPE_UINT32, &ttl,
+                DBUS_TYPE_INVALID) || !name ||
+            avahi_dbus_read_rdata (m, 7, &rdata, &size)) {
+            avahi_log_warn("Error parsing EntryGroup::AddRecord message");
+            goto fail;
+        }
+
+        if (!(flags & AVAHI_PUBLISH_UPDATE) && i->n_entries >= server->n_entries_per_entry_group_max)
+            return avahi_dbus_respond_error(c, m, AVAHI_ERR_TOO_MANY_ENTRIES, NULL);
+
+        if (!avahi_is_valid_domain_name (name))
+            return avahi_dbus_respond_error(c, m, AVAHI_ERR_INVALID_DOMAIN_NAME, NULL);
+
+        if (!(r = avahi_record_new_full (name, clazz, type, ttl)))
+            return avahi_dbus_respond_error(c, m, AVAHI_ERR_NO_MEMORY, NULL);
+
+        if (avahi_rdata_parse (r, rdata, size) < 0) {
+            avahi_record_unref (r);
+            return avahi_dbus_respond_error(c, m, AVAHI_ERR_INVALID_RDATA, NULL);
+        }
+
+        if (avahi_server_add(avahi_server, i->entry_group, (AvahiIfIndex) interface, (AvahiProtocol) protocol, (AvahiPublishFlags) flags, r) < 0) {
+            avahi_record_unref (r);
+            return avahi_dbus_respond_error(c, m, avahi_server_errno(avahi_server), NULL);
+        }
+
+        if (!(flags & AVAHI_PUBLISH_UPDATE))
+            i->n_entries ++;
+
+        avahi_record_unref (r);
+
+        return avahi_dbus_respond_ok(c, m);
+    }
+
+
+    avahi_log_warn("Missed message %s::%s()", dbus_message_get_interface(m), dbus_message_get_member(m));
+
+fail:
+    if (dbus_error_is_set(&error))
+        dbus_error_free(&error);
+
+    return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
diff --git a/avahi-0.6.31/avahi-daemon/dbus-internal.h b/avahi-0.6.31/avahi-daemon/dbus-internal.h
new file mode 100644
index 0000000..0b86578
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/dbus-internal.h
@@ -0,0 +1,256 @@
+#ifndef foodbusinternalhfoo
+#define foodbusinternalhfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+
+#include <dbus/dbus.h>
+
+#include <avahi-core/core.h>
+#include <avahi-core/publish.h>
+#include <avahi-core/lookup.h>
+
+#include <avahi-common/llist.h>
+
+typedef struct Server Server;
+typedef struct Client Client;
+typedef struct EntryGroupInfo EntryGroupInfo;
+typedef struct SyncHostNameResolverInfo SyncHostNameResolverInfo;
+typedef struct AsyncHostNameResolverInfo AsyncHostNameResolverInfo;
+typedef struct SyncAddressResolverInfo SyncAddressResolverInfo;
+typedef struct AsyncAddressResolverInfo AsyncAddressResolverInfo;
+typedef struct DomainBrowserInfo DomainBrowserInfo;
+typedef struct ServiceTypeBrowserInfo ServiceTypeBrowserInfo;
+typedef struct ServiceBrowserInfo ServiceBrowserInfo;
+typedef struct SyncServiceResolverInfo SyncServiceResolverInfo;
+typedef struct AsyncServiceResolverInfo AsyncServiceResolverInfo;
+typedef struct RecordBrowserInfo RecordBrowserInfo;
+
+#define DEFAULT_CLIENTS_MAX 4096
+#define DEFAULT_OBJECTS_PER_CLIENT_MAX 1024
+#define DEFAULT_ENTRIES_PER_ENTRY_GROUP_MAX 32
+
+struct EntryGroupInfo {
+    unsigned id;
+    Client *client;
+    AvahiSEntryGroup *entry_group;
+    char *path;
+
+    unsigned n_entries;
+
+    AVAHI_LLIST_FIELDS(EntryGroupInfo, entry_groups);
+};
+
+struct SyncHostNameResolverInfo {
+    Client *client;
+    AvahiSHostNameResolver *host_name_resolver;
+    DBusMessage *message;
+
+    AVAHI_LLIST_FIELDS(SyncHostNameResolverInfo, sync_host_name_resolvers);
+};
+
+struct AsyncHostNameResolverInfo {
+    unsigned id;
+    Client *client;
+    AvahiSHostNameResolver *host_name_resolver;
+    char *path;
+
+    AVAHI_LLIST_FIELDS(AsyncHostNameResolverInfo, async_host_name_resolvers);
+};
+
+struct SyncAddressResolverInfo {
+    Client *client;
+    AvahiSAddressResolver *address_resolver;
+    DBusMessage *message;
+
+    AVAHI_LLIST_FIELDS(SyncAddressResolverInfo, sync_address_resolvers);
+};
+
+struct AsyncAddressResolverInfo {
+    unsigned id;
+    Client *client;
+    AvahiSAddressResolver *address_resolver;
+    char *path;
+
+    AVAHI_LLIST_FIELDS(AsyncAddressResolverInfo, async_address_resolvers);
+};
+
+struct DomainBrowserInfo {
+    unsigned id;
+    Client *client;
+    AvahiSDomainBrowser *domain_browser;
+    char *path;
+
+    AVAHI_LLIST_FIELDS(DomainBrowserInfo, domain_browsers);
+};
+
+struct ServiceTypeBrowserInfo {
+    unsigned id;
+    Client *client;
+    AvahiSServiceTypeBrowser *service_type_browser;
+    char *path;
+
+    AVAHI_LLIST_FIELDS(ServiceTypeBrowserInfo, service_type_browsers);
+};
+
+struct ServiceBrowserInfo {
+    unsigned id;
+    Client *client;
+    AvahiSServiceBrowser *service_browser;
+    char *path;
+
+    AVAHI_LLIST_FIELDS(ServiceBrowserInfo, service_browsers);
+};
+
+struct SyncServiceResolverInfo {
+    Client *client;
+    AvahiSServiceResolver *service_resolver;
+    DBusMessage *message;
+
+    AVAHI_LLIST_FIELDS(SyncServiceResolverInfo, sync_service_resolvers);
+};
+
+struct AsyncServiceResolverInfo {
+    unsigned id;
+    Client *client;
+    AvahiSServiceResolver *service_resolver;
+    char *path;
+
+    AVAHI_LLIST_FIELDS(AsyncServiceResolverInfo, async_service_resolvers);
+};
+
+struct RecordBrowserInfo {
+    unsigned id;
+    Client *client;
+    AvahiSRecordBrowser *record_browser;
+    char *path;
+
+    AVAHI_LLIST_FIELDS(RecordBrowserInfo, record_browsers);
+};
+
+struct Client {
+    unsigned id;
+    char *name;
+    unsigned current_id;
+    unsigned n_objects;
+
+    AVAHI_LLIST_FIELDS(Client, clients);
+    AVAHI_LLIST_HEAD(EntryGroupInfo, entry_groups);
+    AVAHI_LLIST_HEAD(SyncHostNameResolverInfo, sync_host_name_resolvers);
+    AVAHI_LLIST_HEAD(AsyncHostNameResolverInfo, async_host_name_resolvers);
+    AVAHI_LLIST_HEAD(SyncAddressResolverInfo, sync_address_resolvers);
+    AVAHI_LLIST_HEAD(AsyncAddressResolverInfo, async_address_resolvers);
+    AVAHI_LLIST_HEAD(DomainBrowserInfo, domain_browsers);
+    AVAHI_LLIST_HEAD(ServiceTypeBrowserInfo, service_type_browsers);
+    AVAHI_LLIST_HEAD(ServiceBrowserInfo, service_browsers);
+    AVAHI_LLIST_HEAD(SyncServiceResolverInfo, sync_service_resolvers);
+    AVAHI_LLIST_HEAD(AsyncServiceResolverInfo, async_service_resolvers);
+    AVAHI_LLIST_HEAD(RecordBrowserInfo, record_browsers);
+};
+
+struct Server {
+    const AvahiPoll *poll_api;
+    DBusConnection *bus;
+    AVAHI_LLIST_HEAD(Client, clients);
+    unsigned n_clients;
+    unsigned current_id;
+
+    AvahiTimeout *reconnect_timeout;
+    int reconnect;
+
+    unsigned n_clients_max;
+    unsigned n_objects_per_client_max;
+    unsigned n_entries_per_entry_group_max;
+
+    int disable_user_service_publishing;
+};
+
+extern Server *server;
+
+void avahi_dbus_entry_group_free(EntryGroupInfo *i);
+void avahi_dbus_entry_group_callback(AvahiServer *s, AvahiSEntryGroup *g, AvahiEntryGroupState state, void* userdata);
+DBusHandlerResult avahi_dbus_msg_entry_group_impl(DBusConnection *c, DBusMessage *m, void *userdata);
+
+void avahi_dbus_sync_host_name_resolver_free(SyncHostNameResolverInfo *i);
+void avahi_dbus_sync_host_name_resolver_callback(AvahiSHostNameResolver *r, AvahiIfIndex interface, AvahiProtocol protocol, AvahiResolverEvent event, const char *host_name, const AvahiAddress *a, AvahiLookupResultFlags flags, void* userdata);
+
+void avahi_dbus_async_host_name_resolver_free(AsyncHostNameResolverInfo *i);
+void avahi_dbus_async_host_name_resolver_callback(AvahiSHostNameResolver *r, AvahiIfIndex interface, AvahiProtocol protocol, AvahiResolverEvent event, const char *host_name, const AvahiAddress *a, AvahiLookupResultFlags flags, void* userdata);
+DBusHandlerResult avahi_dbus_msg_async_host_name_resolver_impl(DBusConnection *c, DBusMessage *m, void *userdata);
+
+void avahi_dbus_sync_address_resolver_free(SyncAddressResolverInfo *i);
+void avahi_dbus_sync_address_resolver_callback(AvahiSAddressResolver *r, AvahiIfIndex interface, AvahiProtocol protocol, AvahiResolverEvent event, const AvahiAddress *address, const char *host_name, AvahiLookupResultFlags flags, void* userdata);
+
+void avahi_dbus_async_address_resolver_free(AsyncAddressResolverInfo *i);
+void avahi_dbus_async_address_resolver_callback(AvahiSAddressResolver *r, AvahiIfIndex interface, AvahiProtocol protocol, AvahiResolverEvent event, const AvahiAddress *address, const char *host_name, AvahiLookupResultFlags flags, void* userdata);
+DBusHandlerResult avahi_dbus_msg_async_address_resolver_impl(DBusConnection *c, DBusMessage *m, void *userdata);
+
+void avahi_dbus_domain_browser_free(DomainBrowserInfo *i);
+DBusHandlerResult avahi_dbus_msg_domain_browser_impl(DBusConnection *c, DBusMessage *m, void *userdata);
+void avahi_dbus_domain_browser_callback(AvahiSDomainBrowser *b, AvahiIfIndex interface, AvahiProtocol protocol, AvahiBrowserEvent event, const char *domain, AvahiLookupResultFlags flags,  void* userdata);
+
+void avahi_dbus_service_type_browser_free(ServiceTypeBrowserInfo *i);
+DBusHandlerResult avahi_dbus_msg_service_type_browser_impl(DBusConnection *c, DBusMessage *m, void *userdata);
+void avahi_dbus_service_type_browser_callback(AvahiSServiceTypeBrowser *b, AvahiIfIndex interface, AvahiProtocol protocol, AvahiBrowserEvent event, const char *type, const char *domain, AvahiLookupResultFlags flags, void* userdata);
+
+void avahi_dbus_service_browser_free(ServiceBrowserInfo *i);
+DBusHandlerResult avahi_dbus_msg_service_browser_impl(DBusConnection *c, DBusMessage *m, void *userdata);
+void avahi_dbus_service_browser_callback(AvahiSServiceBrowser *b, AvahiIfIndex interface, AvahiProtocol protocol, AvahiBrowserEvent event, const char *name, const char *type, const char *domain, AvahiLookupResultFlags flags, void* userdata);
+
+void avahi_dbus_sync_service_resolver_free(SyncServiceResolverInfo *i);
+
+void avahi_dbus_sync_service_resolver_callback(
+    AvahiSServiceResolver *r,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiResolverEvent event,
+    const char *name,
+    const char *type,
+    const char *domain,
+    const char *host_name,
+    const AvahiAddress *a,
+    uint16_t port,
+    AvahiStringList *txt,
+    AvahiLookupResultFlags flags,
+    void* userdata);
+
+void avahi_dbus_async_service_resolver_free(AsyncServiceResolverInfo *i);
+void avahi_dbus_async_service_resolver_callback(
+    AvahiSServiceResolver *r,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiResolverEvent event,
+    const char *name,
+    const char *type,
+    const char *domain,
+    const char *host_name,
+    const AvahiAddress *a,
+    uint16_t port,
+    AvahiStringList *txt,
+    AvahiLookupResultFlags flags,
+    void* userdata);
+
+DBusHandlerResult avahi_dbus_msg_async_service_resolver_impl(DBusConnection *c, DBusMessage *m, void *userdata);
+
+void avahi_dbus_record_browser_free(RecordBrowserInfo *i);
+DBusHandlerResult avahi_dbus_msg_record_browser_impl(DBusConnection *c, DBusMessage *m, void *userdata);
+void avahi_dbus_record_browser_callback(AvahiSRecordBrowser *b, AvahiIfIndex interface, AvahiProtocol protocol, AvahiBrowserEvent event, AvahiRecord *record, AvahiLookupResultFlags flags, void* userdata);
+
+#endif
diff --git a/avahi-0.6.31/avahi-daemon/dbus-protocol.c b/avahi-0.6.31/avahi-daemon/dbus-protocol.c
new file mode 100644
index 0000000..eb8a662
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/dbus-protocol.c
@@ -0,0 +1,1226 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+#include <sys/ioctl.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <net/if.h>
+#include <errno.h>
+#include <unistd.h>
+#include <assert.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <signal.h>
+#include <stdlib.h>
+
+#include <dbus/dbus.h>
+
+#include <avahi-common/dbus.h>
+#include <avahi-common/llist.h>
+#include <avahi-common/malloc.h>
+#include <avahi-common/dbus-watch-glue.h>
+#include <avahi-common/alternative.h>
+#include <avahi-common/error.h>
+#include <avahi-common/domain.h>
+#include <avahi-common/timeval.h>
+
+#include <avahi-core/log.h>
+#include <avahi-core/core.h>
+#include <avahi-core/lookup.h>
+#include <avahi-core/publish.h>
+
+#include "dbus-protocol.h"
+#include "dbus-util.h"
+#include "dbus-internal.h"
+#include "main.h"
+
+/* #define VALGRIND_WORKAROUND 1 */
+
+#define RECONNECT_MSEC 3000
+
+Server *server = NULL;
+
+static int dbus_connect(void);
+static void dbus_disconnect(void);
+
+static void client_free(Client *c) {
+
+    assert(server);
+    assert(c);
+
+    while (c->entry_groups)
+        avahi_dbus_entry_group_free(c->entry_groups);
+
+    while (c->sync_host_name_resolvers)
+        avahi_dbus_sync_host_name_resolver_free(c->sync_host_name_resolvers);
+
+    while (c->async_host_name_resolvers)
+        avahi_dbus_async_host_name_resolver_free(c->async_host_name_resolvers);
+
+    while (c->sync_address_resolvers)
+        avahi_dbus_sync_address_resolver_free(c->sync_address_resolvers);
+
+    while (c->async_address_resolvers)
+        avahi_dbus_async_address_resolver_free(c->async_address_resolvers);
+
+    while (c->domain_browsers)
+        avahi_dbus_domain_browser_free(c->domain_browsers);
+
+    while (c->service_type_browsers)
+        avahi_dbus_service_type_browser_free(c->service_type_browsers);
+
+    while (c->service_browsers)
+        avahi_dbus_service_browser_free(c->service_browsers);
+
+    while (c->sync_service_resolvers)
+        avahi_dbus_sync_service_resolver_free(c->sync_service_resolvers);
+
+    while (c->async_service_resolvers)
+        avahi_dbus_async_service_resolver_free(c->async_service_resolvers);
+
+    while (c->record_browsers)
+        avahi_dbus_record_browser_free(c->record_browsers);
+
+    assert(c->n_objects == 0);
+
+    avahi_free(c->name);
+    AVAHI_LLIST_REMOVE(Client, clients, server->clients, c);
+    avahi_free(c);
+
+    assert(server->n_clients >= 1);
+    server->n_clients --;
+}
+
+static Client *client_get(const char *name, int create) {
+    Client *client;
+
+    assert(server);
+    assert(name);
+
+    for (client = server->clients; client; client = client->clients_next)
+        if (!strcmp(name, client->name))
+            return client;
+
+    if (!create)
+        return NULL;
+
+    if (server->n_clients >= server->n_clients_max)
+        return NULL;
+
+    /* If not existent yet, create a new entry */
+    client = avahi_new(Client, 1);
+    client->id = server->current_id++;
+    client->name = avahi_strdup(name);
+    client->current_id = 0;
+    client->n_objects = 0;
+
+    AVAHI_LLIST_HEAD_INIT(EntryGroupInfo, client->entry_groups);
+    AVAHI_LLIST_HEAD_INIT(SyncHostNameResolverInfo, client->sync_host_name_resolvers);
+    AVAHI_LLIST_HEAD_INIT(AsyncHostNameResolverInfo, client->async_host_name_resolvers);
+    AVAHI_LLIST_HEAD_INIT(SyncAddressResolverInfo, client->sync_address_resolvers);
+    AVAHI_LLIST_HEAD_INIT(AsyncAddressResolverInfo, client->async_address_resolvers);
+    AVAHI_LLIST_HEAD_INIT(DomainBrowserInfo, client->domain_browsers);
+    AVAHI_LLIST_HEAD_INIT(ServiceTypeBrowserInfo, client->service_type_browsers);
+    AVAHI_LLIST_HEAD_INIT(ServiceBrowserInfo, client->service_browsers);
+    AVAHI_LLIST_HEAD_INIT(SyncServiceResolverInfo, client->sync_service_resolvers);
+    AVAHI_LLIST_HEAD_INIT(AsyncServiceResolverInfo, client->async_service_resolvers);
+    AVAHI_LLIST_HEAD_INIT(RecordBrowserInfo, client->record_browsers);
+
+    AVAHI_LLIST_PREPEND(Client, clients, server->clients, client);
+
+    server->n_clients++;
+    assert(server->n_clients > 0);
+
+    return client;
+}
+
+static void reconnect_callback(AvahiTimeout *t, AVAHI_GCC_UNUSED void *userdata) {
+    assert(!server->bus);
+
+    if (dbus_connect() < 0) {
+        struct timeval tv;
+        avahi_log_debug(__FILE__": Connection failed, retrying in %ims...", RECONNECT_MSEC);
+        avahi_elapse_time(&tv, RECONNECT_MSEC, 0);
+        server->poll_api->timeout_update(t, &tv);
+    } else {
+        avahi_log_debug(__FILE__": Successfully reconnected.");
+        server->poll_api->timeout_update(t, NULL);
+    }
+}
+
+static DBusHandlerResult msg_signal_filter_impl(AVAHI_GCC_UNUSED DBusConnection *c, DBusMessage *m, AVAHI_GCC_UNUSED void *userdata) {
+    DBusError error;
+
+    dbus_error_init(&error);
+
+/*     avahi_log_debug(__FILE__": interface=%s, path=%s, member=%s", */
+/*                     dbus_message_get_interface(m), */
+/*                     dbus_message_get_path(m), */
+/*                     dbus_message_get_member(m)); */
+
+    if (dbus_message_is_signal(m, DBUS_INTERFACE_LOCAL, "Disconnected")) {
+        struct timeval tv;
+
+        if (server->reconnect) {
+            avahi_log_warn("Disconnected from D-Bus, trying to reconnect in %ims...", RECONNECT_MSEC);
+
+            dbus_disconnect();
+
+            avahi_elapse_time(&tv, RECONNECT_MSEC, 0);
+
+            if (server->reconnect_timeout)
+                server->poll_api->timeout_update(server->reconnect_timeout, &tv);
+            else
+                server->reconnect_timeout = server->poll_api->timeout_new(server->poll_api, &tv, reconnect_callback, NULL);
+        } else {
+            avahi_log_warn("Disconnected from D-Bus, exiting.");
+            raise(SIGTERM);
+        }
+
+        return DBUS_HANDLER_RESULT_HANDLED;
+
+    } else if (dbus_message_is_signal(m, DBUS_INTERFACE_DBUS, "NameAcquired")) {
+        char *name;
+
+        if (!dbus_message_get_args(m, &error, DBUS_TYPE_STRING, &name, DBUS_TYPE_INVALID)) {
+            avahi_log_warn("Error parsing NameAcquired message");
+            goto fail;
+        }
+
+/*         avahi_log_info(__FILE__": name acquired (%s)", name); */
+        return DBUS_HANDLER_RESULT_HANDLED;
+
+    } else if (dbus_message_is_signal(m, DBUS_INTERFACE_DBUS, "NameOwnerChanged")) {
+        char *name, *old, *new;
+
+        if (!dbus_message_get_args(m, &error, DBUS_TYPE_STRING, &name, DBUS_TYPE_STRING, &old, DBUS_TYPE_STRING, &new, DBUS_TYPE_INVALID)) {
+            avahi_log_warn("Error parsing NameOwnerChanged message");
+            goto fail;
+        }
+
+        if (!*new) {
+            Client *client;
+
+            if ((client = client_get(name, FALSE))) {
+                avahi_log_debug(__FILE__": client %s vanished.", name);
+                client_free(client);
+            }
+        }
+    }
+
+fail:
+    if (dbus_error_is_set(&error))
+        dbus_error_free(&error);
+
+    return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
+
+static DBusHandlerResult msg_server_impl(DBusConnection *c, DBusMessage *m, AVAHI_GCC_UNUSED void *userdata) {
+    DBusError error;
+
+    dbus_error_init(&error);
+
+    avahi_log_debug(__FILE__": interface=%s, path=%s, member=%s",
+                    dbus_message_get_interface(m),
+                    dbus_message_get_path(m),
+                    dbus_message_get_member(m));
+
+    if (dbus_message_is_method_call(m, DBUS_INTERFACE_INTROSPECTABLE, "Introspect"))
+        return avahi_dbus_handle_introspect(c, m, "org.freedesktop.Avahi.Server.xml");
+
+    else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVER, "GetHostName")) {
+
+        if (!dbus_message_get_args(m, &error, DBUS_TYPE_INVALID)) {
+            avahi_log_warn("Error parsing Server::GetHostName message");
+            goto fail;
+        }
+
+        return avahi_dbus_respond_string(c, m, avahi_server_get_host_name(avahi_server));
+
+    } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVER, "SetHostName")) {
+
+        char *name;
+
+        if (!dbus_message_get_args(m, &error, DBUS_TYPE_STRING, &name, DBUS_TYPE_INVALID)) {
+            avahi_log_warn("Error parsing Server::SetHostName message");
+            goto fail;
+        }
+
+        if (avahi_server_set_host_name(avahi_server, name) < 0)
+            return avahi_dbus_respond_error(c, m, avahi_server_errno(avahi_server), NULL);
+
+        avahi_log_info("Changing host name to '%s'.", name);
+
+        return avahi_dbus_respond_ok(c, m);
+
+    } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVER, "GetDomainName")) {
+
+        if (!dbus_message_get_args(m, &error, DBUS_TYPE_INVALID)) {
+            avahi_log_warn("Error parsing Server::GetDomainName message");
+            goto fail;
+        }
+
+        return avahi_dbus_respond_string(c, m, avahi_server_get_domain_name(avahi_server));
+
+    } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVER, "GetHostNameFqdn")) {
+
+        if (!(dbus_message_get_args(m, &error, DBUS_TYPE_INVALID))) {
+            avahi_log_warn("Error parsing Server::GetHostNameFqdn message");
+            goto fail;
+        }
+
+        return avahi_dbus_respond_string(c, m, avahi_server_get_host_name_fqdn(avahi_server));
+
+    } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVER, "IsNSSSupportAvailable")) {
+        if (!(dbus_message_get_args(m, &error, DBUS_TYPE_INVALID))) {
+            avahi_log_warn("Error parsing Server::IsNSSSupportAvailable message");
+            goto fail;
+        }
+
+        return avahi_dbus_respond_boolean(c, m, nss_support);
+
+    } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVER, "GetVersionString")) {
+
+        if (!(dbus_message_get_args(m, &error, DBUS_TYPE_INVALID))) {
+            avahi_log_warn("Error parsing Server::GetVersionString message");
+            goto fail;
+        }
+
+        return avahi_dbus_respond_string(c, m, PACKAGE_STRING);
+
+    } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVER, "GetAPIVersion")) {
+
+        if (!(dbus_message_get_args(m, &error, DBUS_TYPE_INVALID))) {
+            avahi_log_warn("Error parsing Server::GetAPIVersion message");
+            goto fail;
+        }
+
+        return avahi_dbus_respond_uint32(c, m, AVAHI_DBUS_API_VERSION);
+
+    } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVER, "GetState")) {
+        AvahiServerState state;
+
+        if (!(dbus_message_get_args(m, &error, DBUS_TYPE_INVALID))) {
+            avahi_log_warn("Error parsing Server::GetState message");
+            goto fail;
+        }
+
+        state = avahi_server_get_state(avahi_server);
+        return avahi_dbus_respond_int32(c, m, (int32_t) state);
+
+    } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVER, "GetLocalServiceCookie")) {
+
+        if (!(dbus_message_get_args(m, &error, DBUS_TYPE_INVALID))) {
+            avahi_log_warn("Error parsing Server::GetLocalServiceCookie message");
+            goto fail;
+        }
+
+        return avahi_dbus_respond_uint32(c, m, avahi_server_get_local_service_cookie(avahi_server));
+
+    } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVER, "GetNetworkInterfaceNameByIndex")) {
+        int32_t idx;
+        char name[IF_NAMESIZE];
+
+        if (!(dbus_message_get_args(m, &error, DBUS_TYPE_INT32, &idx, DBUS_TYPE_INVALID))) {
+            avahi_log_warn("Error parsing Server::GetNetworkInterfaceNameByIndex message");
+            goto fail;
+        }
+
+#ifdef VALGRIND_WORKAROUND
+        return respond_string(c, m, "blah");
+#else
+        if ((!if_indextoname(idx, name))) {
+            char txt[256];
+            snprintf(txt, sizeof(txt), "OS Error: %s", strerror(errno));
+            return avahi_dbus_respond_error(c, m, AVAHI_ERR_OS, txt);
+        }
+
+        return avahi_dbus_respond_string(c, m, name);
+#endif
+
+    } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVER, "GetNetworkInterfaceIndexByName")) {
+        char *n;
+        int32_t idx;
+
+        if (!(dbus_message_get_args(m, &error, DBUS_TYPE_STRING, &n, DBUS_TYPE_INVALID)) || !n) {
+            avahi_log_warn("Error parsing Server::GetNetworkInterfaceIndexByName message");
+            goto fail;
+        }
+
+#ifdef VALGRIND_WORKAROUND
+        return respond_int32(c, m, 1);
+#else
+        if (!(idx = if_nametoindex(n))) {
+            char txt[256];
+            snprintf(txt, sizeof(txt), "OS Error: %s", strerror(errno));
+            return avahi_dbus_respond_error(c, m, AVAHI_ERR_OS, txt);
+        }
+
+        return avahi_dbus_respond_int32(c, m, idx);
+#endif
+
+    } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVER, "GetAlternativeHostName")) {
+        char *n, * t;
+
+        if (!(dbus_message_get_args(m, &error, DBUS_TYPE_STRING, &n, DBUS_TYPE_INVALID)) || !n) {
+            avahi_log_warn("Error parsing Server::GetAlternativeHostName message");
+            goto fail;
+        }
+
+        t = avahi_alternative_host_name(n);
+        avahi_dbus_respond_string(c, m, t);
+        avahi_free(t);
+
+        return DBUS_HANDLER_RESULT_HANDLED;
+
+    } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVER, "GetAlternativeServiceName")) {
+        char *n, *t;
+
+        if (!(dbus_message_get_args(m, &error, DBUS_TYPE_STRING, &n, DBUS_TYPE_INVALID)) || !n) {
+            avahi_log_warn("Error parsing Server::GetAlternativeServiceName message");
+            goto fail;
+        }
+
+        t = avahi_alternative_service_name(n);
+        avahi_dbus_respond_string(c, m, t);
+        avahi_free(t);
+
+        return DBUS_HANDLER_RESULT_HANDLED;
+
+    } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVER, "EntryGroupNew")) {
+        Client *client;
+        EntryGroupInfo *i;
+        static const DBusObjectPathVTable vtable = {
+            NULL,
+            avahi_dbus_msg_entry_group_impl,
+            NULL,
+            NULL,
+            NULL,
+            NULL
+        };
+
+        if (!dbus_message_get_args(m, &error, DBUS_TYPE_INVALID)) {
+            avahi_log_warn("Error parsing Server::EntryGroupNew message");
+            goto fail;
+        }
+
+        if (server->disable_user_service_publishing)
+            return avahi_dbus_respond_error(c, m, AVAHI_ERR_NOT_PERMITTED, NULL);
+
+        if (!(client = client_get(dbus_message_get_sender(m), TRUE))) {
+            avahi_log_warn("Too many clients, client request failed.");
+            return avahi_dbus_respond_error(c, m, AVAHI_ERR_TOO_MANY_CLIENTS, NULL);
+        }
+
+        if (client->n_objects >= server->n_objects_per_client_max) {
+            avahi_log_warn("Too many objects for client '%s', client request failed.", client->name);
+            return avahi_dbus_respond_error(c, m, AVAHI_ERR_TOO_MANY_OBJECTS, NULL);
+        }
+
+        i = avahi_new(EntryGroupInfo, 1);
+        i->id = ++client->current_id;
+        i->client = client;
+        i->path = NULL;
+        i->n_entries = 0;
+        AVAHI_LLIST_PREPEND(EntryGroupInfo, entry_groups, client->entry_groups, i);
+        client->n_objects++;
+
+        if (!(i->entry_group = avahi_s_entry_group_new(avahi_server, avahi_dbus_entry_group_callback, i))) {
+            avahi_dbus_entry_group_free(i);
+            return avahi_dbus_respond_error(c, m, avahi_server_errno(avahi_server), NULL);
+        }
+
+        i->path = avahi_strdup_printf("/Client%u/EntryGroup%u", client->id, i->id);
+        dbus_connection_register_object_path(c, i->path, &vtable, i);
+        return avahi_dbus_respond_path(c, m, i->path);
+
+    } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVER, "ResolveHostName")) {
+        Client *client;
+        int32_t interface, protocol, aprotocol;
+        uint32_t flags;
+        char *name;
+        SyncHostNameResolverInfo *i;
+
+        if (!dbus_message_get_args(
+                m, &error,
+                DBUS_TYPE_INT32, &interface,
+                DBUS_TYPE_INT32, &protocol,
+                DBUS_TYPE_STRING, &name,
+                DBUS_TYPE_INT32, &aprotocol,
+                DBUS_TYPE_UINT32, &flags,
+                DBUS_TYPE_INVALID) || !name) {
+            avahi_log_warn("Error parsing Server::ResolveHostName message");
+            goto fail;
+        }
+
+        if (!(client = client_get(dbus_message_get_sender(m), TRUE))) {
+            avahi_log_warn("Too many clients, client request failed.");
+            return avahi_dbus_respond_error(c, m, AVAHI_ERR_TOO_MANY_CLIENTS, NULL);
+        }
+
+        if (client->n_objects >= server->n_objects_per_client_max) {
+            avahi_log_warn("Too many objects for client '%s', client request failed.", client->name);
+            return avahi_dbus_respond_error(c, m, AVAHI_ERR_TOO_MANY_OBJECTS, NULL);
+        }
+
+        i = avahi_new(SyncHostNameResolverInfo, 1);
+        i->client = client;
+        i->message = dbus_message_ref(m);
+        AVAHI_LLIST_PREPEND(SyncHostNameResolverInfo, sync_host_name_resolvers, client->sync_host_name_resolvers, i);
+        client->n_objects++;
+
+        if (!(i->host_name_resolver = avahi_s_host_name_resolver_new(avahi_server, (AvahiIfIndex) interface, (AvahiProtocol) protocol, name, (AvahiProtocol) aprotocol, (AvahiLookupFlags) flags, avahi_dbus_sync_host_name_resolver_callback, i))) {
+            avahi_dbus_sync_host_name_resolver_free(i);
+            return avahi_dbus_respond_error(c, m, avahi_server_errno(avahi_server), NULL);
+        }
+
+        return DBUS_HANDLER_RESULT_HANDLED;
+
+    } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVER, "ResolveAddress")) {
+        Client *client;
+        int32_t interface, protocol;
+        uint32_t flags;
+        char *address;
+        SyncAddressResolverInfo *i;
+        AvahiAddress a;
+
+        if (!dbus_message_get_args(
+                m, &error,
+                DBUS_TYPE_INT32, &interface,
+                DBUS_TYPE_INT32, &protocol,
+                DBUS_TYPE_STRING, &address,
+                DBUS_TYPE_UINT32, &flags,
+                DBUS_TYPE_INVALID) || !address) {
+            avahi_log_warn("Error parsing Server::ResolveAddress message");
+            goto fail;
+        }
+
+        if (!avahi_address_parse(address, AVAHI_PROTO_UNSPEC, &a))
+            return avahi_dbus_respond_error(c, m, AVAHI_ERR_INVALID_ADDRESS, NULL);
+
+        if (!(client = client_get(dbus_message_get_sender(m), TRUE))) {
+            avahi_log_warn("Too many clients, client request failed.");
+            return avahi_dbus_respond_error(c, m, AVAHI_ERR_TOO_MANY_CLIENTS, NULL);
+        }
+
+        if (client->n_objects >= server->n_objects_per_client_max) {
+            avahi_log_warn("Too many objects for client '%s', client request failed.", client->name);
+            return avahi_dbus_respond_error(c, m, AVAHI_ERR_TOO_MANY_OBJECTS, NULL);
+        }
+
+        i = avahi_new(SyncAddressResolverInfo, 1);
+        i->client = client;
+        i->message = dbus_message_ref(m);
+        AVAHI_LLIST_PREPEND(SyncAddressResolverInfo, sync_address_resolvers, client->sync_address_resolvers, i);
+        client->n_objects++;
+
+        if (!(i->address_resolver = avahi_s_address_resolver_new(avahi_server, (AvahiIfIndex) interface, (AvahiProtocol) protocol, &a, (AvahiLookupFlags) flags, avahi_dbus_sync_address_resolver_callback, i))) {
+            avahi_dbus_sync_address_resolver_free(i);
+            return avahi_dbus_respond_error(c, m, avahi_server_errno(avahi_server), NULL);
+        }
+
+        return DBUS_HANDLER_RESULT_HANDLED;
+
+    } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVER, "DomainBrowserNew")) {
+        Client *client;
+        DomainBrowserInfo *i;
+        static const DBusObjectPathVTable vtable = {
+            NULL,
+            avahi_dbus_msg_domain_browser_impl,
+            NULL,
+            NULL,
+            NULL,
+            NULL
+        };
+        int32_t interface, protocol, type;
+        uint32_t flags;
+        char *domain;
+
+        if (!dbus_message_get_args(
+                m, &error,
+                DBUS_TYPE_INT32, &interface,
+                DBUS_TYPE_INT32, &protocol,
+                DBUS_TYPE_STRING, &domain,
+                DBUS_TYPE_INT32, &type,
+                DBUS_TYPE_UINT32, &flags,
+                DBUS_TYPE_INVALID) || type < 0 || type >= AVAHI_DOMAIN_BROWSER_MAX) {
+            avahi_log_warn("Error parsing Server::DomainBrowserNew message");
+            goto fail;
+        }
+
+        if (!(client = client_get(dbus_message_get_sender(m), TRUE))) {
+            avahi_log_warn("Too many clients, client request failed.");
+            return avahi_dbus_respond_error(c, m, AVAHI_ERR_TOO_MANY_CLIENTS, NULL);
+        }
+
+        if (client->n_objects >= server->n_objects_per_client_max) {
+            avahi_log_warn("Too many objects for client '%s', client request failed.", client->name);
+            return avahi_dbus_respond_error(c, m, AVAHI_ERR_TOO_MANY_OBJECTS, NULL);
+        }
+
+        if (!*domain)
+            domain = NULL;
+
+        i = avahi_new(DomainBrowserInfo, 1);
+        i->id = ++client->current_id;
+        i->client = client;
+        i->path = NULL;
+        AVAHI_LLIST_PREPEND(DomainBrowserInfo, domain_browsers, client->domain_browsers, i);
+        client->n_objects++;
+
+        if (!(i->domain_browser = avahi_s_domain_browser_new(avahi_server, (AvahiIfIndex) interface, (AvahiProtocol) protocol, domain, (AvahiDomainBrowserType) type, (AvahiLookupFlags) flags, avahi_dbus_domain_browser_callback, i))) {
+            avahi_dbus_domain_browser_free(i);
+            return avahi_dbus_respond_error(c, m, avahi_server_errno(avahi_server), NULL);
+        }
+
+        i->path = avahi_strdup_printf("/Client%u/DomainBrowser%u", client->id, i->id);
+        dbus_connection_register_object_path(c, i->path, &vtable, i);
+        return avahi_dbus_respond_path(c, m, i->path);
+
+    } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVER, "ServiceTypeBrowserNew")) {
+        Client *client;
+        ServiceTypeBrowserInfo *i;
+        static const DBusObjectPathVTable vtable = {
+            NULL,
+            avahi_dbus_msg_service_type_browser_impl,
+            NULL,
+            NULL,
+            NULL,
+            NULL
+        };
+        int32_t interface, protocol;
+        uint32_t flags;
+        char *domain;
+
+        if (!dbus_message_get_args(
+                m, &error,
+                DBUS_TYPE_INT32, &interface,
+                DBUS_TYPE_INT32, &protocol,
+                DBUS_TYPE_STRING, &domain,
+                DBUS_TYPE_UINT32, &flags,
+                DBUS_TYPE_INVALID)) {
+            avahi_log_warn("Error parsing Server::ServiceTypeBrowserNew message");
+            goto fail;
+        }
+
+        if (!(client = client_get(dbus_message_get_sender(m), TRUE))) {
+            avahi_log_warn("Too many clients, client request failed.");
+            return avahi_dbus_respond_error(c, m, AVAHI_ERR_TOO_MANY_CLIENTS, NULL);
+        }
+
+        if (client->n_objects >= server->n_objects_per_client_max) {
+            avahi_log_warn("Too many objects for client '%s', client request failed.", client->name);
+            return avahi_dbus_respond_error(c, m, AVAHI_ERR_TOO_MANY_OBJECTS, NULL);
+        }
+
+        if (!*domain)
+            domain = NULL;
+
+        i = avahi_new(ServiceTypeBrowserInfo, 1);
+        i->id = ++client->current_id;
+        i->client = client;
+        i->path = NULL;
+        AVAHI_LLIST_PREPEND(ServiceTypeBrowserInfo, service_type_browsers, client->service_type_browsers, i);
+        client->n_objects++;
+
+        if (!(i->service_type_browser = avahi_s_service_type_browser_new(avahi_server, (AvahiIfIndex) interface, (AvahiProtocol) protocol, domain, (AvahiLookupFlags) flags, avahi_dbus_service_type_browser_callback, i))) {
+            avahi_dbus_service_type_browser_free(i);
+            return avahi_dbus_respond_error(c, m, avahi_server_errno(avahi_server), NULL);
+        }
+
+        i->path = avahi_strdup_printf("/Client%u/ServiceTypeBrowser%u", client->id, i->id);
+        dbus_connection_register_object_path(c, i->path, &vtable, i);
+        return avahi_dbus_respond_path(c, m, i->path);
+
+    } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVER, "ServiceBrowserNew")) {
+        Client *client;
+        ServiceBrowserInfo *i;
+        static const DBusObjectPathVTable vtable = {
+            NULL,
+            avahi_dbus_msg_service_browser_impl,
+            NULL,
+            NULL,
+            NULL,
+            NULL
+        };
+        int32_t interface, protocol;
+        uint32_t flags;
+        char *domain, *type;
+
+        if (!dbus_message_get_args(
+                m, &error,
+                DBUS_TYPE_INT32, &interface,
+                DBUS_TYPE_INT32, &protocol,
+                DBUS_TYPE_STRING, &type,
+                DBUS_TYPE_STRING, &domain,
+                DBUS_TYPE_UINT32, &flags,
+                DBUS_TYPE_INVALID) || !type) {
+            avahi_log_warn("Error parsing Server::ServiceBrowserNew message");
+            goto fail;
+        }
+
+        if (!(client = client_get(dbus_message_get_sender(m), TRUE))) {
+            avahi_log_warn("Too many clients, client request failed.");
+            return avahi_dbus_respond_error(c, m, AVAHI_ERR_TOO_MANY_CLIENTS, NULL);
+        }
+
+        if (client->n_objects >= server->n_objects_per_client_max) {
+            avahi_log_warn("Too many objects for client '%s', client request failed.", client->name);
+            return avahi_dbus_respond_error(c, m, AVAHI_ERR_TOO_MANY_OBJECTS, NULL);
+        }
+
+        if (!*domain)
+            domain = NULL;
+
+        i = avahi_new(ServiceBrowserInfo, 1);
+        i->id = ++client->current_id;
+        i->client = client;
+        i->path = NULL;
+        AVAHI_LLIST_PREPEND(ServiceBrowserInfo, service_browsers, client->service_browsers, i);
+        client->n_objects++;
+
+        if (!(i->service_browser = avahi_s_service_browser_new(avahi_server, (AvahiIfIndex) interface, (AvahiProtocol) protocol, type, domain, (AvahiLookupFlags) flags, avahi_dbus_service_browser_callback, i))) {
+            avahi_dbus_service_browser_free(i);
+            return avahi_dbus_respond_error(c, m, avahi_server_errno(avahi_server), NULL);
+        }
+
+        i->path = avahi_strdup_printf("/Client%u/ServiceBrowser%u", client->id, i->id);
+        dbus_connection_register_object_path(c, i->path, &vtable, i);
+        return avahi_dbus_respond_path(c, m, i->path);
+
+    } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVER, "ResolveService")) {
+        Client *client;
+        int32_t interface, protocol, aprotocol;
+        uint32_t flags;
+        char *name, *type, *domain;
+        SyncServiceResolverInfo *i;
+
+        if (!dbus_message_get_args(
+                m, &error,
+                DBUS_TYPE_INT32, &interface,
+                DBUS_TYPE_INT32, &protocol,
+                DBUS_TYPE_STRING, &name,
+                DBUS_TYPE_STRING, &type,
+                DBUS_TYPE_STRING, &domain,
+                DBUS_TYPE_INT32, &aprotocol,
+                DBUS_TYPE_UINT32, &flags,
+                DBUS_TYPE_INVALID) || !type) {
+            avahi_log_warn("Error parsing Server::ResolveService message");
+            goto fail;
+        }
+
+        if (!(client = client_get(dbus_message_get_sender(m), TRUE))) {
+            avahi_log_warn("Too many clients, client request failed.");
+            return avahi_dbus_respond_error(c, m, AVAHI_ERR_TOO_MANY_CLIENTS, NULL);
+        }
+
+        if (client->n_objects >= server->n_objects_per_client_max) {
+            avahi_log_warn("Too many objects for client '%s', client request failed.", client->name);
+            return avahi_dbus_respond_error(c, m, AVAHI_ERR_TOO_MANY_OBJECTS, NULL);
+        }
+
+        if (!*domain)
+            domain = NULL;
+
+        if (!*name)
+            name = NULL;
+
+        i = avahi_new(SyncServiceResolverInfo, 1);
+        i->client = client;
+        i->message = dbus_message_ref(m);
+        AVAHI_LLIST_PREPEND(SyncServiceResolverInfo, sync_service_resolvers, client->sync_service_resolvers, i);
+        client->n_objects++;
+
+        if (!(i->service_resolver = avahi_s_service_resolver_new(avahi_server, (AvahiIfIndex) interface, (AvahiProtocol) protocol, name, type, domain, (AvahiProtocol) aprotocol, (AvahiLookupFlags) flags, avahi_dbus_sync_service_resolver_callback, i))) {
+            avahi_dbus_sync_service_resolver_free(i);
+            return avahi_dbus_respond_error(c, m, avahi_server_errno(avahi_server), NULL);
+        }
+
+        return DBUS_HANDLER_RESULT_HANDLED;
+
+    } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVER, "ServiceResolverNew")) {
+        Client *client;
+        int32_t interface, protocol, aprotocol;
+        uint32_t flags;
+        char *name, *type, *domain;
+        AsyncServiceResolverInfo *i;
+        static const DBusObjectPathVTable vtable = {
+            NULL,
+            avahi_dbus_msg_async_service_resolver_impl,
+            NULL,
+            NULL,
+            NULL,
+            NULL
+        };
+
+        if (!dbus_message_get_args(
+                m, &error,
+                DBUS_TYPE_INT32, &interface,
+                DBUS_TYPE_INT32, &protocol,
+                DBUS_TYPE_STRING, &name,
+                DBUS_TYPE_STRING, &type,
+                DBUS_TYPE_STRING, &domain,
+                DBUS_TYPE_INT32, &aprotocol,
+                DBUS_TYPE_UINT32, &flags,
+                DBUS_TYPE_INVALID) || !type) {
+            avahi_log_warn("Error parsing Server::ServiceResolverNew message");
+            goto fail;
+        }
+
+        if (!(client = client_get(dbus_message_get_sender(m), TRUE))) {
+            avahi_log_warn(__FILE__": Too many clients, client request failed.");
+            return avahi_dbus_respond_error(c, m, AVAHI_ERR_TOO_MANY_CLIENTS, NULL);
+        }
+
+        if (client->n_objects >= server->n_objects_per_client_max) {
+            avahi_log_warn(__FILE__": Too many objects for client '%s', client request failed.", client->name);
+            return avahi_dbus_respond_error(c, m, AVAHI_ERR_TOO_MANY_OBJECTS, NULL);
+        }
+
+        if (!*domain)
+            domain = NULL;
+
+        if (!*name)
+            name = NULL;
+
+        i = avahi_new(AsyncServiceResolverInfo, 1);
+        i->id = ++client->current_id;
+        i->client = client;
+        i->path = NULL;
+        AVAHI_LLIST_PREPEND(AsyncServiceResolverInfo, async_service_resolvers, client->async_service_resolvers, i);
+        client->n_objects++;
+
+        if (!(i->service_resolver = avahi_s_service_resolver_new(avahi_server, (AvahiIfIndex) interface, (AvahiProtocol) protocol, name, type, domain, (AvahiProtocol) aprotocol, (AvahiLookupFlags) flags, avahi_dbus_async_service_resolver_callback, i))) {
+            avahi_dbus_async_service_resolver_free(i);
+            return avahi_dbus_respond_error(c, m, avahi_server_errno(avahi_server), NULL);
+        }
+
+/*         avahi_log_debug(__FILE__": [%s], new service resolver for <%s.%s.%s>", i->path, name, type, domain); */
+
+        i->path = avahi_strdup_printf("/Client%u/ServiceResolver%u", client->id, i->id);
+        dbus_connection_register_object_path(c, i->path, &vtable, i);
+        return avahi_dbus_respond_path(c, m, i->path);
+
+    } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVER, "HostNameResolverNew")) {
+        Client *client;
+        int32_t interface, protocol, aprotocol;
+        uint32_t flags;
+        char *name;
+        AsyncHostNameResolverInfo *i;
+        static const DBusObjectPathVTable vtable = {
+            NULL,
+            avahi_dbus_msg_async_host_name_resolver_impl,
+            NULL,
+            NULL,
+            NULL,
+            NULL
+        };
+
+        if (!dbus_message_get_args(
+                m, &error,
+                DBUS_TYPE_INT32, &interface,
+                DBUS_TYPE_INT32, &protocol,
+                DBUS_TYPE_STRING, &name,
+                DBUS_TYPE_INT32, &aprotocol,
+                DBUS_TYPE_UINT32, &flags,
+                DBUS_TYPE_INVALID) || !name) {
+            avahi_log_warn("Error parsing Server::HostNameResolverNew message");
+            goto fail;
+        }
+
+        if (!(client = client_get(dbus_message_get_sender(m), TRUE))) {
+            avahi_log_warn(__FILE__": Too many clients, client request failed.");
+            return avahi_dbus_respond_error(c, m, AVAHI_ERR_TOO_MANY_CLIENTS, NULL);
+        }
+
+        if (client->n_objects >= server->n_objects_per_client_max) {
+            avahi_log_warn(__FILE__": Too many objects for client '%s', client request failed.", client->name);
+            return avahi_dbus_respond_error(c, m, AVAHI_ERR_TOO_MANY_OBJECTS, NULL);
+        }
+
+        i = avahi_new(AsyncHostNameResolverInfo, 1);
+        i->id = ++client->current_id;
+        i->client = client;
+        i->path = NULL;
+        AVAHI_LLIST_PREPEND(AsyncHostNameResolverInfo, async_host_name_resolvers, client->async_host_name_resolvers, i);
+        client->n_objects++;
+
+        if (!(i->host_name_resolver = avahi_s_host_name_resolver_new(avahi_server, (AvahiIfIndex) interface, (AvahiProtocol) protocol, name, aprotocol, (AvahiLookupFlags) flags, avahi_dbus_async_host_name_resolver_callback, i))) {
+            avahi_dbus_async_host_name_resolver_free(i);
+            return avahi_dbus_respond_error(c, m, avahi_server_errno(avahi_server), NULL);
+        }
+
+        i->path = avahi_strdup_printf("/Client%u/HostNameResolver%u", client->id, i->id);
+        dbus_connection_register_object_path(c, i->path, &vtable, i);
+        return avahi_dbus_respond_path(c, m, i->path);
+
+    } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVER, "AddressResolverNew")) {
+        Client *client;
+        int32_t interface, protocol;
+        uint32_t flags;
+        char *address;
+        AsyncAddressResolverInfo *i;
+        AvahiAddress a;
+        static const DBusObjectPathVTable vtable = {
+            NULL,
+            avahi_dbus_msg_async_address_resolver_impl,
+            NULL,
+            NULL,
+            NULL,
+            NULL
+        };
+
+        if (!dbus_message_get_args(
+                m, &error,
+                DBUS_TYPE_INT32, &interface,
+                DBUS_TYPE_INT32, &protocol,
+                DBUS_TYPE_STRING, &address,
+                DBUS_TYPE_UINT32, &flags,
+                DBUS_TYPE_INVALID) || !address) {
+            avahi_log_warn("Error parsing Server::AddressResolverNew message");
+            goto fail;
+        }
+
+        if (!avahi_address_parse(address, AVAHI_PROTO_UNSPEC, &a))
+            return avahi_dbus_respond_error(c, m, AVAHI_ERR_INVALID_ADDRESS, NULL);
+
+        if (!(client = client_get(dbus_message_get_sender(m), TRUE))) {
+            avahi_log_warn(__FILE__": Too many clients, client request failed.");
+            return avahi_dbus_respond_error(c, m, AVAHI_ERR_TOO_MANY_CLIENTS, NULL);
+        }
+
+        if (client->n_objects >= server->n_objects_per_client_max) {
+            avahi_log_warn(__FILE__": Too many objects for client '%s', client request failed.", client->name);
+            return avahi_dbus_respond_error(c, m, AVAHI_ERR_TOO_MANY_OBJECTS, NULL);
+        }
+
+        i = avahi_new(AsyncAddressResolverInfo, 1);
+        i->id = ++client->current_id;
+        i->client = client;
+        i->path = NULL;
+        AVAHI_LLIST_PREPEND(AsyncAddressResolverInfo, async_address_resolvers, client->async_address_resolvers, i);
+        client->n_objects++;
+
+        if (!(i->address_resolver = avahi_s_address_resolver_new(avahi_server, (AvahiIfIndex) interface, (AvahiProtocol) protocol, &a, (AvahiLookupFlags) flags, avahi_dbus_async_address_resolver_callback, i))) {
+            avahi_dbus_async_address_resolver_free(i);
+            return avahi_dbus_respond_error(c, m, avahi_server_errno(avahi_server), NULL);
+        }
+
+        i->path = avahi_strdup_printf("/Client%u/AddressResolver%u", client->id, i->id);
+        dbus_connection_register_object_path(c, i->path, &vtable, i);
+        return avahi_dbus_respond_path(c, m, i->path);
+
+    } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVER, "RecordBrowserNew")) {
+        Client *client;
+        RecordBrowserInfo *i;
+        static const DBusObjectPathVTable vtable = {
+            NULL,
+            avahi_dbus_msg_record_browser_impl,
+            NULL,
+            NULL,
+            NULL,
+            NULL
+        };
+        int32_t interface, protocol;
+        uint32_t flags;
+        char *name;
+        uint16_t type, clazz;
+        AvahiKey *key;
+
+        if (!dbus_message_get_args(
+                m, &error,
+                DBUS_TYPE_INT32, &interface,
+                DBUS_TYPE_INT32, &protocol,
+                DBUS_TYPE_STRING, &name,
+                DBUS_TYPE_UINT16, &clazz,
+                DBUS_TYPE_UINT16, &type,
+                DBUS_TYPE_UINT32, &flags,
+                DBUS_TYPE_INVALID) || !name) {
+            avahi_log_warn("Error parsing Server::RecordBrowserNew message");
+            goto fail;
+        }
+
+        if (!avahi_is_valid_domain_name(name))
+            return avahi_dbus_respond_error(c, m, AVAHI_ERR_INVALID_DOMAIN_NAME, NULL);
+
+        if (!(client = client_get(dbus_message_get_sender(m), TRUE))) {
+            avahi_log_warn("Too many clients, client request failed.");
+            return avahi_dbus_respond_error(c, m, AVAHI_ERR_TOO_MANY_CLIENTS, NULL);
+        }
+
+        if (client->n_objects >= server->n_objects_per_client_max) {
+            avahi_log_warn("Too many objects for client '%s', client request failed.", client->name);
+            return avahi_dbus_respond_error(c, m, AVAHI_ERR_TOO_MANY_OBJECTS, NULL);
+        }
+
+        i = avahi_new(RecordBrowserInfo, 1);
+        i->id = ++client->current_id;
+        i->client = client;
+        i->path = NULL;
+        AVAHI_LLIST_PREPEND(RecordBrowserInfo, record_browsers, client->record_browsers, i);
+        client->n_objects++;
+
+        key = avahi_key_new(name, clazz, type);
+        assert(key);
+
+        if (!(i->record_browser = avahi_s_record_browser_new(avahi_server, (AvahiIfIndex) interface, (AvahiProtocol) protocol, key, (AvahiLookupFlags) flags, avahi_dbus_record_browser_callback, i))) {
+            avahi_key_unref(key);
+            avahi_dbus_record_browser_free(i);
+            return avahi_dbus_respond_error(c, m, avahi_server_errno(avahi_server), NULL);
+        }
+
+        avahi_key_unref(key);
+
+        i->path = avahi_strdup_printf("/Client%u/RecordBrowser%u", client->id, i->id);
+        dbus_connection_register_object_path(c, i->path, &vtable, i);
+        return avahi_dbus_respond_path(c, m, i->path);
+    }
+
+    avahi_log_warn("Missed message %s::%s()", dbus_message_get_interface(m), dbus_message_get_member(m));
+
+fail:
+    if (dbus_error_is_set(&error))
+        dbus_error_free(&error);
+
+    return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
+
+void dbus_protocol_server_state_changed(AvahiServerState state) {
+    DBusMessage *m;
+    int32_t t;
+    const char *e;
+
+    if (!server || !server->bus)
+        return;
+
+    m = dbus_message_new_signal(AVAHI_DBUS_PATH_SERVER, AVAHI_DBUS_INTERFACE_SERVER, "StateChanged");
+
+    if (!m) {
+        avahi_log_error("Failed allocate message");
+        return;
+    }
+
+    t = (int32_t) state;
+
+    if (state == AVAHI_SERVER_COLLISION)
+        e = AVAHI_DBUS_ERR_COLLISION;
+    else if (state == AVAHI_SERVER_FAILURE)
+        e = avahi_error_number_to_dbus(avahi_server_errno(avahi_server));
+    else
+        e = AVAHI_DBUS_ERR_OK;
+
+    dbus_message_append_args(m, DBUS_TYPE_INT32, &t, DBUS_TYPE_STRING, &e, DBUS_TYPE_INVALID);
+    dbus_connection_send(server->bus, m, NULL);
+    dbus_message_unref(m);
+}
+
+static int dbus_connect(void) {
+    DBusError error;
+
+    static const DBusObjectPathVTable server_vtable = {
+        NULL,
+        msg_server_impl,
+        NULL,
+        NULL,
+        NULL,
+        NULL
+    };
+
+    assert(server);
+    assert(!server->bus);
+
+    dbus_error_init(&error);
+
+#ifdef HAVE_DBUS_BUS_GET_PRIVATE
+    if (!(server->bus = dbus_bus_get_private(DBUS_BUS_SYSTEM, &error))) {
+        assert(dbus_error_is_set(&error));
+        avahi_log_error("dbus_bus_get_private(): %s", error.message);
+        goto fail;
+    }
+#else
+    {
+        const char *a;
+
+        if (!(a = getenv("DBUS_SYSTEM_BUS_ADDRESS")) || !*a)
+            a = DBUS_SYSTEM_BUS_DEFAULT_ADDRESS;
+
+        if (!(server->bus = dbus_connection_open_private(a, &error))) {
+            assert(dbus_error_is_set(&error));
+            avahi_log_error("dbus_bus_open_private(): %s", error.message);
+            goto fail;
+        }
+
+        if (!dbus_bus_register(server->bus, &error)) {
+            assert(dbus_error_is_set(&error));
+            avahi_log_error("dbus_bus_register(): %s", error.message);
+            goto fail;
+        }
+    }
+#endif
+
+    if (avahi_dbus_connection_glue(server->bus, server->poll_api) < 0) {
+        avahi_log_error("avahi_dbus_connection_glue() failed");
+        goto fail;
+    }
+
+    dbus_connection_set_exit_on_disconnect(server->bus, FALSE);
+
+    if (dbus_bus_request_name(
+            server->bus,
+            AVAHI_DBUS_NAME,
+#if (DBUS_VERSION_MAJOR == 0) && (DBUS_VERSION_MINOR < 60)
+            DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT,
+#else
+            DBUS_NAME_FLAG_DO_NOT_QUEUE,
+#endif
+            &error) != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) {
+        if (dbus_error_is_set(&error)) {
+            avahi_log_error("dbus_bus_request_name(): %s", error.message);
+            goto fail;
+        }
+
+        avahi_log_error("Failed to acquire D-Bus name '"AVAHI_DBUS_NAME"'");
+        goto fail;
+    }
+
+    if (!(dbus_connection_add_filter(server->bus, msg_signal_filter_impl, (void*) server->poll_api, NULL))) {
+        avahi_log_error("dbus_connection_add_filter() failed");
+        goto fail;
+    }
+
+    dbus_bus_add_match(server->bus, "type='signal',""interface='" DBUS_INTERFACE_DBUS  "'", &error);
+
+    if (dbus_error_is_set(&error)) {
+        avahi_log_error("dbus_bus_add_match(): %s", error.message);
+        goto fail;
+    }
+
+    if (!(dbus_connection_register_object_path(server->bus, AVAHI_DBUS_PATH_SERVER, &server_vtable, NULL))) {
+        avahi_log_error("dbus_connection_register_object_path() failed");
+        goto fail;
+    }
+
+    return 0;
+fail:
+
+    if (dbus_error_is_set(&error))
+        dbus_error_free(&error);
+
+    if (server->bus) {
+#ifdef HAVE_DBUS_CONNECTION_CLOSE
+        dbus_connection_close(server->bus);
+#else
+        dbus_connection_disconnect(server->bus);
+#endif
+        dbus_connection_unref(server->bus);
+        server->bus = NULL;
+    }
+
+    return -1;
+}
+
+static void dbus_disconnect(void) {
+    assert(server);
+
+    while (server->clients)
+        client_free(server->clients);
+
+    assert(server->n_clients == 0);
+
+    if (server->bus) {
+#ifdef HAVE_DBUS_CONNECTION_CLOSE
+        dbus_connection_close(server->bus);
+#else
+        dbus_connection_disconnect(server->bus);
+#endif
+        dbus_connection_unref(server->bus);
+        server->bus = NULL;
+    }
+}
+
+int dbus_protocol_setup(const AvahiPoll *poll_api,
+                        int _disable_user_service_publishing,
+                        int _n_clients_max,
+                        int _n_objects_per_client_max,
+                        int _n_entries_per_entry_group_max,
+                        int force) {
+
+
+    server = avahi_new(Server, 1);
+    AVAHI_LLIST_HEAD_INIT(Clients, server->clients);
+    server->current_id = 0;
+    server->n_clients = 0;
+    server->bus = NULL;
+    server->poll_api = poll_api;
+    server->reconnect_timeout = NULL;
+    server->reconnect = force;
+    server->disable_user_service_publishing = _disable_user_service_publishing;
+    server->n_clients_max = _n_clients_max > 0 ? _n_clients_max : DEFAULT_CLIENTS_MAX;
+    server->n_objects_per_client_max = _n_objects_per_client_max > 0 ? _n_objects_per_client_max : DEFAULT_OBJECTS_PER_CLIENT_MAX;
+    server->n_entries_per_entry_group_max = _n_entries_per_entry_group_max > 0 ? _n_entries_per_entry_group_max : DEFAULT_ENTRIES_PER_ENTRY_GROUP_MAX;
+
+    if (dbus_connect() < 0) {
+        struct timeval tv;
+
+        if (!force)
+            goto fail;
+
+        avahi_log_warn("WARNING: Failed to contact D-Bus daemon, retrying in %ims.", RECONNECT_MSEC);
+
+        avahi_elapse_time(&tv, RECONNECT_MSEC, 0);
+        server->reconnect_timeout = server->poll_api->timeout_new(server->poll_api, &tv, reconnect_callback, NULL);
+    }
+
+    return 0;
+
+fail:
+    if (server->bus) {
+#ifdef HAVE_DBUS_CONNECTION_CLOSE
+        dbus_connection_close(server->bus);
+#else
+        dbus_connection_disconnect(server->bus);
+#endif
+
+        dbus_connection_unref(server->bus);
+    }
+
+    avahi_free(server);
+    server = NULL;
+    return -1;
+}
+
+void dbus_protocol_shutdown(void) {
+
+    if (server) {
+        dbus_disconnect();
+
+        if (server->reconnect_timeout)
+            server->poll_api->timeout_free(server->reconnect_timeout);
+
+        avahi_free(server);
+        server = NULL;
+    }
+}
diff --git a/avahi-0.6.31/avahi-daemon/dbus-protocol.h b/avahi-0.6.31/avahi-daemon/dbus-protocol.h
new file mode 100644
index 0000000..2184487
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/dbus-protocol.h
@@ -0,0 +1,32 @@
+#ifndef foodbusprotocolhfoo
+#define foodbusprotocolhfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+int dbus_protocol_setup(const AvahiPoll *poll_api,
+                        int _disable_user_service_publishing,
+                        int _n_clients_max,
+                        int _n_objects_per_client_max,
+                        int _n_entries_per_entry_group_max,
+                        int force);
+void dbus_protocol_shutdown(void);
+void dbus_protocol_server_state_changed(AvahiServerState state);
+
+#endif
diff --git a/avahi-0.6.31/avahi-daemon/dbus-record-browser.c b/avahi-0.6.31/avahi-daemon/dbus-record-browser.c
new file mode 100644
index 0000000..c0337cf
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/dbus-record-browser.c
@@ -0,0 +1,164 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+
+#include <avahi-common/malloc.h>
+#include <avahi-common/dbus.h>
+#include <avahi-common/error.h>
+#include <avahi-core/log.h>
+
+#include "dbus-util.h"
+#include "dbus-internal.h"
+
+void avahi_dbus_record_browser_free(RecordBrowserInfo *i) {
+    assert(i);
+
+    if (i->record_browser)
+        avahi_s_record_browser_free(i->record_browser);
+
+    if (i->path) {
+        dbus_connection_unregister_object_path(server->bus, i->path);
+        avahi_free(i->path);
+    }
+    AVAHI_LLIST_REMOVE(RecordBrowserInfo, record_browsers, i->client->record_browsers, i);
+
+    assert(i->client->n_objects >= 1);
+    i->client->n_objects--;
+
+    avahi_free(i);
+}
+
+DBusHandlerResult avahi_dbus_msg_record_browser_impl(DBusConnection *c, DBusMessage *m, void *userdata) {
+    DBusError error;
+    RecordBrowserInfo *i = userdata;
+
+    assert(c);
+    assert(m);
+    assert(i);
+
+    dbus_error_init(&error);
+
+    avahi_log_debug(__FILE__": interface=%s, path=%s, member=%s",
+                    dbus_message_get_interface(m),
+                    dbus_message_get_path(m),
+                    dbus_message_get_member(m));
+
+    /* Introspection */
+    if (dbus_message_is_method_call(m, DBUS_INTERFACE_INTROSPECTABLE, "Introspect"))
+        return avahi_dbus_handle_introspect(c, m, "org.freedesktop.Avahi.RecordBrowser.xml");
+
+    /* Access control */
+    if (strcmp(dbus_message_get_sender(m), i->client->name))
+        return avahi_dbus_respond_error(c, m, AVAHI_ERR_ACCESS_DENIED, NULL);
+
+    if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_RECORD_BROWSER, "Free")) {
+
+        if (!dbus_message_get_args(m, &error, DBUS_TYPE_INVALID)) {
+            avahi_log_warn("Error parsing RecordBrowser::Free message");
+            goto fail;
+        }
+
+        avahi_dbus_record_browser_free(i);
+        return avahi_dbus_respond_ok(c, m);
+
+    }
+
+    avahi_log_warn("Missed message %s::%s()", dbus_message_get_interface(m), dbus_message_get_member(m));
+
+fail:
+    if (dbus_error_is_set(&error))
+        dbus_error_free(&error);
+
+    return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
+
+void avahi_dbus_record_browser_callback(
+    AvahiSRecordBrowser *b,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiBrowserEvent event,
+    AvahiRecord *record,
+    AvahiLookupResultFlags flags,
+    void* userdata) {
+
+    RecordBrowserInfo *i = userdata;
+    DBusMessage *m = NULL;
+    int32_t i_interface, i_protocol;
+    uint32_t u_flags;
+
+    assert(b);
+    assert(i);
+
+    i_interface = (int32_t) interface;
+    i_protocol = (int32_t) protocol;
+    u_flags = (uint32_t) flags;
+
+    m = dbus_message_new_signal(i->path, AVAHI_DBUS_INTERFACE_RECORD_BROWSER, avahi_dbus_map_browse_signal_name(event));
+
+    if (!m) {
+        avahi_log_error("Failed allocate message");
+        return;
+    }
+
+    if (event == AVAHI_BROWSER_NEW || event == AVAHI_BROWSER_REMOVE) {
+        uint8_t rdata[0xFFFF];
+        size_t size;
+        assert(record);
+
+        if (!(dbus_message_append_args(
+                  m,
+                  DBUS_TYPE_INT32, &i_interface,
+                  DBUS_TYPE_INT32, &i_protocol,
+                  DBUS_TYPE_STRING, &record->key->name,
+                  DBUS_TYPE_UINT16, &record->key->clazz,
+                  DBUS_TYPE_UINT16, &record->key->type,
+                  DBUS_TYPE_INVALID)))
+            goto fail;
+
+        if ((size = avahi_rdata_serialize(record, rdata, sizeof(rdata))) == (size_t) -1 ||
+            avahi_dbus_append_rdata(m, rdata, size) < 0) {
+            avahi_log_debug(__FILE__": Failed to append rdata");
+            dbus_message_unref(m);
+            return;
+        }
+
+        dbus_message_append_args(
+            m,
+            DBUS_TYPE_UINT32, &u_flags,
+            DBUS_TYPE_INVALID);
+
+    } else if (event == AVAHI_BROWSER_FAILURE)
+        avahi_dbus_append_server_error(m);
+
+    dbus_message_set_destination(m, i->client->name);
+    dbus_connection_send(server->bus, m, NULL);
+    dbus_message_unref(m);
+
+    return;
+
+fail:
+
+    if (m)
+        dbus_message_unref(m);
+}
diff --git a/avahi-0.6.31/avahi-daemon/dbus-service-browser.c b/avahi-0.6.31/avahi-daemon/dbus-service-browser.c
new file mode 100644
index 0000000..962dca0
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/dbus-service-browser.c
@@ -0,0 +1,144 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+
+#include <avahi-common/malloc.h>
+#include <avahi-common/dbus.h>
+#include <avahi-common/error.h>
+#include <avahi-core/log.h>
+
+#include "dbus-util.h"
+#include "dbus-internal.h"
+
+void avahi_dbus_service_browser_free(ServiceBrowserInfo *i) {
+    assert(i);
+
+    if (i->service_browser)
+        avahi_s_service_browser_free(i->service_browser);
+
+    if (i->path) {
+        dbus_connection_unregister_object_path(server->bus, i->path);
+        avahi_free(i->path);
+    }
+
+    AVAHI_LLIST_REMOVE(ServiceBrowserInfo, service_browsers, i->client->service_browsers, i);
+
+    assert(i->client->n_objects >= 1);
+    i->client->n_objects--;
+
+    avahi_free(i);
+}
+
+DBusHandlerResult avahi_dbus_msg_service_browser_impl(DBusConnection *c, DBusMessage *m, void *userdata) {
+    DBusError error;
+    ServiceBrowserInfo *i = userdata;
+
+    assert(c);
+    assert(m);
+    assert(i);
+
+    dbus_error_init(&error);
+
+    avahi_log_debug(__FILE__": interface=%s, path=%s, member=%s",
+                    dbus_message_get_interface(m),
+                    dbus_message_get_path(m),
+                    dbus_message_get_member(m));
+
+    /* Introspection */
+    if (dbus_message_is_method_call(m, DBUS_INTERFACE_INTROSPECTABLE, "Introspect"))
+        return avahi_dbus_handle_introspect(c, m, "org.freedesktop.Avahi.ServiceBrowser.xml");
+
+    /* Access control */
+    if (strcmp(dbus_message_get_sender(m), i->client->name))
+        return avahi_dbus_respond_error(c, m, AVAHI_ERR_ACCESS_DENIED, NULL);
+
+    if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVICE_BROWSER, "Free")) {
+
+        if (!dbus_message_get_args(m, &error, DBUS_TYPE_INVALID)) {
+            avahi_log_warn("Error parsing ServiceBrowser::Free message");
+            goto fail;
+        }
+
+        avahi_dbus_service_browser_free(i);
+        return avahi_dbus_respond_ok(c, m);
+
+    }
+
+    avahi_log_warn("Missed message %s::%s()", dbus_message_get_interface(m), dbus_message_get_member(m));
+
+fail:
+    if (dbus_error_is_set(&error))
+        dbus_error_free(&error);
+
+    return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
+
+void avahi_dbus_service_browser_callback(AvahiSServiceBrowser *b, AvahiIfIndex interface, AvahiProtocol protocol, AvahiBrowserEvent event, const char *name, const char *type, const char *domain, AvahiLookupResultFlags flags, void* userdata) {
+    ServiceBrowserInfo *i = userdata;
+    DBusMessage *m;
+    int32_t i_interface, i_protocol;
+    uint32_t u_flags;
+
+    assert(b);
+    assert(i);
+
+    m = dbus_message_new_signal(i->path, AVAHI_DBUS_INTERFACE_SERVICE_BROWSER, avahi_dbus_map_browse_signal_name(event));
+
+    if (!m) {
+        avahi_log_error("Failed allocate message");
+        return;
+    }
+
+    if (event == AVAHI_BROWSER_NEW) {
+        /* Patch in AVAHI_LOOKUP_RESULT_OUR_OWN */
+
+        if (avahi_dbus_is_our_own_service(i->client, interface, protocol, name, type, domain) > 0)
+            flags |= AVAHI_LOOKUP_RESULT_OUR_OWN;
+    }
+
+    i_interface = (int32_t) interface;
+    i_protocol = (int32_t) protocol;
+    u_flags = (uint32_t) flags;
+
+    if (event == AVAHI_BROWSER_NEW || event == AVAHI_BROWSER_REMOVE) {
+        assert(name);
+        assert(type);
+        assert(domain);
+
+        dbus_message_append_args(
+            m,
+            DBUS_TYPE_INT32, &i_interface,
+            DBUS_TYPE_INT32, &i_protocol,
+            DBUS_TYPE_STRING, &name,
+            DBUS_TYPE_STRING, &type,
+            DBUS_TYPE_STRING, &domain,
+            DBUS_TYPE_UINT32, &u_flags,
+            DBUS_TYPE_INVALID);
+    } else if (event == AVAHI_BROWSER_FAILURE)
+        avahi_dbus_append_server_error(m);
+
+    dbus_message_set_destination(m, i->client->name);
+    dbus_connection_send(server->bus, m, NULL);
+    dbus_message_unref(m);
+}
diff --git a/avahi-0.6.31/avahi-daemon/dbus-service-type-browser.c b/avahi-0.6.31/avahi-daemon/dbus-service-type-browser.c
new file mode 100644
index 0000000..20afdbe
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/dbus-service-type-browser.c
@@ -0,0 +1,134 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+
+#include <avahi-common/malloc.h>
+#include <avahi-common/dbus.h>
+#include <avahi-common/error.h>
+#include <avahi-core/log.h>
+
+#include "dbus-util.h"
+#include "dbus-internal.h"
+
+void avahi_dbus_service_type_browser_free(ServiceTypeBrowserInfo *i) {
+    assert(i);
+
+    if (i->service_type_browser)
+        avahi_s_service_type_browser_free(i->service_type_browser);
+
+    if (i->path) {
+        dbus_connection_unregister_object_path(server->bus, i->path);
+        avahi_free(i->path);
+    }
+
+    AVAHI_LLIST_REMOVE(ServiceTypeBrowserInfo, service_type_browsers, i->client->service_type_browsers, i);
+
+    assert(i->client->n_objects >= 1);
+    i->client->n_objects--;
+
+    avahi_free(i);
+}
+
+DBusHandlerResult avahi_dbus_msg_service_type_browser_impl(DBusConnection *c, DBusMessage *m, void *userdata) {
+    DBusError error;
+    ServiceTypeBrowserInfo *i = userdata;
+
+    assert(c);
+    assert(m);
+    assert(i);
+
+    dbus_error_init(&error);
+
+    avahi_log_debug(__FILE__": interface=%s, path=%s, member=%s",
+                    dbus_message_get_interface(m),
+                    dbus_message_get_path(m),
+                    dbus_message_get_member(m));
+
+    /* Introspection */
+    if (dbus_message_is_method_call(m, DBUS_INTERFACE_INTROSPECTABLE, "Introspect"))
+        return avahi_dbus_handle_introspect(c, m, "org.freedesktop.Avahi.ServiceTypeBrowser.xml");
+
+    /* Access control */
+    if (strcmp(dbus_message_get_sender(m), i->client->name))
+        return avahi_dbus_respond_error(c, m, AVAHI_ERR_ACCESS_DENIED, NULL);
+
+    if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVICE_TYPE_BROWSER, "Free")) {
+
+        if (!dbus_message_get_args(m, &error, DBUS_TYPE_INVALID)) {
+            avahi_log_warn("Error parsing ServiceTypeBrowser::Free message");
+            goto fail;
+        }
+
+        avahi_dbus_service_type_browser_free(i);
+        return avahi_dbus_respond_ok(c, m);
+
+    }
+
+    avahi_log_warn("Missed message %s::%s()", dbus_message_get_interface(m), dbus_message_get_member(m));
+
+fail:
+    if (dbus_error_is_set(&error))
+        dbus_error_free(&error);
+
+    return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
+
+void avahi_dbus_service_type_browser_callback(AvahiSServiceTypeBrowser *b, AvahiIfIndex interface, AvahiProtocol protocol, AvahiBrowserEvent event, const char *type, const char *domain, AvahiLookupResultFlags flags, void* userdata) {
+    ServiceTypeBrowserInfo *i = userdata;
+    DBusMessage *m;
+    int32_t i_interface, i_protocol;
+    uint32_t u_flags;
+
+    assert(b);
+    assert(i);
+
+    i_interface = (int32_t) interface;
+    i_protocol = (int32_t) protocol;
+    u_flags = (uint32_t) flags;
+
+    m = dbus_message_new_signal(i->path, AVAHI_DBUS_INTERFACE_SERVICE_TYPE_BROWSER, avahi_dbus_map_browse_signal_name(event));
+
+    if (!m) {
+        avahi_log_error("Failed allocate message");
+        return;
+    }
+
+    if (event == AVAHI_BROWSER_NEW || event == AVAHI_BROWSER_REMOVE) {
+        assert(type);
+        assert(domain);
+        dbus_message_append_args(
+            m,
+            DBUS_TYPE_INT32, &i_interface,
+            DBUS_TYPE_INT32, &i_protocol,
+            DBUS_TYPE_STRING, &type,
+            DBUS_TYPE_STRING, &domain,
+            DBUS_TYPE_UINT32, &u_flags,
+            DBUS_TYPE_INVALID);
+    } else if (event == AVAHI_BROWSER_FAILURE)
+        avahi_dbus_append_server_error(m);
+
+    dbus_message_set_destination(m, i->client->name);
+    dbus_connection_send(server->bus, m, NULL);
+    dbus_message_unref(m);
+}
diff --git a/avahi-0.6.31/avahi-daemon/dbus-sync-address-resolver.c b/avahi-0.6.31/avahi-daemon/dbus-sync-address-resolver.c
new file mode 100644
index 0000000..9845420
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/dbus-sync-address-resolver.c
@@ -0,0 +1,96 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+
+#include <avahi-common/malloc.h>
+#include <avahi-common/dbus.h>
+#include <avahi-common/error.h>
+#include <avahi-core/log.h>
+
+#include "dbus-util.h"
+#include "dbus-internal.h"
+#include "main.h"
+
+void avahi_dbus_sync_address_resolver_free(SyncAddressResolverInfo *i) {
+    assert(i);
+
+    if (i->address_resolver)
+        avahi_s_address_resolver_free(i->address_resolver);
+    dbus_message_unref(i->message);
+    AVAHI_LLIST_REMOVE(SyncAddressResolverInfo, sync_address_resolvers, i->client->sync_address_resolvers, i);
+
+    assert(i->client->n_objects >= 1);
+    i->client->n_objects--;
+
+    avahi_free(i);
+}
+
+void avahi_dbus_sync_address_resolver_callback(AvahiSAddressResolver *r, AvahiIfIndex interface, AvahiProtocol protocol, AvahiResolverEvent event, const AvahiAddress *address, const char *host_name, AvahiLookupResultFlags flags, void* userdata) {
+    SyncAddressResolverInfo *i = userdata;
+
+    assert(r);
+    assert(address);
+    assert(i);
+
+    if (event == AVAHI_RESOLVER_FOUND) {
+        char t[AVAHI_ADDRESS_STR_MAX], *pt = t;
+        int32_t i_interface, i_protocol, i_aprotocol;
+        uint32_t u_flags;
+        DBusMessage *reply;
+
+        assert(host_name);
+        avahi_address_snprint(t, sizeof(t), address);
+
+        i_interface = (int32_t) interface;
+        i_protocol = (int32_t) protocol;
+        i_aprotocol = (int32_t) address->proto;
+        u_flags = (uint32_t) flags;
+
+        reply = dbus_message_new_method_return(i->message);
+
+        if (!reply) {
+            avahi_log_error("Failed allocate message");
+            goto finish;
+        }
+
+        dbus_message_append_args(
+            reply,
+            DBUS_TYPE_INT32, &i_interface,
+            DBUS_TYPE_INT32, &i_protocol,
+            DBUS_TYPE_INT32, &i_aprotocol,
+            DBUS_TYPE_STRING, &pt,
+            DBUS_TYPE_STRING, &host_name,
+            DBUS_TYPE_UINT32, &u_flags,
+            DBUS_TYPE_INVALID);
+
+        dbus_connection_send(server->bus, reply, NULL);
+        dbus_message_unref(reply);
+    } else {
+        assert(event == AVAHI_RESOLVER_FAILURE);
+        avahi_dbus_respond_error(server->bus, i->message, avahi_server_errno(avahi_server), NULL);
+    }
+
+finish:
+    avahi_dbus_sync_address_resolver_free(i);
+}
diff --git a/avahi-0.6.31/avahi-daemon/dbus-sync-host-name-resolver.c b/avahi-0.6.31/avahi-daemon/dbus-sync-host-name-resolver.c
new file mode 100644
index 0000000..e511327
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/dbus-sync-host-name-resolver.c
@@ -0,0 +1,96 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+
+#include <avahi-common/malloc.h>
+#include <avahi-common/dbus.h>
+#include <avahi-common/error.h>
+#include <avahi-core/log.h>
+
+#include "dbus-util.h"
+#include "dbus-internal.h"
+#include "main.h"
+
+void avahi_dbus_sync_host_name_resolver_free(SyncHostNameResolverInfo *i) {
+    assert(i);
+
+    if (i->host_name_resolver)
+        avahi_s_host_name_resolver_free(i->host_name_resolver);
+    dbus_message_unref(i->message);
+    AVAHI_LLIST_REMOVE(SyncHostNameResolverInfo, sync_host_name_resolvers, i->client->sync_host_name_resolvers, i);
+
+    assert(i->client->n_objects >= 1);
+    i->client->n_objects--;
+
+    avahi_free(i);
+}
+
+void avahi_dbus_sync_host_name_resolver_callback(AvahiSHostNameResolver *r, AvahiIfIndex interface, AvahiProtocol protocol, AvahiResolverEvent event, const char *host_name, const AvahiAddress *a, AvahiLookupResultFlags flags, void* userdata) {
+    SyncHostNameResolverInfo *i = userdata;
+
+    assert(r);
+    assert(host_name);
+    assert(i);
+
+    if (event == AVAHI_RESOLVER_FOUND) {
+        char t[AVAHI_ADDRESS_STR_MAX], *pt = t;
+        int32_t i_interface, i_protocol, i_aprotocol;
+        uint32_t u_flags;
+        DBusMessage *reply;
+
+        assert(a);
+        avahi_address_snprint(t, sizeof(t), a);
+
+        i_interface = (int32_t) interface;
+        i_protocol = (int32_t) protocol;
+        i_aprotocol = (int32_t) a->proto;
+        u_flags = (uint32_t) flags;
+
+        reply = dbus_message_new_method_return(i->message);
+
+        if (!reply) {
+            avahi_log_error("Failed allocate message");
+            goto finish;
+        }
+
+        dbus_message_append_args(
+            reply,
+            DBUS_TYPE_INT32, &i_interface,
+            DBUS_TYPE_INT32, &i_protocol,
+            DBUS_TYPE_STRING, &host_name,
+            DBUS_TYPE_INT32, &i_aprotocol,
+            DBUS_TYPE_STRING, &pt,
+            DBUS_TYPE_UINT32, &u_flags,
+            DBUS_TYPE_INVALID);
+
+        dbus_connection_send(server->bus, reply, NULL);
+        dbus_message_unref(reply);
+    } else {
+        assert(event == AVAHI_RESOLVER_FAILURE);
+        avahi_dbus_respond_error(server->bus, i->message, avahi_server_errno(avahi_server), NULL);
+    }
+
+finish:
+    avahi_dbus_sync_host_name_resolver_free(i);
+}
diff --git a/avahi-0.6.31/avahi-daemon/dbus-sync-service-resolver.c b/avahi-0.6.31/avahi-daemon/dbus-sync-service-resolver.c
new file mode 100644
index 0000000..ed7276a
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/dbus-sync-service-resolver.c
@@ -0,0 +1,135 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+
+#include <avahi-common/malloc.h>
+#include <avahi-common/dbus.h>
+#include <avahi-common/error.h>
+#include <avahi-core/log.h>
+
+#include "dbus-util.h"
+#include "dbus-internal.h"
+#include "main.h"
+
+void avahi_dbus_sync_service_resolver_free(SyncServiceResolverInfo *i) {
+    assert(i);
+
+    if (i->service_resolver)
+        avahi_s_service_resolver_free(i->service_resolver);
+    dbus_message_unref(i->message);
+    AVAHI_LLIST_REMOVE(SyncServiceResolverInfo, sync_service_resolvers, i->client->sync_service_resolvers, i);
+
+    assert(i->client->n_objects >= 1);
+    i->client->n_objects--;
+
+    avahi_free(i);
+}
+
+void avahi_dbus_sync_service_resolver_callback(
+    AvahiSServiceResolver *r,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiResolverEvent event,
+    const char *name,
+    const char *type,
+    const char *domain,
+    const char *host_name,
+    const AvahiAddress *a,
+    uint16_t port,
+    AvahiStringList *txt,
+    AvahiLookupResultFlags flags,
+    void* userdata) {
+
+    SyncServiceResolverInfo *i = userdata;
+
+    assert(r);
+    assert(i);
+
+    if (event == AVAHI_RESOLVER_FOUND) {
+        char t[AVAHI_ADDRESS_STR_MAX], *pt = t;
+        int32_t i_interface, i_protocol, i_aprotocol;
+        uint32_t u_flags;
+        DBusMessage *reply;
+
+        assert(host_name);
+
+        if (!name)
+            name = "";
+
+        if (a)
+            avahi_address_snprint(t, sizeof(t), a);
+        else
+            t[0] = 0;
+
+        /* Patch in AVAHI_LOOKUP_RESULT_OUR_OWN */
+
+        if (avahi_dbus_is_our_own_service(i->client, interface, protocol, name, type, domain) > 0)
+            flags |= AVAHI_LOOKUP_RESULT_OUR_OWN;
+
+        i_interface = (int32_t) interface;
+        i_protocol = (int32_t) protocol;
+        if (a)
+            i_aprotocol = (int32_t) a->proto;
+        else
+            i_aprotocol = AVAHI_PROTO_UNSPEC;
+        u_flags = (uint32_t) flags;
+
+        reply = dbus_message_new_method_return(i->message);
+
+        if (!reply) {
+            avahi_log_error("Failed allocate message");
+            goto finish;
+        }
+
+        dbus_message_append_args(
+            reply,
+            DBUS_TYPE_INT32, &i_interface,
+            DBUS_TYPE_INT32, &i_protocol,
+            DBUS_TYPE_STRING, &name,
+            DBUS_TYPE_STRING, &type,
+            DBUS_TYPE_STRING, &domain,
+            DBUS_TYPE_STRING, &host_name,
+            DBUS_TYPE_INT32, &i_aprotocol,
+            DBUS_TYPE_STRING, &pt,
+            DBUS_TYPE_UINT16, &port,
+            DBUS_TYPE_INVALID);
+
+        avahi_dbus_append_string_list(reply, txt);
+
+        dbus_message_append_args(
+            reply,
+            DBUS_TYPE_UINT32, &u_flags,
+            DBUS_TYPE_INVALID);
+
+        dbus_connection_send(server->bus, reply, NULL);
+        dbus_message_unref(reply);
+    } else {
+        assert(event == AVAHI_RESOLVER_FAILURE);
+
+        avahi_dbus_respond_error(server->bus, i->message, avahi_server_errno(avahi_server), NULL);
+    }
+
+finish:
+    avahi_dbus_sync_service_resolver_free(i);
+}
diff --git a/avahi-0.6.31/avahi-daemon/dbus-util.c b/avahi-0.6.31/avahi-daemon/dbus-util.c
new file mode 100644
index 0000000..2983b29
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/dbus-util.c
@@ -0,0 +1,435 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <assert.h>
+#include <stdlib.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <string.h>
+
+#include <avahi-common/error.h>
+#include <avahi-common/dbus.h>
+#include <avahi-common/malloc.h>
+#include <avahi-core/log.h>
+#include <avahi-core/core.h>
+
+#ifdef ENABLE_CHROOT
+#include "chroot.h"
+#endif
+
+#include "main.h"
+#include "dbus-util.h"
+
+DBusHandlerResult avahi_dbus_respond_error(DBusConnection *c, DBusMessage *m, int error, const char *text) {
+    DBusMessage *reply;
+
+    assert(-error > -AVAHI_OK);
+    assert(-error < -AVAHI_ERR_MAX);
+
+    if (!text)
+        text = avahi_strerror(error);
+
+    reply = dbus_message_new_error(m, avahi_error_number_to_dbus(error), text);
+
+    if (!reply) {
+        avahi_log_error("Failed allocate message");
+        return DBUS_HANDLER_RESULT_NEED_MEMORY;
+    }
+
+    dbus_connection_send(c, reply, NULL);
+    dbus_message_unref(reply);
+
+    avahi_log_debug(__FILE__": Responding error '%s' (%i)", text, error);
+
+    return DBUS_HANDLER_RESULT_HANDLED;
+}
+
+DBusHandlerResult avahi_dbus_respond_string(DBusConnection *c, DBusMessage *m, const char *text) {
+    DBusMessage *reply;
+
+    reply = dbus_message_new_method_return(m);
+
+    if (!reply) {
+        avahi_log_error("Failed allocate message");
+        return DBUS_HANDLER_RESULT_NEED_MEMORY;
+    }
+
+    dbus_message_append_args(reply, DBUS_TYPE_STRING, &text, DBUS_TYPE_INVALID);
+    dbus_connection_send(c, reply, NULL);
+    dbus_message_unref(reply);
+
+    return DBUS_HANDLER_RESULT_HANDLED;
+}
+
+DBusHandlerResult avahi_dbus_respond_int32(DBusConnection *c, DBusMessage *m, int32_t i) {
+    DBusMessage *reply;
+
+    reply = dbus_message_new_method_return(m);
+
+    if (!reply) {
+        avahi_log_error("Failed allocate message");
+        return DBUS_HANDLER_RESULT_NEED_MEMORY;
+    }
+
+    dbus_message_append_args(reply, DBUS_TYPE_INT32, &i, DBUS_TYPE_INVALID);
+    dbus_connection_send(c, reply, NULL);
+    dbus_message_unref(reply);
+
+    return DBUS_HANDLER_RESULT_HANDLED;
+}
+
+DBusHandlerResult avahi_dbus_respond_uint32(DBusConnection *c, DBusMessage *m, uint32_t u) {
+    DBusMessage *reply;
+
+    reply = dbus_message_new_method_return(m);
+
+    if (!reply) {
+        avahi_log_error("Failed allocate message");
+        return DBUS_HANDLER_RESULT_NEED_MEMORY;
+    }
+
+    dbus_message_append_args(reply, DBUS_TYPE_UINT32, &u, DBUS_TYPE_INVALID);
+    dbus_connection_send(c, reply, NULL);
+    dbus_message_unref(reply);
+
+    return DBUS_HANDLER_RESULT_HANDLED;
+}
+
+DBusHandlerResult avahi_dbus_respond_boolean(DBusConnection *c, DBusMessage *m, int b) {
+    DBusMessage *reply;
+
+    reply = dbus_message_new_method_return(m);
+
+    if (!reply) {
+        avahi_log_error("Failed allocate message");
+        return DBUS_HANDLER_RESULT_NEED_MEMORY;
+    }
+
+    dbus_message_append_args(reply, DBUS_TYPE_BOOLEAN, &b, DBUS_TYPE_INVALID);
+    dbus_connection_send(c, reply, NULL);
+    dbus_message_unref(reply);
+
+    return DBUS_HANDLER_RESULT_HANDLED;
+}
+
+DBusHandlerResult avahi_dbus_respond_ok(DBusConnection *c, DBusMessage *m) {
+    DBusMessage *reply;
+
+    reply = dbus_message_new_method_return(m);
+
+    if (!reply) {
+        avahi_log_error("Failed allocate message");
+        return DBUS_HANDLER_RESULT_NEED_MEMORY;
+    }
+
+    dbus_connection_send(c, reply, NULL);
+    dbus_message_unref(reply);
+
+    return DBUS_HANDLER_RESULT_HANDLED;
+}
+
+DBusHandlerResult avahi_dbus_respond_path(DBusConnection *c, DBusMessage *m, const char *path) {
+    DBusMessage *reply;
+
+    reply = dbus_message_new_method_return(m);
+
+    if (!reply) {
+        avahi_log_error("Failed allocate message");
+        return DBUS_HANDLER_RESULT_NEED_MEMORY;
+    }
+
+    dbus_message_append_args(reply, DBUS_TYPE_OBJECT_PATH, &path, DBUS_TYPE_INVALID);
+    dbus_connection_send(c, reply, NULL);
+    dbus_message_unref(reply);
+
+    return DBUS_HANDLER_RESULT_HANDLED;
+}
+
+void avahi_dbus_append_server_error(DBusMessage *reply) {
+    const char *t;
+
+    t = avahi_error_number_to_dbus(avahi_server_errno(avahi_server));
+
+    dbus_message_append_args(
+        reply,
+        DBUS_TYPE_STRING, &t,
+        DBUS_TYPE_INVALID);
+}
+
+const char *avahi_dbus_map_browse_signal_name(AvahiBrowserEvent e) {
+    switch (e) {
+        case AVAHI_BROWSER_NEW : return "ItemNew";
+        case AVAHI_BROWSER_REMOVE : return "ItemRemove";
+        case AVAHI_BROWSER_FAILURE : return "Failure";
+        case AVAHI_BROWSER_CACHE_EXHAUSTED : return "CacheExhausted";
+        case AVAHI_BROWSER_ALL_FOR_NOW : return "AllForNow";
+    }
+
+    abort();
+}
+
+const char *avahi_dbus_map_resolve_signal_name(AvahiResolverEvent e) {
+    switch (e) {
+        case AVAHI_RESOLVER_FOUND : return "Found";
+        case AVAHI_RESOLVER_FAILURE : return "Failure";
+    }
+
+    abort();
+}
+
+static char *file_get_contents(const char *fname) {
+    int fd = -1;
+    struct stat st;
+    ssize_t size;
+    char *buf = NULL;
+
+    assert(fname);
+
+#ifdef ENABLE_CHROOT
+    fd = avahi_chroot_helper_get_fd(fname);
+#else
+    fd = open(fname, O_RDONLY);
+#endif
+
+    if (fd < 0) {
+        avahi_log_error("Failed to open %s: %s", fname, strerror(errno));
+        goto fail;
+    }
+
+    if (fstat(fd, &st) < 0) {
+        avahi_log_error("stat(%s) failed: %s", fname, strerror(errno));
+        goto fail;
+    }
+
+    if (!(S_ISREG(st.st_mode))) {
+        avahi_log_error("Invalid file %s", fname);
+        goto fail;
+    }
+
+    if (st.st_size > 1024*1024) { /** 1MB */
+        avahi_log_error("File too large %s", fname);
+        goto fail;
+    }
+
+    buf = avahi_new(char, st.st_size+1);
+
+    if ((size = read(fd, buf, st.st_size)) < 0) {
+        avahi_log_error("read() failed: %s\n", strerror(errno));
+        goto fail;
+    }
+
+    buf[size] = 0;
+
+    close(fd);
+
+    return buf;
+
+fail:
+    if (fd >= 0)
+        close(fd);
+
+    if (buf)
+        avahi_free(buf);
+
+    return NULL;
+
+}
+
+DBusHandlerResult avahi_dbus_handle_introspect(DBusConnection *c, DBusMessage *m, const char *fname) {
+    char *contents, *path;
+    DBusError error;
+
+    assert(c);
+    assert(m);
+    assert(fname);
+
+    dbus_error_init(&error);
+
+    if (!dbus_message_get_args(m, &error, DBUS_TYPE_INVALID)) {
+        avahi_log_error("Error parsing Introspect message: %s", error.message);
+        goto fail;
+    }
+
+    path = avahi_strdup_printf("%s/%s", AVAHI_DBUS_INTROSPECTION_DIR, fname);
+    contents = file_get_contents(path);
+    avahi_free(path);
+
+    if (!contents) {
+        avahi_log_error("Failed to load introspection data.");
+        goto fail;
+    }
+
+    avahi_dbus_respond_string(c, m, contents);
+    avahi_free(contents);
+
+    return DBUS_HANDLER_RESULT_HANDLED;
+
+fail:
+    if (dbus_error_is_set(&error))
+        dbus_error_free(&error);
+
+    return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+
+}
+
+void avahi_dbus_append_string_list(DBusMessage *reply, AvahiStringList *txt) {
+    AvahiStringList *p;
+    DBusMessageIter iter, sub;
+
+    assert(reply);
+
+    dbus_message_iter_init_append(reply, &iter);
+    dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY, "ay", &sub);
+
+    for (p = txt; p; p = p->next) {
+        DBusMessageIter sub2;
+        const uint8_t *data = p->text;
+
+        dbus_message_iter_open_container(&sub, DBUS_TYPE_ARRAY, "y", &sub2);
+        dbus_message_iter_append_fixed_array(&sub2, DBUS_TYPE_BYTE, &data, p->size);
+        dbus_message_iter_close_container(&sub, &sub2);
+
+    }
+    dbus_message_iter_close_container(&iter, &sub);
+}
+
+int avahi_dbus_read_rdata(DBusMessage *m, int idx, void **rdata, uint32_t *size) {
+    DBusMessageIter iter, sub;
+    int n, j;
+    uint8_t *k;
+
+    assert(m);
+
+    dbus_message_iter_init(m, &iter);
+
+    for (j = 0; j < idx; j++)
+       dbus_message_iter_next(&iter);
+
+    if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_ARRAY ||
+        dbus_message_iter_get_element_type(&iter) != DBUS_TYPE_BYTE)
+        goto fail;
+
+    dbus_message_iter_recurse(&iter, &sub);
+    dbus_message_iter_get_fixed_array(&sub, &k, &n);
+
+    *rdata = k;
+    *size = n;
+
+    return 0;
+
+fail:
+    avahi_log_warn("Error parsing data");
+
+    *rdata = NULL;
+    size = 0;
+    return -1;
+}
+
+int avahi_dbus_read_strlst(DBusMessage *m, int idx, AvahiStringList **l) {
+    DBusMessageIter iter, sub;
+    int j;
+    AvahiStringList *strlst = NULL;
+
+    assert(m);
+    assert(l);
+
+    dbus_message_iter_init(m, &iter);
+
+    for (j = 0; j < idx; j++)
+        dbus_message_iter_next(&iter);
+
+    if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_ARRAY ||
+        dbus_message_iter_get_element_type(&iter) != DBUS_TYPE_ARRAY)
+        goto fail;
+
+    dbus_message_iter_recurse(&iter, &sub);
+
+    for (;;) {
+        int at, n;
+        const uint8_t *k;
+        DBusMessageIter sub2;
+
+        if ((at = dbus_message_iter_get_arg_type(&sub)) == DBUS_TYPE_INVALID)
+            break;
+
+        assert(at == DBUS_TYPE_ARRAY);
+
+        if (dbus_message_iter_get_element_type(&sub) != DBUS_TYPE_BYTE)
+            goto fail;
+
+        dbus_message_iter_recurse(&sub, &sub2);
+
+        k = (const uint8_t*) "";
+        n = 0;
+        dbus_message_iter_get_fixed_array(&sub2, &k, &n);
+
+        if (!k)
+            k = (const uint8_t*) "";
+
+        strlst = avahi_string_list_add_arbitrary(strlst, k, n);
+
+        dbus_message_iter_next(&sub);
+    }
+
+    *l = strlst;
+
+    return 0;
+
+fail:
+    avahi_log_warn("Error parsing TXT data");
+
+    avahi_string_list_free(strlst);
+    *l = NULL;
+    return -1;
+}
+
+int avahi_dbus_is_our_own_service(Client *c, AvahiIfIndex interface, AvahiProtocol protocol, const char *name, const char *type, const char *domain) {
+    AvahiSEntryGroup *g;
+
+    if (avahi_server_get_group_of_service(avahi_server, interface, protocol, name, type, domain, &g) == AVAHI_OK) {
+        EntryGroupInfo *egi;
+
+        for (egi = c->entry_groups; egi; egi = egi->entry_groups_next)
+            if (egi->entry_group == g)
+                return 1;
+    }
+
+    return 0;
+}
+
+int avahi_dbus_append_rdata(DBusMessage *message, const void *rdata, size_t size) {
+    DBusMessageIter iter, sub;
+
+    assert(message);
+
+    dbus_message_iter_init_append(message, &iter);
+
+    if (!(dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY, DBUS_TYPE_BYTE_AS_STRING, &sub)) ||
+        !(dbus_message_iter_append_fixed_array(&sub, DBUS_TYPE_BYTE, &rdata, size)) ||
+        !(dbus_message_iter_close_container(&iter, &sub)))
+        return -1;
+
+    return 0;
+}
diff --git a/avahi-0.6.31/avahi-daemon/dbus-util.h b/avahi-0.6.31/avahi-daemon/dbus-util.h
new file mode 100644
index 0000000..a513367
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/dbus-util.h
@@ -0,0 +1,57 @@
+#ifndef foodbusutilhfoo
+#define foodbusutilhfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#include <inttypes.h>
+
+#include <dbus/dbus.h>
+
+#include <avahi-common/strlst.h>
+#include <avahi-common/defs.h>
+
+#include "dbus-internal.h"
+
+DBusHandlerResult avahi_dbus_respond_error(DBusConnection *c, DBusMessage *m, int error, const char *text);
+DBusHandlerResult avahi_dbus_respond_string(DBusConnection *c, DBusMessage *m, const char *text);
+DBusHandlerResult avahi_dbus_respond_int32(DBusConnection *c, DBusMessage *m, int32_t i);
+DBusHandlerResult avahi_dbus_respond_uint32(DBusConnection *c, DBusMessage *m, uint32_t u);
+DBusHandlerResult avahi_dbus_respond_boolean(DBusConnection *c, DBusMessage *m, int b);
+DBusHandlerResult avahi_dbus_respond_ok(DBusConnection *c, DBusMessage *m);
+DBusHandlerResult avahi_dbus_respond_path(DBusConnection *c, DBusMessage *m, const char *path);
+
+void avahi_dbus_append_server_error(DBusMessage *reply);
+
+const char *avahi_dbus_map_browse_signal_name(AvahiBrowserEvent e);
+
+const char *avahi_dbus_map_resolve_signal_name(AvahiResolverEvent e);
+
+DBusHandlerResult avahi_dbus_handle_introspect(DBusConnection *c, DBusMessage *m, const char *fname);
+
+void avahi_dbus_append_string_list(DBusMessage *reply, AvahiStringList *txt);
+
+int avahi_dbus_read_rdata(DBusMessage *m, int idx, void **rdata, uint32_t *size);
+int avahi_dbus_read_strlst(DBusMessage *m, int idx, AvahiStringList **l);
+
+int avahi_dbus_is_our_own_service(Client *c, AvahiIfIndex interface, AvahiProtocol protocol, const char *name, const char *type, const char *domain);
+
+int avahi_dbus_append_rdata(DBusMessage *message, const void *rdata, size_t size);
+
+#endif
diff --git a/avahi-0.6.31/avahi-daemon/example.service b/avahi-0.6.31/avahi-daemon/example.service
new file mode 100644
index 0000000..46db2ae
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/example.service
@@ -0,0 +1,50 @@
+<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
+<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
+
+<!--
+  This file is part of avahi.
+ 
+  avahi 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 of the
+  License, or (at your option) any later version.
+
+  avahi 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
+  General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+  02111-1307 USA.
+-->
+
+<!-- See avahi.service(5) for more information about this configuration file -->
+
+<service-group>
+
+  <name replace-wildcards="yes">Printer on %h</name>
+
+  <service>
+    <type>_printer._tcp</type>
+    <port>515</port>
+  </service>
+
+  <service>
+    <type>_ipp._tcp</type>
+    <subtype>_colour._sub._ipp._tcp</subtype>
+    <port>631</port>
+  </service>
+
+  <service protocol="ipv6">
+    <type>_uberprinter._tcp</type>
+    <domain-name>local</domain-name>
+    <host-name>quux.local</host-name>
+    <port>4711</port>
+    <txt-record>this=is</txt-record>
+    <txt-record>a=really</txt-record>
+    <txt-record>bad=example</txt-record>
+  </service>
+
+</service-group>
diff --git a/avahi-0.6.31/avahi-daemon/hosts b/avahi-0.6.31/avahi-daemon/hosts
new file mode 100644
index 0000000..4483340
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/hosts
@@ -0,0 +1,27 @@
+# This file is part of avahi.
+# 
+# avahi 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 of the
+# License, or (at your option) any later version.
+#
+# avahi 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 General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+# This file contains static ip address <-> host name mappings.  These
+# can be useful to publish services on behalf of a non-avahi enabled
+# device. Please bear in mind that host names are expected to be
+# fully qualified domain names, i.e. ending in .local!
+
+# See avahi.hosts(5) for more information on this configuration file!
+
+# Examples:
+# 192.168.0.1 router.local
+# 2001::81:1 test.local
diff --git a/avahi-0.6.31/avahi-daemon/ini-file-parser-test.c b/avahi-0.6.31/avahi-daemon/ini-file-parser-test.c
new file mode 100644
index 0000000..6ca6641
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/ini-file-parser-test.c
@@ -0,0 +1,62 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+
+#include <avahi-common/malloc.h>
+
+#include "ini-file-parser.h"
+
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
+
+    AvahiIniFile *f;
+    AvahiIniFileGroup *g;
+
+    if (!(f = avahi_ini_file_load("avahi-daemon.conf"))) {
+        return 1;
+    }
+
+    printf("%u groups\n", f->n_groups);
+
+    for (g = f->groups; g; g = g->groups_next) {
+        AvahiIniFilePair *p;
+        printf("<%s> (%u pairs)\n", g->name, g->n_pairs);
+
+        for (p = g->pairs; p; p = p->pairs_next) {
+            char **split, **i;
+
+            printf("\t<%s> = ", p->key);
+            split = avahi_split_csv(p->value);
+
+            for (i = split; *i; i++)
+                printf("<%s> ", *i);
+
+            avahi_strfreev(split);
+
+            printf("\n");
+        }
+    }
+
+    avahi_ini_file_free(f);
+    return 0;
+}
diff --git a/avahi-0.6.31/avahi-daemon/ini-file-parser.c b/avahi-0.6.31/avahi-daemon/ini-file-parser.c
new file mode 100644
index 0000000..0a99ce3
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/ini-file-parser.c
@@ -0,0 +1,196 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <ctype.h>
+
+#include <avahi-common/malloc.h>
+#include <avahi-core/log.h>
+
+#include "ini-file-parser.h"
+
+AvahiIniFile* avahi_ini_file_load(const char *fname) {
+    AvahiIniFile *f;
+    FILE *fo;
+    AvahiIniFileGroup *group = NULL;
+    unsigned line;
+
+    assert(fname);
+
+    if (!(fo = fopen(fname, "r"))) {
+        avahi_log_error("Failed to open file '%s': %s", fname, strerror(errno));
+        return NULL;
+    }
+
+    f = avahi_new(AvahiIniFile, 1);
+    AVAHI_LLIST_HEAD_INIT(AvahiIniFileGroup, f->groups);
+    f->n_groups = 0;
+
+    line = 0;
+    while (!feof(fo)) {
+        char ln[256], *s, *e;
+        AvahiIniFilePair *pair;
+
+        if (!(fgets(ln, sizeof(ln), fo)))
+            break;
+
+        line++;
+
+        s = ln + strspn(ln, " \t");
+        s[strcspn(s, "\r\n")] = 0;
+
+        /* Skip comments and empty lines */
+        if (*s == '#' || *s == '%' || *s == 0)
+            continue;
+
+        if (*s == '[') {
+            /* new group */
+
+            if (!(e = strchr(s, ']'))) {
+                avahi_log_error("Unclosed group header in %s:%u: <%s>", fname, line, s);
+                goto fail;
+            }
+
+            *e = 0;
+
+            group = avahi_new(AvahiIniFileGroup, 1);
+            group->name = avahi_strdup(s+1);
+            group->n_pairs = 0;
+            AVAHI_LLIST_HEAD_INIT(AvahiIniFilePair, group->pairs);
+
+            AVAHI_LLIST_PREPEND(AvahiIniFileGroup, groups, f->groups, group);
+            f->n_groups++;
+        } else {
+
+            /* Normal assignment */
+            if (!(e = strchr(s, '='))) {
+                avahi_log_error("Missing assignment in %s:%u: <%s>", fname, line, s);
+                goto fail;
+            }
+
+            if (!group) {
+                avahi_log_error("Assignment outside group in %s:%u <%s>", fname, line, s);
+                goto fail;
+            }
+
+            /* Split the key and the value */
+            *(e++) = 0;
+
+            pair = avahi_new(AvahiIniFilePair, 1);
+            pair->key = avahi_strdup(s);
+            pair->value = avahi_strdup(e);
+
+            AVAHI_LLIST_PREPEND(AvahiIniFilePair, pairs, group->pairs, pair);
+            group->n_pairs++;
+        }
+    }
+
+    fclose(fo);
+
+    return f;
+
+fail:
+
+    if (fo)
+        fclose(fo);
+
+    if (f)
+        avahi_ini_file_free(f);
+
+    return NULL;
+}
+
+void avahi_ini_file_free(AvahiIniFile *f) {
+    AvahiIniFileGroup *g;
+    assert(f);
+
+    while ((g = f->groups)) {
+        AvahiIniFilePair *p;
+
+        while ((p = g->pairs)) {
+            avahi_free(p->key);
+            avahi_free(p->value);
+
+            AVAHI_LLIST_REMOVE(AvahiIniFilePair, pairs, g->pairs, p);
+            avahi_free(p);
+        }
+
+        avahi_free(g->name);
+
+        AVAHI_LLIST_REMOVE(AvahiIniFileGroup, groups, f->groups, g);
+        avahi_free(g);
+    }
+
+    avahi_free(f);
+}
+
+char** avahi_split_csv(const char *t) {
+    unsigned n_comma = 0;
+    const char *p;
+    char **r, **i;
+
+    for (p = t; *p; p++)
+        if (*p == ',')
+            n_comma++;
+
+    i = r = avahi_new(char*, n_comma+2);
+
+    for (;;) {
+        size_t n, l = strcspn(t, ",");
+        const char *c;
+
+        /* Ignore leading blanks */
+        for (c = t, n = l; isblank(*c); c++, n--);
+
+        /* Ignore trailing blanks */
+        for (; n > 0 && isblank(c[n-1]); n--);
+
+        *(i++) = avahi_strndup(c, n);
+
+        t += l;
+
+        if (*t == 0)
+            break;
+
+        assert(*t == ',');
+        t++;
+    }
+
+    *i = NULL;
+
+    return r;
+}
+
+void avahi_strfreev(char **p) {
+    char **i;
+
+    if (!p)
+        return;
+
+    for (i = p; *i; i++)
+        avahi_free(*i);
+
+    avahi_free(p);
+}
diff --git a/avahi-0.6.31/avahi-daemon/ini-file-parser.h b/avahi-0.6.31/avahi-daemon/ini-file-parser.h
new file mode 100644
index 0000000..dd3aace
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/ini-file-parser.h
@@ -0,0 +1,55 @@
+#ifndef fooinifileparserhfoo
+#define fooinifileparserhfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#include <avahi-common/llist.h>
+
+typedef struct AvahiIniFile AvahiIniFile;
+typedef struct AvahiIniFilePair AvahiIniFilePair;
+typedef struct AvahiIniFileGroup AvahiIniFileGroup;
+
+struct AvahiIniFilePair {
+    AVAHI_LLIST_FIELDS(AvahiIniFilePair, pairs);
+    char *key, *value;
+};
+
+struct AvahiIniFileGroup {
+    AVAHI_LLIST_FIELDS(AvahiIniFileGroup, groups);
+    char *name;
+
+    AVAHI_LLIST_HEAD(AvahiIniFilePair, pairs);
+    unsigned n_pairs;
+};
+
+struct AvahiIniFile {
+    AVAHI_LLIST_HEAD(AvahiIniFileGroup, groups);
+    unsigned n_groups;
+};
+
+
+AvahiIniFile* avahi_ini_file_load(const char *fname);
+void avahi_ini_file_free(AvahiIniFile *f);
+
+char** avahi_split_csv(const char *t);
+
+void avahi_strfreev(char **);
+
+#endif
diff --git a/avahi-0.6.31/avahi-daemon/introspect.dtd b/avahi-0.6.31/avahi-daemon/introspect.dtd
new file mode 100644
index 0000000..15d913a
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/introspect.dtd
@@ -0,0 +1,37 @@
+<!-- DTD for D-BUS Introspection data -->
+<!-- (C) 2005-02-02 David A. Wheeler; released under the D-BUS licenses,
+         GNU GPL version 2 (or greater) and AFL 1.1 (or greater) -->
+
+<!-- see D-BUS specification for documentation -->
+
+<!ELEMENT node (node|interface)*>
+<!ATTLIST node name CDATA #IMPLIED>
+
+<!ELEMENT interface (method|signal|property|annotation)*>
+<!ATTLIST interface name CDATA #REQUIRED>
+
+<!ELEMENT method (arg|annotation)*>
+<!ATTLIST method name CDATA #REQUIRED>
+
+<!ELEMENT signal (arg|annotation)*>
+<!ATTLIST signal name CDATA #REQUIRED>
+
+<!ELEMENT arg EMPTY>
+<!ATTLIST arg name CDATA #IMPLIED>
+<!ATTLIST arg type CDATA #REQUIRED>
+<!-- Method arguments SHOULD include "direction",
+     while signal and error arguments SHOULD not (since there's no point).
+     The DTD format can't express that subtlety. -->
+<!ATTLIST arg direction (in|out) "in">
+
+<!-- AKA "attribute" -->
+<!ELEMENT property (annotation)*>
+<!ATTLIST property name CDATA #REQUIRED>
+<!ATTLIST property type CDATA #REQUIRED> 
+<!ATTLIST property access (read|write|readwrite) #REQUIRED>
+
+<!ELEMENT annotation EMPTY>  <!-- Generic metadata -->
+<!ATTLIST annotation name CDATA #REQUIRED>
+<!ATTLIST annotation value CDATA #REQUIRED>
+
+
diff --git a/avahi-0.6.31/avahi-daemon/introspect.xsl b/avahi-0.6.31/avahi-daemon/introspect.xsl
new file mode 100644
index 0000000..5d68560
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/introspect.xsl
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="iso-8859-15"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">
+
+<!-- 
+  This file is part of avahi.
+
+  avahi is free software; you can redistribute it and/or modify it under
+  the terms of the GNU General Public License as published by the Free
+  Software Foundation; either version 2 of the License, or (at your
+  option) any later version.
+
+  avahi 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 General Public License
+  for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with avahi; if not, write to the Free Software Foundation,
+  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. 
+-->
+
+<xsl:output method="xml" version="1.0" encoding="iso-8859-15" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" indent="yes"/>
+
+<xsl:template match="/">
+  <html>
+    <head>
+      <title>DBUS Introspection data</title>
+      <style type="text/css">
+        body { color: black; background-color: white } 
+        h1 { font-family: sans-serif }
+        ul { list-style-type: none; margin-bottom: 10px }
+        li { font-family: sans-serif }
+        .keyword { font-style: italic }
+        .type { font-weight: bold }
+        .symbol { font-family: monospace }
+        .interface { padding: 10px; margin: 10px }
+      </style>
+    </head>
+    <body>
+      <xsl:for-each select="node/interface">
+        <div class="interface">
+          <h1>
+            <span class="keyword">interface</span><xsl:text> </xsl:text>
+            <span class="symbol"><xsl:value-of select="@name"/></span>
+          </h1>   
+          
+          <ul>
+
+            <xsl:apply-templates select="annotation"/> 
+
+            <xsl:for-each select="method|signal|property">
+              <li>
+                <span class="keyword"><xsl:value-of select="name()"/></span>
+                <xsl:text> </xsl:text>
+                <span class="symbol"><xsl:value-of select="@name"/></span>
+                
+                <ul>
+                  <xsl:apply-templates select="annotation"/> 
+                  <xsl:for-each select="arg">
+                    <li>
+                      <span class="keyword">
+                        <xsl:choose>
+                          <xsl:when test="@direction != &quot;&quot;">
+                            <xsl:value-of select="@direction"/> 
+                          </xsl:when>
+                          <xsl:when test="name(..) = &quot;signal&quot;">
+                            out
+                          </xsl:when>
+                          <xsl:otherwise>
+                            in
+                          </xsl:otherwise>
+                        </xsl:choose>
+                      </span>
+
+                      <xsl:text> </xsl:text>
+                      
+                      <span class="type"><xsl:value-of select="@type"/></span><xsl:text> </xsl:text>
+                      <span class="symbol"><xsl:value-of select="@name"/></span><xsl:text> </xsl:text>
+                    </li>
+                  </xsl:for-each>
+                </ul>
+
+              </li>
+            </xsl:for-each>
+
+          </ul>
+        </div>
+      </xsl:for-each>
+    </body>
+  </html>
+</xsl:template>
+
+
+<xsl:template match="annotation"> 
+  <li>
+    <span class="keyword">annotation</span>
+    <code><xsl:value-of select="@name"/></code><xsl:text> = </xsl:text>
+    <code><xsl:value-of select="@value"/></code>
+  </li>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/avahi-0.6.31/avahi-daemon/main.c b/avahi-0.6.31/avahi-daemon/main.c
new file mode 100644
index 0000000..d46f40a
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/main.c
@@ -0,0 +1,1668 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <assert.h>
+#include <getopt.h>
+#include <string.h>
+#include <signal.h>
+#include <errno.h>
+#include <string.h>
+#include <unistd.h>
+#include <grp.h>
+#include <pwd.h>
+#include <sys/stat.h>
+#include <sys/ioctl.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <time.h>
+#include <stdlib.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+#include <sys/socket.h>
+
+#ifdef HAVE_INOTIFY
+#include <sys/inotify.h>
+#endif
+
+#ifdef HAVE_KQUEUE
+#include <sys/types.h>
+#include <sys/event.h>
+#include <unistd.h>
+#endif
+
+#include <libdaemon/dfork.h>
+#include <libdaemon/dsignal.h>
+#include <libdaemon/dlog.h>
+#include <libdaemon/dpid.h>
+
+#include <avahi-common/malloc.h>
+#include <avahi-common/simple-watch.h>
+#include <avahi-common/error.h>
+#include <avahi-common/alternative.h>
+#include <avahi-common/domain.h>
+
+#include <avahi-core/core.h>
+#include <avahi-core/publish.h>
+#include <avahi-core/dns-srv-rr.h>
+#include <avahi-core/log.h>
+
+#ifdef ENABLE_CHROOT
+#include "chroot.h"
+#include "caps.h"
+#endif
+
+#include "setproctitle.h"
+#include "main.h"
+#include "simple-protocol.h"
+#include "static-services.h"
+#include "static-hosts.h"
+#include "ini-file-parser.h"
+#include "sd-daemon.h"
+
+#ifdef HAVE_DBUS
+#include "dbus-protocol.h"
+#endif
+
+AvahiServer *avahi_server = NULL;
+AvahiSimplePoll *simple_poll_api = NULL;
+static char *argv0 = NULL;
+int nss_support = 0;
+
+typedef enum {
+    DAEMON_RUN,
+    DAEMON_KILL,
+    DAEMON_VERSION,
+    DAEMON_HELP,
+    DAEMON_RELOAD,
+    DAEMON_CHECK
+} DaemonCommand;
+
+typedef struct {
+    AvahiServerConfig server_config;
+    DaemonCommand command;
+    int daemonize;
+    int use_syslog;
+    char *config_file;
+#ifdef HAVE_DBUS
+    int enable_dbus;
+    int fail_on_missing_dbus;
+    unsigned n_clients_max;
+    unsigned n_objects_per_client_max;
+    unsigned n_entries_per_entry_group_max;
+#endif
+    int drop_root;
+    int set_rlimits;
+#ifdef ENABLE_CHROOT
+    int use_chroot;
+#endif
+    int modify_proc_title;
+
+    int disable_user_service_publishing;
+    int publish_resolv_conf;
+    char ** publish_dns_servers;
+    int debug;
+
+    int rlimit_as_set, rlimit_core_set, rlimit_data_set, rlimit_fsize_set, rlimit_nofile_set, rlimit_stack_set;
+    rlim_t rlimit_as, rlimit_core, rlimit_data, rlimit_fsize, rlimit_nofile, rlimit_stack;
+
+#ifdef RLIMIT_NPROC
+    int rlimit_nproc_set;
+    rlim_t rlimit_nproc;
+#endif
+} DaemonConfig;
+
+#define RESOLV_CONF "/etc/resolv.conf"
+#define BROWSE_DOMAINS_MAX 16
+
+static AvahiSEntryGroup *dns_servers_entry_group = NULL;
+static AvahiSEntryGroup *resolv_conf_entry_group = NULL;
+
+static char **resolv_conf_name_servers = NULL;
+static char **resolv_conf_search_domains = NULL;
+
+static DaemonConfig config;
+
+static int has_prefix(const char *s, const char *prefix) {
+    size_t l;
+
+    l = strlen(prefix);
+
+    return strlen(s) >= l && strncmp(s, prefix, l) == 0;
+}
+
+static int load_resolv_conf(void) {
+    int ret = -1;
+    FILE *f;
+    int i = 0, j = 0;
+
+    avahi_strfreev(resolv_conf_name_servers);
+    resolv_conf_name_servers = NULL;
+
+    avahi_strfreev(resolv_conf_search_domains);
+    resolv_conf_search_domains = NULL;
+
+#ifdef ENABLE_CHROOT
+    f = avahi_chroot_helper_get_file(RESOLV_CONF);
+#else
+    f = fopen(RESOLV_CONF, "r");
+#endif
+
+    if (!f) {
+        avahi_log_warn("Failed to open "RESOLV_CONF": %s", strerror(errno));
+        goto finish;
+    }
+
+    resolv_conf_name_servers = avahi_new0(char*, AVAHI_WIDE_AREA_SERVERS_MAX+1);
+    resolv_conf_search_domains = avahi_new0(char*, BROWSE_DOMAINS_MAX+1);
+
+    while (!feof(f)) {
+        char ln[128];
+        char *p;
+
+        if (!(fgets(ln, sizeof(ln), f)))
+            break;
+
+        ln[strcspn(ln, "\r\n#")] = 0;
+        p = ln + strspn(ln, "\t ");
+
+        if ((has_prefix(p, "nameserver ") || has_prefix(p, "nameserver\t")) && i < AVAHI_WIDE_AREA_SERVERS_MAX) {
+            p += 10;
+            p += strspn(p, "\t ");
+            p[strcspn(p, "\t ")] = 0;
+            resolv_conf_name_servers[i++] = avahi_strdup(p);
+        }
+
+        if ((has_prefix(p, "search ") || has_prefix(p, "search\t") ||
+             has_prefix(p, "domain ") || has_prefix(p, "domain\t"))) {
+
+            p += 6;
+
+            while (j < BROWSE_DOMAINS_MAX) {
+                size_t k;
+
+                p += strspn(p, "\t ");
+                k = strcspn(p, "\t ");
+
+                if (k > 0) {
+                    resolv_conf_search_domains[j++] = avahi_strndup(p, k);
+                    p += k;
+                }
+
+                if (!*p)
+                    break;
+            }
+        }
+    }
+
+    ret = 0;
+
+finish:
+
+    if (ret != 0) {
+        avahi_strfreev(resolv_conf_name_servers);
+        resolv_conf_name_servers = NULL;
+
+        avahi_strfreev(resolv_conf_search_domains);
+        resolv_conf_search_domains = NULL;
+    }
+
+    if (f)
+        fclose(f);
+
+    return ret;
+}
+
+static AvahiSEntryGroup* add_dns_servers(AvahiServer *s, AvahiSEntryGroup* g, char **l) {
+    char **p;
+
+    assert(s);
+    assert(l);
+
+    if (!g)
+        g = avahi_s_entry_group_new(s, NULL, NULL);
+
+    assert(avahi_s_entry_group_is_empty(g));
+
+    for (p = l; *p; p++) {
+        AvahiAddress a;
+
+        if (!avahi_address_parse(*p, AVAHI_PROTO_UNSPEC, &a))
+            avahi_log_warn("Failed to parse address '%s', ignoring.", *p);
+        else
+            if (avahi_server_add_dns_server_address(s, g, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, NULL, AVAHI_DNS_SERVER_RESOLVE, &a, 53) < 0) {
+                avahi_s_entry_group_free(g);
+                avahi_log_error("Failed to add DNS server address: %s", avahi_strerror(avahi_server_errno(s)));
+                return NULL;
+            }
+    }
+
+    avahi_s_entry_group_commit(g);
+
+    return g;
+}
+
+static void remove_dns_server_entry_groups(void) {
+
+    if (resolv_conf_entry_group)
+        avahi_s_entry_group_reset(resolv_conf_entry_group);
+
+    if (dns_servers_entry_group)
+        avahi_s_entry_group_reset(dns_servers_entry_group);
+}
+
+static void update_wide_area_servers(void) {
+    AvahiAddress a[AVAHI_WIDE_AREA_SERVERS_MAX];
+    unsigned n = 0;
+    char **p;
+
+    if (!resolv_conf_name_servers) {
+        avahi_server_set_wide_area_servers(avahi_server, NULL, 0);
+        return;
+    }
+
+    for (p = resolv_conf_name_servers; *p && n < AVAHI_WIDE_AREA_SERVERS_MAX; p++) {
+        if (!avahi_address_parse(*p, AVAHI_PROTO_UNSPEC, &a[n]))
+            avahi_log_warn("Failed to parse address '%s', ignoring.", *p);
+        else
+            n++;
+    }
+
+    avahi_server_set_wide_area_servers(avahi_server, a, n);
+}
+
+static AvahiStringList *filter_duplicate_domains(AvahiStringList *l) {
+    AvahiStringList *e, *n, *p;
+
+    if (!l)
+        return l;
+
+    for (p = l, e = l->next; e; e = n) {
+        n = e->next;
+
+        if (avahi_domain_equal((char*) e->text, (char*) l->text)) {
+            p->next = e->next;
+            avahi_free(e);
+        } else
+            p = e;
+    }
+
+    l->next = filter_duplicate_domains(l->next);
+    return l;
+}
+
+static void update_browse_domains(void) {
+    AvahiStringList *l;
+    int n;
+    char **p;
+
+    if (!resolv_conf_search_domains) {
+        avahi_server_set_browse_domains(avahi_server, NULL);
+        return;
+    }
+
+    l = avahi_string_list_copy(config.server_config.browse_domains);
+
+    for (p = resolv_conf_search_domains, n = 0; *p && n < BROWSE_DOMAINS_MAX; p++, n++) {
+        if (!avahi_is_valid_domain_name(*p))
+            avahi_log_warn("'%s' is no valid domain name, ignoring.", *p);
+        else
+            l = avahi_string_list_add(l, *p);
+    }
+
+    l = filter_duplicate_domains(l);
+
+    avahi_server_set_browse_domains(avahi_server, l);
+    avahi_string_list_free(l);
+}
+
+static void server_callback(AvahiServer *s, AvahiServerState state, void *userdata) {
+    DaemonConfig *c = userdata;
+
+    assert(s);
+    assert(c);
+
+    /* This function is possibly called before the global variable
+     * avahi_server has been set, therefore we do it explicitly */
+
+    avahi_server = s;
+
+#ifdef HAVE_DBUS
+    if (c->enable_dbus && state != AVAHI_SERVER_INVALID && state != AVAHI_SERVER_FAILURE)
+        dbus_protocol_server_state_changed(state);
+#endif
+
+    switch (state) {
+        case AVAHI_SERVER_RUNNING:
+            avahi_log_info("Server startup complete. Host name is %s. Local service cookie is %u.", avahi_server_get_host_name_fqdn(s), avahi_server_get_local_service_cookie(s));
+            sd_notifyf(0, "STATUS=Server startup complete. Host name is %s. Local service cookie is %u.", avahi_server_get_host_name_fqdn(s), avahi_server_get_local_service_cookie(s));
+            avahi_set_proc_title(argv0, "%s: running [%s]", argv0, avahi_server_get_host_name_fqdn(s));
+
+            static_service_add_to_server();
+            static_hosts_add_to_server();
+
+            remove_dns_server_entry_groups();
+
+            if (c->publish_resolv_conf && resolv_conf_name_servers && resolv_conf_name_servers[0])
+                resolv_conf_entry_group = add_dns_servers(s, resolv_conf_entry_group, resolv_conf_name_servers);
+
+            if (c->publish_dns_servers && c->publish_dns_servers[0])
+                dns_servers_entry_group = add_dns_servers(s, dns_servers_entry_group, c->publish_dns_servers);
+
+            simple_protocol_restart_queries();
+            break;
+
+        case AVAHI_SERVER_COLLISION: {
+            char *n;
+
+            static_service_remove_from_server();
+            static_hosts_remove_from_server();
+            remove_dns_server_entry_groups();
+
+            n = avahi_alternative_host_name(avahi_server_get_host_name(s));
+
+            avahi_log_warn("Host name conflict, retrying with %s", n);
+            sd_notifyf(0, "STATUS=Host name conflict, retrying with %s", n);
+            avahi_set_proc_title(argv0, "%s: collision [%s]", argv0, n);
+
+            avahi_server_set_host_name(s, n);
+            avahi_free(n);
+
+            break;
+        }
+
+        case AVAHI_SERVER_FAILURE:
+
+            avahi_log_error("Server error: %s", avahi_strerror(avahi_server_errno(s)));
+            sd_notifyf(0, "STATUS=Server error: %s", avahi_strerror(avahi_server_errno(s)));
+
+            avahi_simple_poll_quit(simple_poll_api);
+            break;
+
+        case AVAHI_SERVER_REGISTERING:
+
+            sd_notifyf(0, "STATUS=Registering host name %s", avahi_server_get_host_name_fqdn(s));
+            avahi_set_proc_title(argv0, "%s: registering [%s]", argv0, avahi_server_get_host_name_fqdn(s));
+
+            static_service_remove_from_server();
+            static_hosts_remove_from_server();
+            remove_dns_server_entry_groups();
+
+            break;
+
+        case AVAHI_SERVER_INVALID:
+            break;
+
+    }
+}
+
+static void help(FILE *f) {
+    fprintf(f,
+            "%s [options]\n"
+            "    -h --help          Show this help\n"
+            "    -D --daemonize     Daemonize after startup (implies -s)\n"
+            "    -s --syslog        Write log messages to syslog(3) instead of STDERR\n"
+            "    -k --kill          Kill a running daemon\n"
+            "    -r --reload        Request a running daemon to reload static services\n"
+            "    -c --check         Return 0 if a daemon is already running\n"
+            "    -V --version       Show version\n"
+            "    -f --file=FILE     Load the specified configuration file instead of\n"
+            "                       "AVAHI_CONFIG_FILE"\n"
+            "       --no-rlimits    Don't enforce resource limits\n"
+            "       --no-drop-root  Don't drop privileges\n"
+#ifdef ENABLE_CHROOT
+            "       --no-chroot     Don't chroot()\n"
+#endif
+            "       --no-proc-title Don't modify process title\n"
+            "       --debug         Increase verbosity\n",
+            argv0);
+}
+
+
+static int parse_command_line(DaemonConfig *c, int argc, char *argv[]) {
+    int o;
+
+    enum {
+        OPTION_NO_RLIMITS = 256,
+        OPTION_NO_DROP_ROOT,
+#ifdef ENABLE_CHROOT
+        OPTION_NO_CHROOT,
+#endif
+        OPTION_NO_PROC_TITLE,
+        OPTION_DEBUG
+    };
+
+    static const struct option long_options[] = {
+        { "help",           no_argument,       NULL, 'h' },
+        { "daemonize",      no_argument,       NULL, 'D' },
+        { "kill",           no_argument,       NULL, 'k' },
+        { "version",        no_argument,       NULL, 'V' },
+        { "file",           required_argument, NULL, 'f' },
+        { "reload",         no_argument,       NULL, 'r' },
+        { "check",          no_argument,       NULL, 'c' },
+        { "syslog",         no_argument,       NULL, 's' },
+        { "no-rlimits",     no_argument,       NULL, OPTION_NO_RLIMITS },
+        { "no-drop-root",   no_argument,       NULL, OPTION_NO_DROP_ROOT },
+#ifdef ENABLE_CHROOT
+        { "no-chroot",      no_argument,       NULL, OPTION_NO_CHROOT },
+#endif
+        { "no-proc-title",  no_argument,       NULL, OPTION_NO_PROC_TITLE },
+        { "debug",          no_argument,       NULL, OPTION_DEBUG },
+        { NULL, 0, NULL, 0 }
+    };
+
+    assert(c);
+
+    while ((o = getopt_long(argc, argv, "hDkVf:rcs", long_options, NULL)) >= 0) {
+
+        switch(o) {
+            case 's':
+                c->use_syslog = 1;
+                break;
+            case 'h':
+                c->command = DAEMON_HELP;
+                break;
+            case 'D':
+                c->daemonize = 1;
+                break;
+            case 'k':
+                c->command = DAEMON_KILL;
+                break;
+            case 'V':
+                c->command = DAEMON_VERSION;
+                break;
+            case 'f':
+                avahi_free(c->config_file);
+                c->config_file = avahi_strdup(optarg);
+                break;
+            case 'r':
+                c->command = DAEMON_RELOAD;
+                break;
+            case 'c':
+                c->command = DAEMON_CHECK;
+                break;
+            case OPTION_NO_RLIMITS:
+                c->set_rlimits = 0;
+                break;
+            case OPTION_NO_DROP_ROOT:
+                c->drop_root = 0;
+                break;
+#ifdef ENABLE_CHROOT
+            case OPTION_NO_CHROOT:
+                c->use_chroot = 0;
+                break;
+#endif
+            case OPTION_NO_PROC_TITLE:
+                c->modify_proc_title = 0;
+                break;
+            case OPTION_DEBUG:
+                c->debug = 1;
+                break;
+            default:
+                return -1;
+        }
+    }
+
+    if (optind < argc) {
+        fprintf(stderr, "Too many arguments\n");
+        return -1;
+    }
+
+    return 0;
+}
+
+static int is_yes(const char *s) {
+    assert(s);
+
+    return *s == 'y' || *s == 'Y' || *s == '1' || *s == 't' || *s == 'T';
+}
+
+static int parse_unsigned(const char *s, unsigned *u) {
+    char *e = NULL;
+    unsigned long ul;
+    unsigned k;
+
+    errno = 0;
+    ul = strtoul(s, &e, 0);
+
+    if (!e || *e || errno != 0)
+        return -1;
+
+    k = (unsigned) ul;
+
+    if ((unsigned long) k != ul)
+        return -1;
+
+    *u = k;
+    return 0;
+}
+
+static int parse_usec(const char *s, AvahiUsec *u) {
+    char *e = NULL;
+    unsigned long long ull;
+    AvahiUsec k;
+
+    errno = 0;
+    ull = strtoull(s, &e, 0);
+
+    if (!e || *e || errno != 0)
+        return -1;
+
+    k = (AvahiUsec) ull;
+
+    if ((unsigned long long) k != ull)
+        return -1;
+
+    *u = k;
+    return 0;
+}
+
+static int load_config_file(DaemonConfig *c) {
+    int r = -1;
+    AvahiIniFile *f;
+    AvahiIniFileGroup *g;
+
+    assert(c);
+
+    if (!(f = avahi_ini_file_load(c->config_file ? c->config_file : AVAHI_CONFIG_FILE)))
+        goto finish;
+
+    for (g = f->groups; g; g = g->groups_next) {
+
+        if (strcasecmp(g->name, "server") == 0) {
+            AvahiIniFilePair *p;
+
+            for (p = g->pairs; p; p = p->pairs_next) {
+
+                if (strcasecmp(p->key, "host-name") == 0) {
+                    avahi_free(c->server_config.host_name);
+                    c->server_config.host_name = avahi_strdup(p->value);
+                } else if (strcasecmp(p->key, "domain-name") == 0) {
+                    avahi_free(c->server_config.domain_name);
+                    c->server_config.domain_name = avahi_strdup(p->value);
+                } else if (strcasecmp(p->key, "browse-domains") == 0) {
+                    char **e, **t;
+
+                    e = avahi_split_csv(p->value);
+
+                    for (t = e; *t; t++) {
+                        char cleaned[AVAHI_DOMAIN_NAME_MAX];
+
+                        if (!avahi_normalize_name(*t, cleaned, sizeof(cleaned))) {
+                            avahi_log_error("Invalid domain name \"%s\" for key \"%s\" in group \"%s\"\n", *t, p->key, g->name);
+                            avahi_strfreev(e);
+                            goto finish;
+                        }
+
+                        c->server_config.browse_domains = avahi_string_list_add(c->server_config.browse_domains, cleaned);
+                    }
+
+                    avahi_strfreev(e);
+
+                    c->server_config.browse_domains = filter_duplicate_domains(c->server_config.browse_domains);
+                } else if (strcasecmp(p->key, "use-ipv4") == 0)
+                    c->server_config.use_ipv4 = is_yes(p->value);
+                else if (strcasecmp(p->key, "use-ipv6") == 0)
+                    c->server_config.use_ipv6 = is_yes(p->value);
+                else if (strcasecmp(p->key, "check-response-ttl") == 0)
+                    c->server_config.check_response_ttl = is_yes(p->value);
+                else if (strcasecmp(p->key, "allow-point-to-point") == 0)
+                    c->server_config.allow_point_to_point = is_yes(p->value);
+                else if (strcasecmp(p->key, "use-iff-running") == 0)
+                    c->server_config.use_iff_running = is_yes(p->value);
+                else if (strcasecmp(p->key, "disallow-other-stacks") == 0)
+                    c->server_config.disallow_other_stacks = is_yes(p->value);
+#ifdef HAVE_DBUS
+                else if (strcasecmp(p->key, "enable-dbus") == 0) {
+
+                    if (*(p->value) == 'w' || *(p->value) == 'W') {
+                        c->fail_on_missing_dbus = 0;
+                        c->enable_dbus = 1;
+                    } else if (*(p->value) == 'y' || *(p->value) == 'Y') {
+                        c->fail_on_missing_dbus = 1;
+                        c->enable_dbus = 1;
+                    } else {
+                        c->enable_dbus = 0;
+                    }
+                }
+#endif
+                else if (strcasecmp(p->key, "allow-interfaces") == 0) {
+                    char **e, **t;
+
+                    avahi_string_list_free(c->server_config.allow_interfaces);
+                    c->server_config.allow_interfaces = NULL;
+                    e = avahi_split_csv(p->value);
+
+                    for (t = e; *t; t++)
+                        c->server_config.allow_interfaces = avahi_string_list_add(c->server_config.allow_interfaces, *t);
+
+                    avahi_strfreev(e);
+                } else if (strcasecmp(p->key, "deny-interfaces") == 0) {
+                    char **e, **t;
+
+                    avahi_string_list_free(c->server_config.deny_interfaces);
+                    c->server_config.deny_interfaces = NULL;
+                    e = avahi_split_csv(p->value);
+
+                    for (t = e; *t; t++)
+                        c->server_config.deny_interfaces = avahi_string_list_add(c->server_config.deny_interfaces, *t);
+
+                    avahi_strfreev(e);
+                } else if (strcasecmp(p->key, "ratelimit-interval-usec") == 0) {
+                    AvahiUsec k;
+
+                    if (parse_usec(p->value, &k) < 0) {
+                        avahi_log_error("Invalid ratelimit-interval-usec setting %s", p->value);
+                        goto finish;
+                    }
+
+                    c->server_config.ratelimit_interval = k;
+
+                } else if (strcasecmp(p->key, "ratelimit-burst") == 0) {
+                    unsigned k;
+
+                    if (parse_unsigned(p->value, &k) < 0) {
+                        avahi_log_error("Invalid ratelimit-burst setting %s", p->value);
+                        goto finish;
+                    }
+
+                    c->server_config.ratelimit_burst = k;
+
+                } else if (strcasecmp(p->key, "cache-entries-max") == 0) {
+                    unsigned k;
+
+                    if (parse_unsigned(p->value, &k) < 0) {
+                        avahi_log_error("Invalid cache-entries-max setting %s", p->value);
+                        goto finish;
+                    }
+
+                    c->server_config.n_cache_entries_max = k;
+#ifdef HAVE_DBUS
+                } else if (strcasecmp(p->key, "clients-max") == 0) {
+                    unsigned k;
+
+                    if (parse_unsigned(p->value, &k) < 0) {
+                        avahi_log_error("Invalid clients-max setting %s", p->value);
+                        goto finish;
+                    }
+
+                    c->n_clients_max = k;
+                } else if (strcasecmp(p->key, "objects-per-client-max") == 0) {
+                    unsigned k;
+
+                    if (parse_unsigned(p->value, &k) < 0) {
+                        avahi_log_error("Invalid objects-per-client-max setting %s", p->value);
+                        goto finish;
+                    }
+
+                    c->n_objects_per_client_max = k;
+                } else if (strcasecmp(p->key, "entries-per-entry-group-max") == 0) {
+                    unsigned k;
+
+                    if (parse_unsigned(p->value, &k) < 0) {
+                        avahi_log_error("Invalid entries-per-entry-group-max setting %s", p->value);
+                        goto finish;
+                    }
+
+                    c->n_entries_per_entry_group_max = k;
+#endif
+                } else {
+                    avahi_log_error("Invalid configuration key \"%s\" in group \"%s\"\n", p->key, g->name);
+                    goto finish;
+                }
+            }
+
+        } else if (strcasecmp(g->name, "publish") == 0) {
+            AvahiIniFilePair *p;
+
+            for (p = g->pairs; p; p = p->pairs_next) {
+
+                if (strcasecmp(p->key, "publish-addresses") == 0)
+                    c->server_config.publish_addresses = is_yes(p->value);
+                else if (strcasecmp(p->key, "publish-hinfo") == 0)
+                    c->server_config.publish_hinfo = is_yes(p->value);
+                else if (strcasecmp(p->key, "publish-workstation") == 0)
+                    c->server_config.publish_workstation = is_yes(p->value);
+                else if (strcasecmp(p->key, "publish-domain") == 0)
+                    c->server_config.publish_domain = is_yes(p->value);
+                else if (strcasecmp(p->key, "publish-resolv-conf-dns-servers") == 0)
+                    c->publish_resolv_conf = is_yes(p->value);
+                else if (strcasecmp(p->key, "disable-publishing") == 0)
+                    c->server_config.disable_publishing = is_yes(p->value);
+                else if (strcasecmp(p->key, "disable-user-service-publishing") == 0)
+                    c->disable_user_service_publishing = is_yes(p->value);
+                else if (strcasecmp(p->key, "add-service-cookie") == 0)
+                    c->server_config.add_service_cookie = is_yes(p->value);
+                else if (strcasecmp(p->key, "publish-dns-servers") == 0) {
+                    avahi_strfreev(c->publish_dns_servers);
+                    c->publish_dns_servers = avahi_split_csv(p->value);
+                } else if (strcasecmp(p->key, "publish-a-on-ipv6") == 0)
+                    c->server_config.publish_a_on_ipv6 = is_yes(p->value);
+                else if (strcasecmp(p->key, "publish-aaaa-on-ipv4") == 0)
+                    c->server_config.publish_aaaa_on_ipv4 = is_yes(p->value);
+                else {
+                    avahi_log_error("Invalid configuration key \"%s\" in group \"%s\"\n", p->key, g->name);
+                    goto finish;
+                }
+            }
+
+        } else if (strcasecmp(g->name, "wide-area") == 0) {
+            AvahiIniFilePair *p;
+
+            for (p = g->pairs; p; p = p->pairs_next) {
+
+                if (strcasecmp(p->key, "enable-wide-area") == 0)
+                    c->server_config.enable_wide_area = is_yes(p->value);
+                else {
+                    avahi_log_error("Invalid configuration key \"%s\" in group \"%s\"\n", p->key, g->name);
+                    goto finish;
+                }
+            }
+
+        } else if (strcasecmp(g->name, "reflector") == 0) {
+            AvahiIniFilePair *p;
+
+            for (p = g->pairs; p; p = p->pairs_next) {
+
+                if (strcasecmp(p->key, "enable-reflector") == 0)
+                    c->server_config.enable_reflector = is_yes(p->value);
+                else if (strcasecmp(p->key, "reflect-ipv") == 0)
+                    c->server_config.reflect_ipv = is_yes(p->value);
+                else {
+                    avahi_log_error("Invalid configuration key \"%s\" in group \"%s\"\n", p->key, g->name);
+                    goto finish;
+                }
+            }
+
+        } else if (strcasecmp(g->name, "rlimits") == 0) {
+            AvahiIniFilePair *p;
+
+            for (p = g->pairs; p; p = p->pairs_next) {
+
+                if (strcasecmp(p->key, "rlimit-as") == 0) {
+                    c->rlimit_as_set = 1;
+                    c->rlimit_as = atoi(p->value);
+                } else if (strcasecmp(p->key, "rlimit-core") == 0) {
+                    c->rlimit_core_set = 1;
+                    c->rlimit_core = atoi(p->value);
+                } else if (strcasecmp(p->key, "rlimit-data") == 0) {
+                    c->rlimit_data_set = 1;
+                    c->rlimit_data = atoi(p->value);
+                } else if (strcasecmp(p->key, "rlimit-fsize") == 0) {
+                    c->rlimit_fsize_set = 1;
+                    c->rlimit_fsize = atoi(p->value);
+                } else if (strcasecmp(p->key, "rlimit-nofile") == 0) {
+                    c->rlimit_nofile_set = 1;
+                    c->rlimit_nofile = atoi(p->value);
+                } else if (strcasecmp(p->key, "rlimit-stack") == 0) {
+                    c->rlimit_stack_set = 1;
+                    c->rlimit_stack = atoi(p->value);
+                } else if (strcasecmp(p->key, "rlimit-nproc") == 0) {
+#ifdef RLIMIT_NPROC
+                    c->rlimit_nproc_set = 1;
+                    c->rlimit_nproc = atoi(p->value);
+#else
+                    avahi_log_error("Ignoring configuration key \"%s\" in group \"%s\"\n", p->key, g->name);
+#endif
+                } else {
+                    avahi_log_error("Invalid configuration key \"%s\" in group \"%s\"\n", p->key, g->name);
+                    goto finish;
+                }
+
+            }
+
+        } else {
+            avahi_log_error("Invalid configuration file group \"%s\".\n", g->name);
+            goto finish;
+        }
+    }
+
+    r = 0;
+
+finish:
+
+    if (f)
+        avahi_ini_file_free(f);
+
+    return r;
+}
+
+static void log_function(AvahiLogLevel level, const char *txt) {
+
+    static const int log_level_map[] = {
+        LOG_ERR,
+        LOG_WARNING,
+        LOG_NOTICE,
+        LOG_INFO,
+        LOG_DEBUG
+    };
+
+    assert(level < AVAHI_LOG_LEVEL_MAX);
+    assert(txt);
+
+    if (!config.debug && level == AVAHI_LOG_DEBUG)
+        return;
+
+    daemon_log(log_level_map[level], "%s", txt);
+}
+
+static void dump(const char *text, AVAHI_GCC_UNUSED void* userdata) {
+    avahi_log_info("%s", text);
+}
+
+#ifdef HAVE_INOTIFY
+
+static int inotify_fd = -1;
+
+static void add_inotify_watches(void) {
+    int c = 0;
+    /* We ignore the return values, because one or more of these files
+     * might not exist and we're OK with that. In addition we never
+     * want to remove these watches, hence we keep their ids? */
+
+#ifdef ENABLE_CHROOT
+    c = config.use_chroot;
+#endif
+
+    inotify_add_watch(inotify_fd, c ? "/services" : AVAHI_SERVICE_DIR, IN_CLOSE_WRITE|IN_DELETE|IN_DELETE_SELF|IN_MOVED_FROM|IN_MOVED_TO|IN_MOVE_SELF
+#ifdef IN_ONLYDIR
+                      |IN_ONLYDIR
+#endif
+    );
+    inotify_add_watch(inotify_fd, c ? "/" : AVAHI_CONFIG_DIR, IN_CLOSE_WRITE|IN_DELETE|IN_DELETE_SELF|IN_MOVED_FROM|IN_MOVED_TO|IN_MOVE_SELF
+#ifdef IN_ONLYDIR
+                      |IN_ONLYDIR
+#endif
+    );
+}
+
+#endif
+
+#ifdef HAVE_KQUEUE
+
+#define NUM_WATCHES 2
+
+static int kq = -1;
+static int kfds[NUM_WATCHES];
+static int num_kfds = 0;
+
+static void add_kqueue_watch(const char *dir);
+
+static void add_kqueue_watches(void) {
+    int c = 0;
+
+#ifdef ENABLE_CHROOT
+    c = config.use_chroot;
+#endif
+
+    add_kqueue_watch(c ? "/" : AVAHI_CONFIG_DIR);
+    add_kqueue_watch(c ? "/services" : AVAHI_SERVICE_DIR);
+}
+
+static void add_kqueue_watch(const char *dir) {
+    int fd;
+    struct kevent ev;
+
+    if (kq < 0)
+        return;
+
+    if (num_kfds >= NUM_WATCHES)
+        return;
+
+    fd = open(dir, O_RDONLY);
+    if (fd < 0)
+        return;
+    EV_SET(&ev, fd, EVFILT_VNODE, EV_ADD | EV_ENABLE | EV_CLEAR,
+           NOTE_DELETE | NOTE_EXTEND | NOTE_WRITE | NOTE_RENAME,
+           0, 0);
+    if (kevent(kq, &ev, 1, NULL, 0, NULL) == -1) {
+        close(fd);
+        return;
+    }
+
+    kfds[num_kfds++] = fd;
+}
+
+#endif
+
+static void reload_config(void) {
+
+#ifdef HAVE_INOTIFY
+    /* Refresh in case the config dirs have been removed */
+    add_inotify_watches();
+#endif
+
+#ifdef HAVE_KQUEUE
+    add_kqueue_watches();
+#endif
+
+#ifdef ENABLE_CHROOT
+    static_service_load(config.use_chroot);
+    static_hosts_load(config.use_chroot);
+#else
+    static_service_load(0);
+    static_hosts_load(0);
+#endif
+    static_service_add_to_server();
+    static_hosts_add_to_server();
+
+    if (resolv_conf_entry_group)
+        avahi_s_entry_group_reset(resolv_conf_entry_group);
+
+    load_resolv_conf();
+
+    update_wide_area_servers();
+    update_browse_domains();
+
+    if (config.publish_resolv_conf && resolv_conf_name_servers && resolv_conf_name_servers[0])
+        resolv_conf_entry_group = add_dns_servers(avahi_server, resolv_conf_entry_group, resolv_conf_name_servers);
+}
+
+#ifdef HAVE_INOTIFY
+
+static void inotify_callback(AvahiWatch *watch, int fd, AVAHI_GCC_UNUSED AvahiWatchEvent event, AVAHI_GCC_UNUSED void *userdata) {
+    char* buffer;
+    int n = 0;
+
+    assert(fd == inotify_fd);
+    assert(watch);
+
+    ioctl(inotify_fd, FIONREAD, &n);
+    if (n <= 0)
+        n = 128;
+
+    buffer = avahi_malloc(n);
+    if (read(inotify_fd, buffer, n) < 0 ) {
+        avahi_free(buffer);
+        avahi_log_error("Failed to read inotify event: %s", avahi_strerror(errno));
+        return;
+    }
+    avahi_free(buffer);
+
+    avahi_log_info("Files changed, reloading.");
+    reload_config();
+}
+
+#endif
+
+#ifdef HAVE_KQUEUE
+
+static void kqueue_callback(AvahiWatch *watch, int fd, AVAHI_GCC_UNUSED AvahiWatchEvent event, AVAHI_GCC_UNUSED void *userdata) {
+    struct kevent ev;
+    struct timespec nullts = { 0, 0 };
+    int res;
+
+    assert(fd == kq);
+    assert(watch);
+
+    res = kevent(kq, NULL, 0, &ev, 1, &nullts);
+
+    if (res > 0) {
+        /* Sleep for a half-second to avoid potential races
+         * during install/uninstall. */
+        usleep(500000);
+        avahi_log_info("Files changed, reloading.");
+        reload_config();
+    } else {
+        avahi_log_error("Failed to read kqueue event: %s", avahi_strerror(errno));
+    }
+}
+
+#endif
+
+static void signal_callback(AvahiWatch *watch, AVAHI_GCC_UNUSED int fd, AVAHI_GCC_UNUSED AvahiWatchEvent event, AVAHI_GCC_UNUSED void *userdata) {
+    int sig;
+    const AvahiPoll *poll_api;
+
+    assert(watch);
+    assert(simple_poll_api);
+
+    poll_api = avahi_simple_poll_get(simple_poll_api);
+
+    if ((sig = daemon_signal_next()) <= 0) {
+        avahi_log_error("daemon_signal_next() failed");
+        poll_api->watch_free(watch);
+        return;
+    }
+
+    switch (sig) {
+        case SIGINT:
+        case SIGTERM:
+            avahi_log_info(
+                    "Got %s, quitting.",
+                    sig == SIGINT ? "SIGINT" : "SIGTERM");
+            avahi_simple_poll_quit(simple_poll_api);
+            break;
+
+        case SIGHUP:
+            avahi_log_info("Got SIGHUP, reloading.");
+
+            reload_config();
+            break;
+
+        case SIGUSR1:
+            avahi_log_info("Got SIGUSR1, dumping record data.");
+            avahi_server_dump(avahi_server, dump, NULL);
+            break;
+
+        default:
+            avahi_log_warn("Got spurious signal, ignoring.");
+            break;
+    }
+}
+
+/* Imported from ../avahi-client/nss-check.c */
+int avahi_nss_support(void);
+
+static void ignore_signal(int sig)  {
+    struct sigaction sa;
+
+    memset(&sa, 0, sizeof(sa));
+    sa.sa_handler = SIG_IGN;
+    sa.sa_flags = SA_RESTART;
+
+    sigaction(sig, &sa, NULL);
+}
+
+static int run_server(DaemonConfig *c) {
+    int r = -1;
+    int error;
+    const AvahiPoll *poll_api = NULL;
+    AvahiWatch *sig_watch = NULL;
+    int retval_is_sent = 0;
+#ifdef HAVE_INOTIFY
+    AvahiWatch *inotify_watch = NULL;
+#endif
+#ifdef HAVE_KQUEUE
+    int i;
+    AvahiWatch *kqueue_watch = NULL;
+#endif
+
+    assert(c);
+
+    ignore_signal(SIGPIPE);
+
+    if (!(nss_support = avahi_nss_support()))
+        avahi_log_warn("WARNING: No NSS support for mDNS detected, consider installing nss-mdns!");
+
+    if (!(simple_poll_api = avahi_simple_poll_new())) {
+        avahi_log_error("Failed to create main loop object.");
+        goto finish;
+    }
+
+    poll_api = avahi_simple_poll_get(simple_poll_api);
+
+    if (daemon_signal_init(SIGINT, SIGHUP, SIGTERM, SIGUSR1, 0) < 0) {
+        avahi_log_error("Could not register signal handlers (%s).", strerror(errno));
+        goto finish;
+    }
+
+    if (!(sig_watch = poll_api->watch_new(poll_api, daemon_signal_fd(), AVAHI_WATCH_IN, signal_callback, simple_poll_api))) {
+        avahi_log_error( "Failed to create signal watcher");
+        goto finish;
+    }
+
+    if (simple_protocol_setup(poll_api) < 0)
+        goto finish;
+
+#ifdef HAVE_DBUS
+    if (c->enable_dbus) {
+        if (dbus_protocol_setup(poll_api,
+                                config.disable_user_service_publishing,
+                                config.n_clients_max,
+                                config.n_objects_per_client_max,
+                                config.n_entries_per_entry_group_max,
+                                !c->fail_on_missing_dbus
+#ifdef ENABLE_CHROOT
+                                && !config.use_chroot
+#endif
+            ) < 0) {
+
+            avahi_log_warn("WARNING: Failed to contact D-Bus daemon.");
+
+            if (c->fail_on_missing_dbus)
+                goto finish;
+        }
+    }
+#endif
+
+#ifdef ENABLE_CHROOT
+
+    if (config.drop_root && config.use_chroot) {
+        if (chroot(AVAHI_CONFIG_DIR) < 0) {
+            avahi_log_error("Failed to chroot(): %s", strerror(errno));
+            goto finish;
+        }
+
+        avahi_log_info("Successfully called chroot().");
+        chdir("/");
+
+        if (avahi_caps_drop_all() < 0) {
+            avahi_log_error("Failed to drop capabilities.");
+            goto finish;
+        }
+        avahi_log_info("Successfully dropped remaining capabilities.");
+    }
+
+#endif
+
+#ifdef HAVE_INOTIFY
+    if ((inotify_fd = inotify_init()) < 0)
+        avahi_log_warn( "Failed to initialize inotify: %s", strerror(errno));
+    else {
+        add_inotify_watches();
+
+        if (!(inotify_watch = poll_api->watch_new(poll_api, inotify_fd, AVAHI_WATCH_IN, inotify_callback, NULL))) {
+            avahi_log_error( "Failed to create inotify watcher");
+            goto finish;
+        }
+    }
+#endif
+
+#ifdef HAVE_KQUEUE
+    if ((kq = kqueue()) < 0)
+        avahi_log_warn( "Failed to initialize kqueue: %s", strerror(errno));
+    else {
+        add_kqueue_watches();
+
+        if (!(kqueue_watch = poll_api->watch_new(poll_api, kq, AVAHI_WATCH_IN, kqueue_callback, NULL))) {
+            avahi_log_error( "Failed to create kqueue watcher");
+            goto finish;
+        }
+    }
+#endif
+
+    load_resolv_conf();
+#ifdef ENABLE_CHROOT
+    static_service_load(config.use_chroot);
+    static_hosts_load(config.use_chroot);
+#else
+    static_service_load(0);
+    static_hosts_load(0);
+#endif
+
+    if (!(avahi_server = avahi_server_new(poll_api, &c->server_config, server_callback, c, &error))) {
+        avahi_log_error("Failed to create server: %s", avahi_strerror(error));
+        goto finish;
+    }
+
+    update_wide_area_servers();
+    update_browse_domains();
+
+    if (c->daemonize) {
+        daemon_retval_send(0);
+        retval_is_sent = 1;
+    }
+
+    for (;;) {
+        if ((r = avahi_simple_poll_iterate(simple_poll_api, -1)) < 0) {
+
+            /* We handle signals through an FD, so let's continue */
+            if (errno == EINTR)
+                continue;
+
+            avahi_log_error("poll(): %s", strerror(errno));
+            goto finish;
+        } else if (r > 0)
+            /* Quit */
+            break;
+    }
+
+    r = 0;
+
+finish:
+
+    static_service_remove_from_server();
+    static_service_free_all();
+
+    static_hosts_remove_from_server();
+    static_hosts_free_all();
+
+    remove_dns_server_entry_groups();
+
+    simple_protocol_shutdown();
+
+#ifdef HAVE_DBUS
+    if (c->enable_dbus)
+        dbus_protocol_shutdown();
+#endif
+
+    if (avahi_server) {
+        avahi_server_free(avahi_server);
+        avahi_server = NULL;
+    }
+
+    daemon_signal_done();
+
+    if (sig_watch)
+        poll_api->watch_free(sig_watch);
+
+#ifdef HAVE_INOTIFY
+    if (inotify_watch)
+        poll_api->watch_free(inotify_watch);
+    if (inotify_fd >= 0)
+        close(inotify_fd);
+#endif
+
+#ifdef HAVE_KQUEUE
+    if (kqueue_watch)
+        poll_api->watch_free(kqueue_watch);
+    if (kq >= 0)
+        close(kq);
+    for (i = 0; i < num_kfds; i++) {
+        if (kfds[i] >= 0)
+            close(kfds[i]);
+    }
+#endif
+
+    if (simple_poll_api) {
+        avahi_simple_poll_free(simple_poll_api);
+        simple_poll_api = NULL;
+    }
+
+    if (!retval_is_sent && c->daemonize)
+        daemon_retval_send(1);
+
+    return r;
+}
+
+#define set_env(key, value) putenv(avahi_strdup_printf("%s=%s", (key), (value)))
+
+static int drop_root(void) {
+    struct passwd *pw;
+    struct group * gr;
+    int r;
+
+    if (!(pw = getpwnam(AVAHI_USER))) {
+        avahi_log_error( "Failed to find user '"AVAHI_USER"'.");
+        return -1;
+    }
+
+    if (!(gr = getgrnam(AVAHI_GROUP))) {
+        avahi_log_error( "Failed to find group '"AVAHI_GROUP"'.");
+        return -1;
+    }
+
+    avahi_log_info("Found user '"AVAHI_USER"' (UID %lu) and group '"AVAHI_GROUP"' (GID %lu).", (unsigned long) pw->pw_uid, (unsigned long) gr->gr_gid);
+
+    if (initgroups(AVAHI_USER, gr->gr_gid) != 0) {
+        avahi_log_error("Failed to change group list: %s", strerror(errno));
+        return -1;
+    }
+
+#if defined(HAVE_SETRESGID)
+    r = setresgid(gr->gr_gid, gr->gr_gid, gr->gr_gid);
+#elif defined(HAVE_SETEGID)
+    if ((r = setgid(gr->gr_gid)) >= 0)
+        r = setegid(gr->gr_gid);
+#elif defined(HAVE_SETREGID)
+    r = setregid(gr->gr_gid, gr->gr_gid);
+#else
+#error "No API to drop privileges"
+#endif
+
+    if (r < 0) {
+        avahi_log_error("Failed to change GID: %s", strerror(errno));
+        return -1;
+    }
+
+#if defined(HAVE_SETRESUID)
+    r = setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid);
+#elif defined(HAVE_SETEUID)
+    if ((r = setuid(pw->pw_uid)) >= 0)
+        r = seteuid(pw->pw_uid);
+#elif defined(HAVE_SETREUID)
+    r = setreuid(pw->pw_uid, pw->pw_uid);
+#else
+#error "No API to drop privileges"
+#endif
+
+    if (r < 0) {
+        avahi_log_error("Failed to change UID: %s", strerror(errno));
+        return -1;
+    }
+
+    set_env("USER", pw->pw_name);
+    set_env("LOGNAME", pw->pw_name);
+    set_env("HOME", pw->pw_dir);
+
+    avahi_log_info("Successfully dropped root privileges.");
+
+    return 0;
+}
+
+static const char* pid_file_proc(void) {
+    return AVAHI_DAEMON_RUNTIME_DIR"/pid";
+}
+
+static int make_runtime_dir(void) {
+    int r = -1;
+    mode_t u;
+    int reset_umask = 0;
+    struct passwd *pw;
+    struct group * gr;
+    struct stat st;
+
+    if (!(pw = getpwnam(AVAHI_USER))) {
+        avahi_log_error( "Failed to find user '"AVAHI_USER"'.");
+        goto fail;
+    }
+
+    if (!(gr = getgrnam(AVAHI_GROUP))) {
+        avahi_log_error( "Failed to find group '"AVAHI_GROUP"'.");
+        goto fail;
+    }
+
+    u = umask(0000);
+    reset_umask = 1;
+
+    if (mkdir(AVAHI_DAEMON_RUNTIME_DIR, 0755) < 0 && errno != EEXIST) {
+        avahi_log_error("mkdir(\""AVAHI_DAEMON_RUNTIME_DIR"\"): %s", strerror(errno));
+        goto fail;
+    }
+
+    chown(AVAHI_DAEMON_RUNTIME_DIR, pw->pw_uid, gr->gr_gid);
+
+    if (stat(AVAHI_DAEMON_RUNTIME_DIR, &st) < 0) {
+        avahi_log_error("stat(): %s\n", strerror(errno));
+        goto fail;
+    }
+
+    if (!S_ISDIR(st.st_mode) || st.st_uid != pw->pw_uid || st.st_gid != gr->gr_gid) {
+        avahi_log_error("Failed to create runtime directory "AVAHI_DAEMON_RUNTIME_DIR".");
+        goto fail;
+    }
+
+    r = 0;
+
+fail:
+    if (reset_umask)
+        umask(u);
+    return r;
+}
+
+static void set_one_rlimit(int resource, rlim_t limit, const char *name) {
+    struct rlimit rl;
+    rl.rlim_cur = rl.rlim_max = limit;
+
+    if (setrlimit(resource, &rl) < 0)
+        avahi_log_warn("setrlimit(%s, {%u, %u}) failed: %s", name, (unsigned) limit, (unsigned) limit, strerror(errno));
+}
+
+static void enforce_rlimits(void) {
+#ifdef RLIMIT_AS
+    if (config.rlimit_as_set)
+        set_one_rlimit(RLIMIT_AS, config.rlimit_as, "RLIMIT_AS");
+#endif
+    if (config.rlimit_core_set)
+        set_one_rlimit(RLIMIT_CORE, config.rlimit_core, "RLIMIT_CORE");
+    if (config.rlimit_data_set)
+        set_one_rlimit(RLIMIT_DATA, config.rlimit_data, "RLIMIT_DATA");
+    if (config.rlimit_fsize_set)
+        set_one_rlimit(RLIMIT_FSIZE, config.rlimit_fsize, "RLIMIT_FSIZE");
+    if (config.rlimit_nofile_set)
+        set_one_rlimit(RLIMIT_NOFILE, config.rlimit_nofile, "RLIMIT_NOFILE");
+    if (config.rlimit_stack_set)
+        set_one_rlimit(RLIMIT_STACK, config.rlimit_stack, "RLIMIT_STACK");
+#ifdef RLIMIT_NPROC
+    if (config.rlimit_nproc_set)
+        set_one_rlimit(RLIMIT_NPROC, config.rlimit_nproc, "RLIMIT_NPROC");
+#endif
+
+    /* the sysctl() call from iface-pfroute.c needs locked memory on FreeBSD */
+#if defined(RLIMIT_MEMLOCK) && !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__)
+    /* We don't need locked memory */
+    set_one_rlimit(RLIMIT_MEMLOCK, 0, "RLIMIT_MEMLOCK");
+#endif
+}
+
+#define RANDOM_DEVICE "/dev/urandom"
+
+static void init_rand_seed(void) {
+    int fd;
+    unsigned seed = 0;
+
+    /* Try to initialize seed from /dev/urandom, to make it a little
+     * less predictable, and to make sure that multiple machines
+     * booted at the same time choose different random seeds.  */
+    if ((fd = open(RANDOM_DEVICE, O_RDONLY)) >= 0) {
+        read(fd, &seed, sizeof(seed));
+        close(fd);
+    }
+
+    /* If the initialization failed by some reason, we add the time to the seed*/
+    seed ^= (unsigned) time(NULL);
+
+    srand(seed);
+}
+
+int main(int argc, char *argv[]) {
+    int r = 255;
+    int wrote_pid_file = 0;
+
+    avahi_set_log_function(log_function);
+
+    init_rand_seed();
+
+    avahi_server_config_init(&config.server_config);
+    config.command = DAEMON_RUN;
+    config.daemonize = 0;
+    config.config_file = NULL;
+#ifdef HAVE_DBUS
+    config.enable_dbus = 1;
+    config.fail_on_missing_dbus = 1;
+    config.n_clients_max = 0;
+    config.n_objects_per_client_max = 0;
+    config.n_entries_per_entry_group_max = 0;
+#endif
+
+    config.drop_root = 1;
+    config.set_rlimits = 1;
+#ifdef ENABLE_CHROOT
+    config.use_chroot = 1;
+#endif
+    config.modify_proc_title = 1;
+
+    config.disable_user_service_publishing = 0;
+    config.publish_dns_servers = NULL;
+    config.publish_resolv_conf = 0;
+    config.use_syslog = 0;
+    config.debug = 0;
+    config.rlimit_as_set = 0;
+    config.rlimit_core_set = 0;
+    config.rlimit_data_set = 0;
+    config.rlimit_fsize_set = 0;
+    config.rlimit_nofile_set = 0;
+    config.rlimit_stack_set = 0;
+#ifdef RLIMIT_NPROC
+    config.rlimit_nproc_set = 0;
+#endif
+
+    if ((argv0 = strrchr(argv[0], '/')))
+        argv0 = avahi_strdup(argv0 + 1);
+    else
+        argv0 = avahi_strdup(argv[0]);
+
+    daemon_pid_file_ident = (const char *) argv0;
+    daemon_log_ident = (char*) argv0;
+    daemon_pid_file_proc = pid_file_proc;
+
+    if (parse_command_line(&config, argc, argv) < 0)
+        goto finish;
+
+    if (config.modify_proc_title)
+        avahi_init_proc_title(argc, argv);
+
+#ifdef ENABLE_CHROOT
+    config.use_chroot = config.use_chroot && config.drop_root;
+#endif
+
+    if (config.command == DAEMON_HELP) {
+        help(stdout);
+        r = 0;
+    } else if (config.command == DAEMON_VERSION) {
+        printf("%s "PACKAGE_VERSION"\n", argv0);
+        r = 0;
+    } else if (config.command == DAEMON_KILL) {
+        if (daemon_pid_file_kill_wait(SIGTERM, 5) < 0) {
+            avahi_log_warn("Failed to kill daemon: %s", strerror(errno));
+            goto finish;
+        }
+
+        r = 0;
+
+    } else if (config.command == DAEMON_RELOAD) {
+        if (daemon_pid_file_kill(SIGHUP) < 0) {
+            avahi_log_warn("Failed to kill daemon: %s", strerror(errno));
+            goto finish;
+        }
+
+        r = 0;
+
+    } else if (config.command == DAEMON_CHECK)
+        r = (daemon_pid_file_is_running() >= 0) ? 0 : 1;
+    else if (config.command == DAEMON_RUN) {
+        pid_t pid;
+
+        if (getuid() != 0 && config.drop_root) {
+            avahi_log_error("This program is intended to be run as root.");
+            goto finish;
+        }
+
+        if ((pid = daemon_pid_file_is_running()) >= 0) {
+            avahi_log_error("Daemon already running on PID %u", pid);
+            goto finish;
+        }
+
+        if (load_config_file(&config) < 0)
+            goto finish;
+
+        if (config.daemonize) {
+            daemon_retval_init();
+
+            if ((pid = daemon_fork()) < 0)
+                goto finish;
+            else if (pid != 0) {
+                int ret;
+                /** Parent **/
+
+                if ((ret = daemon_retval_wait(20)) < 0) {
+                    avahi_log_error("Could not receive return value from daemon process.");
+                    goto finish;
+                }
+
+                r = ret;
+                goto finish;
+            }
+
+            /* Child */
+        }
+
+        if (config.use_syslog || config.daemonize)
+            daemon_log_use = DAEMON_LOG_SYSLOG;
+
+        if (sd_listen_fds(0) <= 0)
+            if (daemon_close_all(-1) < 0)
+                avahi_log_warn("Failed to close all remaining file descriptors: %s", strerror(errno));
+
+        daemon_reset_sigs(-1);
+        daemon_unblock_sigs(-1);
+
+        if (make_runtime_dir() < 0)
+            goto finish;
+
+        if (config.drop_root) {
+#ifdef ENABLE_CHROOT
+            if (config.use_chroot)
+                if (avahi_caps_reduce() < 0)
+                    goto finish;
+#endif
+
+            if (drop_root() < 0)
+                goto finish;
+
+#ifdef ENABLE_CHROOT
+            if (config.use_chroot)
+                if (avahi_caps_reduce2() < 0)
+                    goto finish;
+#endif
+        }
+
+        if (daemon_pid_file_create() < 0) {
+            avahi_log_error("Failed to create PID file: %s", strerror(errno));
+
+            if (config.daemonize)
+                daemon_retval_send(1);
+            goto finish;
+        } else
+            wrote_pid_file = 1;
+
+        if (config.set_rlimits)
+            enforce_rlimits();
+
+        chdir("/");
+
+#ifdef ENABLE_CHROOT
+        if (config.drop_root && config.use_chroot)
+            if (avahi_chroot_helper_start(argv0) < 0) {
+                avahi_log_error("failed to start chroot() helper daemon.");
+                goto finish;
+            }
+#endif
+        avahi_log_info("%s "PACKAGE_VERSION" starting up.", argv0);
+        sd_notifyf(0, "STATUS=%s "PACKAGE_VERSION" starting up.", argv0);
+        avahi_set_proc_title(argv0, "%s: starting up", argv0);
+
+        if (run_server(&config) == 0)
+            r = 0;
+
+        avahi_log_info("%s "PACKAGE_VERSION" exiting.", argv0);
+        sd_notifyf(0, "STATUS=%s "PACKAGE_VERSION" exiting.", argv0);
+    }
+
+finish:
+
+    if (config.daemonize)
+        daemon_retval_done();
+
+    avahi_server_config_free(&config.server_config);
+    avahi_free(config.config_file);
+    avahi_strfreev(config.publish_dns_servers);
+    avahi_strfreev(resolv_conf_name_servers);
+    avahi_strfreev(resolv_conf_search_domains);
+
+    if (wrote_pid_file) {
+#ifdef ENABLE_CHROOT
+        avahi_chroot_helper_unlink(pid_file_proc());
+#else
+        daemon_pid_file_remove();
+#endif
+    }
+
+#ifdef ENABLE_CHROOT
+    avahi_chroot_helper_shutdown();
+#endif
+
+    avahi_free(argv0);
+
+    return r;
+}
diff --git a/avahi-0.6.31/avahi-daemon/main.h b/avahi-0.6.31/avahi-daemon/main.h
new file mode 100644
index 0000000..ef04c2d
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/main.h
@@ -0,0 +1,31 @@
+#ifndef foomainhfoo
+#define foomainhfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#include <avahi-core/core.h>
+#include <avahi-common/simple-watch.h>
+
+extern AvahiServer *avahi_server;
+extern AvahiSimplePoll *simple_poll_api;
+
+extern int nss_support;
+
+#endif
diff --git a/avahi-0.6.31/avahi-daemon/org.freedesktop.Avahi.AddressResolver.xml b/avahi-0.6.31/avahi-daemon/org.freedesktop.Avahi.AddressResolver.xml
new file mode 100644
index 0000000..bae9c2f
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/org.freedesktop.Avahi.AddressResolver.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
+<?xml-stylesheet type="text/xsl" href="introspect.xsl"?>
+<!DOCTYPE node SYSTEM "introspect.dtd">
+
+<!--
+  This file is part of avahi.
+
+  avahi 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 of the
+  License, or (at your option) any later version.
+
+  avahi 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
+  General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+  02111-1307 USA.
+-->
+
+<node>
+
+  <interface name="org.freedesktop.DBus.Introspectable">
+    <method name="Introspect">
+      <arg name="data" type="s" direction="out" />
+    </method>
+  </interface>
+
+  <interface name="org.freedesktop.Avahi.AddressResolver">
+
+    <method name="Free"/>
+
+    <signal name="Found">
+      <arg name="interface" type="i" direction="out"/>
+      <arg name="protocol" type="i" direction="out"/>
+      <arg name="aprotocol" type="i" direction="out"/>
+      <arg name="address" type="s" direction="out"/>
+      <arg name="name" type="s" direction="out"/>
+      <arg name="flags" type="u" direction="out"/>
+    </signal>
+
+    <signal name="Failure">
+      <arg name="error" type="s"/>
+    </signal>
+
+  </interface>
+</node>
diff --git a/avahi-0.6.31/avahi-daemon/org.freedesktop.Avahi.DomainBrowser.xml b/avahi-0.6.31/avahi-daemon/org.freedesktop.Avahi.DomainBrowser.xml
new file mode 100644
index 0000000..22c614e
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/org.freedesktop.Avahi.DomainBrowser.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
+<?xml-stylesheet type="text/xsl" href="introspect.xsl"?>
+<!DOCTYPE node SYSTEM "introspect.dtd">
+
+<!--
+  This file is part of avahi.
+
+  avahi 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 of the
+  License, or (at your option) any later version.
+
+  avahi 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
+  General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+  02111-1307 USA.
+-->
+
+<node>
+
+  <interface name="org.freedesktop.DBus.Introspectable">
+    <method name="Introspect">
+      <arg name="data" type="s" direction="out" />
+    </method>
+  </interface>
+
+  <interface name="org.freedesktop.Avahi.DomainBrowser">
+
+    <method name="Free"/>
+
+    <signal name="ItemNew">
+      <arg name="interface" type="i"/>
+      <arg name="protocol" type="i"/>
+      <arg name="domain" type="s"/>
+      <arg name="flags" type="u"/>
+    </signal>
+
+    <signal name="ItemRemove">
+      <arg name="interface" type="i"/>
+      <arg name="protocol" type="i"/>
+      <arg name="domain" type="s"/>
+      <arg name="flags" type="u"/>
+    </signal>
+
+    <signal name="Failure">
+      <arg name="error" type="s"/>
+    </signal>
+
+    <signal name="AllForNow"/>
+
+    <signal name="CacheExhausted"/>
+
+  </interface>
+</node>
diff --git a/avahi-0.6.31/avahi-daemon/org.freedesktop.Avahi.EntryGroup.xml b/avahi-0.6.31/avahi-daemon/org.freedesktop.Avahi.EntryGroup.xml
new file mode 100644
index 0000000..43fd63c
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/org.freedesktop.Avahi.EntryGroup.xml
@@ -0,0 +1,101 @@
+<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
+<?xml-stylesheet type="text/xsl" href="introspect.xsl"?>
+<!DOCTYPE node SYSTEM "introspect.dtd">
+
+<!--
+  This file is part of avahi.
+
+  avahi 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 of the
+  License, or (at your option) any later version.
+
+  avahi 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
+  General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+  02111-1307 USA.
+-->
+
+<node>
+
+  <interface name="org.freedesktop.DBus.Introspectable">
+    <method name="Introspect">
+      <arg name="data" type="s" direction="out"/>
+    </method>
+  </interface>
+
+  <interface name="org.freedesktop.Avahi.EntryGroup">
+    <method name="Free"/>
+    <method name="Commit"/>
+    <method name="Reset"/>
+
+    <method name="GetState">
+      <arg name="state" type="i" direction="out"/>
+    </method>
+
+    <signal name="StateChanged">
+      <arg name="state" type="i"/>
+      <arg name="error" type="s"/>
+    </signal>
+
+    <method name="IsEmpty">
+      <arg name="empty" type="b" direction="out"/>
+    </method>
+
+    <method name="AddService">
+      <arg name="interface" type="i" direction="in"/>
+      <arg name="protocol" type="i" direction="in"/>
+      <arg name="flags" type="u" direction="in"/>
+      <arg name="name" type="s" direction="in"/>
+      <arg name="type" type="s" direction="in"/>
+      <arg name="domain" type="s" direction="in"/>
+      <arg name="host" type="s" direction="in"/>
+      <arg name="port" type="q" direction="in"/>
+      <arg name="txt" type="aay" direction="in"/>
+    </method>
+
+    <method name="AddServiceSubtype">
+      <arg name="interface" type="i" direction="in"/>
+      <arg name="protocol" type="i" direction="in"/>
+      <arg name="flags" type="u" direction="in"/>
+      <arg name="name" type="s" direction="in"/>
+      <arg name="type" type="s" direction="in"/>
+      <arg name="domain" type="s" direction="in"/>
+      <arg name="subtype" type="s" direction="in"/>
+    </method>
+
+    <method name="UpdateServiceTxt">
+      <arg name="interface" type="i" direction="in"/>
+      <arg name="protocol" type="i" direction="in"/>
+      <arg name="flags" type="u" direction="in"/>
+      <arg name="name" type="s" direction="in"/>
+      <arg name="type" type="s" direction="in"/>
+      <arg name="domain" type="s" direction="in"/>
+      <arg name="txt" type="aay" direction="in"/>
+    </method>
+
+    <method name="AddAddress">
+      <arg name="interface" type="i" direction="in"/>
+      <arg name="protocol" type="i" direction="in"/>
+      <arg name="flags" type="u" direction="in"/>
+      <arg name="name" type="s" direction="in"/>
+      <arg name="address" type="s" direction="in"/>
+    </method>
+
+    <method name="AddRecord">
+      <arg name="interface" type="i" direction="in"/>
+      <arg name="protocol" type="i" direction="in"/>
+      <arg name="flags" type="u" direction="in"/>
+      <arg name="name" type="s" direction="in"/>
+      <arg name="clazz" type="q" direction="in"/>
+      <arg name="type" type="q" direction="in"/>
+      <arg name="ttl" type="u" direction="in"/>
+      <arg name="rdata" type="ay" direction="in"/>
+    </method>
+  </interface>
+</node>
diff --git a/avahi-0.6.31/avahi-daemon/org.freedesktop.Avahi.HostNameResolver.xml b/avahi-0.6.31/avahi-daemon/org.freedesktop.Avahi.HostNameResolver.xml
new file mode 100644
index 0000000..0b43752
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/org.freedesktop.Avahi.HostNameResolver.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
+<?xml-stylesheet type="text/xsl" href="introspect.xsl"?>
+<!DOCTYPE node SYSTEM "introspect.dtd">
+
+<!--
+  This file is part of avahi.
+
+  avahi 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 of the
+  License, or (at your option) any later version.
+
+  avahi 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
+  General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+  02111-1307 USA.
+-->
+
+<node>
+
+  <interface name="org.freedesktop.DBus.Introspectable">
+    <method name="Introspect">
+      <arg name="data" type="s" direction="out" />
+    </method>
+  </interface>
+
+  <interface name="org.freedesktop.Avahi.HostNameResolver">
+
+    <method name="Free"/>
+
+    <signal name="Found">
+      <arg name="interface" type="i" direction="out"/>
+      <arg name="protocol" type="i" direction="out"/>
+      <arg name="name" type="s" direction="out"/>
+      <arg name="aprotocol" type="i" direction="out"/>
+      <arg name="address" type="s" direction="out"/>
+      <arg name="flags" type="u" direction="out"/>
+    </signal>
+
+    <signal name="Failure">
+      <arg name="error" type="s"/>
+    </signal>
+
+  </interface>
+</node>
diff --git a/avahi-0.6.31/avahi-daemon/org.freedesktop.Avahi.RecordBrowser.xml b/avahi-0.6.31/avahi-daemon/org.freedesktop.Avahi.RecordBrowser.xml
new file mode 100644
index 0000000..9ba86f4
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/org.freedesktop.Avahi.RecordBrowser.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
+<?xml-stylesheet type="text/xsl" href="introspect.xsl"?>
+<!DOCTYPE node SYSTEM "introspect.dtd">
+
+<!--
+  This file is part of avahi.
+
+  avahi 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 of the
+  License, or (at your option) any later version.
+
+  avahi 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
+  General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+  02111-1307 USA.
+-->
+
+<node>
+
+  <interface name="org.freedesktop.DBus.Introspectable">
+    <method name="Introspect">
+      <arg name="data" type="s" direction="out" />
+    </method>
+  </interface>
+
+  <interface name="org.freedesktop.Avahi.RecordBrowser">
+
+    <method name="Free"/>
+
+    <signal name="ItemNew">
+      <arg name="interface" type="i"/>
+      <arg name="protocol" type="i"/>
+      <arg name="name" type="s"/>
+      <arg name="clazz" type="q"/>
+      <arg name="type" type="q"/>
+      <arg name="rdata" type="ay"/>
+      <arg name="flags" type="u"/>
+    </signal>
+
+    <signal name="ItemRemove">
+      <arg name="interface" type="i"/>
+      <arg name="protocol" type="i"/>
+      <arg name="name" type="s"/>
+      <arg name="clazz" type="q"/>
+      <arg name="type" type="q"/>
+      <arg name="rdata" type="ay"/>
+      <arg name="flags" type="u"/>
+    </signal>
+
+    <signal name="Failure">
+      <arg name="error" type="s"/>
+    </signal>
+
+    <signal name="AllForNow"/>
+
+    <signal name="CacheExhausted"/>
+
+  </interface>
+</node>
diff --git a/avahi-0.6.31/avahi-daemon/org.freedesktop.Avahi.Server.xml b/avahi-0.6.31/avahi-daemon/org.freedesktop.Avahi.Server.xml
new file mode 100644
index 0000000..c291274
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/org.freedesktop.Avahi.Server.xml
@@ -0,0 +1,219 @@
+<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
+<?xml-stylesheet type="text/xsl" href="introspect.xsl"?>
+<!DOCTYPE node SYSTEM "introspect.dtd">
+
+<!--
+  This file is part of avahi.
+
+  avahi 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 of the
+  License, or (at your option) any later version.
+
+  avahi 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
+  General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+  02111-1307 USA.
+-->
+
+<node>
+
+ <interface name="org.freedesktop.DBus.Introspectable">
+    <method name="Introspect">
+      <arg name="data" type="s" direction="out"/>
+    </method>
+  </interface>
+
+  <interface name="org.freedesktop.Avahi.Server">
+
+    <method name="GetVersionString">
+      <arg name="version" type="s" direction="out"/>
+    </method>
+
+    <method name="GetAPIVersion">
+      <arg name="version" type="u" direction="out"/>
+    </method>
+
+    <method name="GetHostName">
+      <arg name="name" type="s" direction="out"/>
+    </method>
+    <method name="SetHostName">
+      <arg name="name" type="s" direction="in"/>
+    </method>
+    <method name="GetHostNameFqdn">
+      <arg name="name" type="s" direction="out"/>
+    </method>
+    <method name="GetDomainName">
+      <arg name="name" type="s" direction="out"/>
+    </method>
+
+    <method name="IsNSSSupportAvailable">
+      <arg name="yes" type="b" direction="out"/>
+    </method>
+
+    <method name="GetState">
+      <arg name="state" type="i" direction="out"/>
+    </method>
+
+    <signal name="StateChanged">
+      <arg name="state" type="i"/>
+      <arg name="error" type="s"/>
+    </signal>
+
+    <method name="GetLocalServiceCookie">
+      <arg name="cookie" type="u" direction="out"/>
+    </method>
+
+    <method name="GetAlternativeHostName">
+      <arg name="name" type="s" direction="in"/>
+      <arg name="name" type="s" direction="out"/>
+    </method>
+
+    <method name="GetAlternativeServiceName">
+      <arg name="name" type="s" direction="in"/>
+      <arg name="name" type="s" direction="out"/>
+    </method>
+
+    <method name="GetNetworkInterfaceNameByIndex">
+      <arg name="index" type="i" direction="in"/>
+      <arg name="name" type="s" direction="out"/>
+    </method>
+    <method name="GetNetworkInterfaceIndexByName">
+      <arg name="name" type="s" direction="in"/>
+      <arg name="index" type="i" direction="out"/>
+    </method>
+
+    <method name="ResolveHostName">
+      <arg name="interface" type="i" direction="in"/>
+      <arg name="protocol" type="i" direction="in"/>
+      <arg name="name" type="s" direction="in"/>
+      <arg name="aprotocol" type="i" direction="in"/>
+      <arg name="flags" type="u" direction="in"/>
+
+      <arg name="interface" type="i" direction="out"/>
+      <arg name="protocol" type="i" direction="out"/>
+      <arg name="name" type="s" direction="out"/>
+      <arg name="aprotocol" type="i" direction="out"/>
+      <arg name="address" type="s" direction="out"/>
+      <arg name="flags" type="u" direction="out"/>
+    </method>
+
+    <method name="ResolveAddress">
+      <arg name="interface" type="i" direction="in"/>
+      <arg name="protocol" type="i" direction="in"/>
+      <arg name="address" type="s" direction="in"/>
+      <arg name="flags" type="u" direction="in"/>
+
+      <arg name="interface" type="i" direction="out"/>
+      <arg name="protocol" type="i" direction="out"/>
+      <arg name="aprotocol" type="i" direction="out"/>
+      <arg name="address" type="s" direction="out"/>
+      <arg name="name" type="s" direction="out"/>
+      <arg name="flags" type="u" direction="out"/>
+    </method>
+
+    <method name="ResolveService">
+      <arg name="interface" type="i" direction="in"/>
+      <arg name="protocol" type="i" direction="in"/>
+      <arg name="name" type="s" direction="in"/>
+      <arg name="type" type="s" direction="in"/>
+      <arg name="domain" type="s" direction="in"/>
+      <arg name="aprotocol" type="i" direction="in"/>
+      <arg name="flags" type="u" direction="in"/>
+
+      <arg name="interface" type="i" direction="out"/>
+      <arg name="protocol" type="i" direction="out"/>
+      <arg name="name" type="s" direction="out"/>
+      <arg name="type" type="s" direction="out"/>
+      <arg name="domain" type="s" direction="out"/>
+      <arg name="host" type="s" direction="out"/>
+      <arg name="aprotocol" type="i" direction="out"/>
+      <arg name="address" type="s" direction="out"/>
+      <arg name="port" type="q" direction="out"/>
+      <arg name="txt" type="aay" direction="out"/>
+      <arg name="flags" type="u" direction="out"/>
+    </method>
+
+    <method name="EntryGroupNew">
+      <arg name="path" type="o" direction="out"/>
+    </method>
+
+    <method name="DomainBrowserNew">
+      <arg name="interface" type="i" direction="in"/>
+      <arg name="protocol" type="i" direction="in"/>
+      <arg name="domain" type="s" direction="in"/>
+      <arg name="btype" type="i" direction="in"/>
+      <arg name="flags" type="u" direction="in"/>
+
+      <arg name="path" type="o" direction="out"/>
+    </method>
+
+    <method name="ServiceTypeBrowserNew">
+      <arg name="interface" type="i" direction="in"/>
+      <arg name="protocol" type="i" direction="in"/>
+      <arg name="domain" type="s" direction="in"/>
+      <arg name="flags" type="u" direction="in"/>
+
+      <arg name="path" type="o" direction="out"/>
+    </method>
+
+    <method name="ServiceBrowserNew">
+      <arg name="interface" type="i" direction="in"/>
+      <arg name="protocol" type="i" direction="in"/>
+      <arg name="type" type="s" direction="in"/>
+      <arg name="domain" type="s" direction="in"/>
+      <arg name="flags" type="u" direction="in"/>
+
+      <arg name="path" type="o" direction="out"/>
+    </method>
+
+    <method name="ServiceResolverNew">
+      <arg name="interface" type="i" direction="in"/>
+      <arg name="protocol" type="i" direction="in"/>
+      <arg name="name" type="s" direction="in"/>
+      <arg name="type" type="s" direction="in"/>
+      <arg name="domain" type="s" direction="in"/>
+      <arg name="aprotocol" type="i" direction="in"/>
+      <arg name="flags" type="u" direction="in"/>
+
+      <arg name="path" type="o" direction="out"/>
+    </method>
+
+    <method name="HostNameResolverNew">
+      <arg name="interface" type="i" direction="in"/>
+      <arg name="protocol" type="i" direction="in"/>
+      <arg name="name" type="s" direction="in"/>
+      <arg name="aprotocol" type="i" direction="in"/>
+      <arg name="flags" type="u" direction="in"/>
+
+      <arg name="path" type="o" direction="out"/>
+    </method>
+
+    <method name="AddressResolverNew">
+      <arg name="interface" type="i" direction="in"/>
+      <arg name="protocol" type="i" direction="in"/>
+      <arg name="address" type="s" direction="in"/>
+      <arg name="flags" type="u" direction="in"/>
+
+      <arg name="path" type="o" direction="out"/>
+    </method>
+
+    <method name="RecordBrowserNew">
+      <arg name="interface" type="i" direction="in"/>
+      <arg name="protocol" type="i" direction="in"/>
+      <arg name="name" type="s" direction="in"/>
+      <arg name="clazz" type="q" direction="in"/>
+      <arg name="type" type="q" direction="in"/>
+      <arg name="flags" type="u" direction="in"/>
+
+      <arg name="path" type="o" direction="out"/>
+    </method>
+
+
+  </interface>
+</node>
diff --git a/avahi-0.6.31/avahi-daemon/org.freedesktop.Avahi.ServiceBrowser.xml b/avahi-0.6.31/avahi-daemon/org.freedesktop.Avahi.ServiceBrowser.xml
new file mode 100644
index 0000000..d80298d
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/org.freedesktop.Avahi.ServiceBrowser.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
+<?xml-stylesheet type="text/xsl" href="introspect.xsl"?>
+<!DOCTYPE node SYSTEM "introspect.dtd">
+
+<!--
+  This file is part of avahi.
+
+  avahi 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 of the
+  License, or (at your option) any later version.
+
+  avahi 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
+  General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+  02111-1307 USA.
+-->
+
+<node>
+
+  <interface name="org.freedesktop.DBus.Introspectable">
+    <method name="Introspect">
+      <arg name="data" type="s" direction="out" />
+    </method>
+  </interface>
+
+  <interface name="org.freedesktop.Avahi.ServiceBrowser">
+
+    <method name="Free"/>
+
+    <signal name="ItemNew">
+      <arg name="interface" type="i"/>
+      <arg name="protocol" type="i"/>
+      <arg name="name" type="s"/>
+      <arg name="type" type="s"/>
+      <arg name="domain" type="s"/>
+      <arg name="flags" type="u"/>
+    </signal>
+
+    <signal name="ItemRemove">
+      <arg name="interface" type="i"/>
+      <arg name="protocol" type="i"/>
+      <arg name="name" type="s"/>
+      <arg name="type" type="s"/>
+      <arg name="domain" type="s"/>
+      <arg name="flags" type="u"/>
+    </signal>
+
+    <signal name="Failure">
+      <arg name="error" type="s"/>
+    </signal>
+
+    <signal name="AllForNow"/>
+
+    <signal name="CacheExhausted"/>
+
+  </interface>
+</node>
diff --git a/avahi-0.6.31/avahi-daemon/org.freedesktop.Avahi.ServiceResolver.xml b/avahi-0.6.31/avahi-daemon/org.freedesktop.Avahi.ServiceResolver.xml
new file mode 100644
index 0000000..623f209
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/org.freedesktop.Avahi.ServiceResolver.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
+<?xml-stylesheet type="text/xsl" href="introspect.xsl"?>
+<!DOCTYPE node SYSTEM "introspect.dtd">
+
+<!--
+  This file is part of avahi.
+
+  avahi 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 of the
+  License, or (at your option) any later version.
+
+  avahi 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
+  General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+  02111-1307 USA.
+-->
+
+<node>
+
+  <interface name="org.freedesktop.DBus.Introspectable">
+    <method name="Introspect">
+      <arg name="data" type="s" direction="out" />
+    </method>
+  </interface>
+
+  <interface name="org.freedesktop.Avahi.ServiceResolver">
+
+    <method name="Free"/>
+
+    <signal name="Found">
+      <arg name="interface" type="i" direction="out"/>
+      <arg name="protocol" type="i" direction="out"/>
+      <arg name="name" type="s" direction="out"/>
+      <arg name="type" type="s" direction="out"/>
+      <arg name="domain" type="s" direction="out"/>
+      <arg name="host" type="s" direction="out"/>
+      <arg name="aprotocol" type="i" direction="out"/>
+      <arg name="address" type="s" direction="out"/>
+      <arg name="port" type="q" direction="out"/>
+      <arg name="txt" type="aay" direction="out"/>
+      <arg name="flags" type="u" direction="out"/>
+    </signal>
+
+    <signal name="Failure">
+      <arg name="error" type="s"/>
+    </signal>
+
+  </interface>
+</node>
diff --git a/avahi-0.6.31/avahi-daemon/org.freedesktop.Avahi.ServiceTypeBrowser.xml b/avahi-0.6.31/avahi-daemon/org.freedesktop.Avahi.ServiceTypeBrowser.xml
new file mode 100644
index 0000000..4efec82
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/org.freedesktop.Avahi.ServiceTypeBrowser.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
+<?xml-stylesheet type="text/xsl" href="introspect.xsl"?>
+<!DOCTYPE node SYSTEM "introspect.dtd">
+
+<!--
+  This file is part of avahi.
+
+  avahi 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 of the
+  License, or (at your option) any later version.
+
+  avahi 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
+  General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+  02111-1307 USA.
+-->
+
+<node>
+
+  <interface name="org.freedesktop.DBus.Introspectable">
+    <method name="Introspect">
+      <arg name="data" type="s" direction="out" />
+    </method>
+  </interface>
+
+  <interface name="org.freedesktop.Avahi.ServiceTypeBrowser">
+
+    <method name="Free"/>
+
+    <signal name="ItemNew">
+      <arg name="interface" type="i"/>
+      <arg name="protocol" type="i"/>
+      <arg name="type" type="s"/>
+      <arg name="domain" type="s"/>
+      <arg name="flags" type="u"/>
+    </signal>
+
+    <signal name="ItemRemove">
+      <arg name="interface" type="i"/>
+      <arg name="protocol" type="i"/>
+      <arg name="type" type="s"/>
+      <arg name="domain" type="s"/>
+      <arg name="flags" type="u"/>
+    </signal>
+
+    <signal name="Failure">
+      <arg name="error" type="s"/>
+    </signal>
+
+    <signal name="AllForNow"/>
+
+    <signal name="CacheExhausted"/>
+
+  </interface>
+</node>
diff --git a/avahi-0.6.31/avahi-daemon/org.freedesktop.Avahi.service b/avahi-0.6.31/avahi-daemon/org.freedesktop.Avahi.service
new file mode 100644
index 0000000..30ed2d8
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/org.freedesktop.Avahi.service
@@ -0,0 +1,24 @@
+# This file is part of avahi.
+#
+# avahi 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 of the
+# License, or (at your option) any later version.
+#
+# avahi 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 General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+[D-BUS Service]
+Name=org.freedesktop.Avahi
+SystemdService=dbus-org.freedesktop.Avahi.service
+
+# This service should not be bus activated if systemd isn't running,
+# so that activation won't conflict with the init script startup.
+Exec=/bin/false
diff --git a/avahi-0.6.31/avahi-daemon/sd-daemon.c b/avahi-0.6.31/avahi-daemon/sd-daemon.c
new file mode 100644
index 0000000..e5ca944
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/sd-daemon.c
@@ -0,0 +1,441 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  Copyright 2010 Lennart Poettering
+
+  Permission is hereby granted, free of charge, to any person
+  obtaining a copy of this software and associated documentation files
+  (the "Software"), to deal in the Software without restriction,
+  including without limitation the rights to use, copy, modify, merge,
+  publish, distribute, sublicense, and/or sell copies of the Software,
+  and to permit persons to whom the Software is furnished to do so,
+  subject to the following conditions:
+
+  The above copyright notice and this permission notice shall be
+  included in all copies or substantial portions of the Software.
+
+  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  SOFTWARE.
+***/
+
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <sys/fcntl.h>
+#include <netinet/in.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#include "sd-daemon.h"
+
+int sd_listen_fds(int unset_environment) {
+
+#if defined(DISABLE_SYSTEMD) || !defined(__linux__)
+        return 0;
+#else
+        int r, fd;
+        const char *e;
+        char *p = NULL;
+        unsigned long l;
+
+        if (!(e = getenv("LISTEN_PID"))) {
+                r = 0;
+                goto finish;
+        }
+
+        errno = 0;
+        l = strtoul(e, &p, 10);
+
+        if (errno != 0) {
+                r = -errno;
+                goto finish;
+        }
+
+        if (!p || *p || l <= 0) {
+                r = -EINVAL;
+                goto finish;
+        }
+
+        /* Is this for us? */
+        if (getpid() != (pid_t) l) {
+                r = 0;
+                goto finish;
+        }
+
+        if (!(e = getenv("LISTEN_FDS"))) {
+                r = 0;
+                goto finish;
+        }
+
+        errno = 0;
+        l = strtoul(e, &p, 10);
+
+        if (errno != 0) {
+                r = -errno;
+                goto finish;
+        }
+
+        if (!p || *p) {
+                r = -EINVAL;
+                goto finish;
+        }
+
+        for (fd = SD_LISTEN_FDS_START; fd < SD_LISTEN_FDS_START + (int) l; fd ++) {
+                int flags;
+
+                if ((flags = fcntl(fd, F_GETFD)) < 0) {
+                        r = -errno;
+                        goto finish;
+                }
+
+                if (flags & FD_CLOEXEC)
+                        continue;
+
+                if (fcntl(fd, F_SETFD, flags | FD_CLOEXEC) < 0) {
+                        r = -errno;
+                        goto finish;
+                }
+        }
+
+        r = (int) l;
+
+finish:
+        if (unset_environment) {
+                unsetenv("LISTEN_PID");
+                unsetenv("LISTEN_FDS");
+        }
+
+        return r;
+#endif
+}
+
+int sd_is_fifo(int fd, const char *path) {
+        struct stat st_fd;
+
+        if (fd < 0)
+                return -EINVAL;
+
+        memset(&st_fd, 0, sizeof(st_fd));
+        if (fstat(fd, &st_fd) < 0)
+                return -errno;
+
+        if (!S_ISFIFO(st_fd.st_mode))
+                return 0;
+
+        if (path) {
+                struct stat st_path;
+
+                memset(&st_path, 0, sizeof(st_path));
+                if (stat(path, &st_path) < 0) {
+
+                        if (errno == ENOENT || errno == ENOTDIR)
+                                return 0;
+
+                        return -errno;
+                }
+
+                return
+                        st_path.st_dev == st_fd.st_dev &&
+                        st_path.st_ino == st_fd.st_ino;
+        }
+
+        return 1;
+}
+
+static int sd_is_socket_internal(int fd, int type, int listening) {
+        struct stat st_fd;
+
+        if (fd < 0 || type < 0)
+                return -EINVAL;
+
+        if (fstat(fd, &st_fd) < 0)
+                return -errno;
+
+        if (!S_ISSOCK(st_fd.st_mode))
+                return 0;
+
+        if (type != 0) {
+                int other_type = 0;
+                socklen_t l = sizeof(other_type);
+
+                if (getsockopt(fd, SOL_SOCKET, SO_TYPE, &other_type, &l) < 0)
+                        return -errno;
+
+                if (l != sizeof(other_type))
+                        return -EINVAL;
+
+                if (other_type != type)
+                        return 0;
+        }
+
+        if (listening >= 0) {
+                int accepting = 0;
+                socklen_t l = sizeof(accepting);
+
+                if (getsockopt(fd, SOL_SOCKET, SO_ACCEPTCONN, &accepting, &l) < 0)
+                        return -errno;
+
+                if (l != sizeof(accepting))
+                        return -EINVAL;
+
+                if (!accepting != !listening)
+                        return 0;
+        }
+
+        return 1;
+}
+
+union sockaddr_union {
+        struct sockaddr sa;
+        struct sockaddr_in in4;
+        struct sockaddr_in6 in6;
+        struct sockaddr_un un;
+        struct sockaddr_storage storage;
+};
+
+int sd_is_socket(int fd, int family, int type, int listening) {
+        int r;
+
+        if (family < 0)
+                return -EINVAL;
+
+        if ((r = sd_is_socket_internal(fd, type, listening)) <= 0)
+                return r;
+
+        if (family > 0) {
+                union sockaddr_union sockaddr;
+                socklen_t l;
+
+                memset(&sockaddr, 0, sizeof(sockaddr));
+                l = sizeof(sockaddr);
+
+                if (getsockname(fd, &sockaddr.sa, &l) < 0)
+                        return -errno;
+
+                if (l < sizeof(sa_family_t))
+                        return -EINVAL;
+
+                return sockaddr.sa.sa_family == family;
+        }
+
+        return 1;
+}
+
+int sd_is_socket_inet(int fd, int family, int type, int listening, uint16_t port) {
+        union sockaddr_union sockaddr;
+        socklen_t l;
+        int r;
+
+        if (family != 0 && family != AF_INET && family != AF_INET6)
+                return -EINVAL;
+
+        if ((r = sd_is_socket_internal(fd, type, listening)) <= 0)
+                return r;
+
+        memset(&sockaddr, 0, sizeof(sockaddr));
+        l = sizeof(sockaddr);
+
+        if (getsockname(fd, &sockaddr.sa, &l) < 0)
+                return -errno;
+
+        if (l < sizeof(sa_family_t))
+                return -EINVAL;
+
+        if (sockaddr.sa.sa_family != AF_INET &&
+            sockaddr.sa.sa_family != AF_INET6)
+                return 0;
+
+        if (family > 0)
+                if (sockaddr.sa.sa_family != family)
+                        return 0;
+
+        if (port > 0) {
+                if (sockaddr.sa.sa_family == AF_INET) {
+                        if (l < sizeof(struct sockaddr_in))
+                                return -EINVAL;
+
+                        return htons(port) == sockaddr.in4.sin_port;
+                } else {
+                        if (l < sizeof(struct sockaddr_in6))
+                                return -EINVAL;
+
+                        return htons(port) == sockaddr.in6.sin6_port;
+                }
+        }
+
+        return 1;
+}
+
+int sd_is_socket_unix(int fd, int type, int listening, const char *path, size_t length) {
+        union sockaddr_union sockaddr;
+        socklen_t l;
+        int r;
+
+        if ((r = sd_is_socket_internal(fd, type, listening)) <= 0)
+                return r;
+
+        memset(&sockaddr, 0, sizeof(sockaddr));
+        l = sizeof(sockaddr);
+
+        if (getsockname(fd, &sockaddr.sa, &l) < 0)
+                return -errno;
+
+        if (l < sizeof(sa_family_t))
+                return -EINVAL;
+
+        if (sockaddr.sa.sa_family != AF_UNIX)
+                return 0;
+
+        if (path) {
+                if (length <= 0)
+                        length = strlen(path);
+
+                if (length <= 0)
+                        /* Unnamed socket */
+                        return l == offsetof(struct sockaddr_un, sun_path);
+
+                if (path[0])
+                        /* Normal path socket */
+                        return
+                                (l >= offsetof(struct sockaddr_un, sun_path) + length + 1) &&
+                                memcmp(path, sockaddr.un.sun_path, length+1) == 0;
+                else
+                        /* Abstract namespace socket */
+                        return
+                                (l == offsetof(struct sockaddr_un, sun_path) + length) &&
+                                memcmp(path, sockaddr.un.sun_path, length) == 0;
+        }
+
+        return 1;
+}
+
+int sd_notify(int unset_environment, const char *state) {
+#if defined(DISABLE_SYSTEMD) || !defined(__linux__) || !defined(SOCK_CLOEXEC)
+        return 0;
+#else
+# if defined(SOCK_CLOEXEC)
+		int sock_cloexec = SOCK_CLOEXEC;
+# else
+#  define sock_cloexec 0
+# endif
+        int fd = -1, r;
+        struct msghdr msghdr;
+        struct iovec iovec;
+        union sockaddr_union sockaddr;
+        const char *e;
+
+        if (!state) {
+                r = -EINVAL;
+                goto finish;
+        }
+
+        if (!(e = getenv("NOTIFY_SOCKET")))
+                return 0;
+
+        /* Must be an abstract socket, or an absolute path */
+        if ((e[0] != '@' && e[0] != '/') || e[1] == 0) {
+                r = -EINVAL;
+                goto finish;
+        }
+
+        if ((fd = socket(AF_UNIX, SOCK_DGRAM|sock_cloexec, 0)) < 0) {
+                r = -errno;
+                goto finish;
+        }
+
+        memset(&sockaddr, 0, sizeof(sockaddr));
+        sockaddr.sa.sa_family = AF_UNIX;
+        strncpy(sockaddr.un.sun_path, e, sizeof(sockaddr.un.sun_path));
+
+        if (sockaddr.un.sun_path[0] == '@')
+                sockaddr.un.sun_path[0] = 0;
+
+        memset(&iovec, 0, sizeof(iovec));
+        iovec.iov_base = (char*) state;
+        iovec.iov_len = strlen(state);
+
+        memset(&msghdr, 0, sizeof(msghdr));
+        msghdr.msg_name = &sockaddr;
+        msghdr.msg_namelen = offsetof(struct sockaddr_un, sun_path) + strlen(e);
+
+        if (msghdr.msg_namelen > sizeof(struct sockaddr_un))
+                msghdr.msg_namelen = sizeof(struct sockaddr_un);
+
+        msghdr.msg_iov = &iovec;
+        msghdr.msg_iovlen = 1;
+
+        if (sendmsg(fd, &msghdr, MSG_NOSIGNAL) < 0) {
+                r = -errno;
+                goto finish;
+        }
+
+        r = 1;
+
+finish:
+        if (unset_environment)
+                unsetenv("NOTIFY_SOCKET");
+
+        if (fd >= 0)
+                close(fd);
+
+        return r;
+#endif
+}
+
+int sd_notifyf(int unset_environment, const char *format, ...) {
+#if defined(DISABLE_SYSTEMD) || !defined(__linux__)
+        return 0;
+#else
+        va_list ap;
+        char *p = NULL;
+        int r;
+
+        va_start(ap, format);
+        r = vasprintf(&p, format, ap);
+        va_end(ap);
+
+        if (r < 0 || !p)
+                return -ENOMEM;
+
+        r = sd_notify(unset_environment, p);
+        free(p);
+
+        return r;
+#endif
+}
+
+int sd_booted(void) {
+#if defined(DISABLE_SYSTEMD) || !defined(__linux__)
+        return 0;
+#else
+
+        struct stat a, b;
+
+        /* We simply test whether the systemd cgroup hierarchy is
+         * mounted */
+
+        if (lstat("/sys/fs/cgroup", &a) < 0)
+                return 0;
+
+        if (lstat("/sys/fs/cgroup/systemd", &b) < 0)
+                return 0;
+
+        return a.st_dev != b.st_dev;
+#endif
+}
diff --git a/avahi-0.6.31/avahi-daemon/sd-daemon.c.orig b/avahi-0.6.31/avahi-daemon/sd-daemon.c.orig
new file mode 100644
index 0000000..6d1eebf
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/sd-daemon.c.orig
@@ -0,0 +1,436 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  Copyright 2010 Lennart Poettering
+
+  Permission is hereby granted, free of charge, to any person
+  obtaining a copy of this software and associated documentation files
+  (the "Software"), to deal in the Software without restriction,
+  including without limitation the rights to use, copy, modify, merge,
+  publish, distribute, sublicense, and/or sell copies of the Software,
+  and to permit persons to whom the Software is furnished to do so,
+  subject to the following conditions:
+
+  The above copyright notice and this permission notice shall be
+  included in all copies or substantial portions of the Software.
+
+  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  SOFTWARE.
+***/
+
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <sys/fcntl.h>
+#include <netinet/in.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#include "sd-daemon.h"
+
+int sd_listen_fds(int unset_environment) {
+
+#if defined(DISABLE_SYSTEMD) || !defined(__linux__)
+        return 0;
+#else
+        int r, fd;
+        const char *e;
+        char *p = NULL;
+        unsigned long l;
+
+        if (!(e = getenv("LISTEN_PID"))) {
+                r = 0;
+                goto finish;
+        }
+
+        errno = 0;
+        l = strtoul(e, &p, 10);
+
+        if (errno != 0) {
+                r = -errno;
+                goto finish;
+        }
+
+        if (!p || *p || l <= 0) {
+                r = -EINVAL;
+                goto finish;
+        }
+
+        /* Is this for us? */
+        if (getpid() != (pid_t) l) {
+                r = 0;
+                goto finish;
+        }
+
+        if (!(e = getenv("LISTEN_FDS"))) {
+                r = 0;
+                goto finish;
+        }
+
+        errno = 0;
+        l = strtoul(e, &p, 10);
+
+        if (errno != 0) {
+                r = -errno;
+                goto finish;
+        }
+
+        if (!p || *p) {
+                r = -EINVAL;
+                goto finish;
+        }
+
+        for (fd = SD_LISTEN_FDS_START; fd < SD_LISTEN_FDS_START + (int) l; fd ++) {
+                int flags;
+
+                if ((flags = fcntl(fd, F_GETFD)) < 0) {
+                        r = -errno;
+                        goto finish;
+                }
+
+                if (flags & FD_CLOEXEC)
+                        continue;
+
+                if (fcntl(fd, F_SETFD, flags | FD_CLOEXEC) < 0) {
+                        r = -errno;
+                        goto finish;
+                }
+        }
+
+        r = (int) l;
+
+finish:
+        if (unset_environment) {
+                unsetenv("LISTEN_PID");
+                unsetenv("LISTEN_FDS");
+        }
+
+        return r;
+#endif
+}
+
+int sd_is_fifo(int fd, const char *path) {
+        struct stat st_fd;
+
+        if (fd < 0)
+                return -EINVAL;
+
+        memset(&st_fd, 0, sizeof(st_fd));
+        if (fstat(fd, &st_fd) < 0)
+                return -errno;
+
+        if (!S_ISFIFO(st_fd.st_mode))
+                return 0;
+
+        if (path) {
+                struct stat st_path;
+
+                memset(&st_path, 0, sizeof(st_path));
+                if (stat(path, &st_path) < 0) {
+
+                        if (errno == ENOENT || errno == ENOTDIR)
+                                return 0;
+
+                        return -errno;
+                }
+
+                return
+                        st_path.st_dev == st_fd.st_dev &&
+                        st_path.st_ino == st_fd.st_ino;
+        }
+
+        return 1;
+}
+
+static int sd_is_socket_internal(int fd, int type, int listening) {
+        struct stat st_fd;
+
+        if (fd < 0 || type < 0)
+                return -EINVAL;
+
+        if (fstat(fd, &st_fd) < 0)
+                return -errno;
+
+        if (!S_ISSOCK(st_fd.st_mode))
+                return 0;
+
+        if (type != 0) {
+                int other_type = 0;
+                socklen_t l = sizeof(other_type);
+
+                if (getsockopt(fd, SOL_SOCKET, SO_TYPE, &other_type, &l) < 0)
+                        return -errno;
+
+                if (l != sizeof(other_type))
+                        return -EINVAL;
+
+                if (other_type != type)
+                        return 0;
+        }
+
+        if (listening >= 0) {
+                int accepting = 0;
+                socklen_t l = sizeof(accepting);
+
+                if (getsockopt(fd, SOL_SOCKET, SO_ACCEPTCONN, &accepting, &l) < 0)
+                        return -errno;
+
+                if (l != sizeof(accepting))
+                        return -EINVAL;
+
+                if (!accepting != !listening)
+                        return 0;
+        }
+
+        return 1;
+}
+
+union sockaddr_union {
+        struct sockaddr sa;
+        struct sockaddr_in in4;
+        struct sockaddr_in6 in6;
+        struct sockaddr_un un;
+        struct sockaddr_storage storage;
+};
+
+int sd_is_socket(int fd, int family, int type, int listening) {
+        int r;
+
+        if (family < 0)
+                return -EINVAL;
+
+        if ((r = sd_is_socket_internal(fd, type, listening)) <= 0)
+                return r;
+
+        if (family > 0) {
+                union sockaddr_union sockaddr;
+                socklen_t l;
+
+                memset(&sockaddr, 0, sizeof(sockaddr));
+                l = sizeof(sockaddr);
+
+                if (getsockname(fd, &sockaddr.sa, &l) < 0)
+                        return -errno;
+
+                if (l < sizeof(sa_family_t))
+                        return -EINVAL;
+
+                return sockaddr.sa.sa_family == family;
+        }
+
+        return 1;
+}
+
+int sd_is_socket_inet(int fd, int family, int type, int listening, uint16_t port) {
+        union sockaddr_union sockaddr;
+        socklen_t l;
+        int r;
+
+        if (family != 0 && family != AF_INET && family != AF_INET6)
+                return -EINVAL;
+
+        if ((r = sd_is_socket_internal(fd, type, listening)) <= 0)
+                return r;
+
+        memset(&sockaddr, 0, sizeof(sockaddr));
+        l = sizeof(sockaddr);
+
+        if (getsockname(fd, &sockaddr.sa, &l) < 0)
+                return -errno;
+
+        if (l < sizeof(sa_family_t))
+                return -EINVAL;
+
+        if (sockaddr.sa.sa_family != AF_INET &&
+            sockaddr.sa.sa_family != AF_INET6)
+                return 0;
+
+        if (family > 0)
+                if (sockaddr.sa.sa_family != family)
+                        return 0;
+
+        if (port > 0) {
+                if (sockaddr.sa.sa_family == AF_INET) {
+                        if (l < sizeof(struct sockaddr_in))
+                                return -EINVAL;
+
+                        return htons(port) == sockaddr.in4.sin_port;
+                } else {
+                        if (l < sizeof(struct sockaddr_in6))
+                                return -EINVAL;
+
+                        return htons(port) == sockaddr.in6.sin6_port;
+                }
+        }
+
+        return 1;
+}
+
+int sd_is_socket_unix(int fd, int type, int listening, const char *path, size_t length) {
+        union sockaddr_union sockaddr;
+        socklen_t l;
+        int r;
+
+        if ((r = sd_is_socket_internal(fd, type, listening)) <= 0)
+                return r;
+
+        memset(&sockaddr, 0, sizeof(sockaddr));
+        l = sizeof(sockaddr);
+
+        if (getsockname(fd, &sockaddr.sa, &l) < 0)
+                return -errno;
+
+        if (l < sizeof(sa_family_t))
+                return -EINVAL;
+
+        if (sockaddr.sa.sa_family != AF_UNIX)
+                return 0;
+
+        if (path) {
+                if (length <= 0)
+                        length = strlen(path);
+
+                if (length <= 0)
+                        /* Unnamed socket */
+                        return l == offsetof(struct sockaddr_un, sun_path);
+
+                if (path[0])
+                        /* Normal path socket */
+                        return
+                                (l >= offsetof(struct sockaddr_un, sun_path) + length + 1) &&
+                                memcmp(path, sockaddr.un.sun_path, length+1) == 0;
+                else
+                        /* Abstract namespace socket */
+                        return
+                                (l == offsetof(struct sockaddr_un, sun_path) + length) &&
+                                memcmp(path, sockaddr.un.sun_path, length) == 0;
+        }
+
+        return 1;
+}
+
+int sd_notify(int unset_environment, const char *state) {
+#if defined(DISABLE_SYSTEMD) || !defined(__linux__) || !defined(SOCK_CLOEXEC)
+        return 0;
+#else
+        int fd = -1, r;
+        struct msghdr msghdr;
+        struct iovec iovec;
+        union sockaddr_union sockaddr;
+        const char *e;
+
+        if (!state) {
+                r = -EINVAL;
+                goto finish;
+        }
+
+        if (!(e = getenv("NOTIFY_SOCKET")))
+                return 0;
+
+        /* Must be an abstract socket, or an absolute path */
+        if ((e[0] != '@' && e[0] != '/') || e[1] == 0) {
+                r = -EINVAL;
+                goto finish;
+        }
+
+        if ((fd = socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0)) < 0) {
+                r = -errno;
+                goto finish;
+        }
+
+        memset(&sockaddr, 0, sizeof(sockaddr));
+        sockaddr.sa.sa_family = AF_UNIX;
+        strncpy(sockaddr.un.sun_path, e, sizeof(sockaddr.un.sun_path));
+
+        if (sockaddr.un.sun_path[0] == '@')
+                sockaddr.un.sun_path[0] = 0;
+
+        memset(&iovec, 0, sizeof(iovec));
+        iovec.iov_base = (char*) state;
+        iovec.iov_len = strlen(state);
+
+        memset(&msghdr, 0, sizeof(msghdr));
+        msghdr.msg_name = &sockaddr;
+        msghdr.msg_namelen = offsetof(struct sockaddr_un, sun_path) + strlen(e);
+
+        if (msghdr.msg_namelen > sizeof(struct sockaddr_un))
+                msghdr.msg_namelen = sizeof(struct sockaddr_un);
+
+        msghdr.msg_iov = &iovec;
+        msghdr.msg_iovlen = 1;
+
+        if (sendmsg(fd, &msghdr, MSG_NOSIGNAL) < 0) {
+                r = -errno;
+                goto finish;
+        }
+
+        r = 1;
+
+finish:
+        if (unset_environment)
+                unsetenv("NOTIFY_SOCKET");
+
+        if (fd >= 0)
+                close(fd);
+
+        return r;
+#endif
+}
+
+int sd_notifyf(int unset_environment, const char *format, ...) {
+#if defined(DISABLE_SYSTEMD) || !defined(__linux__)
+        return 0;
+#else
+        va_list ap;
+        char *p = NULL;
+        int r;
+
+        va_start(ap, format);
+        r = vasprintf(&p, format, ap);
+        va_end(ap);
+
+        if (r < 0 || !p)
+                return -ENOMEM;
+
+        r = sd_notify(unset_environment, p);
+        free(p);
+
+        return r;
+#endif
+}
+
+int sd_booted(void) {
+#if defined(DISABLE_SYSTEMD) || !defined(__linux__)
+        return 0;
+#else
+
+        struct stat a, b;
+
+        /* We simply test whether the systemd cgroup hierarchy is
+         * mounted */
+
+        if (lstat("/sys/fs/cgroup", &a) < 0)
+                return 0;
+
+        if (lstat("/sys/fs/cgroup/systemd", &b) < 0)
+                return 0;
+
+        return a.st_dev != b.st_dev;
+#endif
+}
diff --git a/avahi-0.6.31/avahi-daemon/sd-daemon.h b/avahi-0.6.31/avahi-daemon/sd-daemon.h
new file mode 100644
index 0000000..4b853a1
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/sd-daemon.h
@@ -0,0 +1,265 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#ifndef foosddaemonhfoo
+#define foosddaemonhfoo
+
+/***
+  Copyright 2010 Lennart Poettering
+
+  Permission is hereby granted, free of charge, to any person
+  obtaining a copy of this software and associated documentation files
+  (the "Software"), to deal in the Software without restriction,
+  including without limitation the rights to use, copy, modify, merge,
+  publish, distribute, sublicense, and/or sell copies of the Software,
+  and to permit persons to whom the Software is furnished to do so,
+  subject to the following conditions:
+
+  The above copyright notice and this permission notice shall be
+  included in all copies or substantial portions of the Software.
+
+  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  SOFTWARE.
+***/
+
+#include <sys/types.h>
+#include <inttypes.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+  Reference implementation of a few systemd related interfaces for
+  writing daemons. These interfaces are trivial to implement. To
+  simplify porting we provide this reference implementation.
+  Applications are welcome to reimplement the algorithms described
+  here if they do not want to include these two source files.
+
+  The following functionality is provided:
+
+  - Support for logging with log levels on stderr
+  - File descriptor passing for socket-based activation
+  - Daemon startup and status notification
+  - Detection of systemd boots
+
+  You may compile this with -DDISABLE_SYSTEMD to disable systemd
+  support. This makes all those calls NOPs that are directly related to
+  systemd (i.e. only sd_is_xxx() will stay useful).
+
+  Since this is drop-in code we don't want any of our symbols to be
+  exported in any case. Hence we declare hidden visibility for all of
+  them.
+
+  You may find an up-to-date version of these source files online:
+
+  http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.h
+  http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.c
+
+  This should compile on non-Linux systems, too, but with the
+  exception of the sd_is_xxx() calls all functions will become NOPs.
+
+  See sd-daemon(7) for more information.
+*/
+
+#ifndef _sd_printf_attr_
+#if __GNUC__ >= 4
+#define _sd_printf_attr_(a,b) __attribute__ ((format (printf, a, b)))
+#else
+#define _sd_printf_attr_(a,b)
+#endif
+#endif
+
+#ifndef _sd_hidden_
+#if (__GNUC__ >= 4) && !defined(SD_EXPORT_SYMBOLS)
+#define _sd_hidden_ __attribute__ ((visibility("hidden")))
+#else
+#define _sd_hidden_
+#endif
+#endif
+
+/*
+  Log levels for usage on stderr:
+
+          fprintf(stderr, SD_NOTICE "Hello World!\n");
+
+  This is similar to printk() usage in the kernel.
+*/
+#define SD_EMERG   "<0>"  /* system is unusable */
+#define SD_ALERT   "<1>"  /* action must be taken immediately */
+#define SD_CRIT    "<2>"  /* critical conditions */
+#define SD_ERR     "<3>"  /* error conditions */
+#define SD_WARNING "<4>"  /* warning conditions */
+#define SD_NOTICE  "<5>"  /* normal but significant condition */
+#define SD_INFO    "<6>"  /* informational */
+#define SD_DEBUG   "<7>"  /* debug-level messages */
+
+/* The first passed file descriptor is fd 3 */
+#define SD_LISTEN_FDS_START 3
+
+/*
+  Returns how many file descriptors have been passed, or a negative
+  errno code on failure. Optionally, removes the $LISTEN_FDS and
+  $LISTEN_PID file descriptors from the environment (recommended, but
+  problematic in threaded environments). If r is the return value of
+  this function you'll find the file descriptors passed as fds
+  SD_LISTEN_FDS_START to SD_LISTEN_FDS_START+r-1. Returns a negative
+  errno style error code on failure. This function call ensures that
+  the FD_CLOEXEC flag is set for the passed file descriptors, to make
+  sure they are not passed on to child processes. If FD_CLOEXEC shall
+  not be set, the caller needs to unset it after this call for all file
+  descriptors that are used.
+
+  See sd_listen_fds(3) for more information.
+*/
+int sd_listen_fds(int unset_environment) _sd_hidden_;
+
+/*
+  Helper call for identifying a passed file descriptor. Returns 1 if
+  the file descriptor is a FIFO in the file system stored under the
+  specified path, 0 otherwise. If path is NULL a path name check will
+  not be done and the call only verifies if the file descriptor
+  refers to a FIFO. Returns a negative errno style error code on
+  failure.
+
+  See sd_is_fifo(3) for more information.
+*/
+int sd_is_fifo(int fd, const char *path) _sd_hidden_;
+
+/*
+  Helper call for identifying a passed file descriptor. Returns 1 if
+  the file descriptor is a socket of the specified family (AF_INET,
+  ...) and type (SOCK_DGRAM, SOCK_STREAM, ...), 0 otherwise. If
+  family is 0 a socket family check will not be done. If type is 0 a
+  socket type check will not be done and the call only verifies if
+  the file descriptor refers to a socket. If listening is > 0 it is
+  verified that the socket is in listening mode. (i.e. listen() has
+  been called) If listening is == 0 it is verified that the socket is
+  not in listening mode. If listening is < 0 no listening mode check
+  is done. Returns a negative errno style error code on failure.
+
+  See sd_is_socket(3) for more information.
+*/
+int sd_is_socket(int fd, int family, int type, int listening) _sd_hidden_;
+
+/*
+  Helper call for identifying a passed file descriptor. Returns 1 if
+  the file descriptor is an Internet socket, of the specified family
+  (either AF_INET or AF_INET6) and the specified type (SOCK_DGRAM,
+  SOCK_STREAM, ...), 0 otherwise. If version is 0 a protocol version
+  check is not done. If type is 0 a socket type check will not be
+  done. If port is 0 a socket port check will not be done. The
+  listening flag is used the same way as in sd_is_socket(). Returns a
+  negative errno style error code on failure.
+
+  See sd_is_socket_inet(3) for more information.
+*/
+int sd_is_socket_inet(int fd, int family, int type, int listening, uint16_t port) _sd_hidden_;
+
+/*
+  Helper call for identifying a passed file descriptor. Returns 1 if
+  the file descriptor is an AF_UNIX socket of the specified type
+  (SOCK_DGRAM, SOCK_STREAM, ...) and path, 0 otherwise. If type is 0
+  a socket type check will not be done. If path is NULL a socket path
+  check will not be done. For normal AF_UNIX sockets set length to
+  0. For abstract namespace sockets set length to the length of the
+  socket name (including the initial 0 byte), and pass the full
+  socket path in path (including the initial 0 byte). The listening
+  flag is used the same way as in sd_is_socket(). Returns a negative
+  errno style error code on failure.
+
+  See sd_is_socket_unix(3) for more information.
+*/
+int sd_is_socket_unix(int fd, int type, int listening, const char *path, size_t length) _sd_hidden_;
+
+/*
+  Informs systemd about changed daemon state. This takes a number of
+  newline separated environment-style variable assignments in a
+  string. The following variables are known:
+
+     READY=1      Tells systemd that daemon startup is finished (only
+                  relevant for services of Type=notify). The passed
+                  argument is a boolean "1" or "0". Since there is
+                  little value in signaling non-readiness the only
+                  value daemons should send is "READY=1".
+
+     STATUS=...   Passes a single-line status string back to systemd
+                  that describes the daemon state. This is free-from
+                  and can be used for various purposes: general state
+                  feedback, fsck-like programs could pass completion
+                  percentages and failing programs could pass a human
+                  readable error message. Example: "STATUS=Completed
+                  66% of file system check..."
+
+     ERRNO=...    If a daemon fails, the errno-style error code,
+                  formatted as string. Example: "ERRNO=2" for ENOENT.
+
+     BUSERROR=... If a daemon fails, the D-Bus error-style error
+                  code. Example: "BUSERROR=org.freedesktop.DBus.Error.TimedOut"
+
+     MAINPID=...  The main pid of a daemon, in case systemd did not
+                  fork off the process itself. Example: "MAINPID=4711"
+
+  Daemons can choose to send additional variables. However, it is
+  recommended to prefix variable names not listed above with X_.
+
+  Returns a negative errno-style error code on failure. Returns > 0
+  if systemd could be notified, 0 if it couldn't possibly because
+  systemd is not running.
+
+  Example: When a daemon finished starting up, it could issue this
+  call to notify systemd about it:
+
+     sd_notify(0, "READY=1");
+
+  See sd_notifyf() for more complete examples.
+
+  See sd_notify(3) for more information.
+*/
+int sd_notify(int unset_environment, const char *state) _sd_hidden_;
+
+/*
+  Similar to sd_notify() but takes a format string.
+
+  Example 1: A daemon could send the following after initialization:
+
+     sd_notifyf(0, "READY=1\n"
+                   "STATUS=Processing requests...\n"
+                   "MAINPID=%lu",
+                   (unsigned long) getpid());
+
+  Example 2: A daemon could send the following shortly before
+  exiting, on failure:
+
+     sd_notifyf(0, "STATUS=Failed to start up: %s\n"
+                   "ERRNO=%i",
+                   strerror(errno),
+                   errno);
+
+  See sd_notifyf(3) for more information.
+*/
+int sd_notifyf(int unset_environment, const char *format, ...) _sd_printf_attr_(2,3) _sd_hidden_;
+
+/*
+  Returns > 0 if the system was booted with systemd. Returns < 0 on
+  error. Returns 0 if the system was not booted with systemd. Note
+  that all of the functions above handle non-systemd boots just
+  fine. You should NOT protect them with a call to this function. Also
+  note that this function checks whether the system, not the user
+  session is controlled by systemd. However the functions above work
+  for both user and system services.
+
+  See sd_booted(3) for more information.
+*/
+int sd_booted(void) _sd_hidden_;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/avahi-0.6.31/avahi-daemon/setproctitle.c b/avahi-0.6.31/avahi-daemon/setproctitle.c
new file mode 100644
index 0000000..e6f0941
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/setproctitle.c
@@ -0,0 +1,111 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdarg.h>
+#include <unistd.h>
+
+#ifdef HAVE_SYS_PRCTL_H
+#include <sys/prctl.h>
+#endif
+
+#include <avahi-common/malloc.h>
+
+#include "setproctitle.h"
+
+#if !defined(HAVE_SETPROCTITLE) && defined(__linux__)
+static char** argv_buffer = NULL;
+static size_t argv_size = 0;
+
+#if !HAVE_DECL_ENVIRON
+extern char **environ;
+#endif
+
+#endif
+
+void avahi_init_proc_title(int argc, char **argv) {
+
+#if !defined(HAVE_SETPROCTITLE) && defined(__linux__)
+
+    unsigned i;
+    char **new_environ, *endptr;
+
+    /* This code is really really ugly. We make some memory layout
+     * assumptions and reuse the environment array as memory to store
+     * our process title in */
+
+    for (i = 0; environ[i]; i++);
+
+    endptr = i ? environ[i-1] + strlen(environ[i-1]) : argv[argc-1] + strlen(argv[argc-1]);
+
+    argv_buffer = argv;
+    argv_size = endptr - argv_buffer[0];
+
+    /* Make a copy of environ */
+
+    new_environ = avahi_malloc(sizeof(char*) * (i + 1));
+    for (i = 0; environ[i]; i++)
+        new_environ[i] = avahi_strdup(environ[i]);
+    new_environ[i] = NULL;
+
+    environ = new_environ;
+
+#endif
+}
+
+void avahi_set_proc_title(const char *name, const char *fmt,...) {
+#ifdef HAVE_SETPROCTITLE
+    char t[256];
+
+    va_list ap;
+    va_start(ap, fmt);
+    vsnprintf(t, sizeof(t), fmt, ap);
+    va_end(ap);
+
+    setproctitle("-%s", t);
+#elif defined(__linux__)
+    size_t l;
+    va_list ap;
+
+    if (!argv_buffer)
+        return;
+
+    va_start(ap, fmt);
+    vsnprintf(argv_buffer[0], argv_size, fmt, ap);
+    va_end(ap);
+
+    l = strlen(argv_buffer[0]);
+
+    memset(argv_buffer[0] + l, 0, argv_size - l);
+    argv_buffer[1] = NULL;
+#endif
+
+#if defined(HAVE_SYS_PRCTL_H) && defined(PR_SET_NAME)
+
+    if (name)
+        prctl(PR_SET_NAME, (unsigned long) name, 0, 0, 0);
+
+#endif
+}
diff --git a/avahi-0.6.31/avahi-daemon/setproctitle.h b/avahi-0.6.31/avahi-daemon/setproctitle.h
new file mode 100644
index 0000000..3499e2e
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/setproctitle.h
@@ -0,0 +1,28 @@
+#ifndef foosetproctitlehfoo
+#define foosetproctitlehfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#include <avahi-common/gccmacro.h>
+
+void avahi_init_proc_title(int argc, char **argv);
+void avahi_set_proc_title(const char *name, const char *fmt, ...) AVAHI_GCC_PRINTF_ATTR23;
+
+#endif
diff --git a/avahi-0.6.31/avahi-daemon/sftp-ssh.service b/avahi-0.6.31/avahi-daemon/sftp-ssh.service
new file mode 100644
index 0000000..dfae4f1
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/sftp-ssh.service
@@ -0,0 +1,34 @@
+<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
+<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
+
+<!--
+  This file is part of avahi.
+
+  avahi 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 of the
+  License, or (at your option) any later version.
+
+  avahi 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
+  General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+  02111-1307 USA.
+-->
+
+<!-- See avahi.service(5) for more information about this configuration file -->
+
+<service-group>
+
+  <name replace-wildcards="yes">%h</name>
+
+  <service>
+    <type>_sftp-ssh._tcp</type>
+    <port>22</port>
+  </service>
+
+</service-group>
diff --git a/avahi-0.6.31/avahi-daemon/simple-protocol.c b/avahi-0.6.31/avahi-daemon/simple-protocol.c
new file mode 100644
index 0000000..3e0ebb1
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/simple-protocol.c
@@ -0,0 +1,568 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <assert.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <sys/un.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+#include <avahi-common/llist.h>
+#include <avahi-common/malloc.h>
+#include <avahi-common/error.h>
+
+#include <avahi-core/log.h>
+#include <avahi-core/lookup.h>
+#include <avahi-core/dns-srv-rr.h>
+
+#include "simple-protocol.h"
+#include "main.h"
+#include "sd-daemon.h"
+
+#ifdef ENABLE_CHROOT
+#include "chroot.h"
+#endif
+
+#ifndef AF_LOCAL
+#define AF_LOCAL AF_UNIX
+#endif
+#ifndef PF_LOCAL
+#define PF_LOCAL PF_UNIX
+#endif
+
+#define BUFFER_SIZE (20*1024)
+
+#define CLIENTS_MAX 50
+
+typedef struct Client Client;
+typedef struct Server Server;
+
+typedef enum {
+    CLIENT_IDLE,
+    CLIENT_RESOLVE_HOSTNAME,
+    CLIENT_RESOLVE_ADDRESS,
+    CLIENT_BROWSE_DNS_SERVERS,
+    CLIENT_DEAD
+} ClientState;
+
+struct Client {
+    Server *server;
+
+    ClientState state;
+
+    int fd;
+    AvahiWatch *watch;
+
+    char inbuf[BUFFER_SIZE], outbuf[BUFFER_SIZE];
+    size_t inbuf_length, outbuf_length;
+
+    AvahiSHostNameResolver *host_name_resolver;
+    AvahiSAddressResolver *address_resolver;
+    AvahiSDNSServerBrowser *dns_server_browser;
+
+    AvahiProtocol afquery;
+
+    AVAHI_LLIST_FIELDS(Client, clients);
+};
+
+struct Server {
+    const AvahiPoll *poll_api;
+    int fd;
+    AvahiWatch *watch;
+    AVAHI_LLIST_HEAD(Client, clients);
+
+    unsigned n_clients;
+    int remove_socket;
+};
+
+static Server *server = NULL;
+
+static void client_work(AvahiWatch *watch, int fd, AvahiWatchEvent events, void *userdata);
+
+static void client_free(Client *c) {
+    assert(c);
+
+    assert(c->server->n_clients >= 1);
+    c->server->n_clients--;
+
+    if (c->host_name_resolver)
+        avahi_s_host_name_resolver_free(c->host_name_resolver);
+
+    if (c->address_resolver)
+        avahi_s_address_resolver_free(c->address_resolver);
+
+    if (c->dns_server_browser)
+        avahi_s_dns_server_browser_free(c->dns_server_browser);
+
+    c->server->poll_api->watch_free(c->watch);
+    close(c->fd);
+
+    AVAHI_LLIST_REMOVE(Client, clients, c->server->clients, c);
+    avahi_free(c);
+}
+
+static void client_new(Server *s, int fd) {
+    Client *c;
+
+    assert(fd >= 0);
+
+    c = avahi_new(Client, 1);
+    c->server = s;
+    c->fd = fd;
+    c->state = CLIENT_IDLE;
+
+    c->inbuf_length = c->outbuf_length = 0;
+
+    c->host_name_resolver = NULL;
+    c->address_resolver = NULL;
+    c->dns_server_browser = NULL;
+
+    c->watch = s->poll_api->watch_new(s->poll_api, fd, AVAHI_WATCH_IN, client_work, c);
+
+    AVAHI_LLIST_PREPEND(Client, clients, s->clients, c);
+    s->n_clients++;
+}
+
+static void client_output(Client *c, const uint8_t*data, size_t size) {
+    size_t k, m;
+
+    assert(c);
+    assert(data);
+
+    if (!size)
+        return;
+
+    k = sizeof(c->outbuf) - c->outbuf_length;
+    m = size > k ? k : size;
+
+    memcpy(c->outbuf + c->outbuf_length, data, m);
+    c->outbuf_length += m;
+
+    server->poll_api->watch_update(c->watch, AVAHI_WATCH_OUT);
+}
+
+static void client_output_printf(Client *c, const char *format, ...) {
+    char *t;
+    va_list ap;
+
+    va_start(ap, format);
+    t = avahi_strdup_vprintf(format, ap);
+    va_end(ap);
+
+    client_output(c, (uint8_t*) t, strlen(t));
+    avahi_free(t);
+}
+
+static void host_name_resolver_callback(
+    AVAHI_GCC_UNUSED AvahiSHostNameResolver *r,
+    AvahiIfIndex iface,
+    AvahiProtocol protocol,
+    AvahiResolverEvent event,
+    const char *hostname,
+    const AvahiAddress *a,
+    AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+    void* userdata) {
+
+    Client *c = userdata;
+
+    assert(c);
+
+    if (event == AVAHI_RESOLVER_FAILURE)
+        client_output_printf(c, "%+i %s\n", avahi_server_errno(avahi_server), avahi_strerror(avahi_server_errno(avahi_server)));
+    else if (event == AVAHI_RESOLVER_FOUND) {
+        char t[AVAHI_ADDRESS_STR_MAX];
+        avahi_address_snprint(t, sizeof(t), a);
+        client_output_printf(c, "+ %i %u %s %s\n", iface, protocol, hostname, t);
+    }
+
+    c->state = CLIENT_DEAD;
+}
+
+static void address_resolver_callback(
+    AVAHI_GCC_UNUSED AvahiSAddressResolver *r,
+    AvahiIfIndex iface,
+    AvahiProtocol protocol,
+    AvahiResolverEvent event,
+    AVAHI_GCC_UNUSED const AvahiAddress *a,
+    const char *hostname,
+    AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+    void* userdata) {
+
+    Client *c = userdata;
+
+    assert(c);
+
+    if (event == AVAHI_RESOLVER_FAILURE)
+        client_output_printf(c, "%+i %s\n", avahi_server_errno(avahi_server), avahi_strerror(avahi_server_errno(avahi_server)));
+    else if (event == AVAHI_RESOLVER_FOUND)
+        client_output_printf(c, "+ %i %u %s\n", iface, protocol, hostname);
+
+    c->state = CLIENT_DEAD;
+}
+
+static void dns_server_browser_callback(
+    AVAHI_GCC_UNUSED AvahiSDNSServerBrowser *b,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiBrowserEvent event,
+    AVAHI_GCC_UNUSED const char *host_name,
+    const AvahiAddress *a,
+    uint16_t port,
+    AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+    void* userdata) {
+
+    Client *c = userdata;
+    char t[AVAHI_ADDRESS_STR_MAX];
+
+    assert(c);
+
+    if (!a)
+        return;
+
+    switch (event) {
+        case AVAHI_BROWSER_FAILURE:
+            client_output_printf(c, "%+i %s\n", avahi_server_errno(avahi_server), avahi_strerror(avahi_server_errno(avahi_server)));
+            c->state = CLIENT_DEAD;
+            break;
+
+        case AVAHI_BROWSER_ALL_FOR_NOW:
+        case AVAHI_BROWSER_CACHE_EXHAUSTED:
+            break;
+
+        case AVAHI_BROWSER_NEW:
+        case AVAHI_BROWSER_REMOVE:
+
+            avahi_address_snprint(t, sizeof(t), a);
+            client_output_printf(c, "%c %i %u %s %u\n", event == AVAHI_BROWSER_NEW ? '>' : '<',  interface, protocol, t, port);
+            break;
+    }
+}
+
+static void handle_line(Client *c, const char *s) {
+    char cmd[64], arg[64];
+    int n_args;
+
+    assert(c);
+    assert(s);
+
+    if (c->state != CLIENT_IDLE)
+        return;
+
+    if ((n_args = sscanf(s, "%63s %63s", cmd, arg)) < 1 ) {
+        client_output_printf(c, "%+i Failed to parse command, try \"HELP\".\n", AVAHI_ERR_INVALID_OPERATION);
+        c->state = CLIENT_DEAD;
+        return;
+    }
+
+    if (strcmp(cmd, "HELP") == 0) {
+        client_output_printf(c,
+                             "+ Available commands are:\n"
+                             "+      RESOLVE-HOSTNAME <hostname>\n"
+                             "+      RESOLVE-HOSTNAME-IPV6 <hostname>\n"
+                             "+      RESOLVE-HOSTNAME-IPV4 <hostname>\n"
+                             "+      RESOLVE-ADDRESS <address>\n"
+                             "+      BROWSE-DNS-SERVERS\n"
+                             "+      BROWSE-DNS-SERVERS-IPV4\n"
+                             "+      BROWSE-DNS-SERVERS-IPV6\n");
+        c->state = CLIENT_DEAD; }
+    else if (strcmp(cmd, "FUCK") == 0 && n_args == 1) {
+        client_output_printf(c, "+ FUCK: Go fuck yourself!\n");
+        c->state = CLIENT_DEAD;
+    } else if (strcmp(cmd, "RESOLVE-HOSTNAME-IPV4") == 0 && n_args == 2) {
+        c->state = CLIENT_RESOLVE_HOSTNAME;
+        if (!(c->host_name_resolver = avahi_s_host_name_resolver_new(avahi_server, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, arg, c->afquery = AVAHI_PROTO_INET, AVAHI_LOOKUP_USE_MULTICAST, host_name_resolver_callback, c)))
+            goto fail;
+
+        avahi_log_debug(__FILE__": Got %s request for '%s'.", cmd, arg);
+    } else if (strcmp(cmd, "RESOLVE-HOSTNAME-IPV6") == 0 && n_args == 2) {
+        c->state = CLIENT_RESOLVE_HOSTNAME;
+        if (!(c->host_name_resolver = avahi_s_host_name_resolver_new(avahi_server, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, arg, c->afquery = AVAHI_PROTO_INET6, AVAHI_LOOKUP_USE_MULTICAST, host_name_resolver_callback, c)))
+            goto fail;
+
+        avahi_log_debug(__FILE__": Got %s request for '%s'.", cmd, arg);
+    } else if (strcmp(cmd, "RESOLVE-HOSTNAME") == 0 && n_args == 2) {
+        c->state = CLIENT_RESOLVE_HOSTNAME;
+        if (!(c->host_name_resolver = avahi_s_host_name_resolver_new(avahi_server, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, arg, c->afquery = AVAHI_PROTO_UNSPEC, AVAHI_LOOKUP_USE_MULTICAST, host_name_resolver_callback, c)))
+            goto fail;
+
+        avahi_log_debug(__FILE__": Got %s request for '%s'.", cmd, arg);
+    } else if (strcmp(cmd, "RESOLVE-ADDRESS") == 0 && n_args == 2) {
+        AvahiAddress addr;
+
+        if (!(avahi_address_parse(arg, AVAHI_PROTO_UNSPEC, &addr))) {
+            client_output_printf(c, "%+i Failed to parse address \"%s\".\n", AVAHI_ERR_INVALID_ADDRESS, arg);
+            c->state = CLIENT_DEAD;
+        } else {
+            c->state = CLIENT_RESOLVE_ADDRESS;
+            if (!(c->address_resolver = avahi_s_address_resolver_new(avahi_server, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, &addr, AVAHI_LOOKUP_USE_MULTICAST, address_resolver_callback, c)))
+                goto fail;
+        }
+
+        avahi_log_debug(__FILE__": Got %s request for '%s'.", cmd, arg);
+
+    } else if (strcmp(cmd, "BROWSE-DNS-SERVERS-IPV4") == 0 && n_args == 1) {
+        c->state = CLIENT_BROWSE_DNS_SERVERS;
+        if (!(c->dns_server_browser = avahi_s_dns_server_browser_new(avahi_server, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, NULL, AVAHI_DNS_SERVER_RESOLVE, c->afquery = AVAHI_PROTO_INET, AVAHI_LOOKUP_USE_MULTICAST, dns_server_browser_callback, c)))
+            goto fail;
+        client_output_printf(c, "+ Browsing ...\n");
+
+        avahi_log_debug(__FILE__": Got %s request.", cmd);
+
+    } else if (strcmp(cmd, "BROWSE-DNS-SERVERS-IPV6") == 0 && n_args == 1) {
+        c->state = CLIENT_BROWSE_DNS_SERVERS;
+        if (!(c->dns_server_browser = avahi_s_dns_server_browser_new(avahi_server, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, NULL, AVAHI_DNS_SERVER_RESOLVE, c->afquery = AVAHI_PROTO_INET6, AVAHI_LOOKUP_USE_MULTICAST, dns_server_browser_callback, c)))
+            goto fail;
+        client_output_printf(c, "+ Browsing ...\n");
+
+        avahi_log_debug(__FILE__": Got %s request.", cmd);
+
+    } else if (strcmp(cmd, "BROWSE-DNS-SERVERS") == 0 && n_args == 1) {
+        c->state = CLIENT_BROWSE_DNS_SERVERS;
+        if (!(c->dns_server_browser = avahi_s_dns_server_browser_new(avahi_server, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, NULL, AVAHI_DNS_SERVER_RESOLVE, c->afquery = AVAHI_PROTO_UNSPEC, AVAHI_LOOKUP_USE_MULTICAST, dns_server_browser_callback, c)))
+            goto fail;
+        client_output_printf(c, "+ Browsing ...\n");
+
+        avahi_log_debug(__FILE__": Got %s request.", cmd);
+
+    } else {
+        client_output_printf(c, "%+i Invalid command \"%s\", try \"HELP\".\n", AVAHI_ERR_INVALID_OPERATION, cmd);
+        c->state = CLIENT_DEAD;
+
+        avahi_log_debug(__FILE__": Got invalid request '%s'.", cmd);
+    }
+
+    return;
+
+fail:
+    client_output_printf(c, "%+i %s\n", avahi_server_errno(avahi_server), avahi_strerror(avahi_server_errno(avahi_server)));
+    c->state = CLIENT_DEAD;
+}
+
+static void handle_input(Client *c) {
+    assert(c);
+
+    for (;;) {
+        char *e;
+        size_t k;
+
+        if (!(e = memchr(c->inbuf, '\n', c->inbuf_length)))
+            break;
+
+        k = e - (char*) c->inbuf;
+        *e = 0;
+
+        handle_line(c, c->inbuf);
+        c->inbuf_length -= k + 1;
+        memmove(c->inbuf, e+1, c->inbuf_length);
+    }
+}
+
+static void client_work(AvahiWatch *watch, AVAHI_GCC_UNUSED int fd, AvahiWatchEvent events, void *userdata) {
+    Client *c = userdata;
+
+    assert(c);
+
+    if ((events & AVAHI_WATCH_IN) && c->inbuf_length < sizeof(c->inbuf)) {
+        ssize_t r;
+
+        if ((r = read(c->fd, c->inbuf + c->inbuf_length, sizeof(c->inbuf) - c->inbuf_length)) <= 0) {
+            if (r < 0)
+                avahi_log_warn("read(): %s", strerror(errno));
+            client_free(c);
+            return;
+        }
+
+        c->inbuf_length += r;
+        assert(c->inbuf_length <= sizeof(c->inbuf));
+
+        handle_input(c);
+    }
+
+    if ((events & AVAHI_WATCH_OUT) && c->outbuf_length > 0) {
+        ssize_t r;
+
+        if ((r = write(c->fd, c->outbuf, c->outbuf_length)) < 0) {
+            avahi_log_warn("write(): %s", strerror(errno));
+            client_free(c);
+            return;
+        }
+
+        assert((size_t) r <= c->outbuf_length);
+        c->outbuf_length -= r;
+
+        if (c->outbuf_length)
+            memmove(c->outbuf, c->outbuf + r, c->outbuf_length - r);
+
+        if (c->outbuf_length == 0 && c->state == CLIENT_DEAD) {
+            client_free(c);
+            return;
+        }
+    }
+
+    c->server->poll_api->watch_update(
+        watch,
+        (c->outbuf_length > 0 ? AVAHI_WATCH_OUT : 0) |
+        (c->inbuf_length < sizeof(c->inbuf) ? AVAHI_WATCH_IN : 0));
+}
+
+static void server_work(AVAHI_GCC_UNUSED AvahiWatch *watch, int fd, AvahiWatchEvent events, void *userdata) {
+    Server *s = userdata;
+
+    assert(s);
+
+    if (events & AVAHI_WATCH_IN) {
+        int cfd;
+
+        if ((cfd = accept(fd, NULL, NULL)) < 0)
+            avahi_log_error("accept(): %s", strerror(errno));
+        else
+            client_new(s, cfd);
+    }
+}
+
+int simple_protocol_setup(const AvahiPoll *poll_api) {
+    struct sockaddr_un sa;
+    mode_t u;
+    int n;
+
+    assert(!server);
+
+    server = avahi_new(Server, 1);
+    server->poll_api = poll_api;
+    server->remove_socket = 0;
+    server->fd = -1;
+    server->n_clients = 0;
+    AVAHI_LLIST_HEAD_INIT(Client, server->clients);
+    server->watch = NULL;
+
+    u = umask(0000);
+
+    if ((n = sd_listen_fds(1)) < 0) {
+        avahi_log_warn("Failed to acquire systemd file descriptors: %s", strerror(-n));
+        goto fail;
+    }
+
+    if (n > 1) {
+        avahi_log_warn("Too many systemd file descriptors passed.");
+        goto fail;
+    }
+
+    if (n == 1) {
+        int r;
+
+        if ((r = sd_is_socket(SD_LISTEN_FDS_START, AF_LOCAL, SOCK_STREAM, 1)) < 0) {
+            avahi_log_warn("Passed systemd file descriptor is of wrong type: %s", strerror(-r));
+            goto fail;
+        }
+
+        server->fd = SD_LISTEN_FDS_START;
+
+    } else {
+
+        if ((server->fd = socket(AF_LOCAL, SOCK_STREAM, 0)) < 0) {
+            avahi_log_warn("socket(AF_LOCAL, SOCK_STREAM, 0): %s", strerror(errno));
+            goto fail;
+        }
+
+        memset(&sa, 0, sizeof(sa));
+        sa.sun_family = AF_LOCAL;
+        strncpy(sa.sun_path, AVAHI_SOCKET, sizeof(sa.sun_path)-1);
+
+        /* We simply remove existing UNIX sockets under this name. The
+           Avahi daemon makes sure that it runs only once on a host,
+           therefore sockets that already exist are stale and may be
+           removed without any ill effects */
+
+        unlink(AVAHI_SOCKET);
+
+        if (bind(server->fd, (struct sockaddr*) &sa, sizeof(sa)) < 0) {
+            avahi_log_warn("bind(): %s", strerror(errno));
+            goto fail;
+        }
+
+        server->remove_socket = 1;
+
+        if (listen(server->fd, SOMAXCONN) < 0) {
+            avahi_log_warn("listen(): %s", strerror(errno));
+            goto fail;
+        }
+    }
+
+    umask(u);
+
+    server->watch = poll_api->watch_new(poll_api, server->fd, AVAHI_WATCH_IN, server_work, server);
+
+    return 0;
+
+fail:
+
+    umask(u);
+    simple_protocol_shutdown();
+
+    return -1;
+}
+
+void simple_protocol_shutdown(void) {
+
+    if (server) {
+
+        if (server->remove_socket)
+#ifdef ENABLE_CHROOT
+            avahi_chroot_helper_unlink(AVAHI_SOCKET);
+#else
+            unlink(AVAHI_SOCKET);
+#endif
+
+        while (server->clients)
+            client_free(server->clients);
+
+        if (server->watch)
+            server->poll_api->watch_free(server->watch);
+
+        if (server->fd >= 0)
+            close(server->fd);
+
+        avahi_free(server);
+
+        server = NULL;
+    }
+}
+
+void simple_protocol_restart_queries(void) {
+    Client *c;
+
+    /* Restart queries in case of local domain name changes */
+
+    assert(server);
+
+    for (c = server->clients; c; c = c->clients_next)
+        if (c->state == CLIENT_BROWSE_DNS_SERVERS && c->dns_server_browser) {
+            avahi_s_dns_server_browser_free(c->dns_server_browser);
+            c->dns_server_browser = avahi_s_dns_server_browser_new(avahi_server, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, NULL, AVAHI_DNS_SERVER_RESOLVE, c->afquery, AVAHI_LOOKUP_USE_MULTICAST, dns_server_browser_callback, c);
+        }
+}
diff --git a/avahi-0.6.31/avahi-daemon/simple-protocol.h b/avahi-0.6.31/avahi-daemon/simple-protocol.h
new file mode 100644
index 0000000..bcbffc3
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/simple-protocol.h
@@ -0,0 +1,29 @@
+#ifndef foosimpleprotocolhfoo
+#define foosimpleprotocolhfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#include <avahi-common/watch.h>
+
+int simple_protocol_setup(const AvahiPoll *poll_api);
+void simple_protocol_shutdown(void);
+void simple_protocol_restart_queries(void);
+
+#endif
diff --git a/avahi-0.6.31/avahi-daemon/ssh.service b/avahi-0.6.31/avahi-daemon/ssh.service
new file mode 100644
index 0000000..c66e0c1
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/ssh.service
@@ -0,0 +1,34 @@
+<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
+<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
+
+<!--
+  This file is part of avahi.
+ 
+  avahi 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 of the
+  License, or (at your option) any later version.
+
+  avahi 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
+  General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+  02111-1307 USA.
+-->
+
+<!-- See avahi.service(5) for more information about this configuration file -->
+
+<service-group>
+
+  <name replace-wildcards="yes">%h</name>
+
+  <service>
+    <type>_ssh._tcp</type>
+    <port>22</port>
+  </service>
+
+</service-group>
diff --git a/avahi-0.6.31/avahi-daemon/static-hosts.c b/avahi-0.6.31/avahi-daemon/static-hosts.c
new file mode 100644
index 0000000..34f531f
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/static-hosts.c
@@ -0,0 +1,278 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+#include <errno.h>
+#include <stdio.h>
+
+#include <avahi-common/llist.h>
+#include <avahi-common/malloc.h>
+#include <avahi-common/error.h>
+#include <avahi-core/log.h>
+#include <avahi-core/publish.h>
+
+#include "main.h"
+#include "static-hosts.h"
+
+typedef struct StaticHost StaticHost;
+
+struct StaticHost {
+    AvahiSEntryGroup *group;
+    int iteration;
+
+    char *host;
+    AvahiAddress address;
+
+    AVAHI_LLIST_FIELDS(StaticHost, hosts);
+};
+
+static AVAHI_LLIST_HEAD(StaticHost, hosts) = NULL;
+static int current_iteration = 0;
+
+static void add_static_host_to_server(StaticHost *h);
+static void remove_static_host_from_server(StaticHost *h);
+
+static void entry_group_callback(AvahiServer *s, AVAHI_GCC_UNUSED AvahiSEntryGroup *eg, AvahiEntryGroupState state, void* userdata) {
+    StaticHost *h;
+
+    assert(s);
+    assert(eg);
+
+    h = userdata;
+
+    switch (state) {
+
+        case AVAHI_ENTRY_GROUP_COLLISION:
+            avahi_log_error("Host name conflict for \"%s\", not established.", h->host);
+            break;
+
+        case AVAHI_ENTRY_GROUP_ESTABLISHED:
+            avahi_log_notice ("Static host name \"%s\" successfully established.", h->host);
+            break;
+
+        case AVAHI_ENTRY_GROUP_FAILURE:
+            avahi_log_notice ("Failed to establish static host name \"%s\": %s.", h->host, avahi_strerror (avahi_server_errno (s)));
+            break;
+
+        case AVAHI_ENTRY_GROUP_UNCOMMITED:
+        case AVAHI_ENTRY_GROUP_REGISTERING:
+            ;
+    }
+}
+
+static StaticHost *static_host_new(void) {
+    StaticHost *s;
+
+    s = avahi_new(StaticHost, 1);
+
+    s->group = NULL;
+    s->host = NULL;
+    s->iteration = current_iteration;
+
+    AVAHI_LLIST_PREPEND(StaticHost, hosts, hosts, s);
+
+    return s;
+}
+
+static void static_host_free(StaticHost *s) {
+    assert(s);
+
+    AVAHI_LLIST_REMOVE(StaticHost, hosts, hosts, s);
+
+    if (s->group)
+        avahi_s_entry_group_free (s->group);
+
+    avahi_free(s->host);
+
+    avahi_free(s);
+}
+
+static StaticHost *static_host_find(const char *host, const AvahiAddress *a) {
+    StaticHost *h;
+
+    assert(host);
+    assert(a);
+
+    for (h = hosts; h; h = h->hosts_next)
+        if (!strcmp(h->host, host) && !avahi_address_cmp(a, &h->address))
+            return h;
+
+    return NULL;
+}
+
+static void add_static_host_to_server(StaticHost *h)
+{
+
+    if (!h->group)
+        if (!(h->group = avahi_s_entry_group_new (avahi_server, entry_group_callback, h))) {
+            avahi_log_error("avahi_s_entry_group_new() failed: %s", avahi_strerror(avahi_server_errno(avahi_server)));
+            return;
+        }
+
+    if (avahi_s_entry_group_is_empty(h->group)) {
+        AvahiProtocol p;
+        int err;
+        const AvahiServerConfig *config;
+        config = avahi_server_get_config(avahi_server);
+
+        p = (h->address.proto == AVAHI_PROTO_INET && config->publish_a_on_ipv6) ||
+            (h->address.proto == AVAHI_PROTO_INET6 && config->publish_aaaa_on_ipv4) ? AVAHI_PROTO_UNSPEC : h->address.proto;
+
+        if ((err = avahi_server_add_address(avahi_server, h->group, AVAHI_IF_UNSPEC, p, 0, h->host, &h->address)) < 0) {
+            avahi_log_error ("Static host name %s: avahi_server_add_address failure: %s", h->host, avahi_strerror(err));
+            return;
+        }
+
+        avahi_s_entry_group_commit (h->group);
+    }
+}
+
+static void remove_static_host_from_server(StaticHost *h)
+{
+    if (h->group)
+        avahi_s_entry_group_reset (h->group);
+}
+
+void static_hosts_add_to_server(void) {
+    StaticHost *h;
+
+    for (h = hosts; h; h = h->hosts_next)
+        add_static_host_to_server(h);
+}
+
+void static_hosts_remove_from_server(void) {
+    StaticHost *h;
+
+    for (h = hosts; h; h = h->hosts_next)
+        remove_static_host_from_server(h);
+}
+
+void static_hosts_load(int in_chroot) {
+    FILE *f;
+    unsigned int line = 0;
+    StaticHost *h, *next;
+    const char *filename = in_chroot ? "/hosts" : AVAHI_CONFIG_DIR "/hosts";
+
+    if (!(f = fopen(filename, "r"))) {
+        if (errno != ENOENT)
+            avahi_log_error ("Failed to open static hosts file: %s", strerror (errno));
+        return;
+    }
+
+    current_iteration++;
+
+    while (!feof(f)) {
+        unsigned int len;
+        char ln[256], *s;
+        char *host, *ip;
+        AvahiAddress a;
+
+        if (!fgets(ln, sizeof (ln), f))
+            break;
+
+        line++;
+
+        /* Find the start of the line, ignore whitespace */
+        s = ln + strspn(ln, " \t");
+        /* Set the end of the string to NULL */
+        s[strcspn(s, "#\r\n")] = 0;
+
+        /* Ignore blank lines */
+        if (*s == 0)
+            continue;
+
+        /* Read the first string (ip) up to the next whitespace */
+        len = strcspn(s, " \t");
+        ip = avahi_strndup(s, len);
+
+        /* Skip past it */
+        s += len;
+
+        /* Find the next token */
+        s += strspn(s, " \t");
+        len = strcspn(s, " \t");
+        host = avahi_strndup(s, len);
+
+        if (*host == 0)
+        {
+            avahi_log_error("%s:%d: Error, unexpected end of line!", filename, line);
+            avahi_free(host);
+            avahi_free(ip);
+            goto fail;
+        }
+
+        /* Skip over the host */
+        s += len;
+
+        /* Skip past any more spaces */
+        s += strspn(s, " \t");
+
+        /* Anything left? */
+        if (*s != 0) {
+            avahi_log_error ("%s:%d: Junk on the end of the line!", filename, line);
+            avahi_free(host);
+            avahi_free(ip);
+            goto fail;
+        }
+
+        if (!avahi_address_parse(ip, AVAHI_PROTO_UNSPEC, &a)) {
+            avahi_log_error("Static host name %s: failed to parse address %s", host, ip);
+            avahi_free(host);
+            avahi_free(ip);
+            goto fail;
+        }
+
+        avahi_free(ip);
+
+        if ((h = static_host_find(host, &a)))
+            avahi_free(host);
+        else {
+            h = static_host_new();
+            h->host = host;
+            h->address = a;
+
+            avahi_log_info("Loading new static hostname %s.", h->host);
+        }
+
+        h->iteration = current_iteration;
+    }
+
+    for (h = hosts; h; h = next) {
+        next = h->hosts_next;
+
+        if (h->iteration != current_iteration) {
+            avahi_log_info("Static hostname %s vanished, removing.", h->host);
+            static_host_free(h);
+        }
+    }
+
+fail:
+
+    fclose(f);
+}
+
+void static_hosts_free_all (void)
+{
+    while(hosts)
+        static_host_free(hosts);
+}
diff --git a/avahi-0.6.31/avahi-daemon/static-hosts.h b/avahi-0.6.31/avahi-daemon/static-hosts.h
new file mode 100644
index 0000000..5d63995
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/static-hosts.h
@@ -0,0 +1,28 @@
+#ifndef foostatichostshfoo
+#define foostatichostshfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+void static_hosts_load(int in_chroot);
+void static_hosts_free_all(void);
+void static_hosts_add_to_server(void);
+void static_hosts_remove_from_server(void);
+
+#endif
diff --git a/avahi-0.6.31/avahi-daemon/static-services.c b/avahi-0.6.31/avahi-daemon/static-services.c
new file mode 100644
index 0000000..4c3491f
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/static-services.c
@@ -0,0 +1,744 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <sys/stat.h>
+#include <glob.h>
+#include <limits.h>
+#include <string.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#ifdef USE_EXPAT_H
+#include <expat.h>
+#endif /* USE_EXPAT_H */
+
+#ifdef USE_BSDXML_H
+#include <bsdxml.h>
+#endif /* USE_BSDXML_H */
+
+#include <avahi-common/llist.h>
+#include <avahi-common/malloc.h>
+#include <avahi-common/alternative.h>
+#include <avahi-common/error.h>
+#include <avahi-common/domain.h>
+#include <avahi-core/log.h>
+#include <avahi-core/publish.h>
+
+#include "main.h"
+#include "static-services.h"
+
+typedef struct StaticService StaticService;
+typedef struct StaticServiceGroup StaticServiceGroup;
+
+struct StaticService {
+    StaticServiceGroup *group;
+
+    char *type;
+    char *domain_name;
+    char *host_name;
+    uint16_t port;
+    int protocol;
+
+    AvahiStringList *subtypes;
+
+    AvahiStringList *txt_records;
+
+    AVAHI_LLIST_FIELDS(StaticService, services);
+};
+
+struct StaticServiceGroup {
+    char *filename;
+    time_t mtime;
+
+    char *name, *chosen_name;
+    int replace_wildcards;
+
+    AvahiSEntryGroup *entry_group;
+    AVAHI_LLIST_HEAD(StaticService, services);
+    AVAHI_LLIST_FIELDS(StaticServiceGroup, groups);
+};
+
+static AVAHI_LLIST_HEAD(StaticServiceGroup, groups) = NULL;
+
+static char *replacestr(const char *pattern, const char *a, const char *b) {
+    char *r = NULL, *e, *n;
+
+    while ((e = strstr(pattern, a))) {
+        char *k;
+
+        k = avahi_strndup(pattern, e - pattern);
+        if (r)
+            n = avahi_strdup_printf("%s%s%s", r, k, b);
+        else
+            n = avahi_strdup_printf("%s%s", k, b);
+
+        avahi_free(k);
+        avahi_free(r);
+        r = n;
+
+        pattern = e + strlen(a);
+    }
+
+    if (!r)
+        return avahi_strdup(pattern);
+
+    n = avahi_strdup_printf("%s%s", r, pattern);
+    avahi_free(r);
+
+    return n;
+}
+
+static void add_static_service_group_to_server(StaticServiceGroup *g);
+static void remove_static_service_group_from_server(StaticServiceGroup *g);
+
+static StaticService *static_service_new(StaticServiceGroup *group) {
+    StaticService *s;
+
+    assert(group);
+    s = avahi_new(StaticService, 1);
+    s->group = group;
+
+    s->type = s->host_name = s->domain_name = NULL;
+    s->port = 0;
+    s->protocol = AVAHI_PROTO_UNSPEC;
+
+    s->txt_records = NULL;
+    s->subtypes = NULL;
+
+    AVAHI_LLIST_PREPEND(StaticService, services, group->services, s);
+
+    return s;
+}
+
+static StaticServiceGroup *static_service_group_new(char *filename) {
+    StaticServiceGroup *g;
+    assert(filename);
+
+    g = avahi_new(StaticServiceGroup, 1);
+    g->filename = avahi_strdup(filename);
+    g->mtime = 0;
+    g->name = g->chosen_name = NULL;
+    g->replace_wildcards = 0;
+    g->entry_group = NULL;
+
+    AVAHI_LLIST_HEAD_INIT(StaticService, g->services);
+    AVAHI_LLIST_PREPEND(StaticServiceGroup, groups, groups, g);
+
+    return g;
+}
+
+static void static_service_free(StaticService *s) {
+    assert(s);
+
+    AVAHI_LLIST_REMOVE(StaticService, services, s->group->services, s);
+
+    avahi_free(s->type);
+    avahi_free(s->host_name);
+    avahi_free(s->domain_name);
+
+    avahi_string_list_free(s->txt_records);
+    avahi_string_list_free(s->subtypes);
+
+    avahi_free(s);
+}
+
+static void static_service_group_free(StaticServiceGroup *g) {
+    assert(g);
+
+    if (g->entry_group)
+        avahi_s_entry_group_free(g->entry_group);
+
+    while (g->services)
+        static_service_free(g->services);
+
+    AVAHI_LLIST_REMOVE(StaticServiceGroup, groups, groups, g);
+
+    avahi_free(g->filename);
+    avahi_free(g->name);
+    avahi_free(g->chosen_name);
+    avahi_free(g);
+}
+
+static void entry_group_callback(AvahiServer *s, AVAHI_GCC_UNUSED AvahiSEntryGroup *eg, AvahiEntryGroupState state, void* userdata) {
+    StaticServiceGroup *g = userdata;
+
+    assert(s);
+    assert(g);
+
+    switch (state) {
+
+        case AVAHI_ENTRY_GROUP_COLLISION: {
+            char *n;
+
+            remove_static_service_group_from_server(g);
+
+            n = avahi_alternative_service_name(g->chosen_name);
+            avahi_free(g->chosen_name);
+            g->chosen_name = n;
+
+            avahi_log_notice("Service name conflict for \"%s\" (%s), retrying with \"%s\".", g->name, g->filename, g->chosen_name);
+
+            add_static_service_group_to_server(g);
+            break;
+        }
+
+        case AVAHI_ENTRY_GROUP_ESTABLISHED:
+            avahi_log_info("Service \"%s\" (%s) successfully established.", g->chosen_name, g->filename);
+            break;
+
+        case AVAHI_ENTRY_GROUP_FAILURE:
+            avahi_log_warn("Failed to publish service \"%s\" (%s): %s", g->chosen_name, g->filename, avahi_strerror(avahi_server_errno(s)));
+            remove_static_service_group_from_server(g);
+            break;
+
+        case AVAHI_ENTRY_GROUP_UNCOMMITED:
+        case AVAHI_ENTRY_GROUP_REGISTERING:
+            ;
+    }
+}
+
+static void add_static_service_group_to_server(StaticServiceGroup *g) {
+    StaticService *s;
+
+    assert(g);
+
+    if (g->entry_group && !avahi_s_entry_group_is_empty(g->entry_group))
+        /* This service group is already registered in the server */
+        return;
+
+    if (!g->chosen_name || (g->replace_wildcards && strstr(g->name, "%h"))) {
+
+        avahi_free(g->chosen_name);
+
+        if (g->replace_wildcards) {
+            char label[AVAHI_LABEL_MAX];
+            const char *p;
+
+            p = avahi_server_get_host_name(avahi_server);
+            avahi_unescape_label(&p, label, sizeof(label));
+
+            g->chosen_name = replacestr(g->name, "%h", label);
+        } else
+            g->chosen_name = avahi_strdup(g->name);
+
+    }
+
+    if (!g->entry_group)
+        g->entry_group = avahi_s_entry_group_new(avahi_server, entry_group_callback, g);
+
+    assert(avahi_s_entry_group_is_empty(g->entry_group));
+
+    for (s = g->services; s; s = s->services_next) {
+        AvahiStringList *i;
+
+        if (avahi_server_add_service_strlst(
+                avahi_server,
+                g->entry_group,
+                AVAHI_IF_UNSPEC, s->protocol,
+                0,
+                g->chosen_name, s->type, s->domain_name,
+                s->host_name, s->port,
+                s->txt_records) < 0) {
+            avahi_log_error("Failed to add service '%s' of type '%s', ignoring service group (%s): %s",
+                            g->chosen_name, s->type, g->filename,
+                            avahi_strerror(avahi_server_errno(avahi_server)));
+            remove_static_service_group_from_server(g);
+            return;
+        }
+
+        for (i = s->subtypes; i; i = i->next) {
+
+            if (avahi_server_add_service_subtype(
+                    avahi_server,
+                    g->entry_group,
+                    AVAHI_IF_UNSPEC, s->protocol,
+                    0,
+                    g->chosen_name, s->type, s->domain_name,
+                    (char*) i->text) < 0) {
+
+                avahi_log_error("Failed to add subtype '%s' for service '%s' of type '%s', ignoring subtype (%s): %s",
+                                i->text, g->chosen_name, s->type, g->filename,
+                                avahi_strerror(avahi_server_errno(avahi_server)));
+            }
+        }
+    }
+
+    avahi_s_entry_group_commit(g->entry_group);
+}
+
+static void remove_static_service_group_from_server(StaticServiceGroup *g) {
+    assert(g);
+
+    if (g->entry_group)
+        avahi_s_entry_group_reset(g->entry_group);
+}
+
+typedef enum {
+    XML_TAG_INVALID,
+    XML_TAG_SERVICE_GROUP,
+    XML_TAG_NAME,
+    XML_TAG_SERVICE,
+    XML_TAG_TYPE,
+    XML_TAG_SUBTYPE,
+    XML_TAG_DOMAIN_NAME,
+    XML_TAG_HOST_NAME,
+    XML_TAG_PORT,
+    XML_TAG_TXT_RECORD
+} xml_tag_name;
+
+struct xml_userdata {
+    StaticServiceGroup *group;
+    StaticService *service;
+    xml_tag_name current_tag;
+    int failed;
+    char *buf;
+};
+
+#ifndef XMLCALL
+#define XMLCALL
+#endif
+
+static void XMLCALL xml_start(void *data, const char *el, const char *attr[]) {
+    struct xml_userdata *u = data;
+
+    assert(u);
+
+    if (u->failed)
+        return;
+
+    if (u->current_tag == XML_TAG_INVALID && strcmp(el, "service-group") == 0) {
+
+        if (attr[0])
+            goto invalid_attr;
+
+        u->current_tag = XML_TAG_SERVICE_GROUP;
+    } else if (u->current_tag == XML_TAG_SERVICE_GROUP && strcmp(el, "name") == 0) {
+        u->current_tag = XML_TAG_NAME;
+
+        if (attr[0]) {
+            if (strcmp(attr[0], "replace-wildcards") == 0)
+                u->group->replace_wildcards = strcmp(attr[1], "yes") == 0;
+            else
+                goto invalid_attr;
+
+            if (attr[2])
+                goto invalid_attr;
+        }
+
+    } else if (u->current_tag == XML_TAG_SERVICE_GROUP && strcmp(el, "service") == 0) {
+        u->current_tag = XML_TAG_SERVICE;
+
+        assert(!u->service);
+        u->service = static_service_new(u->group);
+
+        if (attr[0]) {
+            if (strcmp(attr[0], "protocol") == 0) {
+                AvahiProtocol protocol;
+
+                if (strcmp(attr[1], "ipv4") == 0) {
+                    protocol = AVAHI_PROTO_INET;
+                } else if (strcmp(attr[1], "ipv6") == 0) {
+                    protocol = AVAHI_PROTO_INET6;
+                } else if (strcmp(attr[1], "any") == 0) {
+                    protocol = AVAHI_PROTO_UNSPEC;
+                } else {
+                    avahi_log_error("%s: parse failure: invalid protocol specification \"%s\".", u->group->filename, attr[1]);
+                    u->failed = 1;
+                    return;
+                }
+
+                u->service->protocol = protocol;
+            } else
+                goto invalid_attr;
+
+            if (attr[2])
+                goto invalid_attr;
+        }
+
+    } else if (u->current_tag == XML_TAG_SERVICE && strcmp(el, "type") == 0) {
+        if (attr[0])
+            goto invalid_attr;
+
+        u->current_tag = XML_TAG_TYPE;
+    } else if (u->current_tag == XML_TAG_SERVICE && strcmp(el, "subtype") == 0) {
+        if (attr[0])
+            goto invalid_attr;
+
+        u->current_tag = XML_TAG_SUBTYPE;
+    } else if (u->current_tag == XML_TAG_SERVICE && strcmp(el, "domain-name") == 0) {
+        if (attr[0])
+            goto invalid_attr;
+
+        u->current_tag = XML_TAG_DOMAIN_NAME;
+    } else if (u->current_tag == XML_TAG_SERVICE && strcmp(el, "host-name") == 0) {
+        if (attr[0])
+            goto invalid_attr;
+
+        u->current_tag = XML_TAG_HOST_NAME;
+    } else if (u->current_tag == XML_TAG_SERVICE && strcmp(el, "port") == 0) {
+        if (attr[0])
+            goto invalid_attr;
+
+        u->current_tag = XML_TAG_PORT;
+    } else if (u->current_tag == XML_TAG_SERVICE && strcmp(el, "txt-record") == 0) {
+        if (attr[0])
+            goto invalid_attr;
+
+        u->current_tag = XML_TAG_TXT_RECORD;
+    } else {
+        avahi_log_error("%s: parse failure: didn't expect element <%s>.", u->group->filename, el);
+        u->failed = 1;
+    }
+
+    return;
+
+invalid_attr:
+    avahi_log_error("%s: parse failure: invalid attribute for element <%s>.", u->group->filename, el);
+    u->failed = 1;
+    return;
+}
+
+static void XMLCALL xml_end(void *data, AVAHI_GCC_UNUSED const char *el) {
+    struct xml_userdata *u = data;
+    assert(u);
+
+    if (u->failed)
+        return;
+
+    switch (u->current_tag) {
+        case XML_TAG_SERVICE_GROUP:
+
+            if (!u->group->name || !u->group->services) {
+                avahi_log_error("%s: parse failure: service group incomplete.", u->group->filename);
+                u->failed = 1;
+                return;
+            }
+
+            u->current_tag = XML_TAG_INVALID;
+            break;
+
+        case XML_TAG_SERVICE:
+
+            if (!u->service->type) {
+                avahi_log_error("%s: parse failure: service incomplete.", u->group->filename);
+                u->failed = 1;
+                return;
+            }
+
+            u->service = NULL;
+            u->current_tag = XML_TAG_SERVICE_GROUP;
+            break;
+
+        case XML_TAG_NAME:
+            u->current_tag = XML_TAG_SERVICE_GROUP;
+            break;
+
+        case XML_TAG_PORT: {
+            int p;
+            assert(u->service);
+
+            p = u->buf ? atoi(u->buf) : 0;
+
+            if (p < 0 || p > 0xFFFF) {
+                avahi_log_error("%s: parse failure: invalid port specification \"%s\".", u->group->filename, u->buf);
+                u->failed = 1;
+                return;
+            }
+
+            u->service->port = (uint16_t) p;
+
+            u->current_tag = XML_TAG_SERVICE;
+            break;
+        }
+
+        case XML_TAG_TXT_RECORD: {
+            assert(u->service);
+
+            u->service->txt_records = avahi_string_list_add(u->service->txt_records, u->buf ? u->buf : "");
+            u->current_tag = XML_TAG_SERVICE;
+            break;
+        }
+
+        case XML_TAG_SUBTYPE: {
+            assert(u->service);
+
+            u->service->subtypes = avahi_string_list_add(u->service->subtypes, u->buf ? u->buf : "");
+            u->current_tag = XML_TAG_SERVICE;
+            break;
+        }
+
+        case XML_TAG_TYPE:
+        case XML_TAG_DOMAIN_NAME:
+        case XML_TAG_HOST_NAME:
+            u->current_tag = XML_TAG_SERVICE;
+            break;
+
+        case XML_TAG_INVALID:
+            ;
+    }
+
+    avahi_free(u->buf);
+    u->buf = NULL;
+}
+
+static char *append_cdata(char *t, const char *n, int length) {
+    char *r, *k;
+
+    if (!length)
+        return t;
+
+
+    k = avahi_strndup(n, length);
+
+    if (t) {
+        r = avahi_strdup_printf("%s%s", t, k);
+        avahi_free(k);
+        avahi_free(t);
+    } else
+        r = k;
+
+    return r;
+}
+
+static void XMLCALL xml_cdata(void *data, const XML_Char *s, int len) {
+    struct xml_userdata *u = data;
+    assert(u);
+
+    if (u->failed)
+        return;
+
+    switch (u->current_tag) {
+        case XML_TAG_NAME:
+            u->group->name = append_cdata(u->group->name, s, len);
+            break;
+
+        case XML_TAG_TYPE:
+            assert(u->service);
+            u->service->type = append_cdata(u->service->type, s, len);
+            break;
+
+        case XML_TAG_DOMAIN_NAME:
+            assert(u->service);
+            u->service->domain_name = append_cdata(u->service->domain_name, s, len);
+            break;
+
+        case XML_TAG_HOST_NAME:
+            assert(u->service);
+            u->service->host_name = append_cdata(u->service->host_name, s, len);
+            break;
+
+        case XML_TAG_PORT:
+        case XML_TAG_TXT_RECORD:
+        case XML_TAG_SUBTYPE:
+            assert(u->service);
+            u->buf = append_cdata(u->buf, s, len);
+            break;
+
+        case XML_TAG_SERVICE_GROUP:
+        case XML_TAG_SERVICE:
+        case XML_TAG_INVALID:
+            ;
+    }
+}
+
+static int static_service_group_load(StaticServiceGroup *g) {
+    XML_Parser parser = NULL;
+    int fd = -1;
+    struct xml_userdata u;
+    int r = -1;
+    struct stat st;
+    ssize_t n;
+
+    assert(g);
+
+    u.buf = NULL;
+    u.group = g;
+    u.service = NULL;
+    u.current_tag = XML_TAG_INVALID;
+    u.failed = 0;
+
+    /* Cleanup old data in this service group, if available */
+    remove_static_service_group_from_server(g);
+    while (g->services)
+        static_service_free(g->services);
+
+    avahi_free(g->name);
+    avahi_free(g->chosen_name);
+    g->name = g->chosen_name = NULL;
+    g->replace_wildcards = 0;
+
+    if (!(parser = XML_ParserCreate(NULL))) {
+        avahi_log_error("XML_ParserCreate() failed.");
+        goto finish;
+    }
+
+    if ((fd = open(g->filename, O_RDONLY)) < 0) {
+        avahi_log_error("open(\"%s\", O_RDONLY): %s", g->filename, strerror(errno));
+        goto finish;
+    }
+
+    if (fstat(fd, &st) < 0) {
+        avahi_log_error("fstat(): %s", strerror(errno));
+        goto finish;
+    }
+
+    g->mtime = st.st_mtime;
+
+    XML_SetUserData(parser, &u);
+
+    XML_SetElementHandler(parser, xml_start, xml_end);
+    XML_SetCharacterDataHandler(parser, xml_cdata);
+
+    do {
+        void *buffer;
+
+#define BUFSIZE (10*1024)
+
+        if (!(buffer = XML_GetBuffer(parser, BUFSIZE))) {
+            avahi_log_error("XML_GetBuffer() failed.");
+            goto finish;
+        }
+
+        if ((n = read(fd, buffer, BUFSIZE)) < 0) {
+            avahi_log_error("read(): %s\n", strerror(errno));
+            goto finish;
+        }
+
+        if (!XML_ParseBuffer(parser, n, n == 0)) {
+            avahi_log_error("XML_ParseBuffer() failed at line %d: %s.\n", (int) XML_GetCurrentLineNumber(parser), XML_ErrorString(XML_GetErrorCode(parser)));
+            goto finish;
+        }
+
+    } while (n != 0);
+
+    if (!u.failed)
+        r = 0;
+
+finish:
+
+    if (fd >= 0)
+        close(fd);
+
+    if (parser)
+        XML_ParserFree(parser);
+
+    avahi_free(u.buf);
+
+    return r;
+}
+
+static void load_file(char *n) {
+    StaticServiceGroup *g;
+    assert(n);
+
+    for (g = groups; g; g = g->groups_next)
+        if (strcmp(g->filename, n) == 0)
+            return;
+
+    avahi_log_info("Loading service file %s.", n);
+
+    g = static_service_group_new(n);
+    if (static_service_group_load(g) < 0) {
+        avahi_log_error("Failed to load service group file %s, ignoring.", g->filename);
+        static_service_group_free(g);
+    }
+}
+
+void static_service_load(int in_chroot) {
+    StaticServiceGroup *g, *n;
+    glob_t globbuf;
+    int globret;
+    char **p;
+
+    for (g = groups; g; g = n) {
+        struct stat st;
+
+        n = g->groups_next;
+
+        if (stat(g->filename, &st) < 0) {
+
+            if (errno == ENOENT)
+                avahi_log_info("Service group file %s vanished, removing services.", g->filename);
+            else
+                avahi_log_warn("Failed to stat() file %s, ignoring: %s", g->filename, strerror(errno));
+
+            static_service_group_free(g);
+        } else if (st.st_mtime != g->mtime) {
+            avahi_log_info("Service group file %s changed, reloading.", g->filename);
+
+            if (static_service_group_load(g) < 0) {
+                avahi_log_warn("Failed to load service group file %s, removing service.", g->filename);
+                static_service_group_free(g);
+            }
+        }
+    }
+
+    memset(&globbuf, 0, sizeof(globbuf));
+
+    if ((globret = glob(in_chroot ? "/services/*.service" : AVAHI_SERVICE_DIR "/*.service", GLOB_ERR, NULL, &globbuf)) != 0)
+
+        switch (globret) {
+#ifdef GLOB_NOSPACE
+	    case GLOB_NOSPACE:
+	        avahi_log_error("Not enough memory to read service directory "AVAHI_SERVICE_DIR".");
+	        break;
+#endif
+#ifdef GLOB_NOMATCH
+            case GLOB_NOMATCH:
+	        avahi_log_info("No service file found in "AVAHI_SERVICE_DIR".");
+	        break;
+#endif
+            default:
+	        avahi_log_error("Failed to read "AVAHI_SERVICE_DIR".");
+	        break;
+        }
+
+    else {
+        for (p = globbuf.gl_pathv; *p; p++)
+            load_file(*p);
+
+        globfree(&globbuf);
+    }
+}
+
+void static_service_free_all(void) {
+
+    while (groups)
+        static_service_group_free(groups);
+}
+
+void static_service_add_to_server(void) {
+    StaticServiceGroup *g;
+
+    for (g = groups; g; g = g->groups_next)
+        add_static_service_group_to_server(g);
+}
+
+void static_service_remove_from_server(void) {
+    StaticServiceGroup *g;
+
+    for (g = groups; g; g = g->groups_next)
+        remove_static_service_group_from_server(g);
+}
diff --git a/avahi-0.6.31/avahi-daemon/static-services.h b/avahi-0.6.31/avahi-daemon/static-services.h
new file mode 100644
index 0000000..62edc36
--- /dev/null
+++ b/avahi-0.6.31/avahi-daemon/static-services.h
@@ -0,0 +1,28 @@
+#ifndef foostaticserviceshfoo
+#define foostaticserviceshfoo
+
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+void static_service_load(int in_chroot);
+void static_service_free_all(void);
+void static_service_add_to_server(void);
+void static_service_remove_from_server(void);
+
+#endif
diff --git a/avahi-0.6.31/avahi-discover-standalone/Makefile.am b/avahi-0.6.31/avahi-discover-standalone/Makefile.am
new file mode 100644
index 0000000..3995c0a
--- /dev/null
+++ b/avahi-0.6.31/avahi-discover-standalone/Makefile.am
@@ -0,0 +1,69 @@
+# This file is part of avahi.
+#
+# avahi 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 of the
+# License, or (at your option) any later version.
+#
+# avahi 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 General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+AM_CFLAGS=-I$(top_srcdir)
+
+interfaces = \
+        avahi-discover.ui
+
+# This cool debug trap works on i386/gcc only
+AM_CFLAGS+='-DDEBUG_TRAP=__asm__("int $$3")'
+
+if HAVE_GTK2OR3
+if HAVE_GLIB
+bin_PROGRAMS = \
+	avahi-discover-standalone
+
+avahi_discover_standalone_SOURCES = \
+	main.c
+
+avahi_discover_standalone_CFLAGS = \
+	$(AM_CFLAGS) \
+	-DAVAHI_INTERFACES_DIR=\"$(interfacesdir)\"
+
+avahi_discover_standalone_LDADD = \
+	$(AM_LDADD) \
+	../avahi-common/libavahi-common.la \
+	../avahi-glib/libavahi-glib.la \
+	../avahi-core/libavahi-core.la
+
+if HAVE_GTK3
+avahi_discover_standalone_CFLAGS += \
+	$(GLIB30_CFLAGS) $(GTK30_CFLAGS)
+avahi_discover_standalone_LDADD += \
+	$(GLIB30_LIBS) $(GTK30_LIBS)
+else
+avahi_discover_standalone_CFLAGS += \
+	$(GLIB20_CFLAGS) $(GTK20_CFLAGS)
+avahi_discover_standalone_LDADD += \
+	$(GLIB20_LIBS) $(GTK20_LIBS)
+endif
+
+interfaces_DATA = $(interfaces)
+
+endif  # HAVE_GLIB
+else
+
+if HAVE_PYTHON_DBUS
+
+interfaces_DATA =
+
+endif
+endif
+
+EXTRA_DIST = \
+	$(interfaces)
diff --git a/avahi-0.6.31/avahi-discover-standalone/Makefile.in b/avahi-0.6.31/avahi-discover-standalone/Makefile.in
new file mode 100644
index 0000000..de5aa73
--- /dev/null
+++ b/avahi-0.6.31/avahi-discover-standalone/Makefile.in
@@ -0,0 +1,798 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# This file is part of avahi.
+#
+# avahi 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 of the
+# License, or (at your option) any later version.
+#
+# avahi 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 General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@HAVE_GLIB_TRUE@@HAVE_GTK2OR3_TRUE@bin_PROGRAMS = avahi-discover-standalone$(EXEEXT)
+@HAVE_GLIB_TRUE@@HAVE_GTK2OR3_TRUE@@HAVE_GTK3_TRUE@am__append_1 = \
+@HAVE_GLIB_TRUE@@HAVE_GTK2OR3_TRUE@@HAVE_GTK3_TRUE@	$(GLIB30_CFLAGS) $(GTK30_CFLAGS)
+
+@HAVE_GLIB_TRUE@@HAVE_GTK2OR3_TRUE@@HAVE_GTK3_TRUE@am__append_2 = \
+@HAVE_GLIB_TRUE@@HAVE_GTK2OR3_TRUE@@HAVE_GTK3_TRUE@	$(GLIB30_LIBS) $(GTK30_LIBS)
+
+@HAVE_GLIB_TRUE@@HAVE_GTK2OR3_TRUE@@HAVE_GTK3_FALSE@am__append_3 = \
+@HAVE_GLIB_TRUE@@HAVE_GTK2OR3_TRUE@@HAVE_GTK3_FALSE@	$(GLIB20_CFLAGS) $(GTK20_CFLAGS)
+
+@HAVE_GLIB_TRUE@@HAVE_GTK2OR3_TRUE@@HAVE_GTK3_FALSE@am__append_4 = \
+@HAVE_GLIB_TRUE@@HAVE_GTK2OR3_TRUE@@HAVE_GTK3_FALSE@	$(GLIB20_LIBS) $(GTK20_LIBS)
+
+subdir = avahi-discover-standalone
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/common/acx_pthread.m4 \
+	$(top_srcdir)/common/gcc_stack_protect.m4 \
+	$(top_srcdir)/common/gcc_visibility.m4 \
+	$(top_srcdir)/common/intltool.m4 \
+	$(top_srcdir)/common/introspection.m4 \
+	$(top_srcdir)/common/libtool.m4 \
+	$(top_srcdir)/common/ltoptions.m4 \
+	$(top_srcdir)/common/ltsugar.m4 \
+	$(top_srcdir)/common/ltversion.m4 \
+	$(top_srcdir)/common/lt~obsolete.m4 \
+	$(top_srcdir)/common/nls.m4 $(top_srcdir)/common/python.m4 \
+	$(top_srcdir)/acinclude.m4 $(top_srcdir)/common/doxygen.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(interfacesdir)"
+PROGRAMS = $(bin_PROGRAMS)
+am__avahi_discover_standalone_SOURCES_DIST = main.c
+@HAVE_GLIB_TRUE@@HAVE_GTK2OR3_TRUE@am_avahi_discover_standalone_OBJECTS = avahi_discover_standalone-main.$(OBJEXT)
+avahi_discover_standalone_OBJECTS =  \
+	$(am_avahi_discover_standalone_OBJECTS)
+am__DEPENDENCIES_1 =
+@HAVE_GLIB_TRUE@@HAVE_GTK2OR3_TRUE@@HAVE_GTK3_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
+@HAVE_GLIB_TRUE@@HAVE_GTK2OR3_TRUE@@HAVE_GTK3_FALSE@am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1) \
+@HAVE_GLIB_TRUE@@HAVE_GTK2OR3_TRUE@@HAVE_GTK3_FALSE@	$(am__DEPENDENCIES_1)
+@HAVE_GLIB_TRUE@@HAVE_GTK2OR3_TRUE@avahi_discover_standalone_DEPENDENCIES = ../avahi-common/libavahi-common.la \
+@HAVE_GLIB_TRUE@@HAVE_GTK2OR3_TRUE@	../avahi-glib/libavahi-glib.la \
+@HAVE_GLIB_TRUE@@HAVE_GTK2OR3_TRUE@	../avahi-core/libavahi-core.la \
+@HAVE_GLIB_TRUE@@HAVE_GTK2OR3_TRUE@	$(am__DEPENDENCIES_2) \
+@HAVE_GLIB_TRUE@@HAVE_GTK2OR3_TRUE@	$(am__DEPENDENCIES_3)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+avahi_discover_standalone_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(avahi_discover_standalone_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC    " $@;
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(avahi_discover_standalone_SOURCES)
+DIST_SOURCES = $(am__avahi_discover_standalone_SOURCES_DIST)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+DATA = $(interfaces_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AVAHI_AUTOIPD_GROUP = @AVAHI_AUTOIPD_GROUP@
+AVAHI_AUTOIPD_USER = @AVAHI_AUTOIPD_USER@
+AVAHI_GROUP = @AVAHI_GROUP@
+AVAHI_PRIV_ACCESS_GROUP = @AVAHI_PRIV_ACCESS_GROUP@
+AVAHI_USER = @AVAHI_USER@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
+DBUS_SYSTEM_BUS_DEFAULT_ADDRESS = @DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@
+DBUS_SYS_DIR = @DBUS_SYS_DIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+DX_CONFIG = @DX_CONFIG@
+DX_DOCDIR = @DX_DOCDIR@
+DX_DOT = @DX_DOT@
+DX_DOXYGEN = @DX_DOXYGEN@
+DX_DVIPS = @DX_DVIPS@
+DX_EGREP = @DX_EGREP@
+DX_ENV = @DX_ENV@
+DX_FLAG_chi = @DX_FLAG_chi@
+DX_FLAG_chm = @DX_FLAG_chm@
+DX_FLAG_doc = @DX_FLAG_doc@
+DX_FLAG_dot = @DX_FLAG_dot@
+DX_FLAG_html = @DX_FLAG_html@
+DX_FLAG_man = @DX_FLAG_man@
+DX_FLAG_pdf = @DX_FLAG_pdf@
+DX_FLAG_ps = @DX_FLAG_ps@
+DX_FLAG_rtf = @DX_FLAG_rtf@
+DX_FLAG_xml = @DX_FLAG_xml@
+DX_HHC = @DX_HHC@
+DX_LATEX = @DX_LATEX@
+DX_MAKEINDEX = @DX_MAKEINDEX@
+DX_PDFLATEX = @DX_PDFLATEX@
+DX_PERL = @DX_PERL@
+DX_PROJECT = @DX_PROJECT@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GACUTIL = @GACUTIL@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB20_CFLAGS = @GLIB20_CFLAGS@
+GLIB20_LIBS = @GLIB20_LIBS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GOBJECT_CFLAGS = @GOBJECT_CFLAGS@
+GOBJECT_LIBS = @GOBJECT_LIBS@
+GREP = @GREP@
+GTK20_CFLAGS = @GTK20_CFLAGS@
+GTK20_LIBS = @GTK20_LIBS@
+GTK30_CFLAGS = @GTK30_CFLAGS@
+GTK30_LIBS = @GTK30_LIBS@
+HOWL_COMPAT_VERSION = @HOWL_COMPAT_VERSION@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
+INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
+INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
+INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
+INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
+INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
+INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBAVAHI_CLIENT_VERSION_INFO = @LIBAVAHI_CLIENT_VERSION_INFO@
+LIBAVAHI_COMMON_VERSION_INFO = @LIBAVAHI_COMMON_VERSION_INFO@
+LIBAVAHI_COMPAT_HOWL_VERSION_INFO = @LIBAVAHI_COMPAT_HOWL_VERSION_INFO@
+LIBAVAHI_COMPAT_LIBDNS_SD_VERSION_INFO = @LIBAVAHI_COMPAT_LIBDNS_SD_VERSION_INFO@
+LIBAVAHI_CORE_VERSION_INFO = @LIBAVAHI_CORE_VERSION_INFO@
+LIBAVAHI_GLIB_VERSION_INFO = @LIBAVAHI_GLIB_VERSION_INFO@
+LIBAVAHI_GOBJECT_VERSION_INFO = @LIBAVAHI_GOBJECT_VERSION_INFO@
+LIBAVAHI_QT3_VERSION_INFO = @LIBAVAHI_QT3_VERSION_INFO@
+LIBAVAHI_QT4_VERSION_INFO = @LIBAVAHI_QT4_VERSION_INFO@
+LIBAVAHI_UI_VERSION_INFO = @LIBAVAHI_UI_VERSION_INFO@
+LIBDAEMON_CFLAGS = @LIBDAEMON_CFLAGS@
+LIBDAEMON_LIBS = @LIBDAEMON_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MCS = @MCS@
+MDASSEMBLER = @MDASSEMBLER@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MOC_QT3 = @MOC_QT3@
+MOC_QT4 = @MOC_QT4@
+MONODOCER = @MONODOCER@
+MONODOC_CFLAGS = @MONODOC_CFLAGS@
+MONODOC_DIR = @MONODOC_DIR@
+MONODOC_LIBS = @MONODOC_LIBS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+QT3_CFLAGS = @QT3_CFLAGS@
+QT3_LIBS = @QT3_LIBS@
+QT4_CFLAGS = @QT4_CFLAGS@
+QT4_LIBS = @QT4_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STOW = @STOW@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+VISIBILITY_HIDDEN_CFLAGS = @VISIBILITY_HIDDEN_CFLAGS@
+XGETTEXT = @XGETTEXT@
+XML_CFLAGS = @XML_CFLAGS@
+XML_LIBS = @XML_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+avahi_runtime_dir = @avahi_runtime_dir@
+avahi_socket = @avahi_socket@
+avahilocaledir = @avahilocaledir@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+have_pkg_config = @have_pkg_config@
+have_xmltoman = @have_xmltoman@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+interfacesdir = @interfacesdir@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+systemdsystemunitdir = @systemdsystemunitdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# This cool debug trap works on i386/gcc only
+AM_CFLAGS = -I$(top_srcdir) '-DDEBUG_TRAP=__asm__("int $$3")'
+interfaces = \
+        avahi-discover.ui
+
+@HAVE_GLIB_TRUE@@HAVE_GTK2OR3_TRUE@avahi_discover_standalone_SOURCES = \
+@HAVE_GLIB_TRUE@@HAVE_GTK2OR3_TRUE@	main.c
+
+@HAVE_GLIB_TRUE@@HAVE_GTK2OR3_TRUE@avahi_discover_standalone_CFLAGS =  \
+@HAVE_GLIB_TRUE@@HAVE_GTK2OR3_TRUE@	$(AM_CFLAGS) \
+@HAVE_GLIB_TRUE@@HAVE_GTK2OR3_TRUE@	-DAVAHI_INTERFACES_DIR=\"$(interfacesdir)\" \
+@HAVE_GLIB_TRUE@@HAVE_GTK2OR3_TRUE@	$(am__append_1) \
+@HAVE_GLIB_TRUE@@HAVE_GTK2OR3_TRUE@	$(am__append_3)
+@HAVE_GLIB_TRUE@@HAVE_GTK2OR3_TRUE@avahi_discover_standalone_LDADD =  \
+@HAVE_GLIB_TRUE@@HAVE_GTK2OR3_TRUE@	$(AM_LDADD) \
+@HAVE_GLIB_TRUE@@HAVE_GTK2OR3_TRUE@	../avahi-common/libavahi-common.la \
+@HAVE_GLIB_TRUE@@HAVE_GTK2OR3_TRUE@	../avahi-glib/libavahi-glib.la \
+@HAVE_GLIB_TRUE@@HAVE_GTK2OR3_TRUE@	../avahi-core/libavahi-core.la \
+@HAVE_GLIB_TRUE@@HAVE_GTK2OR3_TRUE@	$(am__append_2) \
+@HAVE_GLIB_TRUE@@HAVE_GTK2OR3_TRUE@	$(am__append_4)
+@HAVE_GLIB_TRUE@@HAVE_GTK2OR3_TRUE@interfaces_DATA = $(interfaces)
+@HAVE_GTK2OR3_FALSE@@HAVE_PYTHON_DBUS_TRUE@interfaces_DATA = 
+EXTRA_DIST = \
+	$(interfaces)
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign avahi-discover-standalone/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign avahi-discover-standalone/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+avahi-discover-standalone$(EXEEXT): $(avahi_discover_standalone_OBJECTS) $(avahi_discover_standalone_DEPENDENCIES) $(EXTRA_avahi_discover_standalone_DEPENDENCIES) 
+	@rm -f avahi-discover-standalone$(EXEEXT)
+	$(AM_V_CCLD)$(avahi_discover_standalone_LINK) $(avahi_discover_standalone_OBJECTS) $(avahi_discover_standalone_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avahi_discover_standalone-main.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+avahi_discover_standalone-main.o: main.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_discover_standalone_CFLAGS) $(CFLAGS) -MT avahi_discover_standalone-main.o -MD -MP -MF $(DEPDIR)/avahi_discover_standalone-main.Tpo -c -o avahi_discover_standalone-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_discover_standalone-main.Tpo $(DEPDIR)/avahi_discover_standalone-main.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='main.c' object='avahi_discover_standalone-main.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_discover_standalone_CFLAGS) $(CFLAGS) -c -o avahi_discover_standalone-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c
+
+avahi_discover_standalone-main.obj: main.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_discover_standalone_CFLAGS) $(CFLAGS) -MT avahi_discover_standalone-main.obj -MD -MP -MF $(DEPDIR)/avahi_discover_standalone-main.Tpo -c -o avahi_discover_standalone-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/avahi_discover_standalone-main.Tpo $(DEPDIR)/avahi_discover_standalone-main.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='main.c' object='avahi_discover_standalone-main.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_discover_standalone_CFLAGS) $(CFLAGS) -c -o avahi_discover_standalone-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+install-interfacesDATA: $(interfaces_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(interfacesdir)" || $(MKDIR_P) "$(DESTDIR)$(interfacesdir)"
+	@list='$(interfaces_DATA)'; test -n "$(interfacesdir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(interfacesdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(interfacesdir)" || exit $$?; \
+	done
+
+uninstall-interfacesDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(interfaces_DATA)'; test -n "$(interfacesdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(interfacesdir)'; $(am__uninstall_files_from_dir)
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(interfacesdir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-interfacesDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-interfacesDATA
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am \
+	install-interfacesDATA install-man install-pdf install-pdf-am \
+	install-ps install-ps-am install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-binPROGRAMS \
+	uninstall-interfacesDATA
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/avahi-0.6.31/avahi-discover-standalone/avahi-discover.ui b/avahi-0.6.31/avahi-discover-standalone/avahi-discover.ui
new file mode 100644
index 0000000..b4b72f9
--- /dev/null
+++ b/avahi-0.6.31/avahi-discover-standalone/avahi-discover.ui
@@ -0,0 +1,84 @@
+<?xml version="1.0"?>
+<!--*- mode: xml -*-->
+<interface>
+  <object class="GtkWindow" id="main_window">
+    <property name="visible">True</property>
+    <property name="title" translatable="yes">Avahi Discovery</property>
+    <property name="type">GTK_WINDOW_TOPLEVEL</property>
+    <property name="window_position">GTK_WIN_POS_NONE</property>
+    <property name="modal">False</property>
+    <property name="default_width">500</property>
+    <property name="default_height">400</property>
+    <property name="resizable">True</property>
+    <property name="destroy_with_parent">False</property>
+    <property name="decorated">True</property>
+    <property name="skip_taskbar_hint">False</property>
+    <property name="skip_pager_hint">False</property>
+    <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+    <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+    <property name="focus_on_map">True</property>
+    <signal after="False" handler="gtk_main_quit" name="destroy"/>
+    <child>
+      <object class="GtkVBox" id="vbox1">
+        <property name="border_width">12</property>
+        <property name="visible">True</property>
+        <property name="homogeneous">False</property>
+        <property name="spacing">12</property>
+        <child>
+          <object class="GtkScrolledWindow" id="scrolledwindow1">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+            <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+            <property name="shadow_type">GTK_SHADOW_IN</property>
+            <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+            <child>
+              <object class="GtkTreeView" id="tree_view">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="headers_visible">True</property>
+                <property name="rules_hint">False</property>
+                <property name="reorderable">False</property>
+                <property name="enable_search">True</property>
+                <property name="fixed_height_mode">False</property>
+                <property name="hover_selection">False</property>
+                <property name="hover_expand">False</property>
+                <signal handler="on_tree_view_cursor_changed" last_modification_time="Sat, 30 Jul 2005 21:39:13 GMT" name="cursor_changed"/>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="padding">0</property>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="info_label">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="label" translatable="yes">&lt;i&gt;No service currently selected.&lt;/i&gt;</property>
+            <property name="use_underline">False</property>
+            <property name="use_markup">True</property>
+            <property name="justify">GTK_JUSTIFY_LEFT</property>
+            <property name="wrap">False</property>
+            <property name="selectable">True</property>
+            <property name="xalign">0</property>
+            <property name="yalign">0.5</property>
+            <property name="xpad">0</property>
+            <property name="ypad">0</property>
+            <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+            <property name="width_chars">-1</property>
+            <property name="single_line_mode">False</property>
+            <property name="angle">0</property>
+          </object>
+          <packing>
+            <property name="padding">0</property>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/avahi-0.6.31/avahi-discover-standalone/main.c b/avahi-0.6.31/avahi-discover-standalone/main.c
new file mode 100644
index 0000000..2f000a4
--- /dev/null
+++ b/avahi-0.6.31/avahi-discover-standalone/main.c
@@ -0,0 +1,368 @@
+/***
+  This file is part of avahi.
+
+  avahi 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.
+
+  avahi 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 avahi; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <sys/ioctl.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <net/if.h>
+#include <unistd.h>
+
+#include <gtk/gtk.h>
+
+#include <avahi-core/core.h>
+#include <avahi-core/lookup.h>
+
+#include <avahi-common/strlst.h>
+#include <avahi-common/domain.h>
+#include <avahi-common/error.h>
+
+#include <avahi-glib/glib-watch.h>
+#include <avahi-glib/glib-malloc.h>
+
+struct ServiceType;
+
+struct Service {
+    struct ServiceType *service_type;
+    gchar *service_name;
+    gchar *domain_name;
+
+    AvahiIfIndex interface;
+    AvahiProtocol protocol;
+
+    GtkTreeRowReference *tree_ref;
+};
+
+struct ServiceType {
+    gchar *service_type;
+    AvahiSServiceBrowser *browser;
+
+    GList *services;
+    GtkTreeRowReference *tree_ref;
+};
+
+static GtkWidget *main_window = NULL;
+static GtkTreeView *tree_view = NULL;
+static GtkTreeStore *tree_store = NULL;
+static GtkLabel *info_label = NULL;
+static AvahiServer *server = NULL;
+static AvahiSServiceTypeBrowser *service_type_browser = NULL;
+static GHashTable *service_type_hash_table = NULL;
+static AvahiSServiceResolver *service_resolver = NULL;
+static struct Service *current_service = NULL;
+
+static struct Service *get_service(const gchar *service_type, const gchar *service_name, const gchar*domain_name, AvahiIfIndex interface, AvahiProtocol protocol) {
+    struct ServiceType *st;
+    GList *l;
+
+    if (!(st = g_hash_table_lookup(service_type_hash_table, service_type)))
+        return NULL;
+
+    for (l = st->services; l; l = l->next) {
+        struct Service *s = l->data;
+
+        if (s->interface == interface &&
+            s->protocol == protocol &&
+            avahi_domain_equal(s->service_name, service_name) &&
+            avahi_domain_equal(s->domain_name, domain_name))
+            return s;
+    }
+
+    return NULL;
+}
+
+static void free_service(struct Service *s) {
+    GtkTreeIter iter;
+    GtkTreePath *path;
+
+    if (current_service == s) {
+        current_service = NULL;
+
+        if (service_resolver) {
+            avahi_s_service_resolver_free(service_resolver);
+            service_resolver = NULL;
+        }
+
+        gtk_label_set_text(info_label, "<i>Service removed</i>");
+    }
+
+    s->service_type->services = g_list_remove(s->service_type->services, s);
+
+    if ((path = gtk_tree_row_reference_get_path(s->tree_ref))) {
+        gtk_tree_model_get_iter(GTK_TREE_MODEL(tree_store), &iter, path);
+        gtk_tree_path_free(path);
+    }
+
+    gtk_tree_store_remove(tree_store, &iter);
+
+    gtk_tree_row_reference_free(s->tree_ref);
+
+    g_free(s->service_name);
+    g_free(s->domain_name);
+    g_free(s);
+}
+
+static void service_browser_callback(
+    AVAHI_GCC_UNUSED AvahiSServiceBrowser *b,
+    AvahiIfIndex interface,
+    AvahiProtocol protocol,
+    AvahiBrowserEvent event,
+    const char *service_name,
+    const char *service_type,
+    const char *domain_name,
+    AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+    AVAHI_GCC_UNUSED void* userdata) {
+
+    if (event == AVAHI_BROWSER_NEW) {
+        struct Service *s;
+        GtkTreeIter iter, piter;
+        GtkTreePath *path, *ppath;
+        gchar iface[256];
+	char name[IF_NAMESIZE];
+
+        s = g_new(struct Service, 1);
+        s->service_name = g_strdup(service_name);
+        s->domain_name = g_strdup(domain_name);
+        s->interface = interface;
+        s->protocol = protocol;
+        s->service_type = g_hash_table_lookup(service_type_hash_table, service_type);
+        g_assert(s->service_type);
+
+        s->service_type->services = g_list_prepend(s->service_type->services, s);
+
+        ppath = gtk_tree_row_reference_get_path(s->service_type->tree_ref);
+        gtk_tree_model_get_iter(GTK_TREE_MODEL(tree_store), &piter, ppath);
+
+        snprintf(iface, sizeof(iface), "%s %s", if_indextoname(interface, name), avahi_proto_to_string(protocol));
+
+        gtk_tree_store_append(tree_store, &iter, &piter);
+        gtk_tree_store_set(tree_store, &iter, 0, s->service_name, 1, iface, 2, s, -1);
+
+        path = gtk_tree_model_get_path(GTK_TREE_MODEL(tree_store), &iter);
+        s->tree_ref = gtk_tree_row_reference_new(GTK_TREE_MODEL(tree_store), path);
+        gtk_tree_path_free(path);
+
+        gtk_tree_view_expand_row(tree_view, ppath, FALSE);
+        gtk_tree_path_free(ppath);
+
+
+    } else if (event == AVAHI_BROWSER_REMOVE) {
+        struct Service* s;
+
+        if ((s = get_service(service_type, service_name, domain_name, interface, protocol)))
+            free_service(s);
+    }
+}
+
+static void service_type_browser_callback(
+    AVAHI_GCC_UNUSED AvahiSServiceTypeBrowser *b,
+    AVAHI_GCC_UNUSED AvahiIfIndex interface,
+    AVAHI_GCC_UNUSED AvahiProtocol protocol,
+    AvahiBrowserEvent event,
+    const char *service_type,
+    const char *domain,
+    AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+    AVAHI_GCC_UNUSED void * userdata) {
+
+    struct ServiceType *st;
+    GtkTreePath *path;
+    GtkTreeIter iter;
+
+    if (event != AVAHI_BROWSER_NEW)
+        return;
+
+    if (g_hash_table_lookup(service_type_hash_table, service_type))
+        return;
+
+    st = g_new(struct ServiceType, 1);
+    st->service_type = g_strdup(service_type);
+    st->services = NULL;
+
+    gtk_tree_store_append(tree_store, &iter, NULL);
+    gtk_tree_store_set(tree_store, &iter, 0, st->service_type, 1, "", 2, NULL, -1);
+
+    path = gtk_tree_model_get_path(GTK_TREE_MODEL(tree_store), &iter);
+    st->tree_ref = gtk_tree_row_reference_new(GTK_TREE_MODEL(tree_store), path);
+    gtk_tree_path_free(path);
+
+    g_hash_table_insert(service_type_hash_table, st->service_type, st);
+
+    st->browser = avahi_s_service_browser_new(server, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, st->service_type, domain, 0, service_browser_callback, NULL);
+}
+
+static void update_label(struct Service *s, const gchar *hostname, const AvahiAddress *a, guint16 port, AvahiStringList *txt) {
+    gchar t[512], address[64], *txt_s;
+    char name[IF_NAMESIZE];
+
+    if (a && hostname) {
+        char na[AVAHI_ADDRESS_STR_MAX];
+        avahi_address_snprint(na, sizeof(na), a);
+        snprintf(address, sizeof(address), "%s/%s:%u", hostname, na, port);
+
+        if (txt)
+            txt_s = avahi_string_list_to_string(txt);
+        else
+            txt_s = g_strdup("<i>empty</i>");
+    } else {
+        snprintf(address, sizeof(address), "<i>n/a</i>");
+        txt_s = g_strdup("<i>n/a</i>");
+    }
+
+    snprintf(t, sizeof(t),
+             "<b>Service Type:</b> %s\n"
+             "<b>Service Name:</b> %s\n"
+             "<b>Domain Name:</b> %s\n"
+             "<b>Interface:</b> %s %s\n"
+             "<b>Address:</b> %s\n"
+             "<b>TXT Data:</b> %s",
+             s->service_type->service_type,
+             s->service_name,
+             s->domain_name,
+             if_indextoname(s->interface,name), avahi_proto_to_string(s->protocol),
+             address,
+             txt_s);
+
+    gtk_label_set_markup(info_label, t);
+
+    g_free(txt_s);
+}
+
+static struct Service *get_service_on_cursor(void) {
+    GtkTreePath *path;
+    struct Service *s;
+    GtkTreeIter iter;
+
+    gtk_tree_view_get_cursor(tree_view, &path, NULL);
+
+    if (!path)
+        return NULL;
+
+    gtk_tree_model_get_iter(GTK_TREE_MODEL(tree_store), &iter, path);
+    gtk_tree_model_get(GTK_TREE_MODEL(tree_store), &iter, 2, &s, -1);
+    gtk_tree_path_free(path);
+
+    return s;
+}
+
+static void service_resolver_callback(
+    AvahiSServiceResolver *r,
+    AVAHI_GCC_UNUSED AvahiIfIndex interface,
+    AVAHI_GCC_UNUSED AvahiProtocol protocol,
+    AvahiResolverEvent event,
+    AVAHI_GCC_UNUSED const char *name,
+    AVAHI_GCC_UNUSED const char *type,
+    AVAHI_GCC_UNUSED const char *domain,
+    const char *host_name,
+    const AvahiAddress *a,
+    uint16_t port,
+    AvahiStringList *txt,
+    AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+    void* userdata) {
+
+    struct Service *s;
+    g_assert(r);
+
+    if (!(s = get_service_on_cursor()) || userdata != s) {
+        g_assert(r == service_resolver);
+        avahi_s_service_resolver_free(service_resolver);
+        service_resolver = NULL;
+        return;
+    }
+
+    if (event == AVAHI_RESOLVER_FAILURE) {
+        char t[256];
+        snprintf(t, sizeof(t), "<i>Failed to resolve: %s.</i>", avahi_strerror(avahi_server_errno(server)));
+        gtk_label_set_markup(info_label, t);
+    } else if (event == AVAHI_RESOLVER_FOUND)
+        update_label(s, host_name, a, port, txt);
+}
+
+static void tree_view_on_cursor_changed(AVAHI_GCC_UNUSED GtkTreeView *tv, AVAHI_GCC_UNUSED gpointer userdata) {
+    struct Service *s;
+
+    if (!(s = get_service_on_cursor()))
+        return;
+
+    if (service_resolver)
+        avahi_s_service_resolver_free(service_resolver);
+
+    update_label(s, NULL, NULL, 0, NULL);
+
+    service_resolver = avahi_s_service_resolver_new(server, s->interface, s->protocol, s->service_name, s->service_type->service_type, s->domain_name, AVAHI_PROTO_UNSPEC, 0, service_resolver_callback, s);
+}
+
+static gboolean main_window_on_delete_event(AVAHI_GCC_UNUSED GtkWidget *widget, AVAHI_GCC_UNUSED GdkEvent *event, AVAHI_GCC_UNUSED gpointer user_data) {
+    gtk_main_quit();
+    return FALSE;
+}
+
+int main(int argc, char *argv[]) {
+    GtkBuilder *ui;
+    AvahiServerConfig config;
+    GtkTreeViewColumn *c;
+    gint error;
+    AvahiGLibPoll *poll_api;
+
+    gtk_init(&argc, &argv);
+
+    avahi_set_allocator(avahi_glib_allocator());
+
+    poll_api = avahi_glib_poll_new(NULL, G_PRIORITY_DEFAULT);
+
+    ui = gtk_builder_new();
+    gtk_builder_add_from_file(ui, AVAHI_INTERFACES_DIR"avahi-discover.ui", NULL);
+    main_window = GTK_WIDGET(gtk_builder_get_object(ui, "main_window"));
+    g_signal_connect(main_window, "delete-event", (GCallback) main_window_on_delete_event, NULL);
+
+    tree_view = GTK_TREE_VIEW(gtk_builder_get_object(ui, "tree_view"));
+    g_signal_connect(GTK_WIDGET(tree_view), "cursor-changed", (GCallback) tree_view_on_cursor_changed, NULL);
+
+    info_label = GTK_LABEL(gtk_builder_get_object(ui, "info_label"));
+
+    tree_store = gtk_tree_store_new(3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER);
+    gtk_tree_view_set_model(tree_view, GTK_TREE_MODEL(tree_store));
+    gtk_tree_view_insert_column_with_attributes(tree_view, -1, "Name", gtk_cell_renderer_text_new(), "text", 0, NULL);
+    gtk_tree_view_insert_column_with_attributes(tree_view, -1, "Interface", gtk_cell_renderer_text_new(), "text", 1, NULL);
+
+    gtk_tree_view_column_set_resizable(c = gtk_tree_view_get_column(tree_view, 0), TRUE);
+    gtk_tree_view_column_set_sizing(c, GTK_TREE_VIEW_COLUMN_GROW_ONLY);
+    gtk_tree_view_column_set_expand(c, TRUE);
+
+    service_type_hash_table = g_hash_table_new((GHashFunc) avahi_domain_hash, (GEqualFunc) avahi_domain_equal);
+
+    avahi_server_config_init(&config);
+    config.publish_hinfo = config.publish_addresses = config.publish_domain = config.publish_workstation = FALSE;
+    server = avahi_server_new(avahi_glib_poll_get(poll_api), &config, NULL, NULL, &error);
+    avahi_server_config_free(&config);
+
+    g_assert(server);
+
+    service_type_browser = avahi_s_service_type_browser_new(server, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, argc >= 2 ? argv[1] : NULL, 0, service_type_browser_callback, NULL);
+
+    gtk_main();
+
+    avahi_server_free(server);
+    avahi_glib_poll_free(poll_api);
+
+    return 0;
+}
diff --git a/avahi-0.6.31/avahi-dnsconfd/Makefile.am b/avahi-0.6.31/avahi-dnsconfd/Makefile.am
new file mode 100644
index 0000000..4e74429
--- /dev/null
+++ b/avahi-0.6.31/avahi-dnsconfd/Makefile.am
@@ -0,0 +1,53 @@
+# This file is part of avahi.
+#
+# avahi 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 of the
+# License, or (at your option) any later version.
+#
+# avahi 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 General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+EXTRA_DIST=avahi-dnsconfd.action avahi-dnsconfd.service.in
+
+if HAVE_XML
+if HAVE_LIBDAEMON
+
+pkgsysconfdir=$(sysconfdir)/avahi
+
+AM_CFLAGS= \
+	-I$(top_srcdir) \
+	-DAVAHI_RUNTIME_DIR=\"$(avahi_runtime_dir)/\" \
+	-DAVAHI_SOCKET=\"$(avahi_socket)\" \
+	-DAVAHI_DNSCONF_SCRIPT=\"$(pkgsysconfdir)/avahi-dnsconfd.action\"
+
+# This cool debug trap works on i386/gcc only
+AM_CFLAGS+='-DDEBUG_TRAP=__asm__("int $$3")'
+
+sbin_PROGRAMS = avahi-dnsconfd
+
+avahi_dnsconfd_SOURCES = main.c
+avahi_dnsconfd_CFLAGS = $(AM_CFLAGS) $(LIBDAEMON_CFLAGS)
+avahi_dnsconfd_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la $(LIBDAEMON_LIBS)
+
+pkgsysconf_SCRIPTS=avahi-dnsconfd.action
+
+%.service: %.service.in
+	$(AM_V_GEN)sed -e 's,@sbindir\@,$(sbindir),g' $< > $@
+
+if HAVE_SYSTEMD
+systemdsystemunit_DATA = \
+	avahi-dnsconfd.service
+endif
+
+CLEANFILES = $(systemdsystemunit_DATA)
+
+endif
+endif
diff --git a/avahi-0.6.31/avahi-dnsconfd/Makefile.in b/avahi-0.6.31/avahi-dnsconfd/Makefile.in
new file mode 100644
index 0000000..756abe7
--- /dev/null
+++ b/avahi-0.6.31/avahi-dnsconfd/Makefile.in
@@ -0,0 +1,815 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# This file is part of avahi.
+#
+# avahi 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 of the
+# License, or (at your option) any later version.
+#
+# avahi 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 General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@sbin_PROGRAMS =  \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	avahi-dnsconfd$(EXEEXT)
+subdir = avahi-dnsconfd
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/common/acx_pthread.m4 \
+	$(top_srcdir)/common/gcc_stack_protect.m4 \
+	$(top_srcdir)/common/gcc_visibility.m4 \
+	$(top_srcdir)/common/intltool.m4 \
+	$(top_srcdir)/common/introspection.m4 \
+	$(top_srcdir)/common/libtool.m4 \
+	$(top_srcdir)/common/ltoptions.m4 \
+	$(top_srcdir)/common/ltsugar.m4 \
+	$(top_srcdir)/common/ltversion.m4 \
+	$(top_srcdir)/common/lt~obsolete.m4 \
+	$(top_srcdir)/common/nls.m4 $(top_srcdir)/common/python.m4 \
+	$(top_srcdir)/acinclude.m4 $(top_srcdir)/common/doxygen.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(pkgsysconfdir)" \
+	"$(DESTDIR)$(systemdsystemunitdir)"
+PROGRAMS = $(sbin_PROGRAMS)
+am__avahi_dnsconfd_SOURCES_DIST = main.c
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@am_avahi_dnsconfd_OBJECTS = avahi_dnsconfd-main.$(OBJEXT)
+avahi_dnsconfd_OBJECTS = $(am_avahi_dnsconfd_OBJECTS)
+am__DEPENDENCIES_1 =
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@avahi_dnsconfd_DEPENDENCIES = ../avahi-common/libavahi-common.la \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	$(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+avahi_dnsconfd_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(avahi_dnsconfd_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \
+	$@
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+SCRIPTS = $(pkgsysconf_SCRIPTS)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC    " $@;
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(avahi_dnsconfd_SOURCES)
+DIST_SOURCES = $(am__avahi_dnsconfd_SOURCES_DIST)
+DATA = $(systemdsystemunit_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AVAHI_AUTOIPD_GROUP = @AVAHI_AUTOIPD_GROUP@
+AVAHI_AUTOIPD_USER = @AVAHI_AUTOIPD_USER@
+AVAHI_GROUP = @AVAHI_GROUP@
+AVAHI_PRIV_ACCESS_GROUP = @AVAHI_PRIV_ACCESS_GROUP@
+AVAHI_USER = @AVAHI_USER@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
+DBUS_SYSTEM_BUS_DEFAULT_ADDRESS = @DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@
+DBUS_SYS_DIR = @DBUS_SYS_DIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+DX_CONFIG = @DX_CONFIG@
+DX_DOCDIR = @DX_DOCDIR@
+DX_DOT = @DX_DOT@
+DX_DOXYGEN = @DX_DOXYGEN@
+DX_DVIPS = @DX_DVIPS@
+DX_EGREP = @DX_EGREP@
+DX_ENV = @DX_ENV@
+DX_FLAG_chi = @DX_FLAG_chi@
+DX_FLAG_chm = @DX_FLAG_chm@
+DX_FLAG_doc = @DX_FLAG_doc@
+DX_FLAG_dot = @DX_FLAG_dot@
+DX_FLAG_html = @DX_FLAG_html@
+DX_FLAG_man = @DX_FLAG_man@
+DX_FLAG_pdf = @DX_FLAG_pdf@
+DX_FLAG_ps = @DX_FLAG_ps@
+DX_FLAG_rtf = @DX_FLAG_rtf@
+DX_FLAG_xml = @DX_FLAG_xml@
+DX_HHC = @DX_HHC@
+DX_LATEX = @DX_LATEX@
+DX_MAKEINDEX = @DX_MAKEINDEX@
+DX_PDFLATEX = @DX_PDFLATEX@
+DX_PERL = @DX_PERL@
+DX_PROJECT = @DX_PROJECT@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GACUTIL = @GACUTIL@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB20_CFLAGS = @GLIB20_CFLAGS@
+GLIB20_LIBS = @GLIB20_LIBS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GOBJECT_CFLAGS = @GOBJECT_CFLAGS@
+GOBJECT_LIBS = @GOBJECT_LIBS@
+GREP = @GREP@
+GTK20_CFLAGS = @GTK20_CFLAGS@
+GTK20_LIBS = @GTK20_LIBS@
+GTK30_CFLAGS = @GTK30_CFLAGS@
+GTK30_LIBS = @GTK30_LIBS@
+HOWL_COMPAT_VERSION = @HOWL_COMPAT_VERSION@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
+INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
+INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
+INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
+INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
+INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
+INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
+INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBAVAHI_CLIENT_VERSION_INFO = @LIBAVAHI_CLIENT_VERSION_INFO@
+LIBAVAHI_COMMON_VERSION_INFO = @LIBAVAHI_COMMON_VERSION_INFO@
+LIBAVAHI_COMPAT_HOWL_VERSION_INFO = @LIBAVAHI_COMPAT_HOWL_VERSION_INFO@
+LIBAVAHI_COMPAT_LIBDNS_SD_VERSION_INFO = @LIBAVAHI_COMPAT_LIBDNS_SD_VERSION_INFO@
+LIBAVAHI_CORE_VERSION_INFO = @LIBAVAHI_CORE_VERSION_INFO@
+LIBAVAHI_GLIB_VERSION_INFO = @LIBAVAHI_GLIB_VERSION_INFO@
+LIBAVAHI_GOBJECT_VERSION_INFO = @LIBAVAHI_GOBJECT_VERSION_INFO@
+LIBAVAHI_QT3_VERSION_INFO = @LIBAVAHI_QT3_VERSION_INFO@
+LIBAVAHI_QT4_VERSION_INFO = @LIBAVAHI_QT4_VERSION_INFO@
+LIBAVAHI_UI_VERSION_INFO = @LIBAVAHI_UI_VERSION_INFO@
+LIBDAEMON_CFLAGS = @LIBDAEMON_CFLAGS@
+LIBDAEMON_LIBS = @LIBDAEMON_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MCS = @MCS@
+MDASSEMBLER = @MDASSEMBLER@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MOC_QT3 = @MOC_QT3@
+MOC_QT4 = @MOC_QT4@
+MONODOCER = @MONODOCER@
+MONODOC_CFLAGS = @MONODOC_CFLAGS@
+MONODOC_DIR = @MONODOC_DIR@
+MONODOC_LIBS = @MONODOC_LIBS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+QT3_CFLAGS = @QT3_CFLAGS@
+QT3_LIBS = @QT3_LIBS@
+QT4_CFLAGS = @QT4_CFLAGS@
+QT4_LIBS = @QT4_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STOW = @STOW@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+VISIBILITY_HIDDEN_CFLAGS = @VISIBILITY_HIDDEN_CFLAGS@
+XGETTEXT = @XGETTEXT@
+XML_CFLAGS = @XML_CFLAGS@
+XML_LIBS = @XML_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+avahi_runtime_dir = @avahi_runtime_dir@
+avahi_socket = @avahi_socket@
+avahilocaledir = @avahilocaledir@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+have_pkg_config = @have_pkg_config@
+have_xmltoman = @have_xmltoman@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+interfacesdir = @interfacesdir@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+systemdsystemunitdir = @systemdsystemunitdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+EXTRA_DIST = avahi-dnsconfd.action avahi-dnsconfd.service.in
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@pkgsysconfdir = $(sysconfdir)/avahi
+
+# This cool debug trap works on i386/gcc only
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@AM_CFLAGS = -I$(top_srcdir) \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	-DAVAHI_RUNTIME_DIR=\"$(avahi_runtime_dir)/\" \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	-DAVAHI_SOCKET=\"$(avahi_socket)\" \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	-DAVAHI_DNSCONF_SCRIPT=\"$(pkgsysconfdir)/avahi-dnsconfd.action\" \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	'-DDEBUG_TRAP=__asm__("int \
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@	$$3")'
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@avahi_dnsconfd_SOURCES = main.c
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@avahi_dnsconfd_CFLAGS = $(AM_CFLAGS) $(LIBDAEMON_CFLAGS)
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@avahi_dnsconfd_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la $(LIBDAEMON_LIBS)
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@pkgsysconf_SCRIPTS = avahi-dnsconfd.action
+@HAVE_LIBDAEMON_TRUE@@HAVE_SYSTEMD_TRUE@@HAVE_XML_TRUE@systemdsystemunit_DATA = \
+@HAVE_LIBDAEMON_TRUE@@HAVE_SYSTEMD_TRUE@@HAVE_XML_TRUE@	avahi-dnsconfd.service
+
+@HAVE_LIBDAEMON_TRUE@@HAVE_XML_TRUE@CLEANFILES = $(systemdsystemunit_DATA)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign avahi-dnsconfd/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign avahi-dnsconfd/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-sbinPROGRAMS: $(sbin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
+	@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-sbinPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(sbindir)" && rm -f $$files
+
+clean-sbinPROGRAMS:
+	@list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+avahi-dnsconfd$(EXEEXT): $(avahi_dnsconfd_OBJECTS) $(avahi_dnsconfd_DEPENDENCIES) $(EXTRA_avahi_dnsconfd_DEPENDENCIES) 
+	@rm -f avahi-dnsconfd$(EXEEXT)
+	$(AM_V_CCLD)$(avahi_dnsconfd_LINK) $(avahi_dnsconfd_OBJECTS) $(avahi_dnsconfd_LDADD) $(LIBS)
+install-pkgsysconfSCRIPTS: $(pkgsysconf_SCRIPTS)
+	@$(NORMAL_INSTALL)
+	test -z "$(pkgsysconfdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgsysconfdir)"
+	@list='$(pkgsysconf_SCRIPTS)'; test -n "$(pkgsysconfdir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n' \
+	    -e 'h;s|.*|.|' \
+	    -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+	      if (++n[d] == $(am__install_max)) { \
+		print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+	    else { print "f", d "/" $$4, $$1 } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	     if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	     test -z "$$files" || { \
+	       echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(pkgsysconfdir)$$dir'"; \
+	       $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(pkgsysconfdir)$$dir" || exit $$?; \
+	     } \
+	; done
+
+uninstall-pkgsysconfSCRIPTS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(pkgsysconf_SCRIPTS)'; test -n "$(pkgsysconfdir)" || exit 0; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	       sed -e 's,.*/,,;$(transform)'`; \
+	dir='$(DESTDIR)$(pkgsysconfdir)'; $(am__uninstall_files_from_dir)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avahi_dnsconfd-main.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+avahi_dnsconfd-main.o: main.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(avahi_dnsconfd_CFLAGS) $(CFLAGS) -MT avahi_dnsconfd-main.o -MD -MP -MF $(DEPDIR)/avahi_dnsconfd-m