Multicast DNS ("Bonjour") support, based on Apple's mDNSResponder.

This commit is contained in:
tsarna 2009-09-29 23:56:26 +00:00
parent e533051d0f
commit a8bcd3b5c3
38 changed files with 276 additions and 45 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: mi,v 1.830 2009/09/17 07:40:44 mrg Exp $
# $NetBSD: mi,v 1.831 2009/09/29 23:56:26 tsarna Exp $
#
# Note: Don't delete entries from here - mark them as "obsolete" instead,
# unless otherwise stated below.
@ -472,6 +472,7 @@
./usr/bin/md2 base-util-bin
./usr/bin/md4 base-util-bin
./usr/bin/md5 base-util-bin
./usr/bin/dns-sd base-mdns-bin mdns
./usr/bin/merge base-util-bin
./usr/bin/mesg base-util-bin
./usr/bin/midiplay base-audio-bin
@ -1119,6 +1120,7 @@
./usr/sbin/map-mbone base-netutil-bin
./usr/sbin/mbrlabel base-obsolete obsolete
./usr/sbin/mdconfig base-sysutil-bin
./usr/sbin/mdnsd base-mdns-bin mdns
./usr/sbin/mdsetimage base-sysutil-bin binutils
./usr/sbin/mk-amd-map base-amd-bin
./usr/sbin/mkalias base-nis-bin yp

View File

@ -1,4 +1,4 @@
# $NetBSD: shl.elf,v 1.185 2009/09/08 20:34:47 pooka Exp $
# $NetBSD: shl.elf,v 1.186 2009/09/29 23:56:26 tsarna Exp $
#
# Note: Do not mark "old" major and major.minor shared libraries as
# "obsolete"; just remove the entry, as third-party applications
@ -121,6 +121,8 @@
./usr/lib/libdevmapper.so.1 base-lvm-shlib lvm
./usr/lib/libdns.so base-bind-shlib
./usr/lib/libdns.so.4 base-bind-shlib
./usr/lib/libdns_sd.so base-mdns-shlib mdns
./usr/lib/libdns_sd.so.1 base-mdns-shlib mdns
./usr/lib/libedit.so base-sys-shlib
./usr/lib/libedit.so.3 base-sys-shlib
./usr/lib/libevent.so base-sys-shlib

View File

@ -1,4 +1,4 @@
# $NetBSD: shl.mi,v 1.491 2009/09/08 20:34:47 pooka Exp $
# $NetBSD: shl.mi,v 1.492 2009/09/29 23:56:26 tsarna Exp $
#
# Note: Don't delete entries from here - mark them as "obsolete" instead,
# unless otherwise stated below.
@ -69,6 +69,7 @@
./usr/lib/libdes.so.8.1 base-crypto-shlib crypto
./usr/lib/libdevmapper.so.1.0 base-lvm-shlib lvm
./usr/lib/libdns.so.4.0 base-bind-shlib
./usr/lib/libdns_sd.so.1.0 base-mdns-shlib mdns
./usr/lib/libedit.so.3.0 base-sys-shlib
./usr/lib/libevent.so.3.1 base-sys-shlib
./usr/lib/libfetch.so.3.0 base-sys-shlib

View File

@ -1,4 +1,4 @@
# $NetBSD: mi,v 1.1313 2009/09/23 09:18:31 njoly Exp $
# $NetBSD: mi,v 1.1314 2009/09/29 23:56:26 tsarna Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@ -609,6 +609,7 @@
./usr/include/dirent.h comp-c-include
./usr/include/disktab.h comp-c-include
./usr/include/dlfcn.h comp-c-include
./usr/include/dns_sd.h comp-mdns-include mdns
./usr/include/elf.h comp-c-include
./usr/include/err.h comp-c-include
./usr/include/errno.h comp-c-include
@ -2349,6 +2350,9 @@
./usr/lib/libdns.a comp-bind-lib
./usr/lib/libdns_g.a -unknown- debuglib
./usr/lib/libdns_p.a comp-bind-proflib profile
./usr/lib/libdns_sd.a comp-mdns-lib mdns
./usr/lib/libdns_sd_g.a -unknown- debuglib,mdns
./usr/lib/libdns_sd_p.a comp-mdns-proflib profile,mdns
./usr/lib/libedit.a comp-c-lib
./usr/lib/libedit_g.a -unknown- debuglib
./usr/lib/libedit_p.a comp-c-proflib profile
@ -3594,6 +3598,7 @@
./usr/libdata/lint/llib-lcurses.ln comp-c-lintlib lint
./usr/libdata/lint/llib-ldes.ln comp-c-lintlib lint,crypto
./usr/libdata/lint/llib-ldns.ln comp-bind-lintlib lint
./usr/libdata/lint/llib-ldns_sd.ln comp-mdns-lintlib lint,mdns
./usr/libdata/lint/llib-ledit.ln comp-c-lintlib lint
./usr/libdata/lint/llib-lfetch.ln comp-c-lintlib lint
./usr/libdata/lint/llib-lform.ln comp-c-lintlib lint

View File

@ -1,4 +1,4 @@
# $NetBSD: shl.mi,v 1.88 2009/09/08 20:34:48 pooka Exp $
# $NetBSD: shl.mi,v 1.89 2009/09/29 23:56:26 tsarna Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@ -22,6 +22,7 @@
./usr/lib/libdes_pic.a comp-c-piclib crypto
./usr/lib/libdevmapper_pic.a comp-lvm-piclib lvm
./usr/lib/libdns_pic.a comp-bind-piclib
./usr/lib/libdns_sd_pic.a comp-mdns-piclib mdns
./usr/lib/libedit_pic.a comp-c-piclib
./usr/lib/libevent_pic.a comp-c-piclib
./usr/lib/libfetch_pic.a comp-c-piclib

View File

@ -1,4 +1,4 @@
# $NetBSD: mi,v 1.212 2009/07/25 16:22:59 mbalmer Exp $
# $NetBSD: mi,v 1.213 2009/09/29 23:56:26 tsarna Exp $
#
# Note: end-user configuration files that are moved to another location
# should not be marked "obsolete"; they should just be removed from
@ -218,6 +218,7 @@
./etc/rc.d/local etc-sys-rc
./etc/rc.d/lpd etc-lpr-rc
./etc/rc.d/lvm etc-sys-rc
./etc/rc.d/mdnsd etc-mdns-rc
./etc/rc.d/mixerctl etc-audio-rc
./etc/rc.d/mopd etc-bootserver-rc
./etc/rc.d/motd etc-sys-rc

View File

@ -1,4 +1,4 @@
# $NetBSD: mi,v 1.1158 2009/09/14 10:36:49 degroote Exp $
# $NetBSD: mi,v 1.1159 2009/09/29 23:56:27 tsarna Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@ -127,6 +127,7 @@
./usr/share/man/cat1/dig.0 man-netutil-catman .cat
./usr/share/man/cat1/dirname.0 man-util-catman .cat
./usr/share/man/cat1/dirs.0 man-util-catman .cat
./usr/share/man/cat1/dns-sd.0 man-mdns-catman mdns,.cat
./usr/share/man/cat1/dnskeygen.0 man-obsolete obsolete
./usr/share/man/cat1/dnsquery.0 man-obsolete obsolete
./usr/share/man/cat1/domainname.0 man-nis-catman .cat
@ -2262,6 +2263,7 @@
./usr/share/man/cat8/mbr.0 man-obsolete obsolete
./usr/share/man/cat8/mbrlabel.0 man-sysutil-catman .cat
./usr/share/man/cat8/mdconfig.0 man-sysutil-catman .cat
./usr/share/man/cat8/mdnsd.0 man-mdns-catman mdns,.cat
./usr/share/man/cat8/mdsetimage.0 man-sysutil-catman binutils,.cat
./usr/share/man/cat8/mfs.0 man-sys-catman .cat
./usr/share/man/cat8/mipsco/MAKEDEV.0 man-obsolete obsolete
@ -2825,6 +2827,7 @@
./usr/share/man/html1/dig.html man-netutil-htmlman html
./usr/share/man/html1/dirname.html man-util-htmlman html
./usr/share/man/html1/dirs.html man-util-htmlman html
./usr/share/man/html1/dns-sd.html man-mdns-htmlman mdns,html
./usr/share/man/html1/domainname.html man-nis-htmlman html
./usr/share/man/html1/download-vulnerability-list.html man-obsolete obsolete
./usr/share/man/html1/dtmfdecode.html man-isdn-htmlman html
@ -4682,6 +4685,7 @@
./usr/share/man/html8/master.html man-postfix-htmlman postfix,html
./usr/share/man/html8/mbrlabel.html man-sysutil-htmlman html
./usr/share/man/html8/mdconfig.html man-sysutil-htmlman html
./usr/share/man/html8/mdnsd.html man-mdns-htmlman mdns,html
./usr/share/man/html8/mdsetimage.html man-sysutil-htmlman binutils,html
./usr/share/man/html8/mfs.html man-sys-htmlman html
./usr/share/man/html8/mk-amd-map.html man-amd-htmlman html
@ -5139,6 +5143,7 @@
./usr/share/man/man1/dig.1 man-netutil-man .man
./usr/share/man/man1/dirname.1 man-util-man .man
./usr/share/man/man1/dirs.1 man-util-man .man
./usr/share/man/man1/dns-sd.1 man-mdns-man mdns,.man
./usr/share/man/man1/dnskeygen.1 man-obsolete obsolete
./usr/share/man/man1/dnsquery.1 man-obsolete obsolete
./usr/share/man/man1/domainname.1 man-nis-man .man
@ -7274,6 +7279,7 @@
./usr/share/man/man8/mbr.8 man-obsolete obsolete
./usr/share/man/man8/mbrlabel.8 man-sysutil-man .man
./usr/share/man/man8/mdconfig.8 man-sysutil-man .man
./usr/share/man/man8/mdnsd.8 man-mdns-man mdns,.man
./usr/share/man/man8/mdsetimage.8 man-sysutil-man binutils,.man
./usr/share/man/man8/mfs.8 man-sys-man .man
./usr/share/man/man8/mipsco/MAKEDEV.8 man-obsolete obsolete

View File

@ -1,4 +1,4 @@
# $NetBSD: sets.subr,v 1.87 2009/09/08 07:08:00 skrll Exp $
# $NetBSD: sets.subr,v 1.88 2009/09/29 23:56:26 tsarna Exp $
#
#
@ -53,6 +53,7 @@ MKVARS="\
MKMAN \
MKMANPAGES \
MKMANZ \
MKMDNS \
MKNLS \
MKNVI \
MKPAM \
@ -235,7 +236,7 @@ SUBST="${SUBST};s#@MACHINE@#${MACHINE}#g"
# In each file, a record consists of a path and a System Package name,
# separated by whitespace. E.g.,
#
# # $NetBSD: sets.subr,v 1.87 2009/09/08 07:08:00 skrll Exp $
# # $NetBSD: sets.subr,v 1.88 2009/09/29 23:56:26 tsarna Exp $
# . base-sys-root [keyword[,...]]
# ./altroot base-sys-root
# ./bin base-sys-root
@ -285,6 +286,7 @@ SUBST="${SUBST};s#@MACHINE@#${MACHINE}#g"
# man ${MKMAN} != no
# manpages ${MKMANPAGES} != no
# manz ${MKMANZ} != no
# mdns ${MKMDNS} != no
# nls ${MKNLS} != no
# nvi ${MKNVI} != no
# pam ${MKPAM} != no

View File

@ -1,4 +1,4 @@
# $NetBSD: 3RDPARTY,v 1.717 2009/09/04 19:37:16 jmcneill Exp $
# $NetBSD: 3RDPARTY,v 1.718 2009/09/29 23:56:27 tsarna Exp $
#
# This file contains a list of the software that has been integrated into
# NetBSD where we are not the primary maintainer.
@ -609,6 +609,19 @@ We import only libwrap (under src/lib), tcpdchk and tcpdmatch (both
under src/usr.sbin). We don't use tcpd; that functionality is built
into inetd. The provided libwrap2netbsd script handles just libwrap.
Package: mDNSResponder
Version: 212.1
Current Vers: 212.1
Maintainer: Apple
Archive Site: http://www.opensource.apple.com/tarballs/mDNSResponder/
Home Page: http://developer.apple.com/opensource/internet/bonjour.html
Mailing List: bonjour-dev@lists.apple.com
License: Apache2 (mdnsd), BSD 3-clause (libdns_sd),
BSD 3-clause like (dns-sd)
Responsible: tsarna
Notes:
The sources were integrated into src/sys/external/apache2/mDNSResponder/dist.
Package: mesa-drm
Version: git 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
Current Vers:

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.372 2009/09/08 07:08:01 skrll Exp $
# $NetBSD: Makefile,v 1.373 2009/09/29 23:56:27 tsarna Exp $
# from: @(#)Makefile 8.7 (Berkeley) 5/25/95
# Environment variables without default values:
@ -189,7 +189,7 @@ RELEASEVARS= BSDOBJDIR BSDSRCDIR BUILDID \
MKGCC MKGCCCMDS MKGDB \
MKHESIOD MKHOSTOBJ MKHTML MKIEEEFP MKINET6 MKINFO MKIPFILTER \
MKKERBEROS MKLDAP MKLINKLIB MKLINT \
MKMAN MKMANZ MKNLS MKNVI MKOBJ MKOBJDIRS \
MKMAN MKMANZ MKMDNS MKNLS MKNVI MKOBJ MKOBJDIRS \
MKPAM MKPF MKPIC MKPICINSTALL MKPICLIB MKPOSTFIX MKPROFILE \
MKSHARE MKSKEY MKSOFTFLOAT MKSTATICLIB \
MKUNPRIVED MKUPDATE MKX11 MKYP \

View File

@ -1,4 +1,4 @@
# $NetBSD: rc.conf,v 1.107 2009/09/19 19:47:48 dholland Exp $
# $NetBSD: rc.conf,v 1.108 2009/09/29 23:56:27 tsarna Exp $
#
# /etc/defaults/rc.conf --
# default configuration of /etc/rc.conf
@ -160,6 +160,7 @@ securelevel="" # securelevel to set to
# Networking startup.
#
mdnsd=NO mdnsd_user="_mdnsd"
ipfilter=NO ipfilter_flags="" # uses /etc/ipf.conf
ipnat=NO # uses /etc/ipnat.conf
ipfs=NO ipfs_flags="" # save/load ipnat and ipf states

View File

@ -20,6 +20,7 @@ _proxy:*:21:
_timedc:*:22:
_sdpd:*:23:
_httpd:*:24:
_mdnsd:*:25:
guest:*:31:root
nobody:*:39:
utmp:*:45:

View File

@ -14,5 +14,6 @@ _proxy:*:21:21::0:0:Proxy Services:/nonexistent:/sbin/nologin
_timedc:*:22:22::0:0:& pseudo-user:/nonexistent:/sbin/nologin
_sdpd:*:23:23::0:0:& pseudo-user:/nonexistent:/sbin/nologin
_httpd:*:24:24::0:0:& pseudo-user:/var/www:/sbin/nologin
_mdnsd:*:25:25::0:0:& pseudo-user:/var/www:/sbin/nologin
uucp:*:66:1::0:0:UNIX-to-UNIX Copy:/nonexistent:/sbin/nologin
nobody:*:32767:39::0:0:Unprivileged user:/nonexistent:/sbin/nologin

View File

@ -1,4 +1,4 @@
# $NetBSD: special,v 1.130 2009/09/17 11:52:02 tron Exp $
# $NetBSD: special,v 1.131 2009/09/29 23:56:27 tsarna Exp $
# @(#)special 8.2 (Berkeley) 1/23/94
#
# This file may be overwritten on upgrades.
@ -406,6 +406,7 @@
./var/mail type=dir mode=1777 ignore
./var/preserve type=dir mode=0755 ignore
./var/run type=dir mode=0755
./var/run/mdnsd type=dir mode=0755 optional
./var/run/utmp type=file mode=0664 gname=utmp tags=exclude
./var/run/utmpx type=file mode=0664 gname=utmp tags=exclude
./var/spool type=dir mode=0755

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.79 2009/07/25 16:20:10 mbalmer Exp $
# $NetBSD: Makefile,v 1.80 2009/09/29 23:56:27 tsarna Exp $
.include <bsd.own.mk>
@ -25,9 +25,9 @@ CONFIGFILES=\
identd ifwatchd inetd ipfilter ipfs ipmon ipnat ipsec \
irdaattach iscsi_target isdnd \
kdc \
ldconfig local lpd lvm\
mixerctl mopd motd mountall mountcritlocal mountcritremote \
mountd moused mrouted \
ldconfig local lpd lvm \
mdnsd mixerctl mopd motd mountall mountcritlocal \
mountcritremote mountd moused mrouted \
named ndbootd network newsyslog nfsd nfslocking ntpd ntpdate \
perusertmp pf pf_boot pflogd postfix powerd ppp pwcheck \
quota \

26
etc/rc.d/mdnsd Executable file
View File

@ -0,0 +1,26 @@
#!/bin/sh
#
# $NetBSD: mdnsd,v 1.1 2009/09/29 23:56:27 tsarna Exp $
#
# PROVIDE: mdnsd
# REQUIRE: SERVERS
$_rc_subr_loaded . /etc/rc.subr
name="mdnsd"
rcvar=$name
command="/usr/sbin/$name"
pidfile="/var/run/mdnsd/${name}.pid"
start_precmd="mdnsd_precmd"
mdnsd_precmd()
{
if [ ! -d /var/run/mdns ]; then
mkdir -p -m 755 /var/run/mdnsd
fi
chown _mdnsd:_mdnsd /var/run/mdnsd
}
load_rc_config $name
run_rc_command "$1"

4
external/Makefile vendored
View File

@ -1,7 +1,7 @@
# $NetBSD: Makefile,v 1.6 2009/08/21 23:13:23 skrll Exp $
# $NetBSD: Makefile,v 1.7 2009/09/29 23:56:27 tsarna Exp $
SUBDIR+= lib .WAIT
SUBDIR+= bsd intel-fw-eula intel-fw-public gpl2 gpl3 ibm-public intel-public
SUBDIR+= apache2 bsd intel-fw-eula intel-fw-public gpl2 gpl3 ibm-public intel-public
.include <bsd.subdir.mk>

9
external/apache2/Makefile vendored Normal file
View File

@ -0,0 +1,9 @@
# $NetBSD: Makefile,v 1.1 2009/09/29 23:56:27 tsarna Exp $
.include <bsd.own.mk>
.if (${MKMDNS} != "no")
SUBDIR+= mDNSResponder
.endif
.include <bsd.subdir.mk>

View File

@ -0,0 +1,5 @@
# $NetBSD: Makefile,v 1.1 2009/09/29 23:56:27 tsarna Exp $
SUBDIR= usr.bin usr.sbin
.include <bsd.subdir.mk>

View File

@ -0,0 +1,15 @@
# $NetBSD: Makefile.inc,v 1.1 2009/09/29 23:56:27 tsarna Exp $
.include <bsd.own.mk>
DIST= ${NETBSDSRCDIR}/external/apache2/mDNSResponder/dist
# IPv6 support.
.if ${MKINET6} == "no"
CPPFLAGS+= -DHAVE_IPV6=0
.else
CPPFLAGS+= -DHAVE_IPV6=1
.endif
CPPFLAGS+= -DPID_FILE=\"/var/run/mdnsd/mdnsd.pid\" \
-DMDNS_UDS_SERVERPATH=\"/var/run/mdnsd/mdnsd\"

View File

@ -802,7 +802,13 @@ mDNSlocal int SetupSocket(struct sockaddr *intfAddr, mDNSIPPort port, int interf
{
struct ipv6_mreq imr6;
struct sockaddr_in6 bindAddr6;
#if defined(IPV6_PKTINFO)
#if defined(IPV6_RECVPKTINFO)
if (err == 0)
{
err = setsockopt(*sktPtr, IPPROTO_IPV6, IPV6_RECVPKTINFO, &kOn, sizeof(kOn));
if (err < 0) { err = errno; perror("setsockopt - IPV6_RECVPKTINFO"); }
}
#elif defined(IPV6_PKTINFO)
if (err == 0)
{
err = setsockopt(*sktPtr, IPPROTO_IPV6, IPV6_PKTINFO, &kOn, sizeof(kOn));
@ -811,7 +817,13 @@ mDNSlocal int SetupSocket(struct sockaddr *intfAddr, mDNSIPPort port, int interf
#else
#warning This platform has no way to get the destination interface information for IPv6 -- will only work for single-homed hosts
#endif
#if defined(IPV6_HOPLIMIT)
#if defined(IPV6_RECVHOPLIMIT)
if (err == 0)
{
err = setsockopt(*sktPtr, IPPROTO_IPV6, IPV6_RECVHOPLIMIT, &kOn, sizeof(kOn));
if (err < 0) { err = errno; perror("setsockopt - IPV6_RECVHOPLIMIT"); }
}
#elif defined(IPV6_HOPLIMIT)
if (err == 0)
{
err = setsockopt(*sktPtr, IPPROTO_IPV6, IPV6_HOPLIMIT, &kOn, sizeof(kOn));

View File

@ -188,8 +188,10 @@ First checkin
#include <net/if_dl.h>
#endif
#if defined(AF_INET6) && HAVE_IPV6 && !HAVE_LINUX
#if defined(AF_INET6) && HAVE_IPV6 && !HAVE_LINUX && !defined(sun)
#if defined(__FreeBSD__) || defined(__DragonFly__)
#include <net/if_var.h>
#endif
#include <netinet/in_var.h>
// Note: netinet/in_var.h implicitly includes netinet6/in6_var.h for us
#endif

View File

@ -37,7 +37,7 @@
.\"
.Dd April 2004 \" Date
.Dt dns-sd 1 \" Document Title
.Os Darwin \" Operating System
.Os NetBSD \" Operating System
.\"
.Sh NAME
.Nm dns-sd
@ -64,11 +64,6 @@ The library API that
.Nm
uses is documented in
.Pa /usr/include/dns_sd.h .
The
.Nm
command replaces the older
.Xr mDNS 1
command.
.Pp
The
.Nm
@ -202,14 +197,11 @@ window.
.Pa /usr/bin/dns-sd \" Pathname
.\"
.Sh SEE ALSO
.Xr mDNS 1
.Xr mDNSResponder 8
.\"
.Sh BUGS
.Nm
bugs are tracked in Apple Radar component "mDNSResponder".
.Xr mdnsd 8
.\"
.Sh HISTORY
The
.Nm
command first appeared in Mac OS X 10.4 (Tiger).
command first appeared in
.Nx 6.0 ,
having originated in Mac OS X 10.4 (Tiger).

View File

@ -2339,6 +2339,7 @@ DNSServiceErrorType DNSSD_API DNSServiceSetDefaultDomainForUser
#endif //__APPLE_API_PRIVATE
#if !defined(__NetBSD__)
/* 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
@ -2350,6 +2351,7 @@ struct CompileTimeAssertionChecks_DNS_SD
{
char assert0[(sizeof(union _TXTRecordRef_t) == 16) ? 1 : -1];
};
#endif
#ifdef __cplusplus
}

View File

@ -0,0 +1,18 @@
# $NetBSD: Makefile,v 1.1 2009/09/29 23:56:28 tsarna Exp $
.include <bsd.init.mk>
LIB= dns_sd
SRCS= dnssd_clientlib.c dnssd_clientstub.c dnssd_ipc.c
CPPFLAGS+=-I${DIST}/mDNSShared
INCS= dns_sd.h
INCSDIR=/usr/include
.PATH: ${DIST}/mDNSShared
zoot:
ls ${DIST}/mDNSShared/dnssd_clientlib.c
.include <bsd.lib.mk>

View File

@ -0,0 +1,5 @@
# $NetBSD: shlib_version,v 1.1 2009/09/29 23:56:28 tsarna Exp $
# Remember to update distrib/sets/lists/base/shl.* when changing
#
major=0
minor=0

View File

@ -0,0 +1,37 @@
#!/bin/sh
# $NetBSD: prepare-import.sh,v 1.1 2009/09/29 23:56:27 tsarna Exp $
#
# Extract the new tarball and rename the mDNSResponder-X.Y directory
# to dist. Run this script and check for additional files and
# directories to prune, only relevant content is included.
set -e
cd dist
rm -rf mDNSMacOS9 mDNSMacOSX mDNSVxWorks mDNSWindows
rm -f Makefile mDNSResponder.sln README.txt PrivateDNS.txt
cd Clients
rm -rf BonjourExample DNS-SD.VisualStudio DNS-SD.xcodeproj
rm -rf DNSServiceBrowser-Info.plist DNSServiceBrowser.NET
rm -rf DNSServiceBrowser.VB DNSServiceBrowser.m DNSServiceBrowser.nib
rm -rf DNSServiceReg-Info.plist DNSServiceReg.m DNSServiceReg.nib
rm -rf ExplorerPlugin Java Makefile PrinterSetupWizard ReadMe.txt
rm -rf SimpleChat.NET SimpleChat.VB
cd ../mDNSCore
rm -f Implementer\ Notes.txt
cd ../mDNSPosix
rm -f Client.c ExampleClientApp.c ExampleClientApp.h Identify.c
rm -f Makefile NetMonitor.c ProxyResponder.c ReadMe.txt Responder.c
rm -f Services.txt libnss_mdns.8 mdnsd.sh nss_ReadMe.txt nss_mdns.c
rm -f nss_mdns.conf nss_mdns.conf.5 parselog.py
cd ../mDNSShared
rm -rf DebugServices.c DebugServices.h Java dnssd_clientshim.c mDNS.1
rm -f dnsextd.8 dnsextd.c dnsextd.conf dnsextd.h dnsextd_lexer.l dnsextd_parser.y
# Kill RCS Log lines
cd ..
find . | xargs qsubst '$Log' 'Log' -noask

View File

@ -0,0 +1,5 @@
# $NetBSD: Makefile,v 1.1 2009/09/29 23:56:28 tsarna Exp $
SUBDIR= dns-sd
.include <bsd.subdir.mk>

View File

@ -0,0 +1,7 @@
# $NetBSD: Makefile.inc,v 1.1 2009/09/29 23:56:28 tsarna Exp $
.include <bsd.own.mk>
.include "${.PARSEDIR}/../Makefile.inc"
BINDIR?= /usr/bin

View File

@ -0,0 +1,13 @@
# $NetBSD: Makefile,v 1.1 2009/09/29 23:56:34 tsarna Exp $
PROG= dns-sd
.include <bsd.init.mk>
.PATH: ${DIST}/Clients ${DIST}/mDNSShared
SRCS= dns-sd.c ClientCommon.c
LDADD+= -ldns_sd
DPADD+= ${LIBDNS_SD}
.include <bsd.prog.mk>

View File

@ -0,0 +1,5 @@
# $NetBSD: Makefile,v 1.1 2009/09/29 23:56:34 tsarna Exp $
SUBDIR= mdnsd
.include <bsd.subdir.mk>

View File

@ -0,0 +1,7 @@
# $NetBSD: Makefile.inc,v 1.1 2009/09/29 23:56:34 tsarna Exp $
.include <bsd.own.mk>
.include "${.PARSEDIR}/../Makefile.inc"
BINDIR?= /usr/sbin

View File

@ -0,0 +1,19 @@
# $NetBSD: Makefile,v 1.1 2009/09/29 23:56:34 tsarna Exp $
PROG= mdnsd
.include <bsd.init.mk>
.PATH: ${DIST}/mDNSPosix ${DIST}/mDNSCore ${DIST}/mDNSShared
CPPFLAGS+=-I${DIST}/mDNSCore -I${DIST}/mDNSShared
SRCS= PosixDaemon.c mDNSPosix.c mDNSUNP.c mDNS.c DNSDigest.c uDNS.c \
DNSCommon.c uds_daemon.c mDNSDebug.c dnssd_ipc.c GenLinkedList.c \
PlatformCommon.c
MAN= mdnsd.8
mdnsd.8: mDNSResponder.8
${TOOL_CAT} < $? > $@
.include <bsd.prog.mk>

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.11 2009/06/25 13:59:02 agc Exp $
# $NetBSD: Makefile,v 1.12 2009/09/29 23:56:34 tsarna Exp $
#
# This Makefile exists to provide a single point to build
@ -12,6 +12,10 @@
SUBDIR+= ../bsd/atf/lib
.endif
.if (${MKMDNS} != "no")
SUBDIR+= ../apache2/mDNSResponder/lib
.endif
.if (${MKCRYPTO} != "no")
SUBDIR+= ../../crypto/external/lib .WAIT

View File

@ -1,4 +1,4 @@
.\" $NetBSD: mk.conf.5,v 1.49 2009/09/08 07:54:49 wiz Exp $
.\" $NetBSD: mk.conf.5,v 1.50 2009/09/29 23:56:34 tsarna Exp $
.\"
.\" Copyright (c) 1999-2003 The NetBSD Foundation, Inc.
.\" All rights reserved.
@ -487,6 +487,12 @@ Indicates whether manual pages should be compressed with
at installation time.
.DFLTn
.
.It Sy MKMDNS
.YorN
Indicates whether the mDNS (Multicast DNS) infrastructure
(libraries and support programs) is built and installed.
.DFLTy
.
.It Sy MKNLS
.YorN
Indicates whether Native Language System (NLS) locale zone files will be

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.README,v 1.252 2009/09/08 07:08:03 skrll Exp $
# $NetBSD: bsd.README,v 1.253 2009/09/29 23:56:34 tsarna Exp $
# @(#)bsd.README 8.2 (Berkeley) 4/2/94
This is the README file for the make "include" files for the NetBSD
@ -241,6 +241,10 @@ MKMAN If "no", don't build or install the man or catman pages,
MKMANZ If not "no", compress manual pages at installation time.
Default: no
MKMDNS If "no", disables building of mDNS infrastructure
(libraries and support programs).
Default: yes
MKNLS If "no", don't build or install the NLS files and locale
definition files.
Default: yes

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.own.mk,v 1.582 2009/09/26 07:28:38 skrll Exp $
# $NetBSD: bsd.own.mk,v 1.583 2009/09/29 23:56:34 tsarna Exp $
.if !defined(_BSD_OWN_MK_)
_BSD_OWN_MK_=1
@ -684,6 +684,7 @@ MKBINUTILS?= ${MKBFD}
MKKMOD \
MKLDAP MKLINKLIB MKLINT \
MKMAN \
MKMDNS \
MKNLS \
MKOBJ \
MKPAM \

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# $NetBSD: postinstall,v 1.104 2009/09/21 18:03:03 njoly Exp $
# $NetBSD: postinstall,v 1.105 2009/09/29 23:56:35 tsarna Exp $
#
# Copyright (c) 2002-2008 The NetBSD Foundation, Inc.
# All rights reserved.
@ -805,7 +805,7 @@ do_gid()
check_ids "$1" groups "${DEST_DIR}/etc/group" \
named ntpd sshd authpf _pflogd _rwhod _proxy _timedc \
_sdpd _httpd
_sdpd _httpd _mdnsd
}
#
@ -1058,8 +1058,8 @@ do_rc()
irdaattach iscsi_target isdnd \
kdc \
ldconfig local lpd lvm\
mixerctl mopd motd mountall mountcritlocal mountcritremote \
mountd moused mrouted \
mdnsd mixerctl mopd motd mountall mountcritlocal \
mountcritremote mountd moused mrouted \
named ndbootd network newsyslog nfsd nfslocking ntpd ntpdate \
perusertmp pf pf_boot pflogd postfix powerd ppp pwcheck \
quota \
@ -1357,7 +1357,7 @@ do_uid()
check_ids "$1" users "${DEST_DIR}/etc/master.passwd" \
named ntpd postfix sshd _pflogd _rwhod _proxy _timedc \
_sdpd _httpd
_sdpd _httpd _mdnsd
}