Launchd Multicast Socket Listener I'm not sure if I've just missed some documentation or not, but I'm having a hard time figuring out how to set up a launchd agent that can be triggered whenever a datagram is received within a multicast group.

What I'd like to know is what a launchd plist should look like to provide a simple datagram listener that is bound to a multicast group.

Here's what I've been trying:

&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
&lt;plist version="1.0"&gt;
&lt;dict&gt;
    &lt;key&gt;Label&lt;/key&gt;
    &lt;string&gt;foo.bar&lt;/string&gt;
    &lt;key&gt;Program&lt;/key&gt;
    &lt;string&gt;/foo/bar&lt;/string&gt;
    &lt;key&gt;Sockets&lt;/key&gt;
    &lt;dict&gt;
        &lt;key&gt;Listeners&lt;/key&gt;
        &lt;dict&gt;
            &lt;key&gt;SockType&lt;/key&gt;
            &lt;string&gt;dgram&lt;/string&gt;
            &lt;key&gt;SockServiceName&lt;/key&gt;
            &lt;string&gt;12345&lt;/string&gt;
            &lt;key&gt;SockFamily&lt;/key&gt;
            &lt;string&gt;IPv4&lt;/string&gt;
            &lt;key&gt;MulticastSocket&lt;/key&gt;
            &lt;string&gt;224.0.0.253&lt;/string&gt;
        &lt;/dict&gt;
    &lt;/dict&gt;
    &lt;key&gt;inetdCompatibility&lt;/key&gt;
    &lt;dict&gt;
        &lt;key&gt;Wait&lt;/key&gt;
        &lt;false/&gt;
    &lt;/dict&gt;
&lt;/dict&gt;
&lt;/plist&gt;


But it just generates getaddrinfo errors ("nodename nor servname provided, or not known"). Removing the multicast group to just setup a UDP port seems to work fine, but I don't really want to have to hard code an IP address or local DNS.

Are there any good examples of how to create a multicast listening launch agent or daemon using launchd? Or am I missing some other step, or misunderstanding what data I should be entering for a multicast group?
I set this one up using LaunchControl.  

&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
&lt;plist version="1.0"&gt;
&lt;dict&gt;
    &lt;key&gt;Label&lt;/key&gt;
    &lt;string&gt;foo/bar&lt;/string&gt;
    &lt;key&gt;Program&lt;/key&gt;
    &lt;string&gt;/foo/bar&lt;/string&gt;
    &lt;key&gt;Sockets&lt;/key&gt;
    &lt;dict&gt;
        &lt;key&gt;Sock1&lt;/key&gt;
        &lt;dict&gt;
            &lt;key&gt;MulticastGroup&lt;/key&gt;
            &lt;string&gt;224.0.0.253&lt;/string&gt;
            &lt;key&gt;SockFamily&lt;/key&gt;
            &lt;string&gt;IPv4&lt;/string&gt;
            &lt;key&gt;SockProtocol&lt;/key&gt;
            &lt;string&gt;UDP&lt;/string&gt;
            &lt;key&gt;SockServiceName&lt;/key&gt;
            &lt;string&gt;12345&lt;/string&gt;
            &lt;key&gt;SockType&lt;/key&gt;
            &lt;string&gt;dgram&lt;/string&gt;
        &lt;/dict&gt;
    &lt;/dict&gt;
    &lt;key&gt;inetdCompatibility&lt;/key&gt;
    &lt;dict&gt;
        &lt;key&gt;Wait&lt;/key&gt;
        &lt;true/&gt;
    &lt;/dict&gt;
&lt;/dict&gt;
&lt;/plist&gt;