[Click] user-level vs. kernel-level Click packet management

Beyers Cronje bcronje at cs.co.za
Fri Apr 29 08:43:43 EDT 2005


An element has to either pass a packet on, store it for later use or kill it. To push a packet to more than one output you have to clone the packet via the packets clone() interface. 

Ie:
	output(0).push(p->clone());
	output(1).push(p);

Have a look at the Tee element. Also have another read through Eddie's click thesis doc and the programming manual http://pdos.csail.mit.edu/click/doc/progman.html, he explains it clearly there.

Beyers

-----Original Message-----
From: click-bounces at amsterdam.lcs.mit.edu
[mailto:click-bounces at amsterdam.lcs.mit.edu]On Behalf Of betamaz
Sent: Friday, April 29, 2005 8:13 AM
To: click at amsterdam.lcs.mit.edu
Subject: [Click] user-level vs. kernel-level Click packet management


Hi,

When a click elements reads a packet from a device (eth0) and sends it
on one of its output, how does it save the packet infromation? I'm
trying to understand if when there are multiple outputs, if each
output gets a copy of the packet and processes it accordingly (ie.
send it off to a que, to another device, filter...).

In the documentation, the userlevel fromdevice specifies that "Reads
packets from the kernel " whereas the kernel level fromdevice says
"Intercepts all packets received by the Linux network interface".  I'm
guessing that the first one means, userlevel makes copies of the
packet, while kernel level reads off the device and just handles the
packet itself.  Is this correct?  If the kernel level does grab the
packet, can the same packet be forwarded more then once on different
outputs (i'm just curious, not sure if there are any practical reasons
to do so)?

Thanks for your help,
Bita.

_______________________________________________
click mailing list
click at amsterdam.lcs.mit.edu
https://amsterdam.lcs.mit.edu/mailman/listinfo/click

This is an email from Bytes Technology Group. It is confidential to the 
ordinary user of the email address to which it is addressed 
and may contain copyright and/or legally privileged information.
No one else may read, print, store, copy, forward or act in 
reliance upon all or any part of it or its attachments. If you 
received this email in error please notify its sender.



More information about the click mailing list