Methods for sending Linux / C udp

The only way to send UDP packets to C is to use send / sendo / write / ....

The problem is that for each package I need to make a new call from user space.

Does anyone know if there is a function that allows something like

send_packets (int socket, const char * buffer, int packetSize)

What automatically splits the data in the buffer into packets of packet size (for example, 1472), and then sends them as UDP packets?

thank

+3
source share
2 answers

You can execute batch packets, but not higher level protocols. The low-level API is designed for utilities such as Wireshark.

Linux ​​ API sendmmsg(), recvmmsg(), , - , .

API , , InfiniBand API , Solarflare (OpenOnload) Mellanox, 10 GigE RDMA Ethernet.

+1

, , , , .

, , . , , .

, , , , .

0

All Articles