| 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.
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)