Subject: RE: [SIP] Forwarding SIP Invites -- how to decide transport.

From: Jonathan Rosenberg <[email-masked]>
Date: Tue, 31 Oct 2000 12:31:43 -0500

> -----Original Message-----
> From: Vijay K. Gurbani [mailto:[email-masked]]
> Sent: Monday, October 30, 2000 12:49 PM
> To: [email-masked]
> Cc: [email-masked]
> Subject: Re: [SIP] Forwarding SIP Invites -- how to decide transport.
> 
> > I thought UDP connect was just a programming convenience 
> (maybe I am 
> > wrong) and does not check to see if there is a client on 
> the recieving 
> > end that will get the udp packet.
> 
> You are partially right; UDP connect, unlike TCP connect, does not 
> result in a 3-way handshake to ensure that the far peer 
> indeed exists.  
> All it does it to inform the kernel to record the IP address and port 
> number of the peer and associate it with a socket descriptor. 
>  Further 
> I/O to a connected UDP peer can then use the convenient read()/recv() 
> primitives.  Thus, it is more than a programming conbenience. 
>  For more
> information on this, consult Stevens Unix Network Programming, Volume 
> 1, Section 8.11 ("connect Function with UDP").

More importantly, for purposes of this discussion, connect() allows the
kernel to associate ICMP error messages with a socket. Thats why the second
send() results in a failure; the kernel, when it got the ICMP error, knew
which socket was used initially that generated it, and so it can cause the
next call to send on that same socket to generate an error.

Interestingly, this capability wasn't present in Java until just recently.
Igor reported this bug almost two years ago:
http://developer.java.sun.com/developer/bugParade/bugs/4204320.html

-Jonathan R.
---
Jonathan D. Rosenberg                       72 Eagle Rock Ave.
Chief Scientist                             First Floor
dynamicsoft                                 East Hanover, NJ 07936
[email-masked]                     FAX:   (973) 952-5050
http://www.cs.columbia.edu/~jdrosen         PHONE: (973) 952-5000
http://www.dynamicsoft.com

_______________________________________________
SIP mailing list
[email-masked]
http://lists.bell-labs.com/mailman/listinfo/sip