Skip to content
Advertisement

Tag: udp

recv() skipping UDP packets

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

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

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

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

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

Advertisement