GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  NET::FRAME::LAYER::ETH (3)

.ds Aq ’

NAME

Net::Frame::Layer::ETH - Ethernet/802.3 layer object

CONTENTS

SYNOPSIS



   use Net::Frame::Layer::ETH qw(:consts);

   # Build a layer
   my $layer = Net::Frame::Layer::ETH->new(
      src  => 00:00:00:00:00:00,
      dst  => NF_ETH_ADDR_BROADCAST,
      type => NF_ETH_TYPE_IPv4,
   );
   $layer->pack;

   print RAW: .$layer->dump."\n";

   # Read a raw layer
   my $layer = Net::Frame::Layer::ETH->new(raw => $raw);

   print $layer->print."\n";
   print PAYLOAD: .unpack(H*, $layer->payload)."\n"
      if $layer->payload;



DESCRIPTION

This modules implements the encoding and decoding of the Ethernet/802.3 layer.

RFC: ftp://ftp.rfc-editor.org/in-notes/rfc894.txt

See also <B>Net::Frame::LayerB> for other attributes and methods.

ATTRIBUTES

<B>srcB>
<B>dstB> Source and destination MAC addresses, in classical format (00:11:22:33:44:55).
<B>typeB> The encapsulated layer type (IPv4, IPv6 ...) for Ethernet. Values for Ethernet types are greater than 1500. If it is less than 1500 the layer is considered a 802.3 one. See http://www.iana.org/assignments/ethernet-numbers .
<B>lengthB> The length of the payload when this layer is a 802.3 one. This is the same attribute as <B>typeB>, but you cannot use it when calling <B>newB> (you can only use it as an accessor after that).
The following are inherited attributes. See <B>Net::Frame::LayerB> for more information.
<B>rawB>
<B>payloadB>
<B>nextLayerB>

METHODS

<B>newB>
<B>newB> (hash) Object constructor. You can pass attributes that will overwrite default ones. See <B>SYNOPSISB> for default values.
The following are inherited methods. Some of them may be overridden in this layer, and some others may not be meaningful in this layer. See <B>Net::Frame::LayerB> for more information.
<B>layerB>
<B>computeLengthsB>
<B>computeChecksumsB>
<B>packB>
<B>unpackB>
<B>encapsulateB>
<B>getLengthB>
<B>getPayloadLengthB>
<B>printB>
<B>dumpB>

CONSTANTS

Load them: use Net::Frame::Layer::ETH qw(:consts);
<B>NF_ETH_ADDR_BROADCASTB> Ethernet broadcast address.
<B>NF_ETH_TYPE_IPv4B>
<B>NF_ETH_TYPE_X25B>
<B>NF_ETH_TYPE_ARPB>
<B>NF_ETH_TYPE_CGMPB>
<B>NF_ETH_TYPE_80211B>
<B>NF_ETH_TYPE_PPPIPCPB>
<B>NF_ETH_TYPE_RARPB>
<B>NF_ETH_TYPE_DDPB>
<B>NF_ETH_TYPE_AARPB>
<B>NF_ETH_TYPE_PPPCCPB>
<B>NF_ETH_TYPE_WCPB>
<B>NF_ETH_TYPE_8021QB>
<B>NF_ETH_TYPE_IPXB>
<B>NF_ETH_TYPE_STPB>
<B>NF_ETH_TYPE_IPv6B>
<B>NF_ETH_TYPE_WLCCPB>
<B>NF_ETH_TYPE_MPLSB>
<B>NF_ETH_TYPE_PPPoEDB>
<B>NF_ETH_TYPE_PPPoESB>
<B>NF_ETH_TYPE_8021XB>
<B>NF_ETH_TYPE_AoEB>
<B>NF_ETH_TYPE_80211IB>
<B>NF_ETH_TYPE_LLDPB>
<B>NF_ETH_TYPE_LLTDB>
<B>NF_ETH_TYPE_LOOPB>
<B>NF_ETH_TYPE_VLANB>
<B>NF_ETH_TYPE_PPPPAPB>
<B>NF_ETH_TYPE_PPPCHAPB> Various supported Ethernet types.

SEE ALSO

Net::Frame::Layer

AUTHOR

Patrice <GomoR> Auffret

COPYRIGHT AND LICENSE

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

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

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 NET::FRAME::LAYER::ETH (3) 2015-11-16

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.