NAME

Net::Packet::Desc - base class for all desc modules

DESCRIPTION

This is the base class for Net::Packet::DescL2, Net::Packet::DescL3 and Net::Packet::DescL4 modules.

It just provides those layers with inheritable attributes and methods.

A descriptor is required when you want to send frames over network.

ATTRIBUTES

env

A reference to a Net::Packet::Env object. By default, initialized to $Net::Packet::Env variable.

noEnvSet

When a new object is created, the Net::Packet global $Env object as its desc attribute set to this newly created Desc object. Setting it to 1 avoids this. Default is 0.

METHODS

send (scalar)

Send the raw data passed as parameter to the env object.

close

Close the descriptor.

isDescL2
isDescL3
isDescL4

Returns true if Desc is of specified type, false otherwise.

CONSTANTS

Load them: use Net::Packet::Consts qw(:desc);

NP_DESC_IPPROTO_TCP
NP_DESC_IPPROTO_UDP
NP_DESC_IPPROTO_ICMPv4
NP_DESC_L2
NP_DESC_L3
NP_DESC_L4

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 Copying file in the source distribution archive.

RELATED MODULES

NetPacket, Net::RawIP, Net::RawSock