Subject: socket api for one2one model

From: KOZUKA Masahiro <[email-masked]>
Date: Tue, 8 Mar 2005 21:42:37 +0900

Hi, sctp-impl.
I have a question about socket api for one2one model.

In using the one2one model(SOCK_STREAM set on socket(2)),
should recvmsg(2) return the source address with msg_name field?

In my view this is not clear, and I think that source address should be
provided in using one2one model as well as one2many(SOCK_DGRAM set).
The reason why I think so is that on SCTP's one2one model the source
address is useful for recipient.

On TCP socket it isn't necessary because it is always same as
one which accept(2) retuened.
Meanwhile an association of SCTP will have one more addresses, so we
can't assure that the source address of the packet is same as
accept(2)'s addr.

P.S.
Wheter msg_name set using the one2one model or not, at least the
specification should be clear at socket api draft.

Regards, Masahiro.
-- 
		--KOZUKA Masahiro, {^-^}/@kozuka.jp, http://www.kozuka.jp/

---

From: Randall Stewart <[email-masked]>
Date: Tue, 08 Mar 2005 10:16:49 -0500

Kozuka-san:

This is a very good question.. I know in KAME we followed
TCP in this and did not return the msg_name field... however
the point is valid.. the source may well be different than
what accept returns...

So which should it be?

Opinions from everyone else... Kacheong, I know you must
have an opinion? Shridhar? what about lk-sctp??

R

-- 
Randall Stewart
ITD
803-345-0369 <or> 815-342-5222

---

From: "Anatoly Khusid" <[email-masked]>
Date: Tue, 8 Mar 2005 10:31:09 -0500

From my expirence, if I remmeber correctly, LKSCTP returns source address in
recvmsg() in msg_name field.

I dont think you need to enable sctp_data_io_event for this.  msg_name is
always there.

-----Original Message-----
From: Randall Stewart [mailto:[email-masked]]
Sent: Tuesday, March 08, 2005 10:17 AM
To: KOZUKA Masahiro
Cc: [email-masked]
Subject: Re: socket api for one2one model

Kozuka-san:

So which should it be?

R

---

From: Vlad Yasevich <[email-masked]>
Date: Tue, 08 Mar 2005 11:27:49 -0500

I think that as long as msg_name is provided, sctp should
fill in the address.

This gives applications control on whether they want it or
not.

-vlad

---

From: Sridhar Samudrala <[email-masked]>
Date: Tue, 8 Mar 2005 23:39:55 +0530 (IST)

As Anatoly and Vlad said, in lksctp if the storage for msg_name is provided
by the user, it is filled with the source address of the received message.

I think this should be made explicit in the api draft.

-Sridhar

--

---

From: Kacheong Poon <[email-masked]>
Date: Tue, 08 Mar 2005 13:25:54 -0800

> have an opinion? Shridhar? what about lk-sctp??

Yes, I think that if msg_name is provided, the source
address should be copied.  We can clarify this in the
next revision of the draft.  BTW, Solaris' 1-1 socket
does the the copy.

-- 

						K. Poon.
						[email-masked]