[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(usagi-users 00435) Re: CMSG_SPACE() == inet6_option_space() (RFC 2292) ?



>>>>> On Thu, 26 Apr 2001 16:33:00 +0200, 
>>>>> Juan Fco Rodriguez Hervella <jrh@xxxxxxxxxx> said:

> What is the difference between CMSG_SPACE() and inet6_option_space() ?
> I can not see it.

inet6_option_space() does not take acount of the next header and
header length field of the corresponding option header.

The KAME's implementation (you can get it from http://www.kame.net/)
would describe the difference more clearer:

int
inet6_option_space(nbytes)
	int nbytes;
{
	nbytes += 2;	/* we need space for nxt-hdr and length fields */
	return(CMSG_SPACE((nbytes + 7) & ~7));
}

					JINMEI, Tatuya
					Communication Platform Lab.
					Corporate R&D Center, Toshiba Corp.
					jinmei@xxxxxxxxxxxxxxxxxxxxx