Class: Libnet::ARP
Overview
ARP
Class to represent an Address Resolution Protocol (ARP) header. Depending on the operation
value, the method builds one of several different types of RFC 826 or RFC 903 RARP packets.
Example
a = Libnet::ARP.new
a.htype = 1
a.protocol = 0x0800
a.hlen = 6
a.plen = 4
a.operation = 1
a.sender_haddr = 'aa:bb:cc:dd:ee:ff'
a.sender_paddr = '192.168.1.100'
a.target_haddr = '11:22:33:44:55:66'
a.target_paddr = '192.168.1.123'
Public Class Methods
decode(string) -> new ARP object
Decode a packed ARP packet.
Public Instance Methods
htype, htype=, htype?
Get/set/query the hardware address type.
protocol, protocol=, protocol?
Get/set/query the protocol address type.
hlen, hlen=, hlen?
Get/set/query the hardware address length.
plen, plen=, plen?
Get/set/query the protocol address length.
operation, operation=, operation?
Get/set/query the ARP operation type.
sender_haddr, sender_haddr=, sender_haddr?
Get/set/query the sender’s hardware address.
sender_paddr, sender_paddr=, sender_paddr?
Get/set/query the sender’s protocol address.
target_haddr, target_haddr=, target_haddr?
Get/set/query the target’s hardware address.
target_paddr, target_paddr=, target_paddr?
Get/set/query the target’ protocol address.
payload, payload=, payload?
Get/set/query the payload.
ptag
Get the ptag value for this header object. Set by the Libnet builder method.
Constant Summary
Constants inherited from Header
Header::DEFAULT_OPTS, Header::HWADDR_RE, Header::IPADDR_RE, Header::UNIT_MULTIPLIERS
Instance Attribute Summary
Attributes inherited from Header
Method Summary
Methods inherited from Header
assignment_filter, decode, fields, inherited, #initialize, octets_field, unsigned_field
Methods included from Helpers
Constructor Details
This class inherits a constructor from Libnet::Header