Class: BetterCap::Parsers::Hsrp

Inherits:
Base
  • Object
show all
Defined in:
lib/bettercap/sniffer/parsers/hsrp.rb

Overview

Instance Method Summary collapse

Methods inherited from Base

available, from_cmdline, from_exclusion_list, inherited, load_by_names, load_custom, #match_port?

Constructor Details

#initializeHsrp

Returns a new instance of Hsrp.



38
39
40
# File 'lib/bettercap/sniffer/parsers/hsrp.rb', line 38

def initialize
  @name = 'HSRP'
end

Instance Method Details

#on_packet(pkt) ⇒ Object



42
43
44
45
46
47
48
49
# File 'lib/bettercap/sniffer/parsers/hsrp.rb', line 42

def on_packet( pkt )
  if pkt.respond_to? 'hsrp_version'
    parse_hsrp_packetfu pkt
  elsif is_hsrp? pkt
    parse_hsrp_raw pkt
  end
rescue
end