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

Hi All,

I need to write some scripts for network analysis like gathering the network data according to the rules given. The rules is like a filters ( like in tcpdump we use the grammar rules protocol tcp and udp ).

Anyone suggest where can I start reading about this? And necessary modules for capturing the network traffic on the specific servers or group of servers.

Thanks,
Swaroop
  • Comment on Network management through perl scripts

Replies are listed 'Best First'.
Re: Network management through perl scripts
by rob_au (Abbot) on Jun 22, 2005 at 08:04 UTC
    The module which you should be looking at is Net::Pcap - This module serves as an interface to the libpcap library which is similarly used for network packet capture by tcpdump. I have previously written an article on the use of this module for The Perl Journal which can be downloaded with login credentials here (or from the Google cache here)

     

    perl -le "print unpack'N', pack'B32', '00000000000000000000001000000000'"