[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sip-implementors
Subject:    RE: [Sip-implementors] multiple pdus per tcp packet
From:       "Paul Long" <plong () ipdialog ! com>
Date:       2001-06-25 16:04:17
Message-ID: NEBBIELHMLDIACLLJHCNEEDCCPAA.plong () ipdialog ! com
[Download RAW message or body]

Just to re-iterate what Bob said, TCP packetization is transparent to
message processing in SIP, Megaco, H.323, etc. IOW, a datagram boundary has
no meaning because TCP merely guarantees to transport a stream of bytes in
order. Period. In implementing the logic for this, you must be careful, but
it doesn't require that much processing and certainly not parsing the
message twice. For example, the code we use for this is only a few dozen
lines of C source code, plus it is shared between our SIP and Megaco
implementations.

Paul Long
ipDialog, Inc.

-----Original Message-----
From: sip-implementors-admin@cs.columbia.edu
[mailto:sip-implementors-admin@cs.columbia.edu]On Behalf Of Bob Penfield
Sent: Saturday, June 23, 2001 11:25 AM
To: Shail Bhatnagar; sip-implementors@cs.columbia.edu
Subject: Re: [Sip-implementors] multiple pdus per tcp packet



----- Original Message -----
From: "Shail Bhatnagar" <shbhatna@cisco.com>
To: <sip-implementors@cs.columbia.edu>
Sent: Saturday, June 23, 2001 8:57 AM
Subject: [Sip-implementors] multiple pdus per tcp packet


> Bis-03 says explicitly that each datagram
> will have one request or response.
> With TCP transport however, there is a possibility
> of re-using the same connectin for multiple
> transactions and due to TCP segment size,
> SIP PDUs may be clipped or there may be multiple
> in a single tcp packet. Is this how everyone
> understands it to be ?

Yes. You have to implement your TCP socket reader to handle  a) multilple
SIP messages per packet; b) multiple packets per SIP message; and c) a
combination of both.

> This also implies
> implicitly that you would have to potentially
> parse the message twice.

Not if you keep enough state about the message.

>
> On a related note, is the behavior of a user agent
> correct in the following scenario :
>
> A proxy opens a tcp connection to a user agent
> and sends a request and re-uses the connection
> to send another request. The first transaction
> is setup and the user agent decides to close the
> connection, thereby jeopardizing the second
> transaction that was using the same connection.
>
> IS this acceptable ??
>
Yes. BIS also says in sec 14.2:

   If a server needs to return a response to a client and no longer has
   a connection open to that client, it MAY open a connection to the
   address listed in the Via header. Thus, a proxy or user agent MUST be
   prepared to receive both requests and responses on a "passive"
   connection.


> Thanks,
> Shail


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic