Code Monkey home page Code Monkey logo

pktgen's Introduction

pktgen

Kernel module for packet generator and packet receiver with statistics. Source based from Linux Kernel pktgen 3.11.0

To compile the headers of the running kernel are required.

sudo apt-get install linux-headers-$(uname -r)

Current version for kernel 3.11.0. It uses netfilter hooks to process incomming packets.

To compile and load the module:

make

insmod ./pktgen.ko

it is necessary to map each interrupt with a different core. You can use [eth-affinity] (https://github.com/jelaas/eth-affinity) to set up automaticaly.

eth-affinity

to start the receiver, you need to be root

sudo su

echo rx eth1 > /proc/net/pktgen/pgrx

Some options for the receiver:

  • rx [device] to enable the receiver part for a specific device. If it is wrong, all the devices are used. (all versions)
  • rx_reset: to reset the counters
  • rx_disable: to disable the receiver
  • display [human or script]
  • statistics [counter, basic, or time]

to read the results

cat /proc/net/pktgen/pgrx

and change output format:

echo display script > /proc/net/pktgen/pgrx

examples for transmitting can be found at the examples folder. For more details look at the pktgen documetation in the linux kernel Documentation/networking/pktgen.txt

More information can be found at http://people.kth.se/~danieltt/pktgen

pktgen's People

Contributors

danieltt avatar

Watchers

James Cloos avatar  avatar  avatar

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.