Glibc is presently missing support for the API defined in RFC 3678. The linux kernel (>= 2.6.0) supports this API. I have attached a patch which add the necessary fields to bits/in.h. This includes both IGMPv3 (IPv4) and MLDv2 (IPv6) versions. However, the functions get/setipv4sourcefilter and get/setsourcefilter still need to be added to netinet/in.h. sys/sockio.h should also be extended.
Created attachment 109 [details] A first version of SSM multicast for libc This patch alone does not satisfy RFC3678. Hopefully, however, it is enough to start glibc people fixing this.
sockio.h ioctl interface is obsolete according to this: http://www.uwsg.indiana.edu/hypermail/linux/kernel/0407.1/1084.html
*** Bug 5 has been marked as a duplicate of this bug. ***
Subject: Re: IP SSM multicast support missing On Mon, Jul 12, 2004 at 11:50:41PM -0000, cra at wpi dot edu wrote: > ------- Additional Comments From cra at wpi dot edu 2004-07-12 23:50 ------- > sockio.h ioctl interface is obsolete according to this: > > http://www.uwsg.indiana.edu/hypermail/linux/kernel/0407.1/1084.html This does not say that the setsockopt interface is obsolete. It is not. The patch I included added the options and structures needed to use the setsockopt interface. There is also a full-state interface I did not do. The setsockopt defines and structures I attached ARE included in the kernel and conform to RFC 3678 which (afaik) is not obsolete. Please note that RFC 3678 is recent (Jan, 2004) and should represent the current state of the art. The SIOC??MSFILTER interface is mentioned in Section 8 Appendix A of RFC 3678 as historic. I can believe that it is obsolete since it is not included in the kernel tree. These interfaces are not the same. There are three interfaces to multicast: Delta based (very old, but still used and in kernel) -- my patch Full-state based [old] -- what is mentioned in that email Full-state based [new] -- still needs to be dealt with The full-state interface is missing, it is: #include <netinet/in.h> int setipv4sourcefilter(int s, struct in_addr interface, struct in_addr group, uint32_t fmode, uint32_t numsrc, struct in_addr *slist); int getipv4sourcefilter(int s, struct in_addr interface, struct in_addr group, uint32_t *fmode, uint32_t *numsrc, struct in_addr *slist); int setsourcefilter(int s, uint32_t interface, struct sockaddr *group, socklen_t grouplen, uint32_t fmode, uint_t numsrc, struct sockaddr_storage *slist); uint32_t *numsrc, struct in_addr *slist); int getsourcefilter(int s, uint32_t interface, struct sockaddr *group, socklen_t grouplen, uint32_t fmode, uint_t *numsrc, struct sockaddr_storage *slist);
(In reply to comment #1, comment #4) > sys/sockio.h should also be extended. > On Mon, Jul 12, 2004 at 11:50:41PM -0000, cra at wpi dot edu wrote: > > sockio.h ioctl interface is obsolete according to this: > This does not say that the setsockopt interface is obsolete. > It is not. I did not say that the setsockopt interface is obsolete. I said that the ioctl interface is obsolete. I was referring to sockios.h (I cannot find a sockio.h anywhere) which has ioctl numbers in it, which you said in comment #1 needed to be extended. To my knowledge, it does not, as there are no new ioctls to implement.
Subject: Re: IP SSM multicast, IGMPv3, RFC3678 support missing On Tue, Jul 13, 2004 at 10:27:30AM -0000, cra at wpi dot edu wrote: > I did not say that the setsockopt interface is obsolete. I said that the ioctl > interface is obsolete. I was referring to sockios.h (I cannot find a sockio.h > anywhere) which has ioctl numbers in it, which you said in comment #1 needed to > be extended. To my knowledge, it does not, as there are no new ioctls to implement. Ok, never mind then. =) There is this old interface which maybe should be there for backwards compatability... But, that's no big deal since Linux has simply never had it.
Here is a tested, working patch with more of the implementation. Everything except the new advanced API functions and prototypes themselves should be there now. According to the Linux kernel folks, the libc advanced full state-based API get/setipv4sourcefilter and get/setsourcefilter functions should be implemented internally using get/setsockopt on IP_MSFILTER and MCAST_MSFILTER. Even without the advanced API, this patch will help a lot of people. Please apply so we can finally have basic SSM support. Thanks.
Created attachment 132 [details] Patch to implement basic API, start of advanced API
The patch is not correct since it moves structures in the wrong headers. I have started adding the definitions to headers in the current CVS sources. I'll get to writing the code for the interfaces in the not too distant future.
I have added all the type and macro definitions and coded the four interface. The result is in CVS now.