react-native-zeroconf 0.13.8 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (300) hide show
  1. package/NOTICE +49 -0
  2. package/README.md +489 -65
  3. package/android/build.gradle +23 -24
  4. package/android/src/main/AndroidManifest.xml +5 -2
  5. package/android/src/main/java/com/balthazargronon/RCTZeroconf/ZeroConfImplFactory.java +10 -3
  6. package/android/src/main/java/com/balthazargronon/RCTZeroconf/ZeroconfModule.java +3 -2
  7. package/android/src/main/java/com/balthazargronon/RCTZeroconf/nsd/NsdServiceImpl.java +83 -22
  8. package/android/src/main/java/com/balthazargronon/RCTZeroconf/rx2dnssd/DnssdImpl.java +61 -16
  9. package/android/src/main/java/com/github/druk/dnssd/BaseListener.java +33 -0
  10. package/android/src/main/java/com/github/druk/dnssd/BrowseListener.java +67 -0
  11. package/android/src/main/java/com/github/druk/dnssd/DNSRecord.java +47 -0
  12. package/android/src/main/java/com/github/druk/dnssd/DNSSD.java +650 -0
  13. package/android/src/main/java/com/github/druk/dnssd/DNSSDBindable.java +67 -0
  14. package/android/src/main/java/com/github/druk/dnssd/DNSSDEmbedded.java +135 -0
  15. package/android/src/main/java/com/github/druk/dnssd/DNSSDException.java +66 -0
  16. package/android/src/main/java/com/github/druk/dnssd/DNSSDRecordRegistrar.java +55 -0
  17. package/android/src/main/java/com/github/druk/dnssd/DNSSDRegistration.java +54 -0
  18. package/android/src/main/java/com/github/druk/dnssd/DNSSDService.java +35 -0
  19. package/android/src/main/java/com/github/druk/dnssd/DomainListener.java +57 -0
  20. package/android/src/main/java/com/github/druk/dnssd/InternalBrowseListener.java +76 -0
  21. package/android/src/main/java/com/github/druk/dnssd/InternalDNSSD.java +870 -0
  22. package/android/src/main/java/com/github/druk/dnssd/InternalDNSSDRecordRegistrar.java +30 -0
  23. package/android/src/main/java/com/github/druk/dnssd/InternalDNSSDRegistration.java +34 -0
  24. package/android/src/main/java/com/github/druk/dnssd/InternalDNSSDService.java +29 -0
  25. package/android/src/main/java/com/github/druk/dnssd/InternalDomainListener.java +62 -0
  26. package/android/src/main/java/com/github/druk/dnssd/InternalQueryListener.java +61 -0
  27. package/android/src/main/java/com/github/druk/dnssd/InternalRegisterListener.java +51 -0
  28. package/android/src/main/java/com/github/druk/dnssd/InternalResolveListener.java +58 -0
  29. package/android/src/main/java/com/github/druk/dnssd/NSClass.java +16 -0
  30. package/android/src/main/java/com/github/druk/dnssd/NSType.java +58 -0
  31. package/android/src/main/java/com/github/druk/dnssd/QueryListener.java +54 -0
  32. package/android/src/main/java/com/github/druk/dnssd/RegisterListener.java +46 -0
  33. package/android/src/main/java/com/github/druk/dnssd/RegisterRecordListener.java +35 -0
  34. package/android/src/main/java/com/github/druk/dnssd/ResolveListener.java +55 -0
  35. package/android/src/main/java/com/github/druk/dnssd/TXTRecord.java +293 -0
  36. package/android/src/main/java/com/github/druk/rx2dnssd/BonjourService.java +400 -0
  37. package/android/src/main/java/com/github/druk/rx2dnssd/Rx2BrowseListener.java +55 -0
  38. package/android/src/main/java/com/github/druk/rx2dnssd/Rx2Dnssd.java +127 -0
  39. package/android/src/main/java/com/github/druk/rx2dnssd/Rx2DnssdBindable.java +35 -0
  40. package/android/src/main/java/com/github/druk/rx2dnssd/Rx2DnssdCommon.java +280 -0
  41. package/android/src/main/java/com/github/druk/rx2dnssd/Rx2DnssdEmbedded.java +31 -0
  42. package/android/src/main/java/com/github/druk/rx2dnssd/Rx2QueryListener.java +70 -0
  43. package/android/src/main/java/com/github/druk/rx2dnssd/Rx2RegisterListener.java +47 -0
  44. package/android/src/main/java/com/github/druk/rx2dnssd/Rx2ResolveListener.java +51 -0
  45. package/android/src/main/jni/Android.mk +95 -0
  46. package/android/src/main/jni/Application.mk +3 -0
  47. package/android/src/main/jni/DNSSD.java.h +290 -0
  48. package/android/src/main/jni/JNISupport.c +1140 -0
  49. package/android/src/main/jni/mdnsresponder/Android.bp +215 -0
  50. package/android/src/main/jni/mdnsresponder/Clients/ClientCommon.c +75 -0
  51. package/android/src/main/jni/mdnsresponder/Clients/ClientCommon.h +41 -0
  52. package/android/src/main/jni/mdnsresponder/Clients/Makefile +54 -0
  53. package/android/src/main/jni/mdnsresponder/Clients/ReadMe.txt +25 -0
  54. package/android/src/main/jni/mdnsresponder/Clients/dns-sd.c +1351 -0
  55. package/android/src/main/jni/mdnsresponder/LICENSE +13 -0
  56. package/android/src/main/jni/mdnsresponder/MODULE_LICENSE_APACHE2 +0 -0
  57. package/android/src/main/jni/mdnsresponder/Makefile +41 -0
  58. package/android/src/main/jni/mdnsresponder/NOTICE +13 -0
  59. package/android/src/main/jni/mdnsresponder/PrivateDNS.txt +275 -0
  60. package/android/src/main/jni/mdnsresponder/README.txt +166 -0
  61. package/android/src/main/jni/mdnsresponder/README.version +3 -0
  62. package/android/src/main/jni/mdnsresponder/android/caseMapping/Iphlpapi.h +1 -0
  63. package/android/src/main/jni/mdnsresponder/android/caseMapping/README +3 -0
  64. package/android/src/main/jni/mdnsresponder/android/caseMapping/Resource.h +1 -0
  65. package/android/src/main/jni/mdnsresponder/android/caseMapping/Ws2tcpip.h +1 -0
  66. package/android/src/main/jni/mdnsresponder/android/caseMapping/ipExport.h +1 -0
  67. package/android/src/main/jni/mdnsresponder/android/windows_firewall_dummy.c +10 -0
  68. package/android/src/main/jni/mdnsresponder/mDNSCore/DNSCommon.c +3157 -0
  69. package/android/src/main/jni/mdnsresponder/mDNSCore/DNSCommon.h +292 -0
  70. package/android/src/main/jni/mdnsresponder/mDNSCore/DNSDigest.c +1579 -0
  71. package/android/src/main/jni/mdnsresponder/mDNSCore/Implementer Notes.txt +66 -0
  72. package/android/src/main/jni/mdnsresponder/mDNSCore/mDNS.c +11469 -0
  73. package/android/src/main/jni/mdnsresponder/mDNSCore/mDNSDebug.h +164 -0
  74. package/android/src/main/jni/mdnsresponder/mDNSCore/mDNSEmbeddedAPI.h +2974 -0
  75. package/android/src/main/jni/mdnsresponder/mDNSCore/uDNS.c +4969 -0
  76. package/android/src/main/jni/mdnsresponder/mDNSCore/uDNS.h +132 -0
  77. package/android/src/main/jni/mdnsresponder/mDNSPosix/Client.c +223 -0
  78. package/android/src/main/jni/mdnsresponder/mDNSPosix/ExampleClientApp.c +91 -0
  79. package/android/src/main/jni/mdnsresponder/mDNSPosix/ExampleClientApp.h +18 -0
  80. package/android/src/main/jni/mdnsresponder/mDNSPosix/Identify.c +378 -0
  81. package/android/src/main/jni/mdnsresponder/mDNSPosix/Makefile +520 -0
  82. package/android/src/main/jni/mdnsresponder/mDNSPosix/NetMonitor.c +1010 -0
  83. package/android/src/main/jni/mdnsresponder/mDNSPosix/PosixDaemon.c +329 -0
  84. package/android/src/main/jni/mdnsresponder/mDNSPosix/ProxyResponder.c +300 -0
  85. package/android/src/main/jni/mdnsresponder/mDNSPosix/ReadMe.txt +314 -0
  86. package/android/src/main/jni/mdnsresponder/mDNSPosix/Responder.c +792 -0
  87. package/android/src/main/jni/mdnsresponder/mDNSPosix/Services.txt +36 -0
  88. package/android/src/main/jni/mdnsresponder/mDNSPosix/libnss_mdns.8 +148 -0
  89. package/android/src/main/jni/mdnsresponder/mDNSPosix/mDNSPosix.c +1685 -0
  90. package/android/src/main/jni/mdnsresponder/mDNSPosix/mDNSPosix.h +88 -0
  91. package/android/src/main/jni/mdnsresponder/mDNSPosix/mDNSUNP.c +726 -0
  92. package/android/src/main/jni/mdnsresponder/mDNSPosix/mDNSUNP.h +130 -0
  93. package/android/src/main/jni/mdnsresponder/mDNSPosix/mdnsd.sh +73 -0
  94. package/android/src/main/jni/mdnsresponder/mDNSPosix/nss_ReadMe.txt +125 -0
  95. package/android/src/main/jni/mdnsresponder/mDNSPosix/nss_mdns.c +2723 -0
  96. package/android/src/main/jni/mdnsresponder/mDNSPosix/nss_mdns.conf +13 -0
  97. package/android/src/main/jni/mdnsresponder/mDNSPosix/nss_mdns.conf.5 +135 -0
  98. package/android/src/main/jni/mdnsresponder/mDNSPosix/parselog.py +247 -0
  99. package/android/src/main/jni/mdnsresponder/mDNSResponder.sln +400 -0
  100. package/android/src/main/jni/mdnsresponder/mDNSShared/CommonServices.h +1537 -0
  101. package/android/src/main/jni/mdnsresponder/mDNSShared/DebugServices.c +3075 -0
  102. package/android/src/main/jni/mdnsresponder/mDNSShared/DebugServices.h +1607 -0
  103. package/android/src/main/jni/mdnsresponder/mDNSShared/GenLinkedList.c +319 -0
  104. package/android/src/main/jni/mdnsresponder/mDNSShared/GenLinkedList.h +90 -0
  105. package/android/src/main/jni/mdnsresponder/mDNSShared/PlatformCommon.c +220 -0
  106. package/android/src/main/jni/mdnsresponder/mDNSShared/PlatformCommon.h +18 -0
  107. package/android/src/main/jni/mdnsresponder/mDNSShared/dns-sd.1 +194 -0
  108. package/android/src/main/jni/mdnsresponder/mDNSShared/dns_sd.h +2452 -0
  109. package/android/src/main/jni/mdnsresponder/mDNSShared/dnsextd.8 +69 -0
  110. package/android/src/main/jni/mdnsresponder/mDNSShared/dnsextd.c +3146 -0
  111. package/android/src/main/jni/mdnsresponder/mDNSShared/dnsextd.conf +60 -0
  112. package/android/src/main/jni/mdnsresponder/mDNSShared/dnsextd.h +163 -0
  113. package/android/src/main/jni/mdnsresponder/mDNSShared/dnsextd_lexer.l +84 -0
  114. package/android/src/main/jni/mdnsresponder/mDNSShared/dnsextd_parser.y +585 -0
  115. package/android/src/main/jni/mdnsresponder/mDNSShared/dnssd_clientlib.c +368 -0
  116. package/android/src/main/jni/mdnsresponder/mDNSShared/dnssd_clientshim.c +802 -0
  117. package/android/src/main/jni/mdnsresponder/mDNSShared/dnssd_clientstub.c +1988 -0
  118. package/android/src/main/jni/mdnsresponder/mDNSShared/dnssd_ipc.c +161 -0
  119. package/android/src/main/jni/mdnsresponder/mDNSShared/dnssd_ipc.h +219 -0
  120. package/android/src/main/jni/mdnsresponder/mDNSShared/mDNS.1 +198 -0
  121. package/android/src/main/jni/mdnsresponder/mDNSShared/mDNSDebug.c +93 -0
  122. package/android/src/main/jni/mdnsresponder/mDNSShared/mDNSResponder.8 +116 -0
  123. package/android/src/main/jni/mdnsresponder/mDNSShared/uds_daemon.c +4758 -0
  124. package/android/src/main/jni/mdnsresponder/mDNSShared/uds_daemon.h +80 -0
  125. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/BrowsingPage.cpp +441 -0
  126. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/BrowsingPage.h +156 -0
  127. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/ConfigDialog.cpp +59 -0
  128. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/ConfigDialog.h +48 -0
  129. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/ConfigPropertySheet.cpp +301 -0
  130. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/ConfigPropertySheet.h +105 -0
  131. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/ControlPanel.cpp +380 -0
  132. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/ControlPanel.def +20 -0
  133. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/ControlPanel.h +84 -0
  134. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/ControlPanel.rc +141 -0
  135. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/ControlPanel.vcproj +727 -0
  136. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/ControlPanelDll.rc +123 -0
  137. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/ControlPanelExe.cpp +373 -0
  138. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/ControlPanelExe.h +48 -0
  139. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/ControlPanelExe.rc +123 -0
  140. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/ControlPanelExe.vcproj +764 -0
  141. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/ControlPanelLocRes.rc +270 -0
  142. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/ControlPanelLocRes.vcproj +487 -0
  143. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/ControlPanelRes.rc +134 -0
  144. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/ControlPanelRes.vcproj +518 -0
  145. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/FourthPage.cpp +197 -0
  146. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/FourthPage.h +87 -0
  147. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/RegistrationPage.cpp +387 -0
  148. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/RegistrationPage.h +75 -0
  149. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/SecondPage.cpp +544 -0
  150. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/SecondPage.h +107 -0
  151. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/ServicesPage.cpp +273 -0
  152. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/ServicesPage.h +123 -0
  153. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/SharedSecret.cpp +115 -0
  154. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/SharedSecret.h +54 -0
  155. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/res/ControlPanel.dll.manifest +10 -0
  156. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/res/ControlPanel.exe.manifest +17 -0
  157. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/res/ControlPanel.manifest +17 -0
  158. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/res/ControlPanel.rc2 +13 -0
  159. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/res/ControlPanel64.manifest +17 -0
  160. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/res/EnergySaver.ico +0 -0
  161. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/res/controlpanel.ico +0 -0
  162. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/res/failure.ico +0 -0
  163. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/res/success.ico +0 -0
  164. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/resource.h +56 -0
  165. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/stdafx.cpp +20 -0
  166. package/android/src/main/jni/mdnsresponder/mDNSWindows/ControlPanel/stdafx.h +64 -0
  167. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLL/dll.aps +0 -0
  168. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLL/dll.rc +102 -0
  169. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLL/dllmain.c +112 -0
  170. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLL/dnssd.def +48 -0
  171. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLL/dnssd.vcproj +472 -0
  172. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLL/resource.h +27 -0
  173. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLL.NET/AssemblyInfo.cpp +84 -0
  174. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLL.NET/PString.h +70 -0
  175. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLL.NET/Stdafx.cpp +22 -0
  176. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLL.NET/Stdafx.h +33 -0
  177. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLL.NET/dnssd_NET.cpp +1234 -0
  178. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLL.NET/dnssd_NET.h +1392 -0
  179. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLL.NET/dnssd_NET.ico +0 -0
  180. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLL.NET/dnssd_NET.rc +113 -0
  181. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLL.NET/dnssd_NET.vcproj +446 -0
  182. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLL.NET/resource.h +3 -0
  183. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLLStub/DLLStub.cpp +693 -0
  184. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLLStub/DLLStub.h +52 -0
  185. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLLStub/DLLStub.vcproj +324 -0
  186. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLLX/DLLX.cpp +208 -0
  187. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLLX/DLLX.def +35 -0
  188. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLLX/DLLX.idl +491 -0
  189. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLLX/DLLX.rc +126 -0
  190. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLLX/DLLX.rgs +11 -0
  191. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLLX/DLLX.vcproj +625 -0
  192. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLLX/DNSSD.cpp +892 -0
  193. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLLX/DNSSDEventManager.cpp +31 -0
  194. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLLX/DNSSDEventManager.h +133 -0
  195. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLLX/DNSSDEventManager.rgs +27 -0
  196. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLLX/DNSSDRecord.cpp +101 -0
  197. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLLX/DNSSDRecord.h +185 -0
  198. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLLX/DNSSDRecord.rgs +27 -0
  199. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLLX/DNSSDService.cpp +2095 -0
  200. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLLX/DNSSDService.h +429 -0
  201. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLLX/DNSSDService.rgs +27 -0
  202. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLLX/StringServices.cpp +344 -0
  203. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLLX/StringServices.h +102 -0
  204. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLLX/TXTRecord.cpp +381 -0
  205. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLLX/TXTRecord.h +203 -0
  206. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLLX/TXTRecord.rgs +27 -0
  207. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLLX/_IDNSSDEvents_CP.h +358 -0
  208. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLLX/dlldatax.c +51 -0
  209. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLLX/dlldatax.h +49 -0
  210. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLLX/resource.h +30 -0
  211. package/android/src/main/jni/mdnsresponder/mDNSWindows/DLLX/stdafx.h +88 -0
  212. package/android/src/main/jni/mdnsresponder/mDNSWindows/DNSServiceBrowser/Windows/ApplicationVS2002.sln +21 -0
  213. package/android/src/main/jni/mdnsresponder/mDNSWindows/DNSServiceBrowser/Windows/ApplicationVS2002.vcproj +253 -0
  214. package/android/src/main/jni/mdnsresponder/mDNSWindows/DNSServiceBrowser/Windows/ApplicationVS2003.sln +21 -0
  215. package/android/src/main/jni/mdnsresponder/mDNSWindows/DNSServiceBrowser/Windows/ApplicationVS2003.vcproj +267 -0
  216. package/android/src/main/jni/mdnsresponder/mDNSWindows/DNSServiceBrowser/Windows/Resources/Application.ico +0 -0
  217. package/android/src/main/jni/mdnsresponder/mDNSWindows/DNSServiceBrowser/Windows/Resources/Application.rc +323 -0
  218. package/android/src/main/jni/mdnsresponder/mDNSWindows/DNSServiceBrowser/Windows/Resources/Application.rc2 +20 -0
  219. package/android/src/main/jni/mdnsresponder/mDNSWindows/DNSServiceBrowser/Windows/Resources/Resource.h +53 -0
  220. package/android/src/main/jni/mdnsresponder/mDNSWindows/DNSServiceBrowser/Windows/Sources/AboutDialog.cpp +71 -0
  221. package/android/src/main/jni/mdnsresponder/mDNSWindows/DNSServiceBrowser/Windows/Sources/AboutDialog.h +62 -0
  222. package/android/src/main/jni/mdnsresponder/mDNSWindows/DNSServiceBrowser/Windows/Sources/Application.cpp +111 -0
  223. package/android/src/main/jni/mdnsresponder/mDNSWindows/DNSServiceBrowser/Windows/Sources/Application.h +68 -0
  224. package/android/src/main/jni/mdnsresponder/mDNSWindows/DNSServiceBrowser/Windows/Sources/ChooserDialog.cpp +1426 -0
  225. package/android/src/main/jni/mdnsresponder/mDNSWindows/DNSServiceBrowser/Windows/Sources/ChooserDialog.h +131 -0
  226. package/android/src/main/jni/mdnsresponder/mDNSWindows/DNSServiceBrowser/Windows/Sources/LoginDialog.cpp +109 -0
  227. package/android/src/main/jni/mdnsresponder/mDNSWindows/DNSServiceBrowser/Windows/Sources/LoginDialog.h +53 -0
  228. package/android/src/main/jni/mdnsresponder/mDNSWindows/DNSServiceBrowser/Windows/Sources/StdAfx.cpp +18 -0
  229. package/android/src/main/jni/mdnsresponder/mDNSWindows/DNSServiceBrowser/Windows/Sources/StdAfx.h +48 -0
  230. package/android/src/main/jni/mdnsresponder/mDNSWindows/DNSServiceBrowser/WindowsCE/Application.vcc +37 -0
  231. package/android/src/main/jni/mdnsresponder/mDNSWindows/DNSServiceBrowser/WindowsCE/Application.vcp +868 -0
  232. package/android/src/main/jni/mdnsresponder/mDNSWindows/DNSServiceBrowser/WindowsCE/Application.vcw +29 -0
  233. package/android/src/main/jni/mdnsresponder/mDNSWindows/DNSServiceBrowser/WindowsCE/Resources/Application.ico +0 -0
  234. package/android/src/main/jni/mdnsresponder/mDNSWindows/DNSServiceBrowser/WindowsCE/Resources/Application.rc +194 -0
  235. package/android/src/main/jni/mdnsresponder/mDNSWindows/DNSServiceBrowser/WindowsCE/Resources/Application.rc2 +13 -0
  236. package/android/src/main/jni/mdnsresponder/mDNSWindows/DNSServiceBrowser/WindowsCE/Resources/newres.h +28 -0
  237. package/android/src/main/jni/mdnsresponder/mDNSWindows/DNSServiceBrowser/WindowsCE/Resources/resource.h +22 -0
  238. package/android/src/main/jni/mdnsresponder/mDNSWindows/DNSServiceBrowser/WindowsCE/Sources/Application.cpp +92 -0
  239. package/android/src/main/jni/mdnsresponder/mDNSWindows/DNSServiceBrowser/WindowsCE/Sources/Application.h +57 -0
  240. package/android/src/main/jni/mdnsresponder/mDNSWindows/DNSServiceBrowser/WindowsCE/Sources/BrowserDialog.cpp +394 -0
  241. package/android/src/main/jni/mdnsresponder/mDNSWindows/DNSServiceBrowser/WindowsCE/Sources/BrowserDialog.h +84 -0
  242. package/android/src/main/jni/mdnsresponder/mDNSWindows/DNSServiceBrowser/WindowsCE/Sources/StdAfx.cpp +18 -0
  243. package/android/src/main/jni/mdnsresponder/mDNSWindows/DNSServiceBrowser/WindowsCE/Sources/StdAfx.h +46 -0
  244. package/android/src/main/jni/mdnsresponder/mDNSWindows/Java/Java.vcproj +111 -0
  245. package/android/src/main/jni/mdnsresponder/mDNSWindows/Java/jdns_sd.rc +62 -0
  246. package/android/src/main/jni/mdnsresponder/mDNSWindows/Java/makefile +143 -0
  247. package/android/src/main/jni/mdnsresponder/mDNSWindows/Java/makefile64 +143 -0
  248. package/android/src/main/jni/mdnsresponder/mDNSWindows/NSPTool/NSPTool.aps +0 -0
  249. package/android/src/main/jni/mdnsresponder/mDNSWindows/NSPTool/NSPTool.c +581 -0
  250. package/android/src/main/jni/mdnsresponder/mDNSWindows/NSPTool/NSPTool.rc +103 -0
  251. package/android/src/main/jni/mdnsresponder/mDNSWindows/NSPTool/NSPTool.vcproj +409 -0
  252. package/android/src/main/jni/mdnsresponder/mDNSWindows/NSPTool/Prefix.h +28 -0
  253. package/android/src/main/jni/mdnsresponder/mDNSWindows/NSPTool/resource.h +27 -0
  254. package/android/src/main/jni/mdnsresponder/mDNSWindows/PosixCompat.c +128 -0
  255. package/android/src/main/jni/mdnsresponder/mDNSWindows/PosixCompat.h +70 -0
  256. package/android/src/main/jni/mdnsresponder/mDNSWindows/README.txt +85 -0
  257. package/android/src/main/jni/mdnsresponder/mDNSWindows/RegNames.h +57 -0
  258. package/android/src/main/jni/mdnsresponder/mDNSWindows/Secret.c +338 -0
  259. package/android/src/main/jni/mdnsresponder/mDNSWindows/Secret.h +42 -0
  260. package/android/src/main/jni/mdnsresponder/mDNSWindows/SystemService/EventLog.mc +11 -0
  261. package/android/src/main/jni/mdnsresponder/mDNSWindows/SystemService/EventLogMessages.bin +0 -0
  262. package/android/src/main/jni/mdnsresponder/mDNSWindows/SystemService/Firewall.cpp +484 -0
  263. package/android/src/main/jni/mdnsresponder/mDNSWindows/SystemService/Firewall.h +79 -0
  264. package/android/src/main/jni/mdnsresponder/mDNSWindows/SystemService/Prefix.h +30 -0
  265. package/android/src/main/jni/mdnsresponder/mDNSWindows/SystemService/Service.aps +0 -0
  266. package/android/src/main/jni/mdnsresponder/mDNSWindows/SystemService/Service.c +2669 -0
  267. package/android/src/main/jni/mdnsresponder/mDNSWindows/SystemService/Service.h +30 -0
  268. package/android/src/main/jni/mdnsresponder/mDNSWindows/SystemService/Service.mcp +0 -0
  269. package/android/src/main/jni/mdnsresponder/mDNSWindows/SystemService/Service.rc +114 -0
  270. package/android/src/main/jni/mdnsresponder/mDNSWindows/SystemService/Service.vcproj +562 -0
  271. package/android/src/main/jni/mdnsresponder/mDNSWindows/SystemService/main.c +32 -0
  272. package/android/src/main/jni/mdnsresponder/mDNSWindows/SystemService/res/mDNSResponder.manifest +12 -0
  273. package/android/src/main/jni/mdnsresponder/mDNSWindows/SystemService/res/mDNSResponder64.manifest +12 -0
  274. package/android/src/main/jni/mdnsresponder/mDNSWindows/SystemService/resource.h +17 -0
  275. package/android/src/main/jni/mdnsresponder/mDNSWindows/SystemService/resrc1.h +15 -0
  276. package/android/src/main/jni/mdnsresponder/mDNSWindows/VPCDetect.cpp +165 -0
  277. package/android/src/main/jni/mdnsresponder/mDNSWindows/VPCDetect.h +36 -0
  278. package/android/src/main/jni/mdnsresponder/mDNSWindows/WinServices.cpp +93 -0
  279. package/android/src/main/jni/mdnsresponder/mDNSWindows/WinServices.h +34 -0
  280. package/android/src/main/jni/mdnsresponder/mDNSWindows/WinVersRes.h +35 -0
  281. package/android/src/main/jni/mdnsresponder/mDNSWindows/isocode.h +135 -0
  282. package/android/src/main/jni/mdnsresponder/mDNSWindows/loclibrary.c +268 -0
  283. package/android/src/main/jni/mdnsresponder/mDNSWindows/loclibrary.h +54 -0
  284. package/android/src/main/jni/mdnsresponder/mDNSWindows/mDNSWin32.c +5200 -0
  285. package/android/src/main/jni/mdnsresponder/mDNSWindows/mDNSWin32.h +208 -0
  286. package/android/src/main/jni/mdnsresponder/mDNSWindows/mdnsNSP/ReadMe.txt +15 -0
  287. package/android/src/main/jni/mdnsresponder/mDNSWindows/mdnsNSP/mdnsNSP.aps +0 -0
  288. package/android/src/main/jni/mdnsresponder/mDNSWindows/mdnsNSP/mdnsNSP.c +2430 -0
  289. package/android/src/main/jni/mdnsresponder/mDNSWindows/mdnsNSP/mdnsNSP.def +24 -0
  290. package/android/src/main/jni/mdnsresponder/mDNSWindows/mdnsNSP/mdnsNSP.rc +104 -0
  291. package/android/src/main/jni/mdnsresponder/mDNSWindows/mdnsNSP/mdnsNSP.vcproj +457 -0
  292. package/android/src/main/jni/mdnsresponder/mDNSWindows/mdnsNSP/resource.h +27 -0
  293. package/android/src/main/jni/mdnsresponder/mdnsd.rc +7 -0
  294. package/android/src/main/jni/nameser.h +588 -0
  295. package/dist/index.js +160 -1
  296. package/index.d.ts +91 -0
  297. package/ios/RNZeroconf/RNNetServiceSerializer.m +7 -3
  298. package/ios/RNZeroconf/RNZeroconf.m +8 -0
  299. package/package.json +25 -17
  300. package/src/index.js +183 -0
@@ -0,0 +1,13 @@
1
+ The majority of the source code in the mDNSResponder project is licensed
2
+ under the terms of the Apache License, Version 2.0, available from:
3
+ <http://www.apache.org/licenses/LICENSE-2.0>
4
+
5
+ To accommodate license compatibility with the widest possible range
6
+ of client code licenses, the shared library code, which is linked
7
+ at runtime into the same address space as the client using it, is
8
+ licensed under the terms of the "Three-Clause BSD License".
9
+
10
+ The Linux Name Service Switch code, contributed by National ICT
11
+ Australia Ltd (NICTA) is licensed under the terms of the NICTA Public
12
+ Software Licence (which is substantially similar to the "Three-Clause
13
+ BSD License", with some additional language pertaining to Australian law).
@@ -0,0 +1,41 @@
1
+ #
2
+ # Top level makefile for Build & Integration.
3
+ #
4
+ # This file is used to facilitate checking the mDNSResponder project
5
+ # directly out of CVS and submitting to B&I at Apple.
6
+ #
7
+ # The various platform directories contain makefiles or projects
8
+ # specific to that platform.
9
+ #
10
+ # B&I builds must respect the following target:
11
+ # install:
12
+ # installsrc:
13
+ # installhdrs:
14
+ # clean:
15
+ #
16
+
17
+ include /Developer/Makefiles/pb_makefiles/platform.make
18
+
19
+ MVERS = "mDNSResponder-320.10.80"
20
+
21
+ DDNSWRITECONFIG = "$(DSTROOT)/Library/Application Support/Bonjour/ddnswriteconfig"
22
+
23
+ installSome:
24
+ cd "$(SRCROOT)/mDNSMacOSX"; xcodebuild install OBJROOT=$(OBJROOT) SYMROOT=$(SYMROOT) DSTROOT=$(DSTROOT) MVERS=$(MVERS) SDKROOT=$(SDKROOT) -target Build\ Some
25
+
26
+ SystemLibraries:
27
+ cd "$(SRCROOT)/mDNSMacOSX"; xcodebuild install OBJROOT=$(OBJROOT) SYMROOT=$(SYMROOT) DSTROOT=$(DSTROOT) MVERS=$(MVERS) SDKROOT=$(SDKROOT) -target SystemLibraries
28
+
29
+ install:
30
+ cd "$(SRCROOT)/mDNSMacOSX"; xcodebuild install OBJROOT=$(OBJROOT) SYMROOT=$(SYMROOT) DSTROOT=$(DSTROOT) MVERS=$(MVERS) SDKROOT=$(SDKROOT)
31
+ # Make sure ddnswriteconfig is owned by root:wheel, then make it setuid root executable
32
+ if test -e $(DDNSWRITECONFIG) ; then chown 0:80 $(DDNSWRITECONFIG) ; chmod 4555 $(DDNSWRITECONFIG) ; fi
33
+
34
+ installsrc:
35
+ ditto . "$(SRCROOT)"
36
+
37
+ installhdrs::
38
+ cd "$(SRCROOT)/mDNSMacOSX"; xcodebuild installhdrs OBJROOT=$(OBJROOT) SYMROOT=$(SYMROOT) DSTROOT=$(DSTROOT) MVERS=$(MVERS) SDKROOT=$(SDKROOT) -target SystemLibraries
39
+
40
+ clean::
41
+ echo clean
@@ -0,0 +1,13 @@
1
+ The majority of the source code in the mDNSResponder project is licensed
2
+ under the terms of the Apache License, Version 2.0, available from:
3
+ <http://www.apache.org/licenses/LICENSE-2.0>
4
+
5
+ To accommodate license compatibility with the widest possible range
6
+ of client code licenses, the shared library code, which is linked
7
+ at runtime into the same address space as the client using it, is
8
+ licensed under the terms of the "Three-Clause BSD License".
9
+
10
+ The Linux Name Service Switch code, contributed by National ICT
11
+ Australia Ltd (NICTA) is licensed under the terms of the NICTA Public
12
+ Software Licence (which is substantially similar to the "Three-Clause
13
+ BSD License", with some additional language pertaining to Australian law).
@@ -0,0 +1,275 @@
1
+ Private DNS
2
+
3
+ Summary
4
+
5
+ Private DNS is an extension to standard Wide Area Bonjour that allows
6
+ for secure, encrypted, and authorized communications. Private data sent
7
+ from a client to a DNS server is encrypted using Transport Layer
8
+ Security (TLS), ensuring that the data is hidden from prying eyes, and
9
+ contains Transaction Signatures (TSIG), so the server can authorize the
10
+ request. TSIGs are typically associated with Dynamic Updates; we are
11
+ using them for standard and long-lived queries as well. Private DNS also
12
+ protects Dynamic Updates from eavesdropping, by wrapping the update in a
13
+ TLS communication channel if the server has been configured appropriately.
14
+
15
+ Architectural Overview
16
+
17
+ mDNSResponder has been modified to automatically issue a private query
18
+ when necessary. After receiving an NXDOMAIN error, mDNSResponder checks
19
+ in the system keychain to see if the user has a DNS query key (TSIG key)
20
+ for the name in question, or for a parent of that name. If a suitable
21
+ key is found, mDNSResponder looks up the zone data associated with the
22
+ name of the question. After determining the correct name server,
23
+ mDNSResponder looks up an additional SRV record "_dns-private._tcp". If
24
+ it finds this record, mDNSResponder will re-issue the query privately.
25
+ If either there is no _dns-private._tcp record, or there is no secret
26
+ key, the call fails as it initially did, with an NXDOMAIN error.
27
+
28
+ Once the secret key is found and the SRV record is looked up, mDNSResponder
29
+ opens a TLS connection to the server on the port specified in the SRV
30
+ record just looked up. After the connection succeeds, mDNSResponder
31
+ can proceed to use that communication channel to make requests of
32
+ the server. Every private packet must also have a TSIG record;
33
+ the DNS server uses this TSIG record to allow access to its data.
34
+
35
+ When setting up a long-lived query over TCP (with or without TLS)
36
+ TCP's standard three-way handshake makes the full four-packet LLQ setup
37
+ exchange described in <http://files.dns-sd.org/draft-sekar-dns-llq.txt>
38
+ unnecessary. Instead, when connecting over TCP, the client simply sends
39
+ a setup message and expects to receive ACK + Answers. The setup message
40
+ sent is formatted as described in the LLQ document, however there is
41
+ an additional TSIG' resource record added to the end of it. The TSIG
42
+ resource records looks and acts exactly as it does in a secure update.
43
+ So when the server receives an LLQ (or a standard query), it looks to
44
+ see if the zone that is being referenced is public or private. If it's
45
+ private, then it makes sure that the client is authorized to query that
46
+ zone (by using the TSIG signature) and returns the appropriate data.
47
+ When a zone is configured as private, the server will do this type of
48
+ authorization checking for every query except those queries that are
49
+ looking for SOA and NS records.
50
+
51
+ Implementation Issues
52
+
53
+ dnsextd
54
+
55
+ dnsextd has been modified to behave much like a DNS firewall. The "real"
56
+ DNS server is configured to listen on non-standard ports on the loopback
57
+ interface. dnsextd then listens on the standard DNS ports (TCP/UDP port
58
+ 53) and intercepts all DNS traffic. It is responsible for determining
59
+ what zone a DNS request is associated with, determining whether the
60
+ client is allowed access to that zone, and returning the appropriate
61
+ information back to the caller. If the packet is allowed access, dnsextd
62
+ forwards the request to the "real" nameserver, and returns the result to
63
+ the caller.
64
+
65
+ It was tempting to use BIND9's facility for configuring TSIG enabled
66
+ queries while doing this work. However after proceeding down that path,
67
+ enough subtle interaction problems were found that it was not practical
68
+ to pursue this direction, so instead dnsextd does all TSIG processing
69
+ for queries itself. It does continue to use BIND9 for processing TSIG
70
+ enabled dynamic updates, though one minor downside with this is that
71
+ there are two configuration files (named.conf or dnsextd.conf) that have
72
+ the same secret key information. That seems redundant and error-prone,
73
+ and moving all TSIG processing for both queries and updates into dnsextd
74
+ would fix this.
75
+
76
+ All private LLQ operations are TSIG-enabled and sent over a secure
77
+ encrypted TLS channel. To accommodate service providers who don't want
78
+ to have to keep open a large number of TLS connections to a large number
79
+ of client machines, the server has the option of dropping the TLS
80
+ connection after initial LLQ setup and sending subsequent events and
81
+ refreshes using unencrypted UDP packets. This results in less load on
82
+ the server, at the cost of slightly lower security (LLQs can only be set
83
+ up by an authorized client, but once set up, subsequent change event
84
+ packets sent over unencrypted UDP could be observed by an eavesdropper).
85
+ A potential solution to this deficiency might be in using DTLS, which is
86
+ a protocol based on TLS that is capable of securing datagram traffic.
87
+ More investigation needs to be done to see if DTLS is suitable for
88
+ private DNS.
89
+
90
+ It was necessary to relax one of the checks that dnsextd performs during
91
+ processing of an LLQ refresh. Prior to these changes, dnsextd would
92
+ verify that the refresh request came from the same entity that setup the
93
+ LLQ by comparing both the IP Address and port number of the request
94
+ packet with the IP Address and port number of the setup packet. Because
95
+ of the preceding issue, a refresh request might be sent over two
96
+ different sockets. While their IP addresses would be the same, their
97
+ port numbers could potentially differ. This check has been modified to
98
+ only check that the IP addresses match.
99
+
100
+ When setting up a semi-private LLQ (where the request and initial answer
101
+ set is sent over TLS/TCP, but subsequent change events are sent over
102
+ unencrypted UDP), dnsextd uses the port number of the client's TCP
103
+ socket to determine the UDP event port number. While this eliminates the
104
+ need to pass the UDP event port number in the LLQ setup request
105
+ (obviating a potential data mismatch error), I think it does more harm
106
+ than good, for three reasons:
107
+
108
+ 1) We are relying that all the routers out there implement the Port
109
+ Mapping Protocol spec correctly.
110
+
111
+ 2) Upon setup every LLQ must NAT map two ports. Upon tear down every LLQ
112
+ must tear down two NAT mappings.
113
+
114
+ 3) Every LLQ opens up two sockets (TCP and UDP), rather than just the
115
+ one TCP socket.
116
+
117
+ All of this just to avoid sending two bytes in the LLQ setup packet
118
+ doesn't seem logical. The approach also necessitates creating an
119
+ additional UDP socket for every private LLQ, port mapping both the TCP
120
+ socket as well as the UDP socket, and moderately increasing the
121
+ complexity and efficiency of the code. Because of this we plan to allow
122
+ the LLQ setup packet to specify a different UDP port for change event
123
+ packets. This will allow mDNSResponder to receive all UDP change event
124
+ packets on a single UDP port, instead of a different one for each LLQ.
125
+
126
+ Currently, dnsextd is buggy on multi-homed hosts. If it receives a
127
+ packet on interface 2, it will reply on interface 1 causing an error in
128
+ the client program.
129
+
130
+ dnsextd doesn't fully process all of its option parameters.
131
+ Specifically, it doesn't process the keywords: "listen-on",
132
+ "nameserver", "private", and "llq". It defaults to expecting the "real"
133
+ nameserver to be listening on 127.0.0.1:5030.
134
+
135
+
136
+ mDNSResponder
137
+
138
+ Currently, mDNSResponder attempts to issue private queries for all
139
+ queries that initially result in an NXDOMAIN error. This behavior might
140
+ be modified in future versions, however it seems patently incorrect to
141
+ do this for reverse name lookups. The code that attempts to get the zone
142
+ data associated with the name will never find the zone for a reverse
143
+ name lookup, and so will issue a number of wasteful DNS queries.
144
+
145
+ mDNSResponder doesn't handle SERV_FULL or STATIC return codes after
146
+ setting up an LLQ over TCP. This isn't a terrible problem right now,
147
+ because dnsextd doesn't ever return them, but this should be fixed so
148
+ that mDNSResponder will work when talking to other servers that do
149
+ return these error codes.
150
+
151
+
152
+ Configuration:
153
+
154
+ Sample named.conf:
155
+
156
+ //
157
+ // Include keys file
158
+ //
159
+ include "/etc/rndc.key";
160
+ // Declares control channels to be used by the rndc utility.
161
+ //
162
+ // It is recommended that 127.0.0.1 be the only address used.
163
+ // This also allows non-privileged users on the local host to manage
164
+ // your name server.
165
+
166
+ //
167
+ // Default controls
168
+ //
169
+ controls
170
+ {
171
+ inet 127.0.0.1 port 54 allow { any; } keys { "rndc-key"; };
172
+ };
173
+
174
+ options
175
+ {
176
+ directory "/var/named";
177
+ /*
178
+ * If there is a firewall between you and nameservers you want
179
+ * to talk to, you might need to uncomment the query-source
180
+ * directive below. Previous versions of BIND always asked
181
+ * questions using port 53, but BIND 8.1 uses an unprivileged
182
+ * port by default.
183
+ */
184
+
185
+ forwarders
186
+ {
187
+ 65.23.128.2;
188
+ 65.23.128.3;
189
+ };
190
+
191
+ listen-on port 5030 { 127.0.0.1; };
192
+ recursion true;
193
+ };
194
+
195
+ //
196
+ // a caching only nameserver config
197
+ //
198
+ zone "." IN
199
+ {
200
+ type hint;
201
+ file "named.ca";
202
+ };
203
+
204
+ zone "localhost" IN
205
+ {
206
+ type master;
207
+ file "localhost.zone";
208
+ allow-update { none; };
209
+ };
210
+
211
+ zone "0.0.127.in-addr.arpa" IN
212
+ {
213
+ type master;
214
+ file "named.local";
215
+ allow-update { none; };
216
+ };
217
+
218
+ zone "hungrywolf.org." in
219
+ {
220
+ type master;
221
+ file "db.hungrywolf.org";
222
+ allow-update { key hungrywolf.org.; };
223
+ };
224
+
225
+ zone "157.23.65.in-addr.arpa" IN
226
+ {
227
+ file "db.65.23.157";
228
+ type master;
229
+ };
230
+
231
+ zone "100.255.17.in-addr.arpa" IN
232
+ {
233
+ file "db.17.255.100";
234
+ type master;
235
+ };
236
+
237
+ zone "66.6.24.in-addr.arpa" IN
238
+ {
239
+ file "db.24.6.66";
240
+ type master;
241
+ };
242
+
243
+ key hungrywolf.org.
244
+ {
245
+ algorithm hmac-md5;
246
+ secret "c8LWr16K6ju6KMO5zT6Tyg==";
247
+ };
248
+
249
+ logging
250
+ {
251
+ category default { _default_log; };
252
+
253
+ channel _default_log
254
+ {
255
+ file "/Library/Logs/named.log";
256
+ severity info;
257
+ print-time yes;
258
+ };
259
+ };
260
+
261
+
262
+ Sample dnsextd.conf:
263
+
264
+ options { };
265
+
266
+ key "hungrywolf.org."
267
+ {
268
+ secret "c8LWr16K6ju6KMO5zT6Tyg==";
269
+ };
270
+
271
+ zone "hungrywolf.org."
272
+ {
273
+ type private;
274
+ allow-query { key hungrywolf.org.; };
275
+ };
@@ -0,0 +1,166 @@
1
+ What is mDNSResponder?
2
+ ----------------------
3
+
4
+ The mDNSResponder project is a component of Bonjour,
5
+ Apple's ease-of-use IP networking initiative:
6
+ <http://developer.apple.com/bonjour/>
7
+
8
+ Apple's Bonjour software derives from the ongoing standardization
9
+ work of the IETF Zero Configuration Networking Working Group:
10
+ <http://zeroconf.org/>
11
+
12
+ The Zeroconf Working Group has identified three requirements for Zero
13
+ Configuration Networking:
14
+ 1. An IP address (even when there is no DHCP server to assign one)
15
+ 2. Name-to-address translation (even when there is no DNS server)
16
+ 3. Discovery of Services on the network (again, without infrastucture)
17
+
18
+ Requirement 1 is met by self-assigned link-local addresses, as
19
+ described in "Dynamic Configuration of IPv4 Link-Local Addresses"
20
+ <http://files.zeroconf.org/draft-ietf-zeroconf-ipv4-linklocal.txt>
21
+
22
+ Requirement 2 is met by sending DNS-like queries via Multicast (mDNS).
23
+
24
+ Requirement 3 is met by DNS Service Dicsovery (DNS-SD).
25
+
26
+ Self-assigned link-local address capability has been available since
27
+ 1998, when it first appeared in Windows '98 and in Mac OS 8.5.
28
+ Implementations for other platforms also exist.
29
+
30
+ The mDNSResponder project allows us to meet requirements 2 and 3.
31
+ It provides the ability for the user to identify hosts using names
32
+ instead of dotted-decimal IP addresses, even if the user doesn't have a
33
+ conventional DNS server set up. It also provides the ability for the
34
+ user to discover what services are being advertised on the network,
35
+ without having to know about them in advance, or configure the machines.
36
+
37
+ The name "mDNS" was chosen because this protocol is designed to be,
38
+ as much as possible, similar to conventional DNS. The main difference is
39
+ that queries are sent via multicast to all local hosts, instead of via
40
+ unicast to a specific known server. Every host on the local link runs an
41
+ mDNSResponder which is constantly listening for those multicast queries,
42
+ and if the mDNSResponder receives a query for which it knows the answer,
43
+ then it responds. The mDNS protocol uses the same packet format as
44
+ unicast DNS, and the same name structure, and the same DNS record types.
45
+ The main difference is that queries are sent to a different UDP port
46
+ (5353 instead of 53) and they are sent via multicast to address
47
+ 224.0.0.251. Another important difference is that all "mDNS" names
48
+ end in ".local." When a user types "yourcomputer.local." into their Web
49
+ browser, the presence of ".local." on the end of the name tells the host
50
+ OS that the name should be looked up using local multicast instead of by
51
+ sending that name to the worldwide DNS service for resolution. This
52
+ helps reduce potential user confusion about whether a particular name
53
+ is globally unique (e.g. "www.apple.com.") or whether that name has only
54
+ local significance (e.g. "yourcomputer.local.").
55
+
56
+
57
+ About the mDNSResponder Code
58
+ ----------------------------
59
+
60
+ Because Apple benefits more from widespread adoption of Bonjour than
61
+ it would benefit from keeping Bonjour proprietary, Apple is making
62
+ this code open so that other developers can use it too.
63
+
64
+ Because Apple recognises that networks are hetrogenous environments
65
+ where devices run many different kinds of OS, this code has been made
66
+ as portable as possible.
67
+
68
+ A typical mDNS program contains three components:
69
+
70
+ +------------------+
71
+ | Application |
72
+ +------------------+
73
+ | mDNS Core |
74
+ +------------------+
75
+ | Platform Support |
76
+ +------------------+
77
+
78
+ The "mDNS Core" layer is absolutely identical for all applications and
79
+ all Operating Systems.
80
+
81
+ The "Platform Support" layer provides the necessary supporting routines
82
+ that are specific to each platform -- what routine do you call to send
83
+ a UDP packet, what routine do you call to join multicast group, etc.
84
+
85
+ The "Application" layer does whatever that particular application wants
86
+ to do. It calls routines provided by the "mDNS Core" layer to perform
87
+ the functions it needs --
88
+ * advertise services,
89
+ * browse for named instances of a particular type of service
90
+ * resolve a named instance to a specific IP address and port number,
91
+ * etc.
92
+ The "mDNS Core" layer in turn calls through to the "Platform Support"
93
+ layer to send and receive the multicast UDP packets to do the actual work.
94
+
95
+ Apple currently provides "Platform Support" layers for Mac OS 9, Mac OS X,
96
+ Microsoft Windows, VxWorks, and for POSIX platforms like Linux, Solaris,
97
+ FreeBSD, etc.
98
+
99
+ Note: Developers writing applications for OS X do not need to incorporate
100
+ this code into their applications, since OS X provides a system service to
101
+ handle this for them. If every application developer were to link-in the
102
+ mDNSResponder code into their application, then we would end up with a
103
+ situation like the picture below:
104
+
105
+ +------------------+ +------------------+ +------------------+
106
+ | Application 1 | | Application 2 | | Application 3 |
107
+ +------------------+ +------------------+ +------------------+
108
+ | mDNS Core | | mDNS Core | | mDNS Core |
109
+ +------------------+ +------------------+ +------------------+
110
+ | Platform Support | | Platform Support | | Platform Support |
111
+ +------------------+ +------------------+ +------------------+
112
+
113
+ This would not be very efficient. Each separate application would be sending
114
+ their own separate multicast UDP packets and maintaining their own list of
115
+ answers. Because of this, OS X provides a common system service which client
116
+ software should access through the "/usr/include/dns_sd.h" APIs.
117
+
118
+ The situation on OS X looks more like the picture below:
119
+
120
+ -------------------
121
+ / \
122
+ +---------+ +------------------+ +---------+ \ +---------+
123
+ | App 1 |<-->| daemon.c |<-->| App 2 | ->| App 3 |
124
+ +---------+ +------------------+ +---------+ +---------+
125
+ | mDNS Core |
126
+ +------------------+
127
+ | Platform Support |
128
+ +------------------+
129
+
130
+ Applications on OS X make calls to the single mDNSResponder daemon
131
+ which implements the mDNS and DNS-SD protocols.
132
+
133
+ Vendors of products such as printers, which are closed environments not
134
+ expecting to be running third-party application software, can reasonably
135
+ implement a single monolithic mDNSResponder to advertise all the
136
+ services of that device. Vendors of open systems which run third-party
137
+ application software should implement a system service such as the one
138
+ provided by the OS X mDNSResponder daemon, and application software on
139
+ that platform should, where possible, make use of that system service
140
+ instead of embedding their own mDNSResponder.
141
+
142
+ See ReadMe.txt in the mDNSPosix directory for specific details of
143
+ building an mDNSResponder on a POSIX Operating System.
144
+
145
+
146
+ Compiling on Older C Compilers
147
+ ------------------------------
148
+
149
+ We go to some lengths to make the code portable, but //-style comments
150
+ are one of the modern conveniences we can't live without.
151
+
152
+ If your C compiler doesn't understand these comments, you can transform
153
+ them into classical K&R /* style */ comments with a quick GREP
154
+ search-and-replace pattern.
155
+
156
+ In BBEdit on the Mac:
157
+ 1. Open the "Find" dialog window and make sure "Use Grep" is selected
158
+ 2. Search For : ([^:])//(.*)
159
+ 3. Replace With: \1/*\2 */
160
+ 4. Drag your mDNSResponder source code folder to the Multi-File search pane
161
+ 5. Click "Replace All"
162
+
163
+ For the more command-line oriented, cd into your mDNSResponder source code
164
+ directory and execute the following command (all one line):
165
+
166
+ find mDNSResponder \( -name \*.c\* -or -name \*.h \) -exec sed -i .orig -e 's,^//\(.*\),/*\1 */,' -e '/\/\*/\!s,\([^:]\)//\(.*\),\1/*\2 */,' {} \;
@@ -0,0 +1,3 @@
1
+ URL: http://opensource.apple.com/tarballs/mDNSResponder/mDNSResponder-320.10.80.tar.gz
2
+ Version: 320.10.80
3
+ BugComponent: 31808
@@ -0,0 +1 @@
1
+ #include <iphlpapi.h>
@@ -0,0 +1,3 @@
1
+ Windows filesystems, and consequently Windows C include files, are
2
+ case-insensitive. This folder provides alternately-cased versions of header
3
+ files for cases where that becomes a problem.
@@ -0,0 +1 @@
1
+ #include <resource.h>
@@ -0,0 +1 @@
1
+ #include <ws2tcpip.h>
@@ -0,0 +1 @@
1
+ #include <ipexport.h>
@@ -0,0 +1,10 @@
1
+ int mDNSIsFileAndPrintSharingEnabled(int *ignored) {
2
+ (void)ignored;
3
+ return 0;
4
+ }
5
+
6
+ int mDNSAddToFirewall(const char* ignored, const char* also_ignored) {
7
+ (void)ignored;
8
+ (void)also_ignored;
9
+ return 0;
10
+ }