NetPacket::ARP is a Perl module to assemble and disassemble ARP (Address Resolution Protocol) packets.
SYNOPSIS
use NetPacket::ARP;
$tcp_obj = NetPacket::ARP->decode($raw_pkt);
$tcp_pkt = NetPacket::ARP->encode(params...); # Not implemented
NetPacket::ARP provides a set of routines for assembling and disassembling packets using ARP (Address Resolution Protocol).
Methods
NetPacket::ARP->decode([RAW PACKET])
Decode the raw packet data given and return an object containing instance data. This method will quite happily decode garbage input. It is the responsibility of the programmer to ensure valid packet data is passed to this method.
NetPacket::ARP->encode(param => value)
Return a ARP packet encoded with the instance data specified. Not implemented.
Functions
NetPacket::ARP::strip([RAW PACKET])
Return the encapsulated data (or payload) contained in the TCP packet. Since no payload data is encapulated in an ARP packet (only instance data), this function returns undef.
Instance data
The instance data for the NetPacket::ARP object consists of the following fields.
htype
Hardware type.
proto
Protocol type.
hlen
Header length.
plen
Protocol length.
opcode
One of the following constants:
ARP_OPCODE_REQUEST
ARP_OPCODE_REPLY
RARP_OPCODE_REQUEST
RARP_OPCODE_REPLY
sha
Source hardware address.
spa
Source protocol address.
tha
Target hardware address.
tpa
Target protocol address.
Product's homepage
Requirements:
· Perl