Is it possible for a UDP socket (SOCK_DGRAM) to access checksum field from an incoming UDP packet and check for errors? I know that we can do that using raw sockets (SOCK_RAW), but I want to know whether we can do it using datagram sockets. If so, how can we do it in C?
Checksum checking in UDP using UDP socket
1.6k Views Asked by Karthik Chennupati At
2
There are 2 best solutions below
Related Questions in SOCKETS
- Node.js Server + Socket.IO + Android Mobile Applicatoin XHR Polling Error...?
- My server TCP doesn't receive messages from the client in C
- how is strncpy able to copy from source to empty destination?
- Python Multicast packet receiver stops receiving multicast packets when computer is connected to WiFi
- Python Client-Server Communication with Protocol
- Reversed TLS re-connection issue
- Android 13 & 14 seem to close WebSocket connection, if i put app in background, after ~20s
- Java SocketException: Connection reset,. What is the cause?
- Multipart/form-data with chunked data transfer (ICAP protocol)
- View Socket View
- Client connection timeout during Android & Windows PC communication via sockets
- Browser connect to raw sockets even possible?
- Protocol 43200 after unpacking received data
- Unity SocketIo using Best http2 plugin want to use in webgl
- How does pre-allocating a pool of SocketAsyncEventArgs objects upfront improve the performance of a server application in c#
Related Questions in NETWORK-PROGRAMMING
- "(Reason: CORS header ‘Access-Control-Allow-Origin’ missing)" while trying to access Actix webserver from Wix site
- My server TCP doesn't receive messages from the client in C
- I am currently trying to implement a rudimentary firewall from a video I watched but the nimda worm detection is not working and i do not know why?
- Is there a way to trigger a network buffer flush in Python?
- Redirect outbound traffic to a different port
- Post request response time spikes
- How to connect docker container to vpn site to site
- EADDRNOTAVAIL Node JS
- How to handle Okhttp3 POST Failing after changing location? Roaming issue?
- Why my message doesn't write into the socket when I try to read the response after sending it?
- Networkx Multiple Circular Layouts Combined Together
- trivial socket program failing at accept() with errno 22
- getaddrinfo() returning unexpected results
- JmDNS create() function not working on my device
- What C code will determine the network adapter being used by an open socket?
Related Questions in UDP
- Discussion on using golang to implement UDP client timeout retransmission
- What is the correct way to setup and use the Ethernet library in Arduino in order to send and receive UDP broadcast messages between LAN devices?
- Multicast packets not received on windows
- Microcontroller hangs with LWIP UDP
- UDP socket client not able to receive data
- "Parameter is not valid" exception when using Image.FromStream() - UDP Video live stream
- k3s change requested UDP port assignment
- Why does the python client socket receiving a reply but still throw the exception in some threadings?
- Gnuradio "double free or corruption (!prev)" error
- Why we need wraparound in UPD checksum algorithm?
- Simple Java UDP server/client-program works on local machine but not over either LAN (different machines) or internet
- Docker bridge does not transmit from tcpreplay IPv6/UDP/GTP traffic
- trying to send TCP packet and recieve it back and count time in client+server app
- recvmsg returns EAGAIN after select reports file descriptor is ready
- Receiving UDP broadcast on Android
Related Questions in RAW-SOCKETS
- Sending icmp raw sockets
- Is there a difference in format between a packet received via SLIP and one from an Ethernet?
- Raw socket multicasting
- How can I send an HTTP response using Linux raw sockets in c
- EFAULT when trying to send char
- Connect function in raw socket?
- Keep sending malformed TCP header using bsd/socket api in C
- Simple operations with TCP/IP Header bits
- recvfrom with Raw Sockets, get just the data
- Socket sniffer python only sniff port 22
- How to bind a raw socket to a specific interface using python in linux centOS?
- Unable to print TCP response using Raw Sockets
- Read raw IPv4 in promiscuous mode on Linux?
- C++ (BSD Sockets) - Modify incoming packets before forwarding:
- How to use Golang to compose raw TCP packet (using gopacket) and send it via raw socket
Related Questions in RUDP
- How to create a simple Server Client Application Using RUDP in Java?
- Checksum checking in UDP using UDP socket
- RUDP Packets are not read from inputstream
- TCP, UDP, SCTP, RUDP or RAW?
- RUDP implementation other than bell labs implementation?
- Reliable UDP Protocol Implementation in Java - Why does this happen?
- Is there Reliable UDP implementation for C++ with python asyncio bindings?
- websockets protocols?
- Broadcasting in RUDP, UDT, LWIP, DCCP
- TCP vs Reliable UDP
- Error Occurs with QUIC_TLS_CERTIFICATE_UNKNOWN When Attempting WebTransport Connection
- Is there a way to callback a function without creating a new goroutine?
- how to use maidsafe-rudp as part of my project?
- change FTP server's transport protocol (pyftpdlib)
- Making UDP a connection-oriented protocol?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
If you create a normal UDP socket you don't have access to the UDP header and thus also not to the checksum. But the kernel will already discard packets where the checksum is incorrect so you would not see these packets anyway.