---
name: "packet.internet.arp"
section: "3"
platform: "linux"
package: "nfstest"
version: "3.2-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/packet.internet.arp"
---

# packet.internet.arp(3)

ARP module

## NAME

packet.internet.arp - ARP module

## DESCRIPTION

Decode ARP and RARP layers.

RFC 826 An Ethernet Address Resolution Protocol RFC 903 A Reverse Address Resolution Protocol

## CLASSES

### class ARP(baseobj.BaseObj)

```
ARP object
Usage:
    from packet.internet.arp import ARP
    x = ARP(pktt)
Object definition:
ARP(
    htype = int,    # Hardware type
    ptype = int,    # Protocol type
    hlen  = int,    # Byte length for each hardware address
    plen  = int,    # Byte length for each protocol address
    oper  = int,    # Opcode
    sha   = string, # Hardware address of sender of this packet
    spa   = string, # Protocol address of sender of this packet
    tha   = string, # Hardware address of target of this packet
    tpa   = string, # Protocol address of target of this packet
)
```

**Methods defined here:** ---------------------

**\_\_init\_\_(self, pktt)** Constructor

Initialize object's private data.

- **pktt:**

  Packet trace object (packet.pktt.Pktt) so this layer has access to the parent layers.

### class RARP(ARP)

```
ARP object
Usage:
    from packet.internet.arp import ARP
    x = ARP(pktt)
Object definition:
ARP(
    htype = int,    # Hardware type
    ptype = int,    # Protocol type
    hlen  = int,    # Byte length for each hardware address
    plen  = int,    # Byte length for each protocol address
    oper  = int,    # Opcode
    sha   = string, # Hardware address of sender of this packet
    spa   = string, # Protocol address of sender of this packet
    tha   = string, # Hardware address of target of this packet
    tpa   = string, # Protocol address of target of this packet
)
```

### class arp\_oper(packet.utils.Enum)

```
enum arp_oper
```

## SEE ALSO

**[baseobj(3)](/baseobj/3.md),** **[packet.internet.arp\_const(3)](/packet.internet.arp_const/3.md),** **[packet.internet.ipv6addr(3)](/packet.internet.ipv6addr/3.md),** **[packet.link.macaddr(3)](/packet.link.macaddr/3.md),** **[packet.utils(3)](/packet.utils/3.md)**

## BUGS

No known bugs.

## AUTHOR

Jorge Mora (mora@netapp.com)
