Net::Silk::ProtoPort - SiLK protocol/port pair
use Net::Silk::ProtoPort;
my $pp1 = Net::Silk::ProtoPort(6, 22);
my $pp2 = Net::Silk::ProtoPort("6:443");
$pp1 < $pp2; # true
print "proto: ", $pp1->proto, "\n";
print " port: ", $pp1->port, "\n";
Net::Silk::ProtoPort
objects represent a protocol/port pair which can be used as a key (as opposed to an IP address) in Net::Silk::Pmap files.
Returns a new Net::Silk::ProtoPort
object. The protocol and port can be provided directly as two arguments, or as an array reference containing the pair, or as a string with a non-digit separator such as "proto:port".
Return or set the protocol number.
Return or set the port number.
Return a copy of this object. This method is tied to the =
operator.
Return a string representation "port:proto". This method is tied to the ""
operator.
Return an integer representing the absolute value of the distance between this protoport and another.
The Net::Silk::ProtoPort
object can be treated as an array, such that $pp->[0]
, $pp->[1]
, and @$pp
work as expected.
The following operators are overloaded and work with Net::Silk::ProtoPort
objects:
"" bool
+= =
+ @{}
-=
-
<=> cmp
> gt
< lt
>= ge
<= le
== eq
!= ne
Net::Silk, Net::Silk::RWRec, Net::Silk::IPSet, Net::Silk::Bag, Net::Silk::Pmap, Net::Silk::IPWildcard, Net::Silk::Range, Net::Silk::CIDR, Net::Silk::IPAddr, Net::Silk::TCPFlags, Net::Silk::File, Net::Silk::Site, silk(7)
Copyright (C) 2011-2016 by Carnegie Mellon University
Use of the Net-Silk library and related source code is subject to the terms of the following licenses:
GNU General Public License (GPL) Rights pursuant to Version 2, June 1991 Government Purpose License Rights (GPLR) pursuant to DFARS 252.227.7013
NO WARRANTY
See GPL.txt and LICENSE.txt for more details.