home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / usr / share / doc / libnss-mdns / README.html < prev    next >
Encoding:
Extensible Markup Language  |  2009-06-24  |  14.4 KB  |  315 lines

  1. <?xml version="1.0" encoding="iso-8859-1"?> <!-- -*-html-helper-*- -->
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4.  
  5. <head>
  6. <title>nss-mdns 0.10</title>
  7. <link rel="stylesheet" type="text/css" href="style.css" />
  8. </head>
  9.  
  10. <body>
  11. <h1><a name="top">nss-mdns 0.10</a></h1>
  12.  
  13. <p><i>Copyright 2004-2007 Lennart Poettering <mzaffzqaf (at) 0pointer (dot) de></i></p>
  14.  
  15. <ul class="toc">
  16.     <li><a href="#license">License</a></li>
  17.     <li><a href="#news">News</a></li>
  18.     <li><a href="#overview">Overview</a></li>
  19.     <li><a href="#status">Current Status</a></li>
  20.     <li><a href="#documentation">Documentation</a></li>
  21.     <li><a href="#requirements">Requirements</a></li>
  22.     <li><a href="#installation">Installation</a></li>
  23.     <li><a href="#acks">Acknowledgements</a></li>
  24.     <li><a href="#download">Download</a></li>
  25. </ul>
  26.  
  27. <h2><a name="license">License</a></h2>
  28.  
  29. <p>This program is free software; you can redistribute it and/or
  30. modify it under the terms of the GNU Lesser General Public License as
  31. published by the Free Software Foundation; either version 2 of the
  32. License, or (at your option) any later version.</p>
  33.  
  34. <p>This program is distributed in the hope that it will be useful, but
  35. WITHOUT ANY WARRANTY; without even the implied warranty of
  36. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  37. Lesser General Public License for more details.</p>
  38.  
  39. <p>You should have received a copy of the GNU Lesser General Public License
  40. along with this program; if not, write to the Free Software
  41. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</p>
  42.  
  43. <h2><a name="news">News</a></h2>
  44.  
  45. <div class="news-date">Sat May 12 2007: </div>
  46.  
  47. <p class="news-text"><a
  48. href="http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-0.10.tar.gz">Version 0.10</a>
  49. released. Changes include: Ported to FreeBSD; alignment fixes for SPARC.</p>
  50.  
  51. <div class="news-date">Mon Jan 1 2007: </div>
  52.  
  53. <p class="news-text"><a
  54. href="http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-0.9.tar.gz">Version 0.9</a>
  55. released. Changes include: Make most shared library symbols private to
  56. not conflict with any symbols of the program we're loaded into. Fix a
  57. potential endless loop in the mDNS packet parsing code.</p>
  58.  
  59. <p class="news-text"><b>Please note that due to security reasons from
  60. this release on the minimal mDNS stack included in <tt>nss-mdns</tt>
  61. (dubbed "legacy") is no longer built by default. Thus,
  62. <tt>nss-mdns</tt> will not work unless <a
  63. href="http://avahi.org/">Avahi</a> is running! That makes Avahi
  64. essentially a hard dependency of <tt>nss-mdns</tt>. Pass
  65. <tt>--enable-legacy</tt> to reenable the mini mDNS stack again. Please
  66. note as well that this release does not honour
  67. <tt>/etc/resolv.conf</tt> domain search lists by default anymore. It
  68. created a lot of problems and was never recommended anyway. You may
  69. reenable this functionality by passing
  70. <tt>--enable-search-domains</tt>.</b></p>
  71.  
  72. <div class="news-date">Sat Apr 29 2006: </div> <p class="news-text"><a
  73. href="http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-0.8.tar.gz">Version 0.8</a>
  74. released. Changes include: Build time option to disable "legacy unicast" mDNS
  75. requests, i.e. resolve exclusively with Avahi; build a special
  76. <tt>_minimal</tt> flavour of the shared objects to minimize
  77. unnecessary name lookup timeouts; fix IPv6 resolving when using
  78. Avahi.</p>
  79.  
  80. <p class="news-text"><b>Please note that starting with nss-mdns 0.8 we encourage you to use
  81. a different <tt>/etc/nsswitch.conf</tt> configuration line. See below
  82. for more information!</b></p>
  83.  
  84. <div class="news-date">Sat Nov 19 2005: </div> <p class="news-text"><a
  85. href="http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-0.7.tar.gz">Version 0.7</a>
  86. released. Changes include: Portability patch for ARM from Philipp
  87. Zabel; make sure not to print any messages to STDERR; deal with OOM
  88. situations properly; if multiple addresses are assigned to the same interface make sure to send a query packet only once; other cleanups</p>
  89.  
  90. <div class="news-date">Sun Aug 21 2005: </div> <p class="news-text"><a
  91. href="http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-0.6.tar.gz">Version 0.6</a>
  92. released. Changes include: honour search list in
  93. <tt>/etc/resolv.conf</tt>; try to contact <a
  94. href="http://avahi.org/">Avahi</a> for
  95. resolving.</p>
  96.  
  97. <div class="news-date">Sat Jun 4 2005: </div> <p class="news-text"><a
  98. href="http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-0.5.tar.gz">Version 0.5</a>
  99. released. Changes include: only lookup hostnames ending in
  100. <tt>.local</tt>; add support for a configuration file
  101. (<tt>/etc/mdns.allow</tt>) to allow lookups for other names.</p>
  102.  
  103. <div class="news-date">Sun May 15 2005: </div> <p class="news-text"><a
  104. href="http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-0.4.tar.gz">Version 0.4</a>
  105. released. Changes include: small portability fix for big endian
  106. architectures; send "legacy unicast" packets instead of normal mDNS
  107. packets (this should reduce traffic and improve response time)</p>
  108.  
  109. <div class="news-date">Jan Sun 16 2005: </div> <p class="news-text"><a
  110. href="http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-0.3.tar.gz">Version 0.3</a>
  111. released. Changes include: add Debianization; use <tt>ip6.arpa</tt> instead of <tt>ip6.int</tt> for reverse IPv6 lookups.</p>
  112.  
  113. <div class="news-date">Fri Dec 17 2004: </div> <p class="news-text"><a
  114. href="http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-0.2.tar.gz">Version 0.2</a>
  115. released. Changes include: send mDNS queries on every interface that
  116. supports multicasts, instead of only the one with the default route,
  117. making <tt>nss-mdns</tt> more robust on multi-homed hosts; gcc 2.95
  118. compatiblity.</p>
  119.  
  120. <div class="news-date">Mon Dec 6 2004: </div> <p class="news-text"><a
  121. href="http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-0.1.tar.gz">Version 0.1</a> released</p>
  122.  
  123. <h2><a name="overview">Overview</a></h2>
  124.  
  125. <p><tt>nss-mdns</tt> is a plugin for the GNU Name Service
  126. Switch (NSS) functionality of the GNU C Library (<tt>glibc</tt>)
  127. providing host name resolution via <a
  128. href="http://www.multicastdns.org/">Multicast DNS</a> (aka
  129. <i>Zeroconf</i>, aka <i>Apple Rendezvous</i>, aka <i>Apple Bonjour</i>), effectively allowing
  130. name resolution by common Unix/Linux programs in the ad-hoc mDNS domain <tt>.local</tt>.</p>
  131.  
  132. <p><tt>nss-mdns</tt> provides client functionality only, which
  133. means that you have to run a mDNS responder daemon seperately
  134. from <tt>nss-mdns</tt> if you want to register the local host name via
  135. mDNS. I recommend <a href="http://avahi.org/">Avahi</a>.</p>
  136.  
  137. <p><tt>nss-mdns</tt> is very lightweight (9 KByte stripped binary
  138. <tt>.so</tt> compiled with <tt>-DNDEBUG=1 -Os</tt> on i386, <tt>gcc</tt>
  139. 4.0), has no dependencies besides the <tt>glibc</tt> and requires only
  140. minimal configuration.</p>
  141.  
  142. <p>By default <tt>nss-mdns</tt> tries to contact a running <a
  143. href="http://avahi.org/">avahi-daemon</a> for resolving host names and
  144. addresses and making use of its superior record cacheing. Optionally
  145. <tt>nss-mdns</tt> can be compiled with a mini mDNS stack that can be
  146. used to resolve host names without a local Avahi installation. Both
  147. Avahi support and this mini mDNS stack are optional, however at least one
  148. of them needs to be enabled. If both are enabled a connection to Avahi is
  149. tried first, and if that fails the mini mDNS stack is used.</p>
  150.  
  151. <h2><a name="status">Current Status</a></h2>
  152.  
  153. <p>It works!</p>
  154.  
  155. <p>If the mini MDNS stack is used, <tt>nss-mdns</tt> supports resolving IPv6 addresses but does
  156. so via IPv4 multicasts only. If Avahi is used for resolving IPv6 is supported properly.</p>
  157.  
  158. <h2><a name="documentation">Documentation</a></h2>
  159.  
  160. <p>After compiling and installing <tt>nss-mdns</tt> you'll find six
  161. new NSS modules in <tt>/lib</tt>:</p>
  162. <ul>
  163. <li><tt>libnss_mdns.so.2</tt></li>
  164. <li><tt>libnss_mdns4.so.2</tt></li>
  165. <li><tt>libnss_mdns6.so.2</tt></li>
  166. <li><tt>libnss_mdns_minimal.so.2</tt></li>
  167. <li><tt>libnss_mdns4_minimal.so.2</tt></li>
  168. <li><tt>libnss_mdns6_minimal.so.2</tt></li>
  169. </ul>
  170. <p><tt>libnss_mdns.so.2</tt>
  171. resolves both IPv6 and IPv4 addresses, <tt>libnss_mdns4.so.2</tt> only
  172. IPv4 addresses and <tt>libnss_mdns6.so.2</tt> only IPv6 addresses. Due
  173. to the fact that most mDNS responders only register local IPv4
  174. addresses via mDNS, most people will want to use
  175. <tt>libnss_mdns4.so.2</tt> exclusively. Using
  176. <tt>libnss_mdns.so.2</tt> or <tt>libnss_mdns6.so.2</tt> in such a
  177. situation causes long timeouts when resolving hosts since most modern
  178. Unix/Linux applications check for IPv6 addresses first, followed by a
  179. lookup for IPv4.</p>
  180.  
  181. <p><tt>libnss_mdns{4,6,}_minimal.so</tt> (new in version 0.8) is mostly identical to the
  182. versions without <tt>_minimal</tt>. However, they differ in one
  183. way. The minimal versions will always deny to resolve host names that
  184. don't end in <tt>.local</tt> or addresses that aren't in the range
  185. <tt>169.254.x.x</tt> (the range used by <a
  186. href="http://files.zeroconf.org/rfc3927.txt">IPV4LL/APIPA/RFC3927</a>.)
  187. Combining the <tt>_minimal</tt> and the normal NSS modules allows us
  188. to make mDNS authoritative for Zeroconf host names and addresses (and
  189. thus creating no extra burden on DNS servers with always failing
  190. requests) and use it as fallback for everything else.</p>
  191.  
  192. <p>To activate one of the NSS modules you have to edit
  193. <tt>/etc/nsswitch.conf</tt> and add <tt>mdns4</tt> and
  194. <tt>mdns4_minimal</tt> (resp. <tt>mdns</tt>, <tt>mdns6</tt>) to the
  195. line starting with "<tt>hosts:</tt>". On Debian this looks like
  196. this:</p>
  197.  
  198. <pre># /etc/nsswitch.conf
  199.  
  200. passwd:         compat
  201. group:          compat
  202. shadow:         compat
  203.  
  204. hosts:          files <b>mdns4_minimal [NOTFOUND=return]</b> dns <b>mdns4</b>
  205. networks:       files
  206.  
  207. protocols:      db files
  208. services:       db files
  209. ethers:         db files
  210. rpc:            db files
  211.  
  212. netgroup:       nis</pre>
  213.  
  214. <p>That's it. You should now be able to resolve hosts from the
  215. <tt>.local</tt> domain with all your applications. For a quick check
  216. use <tt>glibc</tt>'s <tt>getent</tt> tool:
  217.  
  218. <pre>$ getent hosts <i>foo</i>.local
  219. 192.168.50.4    foo.local</pre>
  220.  
  221. <p>Replace <i>foo</i> whith a host name that has been registered with
  222. an mDNS responder. (Don't try to use the tools <tt>host</tt> or
  223. <tt>nslookup</tt> for these tests! They bypass the NSS and thus
  224. <tt>nss-mdns</tt> and issue their DNS queries directly.) </p>
  225.  
  226. <p>If you run a firewall, don't forget to allow UDP traffic to the the
  227. mDNS multicast address <tt>224.0.0.251</tt> on port 5353.</p>
  228.  
  229. <p><b>Please note:</b> The line above makes <tt>nss-mdns</tt>
  230. authoritative for the <tt>.local</tt> domain. If you have a unicast
  231. DNS domain with the same name you will no longer be able to resolve
  232. hosts from it. mDNS and a unicast DNS domain named <tt>.local</tt> are
  233. inherently incompatible. Please contact your local admistrator and ask
  234. him to move to a different domain name since <tt>.local</tt> is to be
  235. used exclusively for Zeroconf technology. <a
  236. href="http://avahi.org/wiki/AvahiAndUnicastDotLocal">Further
  237. information</a>.</p>
  238.  
  239. <p>Starting with version 0.5, <tt>nss-mdns</tt> has a simple
  240. configuration file <tt>/etc/mdns.allow</tt> for enabling name lookups
  241. via mDNS in other domains than <tt>.local</tt>. The file contains
  242. valid domain suffixes, seperated by newlines. Empty lines are ignored
  243. as are comments starting with #. To enable mDNS lookups of all names,
  244. regardless of the domain suffix add a line consisting of <tt>*</tt>
  245. only (similar to <tt>nss-mdns</tt> mode of operation of versions <= 0.4):</p>
  246.  
  247. <pre># /etc/mdns.allow
  248. *</pre>
  249.  
  250. <p>If the configuration file is absent or unreadable
  251. <tt>nss-mdns</tt> behaves as if a configuration file with the following
  252. contents is read: </p>
  253.  
  254. <pre># /etc/mdns.allow
  255. .local.
  256. .local</pre>
  257.  
  258. <p>i.e. only hostnames ending with <tt>.local</tt> are resolved via
  259. mDNS.</p>
  260.  
  261. <p>If the configuration file is existent but empty, mDNS name lookups
  262. are disabled completely. Please note that usually mDNS is not used for anything but <tt>.local</tt>, hence you usually don't want to touch this file.</p>
  263.  
  264. <h2><a name="requirements">Requirements</a></h2>
  265.  
  266. <p>Currently, <tt>nss-mdns</tt> is tested on Linux only. A fairly
  267. modern <tt>glibc</tt> installation with development headers (2.0 or
  268. newer) is required. Not suprisingly <tt>nss-mdns</tt> requires a
  269. kernel compiled with IPv4 multicasting support enabled. <a href="http://avahi.org/">Avahi</a> is recommended for its superior cacheing capabilities and for security reasons. Unless you compile <tt>nss-mdns</tt> with <tt>--enable-legacy</tt> Avahi is a hard dependency when <tt>nss-mdns</tt> is used, however not a build-time requirement.</p>
  270.  
  271. <p><tt>nss-mdns</tt> was developed and tested on Debian GNU/Linux
  272. "testing" from December 2004, it should work on most other Linux
  273. distributions (and maybe Unix versions) since it uses GNU autoconf and
  274. GNU libtool for source code configuration and shared library
  275. management.</p>
  276.  
  277. <h2><a name="installation">Installation</a></h2>
  278.  
  279. <p>As this package is made with the GNU autotools you should run
  280. <tt>./configure</tt> inside the distribution directory for configuring
  281. the source tree. After that you should run <tt>make</tt> for
  282. compilation and <tt>make install</tt> (as root) for installation of
  283. <tt>nss-mdns</tt>.</p>
  284.  
  285. <h2><a name="acks">Acknowledgements</a></h2>
  286.  
  287. <p>SHIROYAMA Takayuki, Anand Kumria and Bastien Nocera, Sjoerd Simons for patches.</p>
  288.  
  289. <p>Sean Meiners for search list support.</p>
  290.  
  291. <p>Philipp Zabel for ARM support.</p>
  292.  
  293. <p>Bruce M Simpson for porting it to FreeBSD.</p>
  294.  
  295. <h2><a name="download">Download</a></h2>
  296.  
  297. <p>The newest release is always available from <a href="http://0pointer.de/lennart/projects/nss-mdns/">http://0pointer.de/lennart/projects/nss-mdns/</a></p>
  298.  
  299. <p>The current release is <a href="http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-0.10.tar.gz">0.10</a></p>
  300.  
  301. <p>Get <tt>nss-mdns</tt>'s development sources from the <a href="http://subversion.tigris.org/">Subversion</a> <a href="svn://svn.0pointer.de/nss-mdns">repository</a> (<a href="http://0pointer.de/cgi-bin/viewcvs.cgi/?root=nss-mdns">viewcvs</a>): </p>
  302.  
  303. <pre>svn checkout svn://svn.0pointer.de/nss-mdns/trunk nss-mdns</pre>
  304.  
  305. <p>You may find an up to date Debian package of <tt>nss-mdns</tt> on the <a href="http://packages.debian.org/libnss-mdns">Debian package repository</a>. Many other distributions ship it, too.</p>
  306.  
  307. <p>If you want to be notified whenever I release a new version of this software use the subscription feature of <a href="http://freshmeat.net/projects/nss-mdns/">Freshmeat</a>.</p>
  308.  
  309. <hr/>
  310. <address class="grey">Lennart Poettering <mzaffzqaf (at) 0pointer (dot) de>, May 2007</address>
  311. <div class="grey"><i>$Id: README.html.in 116 2007-05-12 14:54:24Z lennart $</i></div>
  312.  
  313. </body>
  314. </html>
  315.