Register Byte Pattern for nfm

Hi, I’m writing a filter above for an ethernet interface. I’ve first
register to all incomming packets by the following call:
n->reg_byte_pat(reg_hdl, 0, 0, NULL, _BYTE_PAT_ALL);
which work fine.
Then I try to register to only the ethernet packet that I want by calling
that line instead:
n->reg_byte_pat(reg_hdl, 12, 2, &pkt_type, 0);
Result is the same, all packet type are received from the NIC.

Any idea ??

Thanks.

Sebastien Lelievre <try_it@itwontwork.com> wrote:

Hi, I’m writing a filter above for an ethernet interface. I’ve first
register to all incomming packets by the following call:
n->reg_byte_pat(reg_hdl, 0, 0, NULL, _BYTE_PAT_ALL);
which work fine.
Then I try to register to only the ethernet packet that I want by calling
that line instead:
n->reg_byte_pat(reg_hdl, 12, 2, &pkt_type, 0);
Result is the same, all packet type are received from the NIC.

Any idea ??

Filters always get all packets. Just call ion->tx_done() on the ones
you don’t want to pass up.

-seanb

Filters always get all packets
Do you then mean to say that reg_byte_pat does not work? Or it does not

work only with filters…?

Sreekanth


“Sean Boudreau” <seanb@node25.ott.qnx.com> wrote in message
news:bhqki7$sp0$2@nntp.qnx.com

Sebastien Lelievre <> try_it@itwontwork.com> > wrote:
Hi, I’m writing a filter above for an ethernet interface. I’ve first
register to all incomming packets by the following call:
n->reg_byte_pat(reg_hdl, 0, 0, NULL, _BYTE_PAT_ALL);
which work fine.
Then I try to register to only the ethernet packet that I want by
calling
that line instead:
n->reg_byte_pat(reg_hdl, 12, 2, &pkt_type, 0);
Result is the same, all packet type are received from the NIC.

Any idea ??

Filters always get all packets. Just call ion->tx_done() on the ones
you don’t want to pass up.

-seanb

Sreekanth <nospam@nospam.com> wrote:

Filters always get all packets
Do you then mean to say that reg_byte_pat does not work? Or it does not
work only with filters…?

It is ignored for filters only. Non filters don’t get anything
until reg_byte_pat() is called at least once.

-seanb