mDNSResponder | IETF work on DNS-Based Service Discovery | DNS library
kandi X-RAY | mDNSResponder Summary
kandi X-RAY | mDNSResponder Summary
This repository is used for IETF work on DNS-Based Service Discovery, particularly the DNS-SD Discovery Proxy. This code is Open Source under the Apache 2.0 license. This work is the product of the IETF DNSSD Working Group and was presented at the 2019 Apple Worldwide Developer Conference (WWDC) networking session. The specification for the DNS-SD Discovery Proxy can be found in draft-ietf-dnssd-hybrid. Other useful background reading includes the Service Discovery Road Map, Multicast DNS (RFC 6762), DNS-Based Service Discovery (RFC 6763), DNS Stateful Operations (RFC 8490), and DNS Push Notifications. This Discovery Proxy will work, using DNS polling, with any version of Mac OS X 10.4 (released in 2004) or later. Support for wide area unicast service discovery has also been included in every version of iOS since the first iPhone in 2007. However, to get the benefit of fast asynchronous change notifications using DNS Push Notifications, which keeps the user interface up to date without polling, we highly recommend testing using the current shipping versions, macOS Catalina and iOS 13. This document last updated 2019-10-02.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of mDNSResponder
mDNSResponder Key Features
mDNSResponder Examples and Code Snippets
Community Discussions
Trending Discussions on mDNSResponder
QUESTION
I need to programmatically set DNS servers of the host on their active network interfaces (Wi-fi, ethernet, etc) on both Windows, MacOS and as a bonus Linux.
I want to avoid having to manually update/pollute /etc/hosts
for my Kubernetes services I am running on my ingress.
Currently, my process is to manually set the DNS server for each person in my team running our app
The problem with this is that it's a manual process, and I am having trouble trying to automate it because the outputs are weirdly formatted and hard to parse. This means I am unable to know which is the proper network interface to use.
Essentially, what needs to be done is the following (on both platforms)
- Get the active networks name
- Set the DNS servers for the active network to
127.0.0.1
&8.8.4.4
MacOS:
...ANSWER
Answered 2021-May-17 at 09:16On macOS, I don't think this will do what you want. When you configure multiple DNS servers on macOS, the system resolver doesn't try them in order, it just fires off requests semi-randomly between the available servers. This means it'll sometimes send off requests for your private servers to the public (Google) server, get told there's no such domain, and stop there. Or it'll send requests for pubic sites to the localhost DNS, and if that doesn't respond properly decide that site doesn't work. Basically, the macOS resolver doesn't do failover.
Are your private servers under a non-standard TLD or something like that? If so, you might be able to do the job by adding a file under /etc/resolver/ to redirect queries for that TLD to the private DNS server.
Anyway, in case it is useful, here's a way to detect the primary (active) network interface and set its DNS servers in macOS:
QUESTION
Can someone help me in setting up the recipe to build mDNS in Yocto and/or
correct any other mistakes I may have made?
I previously successfully built mDNS and got it running in Linaro embedded
Linux.
This is a pretty detailed post, to try to err on the side of giving enough
information. As one responder wrote in a forum message that I saw recently:
"Welcome to Yocto. Here's your bottle of whiskey and Advil..."
Building in Linaro Linux: I had obtained this .tar of mDNS from Apple:
https://opensource.apple.com/tarballs/mDNSResponder/mDNSResponder-878.200.35.tar.gz
Following this got it going: https://github.com/balaji-reddy/mDNSResponder .
I made a base folder /mDNS/ for my mDNS stuff and extracted the .tar there,
creating an mDNSResponder-878.200.35/ folder. I did cd into that.
It build readily for me in Linaro using the command: make os="linux" -C "mDNSPosix"
I got 8 files in /mDNS/mDNSR-878.200.35/mDNSPosix/build/prod/ :
40,592 libdns_sd.so
55,960 libnss_mdns-0.2.so
370,288 mDNSClientPosix
448,608 mdnsd
374,616 mDNSIdentify
387,904 mDNSNetMonitor
373,960 mDNSProxyResponderPosix
379,768 mDNSResponderPosix
Then, still in mDNSResponder-878.200.35/, I did:
make install os="linux" -C "mDNSPosix"
Among other things, this install starts a demon running. It also copies
libdns_sd.so, and libnss_mdns-0.2.so to /lib/, which should be in the path.
These lines are included in the install output:
--------------------------------------------------------------**
Starting Apple Darwin Multicast DNS / DNS Service Discovery daemon: mdnsd.
/usr/sbin/mdnsd installed
--------------------------------------------------------------**
For Yocto, I figured I would add the copy of libdns_sd.so to the /lib/ folder in
the destination to my recipe so I could link another module to it before I ran
the make install, which has to be done running on the target. But if I build
that other module in Yocto, I think I should add copying it to /lib/ under my
tmp/work/ dir, not D, the destination. My do_install line:
install -m 0755 ${S}/mDNSResponder-878.200.35/mDNSPosix/build/prod/libdns_sd.so ${D}${base_libdir}
is for copying it to /lib/ in D. How would I correctly write that line to copy
it to /lib/ under ~/Yocto/imx-yocto-bsp/build-wayland/tmp/work/aarch64-poky-linux/?
The Yocto low-level folder isn't very important; I just felt that I wanted a
Yocto folder under my home dir to hold my Yocto stuff. I created imx-yocto-bsp
following the i.MX_Yocto_Project_User's_Guide.pdf.
First, I had followed the i.MX_Yocto_Project_User's_Guide.pdf, "IMXLXYOCTOUG"
from the imx-yocto-L5.4.47_2.2.0 download, to get my basic system, which
worked. I got that from: www.nxp.com/imx8mnanoevk ->
https://www.nxp.com/design/development-boards/i-mx-evaluation-and-development-boards/evaluation-kit-for-the-i-mx-8m-nano-applications-processor:8MNANOD4-EVK
And downloaded and unpacked this .zip described in the next three lines:
L5.4.47_2.2.0_LINUX_DOCS (REV L5.4.47_2.2.0 ) UPDATED
i.MX L5.4.47_2.2.0 for Linux BSP Documentation. Includes Release Notes, User Guide.
ZIP 11.6 MB 03 Nov 2020 L5.4.47_2.2.0_LINUX_DOCS [ English ]
I'm doing this for the i.MX 8M nano eval board.
The build-wayland folder in my path above is my build folder.
I had done the following line to get that.
~/Yocto/imx-yocto-bsp$ DISTRO=fsl-imx-wayland MACHINE=imx8mnddr4evk source imx-setup-release.sh -b build-wayland
One result of that was to end up with the directory changed to the build-wayland
folder. It turned out it was the right thing to do to stay in that folder for
subsequent steps in the i.MX_Yocto_Project_User's_Guide.pdf, such as my
"bitbake imx-image-multimedia" command that I did; I don't believe the .pdf made
that clear.
So I previously got this working on a Linux host PC running Ubuntu 18.04.4
"Bionic Beaver" and flashed the resulting images onto my i.MX 8M nano board.
One line of many I see in my UART output is:
Welcome to NXP i.MX Release Distro 5.4-zeus (zeus)!
I followed the following very good tutorial and also added a helloworld layer as
it shows and had helloworld working on my target board after flashing the built
.wic image from the host:
https://medium.com/the-innovation/how-to-prepare-a-helloworld-c-recipe-with-yocto-project-1f74c296a777
It is a good tutorial, for one thing, because it clearly describes the directory
structure and can be followed. Be careful about a typo that the author
put in, however. He starts out spelling helloworld.c as hello-world.c in his
Steps 5 and 6 then switches to helloworld.c in his Step 7. You have to catch
that and fix the spelling in your work when you notice the switch.
I used the structure that he, George Calin, showed, to make my mdns layer.
In my build folder, build-wayland, I created meta-mdns-so alongside the
meta-helloworld-app folder that I had created following the tutorial. I used
similar steps as given in the tutorial, including
bitbake-layers create-layer meta-mdns-so
bitbake-layers add-layer meta-mdns-so
This got me through Step 4 in the tutorial in a similar manner.
This created the following tree in meta-mdns-so (one dash indented per level):
conf
-layer.conf
COPYING.MIT
README
recipes-example
-mdns
--files
---mDNSResponder-878.200.35.tar.gz
--mDNSResponder_878.200.35.bb
Note that items followed by items that are more indented are directories.
Putting mDNSResponder-878.200.35.tar.gz under files I found out from
https://wiki.yoctoproject.org/wiki/Building_your_own_recipes_from_first_principles
However the information here is about seven years old and background info links
have rotted.
There's more information in the Yocto Mega Manual at
https://www.yoctoproject.org/docs/3.0/mega-manual/mega-manual.html .
See "7.3.21.3. Makefile-Based Package"
Here's the recipe in mDNSResponder_878.200.35.bb that I came up with for my
first try:
----------------------------------------------------------------------
DESCRIPTION = "The mDNS component"
PRIORITY = "optional"
SECTION = "protocols"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRC_URI = "file://mDNSResponder-878.200.35.tar.gz"
# S = "${WORKDIR}"
# -Shouldn't set S because BitBake expects the source to be in a dir called
# mDNSResponder-878.200.35 in the work dir.
# Don't need a do_compile step since by default BitBake starts the make command
# to compile the application.
# But need additional make options
EXTRA_OEMAKE = "'os="linux"' '-C "mDNSPosix"'"
do_install() {
install -d ${D}${base_libdir}
install -m 0755 ${WORKDIR}/mDNSResponder-878.200.35/mDNSPosix/build/prod/libdns_sd.so ${D}${base_libdir}
}
----------------------------------------------------------------------**
I did bitbake mdns in ~/Yocto/imx-yocto-bsp/build-wayland$ .
When coming back to this work in a fresh terminal window I always do
~/Yocto/imx-yocto-bsp$ source setup-environment build-wayland
It puts me in my build-wayland folder: ~/Yocto/imx-yocto-bsp/build-wayland$
The bitbake seemed to do the compile fine, and I got content under:
~/Yocto/imx-yocto-bsp/build-wayland/tmp/work# find -iname mdns
Found lots, including this folder:
./aarch64-poky-linux/mdns/878.200.35-r0/
As in the helloworld tutorial:
Step 10. Add package to conf/local.conf in variable IMAGE_INSTALL and set the
details for next image
I added:
IMAGE_INSTALL_append=" mdns" after the line, 'CONF_VERSION' = "1"'.
I did the bitbake from my build dir: bitbake imx-image-multimedia
Under my deploy folder, in ~/Yocto/imx-yocto-bsp/build-wayland/tmp/deploy/images/imx8mnddr4evk/, I got imx-image-multimedia-imx8mnddr4evk-20210211215119.rootfs.wic.bz2 With the up-to-date timestamp of 2021/02/11 (Thurs) 21:51:19 (0000 UTC).
Flashing it onto my i.MX 8M nano board, it
-didn't have libdns_sd.so in the /lib/ folder
-didn't have a /mDNSR-878.200.35 folder in root.
-find -iname mdns doesn't find mDNSR-878.200.35; finds a screenful of files.
-the /mDNSR-878.200.35/mDNSPosix/build/prod/ folder with its 8 build artifacts
wasn't there.
However, on the bitbake host, the 8 build artifacts were found:
~/Yocto/imx-yocto-bsp/build-wayland/tmp/work/aarch64-poky-linux/mdns/878.200.35-r0/mDNSResponder-878.200.35/mDNSPosix/build/prod# ls -l
total 9452
-rwxr-xr-x 1 159200 Feb 11 16:07 libdns_sd.so
-rwxr-xr-x 1 239856 Feb 11 16:07 libnss_mdns-0.2.so
-rwxr-xr-x 1 1504904 Feb 11 16:07 mDNSClientPosix
-rwxr-xr-x 1 1750944 Feb 11 16:07 mdnsd
-rwxr-xr-x 1 1481136 Feb 11 16:07 mDNSIdentify
-rwxr-xr-x 1 1525392 Feb 11 16:07 mDNSNetMonitor
-rwxr-xr-x 1 1493112 Feb 11 16:07 mDNSProxyResponderPosix
-rwxr-xr-x 1 1511048 Feb 11 16:07 mDNSResponderPosix
I concluded that the compile part was fine but my do_install command was wrong.
Can someone correct my recipe for me?
For my second try I changed only the do_install() in the recipe to this:
--------------------------------------------------------------------------------
do_install() {
install -t ${S} ${D}
install -d ${D}${base_libdir}
install -m 0755 ${S}/mDNSResponder-878.200.35/mDNSPosix/build/prod/libdns_sd.so ${D}${base_libdir}
}
--------------------------------------------------------------------------------
That's two changes, first copying from S to D to try to get the
mDNSResponder-878.200.35/ dir copied over to the destination, and then trying
the "install - m" command from S rather than WORKDIR.
Retrying the bitbake: bitbake imx-image-multimedia, it indicated at the end that all 6968 tasks didn't need to be rerun.
I tried: ~/Yocto/imx-yocto-bsp/build-wayland$ bitbake -c clean mdns -- and got:
NOTE: Tasks Summary: Attempted 1 tasks of which 0 didn't need to be rerun and
all succeeded.
~/Yocto/imx-yocto-bsp/build-wayland$ bitbake imx-image-multimedia -- got:
NOTE: Tasks Summary: Attempted 6968 tasks of which 6967 didn't need to be rerun
and all succeeded.
It typically flashes and erases a bunch of activity, which it did this time. It
might be nice to have that remaining displayed to be able to study it.
It didn't update anything in:
~/Yocto/imx-yocto-bsp/build-wayland/tmp/deploy/images/imx8mnddr4evk#
No longer had mDNSResponder-878.200.35/ in
~/Yocto/imx-yocto-bsp/build-wayland/tmp/work/aarch64-poky-linux/mdns/878.200.35-r0/ .
I tried: bitbake -c cleansstate mdns -- got:
NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn't need to be rerun and
all succeeded.
Did: ~/Yocto/imx-yocto-bsp/build-wayland$ bitbake imx-image-multimedia
-Got the typical bitbake output, then:
Sstate summary: Wanted 6 Found 0 Missed 6 Current 2580 (0% match, 99% complete)
NOTE: Tasks Summary: Attempted 6968 tasks of which 6954 didn't need to be rerun
and all succeeded.
This time I saw do_compile of mdns and 878.200.25 etc.
Again had mDNSResponder-878.200.35 in
~/Yocto/imx-yocto-bsp/build-wayland/tmp/work/aarch64-poky-linux/mdns/878.200.35-r0/.
Have the build artifacts in mDNSPosix in the host at:
~/Yocto/imx-yocto-bsp/build-wayland/tmp/work/aarch64-poky-linux/mdns/878.200.35-r0/mDNSResponder-878.200.35/mDNSPosix/build/prod/
Still don't have an updated image since Thurs Feb 11 in
~/Yocto/imx-yocto-bsp/build-wayland/tmp/deploy/images/imx8mnddr4evk/ .
Can someone correct my recipe and any other mistakes I may have made? Is it my do_install()?
In my do_install(), I have:
install -m 0755 ${S}/mDNSResponder-878.200.35/mDNSPosix/build/prod/libdns_sd.so ${D}${base_libdir}
which is for copying it to /lib/ in D. How would I correctly write that line to
copy it to /lib/ under
~/Yocto/imx-yocto-bsp/build-wayland/tmp/work/aarch64-poky-linux/ for use to link
to the next module I have to build on the host?
In the meantime, I'll try deleting my
imx-image-multimedia-imx8mnddr4evk-20210211215119.rootfs.wic.bz2 and redoing the
bitbake.
...Deleting
imx-image-multimedia-imx8mnddr4evk-20210211215119.rootfs .tar.bz2 and .wic.bz2
didn't help; they didn't get recreated even after I redid the above cleans and bitbake.
Best regards,
Later: Followup question: Where can I obtain the mdns.service file needed for building mDNS in Yocto?
...ANSWER
Answered 2021-Feb-19 at 17:59There is already a recipe for mDNS version 878.200.35: https://git.openembedded.org/meta-openembedded/tree/meta-networking/recipes-protocols/mdns/mdns_878.200.35.bb?h=zeus
QUESTION
I am writing an app for both macOS and iOS.
When I started my multiplatform project, I decided to see if the Firebase SDKs work with macOS, because I have seen this error before:
tvOS and macOS SDK support is not part of the official Firebase product. Instead they are community supported. Details at https://github.com/firebase/firebase-ios-sdk/blob/master/README.md.
I went to start configuring Firebase, and had to create an NSApplicationDelegate for it to work on macOS:
...ANSWER
Answered 2020-Nov-14 at 20:18Fixed it by checking box
Incoming network connections (server)
and
Outgoing network connections (client)
If you get a error saying your entitlements folder was edited, just clean the build folder.
QUESTION
A friend sent me this code and I think it is unsafe and someone tell me.
...ANSWER
Answered 2020-Jul-03 at 13:26The code will try to stop randomly all the applications listed in the Applications list. After a reboot, the system will work as usual.
QUESTION
I want so send a message to the localhost on port number 80 but I was able to open a connection What did i do wrong and how can I fix it?
Here is the code to connect to the localhost server
...ANSWER
Answered 2020-Feb-27 at 07:49This question and your Other question have the same answer you're missing the entitlement in the capabilities tab.
click on your project settings and go to capabilities there you'll see the app sandbox. make sure it's turned on and then enable incoming connections and outgoing connections.
QUESTION
I am writing a PowerShell script in version 5.1 on Windows 10 that gets certain pieces of information about a local system ( and eventually its subnets ) and outputs them into a text file. At first, I had all of the aspects in a single function. I ran into output issues when outputting getUsersAndGroups
and getRunningProcesses
functions, where output from getUsersAndGroups
would be injected into the output of getRunningProcesses
.
The two functions are:
...ANSWER
Answered 2019-Dec-07 at 17:44tl; dr:
Force synchronous output to the console by using a formatting cmdlet explicitly:
QUESTION
I keep getting this exception every other time I try to load the backoffice:
...ANSWER
Answered 2019-Nov-17 at 02:08It seems to be related to this issue: Backoffice MediaRemovalException on startup on Windows, which is fixed by Persistence of backoffice configuration is not thread safe.
Consider updating to a more recent 1808 patch. The latest (as of November 2019) is 1808.18.
QUESTION
I have used webview to load url but it is not loaded.
i have tried the same with wkwebview but couldn't load url.
I have done following
- import WebKit
- Info.plist
- Allow Arbitrary Loads - YES
- Allow Arbitrary Loads in Web Content - YES
LOG:
dnssd_clientstub ConnectToServer: connect()-> No of tries: 1
dnssd_clientstub ConnectToServer: connect()-> No of tries: 2
dnssd_clientstub ConnectToServer: connect()-> No of tries: 3 dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mDNSResponder Socket:11 Err:-1 Errno:1 Operation not permitted
nw_resolver_create_dns_service_locked DNSServiceCreateConnection failed: ServiceNotRunning(-65563)
-CODE
...ANSWER
Answered 2017-Oct-17 at 07:03Check capabilities > Incoming and outgoing connections
QUESTION
I am trying to setup routing or some interface between between AP and STA of the ESP8266 in my nodeMCU. I am trying to Setup a Wifi Repeater in NAT mode. Here is the code I have written,
...ANSWER
Answered 2018-Jul-27 at 14:41It's a great idea but the network stack on the ESP8266 is unable to route packets or perform NAT.
The code you've written is trying to act as a proxy, not a router.
A router copies IP packets between network interfaces - it's able to route all protocols that run over IP. NAT rewrites the IP addresses of some of the packets in order to hide the network that's being NATed. The ESP8266 network stack isn't able to do this.
Your code is creating a TCP-based server on port 80 - the web port. It will only be able to proxy TCP packets to port 80 - it won't be able to proxy name server requests or any other protocols.
Proxies are a lot more complicated than you might think. HTTP requires the addition of proxy headers. Proxying encrypted connections is also more complicated and requires listening on port 443. And the client must be configured to know to connect to the proxy server, which must be able to inspect the original request in order to know where to connect to for it.
The ESP8266 network stack is only capable of 5 simultaneous TCP connections. If the original connection is coming from a web browser, web browsers commonly open many more than 5 connections at a time as web pages often pull in CSS, Javascript and images from many locations. And remember that each proxied connection will require an outgoing connection, so proxying even 2 TCP connections will use up 4 of the 5 available. The limitation of 5 simultaneous connections means that an ESP8266 will not be able to successfully act as a proxy for a web browser.
There's a difference between a Wifi client and a TCP client. I wish the Arduino and ESP8266 SDKs had been more clear on their naming here. WiFiServer
actually has nothing to do with WiFi - it's a TCP server.
You're not seeing a connection "Checkpoint 0" here because whatever it is that you're trying to route/proxy doesn't know to open a TCP connection to your ESP8266 (assuming it's even trying to use TCP at all).
It's a nice try but unfortunately the ESP8266 is not suitable for this kind of use.
QUESTION
I am having an issue with mDNS when it is not a part of the standard setup() loop() constructs. I could just leave it in main, however I have other processing I am wanting to do, and leaving it in there is messy and violates the "one purpose, one file" paradigm. Plus, this is driving me crazy.
The following will compile and run with no errors:
main.h
...ANSWER
Answered 2019-Aug-05 at 21:11Often it's best to only pay attention to the first compiler-error generated, since the latter ones are often just follow-on effects of the compiler getting confused by the first error. So:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install mDNSResponder
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page