GithubHelp home page GithubHelp logo

ycaihua / fakearp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aciliketcap/fakearp

0.0 2.0 0.0 84 KB

A Linux network driver module which creates a network interface that captures ARP requests it receives and responds with fake ARP responses using the data on the original ARP request.

License: GNU General Public License v2.0

Makefile 0.51% C 89.77% Shell 9.72%

fakearp's Introduction

Hi, fakeARP is a driver, written as a tutorial on developing Linux network drivers.

It creates and interface and that interface forges fake ARP responses when some ARP requests pass through it, as if there are other network interfaces connected to it.

I wrote it to learn about writing network drivers. I hope it helps other people trying to understand Linux kernel's network subsystem. The comments inside the code should be enough for anyone who developed drivers before but I will be writing a more detailed tutorial on the code. I will add a link to that as soon as I write it.

Since the code is meant to be a tutorial it is quite poor when it comes to features. Its flaws are described in the beginning of the code. Also I didn't introduce anything related to rtnl/netlink, anyone curious about that subject can look at bridge driver code inside Linux source and brctl utility.

My development environment consists of seperate test kernel which runs on a VM. If you are doing so, you should write that seperate kernel's include dir in Makefile, change the link "kerneldir" to that kernel source and write the path of fake ARP source inside farmake.script. After that running fakearp.script should compile your driver relative to the seperate kernel you are using.

If you want to compile for the running kernel just type 'make'.

I am developing the driver using 3.14.x kernel series.

Under any circumstances this code should not be run on a production system. I am a newbie at developing kernel code and this is the very first network driver code I have ever written.

Please send me any bugs you encounter.

Finally this distribution of code is licensed under GNU General Public License version 2. Fake ARP driver is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of it in a file named LICENSE, if not see (http://www.gnu.org/licenses/).

Hope it helps anyone trying to learn about Linux network drivers, Sinan

fakearp's People

Contributors

aciliketcap avatar

Watchers

 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.