Class: PacketGen::Header::NetBIOS::Name
- Inherits:
-
DNS::Name
- Object
- Types::Array
- DNS::Name
- PacketGen::Header::NetBIOS::Name
- Defined in:
- lib/packetgen/header/netbios/name.rb
Overview
NetBIOS Name.
Constant Summary collapse
- ENCODED_NAME_SIZE =
Size, in bytes, of an encoded NetBIOS name
32
Constants inherited from DNS::Name
Constants inherited from Types::Array
Instance Attribute Summary
Attributes inherited from DNS::Name
Instance Method Summary collapse
-
#from_human(str) ⇒ Name
Read a NetBIOS name from a string.
-
#to_human ⇒ String
Get a human readable string.
Methods inherited from DNS::Name
#<<, #initialize, #push, #read, #to_s
Methods inherited from Types::Array
#<<, #==, #[], #clear, #clear!, #delete, #delete_at, #each, #empty?, #first, #force_binary, #initialize, #initialize_copy, #last, #push, #read, set_of, #size, #sz, #to_a, #to_s
Constructor Details
This class inherits a constructor from PacketGen::Header::DNS::Name
Instance Method Details
#from_human(str) ⇒ Name
Read a NetBIOS name from a string
23 24 25 26 27 28 29 |
# File 'lib/packetgen/header/netbios/name.rb', line 23 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
33 34 35 36 |
# File 'lib/packetgen/header/netbios/name.rb', line 33 def to_human encoded_name = super decode_name(encoded_name) end |