multicast

C++ multiple multicast receiver with boost asio

柔情痞子 提交于 2019-12-03 21:32:05
I have to implement a multicast receiver able to join a list of multicast groups and process received data in a specific thread using boost. I did try the following code..... boost::asio::io_service m_io_service; boost::asio::ip::udp::socket m_multicast_socket(m_io_service); // listen address boost::asio::ip::address listen_address = boost::asio::ip::address::from_string("0.0.0.0"); // listen port unsigned short multicast_port = m_configuration->m_multicast_interface_port; boost::asio::ip::udp::endpoint listen_endpoint( listen_address, multicast_port ); // open socket m_multicast_socket.open(

Upper limit to UDP performance on windows server 2008

自闭症网瘾萝莉.ら 提交于 2019-12-03 21:08:39
It looks like from my testing I am hitting a performance wall on my 10gb network. I seem to be unable to read more than 180-200k packets per second. Looking at perfmon, or task manager I can receive up to a million packets / second if not more. Testing 1 socket or 10 or 100, doesn't seem to change this limit of 200-300k packets a second. I've fiddled with RSS and the like without success. Unicast vs multicast doesn't seem to matter, overlapped i/o vs synchronous doesn't make a difference either. Size of packet doesn't matter either. There just seems to be a hard limit to the number of packets

Windows doesn't receive multicast IPv6 packets from all interfaces

邮差的信 提交于 2019-12-03 20:28:10
问题 I am trying to receive IPv6 multicast packets (sent to the ff02::1 address) on Windows using this python 2.7 code- import socket import win_inet_pton import struct socket.IPPROTO_IPV6=41 #because using python 2.7 on wondows PORT = 1234 UDP_BROADCAST_IPv6 = "ff02::1" sock = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM, socket.IPPROTO_UDP) sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) sock.bind(("",PORT)) # not working with "::" either # Join multicast group addrinfo = socket

Subscribing to multiple multicast groups on one socket (Linux, C)

只愿长相守 提交于 2019-12-03 19:34:32
问题 Is it possible to receive data from more than one multicast group on a single socket? For example: void AddGroup(int sock, const char* mc_addr_str, int mc_port, const char* interface) { struct sockaddr_in mc_addr; memset(&mc_addr, 0, sizeof(mc_addr)); mc_addr.sin_family = AF_INET; mc_addr.sin_addr.s_addr = inet_addr(mc_addr_str); mc_addr.sin_port = htons(mc_port); if ((bind(sock, (struct sockaddr *) &mc_addr, sizeof(mc_addr))) < 0) { perror("bind() failed"); exit(1); } // construct an IGMP

Netlink Multicast Kernel Group

走远了吗. 提交于 2019-12-03 17:34:28
The task I am trying to achieve is actually quite simple (multicast the string "TEST" to a userland daemon), but the kernel module doesn't compile. It stops with the error: passing argument 4 of ‘genlmsg_multicast_allns’ makes integer from pointer without a cast [enabled by default] But shouldn't it just be the multicast group I defined? Here is the code for "clarification": #include <linux/module.h> #include <net/sock.h> #include <linux/netlink.h> #include <linux/skbuff.h> #include <linux/string.h> #include <net/netlink.h> #include <net/genetlink.h> struct sock *nl_sk = NULL; static void

UDP multicast client does not see UDP multicast traffic generated by tcpreplay

被刻印的时光 ゝ 提交于 2019-12-03 17:24:35
问题 I have two programs: server ... it generates UDP traffic on a chosen multicast listener ... it prints UDP traffic on a chosen multicast (it subscribes to a multicast and prints whatever it receives). When I run the server on one machine and listeners on some (other) machine(s), the listener sees UDP traffic and prints it correctly. So these programs should be in a good shape. However, when I try to capture the traffic, on whatever machine, with tcpdump: sudo tcpdump -i eth0 'dst 233.65.120

Reliable Multicast over local network

走远了吗. 提交于 2019-12-03 16:26:55
I am implementing a messaging system using C++ and Qt. After much thought, I have determined that multicasting or a multicast-style technique will work best to solve my problem. However, I have learned about UDP's unreliability and believe it to be unacceptable. My requirements are as follows: Messages are to be sent in a binary serialized form. From any given node on the network, I must be able to send messages to the other nodes. Message delivery must be insured. I have heard of OpenPGM and NORM as alternatives for UDP. If anyone has experience with either of these, could you please share? I

How to minimize UDP packet loss

醉酒当歌 提交于 2019-12-03 16:09:37
I am receiving ~3000 UDP packets per second, each of them having a size of ~200bytes. I wrote a java application which listens to those UDP packets and just writes the data to a file. Then the server sends 15000 messages with previously specified rate. After writing to the file it contains only ~3500 messages. Using wireshark I confirmed that all 15000 messages were received by my network interface. After that I tried changing the buffer size of the socket (which was initially 8496bytes): (java.net.MulticastSocket)socket.setReceiveBufferSize(32*1024); That change increased the number of

Refresh multicast group membership

只谈情不闲聊 提交于 2019-12-03 15:08:52
I have several embedded machines listening and streaming rtp audio data to a multicast group. They are connected to a smart managed switch (Netgear GS108Ev2) which does basic igmp snooping and multicast filtering on its ports, so that the rest of my (W)LAN doesn't get flooded. At start everything works fine for about 500-520 seconds. After that, they don't receive any more data until they leave and join the group again. I guess the switch is "forgetting" about the join after a timeout. Is there any way to refresh the group membership, i.e. letting the switch know, that there ist still someone

How to send multicast messages and reuse a port in Erlang?

99封情书 提交于 2019-12-03 13:55:06
I have gotten a good start on my program, my first REAL Erlang program. I have it listening for messages, reading them and parsing them. I also have it sending them. The one little thing that is bothering me is I can't SEND on Port 5353, I have tried everything. All the other applications on my machine can listen AND send on port 5353, SubEthaEdit, iTunes, iChat. The solution MUST broadcast send on port 5353 and here is why. " If the source UDP port in a received Multicast DNS Query is not port 5353, this indicates that the client originating the query is a simple client that does not fully