I have written a client server program for file transmission from one system to other using UDP.
Can i use the cksum number in the udp header to validate if the received packet is corrupted or not? If yes, how can i extract the header and validate it..
Also is there any way that i can call cksum in c program? Except popen("cksum","r")
So getting the checksum is OS and IP-stack implementation-dependent. BTW: How are you dealing with missing packets? (you are tracking sequence numbers, yes?)
The page quoted by otheus came from the book "Computer Networking - a top-down approach featuring the Internet" with Kurose as one of the authors (Addison Wesley). Consider getting yourself a copy of that one. It was the textbook for networking course in my university.
Specifically, Section 3.4 "Principles of Reliable Data Transfer" discusses the various approaches of developing reliable data transfer over an unreliable transport. That section should answer your question.