---
name: "Net::Frame::Layer::SLL"
section: "3pm"
platform: "linux"
package: "libnet-frame-perl"
version: "1.21-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Net::Frame::Layer::SLL"
---

# Net::Frame::Layer::SLL(3pm)

Linux cooked capture layer object

## NAME

Net::Frame::Layer::SLL - Linux cooked capture layer object

## SYNOPSIS

```
   use Net::Frame::Layer::SLL qw(:consts);
   # Build a layer
   my $layer = Net::Frame::Layer::SLL->new(
      packetType    => NF_SLL_PACKET_TYPE_SENT_BY_US,
      addressType   => NF_SLL_ADDRESS_TYPE_512,
      addressLength => 0,
      source        => 0,
      protocol      => NF_SLL_PROTOCOL_IPv4,
   );
   $layer->pack;
   print 'RAW: '.$layer->dump."\n";
   # Read a raw layer
   my $layer = Net::Frame::Layer::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 **Net::Frame::Layer** for other attributes and methods.

## ATTRIBUTES

- **packetType**

  Stores the packet type (unicast to us, sent by us ...).

- **addressType**

  The address type.

- **addressLength**

  The length of the previously specified address.

- **source**

  Source address.

- **protocol**

  Encapsulated protocol.

The following are inherited attributes. See **Net::Frame::Layer** for more information.

- **raw**

  - **payload**

  - **nextLayer**

  ## METHODS

- **new**

  - **new** (hash)

  Object constructor. You can pass attributes that will overwrite default ones. See **SYNOPSIS** 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 **Net::Frame::Layer** for more information.

- **layer**

  - **computeLengths**

  - **computeChecksums**

  - **pack**

  - **unpack**

  - **encapsulate**

  - **getLength**

  - **getPayloadLength**

  - **print**

  - **dump**

  ## CONSTANTS

Load them: use Net::Frame::Layer::SLL qw(:consts);

- **NF\_SLL\_PACKET\_TYPE\_SENT\_BY\_US**

  - **NF\_SLL\_PACKET\_TYPE\_UNICAST\_TO\_US**

  Various possible packet types.

- **NF\_SLL\_PROTOCOL\_IPv4**

  - **NF\_SLL\_PROTOCOL\_X25**

  - **NF\_SLL\_PROTOCOL\_ARP**

  - **NF\_SLL\_PROTOCOL\_CGMP**

  - **NF\_SLL\_PROTOCOL\_80211**

  - **NF\_SLL\_PROTOCOL\_PPPIPCP**

  - **NF\_SLL\_PROTOCOL\_RARP**

  - **NF\_SLL\_PROTOCOL\_DDP**

  - **NF\_SLL\_PROTOCOL\_AARP**

  - **NF\_SLL\_PROTOCOL\_PPPCCP**

  - **NF\_SLL\_PROTOCOL\_WCP**

  - **NF\_SLL\_PROTOCOL\_8021Q**

  - **NF\_SLL\_PROTOCOL\_IPX**

  - **NF\_SLL\_PROTOCOL\_STP**

  - **NF\_SLL\_PROTOCOL\_IPv6**

  - **NF\_SLL\_PROTOCOL\_WLCCP**

  - **NF\_SLL\_PROTOCOL\_MPLS**

  - **NF\_SLL\_PROTOCOL\_PPPoED**

  - **NF\_SLL\_PROTOCOL\_PPPoES**

  - **NF\_SLL\_PROTOCOL\_8021X**

  - **NF\_SLL\_PROTOCOL\_AoE**

  - **NF\_SLL\_PROTOCOL\_80211I**

  - **NF\_SLL\_PROTOCOL\_LLDP**

  - **NF\_SLL\_PROTOCOL\_LLTD**

  - **NF\_SLL\_PROTOCOL\_LOOP**

  - **NF\_SLL\_PROTOCOL\_VLAN**

  - **NF\_SLL\_PROTOCOL\_PPPPAP**

  - **NF\_SLL\_PROTOCOL\_PPPCHAP**

  Various supported encapsulated layer types.

- **NF\_SLL\_ADDRESS\_TYPE\_512**

  ## SEE ALSO

Net::Frame::Layer

## AUTHOR

Patrice \<GomoR\> Auffret

## COPYRIGHT AND LICENSE

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

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