Tech Support > Microsoft Windows > Drivers > IPFilterDriver ??????
IPFilterDriver ??????
Posted by Algol on December 8th, 2003


Hi,

In my Hook function

PF_FORWARD_ACTION IpFilterHook(IN unsigned char *PacketHeader,
IN unsigned char *Packet, IN unsigned int PacketLength,
IN unsigned int RecvInterfaceIndex, IN unsigned int SendInterfaceIndex,
IN IPAddr RecvLinkNextHop, IN IPAddr SendLinkNextHop)
{
IPPacket *ipp;
TCPHeader *tcph;
UDPHeader *udph;

int countRule=0;
ULONG i = 0xC2110D50;
struct filterList *aux = first;

//we "extract" the ip Header

if ((PacketHeader==NULL)||(Packet==NULL))
return PF_FORWARD;

ipp=(IPPacket*)PacketHeader;

dprintf("Client: %x, %d", PacketLength, RecvInterfaceIndex);
dprintf("Source: %x\nDestination: %x\nProtocol: %d", ipp->ipSource, ipp->ipDestination, ipp->ipProtocol);

//My address for test
if( (((IPPacket *)PacketHeader)->ipSource == 0x5628FA51 ) ||
( (((IPPacket *)PacketHeader)->ipDestination== 0x5628FA51 ) )
return PF_FORWARD;
else
return PF_DROP;
}

" There all my packets from my address (0x5628FA51) should be forwarded ---- but they don't why ------ "
" Has anybody a successfull experience with Ipfilterdriver and FilterHook ?"

I hope your advice !

J.C.




Posted by Chris on December 9th, 2003



Be sure to check the following: The PacketHeader gibes you the IP Addr in
network byte order, is your hex really the correct value? Is the padding
right? But in some DbgPrint stuff. If you don't have a debugger running and
have everything on one machine, take for example DbgView, from Sysinternals
to view the DbgPrint output. Also view my answer-message from 26.11.03 for
your other questions.

Chris



Posted by Algol on December 10th, 2003


Thanks for your help !

Yes you have divined I can't for the instant use Debugger (my serial port is out of order Kaput )
but I don't know yet DbgView where can I find it ( newbie) ?
J.C.


Posted by Chris on December 11th, 2003


Get it here:
http://www.sysinternals.com/ntw2k/fr...ebugview.shtml

Chris
--
www.chrismc.de




Posted by Algol on December 11th, 2003


Thanks again for your attention !

J.C.


Similar Posts