BPF porting - help needed

Hi all!

Today I tried to port ‘libpcap’ library to QNX RTP and found what BPF
(BSD Packet Filter) is not yet implemented for QNX RTP. I could try to
re-implement it, but I need some help from QSSL people or other person
who knows details of devn* drivers. Actually I’m mostly interested on 2
system calls from those drivers - one which passes control right before
packet is transmitted and one which doing same right after packed is
received. To put it simple, I need a “tap into raw packets” with maximum
possible correctness of timestamps. Does anybody will to help me? The
rationale to do that is many network tools relying on BPF per se and
libpcap in particular. Or am I re-inventing a wheel and that facility is
inside? Starting reading is Chapter 26 of R.Stevens book UNIX Network
Programming Vol 1.

\

BR, Andrej

Andrej Timchenko <silpol@yahoo.com> wrote:

Hi all!

Today I tried to port ‘libpcap’ library to QNX RTP and found what BPF
(BSD Packet Filter) is not yet implemented for QNX RTP. I could try to
re-implement it, but I need some help from QSSL people or other person
who knows details of devn* drivers. Actually I’m mostly interested on 2
system calls from those drivers - one which passes control right before
packet is transmitted and one which doing same right after packed is
received. To put it simple, I need a “tap into raw packets” with maximum
possible correctness of timestamps. Does anybody will to help me? The
rationale to do that is many network tools relying on BPF per se and
libpcap in particular. Or am I re-inventing a wheel and that facility is
inside? Starting reading is Chapter 26 of R.Stevens book UNIX Network
Programming Vol 1.

I’ve done a “nfm-bpf.so” module as an sample of hwo to write Filter
Module a while ago.

Let me check if I could post the code somewher. And yes, I do have
a working “tcpdump + libpcap + nfm-bpf.so” :slight_smile: The only problem I
have is that the devn-* drivers is not support promiscuous right
now, so you probably only could see packet from/to your own box.

And for your question, there is no magic in devn-* to do the
“timestamp” thing, BPF lable the timestamp when the packet
pass though BPF module.

-xtang

Xiaodan Tang wrote:

Andrej Timchenko <> silpol@yahoo.com> > wrote:
Hi all!

Today I tried to port ‘libpcap’ library to QNX RTP and found what BPF
(BSD Packet Filter) is not yet implemented for QNX RTP. I could try to
re-implement it, but I need some help from QSSL people or other person
who knows details of devn* drivers. Actually I’m mostly interested on 2
system calls from those drivers - one which passes control right before
packet is transmitted and one which doing same right after packed is
received. To put it simple, I need a “tap into raw packets” with maximum
possible correctness of timestamps. Does anybody will to help me? The
rationale to do that is many network tools relying on BPF per se and
libpcap in particular. Or am I re-inventing a wheel and that facility is
inside? Starting reading is Chapter 26 of R.Stevens book UNIX Network
Programming Vol 1.

I’ve done a “nfm-bpf.so” module as an sample of hwo to write Filter
Module a while ago.

Sounds nice.

Let me check if I could post the code somewher. And yes, I do have
a working “tcpdump + libpcap + nfm-bpf.so” > :slight_smile:

Wow, even better, than I suppose to get :wink: Drop me a line when it will
be available, ok?

The only problem I
have is that the devn-* drivers is not support promiscuous right
now, so you probably only could see packet from/to your own box.

IMHO, “promiscous mode” is a-must for networking, do you know anything
about when it will be available?

And for your question, there is no magic in devn-* to do the
“timestamp” thing, BPF lable the timestamp when the packet
pass though BPF module.

I knew that “there is no magic”, my point was only “not to re-invent
wheel, rather to adopt existing thing” :slight_smile: Anyway, big thanks for answer,
this is first time when I got an answer form QSSL person on my
questions. May I contact you on e-mail?

\

BR, Andrej

Andrej Timchenko <silpol@yahoo.com> wrote:

Xiaodan Tang wrote:

Andrej Timchenko <> silpol@yahoo.com> > wrote:
Hi all!

Today I tried to port ‘libpcap’ library to QNX RTP and found what BPF
(BSD Packet Filter) is not yet implemented for QNX RTP. I could try to
re-implement it, but I need some help from QSSL people or other person
who knows details of devn* drivers. Actually I’m mostly interested on 2
system calls from those drivers - one which passes control right before
packet is transmitted and one which doing same right after packed is
received. To put it simple, I need a “tap into raw packets” with maximum
possible correctness of timestamps. Does anybody will to help me? The
rationale to do that is many network tools relying on BPF per se and
libpcap in particular. Or am I re-inventing a wheel and that facility is
inside? Starting reading is Chapter 26 of R.Stevens book UNIX Network
Programming Vol 1.

I’ve done a “nfm-bpf.so” module as an sample of hwo to write Filter
Module a while ago.

Sounds nice.

Let me check if I could post the code somewher. And yes, I do have
a working “tcpdump + libpcap + nfm-bpf.so” > :slight_smile:

Wow, even better, than I suppose to get > :wink: > Drop me a line when it will
be available, ok?

Hi, I was just find out that the nfm-bpf.so is going to be
our release product, so that I can’t send the source code
out :frowning:, at least not now.

If you wish, I probably could send you the binary as under
“Alpha” agreement (use it as your own risk :slight_smile:. Let me know
if you want it or not.

The only problem I
have is that the devn-* drivers is not support promiscuous right
now, so you probably only could see packet from/to your own box.

IMHO, “promiscous mode” is a-must for networking, do you know anything
about when it will be available?

As far as I know, our driver guys are doing this, I am not
sure when it could be done, but I am sure it won’t be so
long, as they told me it’s not a difficult thing to do :slight_smile:

And for your question, there is no magic in devn-* to do the
“timestamp” thing, BPF lable the timestamp when the packet
pass though BPF module.

I knew that “there is no magic”, my point was only “not to re-invent
wheel, rather to adopt existing thing” > :slight_smile: > Anyway, big thanks for answer,
this is first time when I got an answer form QSSL person on my
questions. May I contact you on e-mail?

Sure you can send me email, we encourage using qdn simply because
your question could be answered by other people, and if I made a
mistake, somebody would correct me. Another thing is these articles
will be archived so other guys could find the informations…

-xtang

Will the promiscuous driver and libpcap, etc be included in
the next patch? I am trying to do a port of nmap for QNXRTP
and need the above for it.

-Bill



On 6 Nov 2000 15:27:59 GMT, Xiaodan Tang <xtang@qnx.com> wrote:

Andrej Timchenko <> silpol@yahoo.com> > wrote:
Xiaodan Tang wrote:

Andrej Timchenko <> silpol@yahoo.com> > wrote:
Hi all!

Today I tried to port ‘libpcap’ library to QNX RTP and found what BPF
(BSD Packet Filter) is not yet implemented for QNX RTP. I could try to
re-implement it, but I need some help from QSSL people or other person
who knows details of devn* drivers. Actually I’m mostly interested on 2
system calls from those drivers - one which passes control right before
packet is transmitted and one which doing same right after packed is
received. To put it simple, I need a “tap into raw packets” with maximum
possible correctness of timestamps. Does anybody will to help me? The
rationale to do that is many network tools relying on BPF per se and
libpcap in particular. Or am I re-inventing a wheel and that facility is
inside? Starting reading is Chapter 26 of R.Stevens book UNIX Network
Programming Vol 1.

I’ve done a “nfm-bpf.so” module as an sample of hwo to write Filter
Module a while ago.

Sounds nice.

Let me check if I could post the code somewher. And yes, I do have
a working “tcpdump + libpcap + nfm-bpf.so” > :slight_smile:

Wow, even better, than I suppose to get > :wink: > Drop me a line when it will
be available, ok?


Hi, I was just find out that the nfm-bpf.so is going to be
our release product, so that I can’t send the source code
out > :frowning:> , at least not now.

If you wish, I probably could send you the binary as under
“Alpha” agreement (use it as your own risk > :slight_smile:> . Let me know
if you want it or not.

The only problem I
have is that the devn-* drivers is not support promiscuous right
now, so you probably only could see packet from/to your own box.

IMHO, “promiscous mode” is a-must for networking, do you know anything
about when it will be available?

As far as I know, our driver guys are doing this, I am not
sure when it could be done, but I am sure it won’t be so
long, as they told me it’s not a difficult thing to do > :slight_smile:

And for your question, there is no magic in devn-* to do the
“timestamp” thing, BPF lable the timestamp when the packet
pass though BPF module.

I knew that “there is no magic”, my point was only “not to re-invent
wheel, rather to adopt existing thing” > :slight_smile: > Anyway, big thanks for answer,
this is first time when I got an answer form QSSL person on my
questions. May I contact you on e-mail?

Sure you can send me email, we encourage using qdn simply because
your question could be answered by other people, and if I made a
mistake, somebody would correct me. Another thing is these articles
will be archived so other guys could find the informations…

-xtang