Giter VIP home page Giter VIP logo

gopacket's People

Contributors

actaeon avatar adriantam avatar akrennmair avatar breml avatar changtimwu avatar cimnine avatar darxriggs avatar david415 avatar dustin avatar elchavar avatar florianl avatar gconnell avatar hkwi avatar hyakuhei avatar jcrussell avatar jdknezek avatar kanemathers avatar kaorimatz avatar lhausermann avatar lrsk avatar miekg avatar nl5887 avatar notti avatar palen avatar postwait avatar randstr avatar safchain avatar sentryo avatar tzneal avatar x-way avatar

Watchers

 avatar  avatar

gopacket's Issues

the receiving packets too slow

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.

make afpacket support PACKET_TX_RING

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);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.