Sha256: f51af671ea7fb43c9ce5a48302bb3b0c28387e3638f77d36f164672e36c4b5a6

Contents?: true

Size: 431 Bytes

Versions: 2

Compression:

Stored size: 431 Bytes

Contents

require 'netutils/parser'
require 'netutils/tunnel'

module Cisco

class ShowInterface < Parser
	attr_reader :tunnel

	def initialize
		super()
		add('Init',	:init)
		add('Done',	:done)
	end

	def init(l, m)
		# Tunnel source 192.168.0.1 (Dialer1), destination 192.168.0.2
		if l =~ /^  Tunnel source ([^ ]+) [^,]+, destination ([^ ]+)/
			@tunnel = Tunnel.new($1, $2)
			changeto('Done')
		end
	end

	def done(l, m)
	end
end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
netutils-0.1.2 lib/netutils/cli/cisco/showinterface.rb
netutils-0.1.1 lib/netutils/cli/cisco/showinterface.rb