[Click] please_stop_driver() function
Nikitas Liogkas
nikitas at CS.UCLA.EDU
Tue Mar 8 20:37:53 EST 2005
That's weird, I've successfully used please_stop_driver() in Discard,
to stop the driver when a packet with a specific annotation comes
along! I modified the default Discard element though, I did not create
a new one! Maybe something is wrong with your newly-created element?
nikitas
Andreas Tarp wrote:
> 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
>>
>>
>>
>>
>
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
More information about the click
mailing list