use Net::Packet::Env qw($Env); # Get default values from system my $env = Net::Packet::Env->new; # Get values from a specific device my $env2 = Net::Packet::Env->new(dev => 'vmnet1'); print "dev: ", $env->dev, "\n"; print "mac: ", $env->mac, "\n"; print "ip : ", $env->ip, "\n" if $env->ip; print "ip6: ", $env->ip6, "\n" if $env->ip6;
So, even if you let the framework compute checksums, IPv4 checksum will not be computed. If you want to send IPv4 frames at layer 2, you will need to also set this parameter to true.
debug: 0
noFrameAutoDesc: 0
noFrameAutoDump: 0
noDescAutoSet: 0
noDumpAutoSet: 0
dev: if not user provided, default interface is used, by calling getDevInfo method. If user provided, all ip, ip6 and mac attributes will be used for that dev.
ip: if not user provided, default interface IP is used, by calling getIp method. If user provided, it is overwritten by the user.
ip6: if not user provided, default interface IPv6 is used, by calling getIp6 method. If user provided, it is overwritten by the user.
mac: if not user provided, default interface MAC is used, by calling getMac method. If user provided, it is overwritten by the user.
You may distribute this module under the terms of the Artistic license. See LICENSE.Artistic file in the source distribution archive.