Hi Stevie,
           Thank you so much for the article link...it was really helpful ..
I went through all the pages and i think BSD and tcpdump will help me to get packets satisfying specified filter options
to the socket/interface i put in monitor mode..

but i am not trying to read packet information all the time..i think the filter helps me a lot in debugging when i add my own TDMA based custom headers in datalink layer..

my doubt here is, will the tcpdump/BSD filter i apply affect the usual protocol handler routines of the filtered packets flow??
what i understand here is, with the source codes in the article i will be able to filter the packets according to my needs,print the header values to make sure its working and then allow the madwifi driver to call corresponding protocol handlers as usual..am i right?

because i dont want to disrupt the normal packet flow through Linux Network stack...

By the way,where exactly in madwifi driver does the MAC address checking happens in adhoc/station modes?
I am just trying to implement same kind of operation in monitor mode as well..

On Mon, Feb 22, 2010 at 1:24 PM, Steve Glass <stevie.glass@gmail.com> wrote:
What you need to do is to apply a Berkeley Packet Filter (BPF) to the monitor socket. You can compile BPF filter expressions using tcpdump (it will write C code for you)  and that will ensure the kernel returns only those frames of interest. This article is a pretty good starting point.

Hope that helps,