Giter Club home page Giter Club logo

ipcdevice's Introduction

The goal of this project is to:

Implement a Linux kernel character device driver to pass messages between two
processes.  The message passing should be bi-directional.  Also implement a
series of ioctls that can transform the messages as they pass through the
kernel:

1) An ioctl to ROT13 encode the message.
2) An ioctl to base64 encode the message.
3) An ioctl to reverse the message.

----

For the sake of disclosure, my references for this project include the following:

http://www.freesoftwaremagazine.com/articles/drivers_linux
http://www.xml.com/ldd/chapter/book/ch05.html
drivers/char/generic_nvram.c, drivers/char/raw.c (and a few others)
Documentation/ioctl/ioctl-number.txt
http://www.makelinux.net/ldd3/chp-3-sect-4
http://lwn.net/Articles/119652/

----

Before first use, add a udev rule - something like this:

echo "KERNEL==\"ipcdevice\",    MODE:=\"666\"" > /etc/udev/rules.d/99-ipcdevice.rules

To use:

make
make demo_p_c
make demo_duplex
insmod ipcdevice.ko
./demo_p_c -f corpora/lipsum_biggest
./demo_duplex $(cat corpora/lipsum_small)
# to test the IOCTLs, use any combination of -13, -r and -64:
./demo_p_c -13 -f corpora/lipsum_small
rmmod ipcdevice

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.