NAME
Net::Write::Fast - create and inject packets fast
SYNOPSIS
use Net::Write::Fast;
# Sends multiple TCP SYNs to the same IPv4 target
my $r = Net::Write::Fast::l4_send_tcp_syn(
"192.168.0.1", # IPv4 source
"192.168.0.10", # IPv4 destination
[ 25, 80, 110 ], # TCP port targets
200, # Number of packet per second
0, # Use IPv4
);
# Sends multiple TCP SYNs to multiple IPv4 targets
my $r = Net::Write::Fast::l4_send_tcp_syn_multi(
"::1", # IPv6 source
[ '::2', '::3' ], # IPv6 targets
[ 25, 80, 110 ], # TCP port targets
200, # Number of packet per second
3, # Number of try
1, # Use IPv6
);
# Handle errors
if ($r == 0) {
print STDERR "ERROR: ",Net::Write::Fast::nwf_geterror(),"\n";
}
DESCRIPTION
Sends network frames fast to the network.
METHODS
- l4_send_tcp_syn (ip_src, ip_dst, ports array, ports count, packet per second, useIPv6 flag)
-
Sends a single TCP SYN at layer 4. Returns 0 in case of failure, and sets error buffer to an error message.
- l4_send_tcp_syn_multi (ip_src, ip_dst array, ip_dst count, ports array, ports count, packet per second, try count, useIPv6 flag)
-
Sends multiple TCP SYN at layer 4 to multiple IP targets. Returns 0 in case of failure, and sets error buffer to an error message.
- nwf_geterror
-
Get latest error message.
AUTHOR
Patrice <GomoR> Auffret
COPYRIGHT AND LICENSE
Copyright (c) 2011-2012, Patrice <GomoR> Auffret
You may distribute this module under the terms of the Artistic license. See LICENSE.Artistic file in the source distribution archive.