Sha256: af26489f9788074acf9e6496e517e17b4d1e52661910f15fe60310216a46b67a

Contents?: true

Size: 1.22 KB

Versions: 60

Compression:

Stored size: 1.22 KB

Contents

# Trisul Remote Protocol TRP Demo script
# Akhil.M & Dhinesh.K (c) 2010 Unleash Networks
# Testing change 
require 'rubygems'

require 'trisulrp'
include TRPLib

GUID_CG_APP       = "{C51B48D4-7876-479E-B0D9-BD9EFF03CE2E}" 

raise "Usage : strp host port" unless ARGV.length==2

# get information about the application counter group 
trp_conn=TRPLib::connect_trp(ARGV.shift,ARGV.shift,"Demo_Client.crt","Demo_Client.key")
from_tm=to_tm=nil
req=TRPLib::mk_counter_group_info_request(GUID_CG_APP)
TRPLib::get_trp_response(trp_conn,req) do |resp|
	TRPLib::print_counter_group_info_response(resp)

	from_tm =  Time.at(resp.counter_group_info_response.group_details[0].time_interval.from.tv_sec)
	to_tm =  Time.at(resp.counter_group_info_response.group_details[0].time_interval.to.tv_sec)
end

# get all sessions for the host key 10.1.10.e8
req=TRPLib::mk_key_session_activity_request("0A.01.A0.E8", from_tm, to_tm)

get_trp_response(trp_conn,req) do |resp|
TRPLib::print_key_session_activity_response(resp)
  resp.key_session_activity_response.sessions.each do|session|
		 req=TRPLib::mk_session_item_request(session.slice_id,session.session_id)
		 get_trp_response(trp_conn,req) do |resp|
				 TRPLib::print_session_item_response(resp)
		 end
  end
end

Version data entries

60 entries across 60 versions & 1 rubygems

Version Path
trisulrp-3.2.43 examples/strp.rb
trisulrp-3.2.42 examples/strp.rb
trisulrp-3.2.41 examples/strp.rb
trisulrp-3.2.40 examples/strp.rb
trisulrp-3.2.39 examples/strp.rb
trisulrp-3.2.38 examples/strp.rb
trisulrp-3.2.37 examples/strp.rb
trisulrp-3.2.36 examples/strp.rb
trisulrp-3.2.35 examples/strp.rb
trisulrp-3.2.34 examples/strp.rb
trisulrp-3.2.32 examples/strp.rb
trisulrp-3.2.31 examples/strp.rb
trisulrp-3.2.27 examples/strp.rb
trisulrp-3.2.26 examples/strp.rb
trisulrp-3.2.16 examples/strp.rb
trisulrp-3.2.15 examples/strp.rb
trisulrp-3.2.14 examples/strp.rb
trisulrp-3.2.13 examples/strp.rb
trisulrp-3.2.9 examples/strp.rb
trisulrp-3.2.8 examples/strp.rb