NAME

Net::Packet::DescL2 - object for a link layer (layer 2) descriptor

SYNOPSIS

require Net::Packet::DescL2;

# Usually, you use it to send ARP frames, that is crafted from ETH layer
my $d2 = Net::Packet::DescL2->new(
   dev => 'eth0',
);

$d2->send($rawStringToNetwork);

DESCRIPTION

See also Net::Packet::Desc for other attributes and methods.

METHODS

new

Create the object, using default $Env object values for dev, ip, ip6 and mac (see Net::Packet::Env). When the object is created, the $Env global object has its desc attributes set to it. You can avoid this behaviour by setting noDescAutoSet in $Env object (see Net::Packet::Env).

Default values for attributes:

dev: $Env->dev

ip: $Env->ip

ip6: $Env->ip6

mac: $Env->mac

AUTHOR

Patrice <GomoR> Auffret

COPYRIGHT AND LICENSE

Copyright (c) 2004-2006, Patrice <GomoR> Auffret

You may distribute this module under the terms of the Artistic license. See LICENSE.Artistic file in the source distribution archive.

RELATED MODULES

NetPacket, Net::RawIP, Net::RawSock