Packet Passing -IP Filter

I’m running QNX RTOS 6.1a. I now have an IP Filter sitting just below the
IP layer. I’m having a problem with just passing a packet through
the filter. I’m not trying to manipulate it or anything else. The packets don’t seem to go through. Below is some example code.

//////////////////////////////////////////////////////////////////
int ipf_recvd_arp (npkt_t *npkt, void *func_hdl, int off, int framlen_sub, uint16_t cell, uint16_t endpoint, uint16_t iface)
{
ipf_ion->tx_up(ipf_reg_hdl, npkt, off, framlen_sub, cell,endpoint,iface); //pass packet to ip layer
ipf_ion->tx_done(ipf_reg_hdl,npkt);
return(1); //success
}

int ipf_recvd_ip (npkt_t *npkt, void *func_hdl)
{
ipf_ion->tx_down(ipf_reg_hdl,npkt); //pass the packet down to arp
return(1); //success
}

Also I haven’t advertised yet… is advertising necessary with a filter? And could that be a possible reason?

Thanks,

QNX SLC Project Group

QNX SLC Project Group <qnx_slcproject@canada.com> wrote:
: I’m running QNX RTOS 6.1a. I now have an IP Filter sitting just below the
: IP layer. I’m having a problem with just passing a packet through
: the filter. I’m not trying to manipulate it or anything else. The packets don’t seem to go through. Below is some example code.

Mage sure you have done your ipf_ion->reg_byte_pat() adter registering with io-net
or you wont receive any up headed packets. If you want all ip packets:
ipf_ion->reg_byte_pat(bcp->reg_hdl, 0, 0, NULL, _BYTE_PAT_ALL);

Also you don’t call tx_done() on all up headed packets. see below.

-seanb


: //////////////////////////////////////////////////////////////////
: int ipf_recvd_arp (npkt_t *npkt, void *func_hdl, int off, int framlen_sub, uint16_t cell, uint16_t endpoint, uint16_t iface)
: {
if(ipf_ion->tx_up(ipf_reg_hdl, npkt, off, framlen_sub, cell,endpoint,iface) == 0) //pass packet to ip layer
ipf_ion->tx_done(ipf_reg_hdl,npkt);
: return(1); //success
: }
:
: int ipf_recvd_ip (npkt_t *npkt, void *func_hdl)
: {
: ipf_ion->tx_down(ipf_reg_hdl,npkt); //pass the packet down to arp
: return(1); //success
: }

: Also I haven’t advertised yet… is advertising necessary with a filter? And could that be a possible reason?

Nah.

: Thanks,

: QNX SLC Project Group