1

I have a board (with FPGA) connecting to a windows 10 host through a 10G NIC. The board is set to static IP 10.254.210.10 & the host is 10.254.210.11. I can see the UDP packets in wireshark but it is not pass through to the sockets. UDP packet not able to capture through socket

a) I tried UDP server with socket bind to INADDR_ANY and port 2222. The host has another WI-FI NIC(192.168.x.x). We can capture the packet through sockets when it is entering through this interface. So, I guess it is not a firewall issue.
UDP packet able to capture through socket

b) I created a raw socket but still couldn't capture the packet observed in wireshark. Enabled promiscuous mode.

// enable promiscuous mode
    DWORD dwValue = RCVALL_ON;
    DWORD dwBytesReturned = 0;
    if (WSAIoctl(s, SIO_RCVALL, &dwValue, sizeof(dwValue), NULL, 0, &dwBytesReturned, NULL, NULL) == SOCKET_ERROR)
    {
        
        sprintf(err_msg, "Error to set in promiscous mode: WSAIoctl returned error code %d\n", WSAGetLastError());
        printf("Ioctl failed with error code : %d", WSAGetLastError());
        fwrite(err_msg, sizeof(err_msg), 1, fp);
        closesocket(s);
        WSACleanup();
        exit(EXIT_FAILURE);
    }
    puts("Ioctl done\n");

c) netstat doesn't show any errors in "UDP STatistics for IPv4"

d) Both IP checksum and UDP checksum is set to 0000 (i.e disabled).

2
  • You can only disable UDP checksums by setting it to 0000 per RFC768, but not IP header checksums. Setting the IP header checksum to 0000 does not disable it; it makes it invalid (unless it really was 0000 to begin with). Commented Dec 3, 2022 at 17:53
  • @ChristopherMaynard: Thank you for looking at my question. I tried to include the checksum and it resolved the issue :) Commented Dec 5, 2022 at 15:53

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.