views:

1061

answers:

2

I'm building a program that does network acceleration, and I need to know how to create a network interface on Linux that instead of directing data to an actual interface, directs information to my program, so that it can be accelerated. The idea is to make it a transparent system, so that programs just have to use the interface like a normal one, but the traffic will run faster.

+2  A: 

You want the tun/tap device:

http://en.wikipedia.org/wiki/TUN/TAP

jrockway
Thanks! It works perfectly.
computergeek6
A: 

I'm unsure as to how exactly you hope to achieve this, or what the use-case is, but one other way of doing it is to use a NFQUEUE iptables target rule.

Then you can direct just some of the traffic to a userspace program which can optionally modify it or do anything it wants, really.

MarkR