I wrote simple program to handle incoming UDP packets. I send 60000 UDP packets to and this programm is losing packets. Bandwith about 60-70 Mbit/s. If I wun tcpdump in parallel, then I see that all packages are received by the kernel. Also I tried recvmsg and recvmmsg with same result. Program source code: Answer The problem was solved. I
Tag: udp
How to get values for ipi_ifindex for sendmsg()?
Using sendmsg() it is possible to specify from which interface a datagram will be sent, if a value is set for in_pktinfo.ipi_ifindex. If the packet is a response to a datagram received with recvmsg() I can get the interface value from there. If I just know that the interface if ‘eth0’ or ‘eno1’, how can I look up the corresponding
Can I be sure that a UDP recv executed immediately after a successfull call to recv with MSG_PEEK will not block?
Assume the following code (for the sake of simplicity I’ve omitted the necessary error handling here): In that case: Can I be sure that after the first call to recv the whole datagram is already received and therefore the second call to to recv will not block? Or can it happen that if IP splits the datagram, the first recv
2 program get same udp packets from a port
there is a server will send some UDP packets to my localhost, for example: if it send some UDP packets to my localhost and destination port is 5000. and there will have a client program to receive it on port 5000. but, what I want is to create another program, it will try to receive the same packets on port
IPTables drop UDP packets with IP Header Identification
We are currently receiving a 30Mbps Spoofed UDP flood against one of our applications that is causing high CPU usage, we have a dedicated firewall running a basic version of linux with IPTables. Looking at the traffic logs, all of the spoofed UDP traffic has a header identification number of 31336. Is it possible to drop packets matching this number
Linux NIC driver: what’s the UDP packet from 0.0.0.0 to 255.255.255.255?
I am playing with rhel6 and rhel 7 NIC driver. The interesting thing is, when I do “ifup eth0” (eth0 is the NIC associated with my driver), I found Linux will try to send two special UDP packets, with source address of 0.0.0.0 and destination address of 255.255.255.255. Can someone help me to understand what’s the purpose of those UDP
register protocol handler for a transport protocol in Linux kernel
I’m trying to implement the QUIC protocol in the Linux kernel. Since QUIC is working on top of UDP, I’ve been using the UDP code as a learning base. Now I want to register the protocol handler for the QUIC protocol but I don’t understand how and where to do it as I can’t find the relevant code piece in
Golang UDP Server only recieving locally sent packets
I’ve written a UDP Server in Go(listens on port 666), and it seems to be only receiving packets that were sent locally. To confirm traffic, I have been using: My(abbreviated) server code: If, from the machine the server is running on, I use: then the server receives that packet, and prints the message(and tcpdump shows no output). However, if I
Cannot send or receive packets from my VirtualBox debian linux VM using UDP
For the sake of simplicity, I will refer you to http://en.wikipedia.org/wiki/Berkeley_sockets and the UDP server and client source code there. I am trying to send a packet using UDP protocol to a linux VirtualMachine server program. Both my host and VM ping well; all packets sent are received in both directions. However my server program is either not receiving any
Combining sento() write writev()?
I’ve set a udp socket and call sendto() with a different recipient at each call. I would like to use writev() in order to benefit scater/gather io but writev() does not allows me to specify the recipient addr/port as in sendto(). Any suggestions? Answer You can use writev to send a coalesced set of buffers to a single end point