1

How I can receive UDP multicast from all subnets?

view story
linux-howto

http://stackoverflow.com – The following code receive only UDP multicast in my subnet. How I can receive UDP multicast from all subnets? sd = socket(AF_INET, SOCK_DGRAM, 0); int reuse = 1; setsockopt(sd, SOL_SOCKET, SO_REUSEADDR, (char *) &reuse, sizeof(reuse)); memset((char *) &localSock, 0, sizeof(localSock)); localSock.sin_family = AF_INET; localSock.sin_port = htons(1900); localSock.sin_addr.s_addr = INADDR_BROADCAST; bind(sd, (struct sockaddr*) &localSock, sizeof(localSock)); group.imr_multiaddr.s_addr = inet_addr("239.255.255.250"); group.imr_inte (HowTos)