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::PACKET::SLL (3)

.ds Aq ’

NAME

Net::Packet::SLL - Linux cooked capture layer 2 object

CONTENTS

SYNOPSIS



   #
   # Usually, you do not use this module directly
   #
   use Net::Packet::Consts qw(:sll);
   require Net::Packet::SLL;

   # Build a layer
   my $layer = Net::Packet::SLL->new;
   $layer->pack;

   print RAW: .unpack(H*, $layer->raw)."\n";

   # Read a raw layer
   my $layer = Net::Packet::SLL->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 Linux cooked capture layer.

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

ATTRIBUTES

<B>packetTypeB> Stores the packet type (unicast to us, sent by us ...).
<B>addressTypeB> The address type.
<B>addressLengthB> The length of the previously specified address.
<B>sourceB> Source address.
<B>protocolB> Encapsulated protocol.

METHODS

<B>newB> Object constructor. You can pass attributes that will overwrite default ones. Default values:

packetType: NP_SLL_PACKET_TYPE_SENT_BY_US

addressType: NP_SLL_ADDRESS_TYPE_512

addressLength: 0

source: 0

protocol: NP_SLL_PROTOCOL_IPv4

<B>packB> Packs all attributes into a raw format, in order to inject to network. Returns 1 on success, undef otherwise.
<B>unpackB> Unpacks raw data from network and stores attributes into the object. Returns 1 on success, undef otherwise.
<B>isProtocolIpv4B>
<B>isProtocolIpv6B>
<B>isProtocolIpB> - is type IPv4 or IPv6 Helper methods. Return true is the encapsulated layer is of specified type, false otherwise.

CONSTANTS

Load them: use Net::Packet::Consts qw(:sll);
<B>NP_SLL_PACKET_TYPE_SENT_BY_USB>
<B>NP_SLL_PACKET_TYPE_UNICAST_TO_USB> Various possible packet types.
<B>NP_SLL_PROTOCOL_IPv4B>
<B>NP_SLL_PROTOCOL_IPv6B>
<B>NP_SLL_PROTOCOL_ARPB>
<B>NP_SLL_PROTOCOL_VLANB> Various supported encapsulated layer types.
<B>NP_SLL_HDR_LENB>
<B>NP_SLL_ADDRESS_TYPE_512B>

AUTHOR

Patrice <GomoR> Auffret

COPYRIGHT AND LICENSE

Copyright (c) 2004-2009, 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

POD ERRORS

Hey! <B>The above document had some coding errors, which are explained below:B>
Around line 119: Non-ASCII character seen before =encoding in ’# Build’. Assuming ISO8859-1
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 NET::PACKET::SLL (3) 2009-11-09

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