6 Replies - 19651 Views - Last Post: 14 January 2010 - 07:46 PM Rate Topic: -----

#1 Lumenii  Icon User is offline

  • D.I.C Head

Reputation: 10
  • View blog
  • Posts: 92
  • Joined: 04-January 07

Monitoring Network Traffic

Post icon  Posted 14 January 2010 - 05:36 PM

Hi guys,

I'm looking to monitor network traffic - for now I am just looking at inbound data from the internet, i.e. downloads, visited pages, etc etc. I am familiar with various network manipulation methods, both local and not - for example retrieving/checking pages/files on the internet, or communicating with other computers (TCP sockets, anyone?).

Example: A user is browsing the web using Firefox. They visit a web page and play a media file on said page (streaming media, for sake of the example). I would like to have an event triggered in my application, with a way of retrieving data of both the page, and the streaming file.

I just can't quite seem to find what I'm looking for. Edit: at this point... everything is helpful. Forget "hints" or "nudges in the right direction." I need help. :)

This is a basic version of what I want: http://www.codeproje.../URLLogger.aspx

________________________

Edit: to be clear, this should be application-independent, meaning it should monitor the traffic, not the application being used to browse the material.

This post has been edited by Lumenii: 14 January 2010 - 07:50 PM


Is This A Good Question/Topic? 1
  • +

Replies To: Monitoring Network Traffic

#2 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1641
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: Monitoring Network Traffic

Posted 14 January 2010 - 05:46 PM

You could start by looking at the NetworkInformation Namespace and the IPGlobalProperties Class to see if either can offer you any help
Was This Post Helpful? 0
  • +
  • -

#3 Lumenii  Icon User is offline

  • D.I.C Head

Reputation: 10
  • View blog
  • Posts: 92
  • Joined: 04-January 07

Re: Monitoring Network Traffic

Posted 14 January 2010 - 06:00 PM

Thank you. Exactly the type of help I was hoping to receive. I'm looking over them now and I'll let you know how it works out.

This post has been edited by Lumenii: 14 January 2010 - 06:51 PM

Was This Post Helpful? 0
  • +
  • -

#4 AMDKilla  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 88
  • Joined: 30-December 09

Re: Monitoring Network Traffic

Posted 14 January 2010 - 06:48 PM

Dedicated network monitoring software like Wireshark uses a driver that sits pretty deep in the networking stack, allowing it to see everything that windows sends/recieves.

The driver is available as a seperate install, maybe there would be a way of using it, and making sure its installed on client machines by using prerequisites.
Was This Post Helpful? 0
  • +
  • -

#5 Lumenii  Icon User is offline

  • D.I.C Head

Reputation: 10
  • View blog
  • Posts: 92
  • Joined: 04-January 07

Re: Monitoring Network Traffic

Posted 14 January 2010 - 06:57 PM

I have looked over and explored the NetworkInformation namespace as well as two contained classes, including the one you linked to. I found ways to get basic network information, as well as monitoring packets in general.

For example:

		Dim Properties As IPGlobalProperties
		Dim StatV4 As IPGlobalStatistics
		Properties = IPGlobalProperties.GetIPGlobalProperties
		StatV4 = Properties.GetIPv4GlobalStatistics
		TextBox1.Text = "Hostname: " & Properties.HostName & vbNewLine
		TextBox1.Text &= "Received: " & StatV4.ReceivedPackets & vbNewLine
		TextBox1.Text &= "Delivered: " & StatV4.ReceivedPacketsDelivered & vbNewLine
		TextBox1.Text &= "Discarded: " & StatV4.ReceivedPacketsDiscarded & vbNewLine
		TextBox1.Text &= "Forwarded: " & StatV4.ReceivedPacketsForwarded & vbNewLine


I have not, however, come across a method of doing what I am looking for. To clarify, a desirable end result for me would be the following link: http://www.codeproje.../URLLogger.aspx

C++ is obviously not VB.NET. It also involves an added API, which I am trying to avoid unless necessary.

This post has been edited by Lumenii: 14 January 2010 - 06:58 PM

Was This Post Helpful? 0
  • +
  • -

#6 AMDKilla  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 88
  • Joined: 30-December 09

Re: Monitoring Network Traffic

Posted 14 January 2010 - 07:32 PM

WinPCap was the driver I was refering to. I cant think of any other way of acomplishing what you want to do, and I don't have any idea what the VB.NET equivilent of that C++ code is.
Was This Post Helpful? 0
  • +
  • -

#7 Lumenii  Icon User is offline

  • D.I.C Head

Reputation: 10
  • View blog
  • Posts: 92
  • Joined: 04-January 07

Re: Monitoring Network Traffic

Posted 14 January 2010 - 07:46 PM

Sorry, AMDKilla, I was writing that post when you replied. Seems I did indeed find the same thing you were suggesting.

Anyone know of a way to utilize Winpcap with VB.NET/the equivalent of the C++ code I linked to? Or even a separate way to do this?

Everything is helpful. Thanks again.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1