Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

monitoring tcp/ip traffic

by orange (Beadle)
on Oct 26, 2009 at 15:06 UTC ( [id://803293]=perlquestion: print w/replies, xml ) Need Help??

orange has asked for the wisdom of the Perl Monks concerning the following question:

hi
windows 7 is lacking the LAN icon in the taskbar System Tray area, in winxp it is usually blinking when there is an internet traffic to and from the computer, i have found a vb6 program called LanLight to monitors LAN TCP/IP traffic from & to the computer, but this is old and the program have no source code to study, i wish to try the perl togethor with win32 gui, so can you instruct me if there is a module suitable to monitor the traffic through LAN TCP/IP , after that i will look at the problem of how to reflect the results to an animated icon on the taskbar .
regards

Replies are listed 'Best First'.
Re: monitoring tcp/ip traffic
by ikegami (Patriarch) on Oct 26, 2009 at 15:16 UTC

    in winxp it is usually blinking when there is an internet traffic to and from the computer

    This is an option in WinXP. Maybe it is in Win7 as well? ( Guess not )

    In WinXP, the option is called "Show icon in notification area when connected". It is located in the properties of the Connection

    1. From the Control Panel,
    2. Open "Network Connections"
    3. Open the relevant connection ("Local Area Connection" for LAN)
    4. Click "Properties".
    5. Check "Show icon in notification area when connected".
      thanks ikegami, in windows 7 the "Show icon in notification area when connected" is omited, and the wireless icon is very poor like this picture: http://img408.imageshack.us/img408/9881/geierfig01.jpg and can't be changed, it is not animated. many people are complaining from this omission
      try google (windows 7 network icon) there are many people unsatisfied by this.
Re: monitoring tcp/ip traffic
by Bloodnok (Vicar) on Oct 26, 2009 at 15:10 UTC
    I'd have thought that the Net::Pcap family of module ought to do the trick...

    A user level that continues to overstate my experience :-))
      Pcap isn't required. Windows comes with this feature, you just have to enable it.
Re: monitoring tcp/ip traffic
by bohrme (Scribe) on Oct 26, 2009 at 20:32 UTC

    For the sake of education, what might the Perl solution look like as far as monitoring network activity is concerned?

      Hi
      morphologically it displays a TV/monitor icon like in this picture:
      http://img198.imageshack.us/img198/3159/lanlight.jpg
      which should light when there is an activity and dim when there is no activity, many times i have used this feature in winxp to get out from some sites which are trying to attack my computer and the antivirus was not able to detect the attack.
      the vb6 program which do the trick is here:
      http://www.dalesplace.net/download/lanlight.php
      for the windows nt4, xp. vista. win7 download:
      http://www.dalesplace.net/download/LanLightNTF.zip
      i want the perl program for windows to do the same work.
      it may be made from two parts: first the monitoring code, second reflecting the result of monitoring to the icon in the sys tray; this second part i think is available through studying the "NotifyIcon.pl" available in the win32gui package
      but the most hard task for me is the first ; i need to study the subject, even for fun only.
      regards

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://803293]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-04-20 04:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found