-
Notifications
You must be signed in to change notification settings - Fork 5
/
PRIME.proto
152 lines (131 loc) · 3.71 KB
/
PRIME.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
package PRIME;
message PRIMEMessage {
enum MsgType {
PRIME_REPLY = 1;
PRIME_REQUEST = 2;
PRIME_REPORT = 3;
PRIME_HOLE_PUNCH = 4;
}
// Identifies which field is filled in.
required MsgType type = 1;
optional Reply reply = 2;
optional Request request = 3;
optional Report report = 4;
optional string dummy = 5;
}
message PeerInfo {
required string ipAddr = 1;
required int32 repPort = 2;
required int32 rtpPort = 3;
}
message Reply {
enum ReplyType {
NULL_TYPE = 1;
CS_SESSION_INIT = 2;
P2P_SESSION_INIT = 3;
CS_SESSION_END = 4;
P2P_SESSION_END = 5;
SPEED_TEST = 6;
}
required ReplyType Type = 1;
message CSSIReply {
required int32 streamPort = 1;
required string sdp = 2;
required int32 maxFrameCount = 3;
required int32 width = 4;
required int32 height = 5;
required int32 pixFmt = 6;
required PeerInfo diffParent = 7;
}
optional CSSIReply cs_session_state = 21;
message PeerState {
required PeerInfo dest = 1;
repeated PeerInfo diffParents = 2;
repeated PeerInfo diffChildren = 3;
repeated PeerInfo swarmParents = 4;
repeated PeerInfo swarmChildren = 5;
}
message PRIMEState {
repeated PeerState nodes = 1;
}
message P2PSIReply {
required int32 streamPort = 1;
required string sdp = 2;
required int32 maxFrameCount = 3;
required int32 width = 4;
required int32 height = 5;
required int32 pixFmt = 6;
required PeerInfo diffParent = 7;
}
optional P2PSIReply p2p_session_state = 22;
}
message Request {
enum RequestType {
NULL_TYPE = 1;
CS_SESSION_INIT = 2;
P2P_SESSION_INIT = 3;
CS_SESSION_END = 4;
P2P_SESSION_END = 5;
SERVE_AS_SWARMING_PARENT = 6;
BECOME_SWARMING_CHILD = 7;
SERVE_AS_DIFFUSION_PARENT = 8;
BECOME_DIFFUSION_CHILD = 9;
}
required RequestType Type = 1;
message CSSIRequest {
required double DBW = 1;
required string peerName = 2;
required int32 repPort = 3;
required string ipAddr = 4;
}
optional CSSIRequest cs_session_props = 21;
message P2PSIRequest {
required double DBW = 1;
required double UBW = 2;
required int32 repPort = 3;
required int32 rtpRecvPort = 4;
required int32 repSendPort = 5;
required string peerName = 6;
required string ipAddr = 7;
}
optional P2PSIRequest p2p_session_props = 22;
}
message Report {
enum ReportType {
NULL_TYPE = 1;
SWARM_REPORT_TYPE = 2;
DIFF_REPORT_TYPE = 3; // Maybe (Will see...)
ADD_DIFF_PARENT_TYPE = 4;
ADD_DIFF_CHILD_TYPE = 5;
ADD_SWARM_PARENT_TYPE = 6;
ADD_SWARM_CHILD_TYPE = 7;
}
required ReportType Type = 1;
message DiffusionReport {
required uint64 start_ts = 1;
required uint64 end_ts = 2;
required uint32 start_seq = 3;
required uint32 end_seq = 4;
}
optional DiffusionReport diff_report = 21;
message SwarmingReport {
required uint32 start_seq = 1;
required uint32 end_seq = 2;
repeated bool state = 3;
}
optional SwarmingReport swarm_report = 22;
message AddDiffParentReport {
required string peerName = 1;
required int32 stream_port = 2;
required int32 rep_port = 3;
}
optional AddDiffParentReport add_diff_parent_report = 23;
message AddSwarmParentReport {
required PeerInfo swarmParent = 1;
}
optional AddSwarmParentReport add_swarm_parent_report = 24;
message AddSwarmChildReport {
required PeerInfo swarmChild = 1;
}
optional AddSwarmChildReport add_swarm_child_report = 25;
}