Subject: the size of an argument for set/getsockopt(2)
To: None <tech-kern@netbsd.org>
From: Hitoshi Asaeda <Hitoshi.Asaeda@sophia.inria.fr>
List: tech-kern
Date: 05/28/2002 17:12:00
I have a question of "the size of an argument for set/getsockopt(2)".

Current NetBSD kernel (1.5 or later) seems the argument of
set/getsockopt() is stored in a mbuf. This implies we cannot input/get
larger storage than MLEN to/from it. (I think this is only inherited
some historical rules.)

Do we have a chance to break this rule in near future? Someone will
be able to change this spec?
I need to specify larger area to set/getsockopt(), because of, e.g.,
MLDv2 implementation.

e.g.,

struct group_source_req {
       u_int32_t			gsr_interface;  /* interface index */
       struct  sockaddr_storage		gsr_group;      /* group address */
       struct  sockaddr_storage		gsr_source;     /* source address */
};

Then,
	setsockopt(so, IPPROTO_IPV6, cmd, (char *)&gsreq,
		   sizeof(struct group_source_req))
returns error.

I'm not a FreeBSD user, but FreeBSD (at least, -current) may permit
it, I feel.
--
Hitoshi Asaeda