IP Header

Using QNX RTOS 6.1a, io-net…
Developing an IP Filter module.

In my function being called by io-net i’m being passed an npkt_t pointer.
Does that pointer include the IP header and TCP/UDP/ICMP headers as well?
If so how can i tell what the byte offset to the IP header is?
If that’s not the case, how can i view the IP header?

Thanks again

QNX SLC Project Group

The npkt pointer points to an npkt. The npkt
contains a list net_buf_t’s. Each net_buf_t
points to a number of net_iov_t. Each net_iov_t
points to actual packet data.

If you’ve registered as type “ip” you get an ip packet.
If it’s headed down, it starts at offset 0. If it’s
headed up, the offset is the third paramater (off) to your
rx_up() function. To tell if it’s a tcp packet etc…
you have to look at the proto type in the ip header.


-seanb


QNX SLC Project Group <qnx_slcproject@canada.com> wrote:
: Using QNX RTOS 6.1a, io-net…
: Developing an IP Filter module.

: In my function being called by io-net i’m being passed an npkt_t pointer.
: Does that pointer include the IP header and TCP/UDP/ICMP headers as well?
: If so how can i tell what the byte offset to the IP header is?
: If that’s not the case, how can i view the IP header?

: Thanks again

: QNX SLC Project Group