udp packet caught by tcpdump, but not received by socket [closed]
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . I wrote a rawudp program to send udp packet via raw socket, following the webpage http://www.tenouk.com/Module43a.html. Then I wrote a udp server to listen to udp packets on given port. The codes look like follows: ... sd = socket(AF_INET, SOCK_DGRAM, 0); bind(sd, (struct sockaddr *)&ipaddr, sizeof(ipaddr));