class PacketFu::EthPacket

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)