Skip to contentSkip to conversation

Packet tapping

DISCUSSION Manoj Sontakke 2 participants 3 messages Sep 12, 2001 – Sep 13, 2001

lore
Share & tools
lore
#0 lore raw

Hi,
Is it possible to tap a packet and send it to a userlevel program
before it is sent to appropriate receive function (say ip_rcv()). The user level program will give the packet back to the kernel for delivery to appropriate receive function.
In short, is it possible to have a protocol stack (between layer 2 and
3) to be implemented in useland.

Is Tun/Tap driver useful here?

Thanks for all the help
Manoj

#1 lore raw
Quoted 11 lines · Manoj Sontakke

Hi,
Is it possible to tap a packet and send it to a userlevel program
before it is sent to appropriate receive function (say ip_rcv()). The user level program will give the packet back to the kernel for delivery to appropriate receive function.
In short, is it possible to have a protocol stack (between layer 2 and
3) to be implemented in useland.

Is Tun/Tap driver useful here?

Isn't the QUEUE driver from iptables done for such cases?

Signature · 4 lines
Francis Galiegue, [email protected] - Normand et fier de l'être
"Programming is a race between programmers, who try and make more and more
idiot-proof software, and universe, which produces more and more remarkable
idiots. Until now, universe leads the race"  -- R. Cook
#2 lore raw

Thanks a lot. I was looking for a pointer. I knew its possible but lost track of "how".
Thnaks again.
Manoj

Quoted 15 lines · Francis Galiegue
Quoted 10 lines · Manoj Sontakke

Hi,
Is it possible to tap a packet and send it to a userlevel program
before it is sent to appropriate receive function (say ip_rcv()). The user level program will give the packet back to the kernel for delivery to appropriate receive function.
In short, is it possible to have a protocol stack (between layer 2 and
3) to be implemented in useland.

Is Tun/Tap driver useful here?

Isn't the QUEUE driver from iptables done for such cases?