class PacketProtocols::Ethernet
Constants
- PROTOCOLS
Public Instance Methods
has_vlan?()
click to toggle source
# File lib/packet-protocols/ethernet.rb, line 30 def has_vlan? protocol_internal == :vlan end
length()
click to toggle source
# File lib/packet-protocols/ethernet.rb, line 38 def length 14 + (has_vlan? ? 4 : 0) + payload.length end
protocol()
click to toggle source
# File lib/packet-protocols/ethernet.rb, line 34 def protocol has_vlan? ? vlan.protocol : protocol_internal end