[Click] how the push and pull implement in the bottom code

Beyers Cronje bcronje at gmail.com
Mon Oct 31 05:16:02 EDT 2011


Hi,

The main Click loop is in RouterThread::driver() which can be found at
click/lib/routerthread.cc
https://github.com/kohler/click/blob/master/lib/routerthread.cc#L569

Essentially RouterThread::driver() calls the pending Tasks, elements that
implement Task include elements like FromDevice/PollDevice/ToDevice etc.
These task elements are *typically* located at the beginning of the push or
pull path and within the Task's execution function the element calls the
next elements push/pull in the graph, and this carries on until the packet
reaches the last element in the path or until one of the elements kills the
packet and returns without pushing/pulling the packet on.

How Click builds the configuration graphs is another question and something
that I personally havent looked into in much detail yet, maybe someone else
on the list can shed some info on this.

Beyers


On Mon, Oct 31, 2011 at 9:10 AM, kele kele <jinkelei87 at gmail.com> wrote:

>  Hi,
>       I'm doing some reash on click. Now a problem confuse me, how the
> push and pull implement in the bottom code in click. I have tried to find
>  the relate code in click sorce code, but I'm failed. Can anybody help me,
> tell me the mechanism of push and pull in click and the related code
> location in click source code. Very thanks.
>
>                Kelei Jin
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>


More information about the click mailing list