Net::Inspect::L5::GuessProtocol - tries to find and redirect to appropriate protocol handler
... my $guess = Net::Inspect::L5::GuessProtocol->new; $guess->attach($http); $guess->attach($null); ... my $tcp = Net::Inspect::L4::TCP->new($guess);
Uses the attached flows to find out, which OSI Layer 7 protocol the data might be in and then gives control to the appropriate protocol handler.
Implements the hooks required for Net::Inspect::L4::TCP. Usually attached to Net::Inspect::L4::TCP and attached flows are usually Net::Inspect::Connection::*.
Net::Inspect::L4::TCP
Net::Inspect::Connection::*
Methods:
attaches specified flow, which should provide guess_protocol method
guess_protocol
detaches specified flow
returns list of attached flows
Hooks provided:
forwarded to protocol implementing object if it is already found. Otherwise calls guess_protocol and length($data).
length($data)
forwarded to protocol implementing object
Called hooks:
The flow should return an appropriate Net::Inspect::Connection object if it does implement the protocol. If it does not implement the protocol it should detach itself from the $guess flow using $guess->attach(undef,$self) and return (). If it needs more data to decide it should simply return ().
$guess
$guess->attach(undef,$self)
The hook must do it's own buffering of the given data and process them before returning itself as the protocol handler.
The hooks in and fatal gets forwarded to the protocol implementing object once it is found.
in
fatal
To install Net::Inspect, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Inspect
CPAN shell
perl -MCPAN -e shell install Net::Inspect
For more information on module installation, please visit the detailed CPAN module installation guide.