lib/ruby_smb/dcerpc/ndr.rb in ruby_smb-3.3.5 vs lib/ruby_smb/dcerpc/ndr.rb in ruby_smb-3.3.6
- old
+ new
@@ -64,15 +64,19 @@
class NdrEnum < BinData::Int16le
default_parameters byte_align: 2
end
# [Integers](https://pubs.opengroup.org/onlinepubs/9629399/chap14.htm#tagcjh_19_02_05)
- # This will define the four size Integers accepted by the NDR protocol:
+ # This will define the eight Integers accepted by the NDR protocol:
+ # - NdrInt8
# - NdrUint8
+ # - NdrInt16
# - NdrUint16
+ # - NdrInt32
# - NdrUint32
+ # - NdrInt64
# - NdrUint64
- {Uint8: 1, Uint16le: 2, Uint32le: 4, Uint64le: 8}.each do |klass, nb_bytes|
+ {Int8: 1, Uint8: 1, Int16le: 2, Uint16le: 2, Int32le: 4, Uint32le: 4, Int64le: 8, Uint64le: 8}.each do |klass, nb_bytes|
new_klass_name = "Ndr#{klass.to_s.chomp('le')}"
unless self.const_defined?(new_klass_name)
new_klass = Class.new(BinData.const_get(klass)) do
default_parameters byte_align: nb_bytes
end