Writing protocol driver for Raw Packet bridging
- From: "Tom" <tomkuhn@xxxxxxxxxx>
- Date: 20 Feb 2007 06:07:12 -0800
I am in the process of writing a protocol driver for the purpose of
catching all packets on one network card and passing it to a second
network card (Bridge). It seems that the Bridge supplied in CE does
not work properly for us, and numerous newsgroup posts suggest the
same thing. I am using two things to try to get this done, first is
the NDISUIO sample in platform builder, and the documentation from
http://www.codeproject.com/cs/internet/sendrawpacket.asp?df=100&forum...
I can from the project above, that it was not specifically for windows
CE 5.0, but the code in the NDISUIO sample was very close to that of
the windows code. According to the above instructions, I added
promiscuous mode to the filters...
#define NUIOO_PACKET_FILTER (NDIS_PACKET_TYPE_DIRECTED| \
NDIS_PACKET_TYPE_MULTICAST| \
NDIS_PACKET_TYPE_BROADCAST| \
NDIS_PACKET_TYPE_PROMISCUOUS) //
**Added**
But the next step requires commenting out a mac address check (anti-
spoofing) before sending.
// send.c
// line 136
// Comment out to support sending packets from any MAC source address
// To prevent applications from sending packets with spoofed
// mac address, we will do the following check to make sure the
source
// address in the packet is same as the current MAC address of
the NIC.
//
if ((pIrp->RequestorMode == UserMode) &&
!NPROT_MEM_CMP(pEthHeader->SrcAddr,
pOpenContext->CurrentAddress, NPROT_MAC_ADDR_LEN))
{
DEBUGP(DL_WARN, ("Write: Failing with invalid Source
address"));
NtStatus = STATUS_INVALID_PARAMETER;
break;
}
I can not find any MAC address checking in any of the NDISUIO code.
Is it not there? If it is not there, then I am assuming that the code
does not check for spoofed mac addresses, and my modifications are
done.
have discovered the following...
snip...
"You are correct that there is no provision in CE for an application
to
directly access an NDIS miniport driver.
End Snip...
So that leaves me with using the registry for the task. Is there any
words of wisdom on this. To be honest, looking through MSDN on
miniport drivers is very confusing to me. The end goal is to get
packets from a wireless card and pass then through to a wired card.
Thanks,
Tom
.
- Prev by Date: CeDeleteRecord() problem
- Next by Date: NE2000-compatible CF Ethernet card
- Previous by thread: CeDeleteRecord() problem
- Next by thread: NE2000-compatible CF Ethernet card
- Index(es):
Relevant Pages
|