-
-
20 Aug 2008 00:18:46 UTC
- Distribution: Egg-Plugin-Net-Scan
- Module version: 3.00
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues
- Testers (5 / 3 / 1)
- Kwalitee
Bus factor: 0- License: perl_5
- Activity
24 month- Tools
- Download (21.07KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 1 contributors- Masatoshi Mizuno E<lt>lusheE<64>cpan.orgE<gt>
- Dependencies
- Egg::Release
- Test::More
- Test::Perl::Critic
- Test::Pod
- Test::Pod::Coverage
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Egg::Plugin::Net::Scan - Network host's port is checked.
SYNOPSIS
use Egg qw/ Net::Scan /; # If the port is effective, by the 25th mail is sent. my $scan= $e->port_scan('192.168.1.1', 25, timeout => 3 ); if ( $scan->is_success ) { $e->mail->send; print " Mail was transmitted."; } elsif ( $scan->is_block ) { print " Mail server has stopped. "; } else { print " Error occurs: ". $scan->is_error; }
DESCRIPTION
It is a plugin to check the operational condition of arbitrary host's port.
* Because 'alarm' command is used, it operates in the platform that doesn't correspond. A fatal error occurs when it is made to do.
METHODS
port_scan ( [TARGET_HOST], [TARGET_PORT], [OPTION] )
The port scan is done and the result is returned with the 'Egg::Plugin::Net::Scan::Result' object.
When TARGET_HOST and TARGET_PORT are omitted, the exception is generated.
The following options can be passed to OPTION.
timeout
Time to wait for answer from port.
* It is judged that it is blocked when there is no answer in this time.
Default is '1'.
protcol
Communication protocol.
Default is 'tcp'.
RESULT METHODS
It is a method supported by Egg::Plugin::Net::Scan::Result.
my $result= $e->port_cacan( ....... );
new
Constructor.
is_success
When the answer from the port is admitted, true is restored.
is_block
When the answer from the port doesn't come back within the second of timeout, true is returned.
is_error
When some errors occur, the error message is returned.
SEE ALSO
AUTHOR
Masatoshi Mizuno <lushe@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2008 Bee Flag, Corp. <http://egg.bomcity.com/>.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.
Module Install Instructions
To install Egg::Plugin::Net::Scan, copy and paste the appropriate command in to your terminal.
cpanm Egg::Plugin::Net::Scan
perl -MCPAN -e shell install Egg::Plugin::Net::Scan
For more information on module installation, please visit the detailed CPAN module installation guide.