I've worked it out! :-) all working. The Capture() method captures a packet and fires an event. All event listeners are able to recieve the captured packet and perform some action on it.
Activwerx inc
Posts
-
Event to capture IP Packets -
hide IP addressThis is quite interresting because I am currently writing a packet capture application which can disassemble network data from the ethernet frame level. As far as i know, hiding your IP address is impossible, however you could try using WinPCap to write a custom ethernet frame encapsulating an IP packet. I dont know the intricacies of networks particularly well, but providing you keep your adapters MAC address the same when you send an ethernet frame, you may get a response when hiding your IP address because the responding maching may send back to your MAC address rather than IP address....i dont know but it's something to think about. You could also use WinPCap to write a Windows Service to check for incomming requests which check your IP address and respond to these requests by replying your fake IP address, however you would have to write this very specifically it it was to be used for a specific application / web site / web service...think about the following example, which i havent coded in a proper language to make it easy to understand the concepts: if (request_for_ip from specific_web_service) { Write custom frame with real MAC address and fake IP } else { Send default frame with real IP } try looking at the following sites http://www.winpcap.org/[^] http://network.programming-in.net/[^] The network programming in .NET book is excellent and very useful for network programmers Hope this helps!
-
Event to capture IP PacketsI am writing an application which captures IP packets from the default network interface. The original code uses hard coded data which does not allow it to be used by other programmers. I am attempting to rewrite the code to use an event which should be triggered every time a packet arrives however i am STUCK! The packet capture method, called Capture() stores each packet in a class called IPPacket I have a delegate declared as
public delegate void PacketArrival(object sender, IPPacket packet);
and an even declared aspublic event PacketArrival OnPacketArrival;
I do not know how to link the Capture() method to the delegate so that when the event is used, the capture method will notify the event each time a packet arrives Please help!!!