logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

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

Attributes

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}

Author

       Patrice <GomoR> Auffret

Caveats

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

Description

       This is the class for creating a layer 2 descriptor.

Methods

new Object constructor. You MUST pass a valid dev attribute. There is no default value. Returns undef  on
           error.

       open
           Open the interface. Returns undef on error.

       send (scalar)
           Send raw data to the network.

       close
           Close the descriptor.

Name

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

See Also

       Net::Write::Layer

Synopsis

          use Net::Write::Layer2;

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

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

See Also