Re: how the push and pull implement in the bottom code
Beyers Cronje <[email protected]>
| Newsgroups | gmane.network.routing.click |
|---|---|
| Message-ID | <CAOO3n8WupWj9cpXe-S_z4MnFR_PMbF0h50PyjCtqzxheDk8D+A@mail.gmail.com> |
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 <[email protected]> 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 > [email protected] > https://amsterdam.lcs.mit.edu/mailman/listinfo/click >