On 26 Oct 2006, at 19:13, Sachin K wrote:
Hi all,
I am trying to capture read events on tun0 device on freeBSD 5.5 using
libevent library v1.2. But the event_dispatch() function returns with
an error "Operation not supported by device".

Is /dev/tun0 device supported by libevent 1.2?

libevent doesn't do anything differently than you'd do by directly using kqueue(), poll(), or select() system calls. I know at least select() works on FreeBSD's tun0 device, since tinc uses it.

You might try:

* looking through tinc's code for some device-specific setup you're missing
* checking what actual system called failed with ktrace
* testing each mechanism:

    $ EVENT_SHOW_METHOD= ./test
    (should say kqueue)

    $ EVENT_SHOW_METHOD= EVENT_NOKQUEUE= ./test
    (should say poll)

    $ EVENT_SHOW_METHOD= EVENT_NOKQUEUE= EVENT_NOPOLL= ./test
    (should say select)

--
Scott Lamb <http://www.slamb.org/>

_______________________________________________
Libevent-users mailing list
Libevent-users@monkey.org
http://monkey.org/mailman/listinfo/libevent-users

Reply via email to