blob: 3e2d0af1bde0acdb31dc8b832351b165cbdd81c8
1 | /* ***** BEGIN LICENSE BLOCK ***** |
2 | * Source last modified: $Id: tngpkt.h,v 1.1.1.1.2.1 2005/05/04 18:20:57 hubbe Exp $ |
3 | * |
4 | * REALNETWORKS CONFIDENTIAL--NOT FOR DISTRIBUTION IN SOURCE CODE FORM |
5 | * Portions Copyright (c) 1995-2005 RealNetworks, Inc. |
6 | * All Rights Reserved. |
7 | * |
8 | * The contents of this file, and the files included with this file, |
9 | * are subject to the current version of the Real Format Source Code |
10 | * Porting and Optimization License, available at |
11 | * https://helixcommunity.org/2005/license/realformatsource (unless |
12 | * RealNetworks otherwise expressly agrees in writing that you are |
13 | * subject to a different license). You may also obtain the license |
14 | * terms directly from RealNetworks. You may not use this file except |
15 | * in compliance with the Real Format Source Code Porting and |
16 | * Optimization License. There are no redistribution rights for the |
17 | * source code of this file. Please see the Real Format Source Code |
18 | * Porting and Optimization License for the rights, obligations and |
19 | * limitations governing use of the contents of the file. |
20 | * |
21 | * RealNetworks is the developer of the Original Code and owns the |
22 | * copyrights in the portions it created. |
23 | * |
24 | * This file, and the files included with this file, is distributed and |
25 | * made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, |
26 | * EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL |
27 | * SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF |
28 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT |
29 | * OR NON-INFRINGEMENT. |
30 | * |
31 | * Technology Compatibility Kit Test Suite(s) Location: |
32 | * https://rarvcode-tck.helixcommunity.org |
33 | * |
34 | * Contributor(s): |
35 | * |
36 | * ***** END LICENSE BLOCK ***** */ |
37 | |
38 | /* |
39 | * This is generated code, do not modify. Look in |
40 | * /home/gregory/helix/protocol/transport/rdt/pub/tngpkt.pm to make |
41 | * modifications |
42 | */ |
43 | |
44 | #include "helix_types.h" |
45 | #include "rm_memory.h" |
46 | |
47 | #ifndef PMC_PREDEFINED_TYPES |
48 | #define PMC_PREDEFINED_TYPES |
49 | |
50 | typedef char* pmc_string; |
51 | |
52 | typedef struct _buffer { |
53 | UINT32 len; |
54 | INT8* data; |
55 | } buffer; |
56 | #endif/*PMC_PREDEFINED_TYPES*/ |
57 | |
58 | |
59 | #ifndef _TNGPKT_H_ |
60 | #define _TNGPKT_H_ |
61 | |
62 | struct TNGDataPacket { |
63 | UINT8 length_included_flag; |
64 | UINT8 need_reliable_flag; |
65 | UINT8 stream_id; |
66 | UINT8 is_reliable; |
67 | UINT16 seq_no; |
68 | UINT16 _packlenwhendone; |
69 | UINT8 back_to_back_packet; |
70 | UINT8 slow_data; |
71 | UINT8 asm_rule_number; |
72 | UINT32 timestamp; |
73 | UINT16 stream_id_expansion; |
74 | UINT16 total_reliable; |
75 | UINT16 asm_rule_number_expansion; |
76 | buffer data; |
77 | }; |
78 | |
79 | const UINT32 TNGDataPacket_static_size(); |
80 | UINT8* TNGDataPacket_pack(UINT8* buf, |
81 | UINT32 len, |
82 | struct TNGDataPacket* pkt); |
83 | UINT8* TNGDataPacket_unpack(UINT8* buf, |
84 | UINT32 len, |
85 | struct TNGDataPacket* pkt); |
86 | |
87 | struct TNGMultiCastDataPacket { |
88 | UINT8 length_included_flag; |
89 | UINT8 need_reliable_flag; |
90 | UINT8 stream_id; |
91 | UINT8 is_reliable; |
92 | UINT16 seq_no; |
93 | UINT16 length; |
94 | UINT8 back_to_back_packet; |
95 | UINT8 slow_data; |
96 | UINT8 asm_rule_number; |
97 | UINT8 group_seq_no; |
98 | UINT32 timestamp; |
99 | UINT16 stream_id_expansion; |
100 | UINT16 total_reliable; |
101 | UINT16 asm_rule_number_expansion; |
102 | buffer data; |
103 | }; |
104 | |
105 | const UINT32 TNGMultiCastDataPacket_static_size(); |
106 | |
107 | UINT8* TNGMultiCastDataPacket_pack(UINT8* buf, |
108 | UINT32 len, |
109 | struct TNGMultiCastDataPacket* pkt); |
110 | UINT8* TNGMultiCastDataPacket_unpack(UINT8* buf, |
111 | UINT32 len, |
112 | struct TNGMultiCastDataPacket* pkt); |
113 | |
114 | |
115 | struct TNGASMActionPacket { |
116 | UINT8 length_included_flag; |
117 | UINT8 stream_id; |
118 | UINT8 dummy0; |
119 | UINT8 dummy1; |
120 | UINT16 packet_type; |
121 | UINT16 reliable_seq_no; |
122 | UINT16 length; |
123 | UINT16 stream_id_expansion; |
124 | buffer data; |
125 | }; |
126 | |
127 | const UINT32 TNGASMActionPacket_static_size(); |
128 | UINT8* TNGASMActionPacket_pack(UINT8* buf, |
129 | UINT32 len, |
130 | struct TNGASMActionPacket* pkt); |
131 | |
132 | UINT8* TNGASMActionPacket_unpack(UINT8* buf, |
133 | UINT32 len, |
134 | struct TNGASMActionPacket* pkt); |
135 | |
136 | |
137 | |
138 | struct TNGBandwidthReportPacket { |
139 | UINT8 length_included_flag; |
140 | UINT8 dummy0; |
141 | UINT8 dummy1; |
142 | UINT8 dummy2; |
143 | UINT16 packet_type; |
144 | UINT16 length; |
145 | UINT16 interval; |
146 | UINT32 bandwidth; |
147 | UINT8 sequence; |
148 | }; |
149 | |
150 | const UINT32 TNGBandwidthReportPacket_static_size(); |
151 | UINT8* TNGBandwidthReportPacket_pack(UINT8* buf, |
152 | UINT32 len, |
153 | struct TNGBandwidthReportPacket* pkt); |
154 | UINT8* TNGBandwidthReportPacket_unpack(UINT8* buf, |
155 | UINT32 len, |
156 | struct TNGBandwidthReportPacket* pkt); |
157 | |
158 | |
159 | |
160 | struct TNGReportPacket { |
161 | UINT8 length_included_flag; |
162 | UINT8 dummy0; |
163 | UINT8 dummy1; |
164 | UINT8 dummy2; |
165 | UINT16 packet_type; |
166 | UINT16 length; |
167 | buffer data; |
168 | }; |
169 | |
170 | const UINT32 TNGReportPacket_static_size(); |
171 | UINT8* TNGReportPacket_pack(UINT8* buf, |
172 | UINT32 len, |
173 | struct TNGReportPacket* pkt); |
174 | UINT8* TNGReportPacket_unpack(UINT8* buf, |
175 | UINT32 len, |
176 | struct TNGReportPacket* pkt); |
177 | |
178 | |
179 | |
180 | struct TNGACKPacket { |
181 | UINT8 length_included_flag; |
182 | UINT8 lost_high; |
183 | UINT8 dummy0; |
184 | UINT8 dummy1; |
185 | UINT16 packet_type; |
186 | UINT16 length; |
187 | buffer data; |
188 | }; |
189 | |
190 | const UINT32 TNGACKPacket_static_size(); |
191 | UINT8* TNGACKPacket_pack(UINT8* buf, |
192 | UINT32 len, |
193 | struct TNGACKPacket* pkt); |
194 | UINT8* TNGACKPacket_unpack(UINT8* buf, |
195 | UINT32 len, |
196 | struct TNGACKPacket* pkt); |
197 | |
198 | |
199 | struct TNGRTTRequestPacket { |
200 | UINT8 dummy0; |
201 | UINT8 dummy1; |
202 | UINT8 dummy2; |
203 | UINT8 dummy3; |
204 | UINT16 packet_type; |
205 | }; |
206 | |
207 | const UINT32 TNGRTTRequestPacket_static_size(); |
208 | UINT8* TNGRTTRequestPacket_pack(UINT8* buf, |
209 | UINT32 len, |
210 | struct TNGRTTRequestPacket* pkt); |
211 | UINT8* TNGRTTRequestPacket_unpack(UINT8* buf, |
212 | UINT32 len, |
213 | struct TNGRTTRequestPacket* pkt); |
214 | |
215 | struct TNGRTTResponsePacket { |
216 | UINT8 dummy0; |
217 | UINT8 dummy1; |
218 | UINT8 dummy2; |
219 | UINT8 dummy3; |
220 | UINT16 packet_type; |
221 | UINT32 timestamp_sec; |
222 | UINT32 timestamp_usec; |
223 | }; |
224 | |
225 | const UINT32 TNGRTTResponsePacket_static_size(); |
226 | UINT8* TNGRTTResponsePacket_pack(UINT8* buf, |
227 | UINT32 len, |
228 | struct TNGRTTResponsePacket* pkt); |
229 | UINT8* TNGRTTResponsePacket_unpack(UINT8* buf, |
230 | UINT32 len, |
231 | struct TNGRTTResponsePacket* pkt); |
232 | |
233 | |
234 | struct TNGCongestionPacket { |
235 | UINT8 dummy0; |
236 | UINT8 dummy1; |
237 | UINT8 dummy2; |
238 | UINT8 dummy3; |
239 | UINT16 packet_type; |
240 | INT32 xmit_multiplier; |
241 | INT32 recv_multiplier; |
242 | }; |
243 | |
244 | const UINT32 TNGCongestionPacket_static_size(); |
245 | UINT8* TNGCongestionPacket_pack(UINT8* buf, |
246 | UINT32 len, |
247 | struct TNGCongestionPacket* pkt); |
248 | UINT8* TNGCongestionPacket_unpack(UINT8* buf, |
249 | UINT32 len, |
250 | struct TNGCongestionPacket* pkt); |
251 | |
252 | |
253 | struct TNGStreamEndPacket { |
254 | UINT8 need_reliable_flag; |
255 | UINT8 stream_id; |
256 | UINT8 packet_sent; |
257 | UINT8 ext_flag; |
258 | UINT16 packet_type; |
259 | UINT16 seq_no; |
260 | UINT32 timestamp; |
261 | UINT16 stream_id_expansion; |
262 | UINT16 total_reliable; |
263 | UINT8 reason_dummy[3]; |
264 | UINT32 reason_code; |
265 | pmc_string reason_text; |
266 | }; |
267 | |
268 | const UINT32 TNGStreamEndPacket_static_size(); |
269 | UINT8* TNGStreamEndPacket_pack(UINT8* buf, |
270 | UINT32 len, |
271 | struct TNGStreamEndPacket* pkt); |
272 | |
273 | /* TNGStreamEndPacket_unpack will malloc room for the reason_text. |
274 | * You must free this memory or it will be leaked */ |
275 | UINT8* TNGStreamEndPacket_unpack(UINT8* buf, |
276 | UINT32 len, |
277 | struct TNGStreamEndPacket* pkt); |
278 | |
279 | UINT8* TNGStreamEndPacket_unpack_fromPool(UINT8* buf, |
280 | UINT32 len, |
281 | struct TNGStreamEndPacket* pkt, |
282 | rm_malloc_func_ptr fpMalloc, |
283 | void* pMemoryPool); |
284 | |
285 | |
286 | |
287 | |
288 | struct TNGLatencyReportPacket { |
289 | UINT8 length_included_flag; |
290 | UINT8 dummy0; |
291 | UINT8 dummy1; |
292 | UINT8 dummy2; |
293 | UINT16 packet_type; |
294 | UINT16 length; |
295 | UINT32 server_out_time; |
296 | }; |
297 | |
298 | const UINT32 TNGLatencyReportPacket_static_size(); |
299 | UINT8* TNGLatencyReportPacket_pack(UINT8* buf, |
300 | UINT32 len, |
301 | struct TNGLatencyReportPacket* pkt); |
302 | UINT8* TNGLatencyReportPacket_unpack(UINT8* buf, |
303 | UINT32 len, |
304 | struct TNGLatencyReportPacket* pkt); |
305 | |
306 | |
307 | |
308 | |
309 | /* |
310 | * RDTFeatureLevel 3 packets |
311 | */ |
312 | |
313 | struct RDTTransportInfoRequestPacket { |
314 | UINT8 dummy0; |
315 | UINT8 dummy1; |
316 | UINT8 request_rtt_info; |
317 | UINT8 request_buffer_info; |
318 | UINT16 packet_type; |
319 | UINT32 request_time_ms; |
320 | }; |
321 | |
322 | const UINT32 RDTTransportInfoRequestPacket_static_size(); |
323 | UINT8* RDTTransportInfoRequestPacket_pack(UINT8* buf, |
324 | UINT32 len, |
325 | struct RDTTransportInfoRequestPacket* pkt); |
326 | UINT8* RDTTransportInfoRequestPacket_unpack(UINT8* buf, |
327 | UINT32 len, |
328 | struct RDTTransportInfoRequestPacket* pkt); |
329 | |
330 | |
331 | |
332 | |
333 | struct RDTBufferInfo { |
334 | UINT16 stream_id; |
335 | UINT32 lowest_timestamp; |
336 | UINT32 highest_timestamp; |
337 | UINT32 bytes_buffered; |
338 | }; |
339 | |
340 | const UINT32 RDTBufferInfo_static_size(); |
341 | UINT8* RDTBufferInfo_pack(UINT8* buf, |
342 | UINT32 len, struct RDTBufferInfo* pkt); |
343 | UINT8* RDTBufferInfo_unpack(UINT8* buf, |
344 | UINT32 len, struct RDTBufferInfo* pkt); |
345 | |
346 | |
347 | |
348 | |
349 | struct RDTTransportInfoResponsePacket { |
350 | UINT8 dummy0; |
351 | UINT8 dummy1; |
352 | UINT8 has_rtt_info; |
353 | UINT8 is_delayed; |
354 | UINT8 has_buffer_info; |
355 | UINT16 packet_type; |
356 | UINT32 request_time_ms; |
357 | UINT32 response_time_ms; |
358 | UINT16 buffer_info_count; |
359 | struct RDTBufferInfo *buffer_info; |
360 | }; |
361 | |
362 | const UINT32 RDTTransportInfoResponsePacket_static_size(); |
363 | UINT8* RDTTransportInfoResponsePacket_pack(UINT8* buf, |
364 | UINT32 len, |
365 | struct RDTTransportInfoResponsePacket* pkt); |
366 | UINT8* RDTTransportInfoResponsePacket_unpack(UINT8* buf, |
367 | UINT32 len, |
368 | struct RDTTransportInfoResponsePacket* pkt); |
369 | |
370 | UINT8* RDTTransportInfoResponsePacket_unpack_fromPool(UINT8* buf, |
371 | UINT32 len, |
372 | struct RDTTransportInfoResponsePacket* pkt, |
373 | rm_malloc_func_ptr fpMalloc, |
374 | void* pMemoryPool); |
375 | |
376 | |
377 | |
378 | |
379 | |
380 | |
381 | struct TNGBWProbingPacket { |
382 | UINT8 length_included_flag; |
383 | UINT8 dummy0; |
384 | UINT8 dummy1; |
385 | UINT8 dummy2; |
386 | UINT16 packet_type; |
387 | UINT16 length; |
388 | UINT8 seq_no; |
389 | UINT32 timestamp; |
390 | buffer data; |
391 | }; |
392 | |
393 | const UINT32 TNGBWProbingPacket_static_size(); |
394 | UINT8* TNGBWProbingPacket_pack(UINT8* buf, |
395 | UINT32 len, |
396 | struct TNGBWProbingPacket* pkt); |
397 | UINT8* TNGBWProbingPacket_unpack(UINT8* buf, |
398 | UINT32 len, |
399 | struct TNGBWProbingPacket* pkt); |
400 | #endif /* _TNGPKT_H_ */ |
401 |