Beniz VB
|
Re: RE: How to set filters for capturing ethernet raw packets in BPF?
|
Beniz VB
02/04/2009 2:39 AM
post21380
|
Re: RE: How to set filters for capturing ethernet raw packets in BPF?
Hi Robert,
Thanks for your reply. I have gone through the links that you have sent to me. But I couldn't implement the
filter in my program. I have a doubt whether I should set the filter in assembly level. Can you please send me one
example C code which can filter raw ethernet messages from the network (in QNX 6.4).
In my sender program I'll send an ethernet frame (destination hardware (MAC) address [6bytes] + source
hardware (MAC) address [6 bytes] + etherl type [2 bytes] + payload [46 - 1500 bytes] +FCS [4 bytes].)
In my ethernet frame, I'll put ethertype as 0x9999, inorder to identify it as my frame while receiving. So in
BPF receiver, I should capture frames which contain ethertype = 0x9999 only. Can u please tell me how to write a bpf
filter program in C for capturing my frame (QNX 6.4).
Thanks & Regads,
Beniz V B
|
|
|