And here they explain that if you use SOCK_RAW, you should look out for bad datagrams:
https://learn.microsoft.com/en-us/windows/win32/winsock/tcp-...