The read () API reads multicast datagrams that are being sent. Note: The IP_ADD_MEMBERSHIP option must be called for each local interface over which the multicast datagrams are to be received. In this example, the multicast group (225.1.1.1) is joined on the local 9.5.1.1 interface. The port being added in this case is TCP 1234 and it is set up to map the internet side of the router to the internal IP address of 192.168.1.241, so anyone connecting to TCP port 1234 on the external IP address of the router will be connected to port 1234 on internal. You can also set the interface on runtime in sockperf:To send a M-SEARCH multicast message, here is a simple Python script. Example # route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0 where eth0 is the Ethernet interface. If you want to use multicast, you must first configure the routing table to map multicast addresses to the Ethernet interface, on both client and server.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |