Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rtpdump with multiple network interfaces #49

Open
njh opened this issue Mar 23, 2018 · 1 comment
Open

rtpdump with multiple network interfaces #49

njh opened this issue Mar 23, 2018 · 1 comment

Comments

@njh
Copy link
Contributor

njh commented Mar 23, 2018

Hi,

I have been running rtpdump on my MacBook with an Internet connection over Wifi and an AES67 Audio over IP codec connected directly to an Ethernet adaptor, which is sending audio using RTP to a multicast address.

When both network interfaces are enabled, rtpdump does not receive any packets. But if I disable the Wifi interface, it works fine. I don't remember this behaviour when I was last playing with multicast - maybe it is new behaviour in Mac OS? Or maybe I never had more than one network interface.

I started looking into it and found this Stack Overflow question:
https://stackoverflow.com/questions/46484186/receiving-multicast-udp-packets-from-a-single-network-interface-on-macos

So it looks like the following line in rtpdump.c, causes Mac OS to join the multicast group only on the default network interface?

mreq.imr_interface.s_addr = htonl(INADDR_ANY);

Would it make sense to add a command line option to rtpdump to specify the interface address or maybe the interface name to receive multicast packets on?

Thanks,

nick.

@mcd500
Copy link
Contributor

mcd500 commented Mar 24, 2018

Thank you for valuable information and idea.
I was keep using a desktop machine to boot on multiple OSs for checking the build and my desktop machine has only one NIC.
I also need to start trying from how to make the line bellow to support specifying the interface with
setsockopt() by IP_ADD_MEMBERSHIP.
If you have time for programing, I greatly appreciate for the pull request.
I am also happy to know that it is able to build and working on your MacOS (with one network inferface). :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants