Class: PacketGen::Plugin::SMB::Blocks
- Inherits:
-
Header::Base
- Object
- Header::Base
- PacketGen::Plugin::SMB::Blocks
- Defined in:
- lib/packetgen/plugin/smb/blocks.rb
Overview
Common blocks used for unsupported SMB messages.
Blocks handles parameter block and data block. Parameter block is composed of:
-
a 8-bit #word_count field,
-
a #words field, an array of
PacketGen::Types::Int16le
.
Data block is composed of:
-
a little endian 16-bit #byte_count field,
-
a #bytes field, an array of
PacketGen::Types::Int8
.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#byte_count ⇒ Integer
The size, in bytes, of the #bytes field.
-
#bytes ⇒ PacketGen::Types::ArrayOfInt8
The message-specific data structure.
-
#word_count ⇒ Integer
The size, in 2-byte words, of the #words field.
-
#words ⇒ PacketGen::Types::ArrayOfInt16le
The message-specific parameters structure.
Instance Method Summary collapse
-
#protocol_name ⇒ String
Give protocol name for this class.
Instance Attribute Details
#byte_count ⇒ Integer
The size, in bytes, of the #bytes field.
32 |
# File 'lib/packetgen/plugin/smb/blocks.rb', line 32 define_field :byte_count, PacketGen::Types::Int16le |
#bytes ⇒ PacketGen::Types::ArrayOfInt8
The message-specific data structure.
36 |
# File 'lib/packetgen/plugin/smb/blocks.rb', line 36 define_field :bytes, PacketGen::Types::ArrayOfInt8, builder: ->(h, t) { t.new(counter: h[:byte_count]) } |
#word_count ⇒ Integer
The size, in 2-byte words, of the #words field.
24 |
# File 'lib/packetgen/plugin/smb/blocks.rb', line 24 define_field :word_count, PacketGen::Types::Int8 |
#words ⇒ PacketGen::Types::ArrayOfInt16le
The message-specific parameters structure.
28 |
# File 'lib/packetgen/plugin/smb/blocks.rb', line 28 define_field :words, PacketGen::Types::ArrayOfInt16le, builder: ->(h, t) { t.new(counter: h[:word_count]) } |
Instance Method Details
#protocol_name ⇒ String
Give protocol name for this class
40 41 42 |
# File 'lib/packetgen/plugin/smb/blocks.rb', line 40 def protocol_name 'SMB::Blocks' end |