You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PACKET_TX_RING (since Linux 2.6.31)
Create a memory-mapped ring buffer for packet transmission.
This option is similar to PACKET_RX_RING and takes the same
arguments. The application writes packets into slots with
tp_status equal to TP_STATUS_AVAILABLE and schedules them for
transmission by changing tp_status to TP_STATUS_SEND_REQUEST.
When packets are ready to be transmitted, the application
calls send(2) or a variant thereof. The buf and len fields of
this call are ignored. If an address is passed using
sendto(2) or sendmsg(2), then that overrides the socket
default. On successful transmission, the socket resets
tp_status to TP_STATUS_AVAILABLE. It immediately aborts the
transmission on error unless PACKET_LOSS is set.
it seems
retval=send(this->socket, NULL, 0, 0);
The text was updated successfully, but these errors were encountered:
WritePacketData still use traditional write(). Make packet transmission also benefit from mmap.
https://www.kernel.org/doc/Documentation/networking/packet_mmap.txt
packet(7) describes how to use PACKET_TX_RING
it seems
The text was updated successfully, but these errors were encountered: