Difference between IP_IP_ADD_MEMBERSHIP and MCAST_JOIN_GROUP
Hi all, I am working with multicast socket and I saw in the source of the kernel different define for identical operation, what should I use in a setsockopt() ? The file is /incude/linux/in.h #define IP_MULTICAST_IF<http://lxr.linux.no/linux+v3.2.9/+code=IP_MULTICAST_IF> 32 #define IP_MULTICAST_TTL<http://lxr.linux.no/linux+v3.2.9/+code=IP_MULTICAST_TTL> 33 #define IP_MULTICAST_LOOP<http://lxr.linux.no/linux+v3.2.9/+code=IP_MULTICAST_LOOP> 34 #define IP_ADD_MEMBERSHIP<http://lxr.linux.no/linux+v3.2.9/+code=IP_ADD_MEMBERSHIP> 35 #define IP_DROP_MEMBERSHIP<http://lxr.linux.no/linux+v3.2.9/+code=IP_DROP_MEMBERSHIP> 36 #define IP_UNBLOCK_SOURCE<http://lxr.linux.no/linux+v3.2.9/+code=IP_UNBLOCK_SOURCE> 37 #define IP_BLOCK_SOURCE<http://lxr.linux.no/linux+v3.2.9/+code=IP_BLOCK_SOURCE> 38 #define IP_ADD_SOURCE_MEMBERSHIP<http://lxr.linux.no/linux+v3.2.9/+code=IP_ADD_SOURCE_MEMBERSHIP> 39 #define IP_DROP_SOURCE_MEMBERSHIP<http://lxr.linux.no/linux+v3.2.9/+code=IP_DROP_SOURCE_MEMBERSHIP> 40 #define IP_MSFILTER<http://lxr.linux.no/linux+v3.2.9/+code=IP_MSFILTER> 41 #define MCAST_JOIN_GROUP<http://lxr.linux.no/linux+v3.2.9/+code=MCAST_JOIN_GROUP> 42 #define MCAST_BLOCK_SOURCE<http://lxr.linux.no/linux+v3.2.9/+code=MCAST_BLOCK_SOURCE> 43 #define MCAST_UNBLOCK_SOURCE<http://lxr.linux.no/linux+v3.2.9/+code=MCAST_UNBLOCK_SOURCE> 44 #define MCAST_LEAVE_GROUP<http://lxr.linux.no/linux+v3.2.9/+code=MCAST_LEAVE_GROUP> 45 #define MCAST_JOIN_SOURCE_GROUP<http://lxr.linux.no/linux+v3.2.9/+code=MCAST_JOIN_SOURCE_GROUP> 46 #define MCAST_LEAVE_SOURCE_GROUP<http://lxr.linux.no/linux+v3.2.9/+code=MCAST_LEAVE_SOURCE_GROUP> 47 #define MCAST_MSFILTER<http://lxr.linux.no/linux+v3.2.9/+code=MCAST_MSFILTER> 48 I am working with IGMP V3 and I need to handle sources . Thanks in advance, Pietro Paolini
I assume you meant IP_ADD_MEMBERSHIP? IP_ADD_MEMBERSHIP is IPv4 only. MCAST_JOIN_GROUP is protocol independent. This may be clearer if you look at include/linux/in6.h Bjørn
Many thanks, I understood ! Pietro Paolini. -----Original Message----- From: Bjørn Mork [mailto:bjorn@mork.no] Sent: lunedì 1 ottobre 2012 12:54 To: Pietro Paolini Cc: kernelnewbies@kernelnewbies.org Subject: Re: Difference between IP_IP_ADD_MEMBERSHIP and MCAST_JOIN_GROUP I assume you meant IP_ADD_MEMBERSHIP? IP_ADD_MEMBERSHIP is IPv4 only. MCAST_JOIN_GROUP is protocol independent. This may be clearer if you look at include/linux/in6.h Bjørn
participants (2)
-
Bjørn Mork -
Pietro Paolini