The IPMonitor class is used to listen to network traffic.
The IPMonitor class will bind to a specific local host address and listen for network traffic received by the interface. The interface must support promiscuous mode (may not work in many wireless cards because of security considerations), and must be installed on Windows 2000 or greater.
NOTE: If your computer connects to a switch, the switch will only forward packets addressed to your computer. If your computer is on a hub, then you will receive everything.
The use of this component requires administrative permissions.
The first step in using the IPMonitor class is to set LocalHost to the IP address whose traffic you wish to monitor, then set Active to True. For each packet that crosses the interface, the class will parse the header and fire an IPPacket event.
The following is the full list of the properties of the class with short descriptions. Click on the links for further details.
|AcceptData||Enables or disables data reception (the IPPacket event).|
|Active||Enables or disables network monitoring.|
|IPPacket||The contents of the current packet.|
|LocalHost||The name of the local host or user-assigned IP interface through which connections are initiated or accepted.|
The following is the full list of the methods of the class with short descriptions. Click on the links for further details.
|Config||Sets or retrieves a configuration setting.|
|DoEvents||Processes events from the internal message queue.|
|ListIPAddresses||Lists the valid IP addresses for this host.|
|ParsePcapFile||Parses the specified pcap file.|
|Reset||Reset the class.|
The following is the full list of the events fired by the class with short descriptions. Click on the links for further details.
|Error||Information about errors during data delivery.|
|IPAddress||Fired for each valid IP address on this host.|
|IPPacket||Fired whenever a packet is received.|
The following is a list of configuration settings for the class with short descriptions. Click on the links for further details.
|ListInterface||Lists the interfaces visible to the WinPCap or NPCap driver.|
|ReceiveAllMode||Enables a socket to receive all IPv4 or IPv6 packets on the network.|
|SelectedInterface||Used to select the interface the WinPCap or NPCap driver will listen on.|
|UseWinPCap||Whether to use the WinPCap or NPCap driver.|
|AbsoluteTimeout||Determines whether timeouts are inactivity timeouts or absolute timeouts.|
|FirewallData||Used to send extra data to the firewall.|
|InBufferSize||The size in bytes of the incoming queue of the socket.|
|OutBufferSize||The size in bytes of the outgoing queue of the socket.|
|BuildInfo||Information about the product's build.|
|CodePage||The system code page used for Unicode to Multibyte translations.|
|LicenseInfo||Information about the current license.|
|UseInternalSecurityAPI||Tells the class whether or not to use the system security libraries or an internal implementation.|