All of lore.kernel.org
 help / color / mirror / Atom feed
* one-to-many question
@ 2013-08-15 10:25 xiong wei
  2013-08-15 11:42 ` Daniel Borkmann
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: xiong wei @ 2013-08-15 10:25 UTC (permalink / raw)
  To: linux-sctp

Hi, experts

For one-to-many mode. Suppose I have a socket which contain several
associations in it. that means there are several clients connect with
server.

If I use sendmsg(...) function to send msg from server, How does sctp
identify which association will receive the data? Does all clients will
receive the msg?

And, Does sctp provide a way for server to send msg to all associations
in one syscall ?

Thanks.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: one-to-many question
  2013-08-15 10:25 one-to-many question xiong wei
@ 2013-08-15 11:42 ` Daniel Borkmann
  2013-08-15 11:42 ` Michael Tuexen
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Daniel Borkmann @ 2013-08-15 11:42 UTC (permalink / raw)
  To: linux-sctp

On 08/15/2013 12:25 PM, xiong wei wrote:
> Hi, experts
>
> For one-to-many mode. Suppose I have a socket which contain several
> associations in it. that means there are several clients connect with
> server.
>
> If I use sendmsg(...) function to send msg from server, How does sctp
> identify which association will receive the data? Does all clients will
> receive the msg?
>
> And, Does sctp provide a way for server to send msg to all associations
> in one syscall ?

Neil Horman wrote:

The receiving association is specified in either the msg_name field of the
message header or the association id field of the sndrcv_info cmsg header in the
datagram.  IIRC there is no was to send to all associations at once in a single
syscall, unless you want to marshall up all the data and pass it down via the
sendmmsg syscall, which I don't think lksctp-tools supports yet (though that
would be a nice feature).
Neil

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: one-to-many question
  2013-08-15 10:25 one-to-many question xiong wei
  2013-08-15 11:42 ` Daniel Borkmann
@ 2013-08-15 11:42 ` Michael Tuexen
  2013-08-15 15:13 ` Michael Tuexen
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Michael Tuexen @ 2013-08-15 11:42 UTC (permalink / raw)
  To: linux-sctp

On Aug 15, 2013, at 12:25 PM, xiong wei <xiongwei@skyge.com> wrote:

> Hi, experts
> 
> For one-to-many mode. Suppose I have a socket which contain several
> associations in it. that means there are several clients connect with
> server.
> 
> If I use sendmsg(...) function to send msg from server, How does sctp
> identify which association will receive the data? Does all clients will
> receive the msg?
You can use the deprecated cmsg SCTP_SNDRCV and specify the association id.
See http://tools.ietf.org/html/rfc6458#section-5.3.2
I'm not sure if Linux supports the newer cmsg SCTP_SNDINFO yet.
See http://tools.ietf.org/html/rfc6458#section-5.3.4
> 
> And, Does sctp provide a way for server to send msg to all associations
> in one syscall ?
To send the message on all associations, you can set the SCTP_SENDALL
flags. See the above references. I'm not sure if this flag is supported
by Linux or not.

Best regards
Michael
> 
> Thanks.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: one-to-many question
  2013-08-15 10:25 one-to-many question xiong wei
  2013-08-15 11:42 ` Daniel Borkmann
  2013-08-15 11:42 ` Michael Tuexen
@ 2013-08-15 15:13 ` Michael Tuexen
  2013-08-15 17:28 ` Neil Horman
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Michael Tuexen @ 2013-08-15 15:13 UTC (permalink / raw)
  To: linux-sctp

On Aug 15, 2013, at 1:42 PM, Daniel Borkmann <dborkman@redhat.com> wrote:

> On 08/15/2013 12:25 PM, xiong wei wrote:
>> Hi, experts
>> 
>> For one-to-many mode. Suppose I have a socket which contain several
>> associations in it. that means there are several clients connect with
>> server.
>> 
>> If I use sendmsg(...) function to send msg from server, How does sctp
>> identify which association will receive the data? Does all clients will
>> receive the msg?
>> 
>> And, Does sctp provide a way for server to send msg to all associations
>> in one syscall ?
> 
> Neil Horman wrote:
> 
> The receiving association is specified in either the msg_name field of the
Can you specify on Linux an sctp_assoc_t? Or would you specify one of the
remote IP addresses? Specifying an sctp_assoc_t would be Linux specific,
I guess. At least this isn't covered by 
http://tools.ietf.org/html/rfc6458
as far as I know.

Best regards
Michael
> message header or the association id field of the sndrcv_info cmsg header in the
> datagram.  IIRC there is no was to send to all associations at once in a single
> syscall, unless you want to marshall up all the data and pass it down via the
> sendmmsg syscall, which I don't think lksctp-tools supports yet (though that
> would be a nice feature).
> Neil
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: one-to-many question
  2013-08-15 10:25 one-to-many question xiong wei
                   ` (2 preceding siblings ...)
  2013-08-15 15:13 ` Michael Tuexen
@ 2013-08-15 17:28 ` Neil Horman
  2013-08-15 18:50 ` Vlad Yasevich
  2013-08-15 19:02 ` Michael Tuexen
  5 siblings, 0 replies; 7+ messages in thread
From: Neil Horman @ 2013-08-15 17:28 UTC (permalink / raw)
  To: linux-sctp

On Thu, Aug 15, 2013 at 05:13:10PM +0200, Michael Tuexen wrote:
> On Aug 15, 2013, at 1:42 PM, Daniel Borkmann <dborkman@redhat.com> wrote:
> 
> > On 08/15/2013 12:25 PM, xiong wei wrote:
> >> Hi, experts
> >> 
> >> For one-to-many mode. Suppose I have a socket which contain several
> >> associations in it. that means there are several clients connect with
> >> server.
> >> 
> >> If I use sendmsg(...) function to send msg from server, How does sctp
> >> identify which association will receive the data? Does all clients will
> >> receive the msg?
> >> 
> >> And, Does sctp provide a way for server to send msg to all associations
> >> in one syscall ?
> > 
> > Neil Horman wrote:
> > 
> > The receiving association is specified in either the msg_name field of the
> Can you specify on Linux an sctp_assoc_t? Or would you specify one of the
> remote IP addresses? Specifying an sctp_assoc_t would be Linux specific,
> I guess. At least this isn't covered by 
> http://tools.ietf.org/html/rfc6458
> as far as I know.
> 
Its a sockaddr structure that is used in the lookup of sctp_sendmsg, so It
should be a peer ip address (either v4 or v6)
Neil

> Best regards
> Michael
> > message header or the association id field of the sndrcv_info cmsg header in the
> > datagram.  IIRC there is no was to send to all associations at once in a single
> > syscall, unless you want to marshall up all the data and pass it down via the
> > sendmmsg syscall, which I don't think lksctp-tools supports yet (though that
> > would be a nice feature).
> > Neil
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: one-to-many question
  2013-08-15 10:25 one-to-many question xiong wei
                   ` (3 preceding siblings ...)
  2013-08-15 17:28 ` Neil Horman
@ 2013-08-15 18:50 ` Vlad Yasevich
  2013-08-15 19:02 ` Michael Tuexen
  5 siblings, 0 replies; 7+ messages in thread
From: Vlad Yasevich @ 2013-08-15 18:50 UTC (permalink / raw)
  To: linux-sctp

On 08/15/2013 11:13 AM, Michael Tuexen wrote:
> On Aug 15, 2013, at 1:42 PM, Daniel Borkmann <dborkman@redhat.com> wrote:
>
>> On 08/15/2013 12:25 PM, xiong wei wrote:
>>> Hi, experts
>>>
>>> For one-to-many mode. Suppose I have a socket which contain several
>>> associations in it. that means there are several clients connect with
>>> server.
>>>
>>> If I use sendmsg(...) function to send msg from server, How does sctp
>>> identify which association will receive the data? Does all clients will
>>> receive the msg?
>>>
>>> And, Does sctp provide a way for server to send msg to all associations
>>> in one syscall ?
>>
>> Neil Horman wrote:
>>
>> The receiving association is specified in either the msg_name field of the
> Can you specify on Linux an sctp_assoc_t? Or would you specify one of the
> remote IP addresses? Specifying an sctp_assoc_t would be Linux specific,
> I guess. At least this isn't covered by
> http://tools.ietf.org/html/rfc6458
> as far as I know.

msg_name would contain the address, not the association id.

-vlad
>
> Best regards
> Michael
>> message header or the association id field of the sndrcv_info cmsg header in the
>> datagram.  IIRC there is no was to send to all associations at once in a single
>> syscall, unless you want to marshall up all the data and pass it down via the
>> sendmmsg syscall, which I don't think lksctp-tools supports yet (though that
>> would be a nice feature).
>> Neil
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: one-to-many question
  2013-08-15 10:25 one-to-many question xiong wei
                   ` (4 preceding siblings ...)
  2013-08-15 18:50 ` Vlad Yasevich
@ 2013-08-15 19:02 ` Michael Tuexen
  5 siblings, 0 replies; 7+ messages in thread
From: Michael Tuexen @ 2013-08-15 19:02 UTC (permalink / raw)
  To: linux-sctp

On Aug 15, 2013, at 8:50 PM, Vlad Yasevich <vyasevich@gmail.com> wrote:

> On 08/15/2013 11:13 AM, Michael Tuexen wrote:
>> On Aug 15, 2013, at 1:42 PM, Daniel Borkmann <dborkman@redhat.com> wrote:
>> 
>>> On 08/15/2013 12:25 PM, xiong wei wrote:
>>>> Hi, experts
>>>> 
>>>> For one-to-many mode. Suppose I have a socket which contain several
>>>> associations in it. that means there are several clients connect with
>>>> server.
>>>> 
>>>> If I use sendmsg(...) function to send msg from server, How does sctp
>>>> identify which association will receive the data? Does all clients will
>>>> receive the msg?
>>>> 
>>>> And, Does sctp provide a way for server to send msg to all associations
>>>> in one syscall ?
>>> 
>>> Neil Horman wrote:
>>> 
>>> The receiving association is specified in either the msg_name field of the
>> Can you specify on Linux an sctp_assoc_t? Or would you specify one of the
>> remote IP addresses? Specifying an sctp_assoc_t would be Linux specific,
>> I guess. At least this isn't covered by
>> http://tools.ietf.org/html/rfc6458
>> as far as I know.
> 
> msg_name would contain the address, not the association id.
Thanks for the clarification. Makes perfect sense. We do the
same in FreeBSD...

Best regards
Michael
> 
> -vlad
>> 
>> Best regards
>> Michael
>>> message header or the association id field of the sndrcv_info cmsg header in the
>>> datagram.  IIRC there is no was to send to all associations at once in a single
>>> syscall, unless you want to marshall up all the data and pass it down via the
>>> sendmmsg syscall, which I don't think lksctp-tools supports yet (though that
>>> would be a nice feature).
>>> Neil
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>> 
>> 
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> 
> 
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-08-15 19:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-15 10:25 one-to-many question xiong wei
2013-08-15 11:42 ` Daniel Borkmann
2013-08-15 11:42 ` Michael Tuexen
2013-08-15 15:13 ` Michael Tuexen
2013-08-15 17:28 ` Neil Horman
2013-08-15 18:50 ` Vlad Yasevich
2013-08-15 19:02 ` Michael Tuexen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.