Net::Silk::TCPFlags - SiLK TCP session flags
use Net::Silk::TCPFlags;
my $f1 = Net::Silk::TCPFlags->new('FSRP');
my $f2 = Net::Silk::TCPFlags->new(5);
my $f3 = $f1 & $f2;
$f1->syn; # true
$f1->ack; # false
print "flags: $f1\n";
print "flags: $f2\n";
print "flags: $f3\n";
$f1->matches("fs/fsau"); # true
Net::Silk::TCPFlags
objects represent the eight bits of flags from a TCP session.
Returns a new Net::Silk::TCPFlags
object. The provide spec can be another TCP flags object, a string, or an integer. If an integer is provided it should be the 8-bit representation of the flags. If a string is provided it should consist of a concatenation of zero or more of the characters F, S, R, P, A, U, E, and C (upper or lower case) representing the FIN, SYN, RST, PSH, ACK, URG, ECE, and CWR flags. Whitespace in the string is ignored.
Return true if the FIN flag is set on flags, false otherwise.
Return true if the SYN flag is set on flags, false otherwise.
Return true if the RST flag is set on flags, false otherwise.
Return true if the PSH flag is set on flags, false otherwise.
Return true if the ACK flag is set on flags, false otherwise.
Return true if the URG flag is set on flags, false otherwise.
Return true if the ECE flag is set on flags, false otherwise.
Return true if the CWR flag is set on flags, false otherwise.
Given a string mask of the form high_flags/mask_flags, return true if the flags match high_flags after being masked with mask_flags, false otherwise. Given a flagmask without the slash (/), return true if all bits in flagmask are set in these flags, i.e. a flagmask without a slash is interpreted as flagmask/flagmask.
Return the numeric representation of these flags.
Return the string representation of these flags. This method is tied to the ""
operator and is invoked when quoted.
Return the whitespace-padded string representation of these flags.
Logical AND with the given flags. Bound to the &
operator.
Logical OR with the given flags. Bound to the |
operator.
Logical EXCLUSIVE OR with the given flags. Bound to the ^
operator.
Logical NEGATION of these flags. Bound to the ~
operator.
String equality with the given flags. Bound to the eq
operator.
String inequality with the given flags. Bound to the ne
operator.
Numeric equality with the given flags. Bound to the ==
operator.
Numeric inequality with the given flags. Bound to the !=
operator.
Comparison (-1, 0, 1) with the given flags. Bound to the cmp
operator.
Boolean negation. Returns true if no flags are set, false otherwise. Bound to the !
operator.
The following operators are overloaded and work with Net::Silk::TCPFlags
objects:
"" ==
& !=
| cmp
^ <=>
~ int
eq !
ne
The following constants are available for export with the :flags key:
A TCPFlags object iwth only the FIN flag set.
A TCPFlags object iwth only the SYN flag set.
A TCPFlags object iwth only the RST flag set.
A TCPFlags object iwth only the PSH flag set.
A TCPFlags object iwth only the ACK flag set.
A TCPFlags object iwth only the URG flag set.
A TCPFlags object iwth only the ECE flag set.
A TCPFlags object iwth only the CWR flag set.
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::ProtoPort, 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.