Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UDP question 1

Status
Not open for further replies.

Cagliostro

Programmer
Sep 13, 2000
4,226
GB
Hi,
Is there any waranty what if UDP datagram reaches the target, it is not altered? I mean, if there are errors on the net, is UDP datagram destroyed or is sent corrupt to the target?

Ion Filipski
1c.bmp

ICQ: 95034075
AIM: IonFilipski
filipski@excite.com
 
UDP is an unreliable protocol as it does not establish a connection with the host it is sending it to, so if there is errors the packet will most like just disapear and not arrive as the host.

 
Hi, does anyone know? I know what kind of protocol is UDP and I do not want responces like "most like". I want know, are bad datagrams destroyed or not.

Ion Filipski
1c.bmp

ICQ: 95034075
AIM: IonFilipski
filipski@excite.com
 
Ion,

UDP packets contain a checksum in order to detect bad datagrams; however, RFC 768 does not specify how to deal with packets having bad checksums (one assumes the packet is discarded).

Fear not, for IP holds the answer! If the checksum in the IP header is bad, the packet is discarded. Assuming you are using UDP over IP, as is normally the case, you can rest easy knowing that UDP packets with bad checksums are discarded by the first entity to detect the error.


Cheers,

Jason
 
But if you are building your own app to use UDP, you can always hash the data payload portion of the packet and append the hash to the beginning or end. Then you will have extremely high confidence in the payload if the packet does arrive.


pansophic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top