|
Re: RE: RE: How to send ethernet raw packets in qnx 6.4 using libpcap?
|
02/04/2009 3:28 AM
post21381
|
Re: RE: RE: How to send ethernet raw packets in qnx 6.4 using libpcap?
Hi Andrew Boyd,
I tried to send ethernet raw packets through BPF filter. I can able to send & receive ethernet packets. But
I couldn't implement the
filter in my program. I have a doubt whether I should set the BPF 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 & Regards,
Beniz V B
|
|
|