From: "Charles R. Anderson" <cra@WPI.EDU>
To: linux-kernel@vger.kernel.org
Subject: Re: v2.6 IGMPv3 implementation
Date: Mon, 12 Jul 2004 21:21:52 -0400 [thread overview]
Message-ID: <20040713012152.GL7822@angus.ind.WPI.EDU> (raw)
In-Reply-To: <20040713.062226.130914590.yoshfuji@linux-ipv6.org>
On Tue, Jul 13, 2004 at 06:22:26AM +0900, YOSHIFUJI Hideaki / ?$B5HF#1QL@ wrote:
> These ioctls are "historic" and deprecated API.
> So, just kill them to avoid confusion.
> We use socket options.
Thank you. I have now read RFC3678 carefully and I have more
questions. The kernel still declares the structs used for these
obsolete ioctls, but instead defines sockoptions for them:
#define IP_MSFILTER 41
...
#define MCAST_MSFILTER 48
...
struct ip_msfilter {
__u32 imsf_multiaddr;
__u32 imsf_interface;
__u32 imsf_fmode;
__u32 imsf_numsrc;
__u32 imsf_slist[1];
};
#define IP_MSFILTER_SIZE(numsrc) \
(sizeof(struct ip_msfilter) - sizeof(__u32) \
+ (numsrc) * sizeof(__u32))
...
struct group_filter
{
__u32 gf_interface; /* interface index */
struct __kernel_sockaddr_storage gf_group; /* multicast address */
__u32 gf_fmode; /* filter mode */
__u32 gf_numsrc; /* number of sources */
struct __kernel_sockaddr_storage gf_slist[1]; /* interface index */
};
#define GROUP_FILTER_SIZE(numsrc) \
(sizeof(struct group_filter) - sizeof(struct __kernel_sockaddr_storage) \
+ (numsrc) * sizeof(struct __kernel_sockaddr_storage))
Is it intended that glibc use these sockoptions internally for its
implementation of the approved Advanced API functions, which are then
exported to user programs:
setipv4sourcefilter()
getipv4sourcefilter()
setsourcefilter()
getsourcefilter()
Does the following limitation from RFC3678 Appendix A (rationale for
the ioctl interface) apply to the Linux kernel getsockopt(), or can
getsockopt() be used to retrieve the source filter for a given group?
Retrieving the source filter for a given group cannot be done with
getsockopt() on some existing platforms, since the group and
interface must be passed down in order to retrieve the correct
filter, and getsockopt only supports an output buffer. This can,
however, be done with an ioctl(), and hence for symmetry, both gets
and sets are done with an ioctl.
Thank you for putting up with all my questions.
next prev parent reply other threads:[~2004-07-13 1:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-12 20:30 v2.6 IGMPv3 implementation Charles R. Anderson
2004-07-12 21:04 ` David S. Miller
2004-07-12 22:27 ` Charles R. Anderson
2004-07-12 22:48 ` YOSHIFUJI Hideaki / 吉藤英明
2004-07-12 21:22 ` YOSHIFUJI Hideaki / 吉藤英明
2004-07-13 1:21 ` Charles R. Anderson [this message]
2004-07-13 1:51 ` YOSHIFUJI Hideaki / 吉藤英明
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040713012152.GL7822@angus.ind.WPI.EDU \
--to=cra@wpi.edu \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox