Class PacketFu::EthPacket
In: lib/packetfu/eth.rb
Parent: Packet

EthPacket is used to construct Ethernet packets. They contain an Ethernet header, and that‘s about it.

Example

  require 'packetfu'
  eth_pkt = PacketFu::EthPacket.new
  eth_pkt.eth_saddr="00:1c:23:44:55:66"
  eth_pkt.eth_daddr="00:1c:24:aa:bb:cc"

  eth_pkt.to_w('eth0') # Inject on the wire. (require root)

Methods

new   recalc  

Attributes

eth_header  [RW] 

Public Class methods

Public Instance methods

Does nothing, really, since there‘s no length or checksum to calculate for a straight Ethernet packet.

[Validate]