如何将我的主机添加到多播组...! [英] How to add my host to Multicast Group...!

查看:166
本文介绍了如何将我的主机添加到多播组...!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要手动测试NIC中的多播功能. 我找到了一个使用Mint工具生成多播流量的工具,我安装了它,现在我想将主机添加到多播组中,如何做到这一点,任何人都可以建议我或以其他方式测试多播功能.预先感谢.

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.

推荐答案

创建UDP套接字,将其绑定到要在其上发送多播流量的多播组和端口号.接下来,设置多播IP_ADD_MEMBERSHIP并传递组号.完成这些步骤后,您可以为该fd调用recvfrom(),并且应该能够接收数据包.您可能会发现这很有用: http: //www.cs.unc.edu/~jeffay/dirt/FAQ/comp249-001-F99/mcast-socket.html

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

这篇关于如何将我的主机添加到多播组...!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆