Method: PacketFu::Octets#read
- Defined in:
- lib/packetfu/protos/ip/header.rb
#read(str) ⇒ Object
Reads a string to populate the object.
25 26 27 28 29 30 |
# File 'lib/packetfu/protos/ip/header.rb', line 25 def read(str) force_binary(str) return self if str.nil? self[:ip_addr].read str[0,4] self end |