QNX SLC Project Group <email@example.com> wrote:
: I’m running QNX RTOS 6.1a on x86. I’m writing an IP filter and was wondering
: if there is anything I should do with packets I receive that I wish to
: discard. Is it enough to just not pass them to the next level in the
: protocol stack or should I do some kind of clean up?
Up headed packets:
If you don’t pass them up, or attempt to but no one takes them
(ion->tx_up() return 0), you need to call ion->tx_done(reg_hdl, npkt)
where reg_hdl is returned when you register with io-net. Otherwise,
you’re leaking memory.
Down headed packets:
You always need to call ion->tx_done(reg_hdl, npkt). If you want
this to fail silently, you can return TX_DOWN_OK from your rx_down()
func, otherwise you can set errno and return TX_DOWN_FAILED.
: Also with the filter in place when I use the ping command I receive the
: ping: send to: No such file or directory
You’re probably not setting errno and whatever it happens to be is
being propagated back out to the app.
: I’m not having any packet loss with it in place either, and I don’t get this
: message when the filter’s not in place.
: Thanks for all the previous help.
: QNX SLC Project Group