Im playing with 'recvfrom' and 'sendto' calls using UDP. I have a client that just broadcast UDP packets on port 6000. I have a server that binds a socket on port 6000, and do a single recvfrom.
The problem is that sin_port member of struct sockaddr returned from recvfrom is always incorrect. Why?
I would post some source code but someone already posted that question (with no answers) and I'm using almost the same code as he. Besides, you can get further information about this problem reading his post: FORUM POST.
Thanks in advance
EDIT: I really think 'cause number 2' from 'nos' answer might be the problem. How can I check it?