Exception: PacketGen::BindingError

Inherits:
Error
  • Object
show all
Defined in:
lib/packetgen.rb

Overview

No known binding

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(prev_hdr, hdr) ⇒ BindingError

Returns a new instance of BindingError.



34
35
36
37
38
# File 'lib/packetgen.rb', line 34

def initialize(prev_hdr, hdr)
  super()
  @prev_hdr = prev_hdr
  @hdr = hdr
end

Instance Attribute Details

#hdrHeaderable (readonly)

Returns:



32
33
34
# File 'lib/packetgen.rb', line 32

def hdr
  @hdr
end

#prev_hdrHeaderable (readonly)

Returns:



30
31
32
# File 'lib/packetgen.rb', line 30

def prev_hdr
  @prev_hdr
end

Instance Method Details

#messageObject



40
41
42
43
44
45
# File 'lib/packetgen.rb', line 40

def message
  "#{prev_hdr.class} knowns no layer association with #{hdr.protocol_name}. " \
    "Try #{prev_hdr.class}.bind_layer(#{hdr.class}, " \
    "#{prev_hdr.method_name}_proto_field: " \
    "<value_for_#{hdr.method_name}>)"
end