Search code examples
network-programmingwindows-server-2008-r2multicastipv4

Limitation of IP_ADD_SOURCE_MEMBERSHIP on a Windows 2008 Server


I want to build an application which wants to recive data from several multicast groups (up to 1.000!) Is this possible with the setsockopt function (IP_ADD_SOURCE_MEMBERSHIP)? Or is there a system limit?

Is there another way to do it? Or do I have to use more than one socket?

Thanks!


Solution

  • I've found something on this Microsoft site: INFO: Header and Library Requirement When Set/Get Socket Options at the IPPROTO_IP Level

    There exists a define

    #define IP_MAX_MEMBERSHIPS 20 /* per socket; must fit in one mbuf */

    The mbuf struct has a maximum size of 108 bytes.

    TCP/IP Illustrated: Vol. 2: The Implementation