Class: PacketGen::Plugin::NetBIOS::Name
- Inherits:
-
Header::DNS::Name
- Object
- Header::DNS::Name
- PacketGen::Plugin::NetBIOS::Name
- Defined in:
- lib/packetgen/plugin/netbios/name.rb
Overview
NetBIOS Name.
Constant Summary collapse
- ENCODED_NAME_SIZE =
Size, in bytes, of an encoded NetBIOS name
32
Instance Method Summary collapse
-
#from_human(str) ⇒ Name
Read a NetBIOS name from a string.
-
#to_human ⇒ String
Get a human readable string.
Instance Method Details
#from_human(str) ⇒ Name
Read a NetBIOS name from a string
21 22 23 24 25 26 27 |
# File 'lib/packetgen/plugin/netbios/name.rb', line 21 def from_human(str) clear return self if str.nil? encoded_name = encode_name(str) super(encoded_name) end |
#to_human ⇒ String
Get a human readable string
31 32 33 34 |
# File 'lib/packetgen/plugin/netbios/name.rb', line 31 def to_human encoded_name = super decode_name(encoded_name) end |