intrising / gopacket Goto Github PK
View Code? Open in Web Editor NEWThis project forked from google/gopacket
Provides packet processing capabilities for Go
License: BSD 3-Clause "New" or "Revised" License
This project forked from google/gopacket
Provides packet processing capabilities for Go
License: BSD 3-Clause "New" or "Revised" License
When I input the IGMP packets in 5 packets per second,
I can see the receive rate is normal when I run the tcpdump tap0.
But the gopacket channel only receives one packet.
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
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);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.