Subject: Re: ipsec pcb/socket passing
To: None <jonathan@DSG.Stanford.EDU, tech-net@NetBSD.org, sam@errno.com>
From: None <itojun@iijlab.net>
List: tech-net
Date: 08/23/2003 17:42:48
>	why you are insisting on passing inpcb * rather than socket * as args
>	is mystery to me.  once you get to inp_sp (or in6p_sp), there's no need
>	to refer to inpcb *, right?  to support IPv4 mapped address case
>	passing socket * has advantage.

	another reason that passing around socket * is better than passing
	around inpcb *: there are L4 protocols that cannot be handled by inpcb.
	in fact, in KAME tree we have SCTP (RFC2960) code which is waiting to
	be integrated into *BSD.  it uses sctp_pcb which is not inpcb,
	as inpcb cannot handle multiple endpoints which is the major advantage
	of SCTP.  when you want to support SCTP, you will really want to
	pass around socket * rather than inpcb *.
	IPsec for SCTP is defined in RFC3554.

itojun