multicast

Problem in listening to multicast in C++ with multiple NICs

耗尽温柔 提交于 2019-12-08 12:24:58
问题 Hi I am trying to write a multicast client on a machine with two NICs, and I can't make it work. I can see with a sniffer that once I start the program the NIC (eth4) start receiving the multicast datagrams, However, I can't recieve() any in my program. when running "tshark -i eth4 -R udp.port==xxx (multicast port)" I get: 1059.435483 y.y.y.y. (some ip) -> z.z.z.z (multicast ip, not my eth4 NIC IP) UDP Source port: kkk (some other port) Destination port: xxx (multicast port) Searched the web

How do I implement multicast dynamic join/prune using ns3

自作多情 提交于 2019-12-08 10:38:20
问题 Is there a way to implement the dynamic prune/graft of nodes in a multicast network using ns3. The resources I could find all implements only static routing for multicast networks. 回答1: Referencing this: http://www.nsnam.org/docs/release/3.16/doxygen/classns3_1_1_ipv4_static_routing_helper.html#ae69a07ded3139dfd4e21bb7c10eba416 In ns-3 we set a default multicast route for the node's routing table executing SetDefaultMulticastRoute(dev,nd) , which as the documentation states is equivalent to

Receive multicast UDP datagrams with python on Linux

江枫思渺然 提交于 2019-12-08 09:34:53
问题 I have a hardware device that sends multicast data on my network. I have written a python script that receives the data and prints it. However, I've found that it only works on my Windows XP PC and doesn't work on my Ubuntu Linux 10.04 PC. Under Linux, nothing is received. It just goes round the while loop and there's never any data received. My code is posted below. Can you see any reason why this will not work under Linux? Thanks, Rab. # Multicast client # Adapted from: http://chaos.weblogs

Could not join Multicast group : No such Device

六月ゝ 毕业季﹏ 提交于 2019-12-08 05:47:31
问题 I would like to stream camera data over UDP multicast using gstreamer. For that i used below pipeline, gst-launch-1.0 v4l2src ! videoconvert ! video/x-raw,width=720,height=576,framerate=25/1 ! x264enc ! mpegtsmux ! rtpmp2tpay ! udpsink host=224.1.1.1 port=9090 auto-multicast=true sync=true async=false qos=true But, I am getting below error, could not get/set settings from/on resource : gstmultiudpsink.c(948): gst_multiudpsink_configure_client (): Could not join Multicast group : No such

Getting local UDP server information into c++

試著忘記壹切 提交于 2019-12-08 05:41:44
问题 So, I got this program running on my mac, ipMidi, that allows me to send midi events through my ethernet connection. It works under UDP protocol and is sending midi from my Ableton Live daw. I'm trying to read, in the same machine that is running ipMidi, the packages from ipMidi into my C++ program, but I can't figure out how to do this. I've been doing research for some time know and I just can't figure out how to get the ipMidi to send the packages to my local host or to sniff the packages

Multicast Ping (Windows)

倾然丶 夕夏残阳落幕 提交于 2019-12-08 05:01:06
问题 I am trying to implement server auto discovery so that clients will be able to see a list of servers available to connect to. I would like to auto discover servers even if they are in different subnets. I have read that windows does not respond to broadcast ping, but is it possible to make all these servers to join a multicast group and use multicast ping on the group to see what servers are up? Thanks 回答1: Try Zero configuration networking (Zeroconf). Note multiple LAN segments requires

How do I implement a multicast client in NIO.2?

↘锁芯ラ 提交于 2019-12-07 17:22:07
问题 How would an example of using a Java 7 NIO.2 multicast client look like? I could only find half of an example in the MulticastChannel documentation. 回答1: This example works. Note that DatagramChannel.join() requires a NetworkInterface to work. NetworkInterface ni = NetworkInterface.getByInetAddress(address); InetAddress group = InetAddress.getByName("239.255.0.1") DatagramChannel dc = DatagramChannel.open(StandardProtocolFamily.INET) .setOption(StandardSocketOptions.SO_REUSEADDR, true) .bind

Why are multicast messages on the same port but from different groups combined? [duplicate]

戏子无情 提交于 2019-12-07 11:23:29
This question already has an answer here : Duplicate packets in Python multicast receiver (1 answer) Closed 4 years ago . On an Ubuntu 14.04 server I have two processes, each listening for multicast messages on the same port, but from different groups. I would not have expected this, but each sees traffic from both the group they want, and the other group. As far as I can tell, this is known behavior (though I would call it a problem). I found this SO question , which provides some techniques for determining the multicast group that data is being received from, but it does not answer the

Receiving multicast data from different groups on the same socket in linux

蓝咒 提交于 2019-12-07 08:50:52
问题 Say I want to receive data from 239.1.2.3:20000 and also from 239.4.5.6:20001 in a linux C program. Can I do so with just one socket? I can of course join multiple groups on the socket using the IP_ADD_MEMBERSHIP setsockopt option, but, since the ports are different, I am not sure if it is possible to somehow "bind to both ports" 回答1: No, you can't bind a socket to 2 ports, you need a socket per port. 回答2: In TCP, there needs to be one socket per client. This is because the socket needs to

Multicast Ping (Windows)

假如想象 提交于 2019-12-07 07:13:25
I am trying to implement server auto discovery so that clients will be able to see a list of servers available to connect to. I would like to auto discover servers even if they are in different subnets. I have read that windows does not respond to broadcast ping, but is it possible to make all these servers to join a multicast group and use multicast ping on the group to see what servers are up? Thanks Try Zero configuration networking (Zeroconf) . Note multiple LAN segments requires routers to be configured to route multicast traffic, they do not by default. Similarly IGMP enabled switches