How to add my host to Multicast Group…!

随声附和 提交于 2020-01-07 08:27:21

问题


I want test the Multicast functionality in my NIC Manually. I found a tool to generate the multicast traffic using Mint tool, I installed it and now I want add my host to Multicast Group how to do that can anyone suggest me or other way to test the Multicast Functionality. Thanks in Advance.


回答1:


Create a UDP socket, bind it to the multicast group and teh port number on which you would send the multicast traffic. Next, set multicast IP_ADD_MEMBERSHIP and pass the group number. Once these steps are done, you can call recvfrom() for that fd and you should be able to receive the packets. You might find this useful: http://www.cs.unc.edu/~jeffay/dirt/FAQ/comp249-001-F99/mcast-socket.html



来源:https://stackoverflow.com/questions/18503464/how-to-add-my-host-to-multicast-group

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!