[Click] please_stop_driver() function
Andreas Tarp
click at atarp.com
Mon Mar 7 07:33:14 EST 2005
Hi Eddie,
thanks for the answer.
I just tested the please_stop_driver() function without using other own
elements but the Segmentation fault is still there :-(
I changed the original Discard element to stop the driver if a packet is
passed to the element. Here is the customized part of the Discard element:
void
Exit::push(int, Packet *p)
{
p->kill();
router()->please_stop_driver();
}
(Discard is replaced by Exit, the elements name
#include <click/router.hh> is also included)
My click configuration is very simple:
FromDevice(wlan0)
-> Exit;
Using the original Discard element instead of Exit works fine.
Elements like TimedSource (they also use the please_stop_driver()
function) are also working without problems.
I am using Click 1.4.1 cross compiled on some iPAQs (ARM CPU) running
familiar Linux.
Andreas
Eddie Kohler wrote:
> Hi Andreas,
>
> Click should not segfault after please_stop_driver(). Is your
> configuration running an element of your own design? Maybe the bug is
> there. EIther that or it's our bug, send a configuration along and
> sometime hopefully before 2006 :( we'll take a look.
>
> Eddie
>
>
> Andreas Tarp wrote:
>
>> Hi,
>>
>> i have a question regarding to the please_stop_driver() function
>> from click/router.hh:
>>
>> I think in theory the line
>>
>> router -> please_stop_driver()
>>
>> somewhere within an element (for example in the
>> Element::simple_action part) should stop the runnig click
>> configuration and return to the linux console.
>>
>> In my case click quits when calling these function, but I always
>> receive a SIGSEGV error. Do I have to pay attention to some other
>> rules, when calling please_stop_driver() ?
>>
>> My intention is to write a small element, which quits the running
>> click router, if a packet is passed to the element.
>>
>> Thanks a lot,
>>
>> Andreas
>>
>> _______________________________________________
>> click mailing list
>> click at amsterdam.lcs.mit.edu
>> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>
>
>
More information about the click
mailing list