USB wireless dongle detection

Hi all,
My project will use two FreeBSD installs, one for sender and the other for receiver. I need to do kernel modification for TCP stack. The sender will connect to an AP through USB and the receiver with a USB wifi dongle. I have different algorithms in sender and receiver sides. How can I differentiate them in TCP code? One way is to make different coding in sender and receiver sides so that they will operate accordingly. But this is not allowed in my project. My idea is to define a global flag in tcp_input.c and once the USB wifi dongle is attached the flag will be set so that tcp_input() will differentiate sender and receiver. I check the arch handbook http://www.freebsd.org/doc/en/books/arch-handbook/usb.htmland it seems that the detection should be done in middle layer. But I have no idea how to implement it. Can someone give some suggestion? Thanks.

regards,
qichao
 
Back
Top