Net::Write::Layer2 - object for a link layer (layer 2) descriptor


Net-Write documentation  | view source Contained in the Net-Write distribution.

Index


NAME

Top

Net::Write::Layer2 - object for a link layer (layer 2) descriptor

SYNOPSIS

Top

   use Net::Write::Layer2;

   my $desc = Net::Write::Layer2->new(
      dev => 'eth0',
   );

   $desc->open;
   $desc->send('G'x666);
   $desc->close;

DESCRIPTION

Top

This is the class for creating a layer 2 descriptor.

ATTRIBUTES

Top

dev

The string specifying network interface to use.

Under Unix-like systems, this is in this format: \w+\d+ (example: eth0).

Under Windows systems, this is more complex; example: \Device\NPF_{0749A9BC-C665-4C55-A4A7-34AC2FBAB70F}

METHODS

Top

new

Object constructor. You MUST pass a valid dev attribute. There is no default value.

open

Open the interface.

send (scalar)

Send raw data to the network.

close

Close the descriptor.

CAVEATS

Top

Writing junk to loopback interface on BSD systems will not work.

SEE ALSO

Top

Net::Write::Layer

AUTHOR

Top

Patrice <GomoR> Auffret

COPYRIGHT AND LICENSE

Top


Net-Write documentation  | view source Contained in the Net-Write distribution.