2 * Routines for SRS Packet dissection
4 * Copyright (c) 2005-2014 Informatica Corporation. All Rights Reserved.
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
10 * SPDX-License-Identifier: GPL-2.0-or-later
12 * Special thanks to the team at https://github.com/rsocket/rsocket-wireshark
13 * for getting us started on the right path for this Ultra Messaging rsocket dissector.
14 * Rsocket Protocol Description: https://rsocket.io/docs/Protocol.html
18 #include <epan/packet.h>
19 #include <epan/expert.h>
20 #include <epan/to_str.h>
21 #include "packet-lbm.h"
22 #include <epan/proto.h>
23 #include <epan/prefs.h>
25 #include <wsutil/pint.h>
26 #include "packet-tcp.h"
30 static int proto_lbmsrs
;
32 void proto_register_lbmsrs(void);
33 void proto_reg_handoff_lbmsrs(void);
35 /****************************************LBMSRS Packet definitions**************************************************/
36 /* These definitions are from srs_protocol.h in the Ultra Messaging build node. That header is generated from the */
37 /* SRS protocol XML definitions. */
38 /*******************************************************************************************************************/
40 #define LBM_SRS_INTEREST_MODE_SYMBOL_ADVERTISE_FILTER_BIT 0x01
41 #define LBM_SRS_INTEREST_MODE_SYMBOL_INTEREST_FORWARD_BIT 0x02
42 #define LBM_SRS_INTEREST_MODE_CONTEXT_NAME_FILTER_BIT 0x04
43 #define LBM_SRS_APP_TYPE_APPLICATION 0
44 #define LBM_SRS_APP_TYPE_TNWGD 1
45 #define LBM_SRS_APP_TYPE_STORE 2
46 #define LBM_SRS_CONTEXT_INSTANCE_BLOCK_SIZE 8
47 #define LBM_SRS_OTID_BLOCK_SIZE 32
49 #define L_LBM_SRS_MESSAGE_ID 2
51 /* LBMSRS Registration Request
52 typedef struct lbm_srs_registration_request_info_t_stct {
54 lbm_uint32_t client_addr;
55 lbm_uint16_t client_port;
56 lbm_uint32_t session_id;
58 lbm_uint8_t protocol_version;
59 lbm_uint8_t interest_mode;
60 lbm_uint32_t local_domain_id;
61 } lbm_srs_registration_request_info_t;
63 #define L_LBM_SRS_REGISTRATION_REQUEST_INFO_T_APP_TYPE 1
64 #define L_LBM_SRS_REGISTRATION_REQUEST_INFO_T_CLIENT_ADDR 4
65 #define L_LBM_SRS_REGISTRATION_REQUEST_INFO_T_CLIENT_PORT 2
66 #define L_LBM_SRS_REGISTRATION_REQUEST_INFO_T_SESSION_ID 4
67 #define L_LBM_SRS_REGISTRATION_REQUEST_INFO_T_HOST_ID 4
68 #define L_LBM_SRS_REGISTRATION_REQUEST_INFO_T_PROTOCOL_VERSION 1
69 #define L_LBM_SRS_REGISTRATION_REQUEST_INFO_T_INTEREST_MODE 1
70 #define L_LBM_SRS_REGISTRATION_REQUEST_INFO_T_LOCAL_DOMAIN_ID 4
71 #define L_LBM_SRS_REGISTRATION_REQUEST_INFO_T 21 /*padding is giving length as 24 above*/
74 #define LBM_SRS_BEHAVIOR_BIT_FLOOD_TOPIC_ADVERTS 0x80
75 #define LBM_SRS_BEHAVIOR_BIT_FLOOD_TOPIC_INTEREST 0x40
76 #define LBM_SRS_BEHAVIOR_BIT_FLOOD_CTX_NAME_ADVERTS 0x20
78 #define LBM_SRS_INTEREST_MODE_FLOOD 0
79 #define LBM_SRS_INTEREST_MODE_FILTER 1
80 #define LBM_SRS_INTEREST_MODE_FLOOD_FORWARD_INTEREST 2
81 #define LBM_SRS_INTEREST_MODE_FILTER_FORWARD_INTEREST 3
82 #define LBM_SRS_APP_TYPE_APPLICATION 0
83 #define LBM_SRS_APP_TYPE_TNWGD 1
84 #define LBM_SRS_APP_TYPE_STORE 2
86 #define LBM_SRS_CTX_TYPE_APPLICATION 0
87 #define LBM_SRS_CTX_TYPE_TNWGD 1
88 #define LBM_SRS_CTX_TYPE_STORE 2
90 /* LBMSRS Registration Response
91 typedef struct lbm_srs_registration_response_info_t_stct {
92 lbm_uint64_t client_id;
93 lbm_uint32_t local_domain_id;
94 lbm_uint8_t protocol_version;
95 } lbm_srs_registration_response_info_t;
97 #define L_LBM_SRS_REGISTRATION_RESPONSE_INFO_T_CLIENT_ID 8
98 #define L_LBM_SRS_REGISTRATION_RESPONSE_INFO_T_LOCAL_DOMAIN_ID 4
99 #define L_LBM_SRS_REGISTRATION_RESPONSE_INFO_T_PROTOCOL_VERSION 1
100 #define L_LBM_SRS_REGISTRATION_RESPONSE_INFO_T 13
103 /* LBMSRS Stream Request
104 typedef struct lbm_srs_stream_request_info_t_stct {
106 } lbm_srs_stream_request_info_t;
108 #define L_LBM_SRS_STREAM_REQUEST_INFO_T_UNUSED 1
109 #define L_LBM_SRS_STREAM_REQUEST_INFO_T 1
111 /* LBMSRS Source Info
112 typedef struct lbm_srs_src_info_info_t_stct {
114 lbm_uint8_t topic_len;
116 lbm_uint8_t source_len;
118 lbm_uint32_t host_id;
119 lbm_uint32_t topic_idx;
120 lbm_uint32_t functionality_flags;
121 lbm_uint32_t request_ip;
122 lbm_uint16_t request_port;
123 lbm_uint32_t domain_id;
124 lbm_uint8_t encryption;
125 lbm_uint8_t compression;
126 lbm_uint32_t ulb_src_id;
127 lbm_uint32_t ulb_queue_id;
128 lbm_uint64_t ulb_reg_id;
129 char* context_instance;
130 lbm_uint8_t context_type;
131 lbm_uint32_t version;
132 lbm_uint32_t version_flags;
135 } lbm_srs_src_info_info_t;
137 #define L_LBM_SRS_SRC_INFO_INFO_T_OTID 32 //fixed length
138 #define L_LBM_SRS_SRC_INFO_INFO_T_TOPIC_LEN 1
139 #define L_LBM_SRS_SRC_INFO_INFO_T_SOURCE_LEN 1
140 #define L_LBM_SRS_SRC_INFO_INFO_T_HOST_ID 4
141 #define L_LBM_SRS_SRC_INFO_INFO_T_TOPIC_IDX 4
142 #define L_LBM_SRS_SRC_INFO_INFO_T_FUNCTIONALITY_FLAGS 4
143 #define L_LBM_SRS_SRC_INFO_INFO_T_REQUEST_IP 4
144 #define L_LBM_SRS_SRC_INFO_INFO_T_REQUEST_PORT 2
145 #define L_LBM_SRS_SRC_INFO_INFO_T_DOMAIN_ID 4
146 #define L_LBM_SRS_SRC_INFO_INFO_T_ENCRYPTION 1
147 #define L_LBM_SRS_SRC_INFO_INFO_T_COMPRESSION 1
148 #define L_LBM_SRS_SRC_INFO_INFO_T_ULB_SRC_ID 4
149 #define L_LBM_SRS_SRC_INFO_INFO_T_ULB_QUEUE_ID 4
150 #define L_LBM_SRS_SRC_INFO_INFO_T_ULB_REG_ID 8
151 #define L_LBM_SRS_SRC_INFO_INFO_T_CONTEXT_INSTANCE 8
152 #define L_LBM_SRS_SRC_INFO_INFO_T_CONTEXT_TYPE 1
153 #define L_LBM_SRS_SRC_INFO_INFO_T_VERSION 4
154 #define L_LBM_SRS_SRC_INFO_INFO_T_VERSION_FLAGS 4
155 #define L_LBM_SRS_SRC_INFO_INFO_T_TTL 2
156 #define L_LBM_SRS_SRC_INFO_INFO_T_COST 4
159 /* LBMSRS Source Delete Info
160 typedef struct lbm_srs_src_delete_info_t_stct {
162 lbm_uint8_t topic_len;
164 } lbm_srs_src_delete_info_t;
166 #define L_LBM_SRS_SRC_DELETE_INFO_T_OTID 32
167 #define L_LBM_SRS_SRC_DELETE_INFO_T_TOPIC_LEN 1
170 /* LBMSRS Receiver Info
171 typedef struct lbm_srs_rcv_info_info_t_stct {
172 lbm_uint8_t topic_len;
174 lbm_uint32_t domain_id;
175 char* context_instance;
176 lbm_uint8_t context_type;
177 lbm_uint32_t version;
178 lbm_uint32_t version_flags;
179 lbm_uint32_t reserved;
180 } lbm_srs_rcv_info_info_t;
182 #define L_LBM_SRS_RCV_INFO_INFO_T_TOPIC_LEN 1
183 #define L_LBM_SRS_RCV_INFO_INFO_T_DOMAIN_ID 4
184 #define L_LBM_SRS_RCV_INFO_INFO_T_CONTEXT_INSTANCE 8
185 #define L_LBM_SRS_RCV_INFO_INFO_T_CONTEXT_TYPE 1
186 #define L_LBM_SRS_RCV_INFO_INFO_T_VERSION 4
187 #define L_LBM_SRS_RCV_INFO_INFO_T_VERSION_FLAGS 4
188 #define L_LBM_SRS_RCV_INFO_INFO_T_RESERVED 4
191 /* LBMSRS Receiver Delete Info
192 typedef struct lbm_srs_rcv_delete_info_t_stct {
193 lbm_uint8_t topic_len;
195 lbm_uint32_t domain_id;
196 char* context_instance;
197 lbm_uint8_t context_type;
198 lbm_uint32_t version;
199 lbm_uint32_t version_flags;
200 lbm_uint32_t reserved;
201 } lbm_srs_rcv_delete_info_t;
203 #define L_LBM_SRS_RCV_DELETE_INFO_T_TOPIC_LEN 1
204 #define L_LBM_SRS_RCV_DELETE_INFO_T_DOMAIN_ID 4
205 #define L_LBM_SRS_RCV_DELETE_INFO_T_CONTEXT_INSTANCE 8
206 #define L_LBM_SRS_RCV_DELETE_INFO_T_CONTEXT_TYPE 1
207 #define L_LBM_SRS_RCV_DELETE_INFO_T_VERSION 4
208 #define L_LBM_SRS_RCV_DELETE_INFO_T_VERSION_FLAGS 4
209 #define L_LBM_SRS_RCV_DELETE_INFO_T_RESERVED 4
211 /* LBMSRS Receiver End info
212 typedef struct lbm_srs_rcv_end_info_t_stct {
213 lbm_uint8_t topic_len;
215 lbm_uint32_t domain_id;
216 char* context_iinstance;
217 lbm_uint8_t context_type;
218 lbm_uint32_t version;
219 lbm_uint32_t version_flags;
220 lbm_uint32_t reserved;
221 } lbm_srs_rcv_end_info_t;
223 #define L_LBM_SRS_RCV_END_INFO_T_TOPIC_LEN 1
224 #define L_LBM_SRS_RCV_END_INFO_T_DOMAIN_ID 4
225 #define L_LBM_SRS_RCV_END_INFO_T_CONTEXT_INSTANCE 8
226 #define L_LBM_SRS_RCV_END_INFO_T_CONTEXT_TYPE 1
227 #define L_LBM_SRS_RCV_END_INFO_T_VERSION 4
228 #define L_LBM_SRS_RCV_END_INFO_T_VERSION_FLAGS 4
229 #define L_LBM_SRS_RCV_END_INFO_T_RESERVED 4
232 /* LBMSRS Wildcard Receiver Info
233 typedef struct lbm_srs_wrcv_info_info_t_stct {
234 lbm_uint8_t pattern_len;
236 lbm_uint32_t domain_id;
237 char* context_instance;
238 lbm_uint8_t context_type;
239 lbm_uint32_t version;
240 lbm_uint32_t version_flags;
241 lbm_uint32_t reserved;
242 } lbm_srs_wrcv_info_info_t;
244 #define L_LBM_SRS_WRCV_INFO_INFO_T_PATTERN_LEN 1
245 #define L_LBM_SRS_WRCV_INFO_INFO_T_DOMAIN_ID 4
246 #define L_LBM_SRS_WRCV_INFO_INFO_T_CONTEXT_INSTANCE 8
247 #define L_LBM_SRS_WRCV_INFO_INFO_T_CONTEXT_TYPE 1
248 #define L_LBM_SRS_WRCV_INFO_INFO_T_VERSION 4
249 #define L_LBM_SRS_WRCV_INFO_INFO_T_VERSION_FLAGS 4
250 #define L_LBM_SRS_WRCV_INFO_INFO_T_RESERVED 4
253 /* LBMSRS Wildcard Receive Delete Info
254 typedef struct lbm_srs_wrcv_delete_info_t_stct {
255 lbm_uint8_t pattern_len;
257 lbm_uint32_t domain_id;
258 char* context_instance;
259 lbm_uint8_t context_type;
260 lbm_uint32_t version;
261 lbm_uint32_t version_flags;
262 lbm_uint32_t reserved;
263 } lbm_srs_wrcv_delete_info_t;
265 #define L_LBM_SRS_WRCV_DELETE_INFO_T_PATTERN_LEN 1
266 #define L_LBM_SRS_WRCV_DELETE_INFO_T_DOMAIN_ID 4
267 #define L_LBM_SRS_WRCV_DELETE_INFO_T_CONTEXT_INSTANCE 8
268 #define L_LBM_SRS_WRCV_DELETE_INFO_T_CONTEXT_TYPE 1
269 #define L_LBM_SRS_WRCV_DELETE_INFO_T_VERSION 4
270 #define L_LBM_SRS_WRCV_DELETE_INFO_T_VERSION_FLAGS 4
271 #define L_LBM_SRS_WRCV_DELETE_INFO_T_RESERVED 4
274 /* LBMSRS Wildcard Receive End Info
275 typedef struct lbm_srs_wrcv_end_info_t_stct {
276 lbm_uint8_t pattern_len;
278 lbm_uint32_t domain_id;
279 char* context_instance;
280 lbm_uint8_t context_type;
281 lbm_uint32_t version;
282 lbm_uint32_t version_flags;
283 lbm_uint32_t reserved;
284 } lbm_srs_wrcv_end_info_t;
286 #define L_LBM_SRS_WRCV_END_INFO_T_PATTERN_LEN 1
287 #define L_LBM_SRS_WRCV_END_INFO_T_DOMAIN_ID 4
288 #define L_LBM_SRS_WRCV_END_INFO_T_CONTEXT_INSTANCE 8
289 #define L_LBM_SRS_WRCV_END_INFO_T_CONTEXT_TYPE 1
290 #define L_LBM_SRS_WRCV_END_INFO_T_VERSION 4
291 #define L_LBM_SRS_WRCV_END_INFO_T_VERSION_FLAGS 4
292 #define L_LBM_SRS_WRCV_END_INFO_T_RESERVED 4
295 /* LBMSRS Source Leave Info
296 typedef struct lbm_srs_src_leave_info_t_stct {
298 lbm_uint8_t topic_len;
300 lbm_uint8_t source_len;
302 char* context_instance;
303 lbm_uint8_t context_type;
304 lbm_uint32_t version;
305 lbm_uint32_t version_flags;
306 lbm_uint32_t reserved;
307 }lbm_srs_src_leave_info_t;
309 #define L_LBM_SRS_SRC_LEAVE_INFO_T_OTID 32 //fixed length
310 #define L_LBM_SRS_SRC_LEAVE_INFO_T_TOPIC_LEN 1
311 #define L_LBM_SRS_SRC_LEAVE_INFO_T_SOURCE_LEN 1
312 #define L_LBM_SRS_SRC_LEAVE_INFO_T_CONTEXT_INSTANCE 8
313 #define L_LBM_SRS_SRC_LEAVE_INFO_T_CONTEXT_TYPE 1
314 #define L_LBM_SRS_SRC_LEAVE_INFO_T_VERSION 4
315 #define L_LBM_SRS_SRC_LEAVE_INFO_T_VERSION_FLAGS 4
316 #define L_LBM_SRS_SRC_LEAVE_INFO_T_RESERVED 4
321 typedef struct lbm_srs_route_info_info_t_stct {
322 uint16_t num_domains;
326 char * context_instance;
327 uint8_t context_type;
329 uint32_t version_flags;
330 uint16_t route_index;
332 } lbm_srs_route_info_info_t;
335 #define L_LBM_SRS_ROUTE_INFO_T_NUM_DOMAINS 2
336 #define L_LBM_SRS_ROUTE_INFO_T_IP 4
337 #define L_LBM_SRS_ROUTE_INFO_T_PORT 2
338 #define L_LBM_SRS_ROUTE_INFO_T_CONTEXT_INSTANCE 8
339 #define L_LBM_SRS_ROUTE_INFO_T_CONTEXT_TYPE 1
340 #define L_LBM_SRS_ROUTE_INFO_T_VERSION 4
341 #define L_LBM_SRS_ROUTE_INFO_T_VERSION_FLAGS 4
342 #define L_LBM_SRS_ROUTE_INFO_T_ROUTE_INDEX 2
343 #define L_LBM_SRS_ROUTE_INFO_T_RESERVED 2
346 typedef struct lbm_srs_route_end_info_t_stct {
347 uint16_t num_domains;
351 char * context_instance;
352 uint8_t context_type;
354 uint32_t version_flags;
355 uint16_t route_index;
357 } lbm_srs_route_end_info_t;
360 #define L_LBM_SRS_ROUTE_END_T_NUM_DOMAINS 2
361 #define L_LBM_SRS_ROUTE_END_T_IP 4
362 #define L_LBM_SRS_ROUTE_END_T_PORT 2
363 #define L_LBM_SRS_ROUTE_END_T_CONTEXT_INSTANCE 8
364 #define L_LBM_SRS_ROUTE_END_T_CONTEXT_TYPE 1
365 #define L_LBM_SRS_ROUTE_END_T_VERSION 4
366 #define L_LBM_SRS_ROUTE_END_T_VERSION_FLAGS 4
367 #define L_LBM_SRS_ROUTE_END_T_ROUTE_INDEX 2
368 #define L_LBM_SRS_ROUTE_END_T_RESERVED 2
371 typedef struct lbm_srs_domain_info_info_t_stct {
373 char * context_instance;
374 uint8_t context_type;
376 uint32_t version_flags;
378 } lbm_srs_domain_info_info_t;
381 #define L_LBM_SRS_DOMAIN_INFO_T_DOMAIN_ID 4
382 #define L_LBM_SRS_DOMAIN_INFO_T_CONTEXT_INSTANCE 8
383 #define L_LBM_SRS_DOMAIN_INFO_T_CONTEXT_TYPE 1
384 #define L_LBM_SRS_DOMAIN_INFO_T_VERSION 4
385 #define L_LBM_SRS_DOMAIN_INFO_T_VERSION_FLAGS 4
386 #define L_LBM_SRS_DOMAIN_INFO_T_RESERVED 4
389 typedef struct lbm_srs_context_name_query_info_t_stct {
393 char * context_instance;
394 uint8_t context_type;
396 uint32_t version_flags;
398 } lbm_srs_context_name_query_info_t;
400 #define L_LBM_SRS_CONTEXT_NAME_QUERY_T_NAME_LEN 1
401 #define L_LBM_SRS_CONTEXT_NAME_QUERY_T_DOMAIN_ID 4
402 #define L_LBM_SRS_CONTEXT_NAME_QUERY_T_CONTEXT_INSTANCE 8
403 #define L_LBM_SRS_CONTEXT_NAME_QUERY_T_CONTEXT_TYPE 1
404 #define L_LBM_SRS_CONTEXT_NAME_QUERY_T_VERSION 4
405 #define L_LBM_SRS_CONTEXT_NAME_QUERY_T_VERSION_FLAGS 4
406 #define L_LBM_SRS_CONTEXT_NAME_QUERY_T_RESERVED 4
409 typedef struct lbm_srs_context_name_info_info_t_stct {
415 char * origin_context_instance;
416 char * context_instance;
417 uint8_t context_type;
419 uint32_t version_flags;
421 } lbm_srs_context_name_info_info_t;
423 #define L_LBM_SRS_CONTEXT_NAME_INFO_T_NAME_LEN 1
424 #define L_LBM_SRS_CONTEXT_NAME_INFO_T_DOMAIN_ID 4
425 #define L_LBM_SRS_CONTEXT_NAME_INFO_T_IP 4
426 #define L_LBM_SRS_CONTEXT_NAME_INFO_T_PORT 2
427 #define L_LBM_SRS_CONTEXT_NAME_INFO_T_ORIGIN_CONTEXT_INSTANCE 8
428 #define L_LBM_SRS_CONTEXT_NAME_INFO_T_CONTEXT_INSTANCE 8
429 #define L_LBM_SRS_CONTEXT_NAME_INFO_T_CONTEXT_TYPE 1
430 #define L_LBM_SRS_CONTEXT_NAME_INFO_T_VERSION 4
431 #define L_LBM_SRS_CONTEXT_NAME_INFO_T_VERSION_FLAGS 4
432 #define L_LBM_SRS_CONTEXT_NAME_INFO_T_RESERVED 4
435 typedef struct lbm_srs_context_name_end_info_t_stct {
441 char * origin_context_instance;
442 char * context_instance;
443 uint8_t context_type;
445 uint32_t version_flags;
447 } lbm_srs_context_name_end_info_t;
449 #define L_LBM_SRS_CONTEXT_NAME_END_T_NAME_LEN 1
450 #define L_LBM_SRS_CONTEXT_NAME_END_T_DOMAIN_ID 4
451 #define L_LBM_SRS_CONTEXT_NAME_END_T_IP 4
452 #define L_LBM_SRS_CONTEXT_NAME_END_T_PORT 2
453 #define L_LBM_SRS_CONTEXT_NAME_END_T_ORIGIN_CONTEXT_INSTANCE 8
454 #define L_LBM_SRS_CONTEXT_NAME_END_T_CONTEXT_INSTANCE 8
455 #define L_LBM_SRS_CONTEXT_NAME_END_T_CONTEXT_TYPE 1
456 #define L_LBM_SRS_CONTEXT_NAME_END_T_VERSION 4
457 #define L_LBM_SRS_CONTEXT_NAME_END_T_VERSION_FLAGS 4
458 #define L_LBM_SRS_CONTEXT_NAME_END_T_RESERVED 4
461 #define MSG_ID_REGISTRATION_REQUEST 1
462 #define MSG_ID_REGISTRATION_RESPONSE 2
463 #define MSG_ID_STREAM_REQUEST 3
464 #define MSG_ID_SOURCE_INFO 4
465 #define MSG_ID_SOURCE_DELETE 5
466 #define MSG_ID_RCV_INFO 6
467 #define MSG_ID_RCV_DELETE 7
468 #define MSG_ID_RCV_END 8
469 #define MSG_ID_WRCV_INFO 9
470 #define MSG_ID_WRCV_DELETE 10
471 #define MSG_ID_WRCV_END 11
472 #define MSG_ID_SRC_LEAVE 12
474 #define MSG_ID_ROUTE_INFO 13
475 #define MSG_ID_ROUTE_END 14
476 #define MSG_ID_DOMAIN_INFO 15
477 #define MSG_ID_CONTEXT_NAME_QUERY 16
478 #define MSG_ID_CONTEXT_NAME_INFO 17
479 #define MSG_ID_CONTEXT_NAME_END 18
481 /*SRS Tag definitions*/
486 uint32_t ip_address_val_h
;
488 } lbmsrs_tag_entry_t
;
490 static lbmsrs_tag_entry_t
* lbmsrs_tag_entry
;
491 static unsigned lbmsrs_tag_count
;
493 UAT_CSTRING_CB_DEF(lbmsrs_tag
, name
, lbmsrs_tag_entry_t
)
494 UAT_IPV4_CB_DEF(lbmsrs_tag
, ip_address
, lbmsrs_tag_entry_t
)
495 UAT_DEC_CB_DEF(lbmsrs_tag
, tcp_port
, lbmsrs_tag_entry_t
)
497 static uat_field_t lbmsrs_tag_array
[] =
499 UAT_FLD_CSTRING(lbmsrs_tag
, name
, "Tag name", "Tag name"),
500 UAT_FLD_IPV4(lbmsrs_tag
, ip_address
, "LBMSRS IP Address", "LBMSRS IP Address"),
501 UAT_FLD_DEC(lbmsrs_tag
, tcp_port
, "LBMSRS TCP port", "LBMSRS TCP port"),
505 static const value_string lbmsrsMessageId
[] =
507 { MSG_ID_REGISTRATION_REQUEST
, "SRS_REGISTRATION_REQUEST" },
508 { MSG_ID_REGISTRATION_RESPONSE
, "SRS_REGISTRATION_RESPONSE" },
509 { MSG_ID_STREAM_REQUEST
, "SRS_STREAM_REQUEST" },
510 { MSG_ID_SOURCE_INFO
, "SRS_SRC_INFO" },
511 { MSG_ID_SOURCE_DELETE
, "SRS_SRC_DELETE" },
512 { MSG_ID_RCV_INFO
, "SRS_RCV_INFO" },
513 { MSG_ID_RCV_DELETE
, "SRS_RCV_DELETE" },
514 { MSG_ID_RCV_END
, "SRS_RCV_END" },
515 { MSG_ID_WRCV_INFO
, "SRS_WRCV_INFO" },
516 { MSG_ID_WRCV_DELETE
, "SRS_WRCV_DELETE" },
517 { MSG_ID_WRCV_END
, "SRS_WRCV_END" },
518 { MSG_ID_SRC_LEAVE
, "SRS_LEAVE_INFO" },
519 { MSG_ID_ROUTE_INFO
, "SRS_ROUTE_INFO" },
520 { MSG_ID_ROUTE_END
, "SRS_ROUTE_END" },
521 { MSG_ID_DOMAIN_INFO
, "SRS_DOMAIN_INFO" },
522 { MSG_ID_CONTEXT_NAME_QUERY
, "SRS_CONTEXT_NAME_QUERY" },
523 { MSG_ID_CONTEXT_NAME_INFO
, "SRS_CONTEXT_NAME_INFO" },
524 { MSG_ID_CONTEXT_NAME_END
, "SRS_CONTEXT_NAME_END" },
528 static const value_string lbmsrsApplicationType
[] =
530 { LBM_SRS_APP_TYPE_APPLICATION
, "APP_TYPE_APPLICATION" },
531 { LBM_SRS_APP_TYPE_TNWGD
, "APP_TYPE_TNWGD" },
532 { LBM_SRS_APP_TYPE_STORE
, "APP_TYPE_STORE" },
536 static const value_string lbmsrsContextType
[] =
538 { LBM_SRS_CTX_TYPE_APPLICATION
, "CTX_TYPE_APPLICATION" },
539 { LBM_SRS_CTX_TYPE_TNWGD
, "CTX_TYPE_TNWGD" },
540 { LBM_SRS_CTX_TYPE_STORE
, "CTX_TYPE_STORE" },
544 /* Dissector field handles */
545 static int hf_lbmsrs_message_id
;
547 /*handles for registration request*/
548 static int hf_lbmsrs_app_type
;
549 static int hf_lbmsrs_client_addr
;
550 static int hf_lbmsrs_client_port
;
551 static int hf_lbmsrs_session_id
;
552 static int hf_lbmsrs_host_id
;
553 static int hf_lbmsrs_protocol_version
;
554 static int hf_lbmsrs_interest_mode
;
555 static int hf_lbmsrs_interest_mode_advertise_filter
;
556 static int hf_lbmsrs_interest_mode_interest_forward
;
557 static int hf_lbmsrs_interest_mode_context_name_filter
;
558 static int hf_lbmsrs_req_local_domain_id
;
560 /*handles for registration response*/
561 static int hf_lbmsrs_client_id
;
562 static int hf_lbmsrs_resp_local_domain_id
;
563 static int hf_lbmsrs_reg_resp_protocol_version
;
565 /*handles for stream request*/
566 static int hf_lbmsrs_stream_req_unused
;
568 /*handles for source info*/
569 static int hf_lbmsrs_sir
;
570 static int hf_lbmsrs_sir_otid
;
571 static int hf_lbmsrs_sir_topic_len
;
572 static int hf_lbmsrs_sir_topic
;
573 static int hf_lbmsrs_sir_source_len
;
574 static int hf_lbmsrs_sir_source
;
575 static int hf_lbmsrs_sir_host_id
;
576 static int hf_lbmsrs_sir_topic_idx
;
577 static int hf_lbmsrs_sir_functionality_flags
;
578 static int hf_lbmsrs_sir_request_ip
;
579 static int hf_lbmsrs_sir_request_port
;
580 static int hf_lbmsrs_sir_domain_id
;
581 static int hf_lbmsrs_sir_encryption
;
582 static int hf_lbmsrs_sir_compression
;
583 static int hf_lbmsrs_sir_ulb_src_id
;
584 static int hf_lbmsrs_sir_ulb_queue_id
;
585 static int hf_lbmsrs_sir_ulb_reg_id
;
586 static int hf_lbmsrs_sir_context_instance
;
587 static int hf_lbmsrs_sir_context_type
;
588 static int hf_lbmsrs_sir_version
;
589 static int hf_lbmsrs_sir_version_flags
;
590 static int hf_lbmsrs_sir_ttl
;
591 static int hf_lbmsrs_sir_cost
;
593 /*handles for source delete*/
594 static int hf_lbmsrs_sdr
;
595 static int hf_lbmsrs_sdr_otid
;
596 static int hf_lbmsrs_sdr_topic_len
;
597 static int hf_lbmsrs_sdr_topic
;
599 /*handles for receiver info*/
600 static int hf_lbmsrs_rir
;
601 static int hf_lbmsrs_rir_topic_len
;
602 static int hf_lbmsrs_rir_topic
;
603 static int hf_lbmsrs_rir_domain_id
;
604 static int hf_lbmsrs_rir_context_instance
;
605 static int hf_lbmsrs_rir_context_type
;
606 static int hf_lbmsrs_rir_version
;
607 static int hf_lbmsrs_rir_version_flags
;
608 static int hf_lbmsrs_rir_reserved
;
610 /*handles for receiver delete*/
611 static int hf_lbmsrs_rdr
;
612 static int hf_lbmsrs_rdr_topic_len
;
613 static int hf_lbmsrs_rdr_topic
;
614 static int hf_lbmsrs_rdr_domain_id
;
615 static int hf_lbmsrs_rdr_context_instance
;
616 static int hf_lbmsrs_rdr_context_type
;
617 static int hf_lbmsrs_rdr_version
;
618 static int hf_lbmsrs_rdr_version_flags
;
619 static int hf_lbmsrs_rdr_reserved
;
621 /*handles for receiver end*/
622 static int hf_lbmsrs_rer
;
623 static int hf_lbmsrs_rer_topic_len
;
624 static int hf_lbmsrs_rer_topic
;
625 static int hf_lbmsrs_rer_domain_id
;
626 static int hf_lbmsrs_rer_context_instance
;
627 static int hf_lbmsrs_rer_context_type
;
628 static int hf_lbmsrs_rer_version
;
629 static int hf_lbmsrs_rer_version_flags
;
630 static int hf_lbmsrs_rer_reserved
;
632 /*handles for wildcard receiver info*/
633 static int hf_lbmsrs_wir
;
634 static int hf_lbmsrs_wir_pattern_len
;
635 static int hf_lbmsrs_wir_pattern
;
636 static int hf_lbmsrs_wir_domain_id
;
637 static int hf_lbmsrs_wir_context_instance
;
638 static int hf_lbmsrs_wir_context_type
;
639 static int hf_lbmsrs_wir_version
;
640 static int hf_lbmsrs_wir_version_flags
;
641 static int hf_lbmsrs_wir_reserved
;
643 /*handles for wildcard receiver delete*/
644 static int hf_lbmsrs_wdr
;
645 static int hf_lbmsrs_wdr_pattern_len
;
646 static int hf_lbmsrs_wdr_pattern
;
647 static int hf_lbmsrs_wdr_domain_id
;
648 static int hf_lbmsrs_wdr_context_instance
;
649 static int hf_lbmsrs_wdr_context_type
;
650 static int hf_lbmsrs_wdr_version
;
651 static int hf_lbmsrs_wdr_version_flags
;
652 static int hf_lbmsrs_wdr_reserved
;
654 /*handles for wildcard receiver end*/
655 static int hf_lbmsrs_wer
;
656 static int hf_lbmsrs_wer_pattern_len
;
657 static int hf_lbmsrs_wer_pattern
;
658 static int hf_lbmsrs_wer_domain_id
;
659 static int hf_lbmsrs_wer_context_instance
;
660 static int hf_lbmsrs_wer_context_type
;
661 static int hf_lbmsrs_wer_version
;
662 static int hf_lbmsrs_wer_version_flags
;
663 static int hf_lbmsrs_wer_reserved
;
665 /*handles for src leave info*/
666 static int hf_lbmsrs_sli
;
667 static int hf_lbmsrs_sli_otid
;
668 static int hf_lbmsrs_sli_topic_len
;
669 static int hf_lbmsrs_sli_topic
;
670 static int hf_lbmsrs_sli_source_len
;
671 static int hf_lbmsrs_sli_source
;
672 static int hf_lbmsrs_sli_context_instance
;
673 static int hf_lbmsrs_sli_context_type
;
674 static int hf_lbmsrs_sli_version
;
675 static int hf_lbmsrs_sli_version_flags
;
676 static int hf_lbmsrs_sli_reserved
;
679 /*handles for route info*/
680 static int hf_lbmsrs_rti
;
681 static int hf_lbmsrs_rti_num_domains
;
682 static int hf_lbmsrs_rti_domain
;
683 static int hf_lbmsrs_rti_domains
;
684 static int hf_lbmsrs_rti_ip
;
685 static int hf_lbmsrs_rti_port
;
686 static int hf_lbmsrs_rti_context_instance
;
687 static int hf_lbmsrs_rti_context_type
;
688 static int hf_lbmsrs_rti_version
;
689 static int hf_lbmsrs_rti_version_flags
;
690 static int hf_lbmsrs_rti_route_index
;
691 static int hf_lbmsrs_rti_reserved
;
693 /*handles for route end*/
694 static int hf_lbmsrs_rte
;
695 static int hf_lbmsrs_rte_num_domains
;
696 static int hf_lbmsrs_rte_domains
;
697 static int hf_lbmsrs_rte_domain
;
698 static int hf_lbmsrs_rte_ip
;
699 static int hf_lbmsrs_rte_port
;
700 static int hf_lbmsrs_rte_context_instance
;
701 static int hf_lbmsrs_rte_context_type
;
702 static int hf_lbmsrs_rte_version
;
703 static int hf_lbmsrs_rte_version_flags
;
704 static int hf_lbmsrs_rte_route_index
;
705 static int hf_lbmsrs_rte_reserved
;
707 /*handles for domain info*/
708 static int hf_lbmsrs_dmi
;
709 static int hf_lbmsrs_dmi_domain_id
;
710 static int hf_lbmsrs_dmi_context_instance
;
711 static int hf_lbmsrs_dmi_context_type
;
712 static int hf_lbmsrs_dmi_version
;
713 static int hf_lbmsrs_dmi_version_flags
;
714 static int hf_lbmsrs_dmi_reserved
;
716 /*handles for context name query*/
717 static int hf_lbmsrs_cnq
;
718 static int hf_lbmsrs_cnq_name_len
;
719 static int hf_lbmsrs_cnq_name
;
720 static int hf_lbmsrs_cnq_domain_id
;
721 static int hf_lbmsrs_cnq_context_instance
;
722 static int hf_lbmsrs_cnq_context_type
;
723 static int hf_lbmsrs_cnq_version
;
724 static int hf_lbmsrs_cnq_version_flags
;
725 static int hf_lbmsrs_cnq_reserved
;
727 /*handles for context name info*/
728 static int hf_lbmsrs_cni
;
729 static int hf_lbmsrs_cni_name_len
;
730 static int hf_lbmsrs_cni_name
;
731 static int hf_lbmsrs_cni_domain_id
;
732 static int hf_lbmsrs_cni_ip
;
733 static int hf_lbmsrs_cni_port
;
734 static int hf_lbmsrs_cni_origin_context_instance
;
735 static int hf_lbmsrs_cni_context_instance
;
736 static int hf_lbmsrs_cni_context_type
;
737 static int hf_lbmsrs_cni_version
;
738 static int hf_lbmsrs_cni_version_flags
;
739 static int hf_lbmsrs_cni_reserved
;
741 /*handles for context name end*/
742 static int hf_lbmsrs_cne
;
743 static int hf_lbmsrs_cne_name_len
;
744 static int hf_lbmsrs_cne_name
;
745 static int hf_lbmsrs_cne_domain_id
;
746 static int hf_lbmsrs_cne_ip
;
747 static int hf_lbmsrs_cne_port
;
748 static int hf_lbmsrs_cne_origin_context_instance
;
749 static int hf_lbmsrs_cne_context_instance
;
750 static int hf_lbmsrs_cne_context_type
;
751 static int hf_lbmsrs_cne_version
;
752 static int hf_lbmsrs_cne_version_flags
;
753 static int hf_lbmsrs_cne_reserved
;
755 /*rsocket dissector field handles*/
756 static int hf_lbmsrs_rsocket_frame_len
;
757 static int hf_lbmsrs_rsocket_stream_id
;
758 static int hf_lbmsrs_rsocket_frame_type
;
759 static int hf_lbmsrs_rsocket_mdata_len
;
760 static int hf_lbmsrs_rsocket_mdata
;
761 static int hf_lbmsrs_rsocket_major_version
;
762 static int hf_lbmsrs_rsocket_minor_version
;
763 static int hf_lbmsrs_rsocket_keepalive_interval
;
764 static int hf_lbmsrs_rsocket_max_lifetime
;
765 static int hf_lbmsrs_rsocket_mdata_mime_length
;
766 static int hf_lbmsrs_rsocket_mdata_mime_type
;
767 static int hf_lbmsrs_rsocket_data_mime_length
;
768 static int hf_lbmsrs_rsocket_data_mime_type
;
769 static int hf_lbmsrs_rsocket_req_n
;
770 static int hf_lbmsrs_rsocket_error_code
;
771 static int hf_lbmsrs_rsocket_keepalive_last_rcvd_pos
;
772 static int hf_lbmsrs_rsocket_resume_token_len
;
773 static int hf_lbmsrs_rsocket_resume_token
;
776 static int hf_lbmsrs_rsocket_ignore_flag
;
777 static int hf_lbmsrs_rsocket_metadata_flag
;
778 static int hf_lbmsrs_rsocket_resume_flag
;
779 static int hf_lbmsrs_rsocket_lease_flag
;
780 static int hf_lbmsrs_rsocket_follows_flag
;
781 static int hf_lbmsrs_rsocket_complete_flag
;
782 static int hf_lbmsrs_rsocket_next_flag
;
783 static int hf_lbmsrs_rsocket_respond_flag
;
785 /*dissector tree handles*/
786 static int ett_lbmsrs
;
787 static int ett_lbmsrs_data
;
788 static int ett_lbmsrs_details
;
789 static int ett_lbmsrs_sir
;
790 static int ett_lbmsrs_sdr
;
791 static int ett_lbmsrs_ser
;
792 static int ett_lbmsrs_rir
;
793 static int ett_lbmsrs_rdr
;
794 static int ett_lbmsrs_rer
;
795 static int ett_lbmsrs_wir
;
796 static int ett_lbmsrs_wdr
;
797 static int ett_lbmsrs_wer
;
798 static int ett_lbmsrs_sli
;
799 static int ett_lbmsrs_interest_mode
;
801 static int ett_lbmsrs_rti
;
802 static int ett_lbmsrs_rti_domains
;
803 static int ett_lbmsrs_rte
;
804 static int ett_lbmsrs_rte_domains
;
805 static int ett_lbmsrs_dmi
;
806 static int ett_lbmsrs_cnq
;
807 static int ett_lbmsrs_cni
;
808 static int ett_lbmsrs_cne
;
810 static int ett_lbmsrs_rsocket_frame
;
812 /*Expert analysis fields*/
813 static expert_field ei_lbmsrs_analysis_invalid_msg_id
;
815 /* Dissector handle */
816 static dissector_handle_t lbmsrs_dissector_handle
;
818 static const unsigned rsocket_frame_len_field_size
= 3;
819 static const unsigned rsocket_stream_id_field_size
= 4;
821 /* SRS default definitions*/
822 #define LBMSRS_DEFAULT_SOURCE_PORT 0
823 #define LBMSRS_DEFAULT_SOURCE_IP "127.0.0.1"
825 static uint32_t lbmsrs_source_ip_address
;
826 static const char* global_lbmsrs_source_ip_address
= LBMSRS_DEFAULT_SOURCE_IP
;
827 static uint32_t global_lbmsrs_source_port
= LBMSRS_DEFAULT_SOURCE_PORT
;
828 static bool global_lbmsrs_use_tag
;
829 static uint32_t lbmsrs_source_port
= LBMSRS_DEFAULT_SOURCE_PORT
;
830 static bool lbmsrs_use_tag
;
833 #define RSOCKET_FRAME_RESERVED 0x00
834 #define RSOCKET_FRAME_SETUP 0x01
835 #define RSOCKET_FRAME_LEASE 0x02
836 #define RSOCKET_FRAME_KEEPALIVE 0x03
837 #define RSOCKET_FRAME_REQUEST_RESPONSE 0x04
838 #define RSOCKET_FRAME_REQUEST_FNF 0x05
839 #define RSOCKET_FRAME_REQUEST_STREAM 0x06
840 #define RSOCKET_FRAME_REQUEST_CHANNEL 0x07
841 #define RSOCKET_FRAME_REQUEST_N 0x08
842 #define RSOCKET_FRAME_CANCEL 0x09
843 #define RSOCKET_FRAME_PAYLOAD 0x0A
844 #define RSOCKET_FRAME_ERROR 0x0B
845 #define RSOCKET_FRAME_METADATA_PUSH 0x0C
846 #define RSOCKET_FRAME_RESUME 0x0D
847 #define RSOCKET_FRAME_RESUME_OK 0x0E
848 #define RSOCKET_FRAME_EXT 0x3F
850 #define RSOCKET_FRAME_SETUP_MIN_SIZE 14
851 #define RSOCKET_FRAME_KEEPALIVE_SIZE 10
852 #define RSOCKET_FRAME_REQUEST_RESPONSE_SIZE 2
853 #define RSOCKET_FRAME_REQUEST_FNF_SIZE 2
854 #define RSOCKET_FRAME_REQUEST_STREAM_SIZE 6
855 #define RSOCKET_FRAME_REQUEST_CHANNEL_SIZE 6
856 #define RSOCKET_FRAME_REQUEST_N_SIZE 6
857 #define RSOCKET_FRAME_CANCEL_SIZE 2
858 #define RSOCKET_FRAME_PAYLOAD_SIZE 2
860 static const value_string rSocketFrameTypeNames
[] = {
861 { RSOCKET_FRAME_RESERVED
, "RESERVED" },
862 { RSOCKET_FRAME_SETUP
, "SETUP" },
863 { RSOCKET_FRAME_LEASE
, "LEASE" },
864 { RSOCKET_FRAME_KEEPALIVE
, "KEEPALIVE" },
865 { RSOCKET_FRAME_REQUEST_RESPONSE
, "REQUEST_RESPONSE" },
866 { RSOCKET_FRAME_REQUEST_FNF
, "REQUEST_FNF" },
867 { RSOCKET_FRAME_REQUEST_STREAM
, "REQUEST_STREAM" },
868 { RSOCKET_FRAME_REQUEST_CHANNEL
, "REQUEST_CHANNEL" },
869 { RSOCKET_FRAME_REQUEST_N
, "REQUEST_N" },
870 { RSOCKET_FRAME_CANCEL
, "CANCEL" },
871 { RSOCKET_FRAME_PAYLOAD
, "PAYLOAD" },
872 { RSOCKET_FRAME_ERROR
, "ERROR" },
873 { RSOCKET_FRAME_METADATA_PUSH
, "METADATA_PUSH" },
874 { RSOCKET_FRAME_RESUME
, "RESUME" },
875 { RSOCKET_FRAME_RESUME_OK
, "RESUME_OK" },
876 { RSOCKET_FRAME_EXT
, "EXT" },
880 static const value_string rSocketErrorCodeNames
[] =
882 { 0x00000000, "RESERVED" },
883 { 0x00000001, "INVALID_SETUP" },
884 { 0x00000002, "UNSUPPORTED_SETUP" },
885 { 0x00000003, "REJECTED_SETUP" },
886 { 0x00000004, "REJECTED_RESUME" },
887 { 0x00000101, "CONNECTION_ERROR" },
888 { 0x00000102, "CONNECTION_CLOSE" },
889 { 0x00000201, "APPLICATION_ERROR" },
890 { 0x00000202, "REJECTED" },
891 { 0x00000203, "CANCELED" },
892 { 0x00000204, "INVALID" },
893 { 0xFFFFFFFF, "REJECTED" },
897 /*----------------------------------------------------------------------------*/
898 /* UAT callback functions. */
899 /*----------------------------------------------------------------------------*/
900 static bool lbmsrs_tag_update_cb(void * record
, char * * error_string
)
902 lbmsrs_tag_entry_t
* tag
= (lbmsrs_tag_entry_t
*)record
;
904 if (tag
->name
== NULL
)
906 *error_string
= g_strdup("Tag name can't be empty");
911 g_strstrip(tag
->name
);
912 if (tag
->name
[0] == 0)
914 *error_string
= g_strdup("Tag name can't be empty");
921 static void * lbmsrs_tag_copy_cb(void * destination
, const void * source
, size_t length _U_
)
923 const lbmsrs_tag_entry_t
* src
= (const lbmsrs_tag_entry_t
*)source
;
924 lbmsrs_tag_entry_t
* dest
= (lbmsrs_tag_entry_t
*)destination
;
926 dest
->name
= g_strdup(src
->name
);
927 dest
->ip_address
= g_strdup(src
->ip_address
);
928 dest
->ip_address_val_h
= src
->ip_address_val_h
;
929 dest
->tcp_port
= src
->tcp_port
;
933 static void lbmsrs_tag_free_cb(void * record
)
935 lbmsrs_tag_entry_t
* tag
= (lbmsrs_tag_entry_t
*)record
;
937 if (tag
->name
!= NULL
)
943 if (tag
->ip_address
!= NULL
)
945 g_free(tag
->ip_address
);
946 tag
->ip_address
= NULL
;
950 /*Tag helper functions*/
951 static bool lbmsrs_match_packet(packet_info
* pinfo
, const lbmsrs_tag_entry_t
* entry
)
953 if ((pinfo
->dst
.type
!= AT_IPv4
) || (pinfo
->dst
.len
!= 4) ||
954 (pinfo
->src
.type
!= AT_IPv4
) || (pinfo
->src
.len
!= 4))
957 uint32_t dest_addr_h
= pntoh32(pinfo
->dst
.data
);
958 uint32_t src_addr_h
= pntoh32(pinfo
->src
.data
);
960 uint32_t ip_address_val_h
= 0;
961 if (NULL
!= entry
->ip_address
)
963 ip_address_val_h
= entry
->ip_address_val_h
;
966 /*if only port number is specified*/
967 if ((entry
->tcp_port
> 0) && (ip_address_val_h
== 0))
969 if ((entry
->tcp_port
== pinfo
->destport
) || (entry
->tcp_port
== pinfo
->srcport
))
974 /*if only IP is specified*/
975 else if ((entry
->tcp_port
== 0) && (ip_address_val_h
> 0))
977 if ((ip_address_val_h
== dest_addr_h
) || (ip_address_val_h
== src_addr_h
))
982 /*if both IP and port is specified*/
985 if (((ip_address_val_h
== dest_addr_h
) && (entry
->tcp_port
== pinfo
->destport
))
986 || ((ip_address_val_h
== src_addr_h
) && (entry
->tcp_port
== pinfo
->srcport
)))
995 static char * lbmsrs_tag_find(packet_info
* pinfo
)
998 lbmsrs_tag_entry_t
* tag
= NULL
;
1000 if (!lbmsrs_use_tag
)
1004 for (idx
= 0; idx
< lbmsrs_tag_count
; ++idx
)
1006 tag
= &(lbmsrs_tag_entry
[idx
]);
1007 if (lbmsrs_match_packet(pinfo
, tag
))
1015 /*Utility functions*/
1016 static const char *getFrameTypeName(const uint64_t frame_type
) {
1017 for (size_t i
= 0; i
< array_length(rSocketFrameTypeNames
); i
++) {
1018 if (rSocketFrameTypeNames
[i
].value
== frame_type
) {
1019 return rSocketFrameTypeNames
[i
].strptr
;
1025 static bool check_lbmsrs_packet(tvbuff_t
*tvb
, unsigned offset
)
1027 /*check if valid rsocket packet*/
1028 unsigned start_offset
= offset
;
1029 offset
+= rsocket_frame_len_field_size
;
1031 /*check the length*/
1032 /*rsocket data may be split across multiple packets*/
1033 uint32_t tvb_length
= tvb_captured_length(tvb
);
1035 if (tvb_length
< (offset
- start_offset
+ rsocket_stream_id_field_size
))
1040 /*get the stream-id*/
1041 uint32_t rsocket_stream_id
= tvb_get_uint32(tvb
, offset
, ENC_BIG_ENDIAN
);
1043 /*move the offset past the stream id field*/
1044 offset
+= rsocket_stream_id_field_size
;
1046 if (!tvb_bytes_exist(tvb
, offset
, 1))
1051 /*get the rsocket frame type*/
1052 uint64_t rsocket_frame_type
= tvb_get_bits64(tvb
, offset
* 8, 6, ENC_BIG_ENDIAN
);
1054 /*read the rsocket metadata flag*/
1055 uint8_t rsocket_metadata_flag
= tvb_get_bits8(tvb
, (offset
* 8) + 6, 2);
1057 /*check if valid rsocket frame type*/
1058 /*update the offset according to the frame type*/
1059 switch (rsocket_frame_type
)
1061 case RSOCKET_FRAME_SETUP
:
1062 case RSOCKET_FRAME_KEEPALIVE
:
1063 case RSOCKET_FRAME_METADATA_PUSH
:
1064 case RSOCKET_FRAME_RESUME
:
1065 case RSOCKET_FRAME_RESUME_OK
:
1067 /*for these frame types stream id must be 0 */
1068 if (rsocket_stream_id
!= 0)
1075 case RSOCKET_FRAME_EXT
:
1080 case RSOCKET_FRAME_REQUEST_RESPONSE
:
1081 case RSOCKET_FRAME_REQUEST_FNF
:
1082 case RSOCKET_FRAME_CANCEL
:
1083 case RSOCKET_FRAME_PAYLOAD
:
1089 case RSOCKET_FRAME_REQUEST_STREAM
:
1090 case RSOCKET_FRAME_REQUEST_CHANNEL
:
1091 case RSOCKET_FRAME_REQUEST_N
:
1092 case RSOCKET_FRAME_ERROR
:
1102 /*if rsocket metadata is available get the metadata length*/
1103 if (rsocket_metadata_flag
)
1105 if (!tvb_bytes_exist(tvb
, offset
, 3))
1110 /*add the rsocket metadata length field*/
1111 uint32_t rsocket_metadata_len
= tvb_get_uint24(tvb
, offset
, ENC_BIG_ENDIAN
);
1113 /*move the offset by the metadata length*/
1114 offset
+= rsocket_metadata_len
;
1115 if (!tvb_bytes_exist(tvb
, offset
, 6))
1122 /*check the SRS message id*/
1124 uint32_t rsocket_payload_len
= tvb_length
- offset
;
1125 /*if payload is available start processing for SRS*/
1126 if (rsocket_payload_len
> 2)
1128 uint16_t message_id
= tvb_get_uint16(tvb
, offset
, ENC_BIG_ENDIAN
);
1131 case MSG_ID_REGISTRATION_REQUEST
:
1132 case MSG_ID_REGISTRATION_RESPONSE
:
1133 case MSG_ID_STREAM_REQUEST
:
1134 case MSG_ID_SOURCE_INFO
:
1135 case MSG_ID_SOURCE_DELETE
:
1136 case MSG_ID_RCV_INFO
:
1137 case MSG_ID_RCV_DELETE
:
1138 case MSG_ID_RCV_END
:
1139 case MSG_ID_WRCV_INFO
:
1140 case MSG_ID_WRCV_DELETE
:
1141 case MSG_ID_WRCV_END
:
1142 case MSG_ID_SRC_LEAVE
:
1143 case MSG_ID_ROUTE_INFO
:
1144 case MSG_ID_ROUTE_END
:
1145 case MSG_ID_DOMAIN_INFO
:
1146 case MSG_ID_CONTEXT_NAME_QUERY
:
1147 case MSG_ID_CONTEXT_NAME_INFO
:
1148 case MSG_ID_CONTEXT_NAME_END
:
1164 static unsigned get_rsocket_frame_len(packet_info
*pinfo _U_
, tvbuff_t
*tvb
, int offset
, void *data _U_
)
1166 /*get the rsocket frame length (3-byte long field)*/
1167 /*offset argument points to the beginning of the Rsocket PDU*/
1168 uint32_t rsocket_frame_len
= tvb_get_uint24(tvb
, offset
, ENC_BIG_ENDIAN
);
1170 /*return total RSocket PDU size*/
1171 return (rsocket_frame_len
+ rsocket_frame_len_field_size
);
1174 /*----------------Main Dissection Functions----------------------*/
1176 /* these are used for tabulating the number of sub-elements in
1177 * a given SRS message. Multiples (or none) of each are possible
1178 * within a single SRS message.
1180 * These not used for controlling the dissection.
1182 * Defined as static to prevent collisions with other dissectors.
1184 static unsigned cnt_sir
= 0, cnt_ser
= 0, cnt_sdr
= 0;
1185 static unsigned cnt_rir
= 0, cnt_rer
= 0, cnt_rdr
= 0;
1186 static unsigned cnt_wir
= 0, cnt_wer
= 0, cnt_wdr
= 0;
1187 static unsigned cnt_sli
= 0;
1188 static unsigned cnt_rti
= 0, cnt_rte
= 0, cnt_dmi
= 0;
1189 static unsigned cnt_cnq
= 0, cnt_cni
= 0, cnt_cne
= 0;
1191 /*Rsocket dissector function*/
1192 static unsigned dissect_rsocket_frame(uint64_t rsocket_frame_type
,proto_tree
* rsocket_frame_tree
, tvbuff_t
* tvb
,unsigned offset
, bool *can_dissect_further
)
1194 unsigned total_payload_len
= tvb_captured_length(tvb
);
1195 unsigned remaining_payload_len
= total_payload_len
- offset
;
1196 unsigned start_offset
= offset
;
1198 switch (rsocket_frame_type
)
1200 case RSOCKET_FRAME_SETUP
:/*SETUP Frame*/
1203 if (remaining_payload_len
< RSOCKET_FRAME_SETUP_MIN_SIZE
)
1205 *can_dissect_further
= false;
1209 int8_t resume_flag
= tvb_get_bits8(tvb
, (offset
+ 1) * 8, 1);
1210 proto_tree_add_item(rsocket_frame_tree
, hf_lbmsrs_rsocket_resume_flag
, tvb
, offset
, 2,ENC_BIG_ENDIAN
);
1211 proto_tree_add_item(rsocket_frame_tree
, hf_lbmsrs_rsocket_lease_flag
, tvb
, offset
, 2,ENC_BIG_ENDIAN
);
1214 proto_tree_add_item(rsocket_frame_tree
, hf_lbmsrs_rsocket_major_version
, tvb
, offset
, 2,ENC_BIG_ENDIAN
);
1217 proto_tree_add_item(rsocket_frame_tree
, hf_lbmsrs_rsocket_minor_version
, tvb
, offset
, 2,ENC_BIG_ENDIAN
);
1219 proto_tree_add_item(rsocket_frame_tree
, hf_lbmsrs_rsocket_keepalive_interval
, tvb
, offset
, 4,ENC_BIG_ENDIAN
);
1221 proto_tree_add_item(rsocket_frame_tree
, hf_lbmsrs_rsocket_max_lifetime
, tvb
, offset
, 4,ENC_BIG_ENDIAN
);
1224 if ((total_payload_len
- offset
) < 2)
1226 *can_dissect_further
= false;
1229 unsigned resume_token_len
;
1230 proto_tree_add_item_ret_uint(rsocket_frame_tree
, hf_lbmsrs_rsocket_resume_token_len
, tvb
, offset
,2, ENC_BIG_ENDIAN
, &resume_token_len
);
1233 if ((total_payload_len
- offset
) < resume_token_len
)
1235 *can_dissect_further
= false;
1238 proto_tree_add_item(rsocket_frame_tree
, hf_lbmsrs_rsocket_resume_token
, tvb
, offset
,resume_token_len
, ENC_STRING
);
1239 offset
+= resume_token_len
;
1242 if ((total_payload_len
- offset
) < 1)
1244 *can_dissect_further
= false;
1248 unsigned mdata_mime_length
;
1249 proto_tree_add_item_ret_uint(rsocket_frame_tree
, hf_lbmsrs_rsocket_mdata_mime_length
, tvb
, offset
,1, ENC_BIG_ENDIAN
, &mdata_mime_length
);
1252 if ((total_payload_len
- offset
) < mdata_mime_length
)
1254 *can_dissect_further
= false;
1258 proto_tree_add_item(rsocket_frame_tree
, hf_lbmsrs_rsocket_mdata_mime_type
, tvb
, offset
,mdata_mime_length
, ENC_ASCII
| ENC_NA
);
1259 offset
+= mdata_mime_length
;
1261 if ((total_payload_len
- offset
) < 1)
1263 *can_dissect_further
= false;
1266 unsigned data_mime_length
;
1267 proto_tree_add_item_ret_uint(rsocket_frame_tree
, hf_lbmsrs_rsocket_data_mime_length
, tvb
, offset
,1, ENC_BIG_ENDIAN
, &data_mime_length
);
1270 if ((total_payload_len
- offset
) < data_mime_length
)
1272 *can_dissect_further
= false;
1276 proto_tree_add_item(rsocket_frame_tree
, hf_lbmsrs_rsocket_data_mime_type
, tvb
, offset
,data_mime_length
, ENC_ASCII
| ENC_NA
);
1277 offset
+= data_mime_length
;
1281 case RSOCKET_FRAME_KEEPALIVE
:/*KEEPALIVE FRAME*/
1284 if (remaining_payload_len
< RSOCKET_FRAME_KEEPALIVE_SIZE
)
1286 *can_dissect_further
= false;
1290 proto_tree_add_item(rsocket_frame_tree
, hf_lbmsrs_rsocket_respond_flag
, tvb
, offset
, 2,ENC_BIG_ENDIAN
);
1293 proto_tree_add_item(rsocket_frame_tree
, hf_lbmsrs_rsocket_keepalive_last_rcvd_pos
, tvb
, offset
, 8,ENC_BIG_ENDIAN
);
1299 case RSOCKET_FRAME_REQUEST_RESPONSE
:/*REQUEST_RESPONSE FRAME*/
1302 if (remaining_payload_len
< RSOCKET_FRAME_REQUEST_RESPONSE_SIZE
)
1304 *can_dissect_further
= false;
1307 proto_tree_add_item(rsocket_frame_tree
, hf_lbmsrs_rsocket_follows_flag
, tvb
, offset
, 2,ENC_BIG_ENDIAN
);
1313 case RSOCKET_FRAME_REQUEST_FNF
:/*FNF FRAME*/
1315 if (remaining_payload_len
< RSOCKET_FRAME_REQUEST_FNF_SIZE
)
1317 *can_dissect_further
= false;
1320 proto_tree_add_item(rsocket_frame_tree
, hf_lbmsrs_rsocket_follows_flag
, tvb
, offset
, 2,ENC_BIG_ENDIAN
);
1325 case RSOCKET_FRAME_REQUEST_STREAM
:/*REQ_STREAM FRAME*/
1327 if (remaining_payload_len
< RSOCKET_FRAME_REQUEST_STREAM_SIZE
)
1329 *can_dissect_further
= false;
1332 proto_tree_add_item(rsocket_frame_tree
, hf_lbmsrs_rsocket_follows_flag
, tvb
, offset
, 2,ENC_BIG_ENDIAN
);
1335 proto_tree_add_item(rsocket_frame_tree
, hf_lbmsrs_rsocket_req_n
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1340 case RSOCKET_FRAME_REQUEST_CHANNEL
:/*REQ_CHANNEL FRAME*/
1342 if (remaining_payload_len
< RSOCKET_FRAME_REQUEST_CHANNEL_SIZE
)
1344 *can_dissect_further
= false;
1347 proto_tree_add_item(rsocket_frame_tree
, hf_lbmsrs_rsocket_follows_flag
, tvb
, offset
, 2,ENC_BIG_ENDIAN
);
1348 proto_tree_add_item(rsocket_frame_tree
, hf_lbmsrs_rsocket_complete_flag
, tvb
, offset
, 2,ENC_BIG_ENDIAN
);
1351 proto_tree_add_item(rsocket_frame_tree
, hf_lbmsrs_rsocket_req_n
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1356 case RSOCKET_FRAME_REQUEST_N
:/*REQ_N FRAME*/
1358 if (remaining_payload_len
< RSOCKET_FRAME_REQUEST_N_SIZE
)
1360 *can_dissect_further
= false;
1364 proto_tree_add_item(rsocket_frame_tree
, hf_lbmsrs_rsocket_req_n
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1369 case RSOCKET_FRAME_CANCEL
:/*CANCEL FRAME*/
1371 if (remaining_payload_len
< RSOCKET_FRAME_CANCEL_SIZE
)
1373 *can_dissect_further
= false;
1380 case RSOCKET_FRAME_PAYLOAD
:/*PAYLOAD FRAME*/
1382 if (remaining_payload_len
< RSOCKET_FRAME_PAYLOAD_SIZE
)
1384 *can_dissect_further
= false;
1387 proto_tree_add_item(rsocket_frame_tree
, hf_lbmsrs_rsocket_follows_flag
, tvb
, offset
, 2,ENC_BIG_ENDIAN
);
1388 proto_tree_add_item(rsocket_frame_tree
, hf_lbmsrs_rsocket_complete_flag
, tvb
, offset
, 2,ENC_BIG_ENDIAN
);
1389 proto_tree_add_item(rsocket_frame_tree
, hf_lbmsrs_rsocket_next_flag
, tvb
, offset
, 2,ENC_BIG_ENDIAN
);
1395 case RSOCKET_FRAME_ERROR
:
1397 if (remaining_payload_len
< 6)
1399 *can_dissect_further
= false;
1403 proto_tree_add_item(rsocket_frame_tree
, hf_lbmsrs_rsocket_error_code
, tvb
, offset
, 4,ENC_BIG_ENDIAN
);
1410 *can_dissect_further
= false;
1415 return (offset
- start_offset
);
1419 static unsigned dissect_lbmsrs_sir_ser(tvbuff_t
* tvb
, packet_info
* pinfo
, proto_tree
* tree
, unsigned offset
, unsigned *lcnt_sir
, unsigned *lcnt_ser
, bool *can_dissect_further
)
1421 unsigned total_payload_len
= tvb_captured_length(tvb
);
1422 unsigned start_offset
= offset
;
1424 /*first field is OTID, check if that many bytes are left to process*/
1425 if ((total_payload_len
- offset
) < L_LBM_SRS_SRC_INFO_INFO_T_OTID
)
1427 /*stop processing in case not available*/
1428 *can_dissect_further
= false;
1432 proto_item
*batch_item
= NULL
;
1434 batch_item
= proto_tree_add_none_format(tree
, hf_lbmsrs_sir
, tvb
, offset
, -1, "SIR");
1435 proto_tree
*sir_tree
= proto_item_add_subtree(batch_item
, ett_lbmsrs_sir
);
1437 proto_tree_add_item(sir_tree
, hf_lbmsrs_message_id
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1440 proto_tree_add_item(sir_tree
, hf_lbmsrs_sir_otid
, tvb
, offset
, L_LBM_SRS_SRC_INFO_INFO_T_OTID
, ENC_NA
);
1441 offset
+= L_LBM_SRS_SRC_INFO_INFO_T_OTID
;
1443 if ((total_payload_len
- offset
) < L_LBM_SRS_SRC_INFO_INFO_T_TOPIC_LEN
)
1445 /*stop processing in case not available*/
1446 *can_dissect_further
= false;
1447 return (offset
- start_offset
);
1449 uint8_t topic_len
= tvb_get_uint8(tvb
, offset
);
1450 proto_tree_add_item(sir_tree
, hf_lbmsrs_sir_topic_len
, tvb
, offset
, L_LBM_SRS_SRC_INFO_INFO_T_TOPIC_LEN
, ENC_BIG_ENDIAN
);
1451 offset
+= L_LBM_SRS_SRC_INFO_INFO_T_TOPIC_LEN
;
1453 if ((total_payload_len
- offset
) < topic_len
)
1455 /*stop processing in case not available*/
1456 *can_dissect_further
= false;
1457 return (offset
- start_offset
);
1460 char* name
= tvb_get_stringz_enc(pinfo
->pool
, tvb
, offset
, &len
, ENC_ASCII
);
1461 proto_tree_add_item(sir_tree
, hf_lbmsrs_sir_topic
, tvb
, offset
, topic_len
, ENC_ASCII
| ENC_NA
);
1462 offset
+= topic_len
;
1464 if ((total_payload_len
- offset
) < L_LBM_SRS_SRC_INFO_INFO_T_SOURCE_LEN
)
1466 /*stop processing in case not available*/
1467 *can_dissect_further
= false;
1468 return (offset
- start_offset
);
1470 uint8_t source_len
= tvb_get_uint8(tvb
, offset
);
1471 proto_tree_add_item(sir_tree
, hf_lbmsrs_sir_source_len
, tvb
, offset
, L_LBM_SRS_SRC_INFO_INFO_T_SOURCE_LEN
, ENC_BIG_ENDIAN
);
1472 offset
+= L_LBM_SRS_SRC_INFO_INFO_T_SOURCE_LEN
;
1474 if ((total_payload_len
- offset
) < source_len
)
1476 /*stop processing in case not available*/
1477 *can_dissect_further
= false;
1478 return (offset
- start_offset
);
1481 proto_tree_add_item(sir_tree
, hf_lbmsrs_sir_source
, tvb
, offset
, source_len
, ENC_ASCII
| ENC_NA
);
1482 offset
+= source_len
;
1484 if ((total_payload_len
- offset
) < L_LBM_SRS_SRC_INFO_INFO_T_HOST_ID
)
1486 /*stop processing in case not available*/
1487 *can_dissect_further
= false;
1488 return (offset
- start_offset
);
1490 proto_tree_add_item(sir_tree
, hf_lbmsrs_sir_host_id
, tvb
, offset
, L_LBM_SRS_SRC_INFO_INFO_T_HOST_ID
, ENC_BIG_ENDIAN
);
1491 offset
+= L_LBM_SRS_SRC_INFO_INFO_T_HOST_ID
;
1493 if ((total_payload_len
- offset
) < L_LBM_SRS_SRC_INFO_INFO_T_TOPIC_IDX
)
1495 /*stop processing in case not available*/
1496 *can_dissect_further
= false;
1497 return (offset
- start_offset
);
1499 proto_tree_add_item(sir_tree
, hf_lbmsrs_sir_topic_idx
, tvb
, offset
, L_LBM_SRS_SRC_INFO_INFO_T_TOPIC_IDX
, ENC_BIG_ENDIAN
);
1500 offset
+= L_LBM_SRS_SRC_INFO_INFO_T_TOPIC_IDX
;
1502 if ((total_payload_len
- offset
) < L_LBM_SRS_SRC_INFO_INFO_T_FUNCTIONALITY_FLAGS
)
1504 /*stop processing in case not available*/
1505 *can_dissect_further
= false;
1506 return (offset
- start_offset
);
1508 proto_tree_add_item(sir_tree
, hf_lbmsrs_sir_functionality_flags
, tvb
, offset
, L_LBM_SRS_SRC_INFO_INFO_T_FUNCTIONALITY_FLAGS
, ENC_BIG_ENDIAN
);
1509 offset
+= L_LBM_SRS_SRC_INFO_INFO_T_FUNCTIONALITY_FLAGS
;
1511 if ((total_payload_len
- offset
) < L_LBM_SRS_SRC_INFO_INFO_T_REQUEST_IP
)
1513 /*stop processing in case not available*/
1514 *can_dissect_further
= false;
1515 return (offset
- start_offset
);
1517 proto_tree_add_item(sir_tree
, hf_lbmsrs_sir_request_ip
, tvb
, offset
, L_LBM_SRS_SRC_INFO_INFO_T_REQUEST_IP
, ENC_BIG_ENDIAN
);
1518 offset
+= L_LBM_SRS_SRC_INFO_INFO_T_REQUEST_IP
;
1520 if ((total_payload_len
- offset
) < L_LBM_SRS_SRC_INFO_INFO_T_REQUEST_PORT
)
1522 /*stop processing in case not available*/
1523 *can_dissect_further
= false;
1524 return (offset
- start_offset
);
1526 proto_tree_add_item(sir_tree
, hf_lbmsrs_sir_request_port
, tvb
, offset
, L_LBM_SRS_SRC_INFO_INFO_T_REQUEST_PORT
, ENC_BIG_ENDIAN
);
1527 offset
+= L_LBM_SRS_SRC_INFO_INFO_T_REQUEST_PORT
;
1529 if ((total_payload_len
- offset
) < L_LBM_SRS_SRC_INFO_INFO_T_DOMAIN_ID
)
1531 /*stop processing in case not available*/
1532 *can_dissect_further
= false;
1533 return (offset
- start_offset
);
1535 proto_tree_add_item(sir_tree
, hf_lbmsrs_sir_domain_id
, tvb
, offset
, L_LBM_SRS_SRC_INFO_INFO_T_DOMAIN_ID
, ENC_BIG_ENDIAN
);
1536 offset
+= L_LBM_SRS_SRC_INFO_INFO_T_DOMAIN_ID
;
1538 if ((total_payload_len
- offset
) < L_LBM_SRS_SRC_INFO_INFO_T_ENCRYPTION
)
1540 /*stop processing in case not available*/
1541 *can_dissect_further
= false;
1542 return (offset
- start_offset
);
1544 proto_tree_add_item(sir_tree
, hf_lbmsrs_sir_encryption
, tvb
, offset
, L_LBM_SRS_SRC_INFO_INFO_T_ENCRYPTION
, ENC_BIG_ENDIAN
);
1545 offset
+= L_LBM_SRS_SRC_INFO_INFO_T_ENCRYPTION
;
1547 if ((total_payload_len
- offset
) < L_LBM_SRS_SRC_INFO_INFO_T_COMPRESSION
)
1549 /*stop processing in case not available*/
1550 *can_dissect_further
= false;
1551 return (offset
- start_offset
);
1553 proto_tree_add_item(sir_tree
, hf_lbmsrs_sir_compression
, tvb
, offset
, L_LBM_SRS_SRC_INFO_INFO_T_COMPRESSION
, ENC_BIG_ENDIAN
);
1554 offset
+= L_LBM_SRS_SRC_INFO_INFO_T_COMPRESSION
;
1556 if ((total_payload_len
- offset
) < L_LBM_SRS_SRC_INFO_INFO_T_ULB_SRC_ID
)
1558 /*stop processing in case not available*/
1559 *can_dissect_further
= false;
1560 return (offset
- start_offset
);
1562 proto_tree_add_item(sir_tree
, hf_lbmsrs_sir_ulb_src_id
, tvb
, offset
, L_LBM_SRS_SRC_INFO_INFO_T_ULB_SRC_ID
, ENC_BIG_ENDIAN
);
1563 offset
+= L_LBM_SRS_SRC_INFO_INFO_T_ULB_SRC_ID
;
1565 if ((total_payload_len
- offset
) < L_LBM_SRS_SRC_INFO_INFO_T_ULB_QUEUE_ID
)
1567 /*stop processing in case not available*/
1568 *can_dissect_further
= false;
1569 return (offset
- start_offset
);
1571 proto_tree_add_item(sir_tree
, hf_lbmsrs_sir_ulb_queue_id
, tvb
, offset
, L_LBM_SRS_SRC_INFO_INFO_T_ULB_QUEUE_ID
, ENC_BIG_ENDIAN
);
1572 offset
+= L_LBM_SRS_SRC_INFO_INFO_T_ULB_QUEUE_ID
;
1574 if ((total_payload_len
- offset
) < L_LBM_SRS_SRC_INFO_INFO_T_ULB_REG_ID
)
1576 /*stop processing in case not available*/
1577 *can_dissect_further
= false;
1578 return (offset
- start_offset
);
1580 proto_tree_add_item(sir_tree
, hf_lbmsrs_sir_ulb_reg_id
, tvb
, offset
, L_LBM_SRS_SRC_INFO_INFO_T_ULB_REG_ID
, ENC_BIG_ENDIAN
);
1581 offset
+= L_LBM_SRS_SRC_INFO_INFO_T_ULB_REG_ID
;
1583 if ((total_payload_len
- offset
) < L_LBM_SRS_SRC_INFO_INFO_T_CONTEXT_INSTANCE
)
1585 /*stop processing in case not available*/
1586 *can_dissect_further
= false;
1587 return (offset
- start_offset
);
1589 proto_tree_add_item(sir_tree
, hf_lbmsrs_sir_context_instance
, tvb
, offset
, L_LBM_SRS_SRC_INFO_INFO_T_CONTEXT_INSTANCE
, ENC_NA
);
1590 offset
+= L_LBM_SRS_SRC_INFO_INFO_T_CONTEXT_INSTANCE
;
1592 if ((total_payload_len
- offset
) < L_LBM_SRS_SRC_INFO_INFO_T_CONTEXT_TYPE
)
1594 /*stop processing in case not available*/
1595 *can_dissect_further
= false;
1596 return (offset
- start_offset
);
1598 proto_tree_add_item(sir_tree
, hf_lbmsrs_sir_context_type
, tvb
, offset
, L_LBM_SRS_SRC_INFO_INFO_T_CONTEXT_TYPE
, ENC_BIG_ENDIAN
);
1599 offset
+= L_LBM_SRS_SRC_INFO_INFO_T_CONTEXT_TYPE
;
1601 if ((total_payload_len
- offset
) < L_LBM_SRS_SRC_INFO_INFO_T_VERSION
)
1603 /*stop processing in case not available*/
1604 *can_dissect_further
= false;
1605 return (offset
- start_offset
);
1607 proto_tree_add_item(sir_tree
, hf_lbmsrs_sir_version
, tvb
, offset
, L_LBM_SRS_SRC_INFO_INFO_T_VERSION
, ENC_BIG_ENDIAN
);
1608 offset
+= L_LBM_SRS_SRC_INFO_INFO_T_VERSION
;
1610 if ((total_payload_len
- offset
) < L_LBM_SRS_SRC_INFO_INFO_T_VERSION_FLAGS
)
1612 /*stop processing in case not available*/
1613 *can_dissect_further
= false;
1614 return (offset
- start_offset
);
1616 proto_tree_add_item(sir_tree
, hf_lbmsrs_sir_version_flags
, tvb
, offset
, L_LBM_SRS_SRC_INFO_INFO_T_VERSION_FLAGS
, ENC_BIG_ENDIAN
);
1617 offset
+= L_LBM_SRS_SRC_INFO_INFO_T_VERSION_FLAGS
;
1619 if ((total_payload_len
- offset
) < L_LBM_SRS_SRC_INFO_INFO_T_TTL
)
1621 /*stop processing in case not available*/
1622 *can_dissect_further
= false;
1623 return (offset
- start_offset
);
1625 proto_tree_add_item(sir_tree
, hf_lbmsrs_sir_ttl
, tvb
, offset
, L_LBM_SRS_SRC_INFO_INFO_T_TTL
, ENC_BIG_ENDIAN
);
1626 offset
+= L_LBM_SRS_SRC_INFO_INFO_T_TTL
;
1628 if ((total_payload_len
- offset
) < L_LBM_SRS_SRC_INFO_INFO_T_COST
)
1630 /*stop processing in case not available*/
1631 *can_dissect_further
= false;
1632 return (offset
- start_offset
);
1635 proto_tree_add_item_ret_int(sir_tree
, hf_lbmsrs_sir_cost
, tvb
, offset
, L_LBM_SRS_SRC_INFO_INFO_T_COST
, ENC_BIG_ENDIAN
, &cost
);
1636 offset
+= L_LBM_SRS_SRC_INFO_INFO_T_COST
;
1640 proto_item_set_text(batch_item
, "SER:Topic:%s", name
);
1645 proto_item_set_text(batch_item
, "SIR:Topic:%s", name
);
1650 proto_item_set_len(batch_item
, (offset
- start_offset
));
1651 return (offset
- start_offset
);
1654 static unsigned dissect_lbmsrs_sdr(tvbuff_t
* tvb
, packet_info
* pinfo
, proto_tree
* tree
, unsigned offset
, unsigned *lcnt_sdr
, bool *can_dissect_further
)
1656 unsigned total_payload_len
= tvb_captured_length(tvb
);
1657 unsigned start_offset
= offset
;
1659 /*first field is OTID, check if that many bytes are left to process*/
1660 if ((total_payload_len
- offset
) < L_LBM_SRS_SRC_INFO_INFO_T_OTID
)
1662 /*stop processing in case not available*/
1663 *can_dissect_further
= false;
1667 /*add a sub-tree for SDR */
1668 proto_item
* batch_item
= proto_tree_add_none_format(tree
, hf_lbmsrs_sdr
, tvb
, offset
, -1, "SDR");
1669 proto_tree
*sdr_tree
= proto_item_add_subtree(batch_item
, ett_lbmsrs_sdr
);
1671 proto_tree_add_item(sdr_tree
, hf_lbmsrs_message_id
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1674 /*first field is OTID, check if that many bytes are left to process*/
1675 if ((total_payload_len
- offset
) < L_LBM_SRS_SRC_INFO_INFO_T_OTID
)
1677 /*stop processing in case not available*/
1678 *can_dissect_further
= false;
1679 return (offset
- start_offset
);
1682 proto_tree_add_item(sdr_tree
, hf_lbmsrs_sdr_otid
, tvb
, offset
, L_LBM_SRS_SRC_DELETE_INFO_T_OTID
, ENC_NA
);
1683 offset
+= L_LBM_SRS_SRC_DELETE_INFO_T_OTID
;
1685 if ((total_payload_len
- offset
) < L_LBM_SRS_SRC_DELETE_INFO_T_TOPIC_LEN
)
1687 /*stop processing in case not available*/
1688 *can_dissect_further
= false;
1689 return (offset
- start_offset
);
1691 uint8_t topic_len
= tvb_get_uint8(tvb
, offset
);
1692 proto_tree_add_item(sdr_tree
, hf_lbmsrs_sdr_topic_len
, tvb
, offset
, L_LBM_SRS_SRC_DELETE_INFO_T_TOPIC_LEN
, ENC_BIG_ENDIAN
);
1694 offset
+= L_LBM_SRS_SRC_DELETE_INFO_T_TOPIC_LEN
;
1696 if ((total_payload_len
- offset
) < topic_len
)
1698 /*stop processing in case not available*/
1699 *can_dissect_further
= false;
1700 return (offset
- start_offset
);
1703 char* name
= tvb_get_stringz_enc(pinfo
->pool
, tvb
, offset
, &len
, ENC_ASCII
);
1704 proto_tree_add_item(sdr_tree
, hf_lbmsrs_sdr_topic
, tvb
, offset
, topic_len
, ENC_ASCII
| ENC_NA
);
1705 offset
+= topic_len
;
1707 proto_item_set_text(batch_item
, "SDR:Topic:%s", name
);
1710 proto_item_set_len(batch_item
, (offset
- start_offset
));
1711 return (offset
- start_offset
);
1715 static unsigned dissect_lbmsrs_rir(tvbuff_t
* tvb
, packet_info
* pinfo
, proto_tree
* tree
, unsigned offset
, unsigned *lcnt_rir
, bool *can_dissect_further
)
1717 unsigned total_payload_len
= tvb_captured_length(tvb
);
1718 unsigned start_offset
= offset
;
1720 /*first field is Topic length, check if that many bytes are left to process*/
1721 if ((total_payload_len
- offset
) < L_LBM_SRS_RCV_INFO_INFO_T_TOPIC_LEN
)
1723 /*stop processing in case not available*/
1724 *can_dissect_further
= false;
1728 /*add a sub-tree for RIR */
1729 proto_item
* batch_item
= proto_tree_add_none_format(tree
, hf_lbmsrs_rir
, tvb
, offset
, -1, "RIR");
1730 proto_tree
*rir_tree
= proto_item_add_subtree(batch_item
, ett_lbmsrs_rir
);
1732 proto_tree_add_item(rir_tree
, hf_lbmsrs_message_id
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1735 /*first field is Topic length, check if that many bytes are left to process*/
1736 if ((total_payload_len
- offset
) < L_LBM_SRS_RCV_INFO_INFO_T_TOPIC_LEN
)
1738 /*stop processing in case not available*/
1739 *can_dissect_further
= false;
1740 return (offset
- start_offset
);
1743 uint8_t topic_len
= tvb_get_uint8(tvb
, offset
);
1744 proto_tree_add_item(rir_tree
, hf_lbmsrs_rir_topic_len
, tvb
, offset
, L_LBM_SRS_RCV_INFO_INFO_T_TOPIC_LEN
, ENC_BIG_ENDIAN
);
1746 offset
+= L_LBM_SRS_RCV_INFO_INFO_T_TOPIC_LEN
;
1748 if ((total_payload_len
- offset
) < topic_len
)
1750 /*stop processing in case not available*/
1751 *can_dissect_further
= false;
1752 return (offset
- start_offset
);
1755 char* name
= tvb_get_stringz_enc(pinfo
->pool
, tvb
, offset
, &len
, ENC_ASCII
);
1756 proto_tree_add_item(rir_tree
, hf_lbmsrs_rir_topic
, tvb
, offset
, topic_len
, ENC_ASCII
| ENC_NA
);
1757 offset
+= topic_len
;
1759 if ((total_payload_len
- offset
) < L_LBM_SRS_RCV_INFO_INFO_T_DOMAIN_ID
)
1761 /*stop processing in case not available*/
1762 *can_dissect_further
= false;
1763 return (offset
- start_offset
);
1765 proto_tree_add_item(rir_tree
, hf_lbmsrs_rir_domain_id
, tvb
, offset
, L_LBM_SRS_RCV_INFO_INFO_T_DOMAIN_ID
, ENC_BIG_ENDIAN
);
1766 offset
+= L_LBM_SRS_RCV_INFO_INFO_T_DOMAIN_ID
;
1768 if ((total_payload_len
- offset
) < L_LBM_SRS_RCV_INFO_INFO_T_CONTEXT_INSTANCE
)
1770 /*stop processing in case not available*/
1771 *can_dissect_further
= false;
1772 return (offset
- start_offset
);
1774 proto_tree_add_item(rir_tree
, hf_lbmsrs_rir_context_instance
, tvb
, offset
, L_LBM_SRS_RCV_INFO_INFO_T_CONTEXT_INSTANCE
, ENC_NA
);
1775 offset
+= L_LBM_SRS_RCV_INFO_INFO_T_CONTEXT_INSTANCE
;
1777 if ((total_payload_len
- offset
) < L_LBM_SRS_RCV_INFO_INFO_T_CONTEXT_TYPE
)
1779 /*stop processing in case not available*/
1780 *can_dissect_further
= false;
1781 return (offset
- start_offset
);
1783 proto_tree_add_item(rir_tree
, hf_lbmsrs_rir_context_type
, tvb
, offset
, L_LBM_SRS_RCV_INFO_INFO_T_CONTEXT_TYPE
, ENC_BIG_ENDIAN
);
1784 offset
+= L_LBM_SRS_RCV_INFO_INFO_T_CONTEXT_TYPE
;
1786 if ((total_payload_len
- offset
) < L_LBM_SRS_RCV_INFO_INFO_T_VERSION
)
1788 /*stop processing in case not available*/
1789 *can_dissect_further
= false;
1790 return (offset
- start_offset
);
1792 proto_tree_add_item(rir_tree
, hf_lbmsrs_rir_version
, tvb
, offset
, L_LBM_SRS_RCV_INFO_INFO_T_VERSION
, ENC_BIG_ENDIAN
);
1793 offset
+= L_LBM_SRS_RCV_INFO_INFO_T_VERSION
;
1795 if ((total_payload_len
- offset
) < L_LBM_SRS_RCV_INFO_INFO_T_VERSION_FLAGS
)
1797 /*stop processing in case not available*/
1798 *can_dissect_further
= false;
1799 return (offset
- start_offset
);
1801 proto_tree_add_item(rir_tree
, hf_lbmsrs_rir_version_flags
, tvb
, offset
, L_LBM_SRS_RCV_INFO_INFO_T_VERSION_FLAGS
, ENC_BIG_ENDIAN
);
1802 offset
+= L_LBM_SRS_RCV_INFO_INFO_T_VERSION_FLAGS
;
1804 if ((total_payload_len
- offset
) < L_LBM_SRS_RCV_INFO_INFO_T_RESERVED
)
1806 /*stop processing in case not available*/
1807 *can_dissect_further
= false;
1808 return (offset
- start_offset
);
1810 proto_tree_add_item(rir_tree
, hf_lbmsrs_rir_reserved
, tvb
, offset
, L_LBM_SRS_RCV_INFO_INFO_T_RESERVED
, ENC_BIG_ENDIAN
);
1811 offset
+= L_LBM_SRS_RCV_INFO_INFO_T_RESERVED
;
1813 proto_item_set_text(batch_item
, "RIR:Topic:%s", name
);
1816 proto_item_set_len(batch_item
, (offset
- start_offset
));
1817 return (offset
- start_offset
);
1821 static unsigned dissect_lbmsrs_rer(tvbuff_t
* tvb
, packet_info
* pinfo
, proto_tree
* tree
, unsigned offset
, unsigned *lcnt_rer
, bool *can_dissect_further
)
1823 unsigned total_payload_len
= tvb_captured_length(tvb
);
1824 unsigned start_offset
= offset
;
1826 /*first field is Topic length, check if that many bytes are left to process*/
1827 if ((total_payload_len
- offset
) < L_LBM_SRS_RCV_END_INFO_T_TOPIC_LEN
)
1829 /*stop processing in case not available*/
1830 *can_dissect_further
= false;
1834 /*add a sub-tree for RIR */
1835 proto_item
* batch_item
= proto_tree_add_none_format(tree
, hf_lbmsrs_rer
, tvb
, offset
, -1, "RER");
1836 proto_tree
*rer_tree
= proto_item_add_subtree(batch_item
, ett_lbmsrs_rer
);
1838 proto_tree_add_item(rer_tree
, hf_lbmsrs_message_id
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1841 /*first field is Topic length, check if that many bytes are left to process*/
1842 if ((total_payload_len
- offset
) < L_LBM_SRS_RCV_END_INFO_T_TOPIC_LEN
)
1844 /*stop processing in case not available*/
1845 *can_dissect_further
= false;
1846 return (offset
- start_offset
);
1849 uint8_t topic_len
= tvb_get_uint8(tvb
, offset
);
1850 proto_tree_add_item(rer_tree
, hf_lbmsrs_rer_topic_len
, tvb
, offset
, L_LBM_SRS_RCV_END_INFO_T_TOPIC_LEN
, ENC_BIG_ENDIAN
);
1852 offset
+= L_LBM_SRS_RCV_END_INFO_T_TOPIC_LEN
;
1854 if ((total_payload_len
- offset
) < topic_len
)
1856 /*stop processing in case not available*/
1857 *can_dissect_further
= false;
1858 return (offset
- start_offset
);
1861 char* name
= tvb_get_stringz_enc(pinfo
->pool
, tvb
, offset
, &len
, ENC_ASCII
);
1862 proto_tree_add_item(rer_tree
, hf_lbmsrs_rer_topic
, tvb
, offset
, topic_len
, ENC_ASCII
| ENC_NA
);
1863 offset
+= topic_len
;
1865 if ((total_payload_len
- offset
) < L_LBM_SRS_RCV_END_INFO_T_DOMAIN_ID
)
1867 /*stop processing in case not available*/
1868 *can_dissect_further
= false;
1869 return (offset
- start_offset
);
1871 proto_tree_add_item(rer_tree
, hf_lbmsrs_rer_domain_id
, tvb
, offset
, L_LBM_SRS_RCV_END_INFO_T_DOMAIN_ID
, ENC_BIG_ENDIAN
);
1872 offset
+= L_LBM_SRS_RCV_END_INFO_T_DOMAIN_ID
;
1874 if ((total_payload_len
- offset
) < L_LBM_SRS_RCV_END_INFO_T_CONTEXT_INSTANCE
)
1876 /*stop processing in case not available*/
1877 *can_dissect_further
= false;
1878 return (offset
- start_offset
);
1880 proto_tree_add_item(rer_tree
, hf_lbmsrs_rer_context_instance
, tvb
, offset
, L_LBM_SRS_RCV_END_INFO_T_CONTEXT_INSTANCE
, ENC_NA
);
1881 offset
+= L_LBM_SRS_RCV_END_INFO_T_CONTEXT_INSTANCE
;
1883 if ((total_payload_len
- offset
) < L_LBM_SRS_RCV_END_INFO_T_CONTEXT_TYPE
)
1885 /*stop processing in case not available*/
1886 *can_dissect_further
= false;
1887 return (offset
- start_offset
);
1889 proto_tree_add_item(rer_tree
, hf_lbmsrs_rer_context_type
, tvb
, offset
, L_LBM_SRS_RCV_END_INFO_T_CONTEXT_TYPE
, ENC_BIG_ENDIAN
);
1890 offset
+= L_LBM_SRS_RCV_END_INFO_T_CONTEXT_TYPE
;
1892 if ((total_payload_len
- offset
) < L_LBM_SRS_RCV_END_INFO_T_VERSION
)
1894 /*stop processing in case not available*/
1895 *can_dissect_further
= false;
1896 return (offset
- start_offset
);
1898 proto_tree_add_item(rer_tree
, hf_lbmsrs_rer_version
, tvb
, offset
, L_LBM_SRS_RCV_END_INFO_T_VERSION
, ENC_BIG_ENDIAN
);
1899 offset
+= L_LBM_SRS_RCV_END_INFO_T_VERSION
;
1901 if ((total_payload_len
- offset
) < L_LBM_SRS_RCV_END_INFO_T_VERSION_FLAGS
)
1903 /*stop processing in case not available*/
1904 *can_dissect_further
= false;
1905 return (offset
- start_offset
);
1907 proto_tree_add_item(rer_tree
, hf_lbmsrs_rer_version_flags
, tvb
, offset
, L_LBM_SRS_RCV_END_INFO_T_VERSION_FLAGS
, ENC_BIG_ENDIAN
);
1908 offset
+= L_LBM_SRS_RCV_END_INFO_T_VERSION_FLAGS
;
1911 if ((total_payload_len
- offset
) < L_LBM_SRS_RCV_END_INFO_T_RESERVED
)
1913 /*stop processing in case not available*/
1914 *can_dissect_further
= false;
1915 return (offset
- start_offset
);
1917 proto_tree_add_item(rer_tree
, hf_lbmsrs_rer_reserved
, tvb
, offset
, L_LBM_SRS_RCV_END_INFO_T_RESERVED
, ENC_BIG_ENDIAN
);
1918 offset
+= L_LBM_SRS_RCV_END_INFO_T_RESERVED
;
1920 proto_item_set_text(batch_item
, "RER:Topic:%s", name
);
1923 proto_item_set_len(batch_item
, (offset
- start_offset
));
1924 return (offset
- start_offset
);
1928 static unsigned dissect_lbmsrs_rdr(tvbuff_t
* tvb
, packet_info
* pinfo
, proto_tree
* tree
, unsigned offset
, unsigned *lcnt_rdr
, bool *can_dissect_further
)
1930 unsigned total_payload_len
= tvb_captured_length(tvb
);
1931 unsigned start_offset
= offset
;
1933 /*first field is Topic length, check if that many bytes are left to process*/
1934 if ((total_payload_len
- offset
) < L_LBM_SRS_RCV_DELETE_INFO_T_TOPIC_LEN
)
1936 /*stop processing in case not available*/
1937 *can_dissect_further
= false;
1941 /*add a sub-tree for RIR */
1942 proto_item
* batch_item
= proto_tree_add_none_format(tree
, hf_lbmsrs_rdr
, tvb
, offset
, -1, "RDR");
1943 proto_tree
*rdr_tree
= proto_item_add_subtree(batch_item
, ett_lbmsrs_rdr
);
1945 proto_tree_add_item(rdr_tree
, hf_lbmsrs_message_id
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1948 /*first field is Topic length, check if that many bytes are left to process*/
1949 if ((total_payload_len
- offset
) < L_LBM_SRS_RCV_DELETE_INFO_T_TOPIC_LEN
)
1951 /*stop processing in case not available*/
1952 *can_dissect_further
= false;
1953 return (offset
- start_offset
);
1956 uint8_t topic_len
= tvb_get_uint8(tvb
, offset
);
1957 proto_tree_add_item(rdr_tree
, hf_lbmsrs_rdr_topic_len
, tvb
, offset
, L_LBM_SRS_RCV_DELETE_INFO_T_TOPIC_LEN
, ENC_BIG_ENDIAN
);
1959 offset
+= L_LBM_SRS_RCV_DELETE_INFO_T_TOPIC_LEN
;
1961 if ((total_payload_len
- offset
) < topic_len
)
1963 /*stop processing in case not available*/
1964 *can_dissect_further
= false;
1965 return (offset
- start_offset
);
1968 char* name
= tvb_get_stringz_enc(pinfo
->pool
, tvb
, offset
, &len
, ENC_ASCII
);
1969 proto_tree_add_item(rdr_tree
, hf_lbmsrs_rdr_topic
, tvb
, offset
, topic_len
, ENC_ASCII
| ENC_NA
);
1970 offset
+= topic_len
;
1972 if ((total_payload_len
- offset
) < L_LBM_SRS_RCV_DELETE_INFO_T_DOMAIN_ID
)
1974 /*stop processing in case not available*/
1975 *can_dissect_further
= false;
1976 return (offset
- start_offset
);
1978 proto_tree_add_item(rdr_tree
, hf_lbmsrs_rdr_domain_id
, tvb
, offset
, L_LBM_SRS_RCV_DELETE_INFO_T_DOMAIN_ID
, ENC_BIG_ENDIAN
);
1979 offset
+= L_LBM_SRS_RCV_DELETE_INFO_T_DOMAIN_ID
;
1981 if ((total_payload_len
- offset
) < L_LBM_SRS_RCV_DELETE_INFO_T_CONTEXT_INSTANCE
)
1983 /*stop processing in case not available*/
1984 *can_dissect_further
= false;
1985 return (offset
- start_offset
);
1987 proto_tree_add_item(rdr_tree
, hf_lbmsrs_rdr_context_instance
, tvb
, offset
, L_LBM_SRS_RCV_DELETE_INFO_T_CONTEXT_INSTANCE
, ENC_NA
);
1988 offset
+= L_LBM_SRS_RCV_DELETE_INFO_T_CONTEXT_INSTANCE
;
1990 if ((total_payload_len
- offset
) < L_LBM_SRS_RCV_DELETE_INFO_T_CONTEXT_TYPE
)
1992 /*stop processing in case not available*/
1993 *can_dissect_further
= false;
1994 return (offset
- start_offset
);
1996 proto_tree_add_item(rdr_tree
, hf_lbmsrs_rdr_context_type
, tvb
, offset
, L_LBM_SRS_RCV_DELETE_INFO_T_CONTEXT_TYPE
, ENC_BIG_ENDIAN
);
1997 offset
+= L_LBM_SRS_RCV_DELETE_INFO_T_CONTEXT_TYPE
;
2000 if ((total_payload_len
- offset
) < L_LBM_SRS_RCV_DELETE_INFO_T_VERSION
)
2002 /*stop processing in case not available*/
2003 *can_dissect_further
= false;
2004 return (offset
- start_offset
);
2006 proto_tree_add_item(rdr_tree
, hf_lbmsrs_rdr_version
, tvb
, offset
, L_LBM_SRS_RCV_DELETE_INFO_T_VERSION
, ENC_BIG_ENDIAN
);
2007 offset
+= L_LBM_SRS_RCV_DELETE_INFO_T_VERSION
;
2009 if ((total_payload_len
- offset
) < L_LBM_SRS_RCV_DELETE_INFO_T_VERSION_FLAGS
)
2011 /*stop processing in case not available*/
2012 *can_dissect_further
= false;
2013 return (offset
- start_offset
);
2015 proto_tree_add_item(rdr_tree
, hf_lbmsrs_rdr_version_flags
, tvb
, offset
, L_LBM_SRS_RCV_DELETE_INFO_T_VERSION_FLAGS
, ENC_BIG_ENDIAN
);
2016 offset
+= L_LBM_SRS_RCV_INFO_INFO_T_VERSION_FLAGS
;
2018 if ((total_payload_len
- offset
) < L_LBM_SRS_RCV_DELETE_INFO_T_RESERVED
)
2020 /*stop processing in case not available*/
2021 *can_dissect_further
= false;
2022 return (offset
- start_offset
);
2024 proto_tree_add_item(rdr_tree
, hf_lbmsrs_rdr_reserved
, tvb
, offset
, L_LBM_SRS_RCV_DELETE_INFO_T_RESERVED
, ENC_BIG_ENDIAN
);
2025 offset
+= L_LBM_SRS_RCV_DELETE_INFO_T_RESERVED
;
2027 proto_item_set_text(batch_item
, "RDR:Topic:%s", name
);
2030 proto_item_set_len(batch_item
, (offset
- start_offset
));
2031 return (offset
- start_offset
);
2035 static unsigned dissect_lbmsrs_wir(tvbuff_t
* tvb
, packet_info
* pinfo
, proto_tree
* tree
, unsigned offset
, unsigned *lcnt_wir
, bool *can_dissect_further
)
2037 unsigned total_payload_len
= tvb_captured_length(tvb
);
2038 unsigned start_offset
= offset
;
2040 /*first field is Topic length, check if that many bytes are left to process*/
2041 if ((total_payload_len
- offset
) < L_LBM_SRS_WRCV_INFO_INFO_T_PATTERN_LEN
)
2043 /*stop processing in case not available*/
2044 *can_dissect_further
= false;
2048 /*add a sub-tree for RIR */
2049 proto_item
* batch_item
= proto_tree_add_none_format(tree
, hf_lbmsrs_wir
, tvb
, offset
, -1, "WIR");
2050 proto_tree
*wir_tree
= proto_item_add_subtree(batch_item
, ett_lbmsrs_wir
);
2052 proto_tree_add_item(wir_tree
, hf_lbmsrs_message_id
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2055 /*first field is Topic length, check if that many bytes are left to process*/
2056 if ((total_payload_len
- offset
) < L_LBM_SRS_WRCV_INFO_INFO_T_PATTERN_LEN
)
2058 /*stop processing in case not available*/
2059 *can_dissect_further
= false;
2060 return (offset
- start_offset
);
2063 uint8_t pattern_len
= tvb_get_uint8(tvb
, offset
);
2064 proto_tree_add_item(wir_tree
, hf_lbmsrs_wir_pattern_len
, tvb
, offset
, L_LBM_SRS_WRCV_INFO_INFO_T_PATTERN_LEN
, ENC_BIG_ENDIAN
);
2066 offset
+= L_LBM_SRS_WRCV_INFO_INFO_T_PATTERN_LEN
;
2068 if ((total_payload_len
- offset
) < pattern_len
)
2070 /*stop processing in case not available*/
2071 *can_dissect_further
= false;
2072 return (offset
- start_offset
);
2075 char* name
= tvb_get_stringz_enc(pinfo
->pool
, tvb
, offset
, &len
, ENC_ASCII
);
2076 proto_tree_add_item(wir_tree
, hf_lbmsrs_wir_pattern
, tvb
, offset
, pattern_len
, ENC_ASCII
| ENC_NA
);
2077 offset
+= pattern_len
;
2079 if ((total_payload_len
- offset
) < L_LBM_SRS_WRCV_INFO_INFO_T_DOMAIN_ID
)
2081 /*stop processing in case not available*/
2082 *can_dissect_further
= false;
2083 return (offset
- start_offset
);
2085 proto_tree_add_item(wir_tree
, hf_lbmsrs_wir_domain_id
, tvb
, offset
, L_LBM_SRS_WRCV_INFO_INFO_T_DOMAIN_ID
, ENC_BIG_ENDIAN
);
2086 offset
+= L_LBM_SRS_WRCV_INFO_INFO_T_DOMAIN_ID
;
2088 if ((total_payload_len
- offset
) < L_LBM_SRS_WRCV_INFO_INFO_T_CONTEXT_INSTANCE
)
2090 /*stop processing in case not available*/
2091 *can_dissect_further
= false;
2092 return (offset
- start_offset
);
2094 proto_tree_add_item(wir_tree
, hf_lbmsrs_wir_context_instance
, tvb
, offset
, L_LBM_SRS_WRCV_INFO_INFO_T_CONTEXT_INSTANCE
, ENC_NA
);
2095 offset
+= L_LBM_SRS_WRCV_INFO_INFO_T_CONTEXT_INSTANCE
;
2097 if ((total_payload_len
- offset
) < L_LBM_SRS_WRCV_INFO_INFO_T_CONTEXT_TYPE
)
2099 /*stop processing in case not available*/
2100 *can_dissect_further
= false;
2101 return (offset
- start_offset
);
2103 proto_tree_add_item(wir_tree
, hf_lbmsrs_wir_context_type
, tvb
, offset
, L_LBM_SRS_WRCV_INFO_INFO_T_CONTEXT_TYPE
, ENC_BIG_ENDIAN
);
2104 offset
+= L_LBM_SRS_WRCV_INFO_INFO_T_CONTEXT_TYPE
;
2107 if ((total_payload_len
- offset
) < L_LBM_SRS_WRCV_INFO_INFO_T_VERSION
)
2109 /*stop processing in case not available*/
2110 *can_dissect_further
= false;
2111 return (offset
- start_offset
);
2113 proto_tree_add_item(wir_tree
, hf_lbmsrs_wir_version
, tvb
, offset
, L_LBM_SRS_WRCV_INFO_INFO_T_VERSION
, ENC_BIG_ENDIAN
);
2114 offset
+= L_LBM_SRS_WRCV_INFO_INFO_T_VERSION
;
2116 if ((total_payload_len
- offset
) < L_LBM_SRS_WRCV_INFO_INFO_T_VERSION_FLAGS
)
2118 /*stop processing in case not available*/
2119 *can_dissect_further
= false;
2120 return (offset
- start_offset
);
2122 proto_tree_add_item(wir_tree
, hf_lbmsrs_wir_version_flags
, tvb
, offset
, L_LBM_SRS_WRCV_INFO_INFO_T_VERSION_FLAGS
, ENC_BIG_ENDIAN
);
2123 offset
+= L_LBM_SRS_WRCV_INFO_INFO_T_VERSION_FLAGS
;
2125 if ((total_payload_len
- offset
) < L_LBM_SRS_WRCV_INFO_INFO_T_RESERVED
)
2127 /*stop processing in case not available*/
2128 *can_dissect_further
= false;
2129 return (offset
- start_offset
);
2131 proto_tree_add_item(wir_tree
, hf_lbmsrs_wir_reserved
, tvb
, offset
, L_LBM_SRS_WRCV_INFO_INFO_T_RESERVED
, ENC_BIG_ENDIAN
);
2132 offset
+= L_LBM_SRS_WRCV_INFO_INFO_T_RESERVED
;
2134 proto_item_set_text(batch_item
, "WIR:Topic:%s", name
);
2137 proto_item_set_len(batch_item
, (offset
- start_offset
));
2138 return (offset
- start_offset
);
2142 static unsigned dissect_lbmsrs_wdr(tvbuff_t
* tvb
, packet_info
* pinfo
, proto_tree
* tree
, unsigned offset
, unsigned *lcnt_wdr
, bool *can_dissect_further
)
2144 unsigned total_payload_len
= tvb_captured_length(tvb
);
2145 unsigned start_offset
= offset
;
2147 /*first field is Topic length, check if that many bytes are left to process*/
2148 if ((total_payload_len
- offset
) < L_LBM_SRS_WRCV_DELETE_INFO_T_PATTERN_LEN
)
2150 /*stop processing in case not available*/
2151 *can_dissect_further
= false;
2155 /*add a sub-tree for RIR */
2156 proto_item
* batch_item
= proto_tree_add_none_format(tree
, hf_lbmsrs_wdr
, tvb
, offset
, -1, "WDR");
2157 proto_tree
*wdr_tree
= proto_item_add_subtree(batch_item
, ett_lbmsrs_wdr
);
2159 proto_tree_add_item(wdr_tree
, hf_lbmsrs_message_id
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2162 /*first field is Topic length, check if that many bytes are left to process*/
2163 if ((total_payload_len
- offset
) < L_LBM_SRS_WRCV_DELETE_INFO_T_PATTERN_LEN
)
2165 /*stop processing in case not available*/
2166 *can_dissect_further
= false;
2167 return (offset
- start_offset
);
2170 uint8_t pattern_len
= tvb_get_uint8(tvb
, offset
);
2171 proto_tree_add_item(wdr_tree
, hf_lbmsrs_wdr_pattern_len
, tvb
, offset
, L_LBM_SRS_WRCV_DELETE_INFO_T_PATTERN_LEN
, ENC_BIG_ENDIAN
);
2173 offset
+= L_LBM_SRS_WRCV_DELETE_INFO_T_PATTERN_LEN
;
2175 if ((total_payload_len
- offset
) < pattern_len
)
2177 /*stop processing in case not available*/
2178 *can_dissect_further
= false;
2179 return (offset
- start_offset
);
2182 char* name
= tvb_get_stringz_enc(pinfo
->pool
, tvb
, offset
, &len
, ENC_ASCII
);
2183 proto_tree_add_item(wdr_tree
, hf_lbmsrs_wdr_pattern
, tvb
, offset
, pattern_len
, ENC_ASCII
| ENC_NA
);
2184 offset
+= pattern_len
;
2186 if ((total_payload_len
- offset
) < L_LBM_SRS_WRCV_DELETE_INFO_T_DOMAIN_ID
)
2188 /*stop processing in case not available*/
2189 *can_dissect_further
= false;
2190 return (offset
- start_offset
);
2192 proto_tree_add_item(wdr_tree
, hf_lbmsrs_wdr_domain_id
, tvb
, offset
, L_LBM_SRS_WRCV_DELETE_INFO_T_DOMAIN_ID
, ENC_BIG_ENDIAN
);
2193 offset
+= L_LBM_SRS_WRCV_DELETE_INFO_T_DOMAIN_ID
;
2195 if ((total_payload_len
- offset
) < L_LBM_SRS_WRCV_DELETE_INFO_T_CONTEXT_INSTANCE
)
2197 /*stop processing in case not available*/
2198 *can_dissect_further
= false;
2199 return (offset
- start_offset
);
2201 proto_tree_add_item(wdr_tree
, hf_lbmsrs_wdr_context_instance
, tvb
, offset
, L_LBM_SRS_WRCV_DELETE_INFO_T_CONTEXT_INSTANCE
, ENC_NA
);
2202 offset
+= L_LBM_SRS_WRCV_DELETE_INFO_T_CONTEXT_INSTANCE
;
2204 if ((total_payload_len
- offset
) < L_LBM_SRS_WRCV_DELETE_INFO_T_CONTEXT_TYPE
)
2206 /*stop processing in case not available*/
2207 *can_dissect_further
= false;
2208 return (offset
- start_offset
);
2210 proto_tree_add_item(wdr_tree
, hf_lbmsrs_wdr_context_type
, tvb
, offset
, L_LBM_SRS_WRCV_DELETE_INFO_T_CONTEXT_TYPE
, ENC_BIG_ENDIAN
);
2211 offset
+= L_LBM_SRS_WRCV_DELETE_INFO_T_CONTEXT_TYPE
;
2214 if ((total_payload_len
- offset
) < L_LBM_SRS_WRCV_DELETE_INFO_T_VERSION
)
2216 /*stop processing in case not available*/
2217 *can_dissect_further
= false;
2218 return (offset
- start_offset
);
2220 proto_tree_add_item(wdr_tree
, hf_lbmsrs_wdr_version
, tvb
, offset
, L_LBM_SRS_WRCV_DELETE_INFO_T_VERSION
, ENC_BIG_ENDIAN
);
2221 offset
+= L_LBM_SRS_WRCV_DELETE_INFO_T_VERSION
;
2223 if ((total_payload_len
- offset
) < L_LBM_SRS_WRCV_DELETE_INFO_T_VERSION_FLAGS
)
2225 /*stop processing in case not available*/
2226 *can_dissect_further
= false;
2227 return (offset
- start_offset
);
2229 proto_tree_add_item(wdr_tree
, hf_lbmsrs_wdr_version_flags
, tvb
, offset
, L_LBM_SRS_WRCV_DELETE_INFO_T_VERSION_FLAGS
, ENC_BIG_ENDIAN
);
2230 offset
+= L_LBM_SRS_WRCV_DELETE_INFO_T_VERSION_FLAGS
;
2232 if ((total_payload_len
- offset
) < L_LBM_SRS_WRCV_DELETE_INFO_T_RESERVED
)
2234 /*stop processing in case not available*/
2235 *can_dissect_further
= false;
2236 return (offset
- start_offset
);
2238 proto_tree_add_item(wdr_tree
, hf_lbmsrs_wdr_reserved
, tvb
, offset
, L_LBM_SRS_WRCV_DELETE_INFO_T_RESERVED
, ENC_BIG_ENDIAN
);
2239 offset
+= L_LBM_SRS_WRCV_DELETE_INFO_T_RESERVED
;
2241 proto_item_set_text(batch_item
, "WDR:Topic:%s", name
);
2244 proto_item_set_len(batch_item
, (offset
- start_offset
));
2245 return (offset
- start_offset
);
2249 static unsigned dissect_lbmsrs_wer(tvbuff_t
* tvb
, packet_info
* pinfo
, proto_tree
* tree
, unsigned offset
, unsigned *lcnt_wer
, bool *can_dissect_further
)
2251 unsigned total_payload_len
= tvb_captured_length(tvb
);
2252 int start_offset
= offset
;
2254 /*first field is Topic length, check if that many bytes are left to process*/
2255 if ((total_payload_len
- offset
) < L_LBM_SRS_WRCV_END_INFO_T_PATTERN_LEN
)
2257 /*stop processing in case not available*/
2258 *can_dissect_further
= false;
2262 /*add a sub-tree for WER */
2263 proto_item
* batch_item
= proto_tree_add_none_format(tree
, hf_lbmsrs_wer
, tvb
, offset
, -1, "WER");
2264 proto_tree
*wer_tree
= proto_item_add_subtree(batch_item
, ett_lbmsrs_wer
);
2266 proto_tree_add_item(wer_tree
, hf_lbmsrs_message_id
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2269 /*first field is Topic length, check if that many bytes are left to process*/
2270 if ((total_payload_len
- offset
) < L_LBM_SRS_WRCV_END_INFO_T_PATTERN_LEN
)
2272 /*stop processing in case not available*/
2273 *can_dissect_further
= false;
2274 return (offset
- start_offset
);
2277 uint8_t pattern_len
= tvb_get_uint8(tvb
, offset
);
2278 proto_tree_add_item(wer_tree
, hf_lbmsrs_wer_pattern_len
, tvb
, offset
, L_LBM_SRS_WRCV_END_INFO_T_PATTERN_LEN
, ENC_BIG_ENDIAN
);
2280 offset
+= L_LBM_SRS_WRCV_END_INFO_T_PATTERN_LEN
;
2282 if ((total_payload_len
- offset
) < pattern_len
)
2284 /*stop processing in case not available*/
2285 *can_dissect_further
= false;
2286 return (offset
- start_offset
);
2289 char* name
= tvb_get_stringz_enc(pinfo
->pool
, tvb
, offset
, &len
, ENC_ASCII
);
2290 proto_tree_add_item(wer_tree
, hf_lbmsrs_wer_pattern
, tvb
, offset
, pattern_len
, ENC_ASCII
| ENC_NA
);
2291 offset
+= pattern_len
;
2293 if ((total_payload_len
- offset
) < L_LBM_SRS_WRCV_END_INFO_T_DOMAIN_ID
)
2295 /*stop processing in case not available*/
2296 *can_dissect_further
= false;
2297 return (offset
- start_offset
);
2299 proto_tree_add_item(wer_tree
, hf_lbmsrs_wer_domain_id
, tvb
, offset
, L_LBM_SRS_WRCV_END_INFO_T_DOMAIN_ID
, ENC_BIG_ENDIAN
);
2300 offset
+= L_LBM_SRS_WRCV_END_INFO_T_DOMAIN_ID
;
2302 if ((total_payload_len
- offset
) < L_LBM_SRS_WRCV_END_INFO_T_CONTEXT_INSTANCE
)
2304 /*stop processing in case not available*/
2305 *can_dissect_further
= false;
2306 return (offset
- start_offset
);
2308 proto_tree_add_item(wer_tree
, hf_lbmsrs_wer_context_instance
, tvb
, offset
, L_LBM_SRS_WRCV_END_INFO_T_CONTEXT_INSTANCE
, ENC_NA
);
2309 offset
+= L_LBM_SRS_WRCV_END_INFO_T_CONTEXT_INSTANCE
;
2311 if ((total_payload_len
- offset
) < L_LBM_SRS_WRCV_END_INFO_T_CONTEXT_TYPE
)
2313 /*stop processing in case not available*/
2314 *can_dissect_further
= false;
2315 return (offset
- start_offset
);
2317 proto_tree_add_item(wer_tree
, hf_lbmsrs_wer_context_type
, tvb
, offset
, L_LBM_SRS_WRCV_END_INFO_T_CONTEXT_TYPE
, ENC_BIG_ENDIAN
);
2318 offset
+= L_LBM_SRS_WRCV_END_INFO_T_CONTEXT_TYPE
;
2320 if ((total_payload_len
- offset
) < L_LBM_SRS_WRCV_END_INFO_T_VERSION
)
2322 /*stop processing in case not available*/
2323 *can_dissect_further
= false;
2324 return (offset
- start_offset
);
2326 proto_tree_add_item(wer_tree
, hf_lbmsrs_wer_version
, tvb
, offset
, L_LBM_SRS_WRCV_END_INFO_T_VERSION
, ENC_BIG_ENDIAN
);
2327 offset
+= L_LBM_SRS_WRCV_END_INFO_T_VERSION
;
2329 if ((total_payload_len
- offset
) < L_LBM_SRS_WRCV_END_INFO_T_VERSION_FLAGS
)
2331 /*stop processing in case not available*/
2332 *can_dissect_further
= false;
2333 return (offset
- start_offset
);
2335 proto_tree_add_item(wer_tree
, hf_lbmsrs_wer_version_flags
, tvb
, offset
, L_LBM_SRS_WRCV_END_INFO_T_VERSION_FLAGS
, ENC_BIG_ENDIAN
);
2336 offset
+= L_LBM_SRS_WRCV_END_INFO_T_VERSION_FLAGS
;
2338 if ((total_payload_len
- offset
) < L_LBM_SRS_WRCV_END_INFO_T_RESERVED
)
2340 /*stop processing in case not available*/
2341 *can_dissect_further
= false;
2342 return (offset
- start_offset
);
2344 proto_tree_add_item(wer_tree
, hf_lbmsrs_wer_reserved
, tvb
, offset
, L_LBM_SRS_WRCV_END_INFO_T_RESERVED
, ENC_BIG_ENDIAN
);
2345 offset
+= L_LBM_SRS_WRCV_END_INFO_T_RESERVED
;
2347 proto_item_set_text(batch_item
, "WER:Topic:%s", name
);
2350 proto_item_set_len(batch_item
, (offset
- start_offset
));
2351 return (offset
- start_offset
);
2355 static unsigned dissect_lbmsrs_sli(tvbuff_t
* tvb
, packet_info
* pinfo
, proto_tree
* tree
, unsigned offset
, unsigned *lcnt_sli
, bool *can_dissect_further
)
2357 unsigned total_payload_len
= tvb_captured_length(tvb
);
2358 unsigned start_offset
= offset
;
2360 /*first field is OTID, check if that many bytes are left to process*/
2361 if ((total_payload_len
- offset
) < L_LBM_SRS_SRC_LEAVE_INFO_T_OTID
)
2363 /*stop processing in case not available*/
2364 *can_dissect_further
= false;
2368 proto_item
*batch_item
= NULL
;
2370 batch_item
= proto_tree_add_none_format(tree
, hf_lbmsrs_sli
, tvb
, offset
, -1, "SLI");
2371 proto_tree
*sli_tree
= proto_item_add_subtree(batch_item
, ett_lbmsrs_sli
);
2373 proto_tree_add_item(sli_tree
, hf_lbmsrs_message_id
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2376 proto_tree_add_item(sli_tree
, hf_lbmsrs_sli_otid
, tvb
, offset
, L_LBM_SRS_SRC_LEAVE_INFO_T_OTID
, ENC_NA
);
2377 offset
+= L_LBM_SRS_SRC_LEAVE_INFO_T_OTID
;
2379 if ((total_payload_len
- offset
) < L_LBM_SRS_SRC_LEAVE_INFO_T_TOPIC_LEN
)
2381 /*stop processing in case not available*/
2382 *can_dissect_further
= false;
2383 return (offset
- start_offset
);
2385 uint8_t topic_len
= tvb_get_uint8(tvb
, offset
);
2386 proto_tree_add_item(sli_tree
, hf_lbmsrs_sli_topic_len
, tvb
, offset
, L_LBM_SRS_SRC_LEAVE_INFO_T_TOPIC_LEN
, ENC_BIG_ENDIAN
);
2387 offset
+= L_LBM_SRS_SRC_LEAVE_INFO_T_TOPIC_LEN
;
2389 if ((total_payload_len
- offset
) < topic_len
)
2391 /*stop processing in case not available*/
2392 *can_dissect_further
= false;
2393 return (offset
- start_offset
);
2396 char* name
= tvb_get_stringz_enc(pinfo
->pool
, tvb
, offset
, &len
, ENC_ASCII
);
2397 proto_tree_add_item(sli_tree
, hf_lbmsrs_sli_topic
, tvb
, offset
, topic_len
, ENC_ASCII
| ENC_NA
);
2398 offset
+= topic_len
;
2400 if ((total_payload_len
- offset
) < L_LBM_SRS_SRC_LEAVE_INFO_T_SOURCE_LEN
)
2402 /*stop processing in case not available*/
2403 *can_dissect_further
= false;
2404 return (offset
- start_offset
);
2406 uint8_t source_len
= tvb_get_uint8(tvb
, offset
);
2407 proto_tree_add_item(sli_tree
, hf_lbmsrs_sli_source_len
, tvb
, offset
, L_LBM_SRS_SRC_LEAVE_INFO_T_SOURCE_LEN
, ENC_BIG_ENDIAN
);
2408 offset
+= L_LBM_SRS_SRC_LEAVE_INFO_T_SOURCE_LEN
;
2410 if ((total_payload_len
- offset
) < source_len
)
2412 /*stop processing in case not available*/
2413 *can_dissect_further
= false;
2414 return (offset
- start_offset
);
2416 proto_tree_add_item(sli_tree
, hf_lbmsrs_sli_source
, tvb
, offset
, source_len
, ENC_ASCII
| ENC_NA
);
2417 offset
+= source_len
;
2419 if ((total_payload_len
- offset
) < L_LBM_SRS_SRC_LEAVE_INFO_T_CONTEXT_INSTANCE
)
2421 /*stop processing in case not available*/
2422 *can_dissect_further
= false;
2423 return (offset
- start_offset
);
2425 proto_tree_add_item(sli_tree
, hf_lbmsrs_sli_context_instance
, tvb
, offset
, L_LBM_SRS_SRC_LEAVE_INFO_T_CONTEXT_INSTANCE
, ENC_NA
);
2426 offset
+= L_LBM_SRS_SRC_LEAVE_INFO_T_CONTEXT_INSTANCE
;
2428 if ((total_payload_len
- offset
) < L_LBM_SRS_SRC_LEAVE_INFO_T_CONTEXT_TYPE
)
2430 /*stop processing in case not available*/
2431 *can_dissect_further
= false;
2432 return (offset
- start_offset
);
2434 proto_tree_add_item(sli_tree
, hf_lbmsrs_sli_context_type
, tvb
, offset
, L_LBM_SRS_SRC_LEAVE_INFO_T_CONTEXT_TYPE
, ENC_BIG_ENDIAN
);
2435 offset
+= L_LBM_SRS_SRC_LEAVE_INFO_T_CONTEXT_TYPE
;
2438 if ((total_payload_len
- offset
) < L_LBM_SRS_SRC_LEAVE_INFO_T_VERSION
)
2440 /*stop processing in case not available*/
2441 *can_dissect_further
= false;
2442 return (offset
- start_offset
);
2444 proto_tree_add_item(sli_tree
, hf_lbmsrs_sli_version
, tvb
, offset
, L_LBM_SRS_SRC_LEAVE_INFO_T_VERSION
, ENC_BIG_ENDIAN
);
2445 offset
+= L_LBM_SRS_SRC_LEAVE_INFO_T_VERSION
;
2447 if ((total_payload_len
- offset
) < L_LBM_SRS_SRC_LEAVE_INFO_T_VERSION_FLAGS
)
2449 /*stop processing in case not available*/
2450 *can_dissect_further
= false;
2451 return (offset
- start_offset
);
2453 proto_tree_add_item(sli_tree
, hf_lbmsrs_sli_version_flags
, tvb
, offset
, L_LBM_SRS_SRC_LEAVE_INFO_T_VERSION_FLAGS
, ENC_BIG_ENDIAN
);
2454 offset
+= L_LBM_SRS_SRC_LEAVE_INFO_T_VERSION_FLAGS
;
2457 if ((total_payload_len
- offset
) < L_LBM_SRS_SRC_LEAVE_INFO_T_RESERVED
)
2459 /*stop processing in case not available*/
2460 *can_dissect_further
= false;
2461 return (offset
- start_offset
);
2463 proto_tree_add_item(sli_tree
, hf_lbmsrs_sli_reserved
, tvb
, offset
, L_LBM_SRS_SRC_LEAVE_INFO_T_RESERVED
, ENC_BIG_ENDIAN
);
2464 offset
+= L_LBM_SRS_SRC_LEAVE_INFO_T_RESERVED
;
2466 proto_item_set_text(batch_item
, "SLI:Topic:%s", name
);
2469 proto_item_set_len(batch_item
, (offset
- start_offset
));
2470 return (offset
- start_offset
);
2473 static unsigned dissect_lbmsrs_rti(tvbuff_t
* tvb
, proto_tree
* tree
, unsigned offset
, unsigned *lcnt_rti
, bool *can_dissect_further
)
2475 unsigned total_payload_len
= tvb_captured_length(tvb
);
2476 unsigned start_offset
= offset
;
2478 if ((total_payload_len
- offset
) < L_LBM_SRS_ROUTE_INFO_T_NUM_DOMAINS
)
2480 /*stop processing in case not available*/
2481 *can_dissect_further
= FALSE
;
2485 proto_item
*batch_item
= NULL
;
2487 batch_item
= proto_tree_add_none_format(tree
, hf_lbmsrs_rti
, tvb
, offset
, -1, "RTI");
2488 proto_tree
*rti_tree
= proto_item_add_subtree(batch_item
, ett_lbmsrs_rti
);
2490 proto_tree_add_item(rti_tree
, hf_lbmsrs_message_id
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2493 uint16_t num_domains
= tvb_get_uint16(tvb
, offset
, ENC_BIG_ENDIAN
);
2494 proto_tree_add_item(rti_tree
, hf_lbmsrs_rti_num_domains
, tvb
, offset
, L_LBM_SRS_ROUTE_INFO_T_NUM_DOMAINS
, ENC_BIG_ENDIAN
);
2495 offset
+= L_LBM_SRS_ROUTE_INFO_T_NUM_DOMAINS
;
2497 /*size of each domain is uint32, calculate total size*/
2498 uint32_t all_domain_size
= sizeof(lbm_uint32_t
) * num_domains
;
2500 if ((total_payload_len
- offset
) < all_domain_size
)
2502 /*stop processing in case not available*/
2503 *can_dissect_further
= FALSE
;
2504 return (offset
- start_offset
);
2507 /*create a domain tree as a sub-tree*/
2508 if (num_domains
> 0)
2510 proto_item
*domains
= proto_tree_add_none_format(rti_tree
, hf_lbmsrs_rti_domains
, tvb
, offset
, -1, "Domains:");
2511 proto_tree
*domains_tree
= proto_item_add_subtree(domains
, ett_lbmsrs_rti_domains
);
2512 /*add all the domains in the domain tree*/
2513 for (uint16_t idx
= 0; idx
< num_domains
; idx
++)
2515 proto_tree_add_item(domains_tree
, hf_lbmsrs_rti_domain
, tvb
, offset
, sizeof(lbm_uint32_t
), ENC_BIG_ENDIAN
);
2516 offset
+= sizeof(lbm_uint32_t
);
2519 proto_item_set_len(domains
, all_domain_size
);
2522 if ((total_payload_len
- offset
) < L_LBM_SRS_ROUTE_INFO_T_IP
)
2524 /*stop processing in case not available*/
2525 *can_dissect_further
= FALSE
;
2526 return (offset
- start_offset
);
2529 proto_tree_add_item(rti_tree
, hf_lbmsrs_rti_ip
, tvb
, offset
, L_LBM_SRS_ROUTE_INFO_T_IP
, ENC_BIG_ENDIAN
);
2530 offset
+= L_LBM_SRS_ROUTE_INFO_T_IP
;
2532 if ((total_payload_len
- offset
) < L_LBM_SRS_ROUTE_INFO_T_PORT
)
2534 /*stop processing in case not available*/
2535 *can_dissect_further
= FALSE
;
2536 return (offset
- start_offset
);
2539 proto_tree_add_item(rti_tree
, hf_lbmsrs_rti_port
, tvb
, offset
, L_LBM_SRS_ROUTE_INFO_T_PORT
, ENC_BIG_ENDIAN
);
2540 offset
+= L_LBM_SRS_ROUTE_INFO_T_PORT
;
2542 if ((total_payload_len
- offset
) < L_LBM_SRS_ROUTE_INFO_T_CONTEXT_INSTANCE
)
2544 /*stop processing in case not available*/
2545 *can_dissect_further
= FALSE
;
2546 return (offset
- start_offset
);
2548 proto_tree_add_item(rti_tree
, hf_lbmsrs_rti_context_instance
, tvb
, offset
, L_LBM_SRS_ROUTE_INFO_T_CONTEXT_INSTANCE
, ENC_NA
);
2549 offset
+= L_LBM_SRS_ROUTE_INFO_T_CONTEXT_INSTANCE
;
2551 if ((total_payload_len
- offset
) < L_LBM_SRS_ROUTE_INFO_T_CONTEXT_TYPE
)
2553 /*stop processing in case not available*/
2554 *can_dissect_further
= FALSE
;
2555 return (offset
- start_offset
);
2557 proto_tree_add_item(rti_tree
, hf_lbmsrs_rti_context_type
, tvb
, offset
, L_LBM_SRS_ROUTE_INFO_T_CONTEXT_TYPE
, ENC_BIG_ENDIAN
);
2558 offset
+= L_LBM_SRS_ROUTE_INFO_T_CONTEXT_TYPE
;
2561 if ((total_payload_len
- offset
) < L_LBM_SRS_ROUTE_INFO_T_VERSION
)
2563 /*stop processing in case not available*/
2564 *can_dissect_further
= FALSE
;
2565 return (offset
- start_offset
);
2567 proto_tree_add_item(rti_tree
, hf_lbmsrs_rti_version
, tvb
, offset
, L_LBM_SRS_ROUTE_INFO_T_VERSION
, ENC_BIG_ENDIAN
);
2568 offset
+= L_LBM_SRS_ROUTE_INFO_T_VERSION
;
2570 if ((total_payload_len
- offset
) < L_LBM_SRS_ROUTE_INFO_T_VERSION_FLAGS
)
2572 /*stop processing in case not available*/
2573 *can_dissect_further
= FALSE
;
2574 return (offset
- start_offset
);
2576 proto_tree_add_item(rti_tree
, hf_lbmsrs_rti_version_flags
, tvb
, offset
, L_LBM_SRS_ROUTE_INFO_T_VERSION_FLAGS
, ENC_BIG_ENDIAN
);
2577 offset
+= L_LBM_SRS_ROUTE_INFO_T_VERSION_FLAGS
;
2580 if ((total_payload_len
- offset
) < L_LBM_SRS_ROUTE_INFO_T_ROUTE_INDEX
)
2582 /*stop processing in case not available*/
2583 *can_dissect_further
= FALSE
;
2584 return (offset
- start_offset
);
2586 proto_tree_add_item(rti_tree
, hf_lbmsrs_rti_route_index
, tvb
, offset
, L_LBM_SRS_ROUTE_INFO_T_ROUTE_INDEX
, ENC_BIG_ENDIAN
);
2587 offset
+= L_LBM_SRS_ROUTE_INFO_T_ROUTE_INDEX
;
2589 if ((total_payload_len
- offset
) < L_LBM_SRS_ROUTE_INFO_T_RESERVED
)
2591 /*stop processing in case not available*/
2592 *can_dissect_further
= FALSE
;
2593 return (offset
- start_offset
);
2595 proto_tree_add_item(rti_tree
, hf_lbmsrs_rti_reserved
, tvb
, offset
, L_LBM_SRS_ROUTE_INFO_T_RESERVED
, ENC_BIG_ENDIAN
);
2596 offset
+= L_LBM_SRS_ROUTE_INFO_T_RESERVED
;
2600 proto_item_set_len(batch_item
, (offset
- start_offset
));
2601 return (offset
- start_offset
);
2604 static unsigned dissect_lbmsrs_rte(tvbuff_t
* tvb
, proto_tree
* tree
, unsigned offset
, unsigned *lcnt_rte
, bool *can_dissect_further
)
2606 unsigned total_payload_len
= tvb_captured_length(tvb
);
2607 unsigned start_offset
= offset
;
2609 if ((total_payload_len
- offset
) < L_LBM_SRS_ROUTE_END_T_NUM_DOMAINS
)
2611 /*stop processing in case not available*/
2612 *can_dissect_further
= FALSE
;
2616 proto_item
*batch_item
= NULL
;
2618 batch_item
= proto_tree_add_none_format(tree
, hf_lbmsrs_rte
, tvb
, offset
, -1, "RTE");
2619 proto_tree
*rte_tree
= proto_item_add_subtree(batch_item
, ett_lbmsrs_rte
);
2621 proto_tree_add_item(rte_tree
, hf_lbmsrs_message_id
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2624 uint16_t num_domains
= tvb_get_uint16(tvb
, offset
, ENC_BIG_ENDIAN
);
2625 proto_tree_add_item(rte_tree
, hf_lbmsrs_rte_num_domains
, tvb
, offset
, L_LBM_SRS_ROUTE_END_T_NUM_DOMAINS
, ENC_BIG_ENDIAN
);
2626 offset
+= L_LBM_SRS_ROUTE_END_T_NUM_DOMAINS
;
2628 /*size of each domain is uint32, calculate total size*/
2629 uint32_t all_domain_size
= sizeof(lbm_uint32_t
) * num_domains
;
2631 if ((total_payload_len
- offset
) < all_domain_size
)
2633 /*stop processing in case not available*/
2634 *can_dissect_further
= FALSE
;
2635 return (offset
- start_offset
);
2638 /*create a domain tree as a sub-tree*/
2639 if (num_domains
> 0)
2641 proto_item
*domains
= proto_tree_add_none_format(rte_tree
, hf_lbmsrs_rte_domains
, tvb
, offset
, -1, "Domains:");
2642 proto_tree
*domains_tree
= proto_item_add_subtree(domains
, ett_lbmsrs_rte_domains
);
2643 /*add all the domains in the domain tree*/
2644 for (uint16_t idx
= 0; idx
< num_domains
; idx
++)
2646 proto_tree_add_item(domains_tree
, hf_lbmsrs_rte_domain
, tvb
, offset
, sizeof(lbm_uint32_t
), ENC_BIG_ENDIAN
);
2647 offset
+= sizeof(lbm_uint32_t
);
2650 proto_item_set_len(domains
, all_domain_size
);
2653 if ((total_payload_len
- offset
) < L_LBM_SRS_ROUTE_END_T_IP
)
2655 /*stop processing in case not available*/
2656 *can_dissect_further
= FALSE
;
2657 return (offset
- start_offset
);
2660 proto_tree_add_item(rte_tree
, hf_lbmsrs_rte_ip
, tvb
, offset
, L_LBM_SRS_ROUTE_END_T_IP
, ENC_BIG_ENDIAN
);
2661 offset
+= L_LBM_SRS_ROUTE_END_T_IP
;
2663 if ((total_payload_len
- offset
) < L_LBM_SRS_ROUTE_END_T_PORT
)
2665 /*stop processing in case not available*/
2666 *can_dissect_further
= FALSE
;
2667 return (offset
- start_offset
);
2670 proto_tree_add_item(rte_tree
, hf_lbmsrs_rte_port
, tvb
, offset
, L_LBM_SRS_ROUTE_END_T_PORT
, ENC_BIG_ENDIAN
);
2671 offset
+= L_LBM_SRS_ROUTE_END_T_PORT
;
2673 if ((total_payload_len
- offset
) < L_LBM_SRS_ROUTE_END_T_CONTEXT_INSTANCE
)
2675 /*stop processing in case not available*/
2676 *can_dissect_further
= FALSE
;
2677 return (offset
- start_offset
);
2679 proto_tree_add_item(rte_tree
, hf_lbmsrs_rte_context_instance
, tvb
, offset
, L_LBM_SRS_ROUTE_END_T_CONTEXT_INSTANCE
, ENC_NA
);
2680 offset
+= L_LBM_SRS_ROUTE_END_T_CONTEXT_INSTANCE
;
2682 if ((total_payload_len
- offset
) < L_LBM_SRS_ROUTE_END_T_CONTEXT_TYPE
)
2684 /*stop processing in case not available*/
2685 *can_dissect_further
= FALSE
;
2686 return (offset
- start_offset
);
2688 proto_tree_add_item(rte_tree
, hf_lbmsrs_rte_context_type
, tvb
, offset
, L_LBM_SRS_ROUTE_END_T_CONTEXT_TYPE
, ENC_BIG_ENDIAN
);
2689 offset
+= L_LBM_SRS_ROUTE_END_T_CONTEXT_TYPE
;
2692 if ((total_payload_len
- offset
) < L_LBM_SRS_ROUTE_END_T_VERSION
)
2694 /*stop processing in case not available*/
2695 *can_dissect_further
= FALSE
;
2696 return (offset
- start_offset
);
2698 proto_tree_add_item(rte_tree
, hf_lbmsrs_rte_version
, tvb
, offset
, L_LBM_SRS_ROUTE_END_T_VERSION
, ENC_BIG_ENDIAN
);
2699 offset
+= L_LBM_SRS_ROUTE_END_T_VERSION
;
2701 if ((total_payload_len
- offset
) < L_LBM_SRS_ROUTE_END_T_VERSION_FLAGS
)
2703 /*stop processing in case not available*/
2704 *can_dissect_further
= FALSE
;
2705 return (offset
- start_offset
);
2707 proto_tree_add_item(rte_tree
, hf_lbmsrs_rte_version_flags
, tvb
, offset
, L_LBM_SRS_ROUTE_END_T_VERSION_FLAGS
, ENC_BIG_ENDIAN
);
2708 offset
+= L_LBM_SRS_ROUTE_END_T_VERSION_FLAGS
;
2711 if ((total_payload_len
- offset
) < L_LBM_SRS_ROUTE_END_T_ROUTE_INDEX
)
2713 /*stop processing in case not available*/
2714 *can_dissect_further
= FALSE
;
2715 return (offset
- start_offset
);
2717 proto_tree_add_item(rte_tree
, hf_lbmsrs_rte_route_index
, tvb
, offset
, L_LBM_SRS_ROUTE_END_T_ROUTE_INDEX
, ENC_BIG_ENDIAN
);
2718 offset
+= L_LBM_SRS_ROUTE_END_T_ROUTE_INDEX
;
2720 if ((total_payload_len
- offset
) < L_LBM_SRS_ROUTE_END_T_RESERVED
)
2722 /*stop processing in case not available*/
2723 *can_dissect_further
= FALSE
;
2724 return (offset
- start_offset
);
2726 proto_tree_add_item(rte_tree
, hf_lbmsrs_rte_reserved
, tvb
, offset
, L_LBM_SRS_ROUTE_END_T_RESERVED
, ENC_BIG_ENDIAN
);
2727 offset
+= L_LBM_SRS_ROUTE_END_T_RESERVED
;
2731 proto_item_set_len(batch_item
, (offset
- start_offset
));
2732 return (offset
- start_offset
);
2735 static unsigned dissect_lbmsrs_dmi(tvbuff_t
* tvb
, proto_tree
* tree
, unsigned offset
, unsigned *lcnt_dmi
, bool *can_dissect_further
)
2737 unsigned total_payload_len
= tvb_captured_length(tvb
);
2738 unsigned start_offset
= offset
;
2740 if ((total_payload_len
- offset
) < L_LBM_SRS_DOMAIN_INFO_T_DOMAIN_ID
)
2742 /*stop processing in case not available*/
2743 *can_dissect_further
= FALSE
;
2747 proto_item
*batch_item
= NULL
;
2749 batch_item
= proto_tree_add_none_format(tree
, hf_lbmsrs_dmi
, tvb
, offset
, -1, "DMI");
2750 proto_tree
*dmi_tree
= proto_item_add_subtree(batch_item
, ett_lbmsrs_dmi
);
2752 proto_tree_add_item(dmi_tree
, hf_lbmsrs_message_id
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2755 proto_tree_add_item(dmi_tree
, hf_lbmsrs_dmi_domain_id
, tvb
, offset
, L_LBM_SRS_DOMAIN_INFO_T_DOMAIN_ID
, ENC_BIG_ENDIAN
);
2756 offset
+= L_LBM_SRS_DOMAIN_INFO_T_DOMAIN_ID
;
2758 if ((total_payload_len
- offset
) < L_LBM_SRS_DOMAIN_INFO_T_CONTEXT_INSTANCE
)
2760 /*stop processing in case not available*/
2761 *can_dissect_further
= FALSE
;
2762 return (offset
- start_offset
);
2764 proto_tree_add_item(dmi_tree
, hf_lbmsrs_dmi_context_instance
, tvb
, offset
, L_LBM_SRS_DOMAIN_INFO_T_CONTEXT_INSTANCE
, ENC_NA
);
2765 offset
+= L_LBM_SRS_DOMAIN_INFO_T_CONTEXT_INSTANCE
;
2767 if ((total_payload_len
- offset
) < L_LBM_SRS_DOMAIN_INFO_T_CONTEXT_TYPE
)
2769 /*stop processing in case not available*/
2770 *can_dissect_further
= FALSE
;
2771 return (offset
- start_offset
);
2773 proto_tree_add_item(dmi_tree
, hf_lbmsrs_dmi_context_type
, tvb
, offset
, L_LBM_SRS_DOMAIN_INFO_T_CONTEXT_TYPE
, ENC_BIG_ENDIAN
);
2774 offset
+= L_LBM_SRS_DOMAIN_INFO_T_CONTEXT_TYPE
;
2777 if ((total_payload_len
- offset
) < L_LBM_SRS_DOMAIN_INFO_T_VERSION
)
2779 /*stop processing in case not available*/
2780 *can_dissect_further
= FALSE
;
2781 return (offset
- start_offset
);
2783 proto_tree_add_item(dmi_tree
, hf_lbmsrs_dmi_version
, tvb
, offset
, L_LBM_SRS_DOMAIN_INFO_T_VERSION
, ENC_BIG_ENDIAN
);
2784 offset
+= L_LBM_SRS_DOMAIN_INFO_T_VERSION
;
2786 if ((total_payload_len
- offset
) < L_LBM_SRS_DOMAIN_INFO_T_VERSION_FLAGS
)
2788 /*stop processing in case not available*/
2789 *can_dissect_further
= FALSE
;
2790 return (offset
- start_offset
);
2792 proto_tree_add_item(dmi_tree
, hf_lbmsrs_dmi_version_flags
, tvb
, offset
, L_LBM_SRS_DOMAIN_INFO_T_VERSION_FLAGS
, ENC_BIG_ENDIAN
);
2793 offset
+= L_LBM_SRS_DOMAIN_INFO_T_VERSION_FLAGS
;
2796 if ((total_payload_len
- offset
) < L_LBM_SRS_DOMAIN_INFO_T_RESERVED
)
2798 /*stop processing in case not available*/
2799 *can_dissect_further
= FALSE
;
2800 return (offset
- start_offset
);
2802 proto_tree_add_item(dmi_tree
, hf_lbmsrs_dmi_reserved
, tvb
, offset
, L_LBM_SRS_DOMAIN_INFO_T_RESERVED
, ENC_BIG_ENDIAN
);
2803 offset
+= L_LBM_SRS_DOMAIN_INFO_T_RESERVED
;
2807 proto_item_set_len(batch_item
, (offset
- start_offset
));
2809 return (offset
- start_offset
);
2812 static unsigned dissect_lbmsrs_cnq(tvbuff_t
* tvb
, proto_tree
* tree
, unsigned offset
, unsigned *lcnt_cnq
, bool *can_dissect_further
)
2814 unsigned total_payload_len
= tvb_captured_length(tvb
);
2815 unsigned start_offset
= offset
;
2817 if ((total_payload_len
- offset
) < L_LBM_SRS_CONTEXT_NAME_QUERY_T_NAME_LEN
)
2819 /*stop processing in case not available*/
2820 *can_dissect_further
= FALSE
;
2824 proto_item
*batch_item
= NULL
;
2826 batch_item
= proto_tree_add_none_format(tree
, hf_lbmsrs_cnq
, tvb
, offset
, -1, "CNQ");
2827 proto_tree
*cnq_tree
= proto_item_add_subtree(batch_item
, ett_lbmsrs_cnq
);
2829 proto_tree_add_item(cnq_tree
, hf_lbmsrs_message_id
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2832 unsigned name_len
= tvb_get_uint8(tvb
, offset
);
2833 offset
+= L_LBM_SRS_CONTEXT_NAME_QUERY_T_NAME_LEN
;
2835 if ((total_payload_len
- offset
) < name_len
)
2837 /*stop processing in case not available*/
2838 *can_dissect_further
= FALSE
;
2842 proto_tree_add_item(cnq_tree
, hf_lbmsrs_cnq_name
, tvb
, offset
, name_len
, ENC_ASCII
| ENC_NA
);
2845 if ((total_payload_len
- offset
) < L_LBM_SRS_CONTEXT_NAME_QUERY_T_DOMAIN_ID
)
2847 /*stop processing in case not available*/
2848 *can_dissect_further
= FALSE
;
2849 return (offset
- start_offset
);
2851 proto_tree_add_item(cnq_tree
, hf_lbmsrs_cnq_domain_id
, tvb
, offset
, L_LBM_SRS_CONTEXT_NAME_QUERY_T_DOMAIN_ID
, ENC_BIG_ENDIAN
);
2852 offset
+= L_LBM_SRS_CONTEXT_NAME_QUERY_T_DOMAIN_ID
;
2854 if ((total_payload_len
- offset
) < L_LBM_SRS_CONTEXT_NAME_QUERY_T_CONTEXT_INSTANCE
)
2856 /*stop processing in case not available*/
2857 *can_dissect_further
= FALSE
;
2858 return (offset
- start_offset
);
2860 proto_tree_add_item(cnq_tree
, hf_lbmsrs_cnq_context_instance
, tvb
, offset
, L_LBM_SRS_CONTEXT_NAME_QUERY_T_CONTEXT_INSTANCE
, ENC_NA
);
2861 offset
+= L_LBM_SRS_CONTEXT_NAME_QUERY_T_CONTEXT_INSTANCE
;
2863 if ((total_payload_len
- offset
) < L_LBM_SRS_CONTEXT_NAME_QUERY_T_CONTEXT_TYPE
)
2865 /*stop processing in case not available*/
2866 *can_dissect_further
= FALSE
;
2867 return (offset
- start_offset
);
2869 proto_tree_add_item(cnq_tree
, hf_lbmsrs_cnq_context_type
, tvb
, offset
, L_LBM_SRS_CONTEXT_NAME_QUERY_T_CONTEXT_TYPE
, ENC_BIG_ENDIAN
);
2870 offset
+= L_LBM_SRS_CONTEXT_NAME_QUERY_T_CONTEXT_TYPE
;
2873 if ((total_payload_len
- offset
) < L_LBM_SRS_CONTEXT_NAME_QUERY_T_VERSION
)
2875 /*stop processing in case not available*/
2876 *can_dissect_further
= FALSE
;
2877 return (offset
- start_offset
);
2879 proto_tree_add_item(cnq_tree
, hf_lbmsrs_cnq_version
, tvb
, offset
, L_LBM_SRS_CONTEXT_NAME_QUERY_T_VERSION
, ENC_BIG_ENDIAN
);
2880 offset
+= L_LBM_SRS_CONTEXT_NAME_QUERY_T_VERSION
;
2882 if ((total_payload_len
- offset
) < L_LBM_SRS_CONTEXT_NAME_QUERY_T_VERSION_FLAGS
)
2884 /*stop processing in case not available*/
2885 *can_dissect_further
= FALSE
;
2886 return (offset
- start_offset
);
2888 proto_tree_add_item(cnq_tree
, hf_lbmsrs_cnq_version_flags
, tvb
, offset
, L_LBM_SRS_CONTEXT_NAME_QUERY_T_VERSION_FLAGS
, ENC_BIG_ENDIAN
);
2889 offset
+= L_LBM_SRS_CONTEXT_NAME_QUERY_T_VERSION_FLAGS
;
2892 if ((total_payload_len
- offset
) < L_LBM_SRS_CONTEXT_NAME_QUERY_T_RESERVED
)
2894 /*stop processing in case not available*/
2895 *can_dissect_further
= FALSE
;
2896 return (offset
- start_offset
);
2898 proto_tree_add_item(cnq_tree
, hf_lbmsrs_cnq_reserved
, tvb
, offset
, L_LBM_SRS_CONTEXT_NAME_QUERY_T_RESERVED
, ENC_BIG_ENDIAN
);
2899 offset
+= L_LBM_SRS_CONTEXT_NAME_QUERY_T_RESERVED
;
2903 proto_item_set_len(batch_item
, (offset
- start_offset
));
2906 return (offset
- start_offset
);
2909 static unsigned dissect_lbmsrs_cni(tvbuff_t
* tvb
, proto_tree
* tree
, unsigned offset
, unsigned *lcnt_cni
, bool *can_dissect_further
)
2911 unsigned total_payload_len
= tvb_captured_length(tvb
);
2912 unsigned start_offset
= offset
;
2914 if ((total_payload_len
- offset
) < L_LBM_SRS_CONTEXT_NAME_INFO_T_NAME_LEN
)
2916 /*stop processing in case not available*/
2917 *can_dissect_further
= FALSE
;
2921 proto_item
*batch_item
= NULL
;
2923 batch_item
= proto_tree_add_none_format(tree
, hf_lbmsrs_cni
, tvb
, offset
, -1, "CNI");
2924 proto_tree
*cni_tree
= proto_item_add_subtree(batch_item
, ett_lbmsrs_cni
);
2926 proto_tree_add_item(cni_tree
, hf_lbmsrs_message_id
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2929 unsigned name_len
= tvb_get_uint8(tvb
, offset
);
2930 offset
+= L_LBM_SRS_CONTEXT_NAME_INFO_T_NAME_LEN
;
2932 if ((total_payload_len
- offset
) < name_len
)
2934 /*stop processing in case not available*/
2935 *can_dissect_further
= FALSE
;
2939 proto_tree_add_item(cni_tree
, hf_lbmsrs_cni_name
, tvb
, offset
, name_len
, ENC_ASCII
| ENC_NA
);
2942 if ((total_payload_len
- offset
) < L_LBM_SRS_CONTEXT_NAME_INFO_T_DOMAIN_ID
)
2944 /*stop processing in case not available*/
2945 *can_dissect_further
= FALSE
;
2946 return (offset
- start_offset
);
2948 proto_tree_add_item(cni_tree
, hf_lbmsrs_cni_domain_id
, tvb
, offset
, L_LBM_SRS_CONTEXT_NAME_INFO_T_DOMAIN_ID
, ENC_BIG_ENDIAN
);
2949 offset
+= L_LBM_SRS_CONTEXT_NAME_INFO_T_DOMAIN_ID
;
2951 if ((total_payload_len
- offset
) < L_LBM_SRS_CONTEXT_NAME_INFO_T_IP
)
2953 /*stop processing in case not available*/
2954 *can_dissect_further
= FALSE
;
2955 return (offset
- start_offset
);
2958 proto_tree_add_item(cni_tree
, hf_lbmsrs_cni_ip
, tvb
, offset
, L_LBM_SRS_CONTEXT_NAME_INFO_T_IP
, ENC_BIG_ENDIAN
);
2959 offset
+= L_LBM_SRS_CONTEXT_NAME_INFO_T_IP
;
2961 if ((total_payload_len
- offset
) < L_LBM_SRS_CONTEXT_NAME_INFO_T_PORT
)
2963 /*stop processing in case not available*/
2964 *can_dissect_further
= FALSE
;
2965 return (offset
- start_offset
);
2968 proto_tree_add_item(cni_tree
, hf_lbmsrs_cni_port
, tvb
, offset
, L_LBM_SRS_CONTEXT_NAME_INFO_T_PORT
, ENC_BIG_ENDIAN
);
2969 offset
+= L_LBM_SRS_CONTEXT_NAME_INFO_T_PORT
;
2971 if ((total_payload_len
- offset
) < L_LBM_SRS_CONTEXT_NAME_INFO_T_ORIGIN_CONTEXT_INSTANCE
)
2973 /*stop processing in case not available*/
2974 *can_dissect_further
= FALSE
;
2975 return (offset
- start_offset
);
2977 proto_tree_add_item(cni_tree
, hf_lbmsrs_cni_origin_context_instance
, tvb
, offset
, L_LBM_SRS_CONTEXT_NAME_INFO_T_ORIGIN_CONTEXT_INSTANCE
, ENC_NA
);
2978 offset
+= L_LBM_SRS_CONTEXT_NAME_INFO_T_ORIGIN_CONTEXT_INSTANCE
;
2980 if ((total_payload_len
- offset
) < L_LBM_SRS_CONTEXT_NAME_INFO_T_CONTEXT_INSTANCE
)
2982 /*stop processing in case not available*/
2983 *can_dissect_further
= FALSE
;
2984 return (offset
- start_offset
);
2986 proto_tree_add_item(cni_tree
, hf_lbmsrs_cni_context_instance
, tvb
, offset
, L_LBM_SRS_CONTEXT_NAME_INFO_T_CONTEXT_INSTANCE
, ENC_NA
);
2987 offset
+= L_LBM_SRS_CONTEXT_NAME_INFO_T_CONTEXT_INSTANCE
;
2989 if ((total_payload_len
- offset
) < L_LBM_SRS_CONTEXT_NAME_INFO_T_CONTEXT_TYPE
)
2991 /*stop processing in case not available*/
2992 *can_dissect_further
= FALSE
;
2993 return (offset
- start_offset
);
2995 proto_tree_add_item(cni_tree
, hf_lbmsrs_cni_context_type
, tvb
, offset
, L_LBM_SRS_CONTEXT_NAME_INFO_T_CONTEXT_TYPE
, ENC_BIG_ENDIAN
);
2996 offset
+= L_LBM_SRS_CONTEXT_NAME_INFO_T_CONTEXT_TYPE
;
2999 if ((total_payload_len
- offset
) < L_LBM_SRS_CONTEXT_NAME_INFO_T_VERSION
)
3001 /*stop processing in case not available*/
3002 *can_dissect_further
= FALSE
;
3003 return (offset
- start_offset
);
3005 proto_tree_add_item(cni_tree
, hf_lbmsrs_cni_version
, tvb
, offset
, L_LBM_SRS_CONTEXT_NAME_INFO_T_VERSION
, ENC_BIG_ENDIAN
);
3006 offset
+= L_LBM_SRS_CONTEXT_NAME_INFO_T_VERSION
;
3008 if ((total_payload_len
- offset
) < L_LBM_SRS_CONTEXT_NAME_INFO_T_VERSION_FLAGS
)
3010 /*stop processing in case not available*/
3011 *can_dissect_further
= FALSE
;
3012 return (offset
- start_offset
);
3014 proto_tree_add_item(cni_tree
, hf_lbmsrs_cni_version_flags
, tvb
, offset
, L_LBM_SRS_CONTEXT_NAME_INFO_T_VERSION_FLAGS
, ENC_BIG_ENDIAN
);
3015 offset
+= L_LBM_SRS_CONTEXT_NAME_INFO_T_VERSION_FLAGS
;
3018 if ((total_payload_len
- offset
) < L_LBM_SRS_CONTEXT_NAME_INFO_T_RESERVED
)
3020 /*stop processing in case not available*/
3021 *can_dissect_further
= FALSE
;
3022 return (offset
- start_offset
);
3024 proto_tree_add_item(cni_tree
, hf_lbmsrs_cni_reserved
, tvb
, offset
, L_LBM_SRS_CONTEXT_NAME_INFO_T_RESERVED
, ENC_BIG_ENDIAN
);
3025 offset
+= L_LBM_SRS_CONTEXT_NAME_INFO_T_RESERVED
;
3029 proto_item_set_len(batch_item
, (offset
- start_offset
));
3031 return (offset
- start_offset
);
3034 static unsigned dissect_lbmsrs_cne(tvbuff_t
* tvb
, proto_tree
* tree
, unsigned offset
, unsigned *lcnt_cne
, bool *can_dissect_further
)
3036 unsigned total_payload_len
= tvb_captured_length(tvb
);
3037 unsigned start_offset
= offset
;
3039 if ((total_payload_len
- offset
) < L_LBM_SRS_CONTEXT_NAME_END_T_NAME_LEN
)
3041 /*stop processing in case not available*/
3042 *can_dissect_further
= FALSE
;
3046 proto_item
*batch_item
= NULL
;
3048 batch_item
= proto_tree_add_none_format(tree
, hf_lbmsrs_cne
, tvb
, offset
, -1, "CNE");
3049 proto_tree
*cne_tree
= proto_item_add_subtree(batch_item
, ett_lbmsrs_cne
);
3051 proto_tree_add_item(cne_tree
, hf_lbmsrs_message_id
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3054 unsigned name_len
= tvb_get_uint8(tvb
, offset
);
3055 offset
+= L_LBM_SRS_CONTEXT_NAME_END_T_NAME_LEN
;
3057 if ((total_payload_len
- offset
) < name_len
)
3059 /*stop processing in case not available*/
3060 *can_dissect_further
= FALSE
;
3064 proto_tree_add_item(cne_tree
, hf_lbmsrs_cne_name
, tvb
, offset
, name_len
, ENC_ASCII
| ENC_NA
);
3067 if ((total_payload_len
- offset
) < L_LBM_SRS_CONTEXT_NAME_END_T_DOMAIN_ID
)
3069 /*stop processing in case not available*/
3070 *can_dissect_further
= FALSE
;
3071 return (offset
- start_offset
);
3073 proto_tree_add_item(cne_tree
, hf_lbmsrs_cne_domain_id
, tvb
, offset
, L_LBM_SRS_CONTEXT_NAME_END_T_DOMAIN_ID
, ENC_BIG_ENDIAN
);
3074 offset
+= L_LBM_SRS_CONTEXT_NAME_END_T_DOMAIN_ID
;
3076 if ((total_payload_len
- offset
) < L_LBM_SRS_CONTEXT_NAME_END_T_IP
)
3078 /*stop processing in case not available*/
3079 *can_dissect_further
= FALSE
;
3080 return (offset
- start_offset
);
3083 proto_tree_add_item(cne_tree
, hf_lbmsrs_cne_ip
, tvb
, offset
, L_LBM_SRS_CONTEXT_NAME_END_T_IP
, ENC_BIG_ENDIAN
);
3084 offset
+= L_LBM_SRS_CONTEXT_NAME_END_T_IP
;
3086 if ((total_payload_len
- offset
) < L_LBM_SRS_CONTEXT_NAME_END_T_PORT
)
3088 /*stop processing in case not available*/
3089 *can_dissect_further
= FALSE
;
3090 return (offset
- start_offset
);
3093 proto_tree_add_item(cne_tree
, hf_lbmsrs_cne_port
, tvb
, offset
, L_LBM_SRS_CONTEXT_NAME_END_T_PORT
, ENC_BIG_ENDIAN
);
3094 offset
+= L_LBM_SRS_CONTEXT_NAME_END_T_PORT
;
3096 if ((total_payload_len
- offset
) < L_LBM_SRS_CONTEXT_NAME_END_T_ORIGIN_CONTEXT_INSTANCE
)
3098 /*stop processing in case not available*/
3099 *can_dissect_further
= FALSE
;
3100 return (offset
- start_offset
);
3102 proto_tree_add_item(cne_tree
, hf_lbmsrs_cne_origin_context_instance
, tvb
, offset
, L_LBM_SRS_CONTEXT_NAME_END_T_ORIGIN_CONTEXT_INSTANCE
, ENC_NA
);
3103 offset
+= L_LBM_SRS_CONTEXT_NAME_END_T_ORIGIN_CONTEXT_INSTANCE
;
3105 if ((total_payload_len
- offset
) < L_LBM_SRS_CONTEXT_NAME_END_T_CONTEXT_INSTANCE
)
3107 /*stop processing in case not available*/
3108 *can_dissect_further
= FALSE
;
3109 return (offset
- start_offset
);
3111 proto_tree_add_item(cne_tree
, hf_lbmsrs_cne_context_instance
, tvb
, offset
, L_LBM_SRS_CONTEXT_NAME_END_T_CONTEXT_INSTANCE
, ENC_NA
);
3112 offset
+= L_LBM_SRS_CONTEXT_NAME_END_T_CONTEXT_INSTANCE
;
3114 if ((total_payload_len
- offset
) < L_LBM_SRS_CONTEXT_NAME_END_T_CONTEXT_TYPE
)
3116 /*stop processing in case not available*/
3117 *can_dissect_further
= FALSE
;
3118 return (offset
- start_offset
);
3120 proto_tree_add_item(cne_tree
, hf_lbmsrs_cne_context_type
, tvb
, offset
, L_LBM_SRS_CONTEXT_NAME_END_T_CONTEXT_TYPE
, ENC_BIG_ENDIAN
);
3121 offset
+= L_LBM_SRS_CONTEXT_NAME_END_T_CONTEXT_TYPE
;
3124 if ((total_payload_len
- offset
) < L_LBM_SRS_CONTEXT_NAME_END_T_VERSION
)
3126 /*stop processing in case not available*/
3127 *can_dissect_further
= FALSE
;
3128 return (offset
- start_offset
);
3130 proto_tree_add_item(cne_tree
, hf_lbmsrs_cne_version
, tvb
, offset
, L_LBM_SRS_CONTEXT_NAME_END_T_VERSION
, ENC_BIG_ENDIAN
);
3131 offset
+= L_LBM_SRS_CONTEXT_NAME_END_T_VERSION
;
3133 if ((total_payload_len
- offset
) < L_LBM_SRS_CONTEXT_NAME_END_T_VERSION_FLAGS
)
3135 /*stop processing in case not available*/
3136 *can_dissect_further
= FALSE
;
3137 return (offset
- start_offset
);
3139 proto_tree_add_item(cne_tree
, hf_lbmsrs_cne_version_flags
, tvb
, offset
, L_LBM_SRS_CONTEXT_NAME_END_T_VERSION_FLAGS
, ENC_BIG_ENDIAN
);
3140 offset
+= L_LBM_SRS_CONTEXT_NAME_END_T_VERSION_FLAGS
;
3143 if ((total_payload_len
- offset
) < L_LBM_SRS_CONTEXT_NAME_END_T_RESERVED
)
3145 /*stop processing in case not available*/
3146 *can_dissect_further
= FALSE
;
3147 return (offset
- start_offset
);
3149 proto_tree_add_item(cne_tree
, hf_lbmsrs_cne_reserved
, tvb
, offset
, L_LBM_SRS_CONTEXT_NAME_END_T_RESERVED
, ENC_BIG_ENDIAN
);
3150 offset
+= L_LBM_SRS_CONTEXT_NAME_END_T_RESERVED
;
3154 proto_item_set_len(batch_item
, (offset
- start_offset
));
3156 return (offset
- start_offset
);
3159 static void update_counts(struct epan_column_info
* cinfo
,proto_item
* item
)
3161 gchar counts
[1024] = "[ ";
3166 i
= strlen( counts
);
3167 snprintf(&counts
[i
], 1024-i
, "SIR:%u ",cnt_sir
);
3172 i
= strlen( counts
);
3173 snprintf(&counts
[i
], 1024-i
, "SER:%u ",cnt_ser
);
3178 i
= strlen( counts
);
3179 snprintf(&counts
[i
], 1024-i
, "SDR:%u ",cnt_sdr
);
3184 i
= strlen( counts
);
3185 snprintf(&counts
[i
], 1024-i
, "RIR:%u ",cnt_rir
);
3190 i
= strlen( counts
);
3191 snprintf(&counts
[i
], 1024-i
, "RER:%u ",cnt_rer
);
3196 i
= strlen( counts
);
3197 snprintf(&counts
[i
], 1024-i
, "RDR:%u ",cnt_rdr
);
3202 i
= strlen( counts
);
3203 snprintf(&counts
[i
], 1024-i
, "WIR:%u ",cnt_wir
);
3208 i
= strlen( counts
);
3209 snprintf(&counts
[i
], 1024-i
, "WER:%u ",cnt_wer
);
3214 i
= strlen( counts
);
3215 snprintf(&counts
[i
], 1024-i
, "WDR:%u ",cnt_wdr
);
3220 i
= strlen( counts
);
3221 snprintf(&counts
[i
], 1024-i
, "SLI:%u ",cnt_sli
);
3226 i
= strlen( counts
);
3227 snprintf(&counts
[i
], 1024-i
, "RTI:%u ",cnt_rti
);
3232 i
= strlen( counts
);
3233 snprintf(&counts
[i
], 1024-i
, "RTE:%u ",cnt_rte
);
3238 i
= strlen( counts
);
3239 snprintf(&counts
[i
], 1024-i
, "DMI:%u ",cnt_dmi
);
3244 i
= strlen( counts
);
3245 snprintf(&counts
[i
], 1024-i
, "CNQ:%u ",cnt_cnq
);
3250 i
= strlen( counts
);
3251 snprintf(&counts
[i
], 1024-i
, "CNI:%u ",cnt_cni
);
3256 i
= strlen( counts
);
3257 snprintf(&counts
[i
], 1024-i
, "CNE:%u ",cnt_cne
);
3261 i
= strlen( counts
);
3262 snprintf(&counts
[i
], 1024-i
, "]");
3264 col_append_str(cinfo
, COL_INFO
, counts
);
3265 proto_item_set_text(item
, "SRS:%s",counts
);
3269 /*Function to dissect SRS batch*/
3270 static unsigned dissect_lbmsrs_batch(tvbuff_t
* tvb
, packet_info
* pinfo
, proto_tree
* tree
, unsigned offset
, uint32_t rsocket_payload_len
)
3272 unsigned start_offset
= offset
;
3273 unsigned total_payload_len
= tvb_captured_length(tvb
);
3274 /*reset all the counters*/
3275 cnt_sir
= cnt_ser
= cnt_sdr
= 0;
3276 cnt_rir
= cnt_rer
= cnt_rdr
= 0;
3277 cnt_wir
= cnt_wer
= cnt_wdr
= 0;
3279 cnt_rti
= cnt_rte
= cnt_dmi
= 0;
3280 cnt_cnq
= cnt_cni
= cnt_cne
= 0;
3282 /*add a sub-tree for the batch */
3283 proto_item
*srs_batch
;
3284 proto_tree_add_subtree(tree
, tvb
, offset
, rsocket_payload_len
, ett_lbmsrs_details
, &srs_batch
, "SRS SIR/SER/SDR/RIR/RDR/RER/WIR/WDR/WER");
3286 /*this is a start of the batch which will contain SIR,SDR,SER*/
3287 while (offset
< total_payload_len
)
3289 /*at least two bytes required to check the message id*/
3290 if ((total_payload_len
- offset
) < L_LBM_SRS_MESSAGE_ID
)
3292 proto_item_set_len(srs_batch
, (offset
- start_offset
));
3293 return (offset
- start_offset
);
3296 uint16_t message_id
= tvb_get_uint16(tvb
, offset
, ENC_BIG_ENDIAN
);
3298 /*process the SIR/SDR/SER*/
3299 unsigned len_dissected
= 0;
3300 bool can_dissect_further
= TRUE
;
3303 case MSG_ID_SOURCE_INFO
:
3305 len_dissected
= dissect_lbmsrs_sir_ser(tvb
, pinfo
, tree
, offset
, &cnt_sir
, &cnt_ser
,&can_dissect_further
);
3309 case MSG_ID_SOURCE_DELETE
:
3311 len_dissected
= dissect_lbmsrs_sdr(tvb
, pinfo
, tree
, offset
, &cnt_sdr
, &can_dissect_further
);
3315 case MSG_ID_RCV_INFO
:
3317 len_dissected
= dissect_lbmsrs_rir(tvb
, pinfo
, tree
, offset
, &cnt_rir
, &can_dissect_further
);
3320 case MSG_ID_RCV_DELETE
:
3322 len_dissected
= dissect_lbmsrs_rdr(tvb
, pinfo
, tree
, offset
, &cnt_rdr
, &can_dissect_further
);
3325 case MSG_ID_RCV_END
:
3327 len_dissected
= dissect_lbmsrs_rer(tvb
, pinfo
, tree
, offset
, &cnt_rer
, &can_dissect_further
);
3330 case MSG_ID_WRCV_INFO
:
3332 len_dissected
= dissect_lbmsrs_wir(tvb
, pinfo
, tree
, offset
, &cnt_wir
, &can_dissect_further
);
3335 case MSG_ID_WRCV_DELETE
:
3337 len_dissected
= dissect_lbmsrs_wdr(tvb
, pinfo
, tree
, offset
, &cnt_wdr
, &can_dissect_further
);
3340 case MSG_ID_WRCV_END
:
3342 len_dissected
= dissect_lbmsrs_wer(tvb
, pinfo
, tree
, offset
, &cnt_wer
, &can_dissect_further
);
3345 case MSG_ID_SRC_LEAVE
:
3347 len_dissected
= dissect_lbmsrs_sli(tvb
, pinfo
,tree
, offset
, &cnt_sli
, &can_dissect_further
);
3350 case MSG_ID_ROUTE_INFO
:
3352 len_dissected
= dissect_lbmsrs_rti(tvb
, tree
, offset
, &cnt_rti
, &can_dissect_further
);
3355 case MSG_ID_ROUTE_END
:
3357 len_dissected
= dissect_lbmsrs_rte(tvb
, tree
, offset
, &cnt_rte
, &can_dissect_further
);
3360 case MSG_ID_DOMAIN_INFO
:
3362 len_dissected
= dissect_lbmsrs_dmi(tvb
, tree
, offset
, &cnt_dmi
, &can_dissect_further
);
3365 case MSG_ID_CONTEXT_NAME_QUERY
:
3367 len_dissected
= dissect_lbmsrs_cnq(tvb
, tree
, offset
, &cnt_cnq
, &can_dissect_further
);
3370 case MSG_ID_CONTEXT_NAME_INFO
:
3372 len_dissected
= dissect_lbmsrs_cni(tvb
, tree
, offset
, &cnt_cni
, &can_dissect_further
);
3375 case MSG_ID_CONTEXT_NAME_END
:
3377 len_dissected
= dissect_lbmsrs_cne(tvb
, tree
, offset
, &cnt_cne
, &can_dissect_further
);
3385 offset
+= len_dissected
;
3387 /*if nothing is dissected then return the current offset*/
3388 if ((len_dissected
== 0) || (FALSE
== can_dissect_further
))
3390 update_counts(pinfo
->cinfo
,srs_batch
);
3391 proto_item_set_len(srs_batch
, (offset
- start_offset
));
3392 return (offset
- start_offset
);
3397 update_counts(pinfo
->cinfo
, srs_batch
);
3398 proto_item_set_len(srs_batch
, (offset
- start_offset
));
3400 return (offset
- start_offset
);
3403 static unsigned dissect_lbmsrs_registration_request(tvbuff_t
* tvb
, packet_info
* pinfo
, proto_tree
* tree
, unsigned offset
, uint32_t rsocket_payload_len
)
3405 unsigned start_offset
= offset
;
3406 proto_tree_add_item(tree
, hf_lbmsrs_message_id
, tvb
, offset
, L_LBM_SRS_MESSAGE_ID
, ENC_BIG_ENDIAN
);
3407 offset
+= L_LBM_SRS_MESSAGE_ID
;
3409 /*reduce by message id field length*/
3410 rsocket_payload_len
-= L_LBM_SRS_MESSAGE_ID
;
3411 if (L_LBM_SRS_REGISTRATION_REQUEST_INFO_T
!= rsocket_payload_len
)
3413 return (offset
- start_offset
);
3416 col_append_str(pinfo
->cinfo
, COL_INFO
, "[SRS REGISTRATION REQUEST]");
3417 /*add a sub-tree for SRS */
3418 proto_item
*lbmsrs_details
;
3419 proto_tree
*lbmsrs_details_tree
= proto_tree_add_subtree(tree
, tvb
, offset
, rsocket_payload_len
, ett_lbmsrs_details
, &lbmsrs_details
, "SRS Registration Request");
3421 static int * const flags
[] =
3423 &hf_lbmsrs_interest_mode_advertise_filter
,
3424 &hf_lbmsrs_interest_mode_interest_forward
,
3425 &hf_lbmsrs_interest_mode_context_name_filter
,
3429 proto_tree_add_item(lbmsrs_details_tree
, hf_lbmsrs_app_type
, tvb
, offset
, L_LBM_SRS_REGISTRATION_REQUEST_INFO_T_APP_TYPE
, ENC_BIG_ENDIAN
);
3430 offset
+= L_LBM_SRS_REGISTRATION_REQUEST_INFO_T_APP_TYPE
;
3431 proto_tree_add_item(lbmsrs_details_tree
, hf_lbmsrs_client_addr
, tvb
, offset
, L_LBM_SRS_REGISTRATION_REQUEST_INFO_T_CLIENT_ADDR
, ENC_BIG_ENDIAN
);
3432 offset
+= L_LBM_SRS_REGISTRATION_REQUEST_INFO_T_CLIENT_ADDR
;
3433 proto_tree_add_item(lbmsrs_details_tree
, hf_lbmsrs_client_port
, tvb
, offset
, L_LBM_SRS_REGISTRATION_REQUEST_INFO_T_CLIENT_PORT
, ENC_BIG_ENDIAN
);
3434 offset
+= L_LBM_SRS_REGISTRATION_REQUEST_INFO_T_CLIENT_PORT
;
3435 proto_tree_add_item(lbmsrs_details_tree
, hf_lbmsrs_session_id
, tvb
, offset
, L_LBM_SRS_REGISTRATION_REQUEST_INFO_T_SESSION_ID
, ENC_BIG_ENDIAN
);
3436 offset
+= L_LBM_SRS_REGISTRATION_REQUEST_INFO_T_SESSION_ID
;
3437 proto_tree_add_item(lbmsrs_details_tree
, hf_lbmsrs_host_id
, tvb
, offset
, L_LBM_SRS_REGISTRATION_REQUEST_INFO_T_HOST_ID
, ENC_BIG_ENDIAN
);
3438 offset
+= L_LBM_SRS_REGISTRATION_REQUEST_INFO_T_HOST_ID
;
3439 proto_tree_add_item(lbmsrs_details_tree
, hf_lbmsrs_protocol_version
, tvb
, offset
, L_LBM_SRS_REGISTRATION_REQUEST_INFO_T_PROTOCOL_VERSION
, ENC_BIG_ENDIAN
);
3440 offset
+= L_LBM_SRS_REGISTRATION_REQUEST_INFO_T_PROTOCOL_VERSION
;
3441 proto_tree_add_bitmask(lbmsrs_details_tree
, tvb
, offset
, hf_lbmsrs_interest_mode
, ett_lbmsrs_interest_mode
, flags
, ENC_BIG_ENDIAN
);
3442 offset
+= L_LBM_SRS_REGISTRATION_REQUEST_INFO_T_INTEREST_MODE
;
3443 proto_tree_add_item(lbmsrs_details_tree
, hf_lbmsrs_req_local_domain_id
, tvb
, offset
, L_LBM_SRS_REGISTRATION_REQUEST_INFO_T_LOCAL_DOMAIN_ID
, ENC_BIG_ENDIAN
);
3444 offset
+= L_LBM_SRS_REGISTRATION_REQUEST_INFO_T_LOCAL_DOMAIN_ID
;
3446 return (offset
- start_offset
); //return the total length dissected
3450 static unsigned dissect_lbmsrs_registration_response(tvbuff_t
* tvb
, packet_info
* pinfo
, proto_tree
* tree
, unsigned offset
, uint32_t rsocket_payload_len
)
3452 unsigned start_offset
= offset
;
3453 proto_tree_add_item(tree
, hf_lbmsrs_message_id
, tvb
, offset
, L_LBM_SRS_MESSAGE_ID
, ENC_BIG_ENDIAN
);
3454 offset
+= L_LBM_SRS_MESSAGE_ID
;
3456 /*reduce by message id field length*/
3457 rsocket_payload_len
-= L_LBM_SRS_MESSAGE_ID
;
3459 if (L_LBM_SRS_REGISTRATION_RESPONSE_INFO_T
!= rsocket_payload_len
)
3461 return (offset
- start_offset
);
3464 col_append_str(pinfo
->cinfo
, COL_INFO
, "[SRS REGISTRATION RESPONSE]");
3466 /*add a sub-tree for SRS */
3467 proto_item
*lbmsrs_details
;
3468 proto_tree
*lbmsrs_details_tree
= proto_tree_add_subtree(tree
, tvb
, offset
, rsocket_payload_len
, ett_lbmsrs_details
, &lbmsrs_details
, "SRS Registration Response");
3470 proto_tree_add_item(lbmsrs_details_tree
, hf_lbmsrs_client_id
, tvb
, offset
, L_LBM_SRS_REGISTRATION_RESPONSE_INFO_T_CLIENT_ID
, ENC_BIG_ENDIAN
);
3471 offset
+= L_LBM_SRS_REGISTRATION_RESPONSE_INFO_T_CLIENT_ID
;
3472 proto_tree_add_item(lbmsrs_details_tree
, hf_lbmsrs_resp_local_domain_id
, tvb
, offset
, L_LBM_SRS_REGISTRATION_RESPONSE_INFO_T_LOCAL_DOMAIN_ID
, ENC_BIG_ENDIAN
);
3473 offset
+= L_LBM_SRS_REGISTRATION_RESPONSE_INFO_T_LOCAL_DOMAIN_ID
;
3474 proto_tree_add_item(lbmsrs_details_tree
, hf_lbmsrs_reg_resp_protocol_version
, tvb
, offset
, L_LBM_SRS_REGISTRATION_RESPONSE_INFO_T_PROTOCOL_VERSION
, ENC_BIG_ENDIAN
);
3475 offset
+= L_LBM_SRS_REGISTRATION_RESPONSE_INFO_T_PROTOCOL_VERSION
;
3477 return (offset
- start_offset
);
3480 static unsigned dissect_lbmsrs_stream_request(tvbuff_t
* tvb
, packet_info
* pinfo
, proto_tree
* tree
, unsigned offset
, uint32_t rsocket_payload_len
)
3482 unsigned start_offset
= offset
;
3483 proto_tree_add_item(tree
, hf_lbmsrs_message_id
, tvb
, offset
, L_LBM_SRS_MESSAGE_ID
, ENC_BIG_ENDIAN
);
3484 offset
+= L_LBM_SRS_MESSAGE_ID
;
3486 /*reduce by message id field length*/
3487 rsocket_payload_len
-= L_LBM_SRS_MESSAGE_ID
;
3489 if (L_LBM_SRS_STREAM_REQUEST_INFO_T
!= rsocket_payload_len
)
3491 return (offset
- start_offset
);
3494 col_append_str(pinfo
->cinfo
, COL_INFO
, "[SRS STREAM REQUEST]");
3496 /*add a sub-tree for SRS */
3497 proto_item
*lbmsrs_details
;
3498 proto_tree
*lbmsrs_details_tree
= proto_tree_add_subtree(tree
, tvb
, offset
, rsocket_payload_len
, ett_lbmsrs_details
, &lbmsrs_details
, "SRS Stream Request");
3500 proto_tree_add_item(lbmsrs_details_tree
, hf_lbmsrs_stream_req_unused
, tvb
, offset
, L_LBM_SRS_STREAM_REQUEST_INFO_T_UNUSED
, ENC_BIG_ENDIAN
);
3501 offset
+= L_LBM_SRS_STREAM_REQUEST_INFO_T_UNUSED
;
3503 return (offset
- start_offset
);
3505 /*Function to dissect SRS as part of Rsocket payload/metadata*/
3506 static unsigned dissect_lbmsrs_data(tvbuff_t
* tvb
, packet_info
* pinfo
, proto_tree
* tree
, unsigned offset
, uint32_t rsocket_payload_len
)
3508 unsigned len_dissected
= 0;
3510 if (tvb_captured_length_remaining(tvb
, offset
) < L_LBM_SRS_MESSAGE_ID
)
3515 /*add and get the SRS message id*/
3516 uint16_t message_id
= tvb_get_uint16(tvb
,offset
, ENC_BIG_ENDIAN
);
3520 case MSG_ID_REGISTRATION_REQUEST
:
3522 len_dissected
= dissect_lbmsrs_registration_request(tvb
,pinfo
,tree
,offset
,rsocket_payload_len
);
3525 case MSG_ID_REGISTRATION_RESPONSE
:
3527 len_dissected
= dissect_lbmsrs_registration_response(tvb
, pinfo
, tree
, offset
, rsocket_payload_len
);
3530 case MSG_ID_STREAM_REQUEST
:
3532 len_dissected
= dissect_lbmsrs_stream_request(tvb
, pinfo
, tree
, offset
, rsocket_payload_len
);
3535 case MSG_ID_SOURCE_INFO
:
3536 case MSG_ID_SOURCE_DELETE
:
3537 case MSG_ID_RCV_INFO
:
3538 case MSG_ID_RCV_DELETE
:
3539 case MSG_ID_RCV_END
:
3540 case MSG_ID_WRCV_INFO
:
3541 case MSG_ID_WRCV_DELETE
:
3542 case MSG_ID_WRCV_END
:
3543 case MSG_ID_SRC_LEAVE
:
3544 case MSG_ID_ROUTE_INFO
:
3545 case MSG_ID_ROUTE_END
:
3546 case MSG_ID_DOMAIN_INFO
:
3547 case MSG_ID_CONTEXT_NAME_QUERY
:
3548 case MSG_ID_CONTEXT_NAME_INFO
:
3549 case MSG_ID_CONTEXT_NAME_END
:
3551 len_dissected
= dissect_lbmsrs_batch(tvb
, pinfo
, tree
, offset
, rsocket_payload_len
);
3557 expert_add_info_format(pinfo
, tree
, &ei_lbmsrs_analysis_invalid_msg_id
,
3558 "Invalid LBMSRS Message Id :%" PRIu16
, message_id
);
3564 return len_dissected
;
3567 /* This is the main dissector function
3568 Return 0 - If the data does not belong to the protocol
3569 Return > 0 - If the data is dissected properly, return the actual length dissected
3570 Return < 0 - If need more data for dissection, return the negative of the length required*/
3571 static int dissect_lbmsrs_pdus(tvbuff_t
* tvb
, packet_info
* pinfo
, proto_tree
* tree
, void * user_data _U_
)
3573 unsigned offset
= 0;
3574 unsigned tvb_length
= tvb_captured_length(tvb
);
3576 if (tvb_length
< rsocket_frame_len_field_size
)
3581 /*get the rsocket frame length*/
3582 uint32_t rsocket_frame_len
= tvb_get_uint24(tvb
, offset
, ENC_BIG_ENDIAN
);
3583 /*adjust the rsocket tree size correctly so as to accommodate
3584 only the available data. It's always possible that the rsocket length reported
3585 in the rsocket PDU is more than the data captured in this packet or vice-versa*/
3586 uint32_t rsocket_tree_length
= rsocket_frame_len
;
3587 if (tvb_length
< (rsocket_frame_len
+ rsocket_frame_len_field_size
))
3589 rsocket_tree_length
= tvb_length
- rsocket_frame_len_field_size
;
3592 /*check if nothing is available to dissect*/
3593 if (rsocket_tree_length
<= 0)
3597 /*add the srs subtree, this will allow to use the "srs" filter*/
3598 proto_item
*ti
= proto_tree_add_item(tree
, proto_lbmsrs
, tvb
, offset
, -1, ENC_NA
);
3599 proto_tree
*srs_tree
= proto_item_add_subtree(ti
, ett_lbmsrs
);
3601 /*add the rsocket frame length field*/
3602 proto_tree_add_item(srs_tree
, hf_lbmsrs_rsocket_frame_len
, tvb
, offset
,
3603 rsocket_frame_len_field_size
, ENC_BIG_ENDIAN
);
3604 offset
+= rsocket_frame_len_field_size
;
3607 /*add the rsocket frame subtree*/
3608 proto_item
*rsocket_frame
;
3609 proto_tree
*rsocket_frame_tree
= proto_tree_add_subtree(
3610 srs_tree
, tvb
, offset
, rsocket_tree_length
, ett_lbmsrs_rsocket_frame
, &rsocket_frame
, "RSocket Frame");
3612 /*add the rocket stream id*/
3613 if ((tvb_length
- offset
) < rsocket_stream_id_field_size
)
3617 proto_tree_add_item(rsocket_frame_tree
, hf_lbmsrs_rsocket_stream_id
, tvb
, offset
, 4,
3619 offset
+= rsocket_stream_id_field_size
;
3622 /*read and add the rsocket frame type*/
3623 if ((tvb_length
- offset
) < 1)
3627 uint64_t rsocket_frame_type
;
3628 proto_tree_add_bits_ret_val(rsocket_frame_tree
, hf_lbmsrs_rsocket_frame_type
, tvb
,
3629 offset
* 8, 6, &rsocket_frame_type
, ENC_BIG_ENDIAN
);
3632 const char *frameName
= getFrameTypeName(rsocket_frame_type
);
3635 col_add_str(pinfo
->cinfo
, COL_INFO
, frameName
);
3638 col_set_str(pinfo
->cinfo
, COL_INFO
, "UNDEFINED");
3641 /*add the rsocket ignore flag*/
3642 proto_tree_add_item(rsocket_frame_tree
, hf_lbmsrs_rsocket_ignore_flag
, tvb
, offset
, 2,
3645 /*read the rsocket metadata flag*/
3646 uint8_t rsocket_metadata_flag
= tvb_get_bits8(tvb
, (offset
* 8) + 6, 2);
3647 proto_tree_add_item(rsocket_frame_tree
, hf_lbmsrs_rsocket_metadata_flag
, tvb
, offset
, 2,
3650 /*dissect rsocket frame based on type */
3651 bool can_dissect_further
= true;
3652 int rsocket_dissected_len
= dissect_rsocket_frame(rsocket_frame_type
, rsocket_frame_tree
, tvb
, offset
,&can_dissect_further
);
3653 offset
+= rsocket_dissected_len
;
3655 if (false == can_dissect_further
)
3657 return (offset
- rsocket_frame_len
);
3660 /*if rsocket metadata is available add it to the tree*/
3661 if (rsocket_metadata_flag
)
3663 /*add the rsocket metadata length field*/
3664 if ((tvb_length
- offset
) < 3)
3666 return (offset
- rsocket_frame_len
);
3668 uint32_t rsocket_metadata_len
;
3669 proto_tree_add_item_ret_uint(rsocket_frame_tree
, hf_lbmsrs_rsocket_mdata_len
, tvb
, offset
,3, ENC_BIG_ENDIAN
, &rsocket_metadata_len
);
3672 /*add the rsocket metadata*/
3673 if ((tvb_length
- offset
) < rsocket_metadata_len
)
3675 return (offset
- rsocket_frame_len
);
3677 proto_tree_add_item(rsocket_frame_tree
, hf_lbmsrs_rsocket_mdata
, tvb
, offset
, rsocket_metadata_len
,ENC_ASCII
| ENC_NA
);
3678 offset
+= rsocket_metadata_len
;
3681 /*get the remaining payload length*/
3682 uint32_t rsocket_payload_len
= tvb_length
- offset
;
3684 /*if payload is available start processing for SRS*/
3685 if (rsocket_payload_len
> 0) {
3686 proto_item
*lbmsrs_data
;
3687 proto_tree
*lbmsrs_data_tree
= proto_tree_add_subtree(rsocket_frame_tree
, tvb
, offset
, rsocket_payload_len
, ett_lbmsrs_data
, &lbmsrs_data
, "LBMSRS Data");
3688 offset
+= dissect_lbmsrs_data(tvb
, pinfo
, lbmsrs_data_tree
, offset
, rsocket_payload_len
);
3691 return (offset
- rsocket_frame_len
);
3694 /*common dissection function for LBMSRS*/
3695 static unsigned dissect_lbmsrs_real(tvbuff_t
* tvb
, packet_info
* pinfo
, proto_tree
* tree
, void * data _U_
)
3697 char* tag_name
= NULL
;
3700 tag_name
= lbmsrs_tag_find(pinfo
);
3702 col_clear(pinfo
->cinfo
, COL_INFO
);
3703 if (tag_name
!= NULL
)
3705 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "[Tag: %s]", tag_name
);
3708 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "LBMSRS");
3709 col_set_fence(pinfo
->cinfo
, COL_INFO
);
3711 tcp_dissect_pdus(tvb
, pinfo
, tree
, true, 3, get_rsocket_frame_len
, dissect_lbmsrs_pdus
, data
);
3712 return tvb_captured_length(tvb
);
3715 /*normal dissection function*/
3716 static int dissect_lbmsrs(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data
)
3718 if (!check_lbmsrs_packet(tvb
, 0))
3723 return dissect_lbmsrs_real(tvb
,pinfo
,tree
,data
);
3726 /*heuristic dissection function*/
3727 static bool test_lbmsrs_packet(tvbuff_t
* tvb
, packet_info
* pinfo
, proto_tree
* tree
, void * user_data _U_
)
3729 bool valid_packet
= false;
3730 lbmsrs_tag_entry_t entry
;
3732 /* Must be a TCP packet. */
3733 if (pinfo
->ptype
!= PT_TCP
)
3740 if (lbmsrs_tag_find(pinfo
) != NULL
)
3742 valid_packet
= true;
3748 entry
.ip_address
= LBMSRS_DEFAULT_SOURCE_IP
;
3749 if (*global_lbmsrs_source_ip_address
== '\0')
3751 entry
.ip_address
= NULL
;
3753 entry
.ip_address_val_h
= lbmsrs_source_ip_address
;
3754 entry
.tcp_port
= lbmsrs_source_port
;
3755 valid_packet
= lbmsrs_match_packet(pinfo
, &entry
);
3758 if (!check_lbmsrs_packet(tvb
, 0))
3765 dissect_lbmsrs_real(tvb
, pinfo
, tree
, user_data
);
3773 void proto_register_lbmsrs(void)
3775 static hf_register_info hf
[] = {
3776 { &hf_lbmsrs_message_id
,
3777 { "Message ID", "lbmsrs.message_id", FT_UINT16
, BASE_DEC
, VALS(lbmsrsMessageId
), 0x0, NULL
, HFILL
} },
3778 /*rsocket related items start*/
3779 { &hf_lbmsrs_rsocket_frame_len
,
3780 { "Frame Length", "lbmsrs.rsocket.frame_len", FT_UINT24
, BASE_DEC
, NULL
, 0x0,NULL
, HFILL
} },
3781 { &hf_lbmsrs_rsocket_stream_id
,
3782 { "Stream ID", "lbmsrs.rsocket.stream_id", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
,HFILL
} },
3783 { &hf_lbmsrs_rsocket_frame_type
,
3784 { "Frame Type", "lbmsrs.rsocket.frame_type", FT_UINT8
, BASE_DEC
,VALS(rSocketFrameTypeNames
), 0x0, NULL
, HFILL
} },
3785 { &hf_lbmsrs_rsocket_mdata_len
,
3786 { "Metadata Length", "lbmsrs.rsocket.metadata_len", FT_UINT24
, BASE_DEC
, NULL
,0x0, NULL
, HFILL
} },
3787 { &hf_lbmsrs_rsocket_mdata
,
3788 { "Metadata", "lbmsrs.rsocket.metadata", FT_STRING
, BASE_NONE
, NULL
, 0x0, NULL
,HFILL
} },
3789 { &hf_lbmsrs_rsocket_ignore_flag
,
3790 { "Ignore", "lbmsrs.rsocket.flags.ignore", FT_BOOLEAN
, 16, NULL
, 0x0200, NULL
,HFILL
} },
3791 { &hf_lbmsrs_rsocket_metadata_flag
,
3792 { "Metadata", "lbmsrs.rsocket.flags.metadata", FT_BOOLEAN
, 16, NULL
, 0x0100,NULL
, HFILL
} },
3793 { &hf_lbmsrs_rsocket_resume_flag
,
3794 { "Resume", "lbmsrs.rsocket.flags.resume", FT_BOOLEAN
, 16, NULL
, 0x0080, NULL
,HFILL
} },
3795 { &hf_lbmsrs_rsocket_lease_flag
,
3796 { "Lease", "lbmsrs.rsocket.flags.lease", FT_BOOLEAN
, 16, NULL
, 0x0040, NULL
,HFILL
} },
3797 { &hf_lbmsrs_rsocket_follows_flag
,
3798 { "Follows", "lbmsrs.rsocket.flags.follows", FT_BOOLEAN
, 16, NULL
, 0x0080, NULL
,HFILL
} },
3799 { &hf_lbmsrs_rsocket_complete_flag
,
3800 { "Complete", "lbmsrs.rsocket.flags.complete", FT_BOOLEAN
, 16, NULL
, 0x0040,NULL
, HFILL
} },
3801 { &hf_lbmsrs_rsocket_next_flag
,
3802 { "Next", "lbmsrs.rsocket.flags.next", FT_BOOLEAN
, 16, NULL
, 0x0020, NULL
,HFILL
} },
3803 { &hf_lbmsrs_rsocket_respond_flag
,
3804 { "Respond", "lbmsrs.rsocket.flags.respond", FT_BOOLEAN
, 16, NULL
, 0x0080, NULL
,HFILL
} },
3805 { &hf_lbmsrs_rsocket_major_version
,
3806 { "Major Version", "lbmsrs.rsocket.version.major", FT_UINT16
, BASE_DEC
, NULL
,0x0, NULL
, HFILL
} },
3807 { &hf_lbmsrs_rsocket_minor_version
,
3808 { "Minor Version", "lbmsrs.rsocket.version.minor", FT_UINT16
, BASE_DEC
, NULL
,0x0, NULL
, HFILL
} },
3809 { &hf_lbmsrs_rsocket_keepalive_interval
,
3810 { "Keepalive Interval", "lbmsrs.rsocket.keepalive.interval", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3811 { &hf_lbmsrs_rsocket_max_lifetime
,
3812 { "Max Lifetime", "lbmsrs.rsocket.max_lifetime", FT_UINT32
, BASE_DEC
, NULL
, 0x0,NULL
, HFILL
} },
3813 { &hf_lbmsrs_rsocket_mdata_mime_length
,
3814 { "Metadata MIME Length", "lbmsrs.rsocket.mdata_mime_length", FT_UINT8
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3815 { &hf_lbmsrs_rsocket_mdata_mime_type
,
3816 { "Metadata MIME Type", "lbmsrs.rsocket.mdata_mime_type", FT_STRING
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
3817 { &hf_lbmsrs_rsocket_data_mime_length
,
3818 { "Data MIME Length", "lbmsrs.rsocket.data_mime_length", FT_UINT8
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3819 { &hf_lbmsrs_rsocket_data_mime_type
,
3820 { "Data MIME Type", "lbmsrs.rsocket.data_mime_type", FT_STRING
, BASE_NONE
, NULL
,0x0, NULL
, HFILL
} },
3821 { &hf_lbmsrs_rsocket_req_n
,
3822 { "Request N", "lbmsrs.rsocket.request_n", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
,HFILL
} },
3823 { &hf_lbmsrs_rsocket_error_code
,
3824 { "Error Code", "lbmsrs.rsocket.error_code", FT_UINT32
, BASE_DEC
,VALS(rSocketErrorCodeNames
), 0x0, NULL
, HFILL
} },
3825 { &hf_lbmsrs_rsocket_keepalive_last_rcvd_pos
,
3826 { "Keepalive Last Received Position","lbmsrs.rsocket.keepalive_last_received_position", FT_UINT64
, BASE_DEC
, NULL
,0x0, NULL
, HFILL
} },
3827 { &hf_lbmsrs_rsocket_resume_token_len
,
3828 { "Resume Token Length", "lbmsrs.rsocket.resume.token.len", FT_UINT16
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3829 { &hf_lbmsrs_rsocket_resume_token
,
3830 { "Resume Token", "lbmsrs.rsocket.resume.token", FT_STRING
, BASE_NONE
, NULL
, 0x0,NULL
, HFILL
} },
3831 /*rsocket related items end*/
3833 /*SRS Registration Request items start*/
3834 { &hf_lbmsrs_app_type
,
3835 { "Application Type", "lbmsrs.registration_request.app_type", FT_UINT8
, BASE_DEC
,VALS(lbmsrsApplicationType
), 0x0, NULL
, HFILL
} },
3836 { &hf_lbmsrs_client_addr
,
3837 { "Client Address", "lbmsrs.registration_request.client_addr", FT_IPv4
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
3838 { &hf_lbmsrs_client_port
,
3839 { "Client Port", "lbmsrs.registration_request.client_port", FT_UINT16
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3840 { &hf_lbmsrs_session_id
,
3841 { "Session ID", "lbmsrs.registration_request.session_id", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3842 { &hf_lbmsrs_host_id
,
3843 { "Host ID", "lbmsrs.registration_request.host_id", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3844 { &hf_lbmsrs_protocol_version
,
3845 { "Protocol Version", "lbmsrs.registration_request.protocol_version", FT_UINT8
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3846 { &hf_lbmsrs_interest_mode
,
3847 { "Interest Mode", "lbmsrs.registration_request.interest_mode", FT_UINT8
, BASE_HEX
,NULL
, 0x0, NULL
, HFILL
} },
3848 { &hf_lbmsrs_interest_mode_advertise_filter
,
3849 { "Filter Advertisements", "lbmsrs.registration_request.interest_mode.advertise_filter", FT_BOOLEAN
, L_LBM_SRS_REGISTRATION_REQUEST_INFO_T_INTEREST_MODE
* 8, TFS(&tfs_set_notset
),LBM_SRS_INTEREST_MODE_SYMBOL_ADVERTISE_FILTER_BIT
, "If set, advertisements are filtered", HFILL
} },
3850 { &hf_lbmsrs_interest_mode_interest_forward
,
3851 { "Forward Interest", "lbmsrs.registration_request.interest_mode.interest_forward", FT_BOOLEAN
, L_LBM_SRS_REGISTRATION_REQUEST_INFO_T_INTEREST_MODE
* 8, TFS(&tfs_set_notset
), LBM_SRS_INTEREST_MODE_SYMBOL_INTEREST_FORWARD_BIT
, "If set, topic interest is forwarded", HFILL
} },
3852 { &hf_lbmsrs_interest_mode_context_name_filter
,
3853 { "Filter Context Names", "lbmsrs.registration_request.interest_mode.context_name_filter", FT_BOOLEAN
, L_LBM_SRS_REGISTRATION_REQUEST_INFO_T_INTEREST_MODE
* 8, TFS(&tfs_set_notset
), LBM_SRS_INTEREST_MODE_CONTEXT_NAME_FILTER_BIT
, "If set, context names are filtered", HFILL
} },
3854 { &hf_lbmsrs_req_local_domain_id
,
3855 { "Local Domain ID", "lbmsrs.registration_request.local_domain_id", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3856 /*SRS Registration Request items end*/
3858 /*SRS Registration Response items start*/
3859 { &hf_lbmsrs_client_id
,
3860 { "Client ID", "lbmsrs.registration_response.client_id", FT_UINT64
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3861 { &hf_lbmsrs_resp_local_domain_id
,
3862 { "Local Domain ID", "lbmsrs.registration_response.local_domain_id", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3863 { &hf_lbmsrs_reg_resp_protocol_version
,
3864 { "Protocol Version", "lbmsrs.registration_response.protocol_version", FT_UINT8
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3865 /*SRS Registration Response items end*/
3867 /*SRS Stream Request items start*/
3868 { &hf_lbmsrs_stream_req_unused
,
3869 { "Unused", "lbmsrs.stream_req.unused", FT_UINT8
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3870 /*SRS Stream Request items end*/
3872 /*SRS Source Info items start*/
3874 { "SIR", "lbmsrs.sir", FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
} },
3875 { &hf_lbmsrs_sir_otid
,
3876 { "OTID", "lbmsrs.sir.otid", FT_BYTES
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
3877 { &hf_lbmsrs_sir_topic_len
,
3878 { "Topic Length", "lbmsrs.sir.topic_len", FT_UINT8
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3879 { &hf_lbmsrs_sir_topic
,
3880 { "Topic", "lbmsrs.sir.topic", FT_STRING
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
3881 { &hf_lbmsrs_sir_source_len
,
3882 { "Source Length", "lbmsrs.sir.source_len", FT_UINT8
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3883 { &hf_lbmsrs_sir_source
,
3884 { "Source", "lbmsrs.sir.source", FT_STRING
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
3885 { &hf_lbmsrs_sir_host_id
,
3886 { "Host ID", "lbmsrs.sir.host_id", FT_UINT32
, BASE_DEC_HEX
,NULL
, 0x0, NULL
, HFILL
} },
3887 { &hf_lbmsrs_sir_topic_idx
,
3888 { "Topic Index", "lbmsrs.sir.topic_idx", FT_UINT32
, BASE_DEC_HEX
,NULL
, 0x0, NULL
, HFILL
} },
3889 { &hf_lbmsrs_sir_functionality_flags
,
3890 { "Functionality Flags", "lbmsrs.sir.functionality_flags", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3891 { &hf_lbmsrs_sir_request_ip
,
3892 { "Request IP", "lbmsrs.sir.request_ip", FT_IPv4
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
3893 { &hf_lbmsrs_sir_request_port
,
3894 { "Request Port", "lbmsrs.sir.request_port", FT_UINT16
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3895 { &hf_lbmsrs_sir_domain_id
,
3896 { "Domain ID", "lbmsrs.sir.domain_id", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3897 { &hf_lbmsrs_sir_encryption
,
3898 { "Encryption", "lbmsrs.sir.encryption", FT_UINT8
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3899 { &hf_lbmsrs_sir_compression
,
3900 { "Compression", "lbmsrs.sir.compression", FT_UINT8
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3901 { &hf_lbmsrs_sir_ulb_src_id
,
3902 { "ULB Source ID", "lbmsrs.sir.ulb_src_id", FT_UINT32
, BASE_DEC_HEX
,NULL
, 0x0, NULL
, HFILL
} },
3903 { &hf_lbmsrs_sir_ulb_queue_id
,
3904 { "ULB Queue ID", "lbmsrs.sir.ulb_queue_id", FT_UINT32
, BASE_DEC_HEX
,NULL
, 0x0, NULL
, HFILL
} },
3905 { &hf_lbmsrs_sir_ulb_reg_id
,
3906 { "ULB Registration ID", "lbmsrs.sir.ulb_reg_id", FT_UINT64
, BASE_DEC_HEX
,NULL
, 0x0, NULL
, HFILL
} },
3907 { &hf_lbmsrs_sir_context_instance
,
3908 { "Context Instance", "lbmsrs.sir.context_instance", FT_BYTES
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
3909 { &hf_lbmsrs_sir_context_type
,
3910 { "Context Type", "lbmsrs.sir.context_type", FT_UINT8
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3911 { &hf_lbmsrs_sir_version
,
3912 { "Version", "lbmsrs.sir.version", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3913 { &hf_lbmsrs_sir_version_flags
,
3914 { "Version Flags", "lbmsrs.sir.version_flags", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3915 { &hf_lbmsrs_sir_ttl
,
3916 { "TTL", "lbmsrs.sir.ttl", FT_UINT16
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3917 { &hf_lbmsrs_sir_cost
,
3918 { "Cost", "lbmsrs.sir.cost", FT_INT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3919 /*SRS Source Info items end*/
3921 /*SRS Source Delete items start*/
3923 { "SDR", "lbmsrs.sdr", FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
} },
3924 { &hf_lbmsrs_sdr_otid
,
3925 { "OTID", "lbmsrs.sdr.otid", FT_BYTES
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
3926 { &hf_lbmsrs_sdr_topic_len
,
3927 { "Topic Length", "lbmsrs.sdr.topic_len", FT_UINT8
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3928 { &hf_lbmsrs_sdr_topic
,
3929 { "Topic", "lbmsrs.sdr.topic", FT_STRING
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
3930 /*SRS Source Delete items end*/
3932 /*SRS Receiver Info items start*/
3934 { "RIR", "lbmsrs.rir", FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
} },
3935 { &hf_lbmsrs_rir_topic_len
,
3936 { "Topic Length", "lbmsrs.rir.topic_len", FT_UINT8
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3937 { &hf_lbmsrs_rir_topic
,
3938 { "Topic", "lbmsrs.rir.topic", FT_STRING
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
3939 { &hf_lbmsrs_rir_domain_id
,
3940 { "Domain ID", "lbmsrs.rir.domain_id", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3941 { &hf_lbmsrs_rir_context_instance
,
3942 { "Context Instance", "lbmsrs.rir.context_instance", FT_BYTES
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
3943 { &hf_lbmsrs_rir_context_type
,
3944 { "Context Type", "lbmsrs.rir.context_type", FT_UINT8
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3945 { &hf_lbmsrs_rir_version
,
3946 { "Version", "lbmsrs.rir.version", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3947 { &hf_lbmsrs_rir_version_flags
,
3948 { "Version Flags", "lbmsrs.rir.version_flags", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3949 { &hf_lbmsrs_rir_reserved
,
3950 { "Reserved", "lbmsrs.rir.reserved", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3951 /*SRS Receiver Info items end*/
3953 /*SRS Receiver Delete Info items start*/
3955 { "RDR", "lbmsrs.rdr", FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
} },
3956 { &hf_lbmsrs_rdr_topic_len
,
3957 { "Topic Length", "lbmsrs.rdr.topic_len", FT_UINT8
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3958 { &hf_lbmsrs_rdr_topic
,
3959 { "Topic", "lbmsrs.rdr.topic", FT_STRING
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
3960 { &hf_lbmsrs_rdr_domain_id
,
3961 { "Domain ID", "lbmsrs.rdr.domain_id", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3962 { &hf_lbmsrs_rdr_context_instance
,
3963 { "Context Instance", "lbmsrs.rdr.context_instance", FT_BYTES
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
3964 { &hf_lbmsrs_rdr_context_type
,
3965 { "Context Type", "lbmsrs.rdr.context_type", FT_UINT8
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3966 { &hf_lbmsrs_rdr_version
,
3967 { "Version", "lbmsrs.rdr.version", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3968 { &hf_lbmsrs_rdr_version_flags
,
3969 { "Version Flags", "lbmsrs.rdr.version_flags", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3970 { &hf_lbmsrs_rdr_reserved
,
3971 { "Reserved", "lbmsrs.rdr.reserved", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3972 /*SRS Receiver Delete items end*/
3974 /*SRS Receiver End Info items start*/
3976 { "RER", "lbmsrs.rer", FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
} },
3977 { &hf_lbmsrs_rer_topic_len
,
3978 { "Topic Length", "lbmsrs.rer.topic_len", FT_UINT8
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3979 { &hf_lbmsrs_rer_topic
,
3980 { "Topic", "lbmsrs.rer.topic", FT_STRING
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
3981 { &hf_lbmsrs_rer_domain_id
,
3982 { "Domain ID", "lbmsrs.rer.domain_id", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3983 { &hf_lbmsrs_rer_context_instance
,
3984 { "Context Instance", "lbmsrs.rer.context_instance", FT_BYTES
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
3985 { &hf_lbmsrs_rer_context_type
,
3986 { "Context Type", "lbmsrs.rer.context_type", FT_UINT8
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3987 { &hf_lbmsrs_rer_version
,
3988 { "Version", "lbmsrs.rer.version", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3989 { &hf_lbmsrs_rer_version_flags
,
3990 { "Version Flags", "lbmsrs.rer.version_flags", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3991 { &hf_lbmsrs_rer_reserved
,
3992 { "Reserved", "lbmsrs.rer.reserved", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
3993 /*SRS Receiver End items end*/
3996 /*SRS Wildcard Receiver Info items start*/
3998 { "WIR", "lbmsrs.wir", FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
} },
3999 { &hf_lbmsrs_wir_pattern_len
,
4000 { "Topic Length", "lbmsrs.wir.pattern_len", FT_UINT8
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4001 { &hf_lbmsrs_wir_pattern
,
4002 { "Topic", "lbmsrs.wir.pattern", FT_STRING
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
4003 { &hf_lbmsrs_wir_domain_id
,
4004 { "Domain ID", "lbmsrs.wir.domain_id", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4005 { &hf_lbmsrs_wir_context_instance
,
4006 { "Context Instance", "lbmsrs.wir.context_instance", FT_BYTES
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
4007 { &hf_lbmsrs_wir_context_type
,
4008 { "Context Type", "lbmsrs.wir.context_type", FT_UINT8
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4009 { &hf_lbmsrs_wir_version
,
4010 { "Version", "lbmsrs.wir.version", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4011 { &hf_lbmsrs_wir_version_flags
,
4012 { "Version Flags", "lbmsrs.wir.version_flags", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4013 { &hf_lbmsrs_wir_reserved
,
4014 { "Reserved", "lbmsrs.wir.reserved", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4015 /*SRS Wildcard Receiver Info items end*/
4017 /*SRS Wildcard Receiver Delete Info items start*/
4019 { "WDR", "lbmsrs.wdr", FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
} },
4020 { &hf_lbmsrs_wdr_pattern_len
,
4021 { "Topic Length", "lbmsrs.wdr.pattern_len", FT_UINT8
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4022 { &hf_lbmsrs_wdr_pattern
,
4023 { "Topic", "lbmsrs.wdr.pattern", FT_STRING
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
4024 { &hf_lbmsrs_wdr_domain_id
,
4025 { "Domain ID", "lbmsrs.wdr.domain_id", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4026 { &hf_lbmsrs_wdr_context_instance
,
4027 { "Context Instance", "lbmsrs.wdr.context_instance", FT_BYTES
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
4028 { &hf_lbmsrs_wdr_context_type
,
4029 { "Context Type", "lbmsrs.wdr.context_type", FT_UINT8
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4030 { &hf_lbmsrs_wdr_version
,
4031 { "Version", "lbmsrs.wdr.version", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4032 { &hf_lbmsrs_wdr_version_flags
,
4033 { "Version Flags", "lbmsrs.wdr.version_flags", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4034 { &hf_lbmsrs_wdr_reserved
,
4035 { "Reserved", "lbmsrs.wdr.reserved", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4036 /*SRS Wildcard Receiver Delete items end*/
4038 /*SRS Wildcard Receiver End Info items start*/
4040 { "WER", "lbmsrs.wer", FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
} },
4041 { &hf_lbmsrs_wer_pattern_len
,
4042 { "Topic Length", "lbmsrs.wer.pattern_len", FT_UINT8
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4043 { &hf_lbmsrs_wer_pattern
,
4044 { "Topic", "lbmsrs.wer.pattern", FT_STRING
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
4045 { &hf_lbmsrs_wer_domain_id
,
4046 { "Domain ID", "lbmsrs.wer.domain_id", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4047 { &hf_lbmsrs_wer_context_instance
,
4048 { "Context Instance", "lbmsrs.wer.context_instance", FT_BYTES
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
4049 { &hf_lbmsrs_wer_context_type
,
4050 { "Context Type", "lbmsrs.wer.context_type", FT_UINT8
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4051 { &hf_lbmsrs_wer_version
,
4052 { "Version", "lbmsrs.wer.version", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4053 { &hf_lbmsrs_wer_version_flags
,
4054 { "Version Flags", "lbmsrs.wer.version_flags", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4055 { &hf_lbmsrs_wer_reserved
,
4056 { "Reserved", "lbmsrs.wer.reserved", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4057 /*SRS Wildcard Receiver End items end*/
4059 /*SRS Source Leave Info items start*/
4061 { "SLI", "lbmsrs.sli", FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
} },
4062 { &hf_lbmsrs_sli_otid
,
4063 { "OTID", "lbmsrs.sli.otid", FT_BYTES
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
4064 { &hf_lbmsrs_sli_topic_len
,
4065 { "Topic Length", "lbmsrs.sli.topic_len", FT_UINT8
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4066 { &hf_lbmsrs_sli_topic
,
4067 { "Topic", "lbmsrs.sli.topic", FT_STRING
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
4068 { &hf_lbmsrs_sli_source_len
,
4069 { "Source Length", "lbmsrs.sli.source_len", FT_UINT8
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4070 { &hf_lbmsrs_sli_source
,
4071 { "Source", "lbmsrs.sli.source", FT_STRING
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
4072 { &hf_lbmsrs_sli_context_instance
,
4073 { "Context Instance", "lbmsrs.sli.context_instance", FT_BYTES
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
4074 { &hf_lbmsrs_sli_context_type
,
4075 { "Context Type", "lbmsrs.sli.context_type", FT_UINT8
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4076 { &hf_lbmsrs_sli_version
,
4077 { "Version", "lbmsrs.sli.version", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4078 { &hf_lbmsrs_sli_version_flags
,
4079 { "Version Flags", "lbmsrs.sli.version_flags", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4080 { &hf_lbmsrs_sli_reserved
,
4081 { "Reserved", "lbmsrs.sli.reserved", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4082 /*SRS Source Leave Info items end*/
4084 /*SRS Route Info items start*/
4086 { "RTI", "lbmsrs.rti", FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
} },
4087 { &hf_lbmsrs_rti_num_domains
,
4088 { "Number of domains", "lbmsrs.rti.num_domains", FT_UINT16
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4089 { &hf_lbmsrs_rti_domains
,
4090 { "Domains", "lbmsrs.rti.domains", FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
} },
4091 { &hf_lbmsrs_rti_domain
,
4092 { "Domain", "lbmsrs.rti.domains.domain", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4093 { &hf_lbmsrs_rti_ip
,
4094 { "IP", "lbmsrs.rti.ip", FT_IPv4
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
4095 { &hf_lbmsrs_rti_port
,
4096 { "Port", "lbmsrs.rti.port", FT_UINT16
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4097 { &hf_lbmsrs_rti_context_instance
,
4098 { "Context Instance", "lbmsrs.rti.context_instance", FT_BYTES
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
4099 { &hf_lbmsrs_rti_context_type
,
4100 { "Context Type", "lbmsrs.rti.context_type", FT_UINT8
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4101 { &hf_lbmsrs_rti_version
,
4102 { "Version", "lbmsrs.rti.version", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4103 { &hf_lbmsrs_rti_version_flags
,
4104 { "Version Flags", "lbmsrs.rti.version_flags", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4105 { &hf_lbmsrs_rti_route_index
,
4106 { "Route Index", "lbmsrs.rti.route_index", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
} },
4107 { &hf_lbmsrs_rti_reserved
,
4108 { "Reserved", "lbmsrs.rti.reserved", FT_UINT16
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4109 /*SRS Route Info items end*/
4111 /*SRS Route End items start*/
4113 { "RTE", "lbmsrs.rte", FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
} },
4114 { &hf_lbmsrs_rte_num_domains
,
4115 { "Number of domains", "lbmsrs.rte.num_domains", FT_UINT16
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4116 { &hf_lbmsrs_rte_domains
,
4117 { "Domains", "lbmsrs.rte.domains", FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
} },
4118 { &hf_lbmsrs_rte_domain
,
4119 { "Domain", "lbmsrs.rte.domains.domain", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4120 { &hf_lbmsrs_rte_ip
,
4121 { "IP", "lbmsrs.rte.ip", FT_IPv4
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
4122 { &hf_lbmsrs_rte_port
,
4123 { "Port", "lbmsrs.rte.port", FT_UINT16
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4124 { &hf_lbmsrs_rte_context_instance
,
4125 { "Context Instance", "lbmsrs.rte.context_instance", FT_BYTES
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
4126 { &hf_lbmsrs_rte_context_type
,
4127 { "Context Type", "lbmsrs.rte.context_type", FT_UINT8
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4128 { &hf_lbmsrs_rte_version
,
4129 { "Version", "lbmsrs.rte.version", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4130 { &hf_lbmsrs_rte_version_flags
,
4131 { "Version Flags", "lbmsrs.rte.version_flags", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4132 { &hf_lbmsrs_rte_route_index
,
4133 { "Route Index", "lbmsrs.rte.route_index", FT_UINT16
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4134 { &hf_lbmsrs_rte_reserved
,
4135 { "Reserved", "lbmsrs.rte.reserved", FT_UINT16
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4136 /*SRS Route End items end*/
4138 /*SRS Domain Info items start*/
4140 { "DMI", "lbmsrs.dmi", FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
} },
4141 { &hf_lbmsrs_dmi_domain_id
,
4142 { "Domain Id", "lbmsrs.dmi.domain_id", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4143 { &hf_lbmsrs_dmi_context_instance
,
4144 { "Context Instance", "lbmsrs.dmi.context_instance", FT_BYTES
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
4145 { &hf_lbmsrs_dmi_context_type
,
4146 { "Context Type", "lbmsrs.dmi.context_type", FT_UINT8
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4147 { &hf_lbmsrs_dmi_version
,
4148 { "Version", "lbmsrs.dmi.version", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4149 { &hf_lbmsrs_dmi_version_flags
,
4150 { "Version Flags", "lbmsrs.dmi.version_flags", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4151 { &hf_lbmsrs_dmi_reserved
,
4152 { "Reserved", "lbmsrs.dmi.reserved", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4153 /*SRS Domain Info items end*/
4155 /*SRS Context Name Query items start*/
4157 { "CNQ", "lbmsrs.cnq", FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
} },
4158 { &hf_lbmsrs_cnq_name_len
,
4159 { "Name Length", "lbmsrs.cnq.name_len", FT_UINT8
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4160 { &hf_lbmsrs_cnq_name
,
4161 { "Name", "lbmsrs.cnq.name", FT_STRING
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
4162 { &hf_lbmsrs_cnq_domain_id
,
4163 { "Domain Id", "lbmsrs.cnq.domain_id", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4164 { &hf_lbmsrs_cnq_context_instance
,
4165 { "Context Instance", "lbmsrs.cnq.context_instance", FT_BYTES
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
4166 { &hf_lbmsrs_cnq_context_type
,
4167 { "Context Type", "lbmsrs.cnq.context_type", FT_UINT8
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4168 { &hf_lbmsrs_cnq_version
,
4169 { "Version", "lbmsrs.cnq.version", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4170 { &hf_lbmsrs_cnq_version_flags
,
4171 { "Version Flags", "lbmsrs.cnq.version_flags", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4172 { &hf_lbmsrs_cnq_reserved
,
4173 { "Reserved", "lbmsrs.cnq.reserved", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4174 /*SRS Context Name Query items end*/
4176 /*SRS Context Name Info items start*/
4178 { "CNI", "lbmsrs.cni", FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
} },
4179 { &hf_lbmsrs_cni_name_len
,
4180 { "Name Length", "lbmsrs.cni.name_len", FT_UINT8
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4181 { &hf_lbmsrs_cni_name
,
4182 { "Name", "lbmsrs.cni.name", FT_STRING
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
4183 { &hf_lbmsrs_cni_domain_id
,
4184 { "Domain Id", "lbmsrs.cni.domain_id", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4185 { &hf_lbmsrs_cni_ip
,
4186 { "IP", "lbmsrs.cni.ip", FT_IPv4
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
4187 { &hf_lbmsrs_cni_port
,
4188 { "Port", "lbmsrs.cni.port", FT_UINT16
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4189 { &hf_lbmsrs_cni_origin_context_instance
,
4190 { "Origin Context Instance", "lbmsrs.cni.origin_context_instance", FT_BYTES
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
4191 { &hf_lbmsrs_cni_context_instance
,
4192 { "Context Instance", "lbmsrs.cni.context_instance", FT_BYTES
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
4193 { &hf_lbmsrs_cni_context_type
,
4194 { "Context Type", "lbmsrs.cni.context_type", FT_UINT8
, BASE_DEC
, VALS(lbmsrsContextType
), 0x0, NULL
, HFILL
} },
4195 { &hf_lbmsrs_cni_version
,
4196 { "Version", "lbmsrs.cni.version", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4197 { &hf_lbmsrs_cni_version_flags
,
4198 { "Version Flags", "lbmsrs.cni.version_flags", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4199 { &hf_lbmsrs_cni_reserved
,
4200 { "Reserved", "lbmsrs.cni.reserved", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4201 /*SRS Context Name Info items end*/
4203 /*SRS Context Name End items start*/
4205 { "CNE", "lbmsrs.cne", FT_NONE
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
} },
4206 { &hf_lbmsrs_cne_name_len
,
4207 { "Name Length", "lbmsrs.cne.name_len", FT_UINT8
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4208 { &hf_lbmsrs_cne_name
,
4209 { "Name", "lbmsrs.cne.name", FT_STRING
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
4210 { &hf_lbmsrs_cne_domain_id
,
4211 { "Domain Id", "lbmsrs.cne.domain_id", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4212 { &hf_lbmsrs_cne_ip
,
4213 { "IP", "lbmsrs.cne.ip", FT_IPv4
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
4214 { &hf_lbmsrs_cne_port
,
4215 { "Port", "lbmsrs.cne.port", FT_UINT16
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4216 { &hf_lbmsrs_cne_origin_context_instance
,
4217 { "Origin Context Instance", "lbmsrs.cne.origin_context_instance", FT_BYTES
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
4218 { &hf_lbmsrs_cne_context_instance
,
4219 { "Context Instance", "lbmsrs.cne.context_instance", FT_BYTES
, BASE_NONE
,NULL
, 0x0, NULL
, HFILL
} },
4220 { &hf_lbmsrs_cne_context_type
,
4221 { "Context Type", "lbmsrs.cne.context_type", FT_UINT8
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4222 { &hf_lbmsrs_cne_version
,
4223 { "Version", "lbmsrs.cne.version", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4224 { &hf_lbmsrs_cne_version_flags
,
4225 { "Version Flags", "lbmsrs.cne.version_flags", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} },
4226 { &hf_lbmsrs_cne_reserved
,
4227 { "Reserved", "lbmsrs.cne.reserved", FT_UINT32
, BASE_DEC
,NULL
, 0x0, NULL
, HFILL
} }
4228 /*SRS Context Name End items end*/
4235 &ett_lbmsrs_rsocket_frame
,
4237 &ett_lbmsrs_details
,
4249 &ett_lbmsrs_rti_domains
,
4251 &ett_lbmsrs_rte_domains
,
4256 &ett_lbmsrs_interest_mode
4259 static ei_register_info ei
[] =
4261 { &ei_lbmsrs_analysis_invalid_msg_id
, { "lbmsrs.analysis.invalid_msg_id", PI_MALFORMED
, PI_ERROR
, "Invalid LBMSRS Message Id", EXPFILL
} }
4263 proto_lbmsrs
= proto_register_protocol("LBM Stateful Resolution Service Protocol", "LBMSRS", "lbmsrs");
4264 proto_register_field_array(proto_lbmsrs
, hf
, array_length(hf
));
4265 proto_register_subtree_array(ett
, array_length(ett
));
4267 expert_module_t
*expert_lbmsrs
= expert_register_protocol(proto_lbmsrs
);
4268 expert_register_field_array(expert_lbmsrs
, ei
, array_length(ei
));
4270 lbmsrs_dissector_handle
= register_dissector("lbmsrs", dissect_lbmsrs
, proto_lbmsrs
);
4272 /*Set the preference menu items*/
4273 module_t
* lbmsrs_module
= prefs_register_protocol_subtree("29West", proto_lbmsrs
, proto_reg_handoff_lbmsrs
);
4276 ws_inet_pton4(LBMSRS_DEFAULT_SOURCE_IP
, &addr
);
4277 lbmsrs_source_ip_address
= g_ntohl(addr
);
4278 prefs_register_string_preference(lbmsrs_module
,
4279 "source_ip_address",
4280 "Source IP address (default " LBMSRS_DEFAULT_SOURCE_IP
")",
4281 "Set the LBMSRS IP Address",
4282 &global_lbmsrs_source_ip_address
);
4284 prefs_register_uint_preference(lbmsrs_module
,
4286 "Source port (default " MAKESTRING(LBMSRS_DEFAULT_SOURCE_PORT
)")",
4287 "Set the source TCP port",
4289 &global_lbmsrs_source_port
);
4291 prefs_register_bool_preference(lbmsrs_module
,
4292 "use_lbmsrs_domain",
4293 "Use LBMSRS tag table",
4294 "Use table of LBMSRS tags to decode the packet instead of above values",
4295 &global_lbmsrs_use_tag
);
4297 uat_t
*tag_uat
= uat_new("LBMSRS tag definitions",
4298 sizeof(lbmsrs_tag_entry_t
),
4301 (void * *)&lbmsrs_tag_entry
,
4303 UAT_AFFECTS_DISSECTION
,
4306 lbmsrs_tag_update_cb
,
4312 /*add the tag edit table*/
4313 prefs_register_uat_preference(lbmsrs_module
,
4316 "A table to define LBMSRS tags",
4320 void proto_reg_handoff_lbmsrs(void)
4322 static bool already_registered
= false;
4325 if (!already_registered
)
4327 lbmsrs_dissector_handle
= create_dissector_handle(dissect_lbmsrs
, proto_lbmsrs
);
4328 dissector_add_for_decode_as_with_preference("tcp.port", lbmsrs_dissector_handle
);
4329 heur_dissector_add("tcp", test_lbmsrs_packet
, "LBM Stateful Resolution Service over RSocket", "lbmsrs_tcp", proto_lbmsrs
, HEURISTIC_ENABLE
);
4332 ws_inet_pton4(global_lbmsrs_source_ip_address
, &addr
);
4333 lbmsrs_source_ip_address
= g_ntohl(addr
);
4334 lbmsrs_source_port
= global_lbmsrs_source_port
;
4335 lbmsrs_use_tag
= global_lbmsrs_use_tag
;
4336 already_registered
= true;
4339 * Editor modelines - https://www.wireshark.org/tools/modelines.html
4344 * indent-tabs-mode: nil
4347 * vi: set shiftwidth=4 tabstop=8 expandtab:
4348 * :indentSize=4:tabSize=8:noTabs=true: