trisulrp 2.0.4 → 2.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/trisulrp/trp.pb.rb +2 -2
- data/lib/trisulrp/trp.proto +3 -3
- data/lib/trisulrp/utils.rb +86 -12
- data/trisulrp.gemspec +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc727ea609ee05bb1dbb182163659b77b55bb6a0
|
4
|
+
data.tar.gz: c60158c840151d4bcd4724da50f8072b9ba8e53a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 944977d6634b588530794221bd07c67f2dc73bf85f6e16a637f4517525bc163b41b2481ec9b8466904b1a1b5300a4e992d7e774665e11de5e491a23f4e1341d3
|
7
|
+
data.tar.gz: 416f7ef0d36bd552268719a573459fd5f249740b7f21792e3c7c44146464bf1c825cf4260b8f905a3961db14bc3bcd81a232c90fd432fae3572cdcfd317266be
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0.
|
1
|
+
2.0.5
|
data/lib/trisulrp/trp.pb.rb
CHANGED
@@ -597,7 +597,7 @@ module TRP
|
|
597
597
|
|
598
598
|
optional :int64, :context, 1
|
599
599
|
required :string, :session_group, 2
|
600
|
-
repeated ::TRP::
|
600
|
+
repeated ::TRP::SessionDetails, :sessions, 3
|
601
601
|
end
|
602
602
|
|
603
603
|
class SessionGroupRequest < ::ProtocolBuffers::Message
|
@@ -794,7 +794,7 @@ module TRP
|
|
794
794
|
|
795
795
|
optional :int64, :context, 1
|
796
796
|
optional :string, :session_group, 2, :default => "{99A78737-4B41-4387-8F31-8077DB917336}"
|
797
|
-
repeated ::TRP::
|
797
|
+
repeated ::TRP::SessionDetails, :sessions, 3
|
798
798
|
repeated :string, :hints, 4
|
799
799
|
end
|
800
800
|
|
data/lib/trisulrp/trp.proto
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
// Trisul Remote Protocol (TRP) definition
|
2
2
|
// Based on Google Protocol Buffers
|
3
3
|
// (c) 2010-11, Unleash Networks (http://www.unleashnetworks.com)
|
4
|
-
// $Rev:
|
4
|
+
// $Rev: 6931 $
|
5
5
|
package TRP;
|
6
6
|
|
7
7
|
message Timestamp {
|
@@ -484,7 +484,7 @@ message SessionTrackerRequest {
|
|
484
484
|
message SessionTrackerResponse{
|
485
485
|
optional int64 context=1;
|
486
486
|
required string session_group=2;
|
487
|
-
repeated
|
487
|
+
repeated SessionDetails sessions=3;
|
488
488
|
}
|
489
489
|
|
490
490
|
///////////////////////////////////
|
@@ -669,7 +669,7 @@ message GrepRequest {
|
|
669
669
|
message GrepResponse {
|
670
670
|
optional int64 context=1;
|
671
671
|
optional string session_group=2[default="{99A78737-4B41-4387-8F31-8077DB917336}"];
|
672
|
-
repeated
|
672
|
+
repeated SessionDetails sessions=3;
|
673
673
|
repeated string hints=4;
|
674
674
|
}
|
675
675
|
|
data/lib/trisulrp/utils.rb
CHANGED
@@ -17,7 +17,8 @@ module TrisulRP::Utils
|
|
17
17
|
# Print session (flow) details
|
18
18
|
#
|
19
19
|
# [conn] active TRP connection opened earlier
|
20
|
-
# [sessions] an array of SessionIDs
|
20
|
+
# [sessions] an array of SessionIDs or
|
21
|
+
# an array of slice:sid strings
|
21
22
|
#
|
22
23
|
# ==== Returns
|
23
24
|
# ==== Yields
|
@@ -26,7 +27,7 @@ module TrisulRP::Utils
|
|
26
27
|
# Prints details about the list of sessions (flows) passed
|
27
28
|
#
|
28
29
|
# ==== On error
|
29
|
-
def
|
30
|
+
def print_session_ids(conn,sessions)
|
30
31
|
all_sids = sessions.collect{ |ai| TRP::SessionID.new(
|
31
32
|
:slice_id => ai.slice_id,
|
32
33
|
:session_id => ai.session_id ) }
|
@@ -36,20 +37,93 @@ module TrisulRP::Utils
|
|
36
37
|
|
37
38
|
TrisulRP::Protocol.get_response(conn,follow_up) do |resp|
|
38
39
|
resp.items.each do |item|
|
39
|
-
|
40
|
-
print "#{Time.at(item.time_interval.from.tv_sec)} "
|
41
|
-
print "#{item.time_interval.to.tv_sec-item.time_interval.from.tv_sec} ".rjust(8)
|
42
|
-
print "#{item.key1A.label}".ljust(28)
|
43
|
-
print "#{item.key2A.label}".ljust(11)
|
44
|
-
print "#{item.key1Z.label}".ljust(28)
|
45
|
-
print "#{item.key2Z.label}".ljust(11)
|
46
|
-
print "#{item.az_bytes}".rjust(10)
|
47
|
-
print "#{item.za_bytes}".rjust(10)
|
48
|
-
print "\n"
|
40
|
+
print_session_details(item)
|
49
41
|
end
|
50
42
|
end
|
51
43
|
end
|
52
44
|
|
45
|
+
|
46
|
+
# Print a SessionDetails object
|
47
|
+
#
|
48
|
+
# Use this to output session to screen
|
49
|
+
#
|
50
|
+
# [sess] a single SessionDetails object
|
51
|
+
#
|
52
|
+
# ==== Returns
|
53
|
+
# ==== Yields
|
54
|
+
# Nothing
|
55
|
+
#
|
56
|
+
# Pretty prints a single line session details
|
57
|
+
#
|
58
|
+
# ==== On error
|
59
|
+
def print_session_details(sess)
|
60
|
+
print "#{sess.session_id.slice_id}:#{sess.session_id.session_id} ".ljust(12)
|
61
|
+
print "#{Time.at(sess.time_interval.from.tv_sec)} ".ljust(26)
|
62
|
+
print "#{sess.time_interval.to.tv_sec-sess.time_interval.from.tv_sec} ".rjust(8)
|
63
|
+
print "#{sess.key1A.label}".ljust(28)
|
64
|
+
print "#{sess.key2A.label}".ljust(11)
|
65
|
+
print "#{sess.key1Z.label}".ljust(28)
|
66
|
+
print "#{sess.key2Z.label}".ljust(11)
|
67
|
+
print "#{sess.az_bytes}".rjust(10)
|
68
|
+
print "#{sess.za_bytes}".rjust(10)
|
69
|
+
print "#{sess.az_payload}".rjust(10)
|
70
|
+
print "#{sess.za_payload}".rjust(10)
|
71
|
+
print "#{sess.setup_rtt}".rjust(10)
|
72
|
+
print "#{sess.retransmissions}".rjust(10)
|
73
|
+
print "#{sess.tags}".rjust(10)
|
74
|
+
print "\n"
|
75
|
+
|
76
|
+
end
|
77
|
+
|
78
|
+
|
79
|
+
# Print the header column for sess details
|
80
|
+
#
|
81
|
+
# Use this to output session to screen
|
82
|
+
#
|
83
|
+
#
|
84
|
+
# ==== Returns
|
85
|
+
# ==== Yields
|
86
|
+
# Nothing
|
87
|
+
#
|
88
|
+
# Pretty prints a single line session details header w/ correct col widths
|
89
|
+
#
|
90
|
+
# ==== On error
|
91
|
+
def print_session_details_header
|
92
|
+
print "SID".ljust(12)
|
93
|
+
print "Start Time".ljust(26)
|
94
|
+
print "Dur ".rjust(8)
|
95
|
+
print "IP-A".ljust(28)
|
96
|
+
print "Port-A".ljust(11)
|
97
|
+
print "IP-Z".ljust(28)
|
98
|
+
print "Port-Z".ljust(11)
|
99
|
+
print "Fwd Bytes".rjust(10)
|
100
|
+
print "Rev Bytes".rjust(10)
|
101
|
+
print "Fwd Payld".rjust(10)
|
102
|
+
print "Rev Payld".rjust(10)
|
103
|
+
print "RTT".rjust(10)
|
104
|
+
print "Retrans".rjust(10)
|
105
|
+
print "Tags".rjust(10)
|
106
|
+
print "\n"
|
107
|
+
|
108
|
+
print "-"*11 + "+"
|
109
|
+
print "-"*25 + "+"
|
110
|
+
print "-"*7 + "+"
|
111
|
+
print "-"*27 + "+"
|
112
|
+
print "-"*10 + "+"
|
113
|
+
print "-"*27 + "+"
|
114
|
+
print "-"*10 + "+"
|
115
|
+
print "-"*9 + "+"
|
116
|
+
print "-"*9 + "+"
|
117
|
+
print "-"*9 + "+"
|
118
|
+
print "-"*9 + "+"
|
119
|
+
print "-"*9 + "+"
|
120
|
+
print "-"*9 + "+"
|
121
|
+
print "-"*9 + "+"
|
122
|
+
print "\n"
|
123
|
+
end
|
124
|
+
|
125
|
+
|
126
|
+
|
53
127
|
# Make key
|
54
128
|
#
|
55
129
|
# Convert an item into Trisul Key format.
|
data/trisulrp.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "trisulrp"
|
8
|
-
s.version = "2.0.
|
8
|
+
s.version = "2.0.5"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["vivek"]
|
12
|
-
s.date = "2014-06-
|
12
|
+
s.date = "2014-06-23"
|
13
13
|
s.description = "This gem deals about the trisul remote protocol"
|
14
14
|
s.email = "vivek_rajagopal@yahoo.com"
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trisulrp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- vivek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-protocol-buffers
|