Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Thanks for the answer! You're right, UDP contains a checksum but you can always put 0 there, preventing it from being checked. Moreover, from my experience it seems that an OS (in my case a Linux distro) allows to receive UDP packets even with incorrect checksums if you use raw sockets.
Thank you for your answer! This is what exactly I want to know. I just want to clarify one thing. Once local port is assigned implicitly (I assume by the network stack of an operating system), what is the default behavior? I.e., if I develop an application opening one socket and relying on the OS to assign source port, by default is it going to assign one source port until the socket is closed (or timeout?) or new source port for every new request?