1 /* packet-lbmr.c
2 * Routines for LBM Topic Resolution Packet dissection
3 *
4 * Copyright (c) 2005-2014 Informatica Corporation. All Rights Reserved.
5 *
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
9 *
10 * SPDX-License-Identifier: GPL-2.0-or-later
11 */
12
13 #include "config.h"
14
15 #include <epan/packet.h>
16 #include <epan/address.h>
17 #include <epan/strutil.h>
18 #include <epan/prefs.h>
19 #include <epan/tap.h>
20 #include <epan/stats_tree.h>
21 #include <epan/expert.h>
22 #include <epan/uat.h>
23 #include <epan/to_str.h>
24 #include <wsutil/pint.h>
25 #include "packet-lbm.h"
26 #include "packet-lbtru.h"
27 #include "packet-lbtrm.h"
28 #include "packet-lbttcp.h"
29
30 #define LBMR_MAX_NAMELEN 256
31
32 void proto_register_lbmr(void);
33 void proto_reg_handoff_lbmr(void);
34
35 /*----------------------------------------------------------------------------*/
36 /* LBT-IPC transport management. */
37 /*----------------------------------------------------------------------------*/
38
39 typedef struct
40 {
41 guint32 host_id;
42 guint32 session_id;
43 guint16 xport_id;
44 guint64 channel;
45 } lbtipc_transport_t;
46
47 static wmem_tree_t * lbtipc_transport_table = NULL;
48
49 #define LBTIPC_KEY_ELEMENT_COUNT 3
50 #define LBTIPC_KEY_ELEMENT_HOST_ID 0
51 #define LBTIPC_KEY_ELEMENT_SESSION_ID 1
52 #define LBTIPC_KEY_ELEMENT_XPORT_ID 2
53
lbtipc_transport_init(void)54 static void lbtipc_transport_init(void)
55 {
56 lbtipc_transport_table = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
57 }
58
lbtipc_transport_find(guint32 host_id,guint32 session_id,guint16 xport_id)59 static lbtipc_transport_t * lbtipc_transport_find(guint32 host_id, guint32 session_id, guint16 xport_id)
60 {
61 lbtipc_transport_t * entry = NULL;
62 guint32 keyval[LBTIPC_KEY_ELEMENT_COUNT];
63 wmem_tree_key_t tkey[2];
64
65 keyval[LBTIPC_KEY_ELEMENT_HOST_ID] = host_id;
66 keyval[LBTIPC_KEY_ELEMENT_SESSION_ID] = session_id;
67 keyval[LBTIPC_KEY_ELEMENT_XPORT_ID] = (guint32) xport_id;
68 tkey[0].length = LBTIPC_KEY_ELEMENT_COUNT;
69 tkey[0].key = keyval;
70 tkey[1].length = 0;
71 tkey[1].key = NULL;
72 entry = (lbtipc_transport_t *) wmem_tree_lookup32_array(lbtipc_transport_table, tkey);
73 return (entry);
74 }
75
lbtipc_transport_add(guint32 host_id,guint32 session_id,guint16 xport_id)76 static lbtipc_transport_t * lbtipc_transport_add(guint32 host_id, guint32 session_id, guint16 xport_id)
77 {
78 lbtipc_transport_t * entry;
79 guint32 keyval[LBTIPC_KEY_ELEMENT_COUNT];
80 wmem_tree_key_t tkey[2];
81
82 entry = lbtipc_transport_find(host_id, session_id, xport_id);
83 if (entry != NULL)
84 {
85 return (entry);
86 }
87 entry = wmem_new(wmem_file_scope(), lbtipc_transport_t);
88 entry->host_id = host_id;
89 entry->session_id = session_id;
90 entry->xport_id = xport_id;
91 entry->channel = lbm_channel_assign(LBM_CHANNEL_TRANSPORT_LBTIPC);
92 keyval[LBTIPC_KEY_ELEMENT_HOST_ID] = host_id;
93 keyval[LBTIPC_KEY_ELEMENT_SESSION_ID] = session_id;
94 keyval[LBTIPC_KEY_ELEMENT_XPORT_ID] = (guint32) xport_id;
95 tkey[0].length = LBTIPC_KEY_ELEMENT_COUNT;
96 tkey[0].key = keyval;
97 tkey[1].length = 0;
98 tkey[1].key = NULL;
99 wmem_tree_insert32_array(lbtipc_transport_table, tkey, (void *) entry);
100 return (entry);
101 }
102
lbtipc_transport_source_string(guint32 host_id _U_,guint32 session_id,guint16 xport_id)103 static char * lbtipc_transport_source_string(guint32 host_id _U_, guint32 session_id, guint16 xport_id)
104 {
105 return (wmem_strdup_printf(wmem_file_scope(), "LBT-IPC:%x:%" G_GUINT16_FORMAT, session_id, xport_id));
106 }
107
108 /*----------------------------------------------------------------------------*/
109 /* LBT-SMX transport management. */
110 /*----------------------------------------------------------------------------*/
111
112 typedef struct
113 {
114 guint32 host_id;
115 guint32 session_id;
116 guint16 xport_id;
117 guint64 channel;
118 } lbtsmx_transport_t;
119
120 static wmem_tree_t * lbtsmx_transport_table = NULL;
121
122 #define LBTSMX_KEY_ELEMENT_COUNT 3
123 #define LBTSMX_KEY_ELEMENT_HOST_ID 0
124 #define LBTSMX_KEY_ELEMENT_SESSION_ID 1
125 #define LBTSMX_KEY_ELEMENT_XPORT_ID 2
126
lbtsmx_transport_init(void)127 static void lbtsmx_transport_init(void)
128 {
129 lbtsmx_transport_table = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
130 }
131
lbtsmx_transport_find(guint32 host_id,guint32 session_id,guint16 xport_id)132 static lbtsmx_transport_t * lbtsmx_transport_find(guint32 host_id, guint32 session_id, guint16 xport_id)
133 {
134 lbtsmx_transport_t * entry = NULL;
135 guint32 keyval[LBTSMX_KEY_ELEMENT_COUNT];
136 wmem_tree_key_t tkey[2];
137
138 keyval[LBTSMX_KEY_ELEMENT_HOST_ID] = host_id;
139 keyval[LBTSMX_KEY_ELEMENT_SESSION_ID] = session_id;
140 keyval[LBTSMX_KEY_ELEMENT_XPORT_ID] = (guint32) xport_id;
141 tkey[0].length = LBTSMX_KEY_ELEMENT_COUNT;
142 tkey[0].key = keyval;
143 tkey[1].length = 0;
144 tkey[1].key = NULL;
145 entry = (lbtsmx_transport_t *) wmem_tree_lookup32_array(lbtsmx_transport_table, tkey);
146 return (entry);
147 }
148
lbtsmx_transport_add(guint32 host_id,guint32 session_id,guint16 xport_id)149 static lbtsmx_transport_t * lbtsmx_transport_add(guint32 host_id, guint32 session_id, guint16 xport_id)
150 {
151 lbtsmx_transport_t * entry;
152 guint32 keyval[LBTSMX_KEY_ELEMENT_COUNT];
153 wmem_tree_key_t tkey[2];
154
155 entry = lbtsmx_transport_find(host_id, session_id, xport_id);
156 if (entry != NULL)
157 {
158 return (entry);
159 }
160 entry = wmem_new(wmem_file_scope(), lbtsmx_transport_t);
161 entry->host_id = host_id;
162 entry->session_id = session_id;
163 entry->xport_id = xport_id;
164 entry->channel = lbm_channel_assign(LBM_CHANNEL_TRANSPORT_LBTSMX);
165 keyval[LBTSMX_KEY_ELEMENT_HOST_ID] = host_id;
166 keyval[LBTSMX_KEY_ELEMENT_SESSION_ID] = session_id;
167 keyval[LBTSMX_KEY_ELEMENT_XPORT_ID] = (guint32) xport_id;
168 tkey[0].length = LBTSMX_KEY_ELEMENT_COUNT;
169 tkey[0].key = keyval;
170 tkey[1].length = 0;
171 tkey[1].key = NULL;
172 wmem_tree_insert32_array(lbtsmx_transport_table, tkey, (void *) entry);
173 return (entry);
174 }
175
lbtsmx_transport_source_string(guint32 host_id _U_,guint32 session_id,guint16 xport_id)176 static char * lbtsmx_transport_source_string(guint32 host_id _U_, guint32 session_id, guint16 xport_id)
177 {
178 return (wmem_strdup_printf(wmem_file_scope(), "LBT-SMX:%x:%" G_GUINT16_FORMAT, session_id, xport_id));
179 }
180
181 /*----------------------------------------------------------------------------*/
182 /* LBT-RDMA transport management. */
183 /*----------------------------------------------------------------------------*/
184
185 typedef struct
186 {
187 address source_address;
188 guint32 session_id;
189 guint16 port;
190 guint64 channel;
191 } lbtrdma_transport_t;
192
193 static wmem_tree_t * lbtrdma_transport_table = NULL;
194
195 #define LBTRDMA_KEY_ELEMENT_COUNT 3
196 #define LBTRDMA_KEY_ELEMENT_SOURCE_ADDRESS 0
197 #define LBTRDMA_KEY_ELEMENT_SESSION_ID 1
198 #define LBTRDMA_KEY_ELEMENT_PORT 2
199
lbtrdma_transport_init(void)200 static void lbtrdma_transport_init(void)
201 {
202 lbtrdma_transport_table = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
203 }
204
lbtrdma_transport_build_key(guint32 * key_value,wmem_tree_key_t * key,const lbtrdma_transport_t * transport)205 static void lbtrdma_transport_build_key(guint32 * key_value, wmem_tree_key_t * key, const lbtrdma_transport_t * transport)
206 {
207 guint32 val;
208
209 memcpy(&val, transport->source_address.data, sizeof(guint32));
210 key_value[LBTRDMA_KEY_ELEMENT_SOURCE_ADDRESS] = val;
211 key_value[LBTRDMA_KEY_ELEMENT_SESSION_ID] = transport->session_id;
212 key_value[LBTRDMA_KEY_ELEMENT_PORT] = (guint32) transport->port;
213 key[0].length = LBTRDMA_KEY_ELEMENT_COUNT;
214 key[0].key = key_value;
215 key[1].length = 0;
216 key[1].key = NULL;
217 }
218
lbtrdma_transport_find(const address * source_address,guint32 session_id,guint16 port)219 static lbtrdma_transport_t * lbtrdma_transport_find(const address * source_address, guint32 session_id, guint16 port)
220 {
221 lbtrdma_transport_t key;
222 lbtrdma_transport_t * entry = NULL;
223 guint32 keyval[LBTRDMA_KEY_ELEMENT_COUNT];
224 wmem_tree_key_t tkey[2];
225
226 memset((void *)&key, 0, sizeof(lbtrdma_transport_t));
227 copy_address_shallow(&(key.source_address), source_address);
228 key.session_id = session_id;
229 key.port = port;
230 lbtrdma_transport_build_key(keyval, tkey, &key);
231 entry = (lbtrdma_transport_t *) wmem_tree_lookup32_array(lbtrdma_transport_table, tkey);
232 return (entry);
233 }
234
lbtrdma_transport_add(const address * source_address,guint32 session_id,guint16 port)235 static lbtrdma_transport_t * lbtrdma_transport_add(const address * source_address, guint32 session_id, guint16 port)
236 {
237 lbtrdma_transport_t * entry;
238 guint32 keyval[LBTRDMA_KEY_ELEMENT_COUNT];
239 wmem_tree_key_t tkey[2];
240
241 entry = lbtrdma_transport_find(source_address, session_id, port);
242 if (entry != NULL)
243 {
244 return (entry);
245 }
246 entry = wmem_new(wmem_file_scope(), lbtrdma_transport_t);
247 copy_address_wmem(wmem_file_scope(), &(entry->source_address), source_address);
248 entry->session_id = session_id;
249 entry->port = port;
250 entry->channel = lbm_channel_assign(LBM_CHANNEL_TRANSPORT_LBTRDMA);
251 lbtrdma_transport_build_key(keyval, tkey, entry);
252 wmem_tree_insert32_array(lbtrdma_transport_table, tkey, (void *) entry);
253 return (entry);
254 }
255
lbtrdma_transport_source_string(const address * source_address _U_,guint32 session_id,guint16 port)256 static char * lbtrdma_transport_source_string(const address * source_address _U_, guint32 session_id, guint16 port)
257 {
258 return (wmem_strdup_printf(wmem_file_scope(), "LBT-RDMA:%x:%" G_GUINT16_FORMAT, session_id, port));
259 }
260
261 /*----------------------------------------------------------------------------*/
262 /* Packet layouts. */
263 /*----------------------------------------------------------------------------*/
264
265 /* LBMR main header. */
266 typedef struct
267 {
268 lbm_uint8_t ver_type;
269 lbm_uint8_t tqrs;
270 lbm_uint16_t tirs;
271 } lbmr_hdr_t;
272 #define O_LBMR_HDR_T_VER_TYPE OFFSETOF(lbmr_hdr_t, ver_type)
273 #define L_LBMR_HDR_T_VER_TYPE SIZEOF(lbmr_hdr_t, ver_type)
274 #define O_LBMR_HDR_T_TQRS OFFSETOF(lbmr_hdr_t, tqrs)
275 #define L_LBMR_HDR_T_TQRS SIZEOF(lbmr_hdr_t, tqrs)
276 #define O_LBMR_HDR_T_TIRS OFFSETOF(lbmr_hdr_t, tirs)
277 #define L_LBMR_HDR_T_TIRS SIZEOF(lbmr_hdr_t, tirs)
278 #define L_LBMR_HDR_T (gint) sizeof(lbmr_hdr_t)
279
280 #define LBMR_HDR_VER_VER_MASK 0xf0
281 #define LBMR_HDR_VER_TYPE_MASK 0x07
282 #define LBMR_HDR_VER(x) (((x) & LBMR_HDR_VER_VER_MASK) >> 4)
283 #define LBMR_HDR_TYPE(x) ((x) & LBMR_HDR_VER_TYPE_MASK)
284
285 #define LBMR_HDR_TYPE_NORMAL 0x0
286 #define LBMR_HDR_TYPE_WC_TQRS 0x1
287 #define LBMR_HDR_TYPE_UCAST_RCV_ALIVE 0x2
288 #define LBMR_HDR_TYPE_UCAST_SRC_ALIVE 0x3
289 #define LBMR_HDR_TYPE_TOPIC_MGMT 0x4
290 #define LBMR_HDR_TYPE_QUEUE_RES 0x6
291 #define LBMR_HDR_TYPE_EXT 0x7
292 #define LBMR_HDR_TYPE_OPTS_MASK 0x8
293
294 /* LBMR extended header. */
295 typedef struct
296 {
297 lbm_uint8_t ver_type;
298 lbm_uint8_t ext_type;
299 lbm_uint16_t dep;
300 } lbmr_hdr_ext_type_t;
301 #define O_LBMR_HDR_EXT_TYPE_T_VER_TYPE OFFSETOF(lbmr_hdr_ext_type_t, ver_type)
302 #define L_LBMR_HDR_EXT_TYPE_T_VER_TYPE SIZEOF(lbmr_hdr_ext_type_t, ver_type)
303 #define O_LBMR_HDR_EXT_TYPE_T_EXT_TYPE OFFSETOF(lbmr_hdr_ext_type_t, ext_type)
304 #define L_LBMR_HDR_EXT_TYPE_T_EXT_TYPE SIZEOF(lbmr_hdr_ext_type_t, ext_type)
305 #define O_LBMR_HDR_EXT_TYPE_T_DEP OFFSETOF(lbmr_hdr_ext_type_t, dep)
306 #define L_LBMR_HDR_EXT_TYPE_T_DEP SIZEOF(lbmr_hdr_ext_type_t, dep)
307 #define L_LBMR_HDR_EXT_TYPE_T (gint) sizeof(lbmr_hdr_ext_type_t)
308
309 #define LBMR_HDR_EXT_TYPE_UME_PROXY_SRC_ELECT 0x1
310 #define LBMR_HDR_EXT_TYPE_UMQ_QUEUE_MGMT 0x2
311 #define LBMR_HDR_EXT_TYPE_CONTEXT_INFO 0x3
312 #define LBMR_HDR_EXT_TYPE_TOPIC_RES_REQUEST 0x4
313 #define LBMR_HDR_EXT_TYPE_TNWG_MSG 0x5
314 #define LBMR_HDR_EXT_TYPE_REMOTE_DOMAIN_ROUTE 0x6
315 #define LBMR_HDR_EXT_TYPE_REMOTE_CONTEXT_INFO 0x7
316
317 /* LBMR topic information record */
318 typedef struct
319 {
320 lbm_uint8_t transport;
321 lbm_uint8_t tlen;
322 lbm_uint16_t ttl;
323 lbm_uint32_t idx;
324 } lbmr_tir_t;
325 #define O_LBMR_TIR_T_TRANSPORT OFFSETOF(lbmr_tir_t, transport)
326 #define L_LBMR_TIR_T_TRANSPORT SIZEOF(lbmr_tir_t, transport)
327 #define O_LBMR_TIR_T_TLEN OFFSETOF(lbmr_tir_t, tlen)
328 #define L_LBMR_TIR_T_TLEN SIZEOF(lbmr_tir_t, tlen)
329 #define O_LBMR_TIR_T_TTL OFFSETOF(lbmr_tir_t, ttl)
330 #define L_LBMR_TIR_T_TTL SIZEOF(lbmr_tir_t, ttl)
331 #define O_LBMR_TIR_T_INDEX OFFSETOF(lbmr_tir_t, idx)
332 #define L_LBMR_TIR_T_INDEX SIZEOF(lbmr_tir_t, idx)
333 #define L_LBMR_TIR_T (gint) sizeof(lbmr_tir_t)
334
335 /* LBMR topic information record TCP option data */
336 typedef struct
337 {
338 lbm_uint32_t ip;
339 lbm_uint16_t port;
340 } lbmr_tir_tcp_t;
341 #define O_LBMR_TIR_TCP_T_IP OFFSETOF(lbmr_tir_tcp_t, ip)
342 #define L_LBMR_TIR_TCP_T_IP SIZEOF(lbmr_tir_tcp_t, ip)
343 #define O_LBMR_TIR_TCP_T_PORT OFFSETOF(lbmr_tir_tcp_t, port)
344 #define L_LBMR_TIR_TCP_T_PORT SIZEOF(lbmr_tir_tcp_t, port)
345 #define L_LBMR_TIR_TCP_T 6
346
347 typedef struct {
348 lbm_uint32_t ip;
349 lbm_uint32_t session_id;
350 lbm_uint16_t port;
351 } lbmr_tir_tcp_with_sid_t;
352 #define O_LBMR_TIR_TCP_WITH_SID_T_IP OFFSETOF(lbmr_tir_tcp_with_sid_t, ip)
353 #define L_LBMR_TIR_TCP_WITH_SID_T_IP SIZEOF(lbmr_tir_tcp_with_sid_t, ip)
354 #define O_LBMR_TIR_TCP_WITH_SID_T_SESSION_ID OFFSETOF(lbmr_tir_tcp_with_sid_t, session_id)
355 #define L_LBMR_TIR_TCP_WITH_SID_T_SESSION_ID SIZEOF(lbmr_tir_tcp_with_sid_t, session_id)
356 #define O_LBMR_TIR_TCP_WITH_SID_T_PORT OFFSETOF(lbmr_tir_tcp_with_sid_t, port)
357 #define L_LBMR_TIR_TCP_WITH_SID_T_PORT SIZEOF(lbmr_tir_tcp_with_sid_t, port)
358 #define L_LBMR_TIR_TCP_WITH_SID_T 10
359
360 /* LBMR topic information record LBT-RM option data */
361 typedef struct
362 {
363 lbm_uint32_t src_addr;
364 lbm_uint32_t mcast_addr;
365 lbm_uint32_t session_id;
366 lbm_uint16_t udp_dest_port;
367 lbm_uint16_t src_ucast_port;
368 } lbmr_tir_lbtrm_t;
369 #define O_LBMR_TIR_LBTRM_T_SRC_ADDR OFFSETOF(lbmr_tir_lbtrm_t, src_addr)
370 #define L_LBMR_TIR_LBTRM_T_SRC_ADDR SIZEOF(lbmr_tir_lbtrm_t, src_addr)
371 #define O_LBMR_TIR_LBTRM_T_MCAST_ADDR OFFSETOF(lbmr_tir_lbtrm_t, mcast_addr)
372 #define L_LBMR_TIR_LBTRM_T_MCAST_ADDR SIZEOF(lbmr_tir_lbtrm_t, mcast_addr)
373 #define O_LBMR_TIR_LBTRM_T_SESSION_ID OFFSETOF(lbmr_tir_lbtrm_t, session_id)
374 #define L_LBMR_TIR_LBTRM_T_SESSION_ID SIZEOF(lbmr_tir_lbtrm_t, session_id)
375 #define O_LBMR_TIR_LBTRM_T_UDP_DEST_PORT OFFSETOF(lbmr_tir_lbtrm_t, udp_dest_port)
376 #define L_LBMR_TIR_LBTRM_T_UDP_DEST_PORT SIZEOF(lbmr_tir_lbtrm_t, udp_dest_port)
377 #define O_LBMR_TIR_LBTRM_T_SRC_UCAST_PORT OFFSETOF(lbmr_tir_lbtrm_t, src_ucast_port)
378 #define L_LBMR_TIR_LBTRM_T_SRC_UCAST_PORT SIZEOF(lbmr_tir_lbtrm_t, src_ucast_port)
379 #define L_LBMR_TIR_LBTRM_T (gint) sizeof(lbmr_tir_lbtrm_t)
380
381 /* LBMR topic information record LBT-RU option data */
382 typedef struct
383 {
384 lbm_uint32_t ip;
385 lbm_uint16_t port;
386 } lbmr_tir_lbtru_t;
387 #define O_LBMR_TIR_LBTRU_T_IP OFFSETOF(lbmr_tir_lbtru_t, ip)
388 #define L_LBMR_TIR_LBTRU_T_IP SIZEOF(lbmr_tir_lbtru_t, ip)
389 #define O_LBMR_TIR_LBTRU_T_PORT OFFSETOF(lbmr_tir_lbtru_t, port)
390 #define L_LBMR_TIR_LBTRU_T_PORT SIZEOF(lbmr_tir_lbtru_t, port)
391 #define L_LBMR_TIR_LBTRU_T 6
392
393 typedef struct
394 {
395 lbm_uint32_t ip;
396 lbm_uint32_t session_id;
397 lbm_uint16_t port;
398 } lbmr_tir_lbtru_with_sid_t;
399 #define O_LBMR_TIR_LBTRU_WITH_SID_T_IP OFFSETOF(lbmr_tir_lbtru_with_sid_t, ip)
400 #define L_LBMR_TIR_LBTRU_WITH_SID_T_IP SIZEOF(lbmr_tir_lbtru_with_sid_t, ip)
401 #define O_LBMR_TIR_LBTRU_WITH_SID_T_SESSION_ID OFFSETOF(lbmr_tir_lbtru_with_sid_t, session_id)
402 #define L_LBMR_TIR_LBTRU_WITH_SID_T_SESSION_ID SIZEOF(lbmr_tir_lbtru_with_sid_t, session_id)
403 #define O_LBMR_TIR_LBTRU_WITH_SID_T_PORT OFFSETOF(lbmr_tir_lbtru_with_sid_t, port)
404 #define L_LBMR_TIR_LBTRU_WITH_SID_T_PORT SIZEOF(lbmr_tir_lbtru_with_sid_t, port)
405 #define L_LBMR_TIR_LBTRU_WITH_SID_T 10
406
407 /* LBMR topic information record LBT-IPC option data */
408 typedef struct
409 {
410 lbm_uint32_t host_id;
411 lbm_uint32_t session_id;
412 lbm_uint16_t xport_id;
413 } lbmr_tir_lbtipc_t;
414 #define O_LBMR_TIR_LBTIPC_T_HOST_ID OFFSETOF(lbmr_tir_lbtipc_t, host_id)
415 #define L_LBMR_TIR_LBTIPC_T_HOST_ID SIZEOF(lbmr_tir_lbtipc_t, host_id)
416 #define O_LBMR_TIR_LBTIPC_T_SESSION_ID OFFSETOF(lbmr_tir_lbtipc_t, session_id)
417 #define L_LBMR_TIR_LBTIPC_T_SESSION_ID SIZEOF(lbmr_tir_lbtipc_t, session_id)
418 #define O_LBMR_TIR_LBTIPC_T_XPORT_ID OFFSETOF(lbmr_tir_lbtipc_t, xport_id)
419 #define L_LBMR_TIR_LBTIPC_T_XPORT_ID SIZEOF(lbmr_tir_lbtipc_t, xport_id)
420 #define L_LBMR_TIR_LBTIPC_T 10
421
422 /* LBMR topic information record LBT-RDMA option data */
423 typedef struct
424 {
425 lbm_uint32_t ip;
426 lbm_uint32_t session_id;
427 lbm_uint16_t port;
428 } lbmr_tir_lbtrdma_t;
429 #define O_LBMR_TIR_LBTRDMA_T_IP OFFSETOF(lbmr_tir_lbtrdma_t, ip)
430 #define L_LBMR_TIR_LBTRDMA_T_IP SIZEOF(lbmr_tir_lbtrdma_t, ip)
431 #define O_LBMR_TIR_LBTRDMA_T_SESSION_ID OFFSETOF(lbmr_tir_lbtrdma_t, session_id)
432 #define L_LBMR_TIR_LBTRDMA_T_SESSION_ID SIZEOF(lbmr_tir_lbtrdma_t, session_id)
433 #define O_LBMR_TIR_LBTRDMA_T_PORT OFFSETOF(lbmr_tir_lbtrdma_t, port)
434 #define L_LBMR_TIR_LBTRDMA_T_PORT SIZEOF(lbmr_tir_lbtrdma_t, port)
435 #define L_LBMR_TIR_LBTRDMA_T 10
436
437 /* LBMR topic information record LBT-SMX option data */
438 typedef struct
439 {
440 lbm_uint32_t host_id;
441 lbm_uint32_t session_id;
442 lbm_uint16_t xport_id;
443 } lbmr_tir_lbtsmx_t;
444 #define O_LBMR_TIR_LBTSMX_T_HOST_ID OFFSETOF(lbmr_tir_lbtsmx_t, host_id)
445 #define L_LBMR_TIR_LBTSMX_T_HOST_ID SIZEOF(lbmr_tir_lbtsmx_t, host_id)
446 #define O_LBMR_TIR_LBTSMX_T_SESSION_ID OFFSETOF(lbmr_tir_lbtsmx_t, session_id)
447 #define L_LBMR_TIR_LBTSMX_T_SESSION_ID SIZEOF(lbmr_tir_lbtsmx_t, session_id)
448 #define O_LBMR_TIR_LBTSMX_T_XPORT_ID OFFSETOF(lbmr_tir_lbtsmx_t, xport_id)
449 #define L_LBMR_TIR_LBTSMX_T_XPORT_ID SIZEOF(lbmr_tir_lbtsmx_t, xport_id)
450 #define L_LBMR_TIR_LBTSMX_T 10
451
452 #define LBMR_TIR_TRANSPORT 0x7F
453 #define LBMR_TIR_OPTIONS 0x80
454
455 /* LBMR topic option */
456 typedef struct
457 {
458 lbm_uint8_t type;
459 lbm_uint8_t len;
460 lbm_uint16_t flags;
461 } lbmr_topic_opt_t;
462 #define O_LBMR_TOPIC_OPT_T_TYPE OFFSETOF(lbmr_topic_opt_t, type)
463 #define L_LBMR_TOPIC_OPT_T_TYPE SIZEOF(lbmr_topic_opt_t, type)
464 #define O_LBMR_TOPIC_OPT_T_LEN OFFSETOF(lbmr_topic_opt_t, len)
465 #define L_LBMR_TOPIC_OPT_T_LEN SIZEOF(lbmr_topic_opt_t, len)
466 #define O_LBMR_TOPIC_OPT_T_FLAGS OFFSETOF(lbmr_topic_opt_t, flags)
467 #define L_LBMR_TOPIC_OPT_T_FLAGS SIZEOF(lbmr_topic_opt_t, flags)
468 #define L_LBMR_TOPIC_OPT_T (gint) sizeof(lbmr_topic_opt_t)
469
470 #define LBMR_TOPIC_OPT_FLAG_IGNORE 0x8000
471
472 /* LBMR topic option length */
473 typedef struct
474 {
475 lbm_uint8_t type;
476 lbm_uint8_t len;
477 lbm_uint16_t total_len;
478 } lbmr_topic_opt_len_t;
479 #define O_LBMR_TOPIC_OPT_LEN_T_TYPE OFFSETOF(lbmr_topic_opt_len_t, type)
480 #define L_LBMR_TOPIC_OPT_LEN_T_TYPE SIZEOF(lbmr_topic_opt_len_t, type)
481 #define O_LBMR_TOPIC_OPT_LEN_T_LEN OFFSETOF(lbmr_topic_opt_len_t, len)
482 #define L_LBMR_TOPIC_OPT_LEN_T_LEN SIZEOF(lbmr_topic_opt_len_t, len)
483 #define O_LBMR_TOPIC_OPT_LEN_T_TOTAL_LEN OFFSETOF(lbmr_topic_opt_len_t, total_len)
484 #define L_LBMR_TOPIC_OPT_LEN_T_TOTAL_LEN SIZEOF(lbmr_topic_opt_len_t, total_len)
485 #define L_LBMR_TOPIC_OPT_LEN_T (gint) sizeof(lbmr_topic_opt_len_t)
486
487 #define LBMR_TOPIC_OPT_LEN_TYPE 0x00
488 #define LBMR_TOPIC_OPT_LEN_SZ 4
489
490 /* LBMR topic UME option */
491 typedef struct
492 {
493 lbm_uint8_t type;
494 lbm_uint8_t len;
495 lbm_uint16_t flags;
496 lbm_uint16_t store_tcp_port;
497 lbm_uint16_t src_tcp_port;
498 lbm_uint32_t store_tcp_addr;
499 lbm_uint32_t src_tcp_addr;
500 lbm_uint32_t src_reg_id;
501 lbm_uint32_t transport_idx;
502 lbm_uint32_t high_seqnum;
503 lbm_uint32_t low_seqnum;
504 } lbmr_topic_opt_ume_t;
505 #define O_LBMR_TOPIC_OPT_UME_T_TYPE OFFSETOF(lbmr_topic_opt_ume_t, type)
506 #define L_LBMR_TOPIC_OPT_UME_T_TYPE SIZEOF(lbmr_topic_opt_ume_t, type)
507 #define O_LBMR_TOPIC_OPT_UME_T_LEN OFFSETOF(lbmr_topic_opt_ume_t, len)
508 #define L_LBMR_TOPIC_OPT_UME_T_LEN SIZEOF(lbmr_topic_opt_ume_t, len)
509 #define O_LBMR_TOPIC_OPT_UME_T_FLAGS OFFSETOF(lbmr_topic_opt_ume_t, flags)
510 #define L_LBMR_TOPIC_OPT_UME_T_FLAGS SIZEOF(lbmr_topic_opt_ume_t, flags)
511 #define O_LBMR_TOPIC_OPT_UME_T_STORE_TCP_PORT OFFSETOF(lbmr_topic_opt_ume_t, store_tcp_port)
512 #define L_LBMR_TOPIC_OPT_UME_T_STORE_TCP_PORT SIZEOF(lbmr_topic_opt_ume_t, store_tcp_port)
513 #define O_LBMR_TOPIC_OPT_UME_T_SRC_TCP_PORT OFFSETOF(lbmr_topic_opt_ume_t, src_tcp_port)
514 #define L_LBMR_TOPIC_OPT_UME_T_SRC_TCP_PORT SIZEOF(lbmr_topic_opt_ume_t, src_tcp_port)
515 #define O_LBMR_TOPIC_OPT_UME_T_STORE_TCP_ADDR OFFSETOF(lbmr_topic_opt_ume_t, store_tcp_addr)
516 #define L_LBMR_TOPIC_OPT_UME_T_STORE_TCP_ADDR SIZEOF(lbmr_topic_opt_ume_t, store_tcp_addr)
517 #define O_LBMR_TOPIC_OPT_UME_T_SRC_TCP_ADDR OFFSETOF(lbmr_topic_opt_ume_t, src_tcp_addr)
518 #define L_LBMR_TOPIC_OPT_UME_T_SRC_TCP_ADDR SIZEOF(lbmr_topic_opt_ume_t, src_tcp_addr)
519 #define O_LBMR_TOPIC_OPT_UME_T_SRC_REG_ID OFFSETOF(lbmr_topic_opt_ume_t, src_reg_id)
520 #define L_LBMR_TOPIC_OPT_UME_T_SRC_REG_ID SIZEOF(lbmr_topic_opt_ume_t, src_reg_id)
521 #define O_LBMR_TOPIC_OPT_UME_T_TRANSPORT_IDX OFFSETOF(lbmr_topic_opt_ume_t, transport_idx)
522 #define L_LBMR_TOPIC_OPT_UME_T_TRANSPORT_IDX SIZEOF(lbmr_topic_opt_ume_t, transport_idx)
523 #define O_LBMR_TOPIC_OPT_UME_T_HIGH_SEQNUM OFFSETOF(lbmr_topic_opt_ume_t, high_seqnum)
524 #define L_LBMR_TOPIC_OPT_UME_T_HIGH_SEQNUM SIZEOF(lbmr_topic_opt_ume_t, high_seqnum)
525 #define O_LBMR_TOPIC_OPT_UME_T_LOW_SEQNUM OFFSETOF(lbmr_topic_opt_ume_t, low_seqnum)
526 #define L_LBMR_TOPIC_OPT_UME_T_LOW_SEQNUM SIZEOF(lbmr_topic_opt_ume_t, low_seqnum)
527 #define L_LBMR_TOPIC_OPT_UME_T (gint) sizeof(lbmr_topic_opt_ume_t)
528
529 #define LBMR_TOPIC_OPT_UME_TYPE 0x01
530 #define LBMR_TOPIC_OPT_UME_FLAG_IGNORE 0x8000
531 #define LBMR_TOPIC_OPT_UME_FLAG_LATEJOIN 0x4000
532 #define LBMR_TOPIC_OPT_UME_FLAG_STORE 0x2000
533 #define LBMR_TOPIC_OPT_UME_FLAG_QCCAP 0x1000
534 #define LBMR_TOPIC_OPT_UME_FLAG_ACKTOSRC 0x800
535 #define LBMR_TOPIC_OPT_UME_SZ 32
536
537 /* LBMR topic UME store option */
538 typedef struct
539 {
540 lbm_uint8_t type;
541 lbm_uint8_t len;
542 lbm_uint8_t flags;
543 lbm_uint8_t grp_idx;
544 lbm_uint16_t store_tcp_port;
545 lbm_uint16_t store_idx;
546 lbm_uint32_t store_ip_addr;
547 lbm_uint32_t src_reg_id;
548 } lbmr_topic_opt_ume_store_t;
549 #define O_LBMR_TOPIC_OPT_UME_STORE_T_TYPE OFFSETOF(lbmr_topic_opt_ume_store_t, type)
550 #define L_LBMR_TOPIC_OPT_UME_STORE_T_TYPE SIZEOF(lbmr_topic_opt_ume_store_t, type)
551 #define O_LBMR_TOPIC_OPT_UME_STORE_T_LEN OFFSETOF(lbmr_topic_opt_ume_store_t, len)
552 #define L_LBMR_TOPIC_OPT_UME_STORE_T_LEN SIZEOF(lbmr_topic_opt_ume_store_t, len)
553 #define O_LBMR_TOPIC_OPT_UME_STORE_T_FLAGS OFFSETOF(lbmr_topic_opt_ume_store_t, flags)
554 #define L_LBMR_TOPIC_OPT_UME_STORE_T_FLAGS SIZEOF(lbmr_topic_opt_ume_store_t, flags)
555 #define O_LBMR_TOPIC_OPT_UME_STORE_T_GRP_IDX OFFSETOF(lbmr_topic_opt_ume_store_t, grp_idx)
556 #define L_LBMR_TOPIC_OPT_UME_STORE_T_GRP_IDX SIZEOF(lbmr_topic_opt_ume_store_t, grp_idx)
557 #define O_LBMR_TOPIC_OPT_UME_STORE_T_STORE_TCP_PORT OFFSETOF(lbmr_topic_opt_ume_store_t, store_tcp_port)
558 #define L_LBMR_TOPIC_OPT_UME_STORE_T_STORE_TCP_PORT SIZEOF(lbmr_topic_opt_ume_store_t, store_tcp_port)
559 #define O_LBMR_TOPIC_OPT_UME_STORE_T_STORE_IDX OFFSETOF(lbmr_topic_opt_ume_store_t, store_idx)
560 #define L_LBMR_TOPIC_OPT_UME_STORE_T_STORE_IDX SIZEOF(lbmr_topic_opt_ume_store_t, store_idx)
561 #define O_LBMR_TOPIC_OPT_UME_STORE_T_STORE_IP_ADDR OFFSETOF(lbmr_topic_opt_ume_store_t, store_ip_addr)
562 #define L_LBMR_TOPIC_OPT_UME_STORE_T_STORE_IP_ADDR SIZEOF(lbmr_topic_opt_ume_store_t, store_ip_addr)
563 #define O_LBMR_TOPIC_OPT_UME_STORE_T_SRC_REG_ID OFFSETOF(lbmr_topic_opt_ume_store_t, src_reg_id)
564 #define L_LBMR_TOPIC_OPT_UME_STORE_T_SRC_REG_ID SIZEOF(lbmr_topic_opt_ume_store_t, src_reg_id)
565 #define L_LBMR_TOPIC_OPT_UME_STORE_T (gint) sizeof(lbmr_topic_opt_ume_store_t)
566
567 #define LBMR_TOPIC_OPT_UME_STORE_TYPE 0x02
568 #define LBMR_TOPIC_OPT_UME_STORE_FLAG_IGNORE 0x80
569 #define LBMR_TOPIC_OPT_UME_STORE_SZ 16
570
571 /* LBMR topic UME store group option */
572 typedef struct
573 {
574 lbm_uint8_t type;
575 lbm_uint8_t len;
576 lbm_uint8_t flags;
577 lbm_uint8_t grp_idx;
578 lbm_uint16_t grp_sz;
579 lbm_uint16_t reserved;
580 } lbmr_topic_opt_ume_store_group_t;
581 #define O_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_TYPE OFFSETOF(lbmr_topic_opt_ume_store_group_t, type)
582 #define L_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_TYPE SIZEOF(lbmr_topic_opt_ume_store_group_t, type)
583 #define O_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_LEN OFFSETOF(lbmr_topic_opt_ume_store_group_t, len)
584 #define L_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_LEN SIZEOF(lbmr_topic_opt_ume_store_group_t, len)
585 #define O_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_FLAGS OFFSETOF(lbmr_topic_opt_ume_store_group_t, flags)
586 #define L_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_FLAGS SIZEOF(lbmr_topic_opt_ume_store_group_t, flags)
587 #define O_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_GRP_IDX OFFSETOF(lbmr_topic_opt_ume_store_group_t, grp_idx)
588 #define L_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_GRP_IDX SIZEOF(lbmr_topic_opt_ume_store_group_t, grp_idx)
589 #define O_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_GRP_SZ OFFSETOF(lbmr_topic_opt_ume_store_group_t, grp_sz)
590 #define L_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_GRP_SZ SIZEOF(lbmr_topic_opt_ume_store_group_t, grp_sz)
591 #define O_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_RESERVED OFFSETOF(lbmr_topic_opt_ume_store_group_t, reserved)
592 #define L_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_RESERVED SIZEOF(lbmr_topic_opt_ume_store_group_t, reserved)
593 #define L_LBMR_TOPIC_OPT_UME_STORE_GROUP_T (gint) sizeof(lbmr_topic_opt_ume_store_group_t)
594
595 #define LBMR_TOPIC_OPT_UME_STORE_GROUP_TYPE 0x03
596 #define LBMR_TOPIC_OPT_UME_STORE_GROUP_FLAG_IGNORE 0x80
597 #define LBMR_TOPIC_OPT_UME_STORE_GROUP_SZ 8
598
599 /* LBMR topic latejoin option */
600 typedef struct
601 {
602 lbm_uint8_t type;
603 lbm_uint8_t len;
604 lbm_uint16_t flags;
605 lbm_uint16_t src_tcp_port;
606 lbm_uint16_t reserved;
607 lbm_uint32_t src_ip_addr;
608 lbm_uint32_t transport_idx;
609 lbm_uint32_t high_seqnum;
610 lbm_uint32_t low_seqnum;
611 } lbmr_topic_opt_latejoin_t;
612 #define O_LBMR_TOPIC_OPT_LATEJOIN_T_TYPE OFFSETOF(lbmr_topic_opt_latejoin_t, type)
613 #define L_LBMR_TOPIC_OPT_LATEJOIN_T_TYPE SIZEOF(lbmr_topic_opt_latejoin_t, type)
614 #define O_LBMR_TOPIC_OPT_LATEJOIN_T_LEN OFFSETOF(lbmr_topic_opt_latejoin_t, len)
615 #define L_LBMR_TOPIC_OPT_LATEJOIN_T_LEN SIZEOF(lbmr_topic_opt_latejoin_t, len)
616 #define O_LBMR_TOPIC_OPT_LATEJOIN_T_FLAGS OFFSETOF(lbmr_topic_opt_latejoin_t, flags)
617 #define L_LBMR_TOPIC_OPT_LATEJOIN_T_FLAGS SIZEOF(lbmr_topic_opt_latejoin_t, flags)
618 #define O_LBMR_TOPIC_OPT_LATEJOIN_T_SRC_TCP_PORT OFFSETOF(lbmr_topic_opt_latejoin_t, src_tcp_port)
619 #define L_LBMR_TOPIC_OPT_LATEJOIN_T_SRC_TCP_PORT SIZEOF(lbmr_topic_opt_latejoin_t, src_tcp_port)
620 #define O_LBMR_TOPIC_OPT_LATEJOIN_T_RESERVED OFFSETOF(lbmr_topic_opt_latejoin_t, reserved)
621 #define L_LBMR_TOPIC_OPT_LATEJOIN_T_RESERVED SIZEOF(lbmr_topic_opt_latejoin_t, reserved)
622 #define O_LBMR_TOPIC_OPT_LATEJOIN_T_SRC_IP_ADDR OFFSETOF(lbmr_topic_opt_latejoin_t, src_ip_addr)
623 #define L_LBMR_TOPIC_OPT_LATEJOIN_T_SRC_IP_ADDR SIZEOF(lbmr_topic_opt_latejoin_t, src_ip_addr)
624 #define O_LBMR_TOPIC_OPT_LATEJOIN_T_TRANSPORT_IDX OFFSETOF(lbmr_topic_opt_latejoin_t, transport_idx)
625 #define L_LBMR_TOPIC_OPT_LATEJOIN_T_TRANSPORT_IDX SIZEOF(lbmr_topic_opt_latejoin_t, transport_idx)
626 #define O_LBMR_TOPIC_OPT_LATEJOIN_T_HIGH_SEQNUM OFFSETOF(lbmr_topic_opt_latejoin_t, high_seqnum)
627 #define L_LBMR_TOPIC_OPT_LATEJOIN_T_HIGH_SEQNUM SIZEOF(lbmr_topic_opt_latejoin_t, high_seqnum)
628 #define O_LBMR_TOPIC_OPT_LATEJOIN_T_LOW_SEQNUM OFFSETOF(lbmr_topic_opt_latejoin_t, low_seqnum)
629 #define L_LBMR_TOPIC_OPT_LATEJOIN_T_LOW_SEQNUM SIZEOF(lbmr_topic_opt_latejoin_t, low_seqnum)
630 #define L_LBMR_TOPIC_OPT_LATEJOIN_T (gint) sizeof(lbmr_topic_opt_latejoin_t)
631
632 #define LBMR_TOPIC_OPT_LATEJOIN_TYPE 0x04
633 #define LBMR_TOPIC_OPT_LATEJOIN_FLAG_IGNORE 0x8000
634 #define LBMR_TOPIC_OPT_LATEJOIN_FLAG_ACKTOSRC 0x4000
635 #define LBMR_TOPIC_OPT_LATEJOIN_SZ 24
636
637 /* LBMR topic queue control option */
638 typedef struct
639 {
640 lbm_uint8_t type;
641 lbm_uint8_t len;
642 lbm_uint16_t flags;
643 lbm_uint32_t rcr_idx;
644 } lbmr_topic_opt_umq_rcridx_t;
645 #define O_LBMR_TOPIC_OPT_UMQ_RCRIDX_T_TYPE OFFSETOF(lbmr_topic_opt_umq_rcridx_t, type)
646 #define L_LBMR_TOPIC_OPT_UMQ_RCRIDX_T_TYPE SIZEOF(lbmr_topic_opt_umq_rcridx_t, type)
647 #define O_LBMR_TOPIC_OPT_UMQ_RCRIDX_T_LEN OFFSETOF(lbmr_topic_opt_umq_rcridx_t, len)
648 #define L_LBMR_TOPIC_OPT_UMQ_RCRIDX_T_LEN SIZEOF(lbmr_topic_opt_umq_rcridx_t, len)
649 #define O_LBMR_TOPIC_OPT_UMQ_RCRIDX_T_FLAGS OFFSETOF(lbmr_topic_opt_umq_rcridx_t, flags)
650 #define L_LBMR_TOPIC_OPT_UMQ_RCRIDX_T_FLAGS SIZEOF(lbmr_topic_opt_umq_rcridx_t, flags)
651 #define O_LBMR_TOPIC_OPT_UMQ_RCRIDX_T_RCR_IDX OFFSETOF(lbmr_topic_opt_umq_rcridx_t, rcr_idx)
652 #define L_LBMR_TOPIC_OPT_UMQ_RCRIDX_T_RCR_IDX SIZEOF(lbmr_topic_opt_umq_rcridx_t, rcr_idx)
653 #define L_LBMR_TOPIC_OPT_UMQ_RCRIDX_T (gint) sizeof(lbmr_topic_opt_umq_rcridx_t)
654
655 #define LBMR_TOPIC_OPT_UMQ_RCRIDX_TYPE 0x05
656 #define LBMR_TOPIC_OPT_UMQ_RCRIDX_SZ 8
657 #define LBMR_TOPIC_OPT_UMQ_RCRIDX_FLAG_IGNORE 0x8000
658
659 #define LBMR_TOPIC_OPT_UMQ_QINFO_TYPE 0x06
660 #define LBMR_TOPIC_OPT_UMQ_FLAG_IGNORE 0x8000
661 #define LBMR_TOPIC_OPT_UMQ_FLAG_QUEUE 0x4000
662 #define LBMR_TOPIC_OPT_UMQ_FLAG_RCVLISTEN 0x2000
663 #define LBMR_TOPIC_OPT_UMQ_FLAG_CONTROL 0x1000
664 #define LBMR_TOPIC_OPT_UMQ_FLAG_SRCRCVLISTEN 0x0800
665 #define LBMR_TOPIC_OPT_UMQ_FLAG_PARTICIPANTS_ONLY 0x0400
666 #define LBMR_TOPIC_OPT_UMQ_MAX_QNAME_LEN 252
667
668 /* LBMR topic ULB option */
669 typedef struct
670 {
671 lbm_uint8_t type;
672 lbm_uint8_t len;
673 lbm_uint16_t flags;
674 lbm_uint32_t queue_id;
675 lbm_uint8_t regid[8];
676 lbm_uint32_t ulb_src_id;
677 lbm_uint32_t src_ip_addr;
678 lbm_uint16_t src_tcp_port;
679 lbm_uint16_t reserved;
680 } lbmr_topic_opt_ulb_t;
681 #define O_LBMR_TOPIC_OPT_ULB_T_TYPE OFFSETOF(lbmr_topic_opt_ulb_t, type)
682 #define L_LBMR_TOPIC_OPT_ULB_T_TYPE SIZEOF(lbmr_topic_opt_ulb_t, type)
683 #define O_LBMR_TOPIC_OPT_ULB_T_LEN OFFSETOF(lbmr_topic_opt_ulb_t, len)
684 #define L_LBMR_TOPIC_OPT_ULB_T_LEN SIZEOF(lbmr_topic_opt_ulb_t, len)
685 #define O_LBMR_TOPIC_OPT_ULB_T_FLAGS OFFSETOF(lbmr_topic_opt_ulb_t, flags)
686 #define L_LBMR_TOPIC_OPT_ULB_T_FLAGS SIZEOF(lbmr_topic_opt_ulb_t, flags)
687 #define O_LBMR_TOPIC_OPT_ULB_T_QUEUE_ID OFFSETOF(lbmr_topic_opt_ulb_t, queue_id)
688 #define L_LBMR_TOPIC_OPT_ULB_T_QUEUE_ID SIZEOF(lbmr_topic_opt_ulb_t, queue_id)
689 #define O_LBMR_TOPIC_OPT_ULB_T_REGID OFFSETOF(lbmr_topic_opt_ulb_t, regid)
690 #define L_LBMR_TOPIC_OPT_ULB_T_REGID SIZEOF(lbmr_topic_opt_ulb_t, regid)
691 #define O_LBMR_TOPIC_OPT_ULB_T_ULB_SRC_ID OFFSETOF(lbmr_topic_opt_ulb_t, ulb_src_id)
692 #define L_LBMR_TOPIC_OPT_ULB_T_ULB_SRC_ID SIZEOF(lbmr_topic_opt_ulb_t, ulb_src_id)
693 #define O_LBMR_TOPIC_OPT_ULB_T_SRC_IP_ADDR OFFSETOF(lbmr_topic_opt_ulb_t, src_ip_addr)
694 #define L_LBMR_TOPIC_OPT_ULB_T_SRC_IP_ADDR SIZEOF(lbmr_topic_opt_ulb_t, src_ip_addr)
695 #define O_LBMR_TOPIC_OPT_ULB_T_SRC_TCP_PORT OFFSETOF(lbmr_topic_opt_ulb_t, src_tcp_port)
696 #define L_LBMR_TOPIC_OPT_ULB_T_SRC_TCP_PORT SIZEOF(lbmr_topic_opt_ulb_t, src_tcp_port)
697 #define O_LBMR_TOPIC_OPT_ULB_T_RESERVED OFFSETOF(lbmr_topic_opt_ulb_t, reserved)
698 #define L_LBMR_TOPIC_OPT_ULB_T_RESERVED SIZEOF(lbmr_topic_opt_ulb_t, reserved)
699 #define L_LBMR_TOPIC_OPT_ULB_T (gint) sizeof(lbmr_topic_opt_ulb_t)
700
701 #define LBMR_TOPIC_OPT_ULB_TYPE 0x0B
702 #define LBMR_TOPIC_OPT_ULB_FLAG_IGNORE 0x8000
703 #define LBMR_TOPIC_OPT_ULB_SZ 28
704
705 /* LBMR topic cost option */
706 typedef struct
707 {
708 lbm_uint8_t type;
709 lbm_uint8_t len;
710 lbm_uint8_t flags;
711 lbm_uint8_t hop_count;
712 lbm_uint32_t cost;
713 } lbmr_topic_opt_cost_t;
714 #define O_LBMR_TOPIC_OPT_COST_T_TYPE OFFSETOF(lbmr_topic_opt_cost_t, type)
715 #define L_LBMR_TOPIC_OPT_COST_T_TYPE SIZEOF(lbmr_topic_opt_cost_t, type)
716 #define O_LBMR_TOPIC_OPT_COST_T_LEN OFFSETOF(lbmr_topic_opt_cost_t, len)
717 #define L_LBMR_TOPIC_OPT_COST_T_LEN SIZEOF(lbmr_topic_opt_cost_t, len)
718 #define O_LBMR_TOPIC_OPT_COST_T_FLAGS OFFSETOF(lbmr_topic_opt_cost_t, flags)
719 #define L_LBMR_TOPIC_OPT_COST_T_FLAGS SIZEOF(lbmr_topic_opt_cost_t, flags)
720 #define O_LBMR_TOPIC_OPT_COST_T_HOP_COUNT OFFSETOF(lbmr_topic_opt_cost_t, hop_count)
721 #define L_LBMR_TOPIC_OPT_COST_T_HOP_COUNT SIZEOF(lbmr_topic_opt_cost_t, hop_count)
722 #define O_LBMR_TOPIC_OPT_COST_T_COST OFFSETOF(lbmr_topic_opt_cost_t, cost)
723 #define L_LBMR_TOPIC_OPT_COST_T_COST SIZEOF(lbmr_topic_opt_cost_t, cost)
724 #define L_LBMR_TOPIC_OPT_COST_T (gint) sizeof(lbmr_topic_opt_cost_t)
725
726 #define LBMR_TOPIC_OPT_COST_TYPE 0x07
727 #define LBMR_TOPIC_OPT_COST_FLAG_IGNORE 0x80
728 #define LBMR_TOPIC_OPT_COST_SZ 8
729
730 /* LBMR topic originating transport ID option */
731 typedef struct
732 {
733 lbm_uint8_t type;
734 lbm_uint8_t len;
735 lbm_uint16_t flags;
736 lbm_uint8_t originating_transport[LBM_OTID_BLOCK_SZ];
737 } lbmr_topic_opt_otid_t;
738 #define O_LBMR_TOPIC_OPT_OTID_T_TYPE OFFSETOF(lbmr_topic_opt_otid_t, type)
739 #define L_LBMR_TOPIC_OPT_OTID_T_TYPE SIZEOF(lbmr_topic_opt_otid_t, type)
740 #define O_LBMR_TOPIC_OPT_OTID_T_LEN OFFSETOF(lbmr_topic_opt_otid_t, len)
741 #define L_LBMR_TOPIC_OPT_OTID_T_LEN SIZEOF(lbmr_topic_opt_otid_t, len)
742 #define O_LBMR_TOPIC_OPT_OTID_T_FLAGS OFFSETOF(lbmr_topic_opt_otid_t, flags)
743 #define L_LBMR_TOPIC_OPT_OTID_T_FLAGS SIZEOF(lbmr_topic_opt_otid_t, flags)
744 #define O_LBMR_TOPIC_OPT_OTID_T_ORIGINATING_TRANSPORT OFFSETOF(lbmr_topic_opt_otid_t, originating_transport)
745 #define L_LBMR_TOPIC_OPT_OTID_T_ORIGINATING_TRANSPORT SIZEOF(lbmr_topic_opt_otid_t, originating_transport)
746 #define L_LBMR_TOPIC_OPT_OTID_T (gint) sizeof(lbmr_topic_opt_otid_t)
747
748 #define LBMR_TOPIC_OPT_OTID_TYPE 0x08
749 #define LBMR_TOPIC_OPT_OTID_FLAG_IGNORE 0x8000
750 #define LBMR_TOPIC_OPT_OTID_SZ 36
751
752 /* LBMR topic context instance transport option */
753 typedef struct
754 {
755 lbm_uint8_t type;
756 lbm_uint8_t len;
757 lbm_uint8_t flags;
758 lbm_uint8_t res;
759 lbm_uint8_t ctxinst[LBM_CONTEXT_INSTANCE_BLOCK_SZ];
760 } lbmr_topic_opt_ctxinst_t;
761 #define O_LBMR_TOPIC_OPT_CTXINST_T_TYPE OFFSETOF(lbmr_topic_opt_ctxinst_t, type)
762 #define L_LBMR_TOPIC_OPT_CTXINST_T_TYPE SIZEOF(lbmr_topic_opt_ctxinst_t, type)
763 #define O_LBMR_TOPIC_OPT_CTXINST_T_LEN OFFSETOF(lbmr_topic_opt_ctxinst_t, len)
764 #define L_LBMR_TOPIC_OPT_CTXINST_T_LEN SIZEOF(lbmr_topic_opt_ctxinst_t, len)
765 #define O_LBMR_TOPIC_OPT_CTXINST_T_FLAGS OFFSETOF(lbmr_topic_opt_ctxinst_t, flags)
766 #define L_LBMR_TOPIC_OPT_CTXINST_T_FLAGS SIZEOF(lbmr_topic_opt_ctxinst_t, flags)
767 #define O_LBMR_TOPIC_OPT_CTXINST_T_RES OFFSETOF(lbmr_topic_opt_ctxinst_t, res)
768 #define L_LBMR_TOPIC_OPT_CTXINST_T_RES SIZEOF(lbmr_topic_opt_ctxinst_t, res)
769 #define O_LBMR_TOPIC_OPT_CTXINST_T_CTXINST OFFSETOF(lbmr_topic_opt_ctxinst_t, ctxinst)
770 #define L_LBMR_TOPIC_OPT_CTXINST_T_CTXINST SIZEOF(lbmr_topic_opt_ctxinst_t, ctxinst)
771 #define L_LBMR_TOPIC_OPT_CTXINST_T (gint) sizeof(lbmr_topic_opt_ctxinst_t)
772
773 #define LBMR_TOPIC_OPT_CTXINST_TYPE 0x09
774 #define LBMR_TOPIC_OPT_CTXINST_FLAG_IGNORE 0x80
775 #define LBMR_TOPIC_OPT_CTXINST_SZ 12
776
777 /* LBMR topic context instance store transport option */
778 typedef struct
779 {
780 lbm_uint8_t type;
781 lbm_uint8_t len;
782 lbm_uint8_t flags;
783 lbm_uint8_t idx;
784 lbm_uint8_t ctxinst[LBM_CONTEXT_INSTANCE_BLOCK_SZ];
785 } lbmr_topic_opt_ctxinsts_t;
786 #define O_LBMR_TOPIC_OPT_CTXINSTS_T_TYPE OFFSETOF(lbmr_topic_opt_ctxinsts_t, type)
787 #define L_LBMR_TOPIC_OPT_CTXINSTS_T_TYPE SIZEOF(lbmr_topic_opt_ctxinsts_t, type)
788 #define O_LBMR_TOPIC_OPT_CTXINSTS_T_LEN OFFSETOF(lbmr_topic_opt_ctxinsts_t, len)
789 #define L_LBMR_TOPIC_OPT_CTXINSTS_T_LEN SIZEOF(lbmr_topic_opt_ctxinsts_t, len)
790 #define O_LBMR_TOPIC_OPT_CTXINSTS_T_FLAGS OFFSETOF(lbmr_topic_opt_ctxinsts_t, flags)
791 #define L_LBMR_TOPIC_OPT_CTXINSTS_T_FLAGS SIZEOF(lbmr_topic_opt_ctxinsts_t, flags)
792 #define O_LBMR_TOPIC_OPT_CTXINSTS_T_IDX OFFSETOF(lbmr_topic_opt_ctxinsts_t, idx)
793 #define L_LBMR_TOPIC_OPT_CTXINSTS_T_IDX SIZEOF(lbmr_topic_opt_ctxinsts_t, idx)
794 #define O_LBMR_TOPIC_OPT_CTXINSTS_T_CTXINST OFFSETOF(lbmr_topic_opt_ctxinsts_t, ctxinst)
795 #define L_LBMR_TOPIC_OPT_CTXINSTS_T_CTXINST SIZEOF(lbmr_topic_opt_ctxinsts_t, ctxinst)
796 #define L_LBMR_TOPIC_OPT_CTXINSTS_T (gint) sizeof(lbmr_topic_opt_ctxinsts_t)
797
798 #define LBMR_TOPIC_OPT_CTXINSTS_TYPE 0x0A
799 #define LBMR_TOPIC_OPT_CTXINSTS_FLAG_IGNORE 0x80
800 #define LBMR_TOPIC_OPT_CTXINSTS_SZ 12
801
802 /* LBMR topic context instance queue transport option */
803 typedef struct
804 {
805 lbm_uint8_t type;
806 lbm_uint8_t len;
807 lbm_uint8_t flags;
808 lbm_uint8_t idx;
809 lbm_uint8_t ctxinst[LBM_CONTEXT_INSTANCE_BLOCK_SZ];
810 } lbmr_topic_opt_ctxinstq_t;
811 #define O_LBMR_TOPIC_OPT_CTXINSTQ_T_TYPE OFFSETOF(lbmr_topic_opt_ctxinstq_t, type)
812 #define L_LBMR_TOPIC_OPT_CTXINSTQ_T_TYPE SIZEOF(lbmr_topic_opt_ctxinstq_t, type)
813 #define O_LBMR_TOPIC_OPT_CTXINSTQ_T_LEN OFFSETOF(lbmr_topic_opt_ctxinstq_t, len)
814 #define L_LBMR_TOPIC_OPT_CTXINSTQ_T_LEN SIZEOF(lbmr_topic_opt_ctxinstq_t, len)
815 #define O_LBMR_TOPIC_OPT_CTXINSTQ_T_FLAGS OFFSETOF(lbmr_topic_opt_ctxinstq_t, flags)
816 #define L_LBMR_TOPIC_OPT_CTXINSTQ_T_FLAGS SIZEOF(lbmr_topic_opt_ctxinstq_t, flags)
817 #define O_LBMR_TOPIC_OPT_CTXINSTQ_T_IDX OFFSETOF(lbmr_topic_opt_ctxinstq_t, idx)
818 #define L_LBMR_TOPIC_OPT_CTXINSTQ_T_IDX SIZEOF(lbmr_topic_opt_ctxinstq_t, idx)
819 #define O_LBMR_TOPIC_OPT_CTXINSTQ_T_CTXINST OFFSETOF(lbmr_topic_opt_ctxinstq_t, ctxinst)
820 #define L_LBMR_TOPIC_OPT_CTXINSTQ_T_CTXINST SIZEOF(lbmr_topic_opt_ctxinstq_t, ctxinst)
821 #define L_LBMR_TOPIC_OPT_CTXINSTQ_T (gint) sizeof(lbmr_topic_opt_ctxinstq_t)
822
823 #define LBMR_TOPIC_OPT_CTXINSTQ_TYPE 0x0C
824 #define LBMR_TOPIC_OPT_CTXINSTQ_FLAG_IGNORE 0x80
825 #define LBMR_TOPIC_OPT_CTXINSTQ_SZ 12
826
827 /* LBMR topic domain ID option */
828 typedef struct
829 {
830 lbm_uint8_t type;
831 lbm_uint8_t len;
832 lbm_uint16_t flags;
833 lbm_uint32_t domain_id;
834 } lbmr_topic_opt_domain_id_t;
835 #define O_LBMR_TOPIC_OPT_DOMAIN_ID_T_TYPE OFFSETOF(lbmr_topic_opt_domain_id_t, type)
836 #define L_LBMR_TOPIC_OPT_DOMAIN_ID_T_TYPE SIZEOF(lbmr_topic_opt_domain_id_t, type)
837 #define O_LBMR_TOPIC_OPT_DOMAIN_ID_T_LEN OFFSETOF(lbmr_topic_opt_domain_id_t, len)
838 #define L_LBMR_TOPIC_OPT_DOMAIN_ID_T_LEN SIZEOF(lbmr_topic_opt_domain_id_t, len)
839 #define O_LBMR_TOPIC_OPT_DOMAIN_ID_T_FLAGS OFFSETOF(lbmr_topic_opt_domain_id_t, flags)
840 #define L_LBMR_TOPIC_OPT_DOMAIN_ID_T_FLAGS SIZEOF(lbmr_topic_opt_domain_id_t, flags)
841 #define O_LBMR_TOPIC_OPT_DOMAIN_ID_T_DOMAIN_ID OFFSETOF(lbmr_topic_opt_domain_id_t, domain_id)
842 #define L_LBMR_TOPIC_OPT_DOMAIN_ID_T_DOMAIN_ID SIZEOF(lbmr_topic_opt_domain_id_t, domain_id)
843 #define L_LBMR_TOPIC_OPT_DOMAIN_ID_T (gint) sizeof(lbmr_topic_opt_domain_id_t)
844
845 #define LBMR_TOPIC_OPT_DOMAIN_ID_TYPE 0x0D
846 #define LBMR_TOPIC_OPT_DOMAIN_ID_FLAG_IGNORE 0x8000
847 #define LBMR_TOPIC_OPT_DOMAIN_ID_SZ 8
848
849 /* LBMR topic extended functionality option */
850 typedef struct
851 {
852 lbm_uint8_t type;
853 lbm_uint8_t len;
854 lbm_uint16_t flags;
855 lbm_uint16_t src_tcp_port;
856 lbm_uint16_t reserved;
857 lbm_uint32_t src_ip_addr;
858 lbm_uint32_t functionality_flags;
859 } lbmr_topic_opt_exfunc_t;
860 #define O_LBMR_TOPIC_OPT_EXFUNC_T_TYPE OFFSETOF(lbmr_topic_opt_exfunc_t, type)
861 #define L_LBMR_TOPIC_OPT_EXFUNC_T_TYPE SIZEOF(lbmr_topic_opt_exfunc_t, type)
862 #define O_LBMR_TOPIC_OPT_EXFUNC_T_LEN OFFSETOF(lbmr_topic_opt_exfunc_t, len)
863 #define L_LBMR_TOPIC_OPT_EXFUNC_T_LEN SIZEOF(lbmr_topic_opt_exfunc_t, len)
864 #define O_LBMR_TOPIC_OPT_EXFUNC_T_FLAGS OFFSETOF(lbmr_topic_opt_exfunc_t, flags)
865 #define L_LBMR_TOPIC_OPT_EXFUNC_T_FLAGS SIZEOF(lbmr_topic_opt_exfunc_t, flags)
866 #define O_LBMR_TOPIC_OPT_EXFUNC_T_SRC_TCP_PORT OFFSETOF(lbmr_topic_opt_exfunc_t, src_tcp_port)
867 #define L_LBMR_TOPIC_OPT_EXFUNC_T_SRC_TCP_PORT SIZEOF(lbmr_topic_opt_exfunc_t, src_tcp_port)
868 #define O_LBMR_TOPIC_OPT_EXFUNC_T_RESERVED OFFSETOF(lbmr_topic_opt_exfunc_t, reserved)
869 #define L_LBMR_TOPIC_OPT_EXFUNC_T_RESERVED SIZEOF(lbmr_topic_opt_exfunc_t, reserved)
870 #define O_LBMR_TOPIC_OPT_EXFUNC_T_SRC_IP_ADDR OFFSETOF(lbmr_topic_opt_exfunc_t, src_ip_addr)
871 #define L_LBMR_TOPIC_OPT_EXFUNC_T_SRC_IP_ADDR SIZEOF(lbmr_topic_opt_exfunc_t, src_ip_addr)
872 #define O_LBMR_TOPIC_OPT_EXFUNC_T_FUNCTIONALITY_FLAGS OFFSETOF(lbmr_topic_opt_exfunc_t, functionality_flags)
873 #define L_LBMR_TOPIC_OPT_EXFUNC_T_FUNCTIONALITY_FLAGS SIZEOF(lbmr_topic_opt_exfunc_t, functionality_flags)
874 #define L_LBMR_TOPIC_OPT_EXFUNC_T (gint) sizeof(lbmr_topic_opt_exfunc_t)
875
876 #define LBMR_TOPIC_OPT_EXFUNC_TYPE 0x0E
877 #define LBMR_TOPIC_OPT_EXFUNC_FLAG_IGNORE 0x8000
878 #define LBMR_TOPIC_OPT_EXFUNC_SZ 16
879
880 /* Transports */
881 #define LBMR_TRANSPORT_TCP 0x00
882 #define LBMR_TRANSPORT_LBTRU 0x01
883 #define LBMR_TRANSPORT_TCP6 0x02
884 #define LBMR_TRANSPORT_LBTSMX 0x4
885 #define LBMR_TRANSPORT_LBTRM 0x10
886 #define LBMR_TRANSPORT_LBTIPC 0x40
887 #define LBMR_TRANSPORT_LBTRDMA 0x20
888 #define LBMR_TRANSPORT_PGM 0x11
889
890 #define LBMR_TRANSPORT_OPTION_MASK 0x80
891
892 /* LBMR context info */
893 typedef struct
894 {
895 lbm_uint8_t ver_type;
896 lbm_uint8_t ext_type;
897 lbm_uint8_t len;
898 lbm_uint8_t hop_count;
899 lbm_uint16_t flags;
900 lbm_uint16_t port;
901 lbm_uint32_t ip;
902 lbm_uint8_t instance[LBM_CONTEXT_INSTANCE_BLOCK_SZ];
903 } lbmr_ctxinfo_t;
904 #define O_LBMR_CTXINFO_T_VER_TYPE OFFSETOF(lbmr_ctxinfo_t, ver_type)
905 #define L_LBMR_CTXINFO_T_VER_TYPE SIZEOF(lbmr_ctxinfo_t, ver_type)
906 #define O_LBMR_CTXINFO_T_EXT_TYPE OFFSETOF(lbmr_ctxinfo_t, ext_type)
907 #define L_LBMR_CTXINFO_T_EXT_TYPE SIZEOF(lbmr_ctxinfo_t, ext_type)
908 #define O_LBMR_CTXINFO_T_LEN OFFSETOF(lbmr_ctxinfo_t, len)
909 #define L_LBMR_CTXINFO_T_LEN SIZEOF(lbmr_ctxinfo_t, len)
910 #define O_LBMR_CTXINFO_T_HOP_COUNT OFFSETOF(lbmr_ctxinfo_t, hop_count)
911 #define L_LBMR_CTXINFO_T_HOP_COUNT SIZEOF(lbmr_ctxinfo_t, hop_count)
912 #define O_LBMR_CTXINFO_T_FLAGS OFFSETOF(lbmr_ctxinfo_t, flags)
913 #define L_LBMR_CTXINFO_T_FLAGS SIZEOF(lbmr_ctxinfo_t, flags)
914 #define O_LBMR_CTXINFO_T_PORT OFFSETOF(lbmr_ctxinfo_t, port)
915 #define L_LBMR_CTXINFO_T_PORT SIZEOF(lbmr_ctxinfo_t, port)
916 #define O_LBMR_CTXINFO_T_IP OFFSETOF(lbmr_ctxinfo_t, ip)
917 #define L_LBMR_CTXINFO_T_IP SIZEOF(lbmr_ctxinfo_t, ip)
918 #define O_LBMR_CTXINFO_T_INSTANCE OFFSETOF(lbmr_ctxinfo_t, instance)
919 #define L_LBMR_CTXINFO_T_INSTANCE SIZEOF(lbmr_ctxinfo_t, instance)
920 #define L_LBMR_CTXINFO_T (gint) sizeof(lbmr_ctxinfo_t)
921
922 #define LBMR_CTXINFO_QUERY_FLAG 0x8000
923 #define LBMR_CTXINFO_IP_FLAG 0x4000
924 #define LBMR_CTXINFO_INSTANCE_FLAG 0x2000
925 #define LBMR_CTXINFO_TNWG_SRC_FLAG 0x1000
926 #define LBMR_CTXINFO_TNWG_RCV_FLAG 0x0800
927 #define LBMR_CTXINFO_PROXY_FLAG 0x0400
928 #define LBMR_CTXINFO_NAME_FLAG 0x0001
929
930 /* LBMR topic resolution request */
931 typedef struct
932 {
933 lbm_uint8_t ver_type;
934 lbm_uint8_t ext_type;
935 lbm_uint16_t flags;
936 } lbmr_topic_res_request_t;
937 #define O_LBMR_TOPIC_RES_REQUEST_T_VER_TYPE OFFSETOF(lbmr_topic_res_request_t, ver_type)
938 #define L_LBMR_TOPIC_RES_REQUEST_T_VER_TYPE SIZEOF(lbmr_topic_res_request_t, ver_type)
939 #define O_LBMR_TOPIC_RES_REQUEST_T_EXT_TYPE OFFSETOF(lbmr_topic_res_request_t, ext_type)
940 #define L_LBMR_TOPIC_RES_REQUEST_T_EXT_TYPE SIZEOF(lbmr_topic_res_request_t, ext_type)
941 #define O_LBMR_TOPIC_RES_REQUEST_T_FLAGS OFFSETOF(lbmr_topic_res_request_t, flags)
942 #define L_LBMR_TOPIC_RES_REQUEST_T_FLAGS SIZEOF(lbmr_topic_res_request_t, flags)
943 #define L_LBMR_TOPIC_RES_REQUEST_T (gint) sizeof(lbmr_topic_res_request_t)
944
945 #define LBM_TOPIC_RES_REQUEST_GW_REMOTE_INTEREST 0x40
946 #define LBM_TOPIC_RES_REQUEST_CONTEXT_QUERY 0x20
947 #define LBM_TOPIC_RES_REQUEST_CONTEXT_ADVERTISEMENT 0x10
948 #define LBM_TOPIC_RES_REQUEST_RESERVED1 0x08
949 #define LBM_TOPIC_RES_REQUEST_ADVERTISEMENT 0x04
950 #define LBM_TOPIC_RES_REQUEST_QUERY 0x02
951 #define LBM_TOPIC_RES_REQUEST_WILDCARD_QUERY 0x01
952
953 /* LBMR topic management block */
954 typedef struct
955 {
956 lbm_uint16_t len;
957 lbm_uint16_t tmrs;
958 } lbmr_tmb_t;
959 #define O_LBMR_TMB_T_LEN OFFSETOF(lbmr_tmb_t, len)
960 #define L_LBMR_TMB_T_LEN SIZEOF(lbmr_tmb_t, len)
961 #define O_LBMR_TMB_T_TMRS OFFSETOF(lbmr_tmb_t, tmrs)
962 #define L_LBMR_TMB_T_TMRS SIZEOF(lbmr_tmb_t, tmrs)
963 #define L_LBMR_TMB_T (gint) sizeof(lbmr_tmb_t)
964
965 /* LBMR topic management record */
966 typedef struct
967 {
968 lbm_uint16_t len;
969 lbm_uint8_t type;
970 lbm_uint8_t flags;
971 } lbmr_tmr_t;
972 #define O_LBMR_TMR_T_LEN OFFSETOF(lbmr_tmr_t, len)
973 #define L_LBMR_TMR_T_LEN SIZEOF(lbmr_tmr_t, len)
974 #define O_LBMR_TMR_T_TYPE OFFSETOF(lbmr_tmr_t, type)
975 #define L_LBMR_TMR_T_TYPE SIZEOF(lbmr_tmr_t, type)
976 #define O_LBMR_TMR_T_FLAGS OFFSETOF(lbmr_tmr_t, flags)
977 #define L_LBMR_TMR_T_FLAGS SIZEOF(lbmr_tmr_t, flags)
978 #define L_LBMR_TMR_T (gint) sizeof(lbmr_tmr_t)
979
980 #define LBMR_TMR_LEAVE_TOPIC 0x00
981 #define LBMR_TMR_TOPIC_USE 0x01
982
983 #define LBMR_TMR_FLAG_RESPONSE 0x80
984 #define LBMR_TMR_FLAG_WILDCARD_PCRE 0x40
985 #define LBMR_TMR_FLAG_WILDCARD_REGEX 0x20
986 #define LBMR_TMR_FLAG_WILDCARD_MASK (LBMR_TMR_FLAG_WILDCARD_PCRE | LBMR_TMR_FLAG_WILDCARD_REGEX)
987
988 /* LBMR queue information record */
989 typedef struct
990 {
991 lbm_uint32_t queue_id;
992 lbm_uint32_t queue_ver;
993 lbm_uint32_t queue_prev_ver;
994 lbm_uint16_t grp_blks;
995 lbm_uint16_t queue_blks;
996 } lbmr_qir_t;
997 #define O_LBMR_QIR_T_QUEUE_ID OFFSETOF(lbmr_qir_t, queue_id)
998 #define L_LBMR_QIR_T_QUEUE_ID SIZEOF(lbmr_qir_t, queue_id)
999 #define O_LBMR_QIR_T_QUEUE_VER OFFSETOF(lbmr_qir_t, queue_ver)
1000 #define L_LBMR_QIR_T_QUEUE_VER SIZEOF(lbmr_qir_t, queue_ver)
1001 #define O_LBMR_QIR_T_QUEUE_PREV_VER OFFSETOF(lbmr_qir_t, queue_prev_ver)
1002 #define L_LBMR_QIR_T_QUEUE_PREV_VER SIZEOF(lbmr_qir_t, queue_prev_ver)
1003 #define O_LBMR_QIR_T_GRP_BLKS OFFSETOF(lbmr_qir_t, grp_blks)
1004 #define L_LBMR_QIR_T_GRP_BLKS SIZEOF(lbmr_qir_t, grp_blks)
1005 #define O_LBMR_QIR_T_QUEUE_BLKS OFFSETOF(lbmr_qir_t, queue_blks)
1006 #define L_LBMR_QIR_T_QUEUE_BLKS SIZEOF(lbmr_qir_t, queue_blks)
1007 #define L_LBMR_QIR_T (gint) sizeof(lbmr_qir_t)
1008
1009 #define LBMR_QIR_OPTIONS 0x8000
1010 #define LBMR_QIR_GRP_BLOCKS_MASK 0x7fff
1011
1012 /* LBMR queue group block record */
1013 typedef struct
1014 {
1015 lbm_uint16_t grp_idx;
1016 lbm_uint16_t grp_sz;
1017 } lbmr_qir_grp_blk_t;
1018 #define O_LBMR_QIR_GRP_BLK_T_GRP_IDX OFFSETOF(lbmr_qir_grp_blk_t, grp_idx)
1019 #define L_LBMR_QIR_GRP_BLK_T_GRP_IDX SIZEOF(lbmr_qir_grp_blk_t, grp_idx)
1020 #define O_LBMR_QIR_GRP_BLK_T_GRP_SZ OFFSETOF(lbmr_qir_grp_blk_t, grp_sz)
1021 #define L_LBMR_QIR_GRP_BLK_T_GRP_SZ SIZEOF(lbmr_qir_grp_blk_t, grp_sz)
1022 #define L_LBMR_QIR_GRP_BLK_T (gint) sizeof(lbmr_qir_grp_blk_t)
1023
1024 /* LBMR queue block record */
1025 typedef struct
1026 {
1027 lbm_uint32_t ip;
1028 lbm_uint16_t port;
1029 lbm_uint16_t idx;
1030 lbm_uint16_t grp_idx;
1031 lbm_uint16_t reserved;
1032 } lbmr_qir_queue_blk_t;
1033 #define O_LBMR_QIR_QUEUE_BLK_T_IP OFFSETOF(lbmr_qir_queue_blk_t, ip)
1034 #define L_LBMR_QIR_QUEUE_BLK_T_IP SIZEOF(lbmr_qir_queue_blk_t, ip)
1035 #define O_LBMR_QIR_QUEUE_BLK_T_PORT OFFSETOF(lbmr_qir_queue_blk_t, port)
1036 #define L_LBMR_QIR_QUEUE_BLK_T_PORT SIZEOF(lbmr_qir_queue_blk_t, port)
1037 #define O_LBMR_QIR_QUEUE_BLK_T_IDX OFFSETOF(lbmr_qir_queue_blk_t, idx)
1038 #define L_LBMR_QIR_QUEUE_BLK_T_IDX SIZEOF(lbmr_qir_queue_blk_t, idx)
1039 #define O_LBMR_QIR_QUEUE_BLK_T_GRP_IDX OFFSETOF(lbmr_qir_queue_blk_t, grp_idx)
1040 #define L_LBMR_QIR_QUEUE_BLK_T_GRP_IDX SIZEOF(lbmr_qir_queue_blk_t, grp_idx)
1041 #define O_LBMR_QIR_QUEUE_BLK_T_RESERVED OFFSETOF(lbmr_qir_queue_blk_t, reserved)
1042 #define L_LBMR_QIR_QUEUE_BLK_T_RESERVED SIZEOF(lbmr_qir_queue_blk_t, reserved)
1043 #define L_LBMR_QIR_QUEUE_BLK_T (gint) sizeof(lbmr_qir_queue_blk_t)
1044
1045 #define LBMR_QIR_QUEUE_BLK_FLAG_MASTER 0x8000
1046
1047 /* LBMR packet option header */
1048 typedef struct
1049 {
1050 lbm_uint8_t type;
1051 lbm_uint8_t len;
1052 lbm_uint16_t flags;
1053 } lbmr_lbmr_opt_hdr_t;
1054 #define O_LBMR_LBMR_OPT_HDR_T_TYPE OFFSETOF(lbmr_lbmr_opt_hdr_t, type)
1055 #define L_LBMR_LBMR_OPT_HDR_T_TYPE SIZEOF(lbmr_lbmr_opt_hdr_t, type)
1056 #define O_LBMR_LBMR_OPT_HDR_T_LEN OFFSETOF(lbmr_lbmr_opt_hdr_t, len)
1057 #define L_LBMR_LBMR_OPT_HDR_T_LEN SIZEOF(lbmr_lbmr_opt_hdr_t, len)
1058 #define O_LBMR_LBMR_OPT_HDR_T_FLAGS OFFSETOF(lbmr_lbmr_opt_hdr_t, flags)
1059 #define L_LBMR_LBMR_OPT_HDR_T_FLAGS SIZEOF(lbmr_lbmr_opt_hdr_t, flags)
1060 #define L_LBMR_LBMR_OPT_HDR_T (gint) sizeof(lbmr_lbmr_opt_hdr_t)
1061
1062 #define LBMR_LBMR_OPT_HDR_FLAG_IGNORE 0x8000
1063
1064 /* LBMR packet option length header */
1065 typedef struct
1066 {
1067 lbm_uint8_t type;
1068 lbm_uint8_t len;
1069 lbm_uint16_t total_len;
1070 } lbmr_lbmr_opt_len_t;
1071 #define O_LBMR_LBMR_OPT_LEN_T_TYPE OFFSETOF(lbmr_lbmr_opt_len_t, type)
1072 #define L_LBMR_LBMR_OPT_LEN_T_TYPE SIZEOF(lbmr_lbmr_opt_len_t, type)
1073 #define O_LBMR_LBMR_OPT_LEN_T_LEN OFFSETOF(lbmr_lbmr_opt_len_t, len)
1074 #define L_LBMR_LBMR_OPT_LEN_T_LEN SIZEOF(lbmr_lbmr_opt_len_t, len)
1075 #define O_LBMR_LBMR_OPT_LEN_T_TOTAL_LEN OFFSETOF(lbmr_lbmr_opt_len_t, total_len)
1076 #define L_LBMR_LBMR_OPT_LEN_T_TOTAL_LEN SIZEOF(lbmr_lbmr_opt_len_t, total_len)
1077 #define L_LBMR_LBMR_OPT_LEN_T (gint) sizeof(lbmr_lbmr_opt_len_t)
1078
1079 #define LBMR_LBMR_OPT_LEN_TYPE 0x80
1080
1081 /* LBMR packet option source ID header */
1082 typedef struct
1083 {
1084 lbm_uint8_t type;
1085 lbm_uint8_t len;
1086 lbm_uint16_t flags;
1087 lbm_uint8_t src_id[LBM_CONTEXT_INSTANCE_BLOCK_SZ];
1088 } lbmr_lbmr_opt_src_id_t;
1089 #define O_LBMR_LBMR_OPT_SRC_ID_T_TYPE OFFSETOF(lbmr_lbmr_opt_src_id_t, type)
1090 #define L_LBMR_LBMR_OPT_SRC_ID_T_TYPE SIZEOF(lbmr_lbmr_opt_src_id_t, type)
1091 #define O_LBMR_LBMR_OPT_SRC_ID_T_LEN OFFSETOF(lbmr_lbmr_opt_src_id_t, len)
1092 #define L_LBMR_LBMR_OPT_SRC_ID_T_LEN SIZEOF(lbmr_lbmr_opt_src_id_t, len)
1093 #define O_LBMR_LBMR_OPT_SRC_ID_T_FLAGS OFFSETOF(lbmr_lbmr_opt_src_id_t, flags)
1094 #define L_LBMR_LBMR_OPT_SRC_ID_T_FLAGS SIZEOF(lbmr_lbmr_opt_src_id_t, flags)
1095 #define O_LBMR_LBMR_OPT_SRC_ID_T_SRC_ID OFFSETOF(lbmr_lbmr_opt_src_id_t, src_id)
1096 #define L_LBMR_LBMR_OPT_SRC_ID_T_SRC_ID SIZEOF(lbmr_lbmr_opt_src_id_t, src_id)
1097 #define L_LBMR_LBMR_OPT_SRC_ID_T (gint) sizeof(lbmr_lbmr_opt_src_id_t)
1098
1099 #define LBMR_LBMR_OPT_SRC_ID_TYPE 0x81
1100 #define LBMR_LBMR_OPT_SRC_ID_FLAG_IGNORE 0x8000
1101
1102 /* LBMR packet option source type header */
1103 typedef struct
1104 {
1105 lbm_uint8_t type;
1106 lbm_uint8_t len;
1107 lbm_uint8_t flags;
1108 lbm_uint8_t src_type;
1109 } lbmr_lbmr_opt_src_type_t;
1110 #define O_LBMR_LBMR_OPT_SRC_TYPE_T_TYPE OFFSETOF(lbmr_lbmr_opt_src_type_t, type)
1111 #define L_LBMR_LBMR_OPT_SRC_TYPE_T_TYPE SIZEOF(lbmr_lbmr_opt_src_type_t, type)
1112 #define O_LBMR_LBMR_OPT_SRC_TYPE_T_LEN OFFSETOF(lbmr_lbmr_opt_src_type_t, len)
1113 #define L_LBMR_LBMR_OPT_SRC_TYPE_T_LEN SIZEOF(lbmr_lbmr_opt_src_type_t, len)
1114 #define O_LBMR_LBMR_OPT_SRC_TYPE_T_FLAGS OFFSETOF(lbmr_lbmr_opt_src_type_t, flags)
1115 #define L_LBMR_LBMR_OPT_SRC_TYPE_T_FLAGS SIZEOF(lbmr_lbmr_opt_src_type_t, flags)
1116 #define O_LBMR_LBMR_OPT_SRC_TYPE_T_SRC_TYPE OFFSETOF(lbmr_lbmr_opt_src_type_t, src_type)
1117 #define L_LBMR_LBMR_OPT_SRC_TYPE_T_SRC_TYPE SIZEOF(lbmr_lbmr_opt_src_type_t, src_type)
1118 #define L_LBMR_LBMR_OPT_SRC_TYPE_T (gint) sizeof(lbmr_lbmr_opt_src_type_t)
1119
1120 #define LBMR_LBMR_OPT_SRC_TYPE_TYPE 0x82
1121 #define LBMR_LBMR_OPT_SRC_TYPE_SZ 4
1122 #define LBMR_LBMR_OPT_SRC_TYPE_FLAG_IGNORE 0x80
1123
1124 #define LBMR_LBMR_OPT_SRC_TYPE_SRC_TYPE_APPLICATION 0
1125 #define LBMR_LBMR_OPT_SRC_TYPE_SRC_TYPE_TNWGD 1
1126 #define LBMR_LBMR_OPT_SRC_TYPE_SRC_TYPE_STORE 2
1127
1128 /* LBMR packet option version header */
1129 typedef struct
1130 {
1131 lbm_uint8_t type;
1132 lbm_uint8_t len;
1133 lbm_uint16_t flags;
1134 lbm_uint32_t version;
1135 } lbmr_lbmr_opt_version_t;
1136 #define O_LBMR_LBMR_OPT_VERSION_T_TYPE OFFSETOF(lbmr_lbmr_opt_version_t, type)
1137 #define L_LBMR_LBMR_OPT_VERSION_T_TYPE SIZEOF(lbmr_lbmr_opt_version_t, type)
1138 #define O_LBMR_LBMR_OPT_VERSION_T_LEN OFFSETOF(lbmr_lbmr_opt_version_t, len)
1139 #define L_LBMR_LBMR_OPT_VERSION_T_LEN SIZEOF(lbmr_lbmr_opt_version_t, len)
1140 #define O_LBMR_LBMR_OPT_VERSION_T_FLAGS OFFSETOF(lbmr_lbmr_opt_version_t, flags)
1141 #define L_LBMR_LBMR_OPT_VERSION_T_FLAGS SIZEOF(lbmr_lbmr_opt_version_t, flags)
1142 #define O_LBMR_LBMR_OPT_VERSION_T_VERSION OFFSETOF(lbmr_lbmr_opt_version_t, version)
1143 #define L_LBMR_LBMR_OPT_VERSION_T_VERSION SIZEOF(lbmr_lbmr_opt_version_t, version)
1144 #define L_LBMR_LBMR_OPT_VERSION_T (gint) sizeof(lbmr_lbmr_opt_version_t)
1145
1146 #define LBMR_LBMR_OPT_VERSION_TYPE 0x83
1147 #define LBMR_LBMR_OPT_VERSIION_SZ 8
1148 #define LBMR_LBMR_OPT_VERSION_FLAG_IGNORE 0x8000
1149 #define LBMR_LBMR_OPT_VERSION_FLAG_UME 0x0001
1150 #define LBMR_LBMR_OPT_VERSION_FLAG_UMQ 0x0002
1151
1152 /* LBMR packet option domain header */
1153 typedef struct
1154 {
1155 lbm_uint8_t type;
1156 lbm_uint8_t len;
1157 lbm_uint16_t flags;
1158 lbm_uint32_t local_domain_id;
1159 } lbmr_lbmr_opt_local_domain_t;
1160 #define O_LBMR_LBMR_OPT_LOCAL_DOMAIN_T_TYPE OFFSETOF(lbmr_lbmr_opt_local_domain_t, type)
1161 #define L_LBMR_LBMR_OPT_LOCAL_DOMAIN_T_TYPE SIZEOF(lbmr_lbmr_opt_local_domain_t, type)
1162 #define O_LBMR_LBMR_OPT_LOCAL_DOMAIN_T_LEN OFFSETOF(lbmr_lbmr_opt_local_domain_t, len)
1163 #define L_LBMR_LBMR_OPT_LOCAL_DOMAIN_T_LEN SIZEOF(lbmr_lbmr_opt_local_domain_t, len)
1164 #define O_LBMR_LBMR_OPT_LOCAL_DOMAIN_T_FLAGS OFFSETOF(lbmr_lbmr_opt_local_domain_t, flags)
1165 #define L_LBMR_LBMR_OPT_LOCAL_DOMAIN_T_FLAGS SIZEOF(lbmr_lbmr_opt_local_domain_t, flags)
1166 #define O_LBMR_LBMR_OPT_LOCAL_DOMAIN_T_LOCAL_DOMAIN_ID OFFSETOF(lbmr_lbmr_opt_local_domain_t, local_domain_id)
1167 #define L_LBMR_LBMR_OPT_LOCAL_DOMAIN_T_LOCAL_DOMAIN_ID SIZEOF(lbmr_lbmr_opt_local_domain_t, local_domain_id)
1168 #define L_LBMR_LBMR_OPT_LOCAL_DOMAIN_T (gint) sizeof(lbmr_lbmr_opt_local_domain_t)
1169
1170 #define LBMR_LBMR_OPT_LOCAL_DOMAIN_TYPE 0x84
1171 #define LBMR_LBMR_OPT_LOCAL_DOMAIN_SZ 8
1172 #define LBMR_LBMR_OPT_LOCAL_DOMAIN_FLAG_IGNORE 0x8000
1173
1174 /* LBMR (extended) proxy source election record */
1175 typedef struct
1176 {
1177 lbm_uint8_t ver_type;
1178 lbm_uint8_t ext_type;
1179 lbm_uint16_t dep_type;
1180 lbm_uint16_t len;
1181 lbm_uint16_t flags;
1182 lbm_uint32_t source_ip;
1183 lbm_uint32_t store_ip;
1184 lbm_uint32_t transport_idx;
1185 lbm_uint32_t topic_idx;
1186 lbm_uint16_t source_port;
1187 lbm_uint16_t store_port;
1188 } lbmr_pser_t;
1189 #define O_LBMR_PSER_T_VER_TYPE OFFSETOF(lbmr_pser_t, ver_type)
1190 #define L_LBMR_PSER_T_VER_TYPE SIZEOF(lbmr_pser_t, ver_type)
1191 #define O_LBMR_PSER_T_EXT_TYPE OFFSETOF(lbmr_pser_t, ext_type)
1192 #define L_LBMR_PSER_T_EXT_TYPE SIZEOF(lbmr_pser_t, ext_type)
1193 #define O_LBMR_PSER_T_DEP_TYPE OFFSETOF(lbmr_pser_t, dep_type)
1194 #define L_LBMR_PSER_T_DEP_TYPE SIZEOF(lbmr_pser_t, dep_type)
1195 #define O_LBMR_PSER_T_LEN OFFSETOF(lbmr_pser_t, len)
1196 #define L_LBMR_PSER_T_LEN SIZEOF(lbmr_pser_t, len)
1197 #define O_LBMR_PSER_T_FLAGS OFFSETOF(lbmr_pser_t, flags)
1198 #define L_LBMR_PSER_T_FLAGS SIZEOF(lbmr_pser_t, flags)
1199 #define O_LBMR_PSER_T_SOURCE_IP OFFSETOF(lbmr_pser_t, source_ip)
1200 #define L_LBMR_PSER_T_SOURCE_IP SIZEOF(lbmr_pser_t, source_ip)
1201 #define O_LBMR_PSER_T_STORE_IP OFFSETOF(lbmr_pser_t, store_ip)
1202 #define L_LBMR_PSER_T_STORE_IP SIZEOF(lbmr_pser_t, store_ip)
1203 #define O_LBMR_PSER_T_TRANSPORT_IDX OFFSETOF(lbmr_pser_t, transport_idx)
1204 #define L_LBMR_PSER_T_TRANSPORT_IDX SIZEOF(lbmr_pser_t, transport_idx)
1205 #define O_LBMR_PSER_T_TOPIC_IDX OFFSETOF(lbmr_pser_t, topic_idx)
1206 #define L_LBMR_PSER_T_TOPIC_IDX SIZEOF(lbmr_pser_t, topic_idx)
1207 #define O_LBMR_PSER_T_SOURCE_PORT OFFSETOF(lbmr_pser_t, source_port)
1208 #define L_LBMR_PSER_T_SOURCE_PORT SIZEOF(lbmr_pser_t, source_port)
1209 #define O_LBMR_PSER_T_STORE_PORT OFFSETOF(lbmr_pser_t, store_port)
1210 #define L_LBMR_PSER_T_STORE_PORT SIZEOF(lbmr_pser_t, store_port)
1211 #define O_LBMR_PSER_T_TOPIC (O_LBMR_PSER_T_STORE_PORT + L_LBMR_PSER_T_STORE_PORT)
1212 #define L_LBMR_PSER_T (gint) sizeof(lbmr_pser_t)
1213
1214 #define LBMR_PSER_OPT_FLAG 0x8000
1215 #define LBMR_HDR_EXT_TYPE_UME_PROXY_SRC_ELECT_DEP_ELECT 0
1216 #define LBMR_HDR_EXT_TYPE_UME_PROXY_SRC_ELECT_DEP_REELECT 1
1217
1218 typedef struct
1219 {
1220 lbm_uint16_t type;
1221 lbm_uint16_t optlen;
1222 } lbmr_pser_optlen_t;
1223 #define O_LBMR_PSER_OPTLEN_T_TYPE OFFSETOF(lbmr_pser_optlen_t, type)
1224 #define L_LBMR_PSER_OPTLEN_T_TYPE SIZEOF(lbmr_pser_optlen_t, type)
1225 #define O_LBMR_PSER_OPTLEN_T_OPTLEN OFFSETOF(lbmr_pser_optlen_t, optlen)
1226 #define L_LBMR_PSER_OPTLEN_T_OPTLEN SIZEOF(lbmr_pser_optlen_t, optlen)
1227 #define L_LBMR_PSER_OPTLEN_T (gint) sizeof(lbmr_pser_optlen_t)
1228
1229 typedef struct
1230 {
1231 lbm_uint8_t len;
1232 lbm_uint8_t type;
1233 } lbmr_pser_opt_hdr_t;
1234 #define O_LBMR_PSER_OPT_HDR_T_LEN OFFSETOF(lbmr_pser_opt_hdr_t, len)
1235 #define L_LBMR_PSER_OPT_HDR_T_LEN SIZEOF(lbmr_pser_opt_hdr_t, len)
1236 #define O_LBMR_PSER_OPT_HDR_T_TYPE OFFSETOF(lbmr_pser_opt_hdr_t, type)
1237 #define L_LBMR_PSER_OPT_HDR_T_TYPE SIZEOF(lbmr_pser_opt_hdr_t, type)
1238 #define L_LBMR_PSER_OPT_HDR_T (gint) sizeof(lbmr_pser_opt_hdr_t)
1239
1240 #define LBMR_PSER_OPT_SRC_CTXINST_TYPE 0x00
1241 #define LBMR_PSER_OPT_STORE_CTXINST_TYPE 0x01
1242
1243 typedef struct
1244 {
1245 lbm_uint8_t len;
1246 lbm_uint8_t type;
1247 lbm_uint8_t ctxinst[LBM_CONTEXT_INSTANCE_BLOCK_SZ];
1248 } lbmr_pser_opt_ctxinst_t;
1249 #define O_LBMR_PSER_OPT_CTXINST_T_LEN OFFSETOF(lbmr_pser_opt_ctxinst_t, len)
1250 #define L_LBMR_PSER_OPT_CTXINST_T_LEN SIZEOF(lbmr_pser_opt_ctxinst_t, len)
1251 #define O_LBMR_PSER_OPT_CTXINST_T_TYPE OFFSETOF(lbmr_pser_opt_ctxinst_t, type)
1252 #define L_LBMR_PSER_OPT_CTXINST_T_TYPE SIZEOF(lbmr_pser_opt_ctxinst_t, type)
1253 #define O_LBMR_PSER_OPT_CTXINST_T_CTXINST OFFSETOF(lbmr_pser_opt_ctxinst_t, ctxinst)
1254 #define L_LBMR_PSER_OPT_CTXINST_T_CTXINST SIZEOF(lbmr_pser_opt_ctxinst_t, ctxinst)
1255 #define L_LBMR_PSER_OPT_CTXINST_T (gint) sizeof(lbmr_pser_opt_ctxinst_t)
1256
1257 /* LBMR (extended) gateway message */
1258 typedef struct
1259 {
1260 lbm_uint8_t ver_type;
1261 lbm_uint8_t ext_type;
1262 lbm_uint16_t len;
1263 lbm_uint16_t type;
1264 lbm_uint16_t reserved;
1265 } lbmr_tnwg_t;
1266 #define O_LBMR_TNWG_T_VER_TYPE OFFSETOF(lbmr_tnwg_t, ver_type)
1267 #define L_LBMR_TNWG_T_VER_TYPE SIZEOF(lbmr_tnwg_t, ver_type)
1268 #define O_LBMR_TNWG_T_EXT_TYPE OFFSETOF(lbmr_tnwg_t, ext_type)
1269 #define L_LBMR_TNWG_T_EXT_TYPE SIZEOF(lbmr_tnwg_t, ext_type)
1270 #define O_LBMR_TNWG_T_LEN OFFSETOF(lbmr_tnwg_t, len)
1271 #define L_LBMR_TNWG_T_LEN SIZEOF(lbmr_tnwg_t, len)
1272 #define O_LBMR_TNWG_T_TYPE OFFSETOF(lbmr_tnwg_t, type)
1273 #define L_LBMR_TNWG_T_TYPE SIZEOF(lbmr_tnwg_t, type)
1274 #define O_LBMR_TNWG_T_RESERVED OFFSETOF(lbmr_tnwg_t, reserved)
1275 #define L_LBMR_TNWG_T_RESERVED SIZEOF(lbmr_tnwg_t, reserved)
1276 #define L_LBMR_TNWG_T (gint) sizeof(lbmr_tnwg_t)
1277
1278 #define LBMR_TNWG_TYPE_INTEREST 0x0000
1279 #define LBMR_TNWG_TYPE_CTXINFO 0x0001
1280 #define LBMR_TNWG_TYPE_TRREQ 0x0002
1281
1282 /* LBMR (extended) gateway message - interest header */
1283 typedef struct
1284 {
1285 lbm_uint16_t len;
1286 lbm_uint16_t count;
1287 } lbmr_tnwg_interest_t;
1288 #define O_LBMR_TNWG_INTEREST_T_LEN OFFSETOF(lbmr_tnwg_interest_t, len)
1289 #define L_LBMR_TNWG_INTEREST_T_LEN SIZEOF(lbmr_tnwg_interest_t, len)
1290 #define O_LBMR_TNWG_INTEREST_T_COUNT OFFSETOF(lbmr_tnwg_interest_t, count)
1291 #define L_LBMR_TNWG_INTEREST_T_COUNT SIZEOF(lbmr_tnwg_interest_t, count)
1292 #define L_LBMR_TNWG_INTEREST_T (gint) sizeof(lbmr_tnwg_interest_t)
1293
1294 /* LBMR (extended) gateway message - interest record */
1295 typedef struct
1296 {
1297 lbm_uint16_t len;
1298 lbm_uint8_t flags;
1299 lbm_uint8_t pattype;
1300 lbm_uint32_t domain_id;
1301 } lbmr_tnwg_interest_rec_t;
1302 #define O_LBMR_TNWG_INTEREST_REC_T_LEN OFFSETOF(lbmr_tnwg_interest_rec_t, len)
1303 #define L_LBMR_TNWG_INTEREST_REC_T_LEN SIZEOF(lbmr_tnwg_interest_rec_t, len)
1304 #define O_LBMR_TNWG_INTEREST_REC_T_FLAGS OFFSETOF(lbmr_tnwg_interest_rec_t, flags)
1305 #define L_LBMR_TNWG_INTEREST_REC_T_FLAGS SIZEOF(lbmr_tnwg_interest_rec_t, flags)
1306 #define O_LBMR_TNWG_INTEREST_REC_T_PATTYPE OFFSETOF(lbmr_tnwg_interest_rec_t, pattype)
1307 #define L_LBMR_TNWG_INTEREST_REC_T_PATTYPE SIZEOF(lbmr_tnwg_interest_rec_t, pattype)
1308 #define O_LBMR_TNWG_INTEREST_REC_T_DOMAIN_ID OFFSETOF(lbmr_tnwg_interest_rec_t, domain_id)
1309 #define L_LBMR_TNWG_INTEREST_REC_T_DOMAIN_ID SIZEOF(lbmr_tnwg_interest_rec_t, domain_id)
1310 #define L_LBMR_TNWG_INTEREST_REC_T (gint) sizeof(lbmr_tnwg_interest_rec_t)
1311
1312 #define LBMR_TNWG_INTEREST_REC_PATTERN_FLAG 0x80
1313 #define LBMR_TNWG_INTEREST_REC_CANCEL_FLAG 0x40
1314 #define LBMR_TNWG_INTEREST_REC_REFRESH_FLAG 0x20
1315
1316 /* LBMR (extended) gateway message - ctxinfo header */
1317 typedef struct
1318 {
1319 lbm_uint16_t len;
1320 lbm_uint8_t hop_count;
1321 lbm_uint8_t reserved;
1322 lbm_uint32_t flags1;
1323 lbm_uint32_t flags2;
1324 } lbmr_tnwg_ctxinfo_t;
1325 #define O_LBMR_TNWG_CTXINFO_T_LEN OFFSETOF(lbmr_tnwg_ctxinfo_t, len)
1326 #define L_LBMR_TNWG_CTXINFO_T_LEN SIZEOF(lbmr_tnwg_ctxinfo_t, len)
1327 #define O_LBMR_TNWG_CTXINFO_T_HOP_COUNT OFFSETOF(lbmr_tnwg_ctxinfo_t, hop_count)
1328 #define L_LBMR_TNWG_CTXINFO_T_HOP_COUNT SIZEOF(lbmr_tnwg_ctxinfo_t, hop_count)
1329 #define O_LBMR_TNWG_CTXINFO_T_RESERVED OFFSETOF(lbmr_tnwg_ctxinfo_t, reserved)
1330 #define L_LBMR_TNWG_CTXINFO_T_RESERVED SIZEOF(lbmr_tnwg_ctxinfo_t, reserved)
1331 #define O_LBMR_TNWG_CTXINFO_T_FLAGS1 OFFSETOF(lbmr_tnwg_ctxinfo_t, flags1)
1332 #define L_LBMR_TNWG_CTXINFO_T_FLAGS1 SIZEOF(lbmr_tnwg_ctxinfo_t, flags1)
1333 #define O_LBMR_TNWG_CTXINFO_T_FLAGS2 OFFSETOF(lbmr_tnwg_ctxinfo_t, flags2)
1334 #define L_LBMR_TNWG_CTXINFO_T_FLAGS2 SIZEOF(lbmr_tnwg_ctxinfo_t, flags2)
1335 #define L_LBMR_TNWG_CTXINFO_T (gint) sizeof(lbmr_tnwg_ctxinfo_t)
1336
1337 #define LBMR_TNWG_CTXINFO_QUERY_FLAG 0x80000000
1338 #define LBMR_TNWG_CTXINFO_TNWG_SRC_FLAG 0x40000000
1339 #define LBMR_TNWG_CTXINFO_TNWG_RCV_FLAG 0x20000000
1340 #define LBMR_TNWG_CTXINFO_PROXY_FLAG 0x10000000
1341
1342 /* LBMR (extended) gateway message - topic res request header */
1343 typedef struct
1344 {
1345 lbm_uint16_t len;
1346 } lbmr_tnwg_trreq_t;
1347 #define O_LBMR_TNWG_TRREQ_T_LEN OFFSETOF(lbmr_tnwg_trreq_t, len)
1348 #define L_LBMR_TNWG_TRREQ_T_LEN SIZEOF(lbmr_tnwg_trreq_t, len)
1349 #define L_LBMR_TNWG_TRREQ_T (gint) sizeof(lbmr_tnwg_trreq_t)
1350
1351 /* LBMR (extended) gateway message - basic option */
1352 typedef struct
1353 {
1354 lbm_uint8_t type;
1355 lbm_uint8_t len;
1356 lbm_uint16_t flags;
1357 } lbmr_tnwg_opt_t;
1358 #define O_LBMR_TNWG_OPT_T_TYPE OFFSETOF(lbmr_tnwg_opt_t, type)
1359 #define L_LBMR_TNWG_OPT_T_TYPE SIZEOF(lbmr_tnwg_opt_t, type)
1360 #define O_LBMR_TNWG_OPT_T_LEN OFFSETOF(lbmr_tnwg_opt_t, len)
1361 #define L_LBMR_TNWG_OPT_T_LEN SIZEOF(lbmr_tnwg_opt_t, len)
1362 #define O_LBMR_TNWG_OPT_T_FLAGS OFFSETOF(lbmr_tnwg_opt_t, flags)
1363 #define L_LBMR_TNWG_OPT_T_FLAGS SIZEOF(lbmr_tnwg_opt_t, flags)
1364 #define L_LBMR_TNWG_OPT_T (gint) sizeof(lbmr_tnwg_opt_t)
1365
1366 #define LBMR_TNWG_OPT_IGNORE_FLAG 0x8000
1367
1368 /* LBMR (extended) gateway message - ctxinst option */
1369 typedef struct
1370 {
1371 lbm_uint8_t type;
1372 lbm_uint8_t len;
1373 lbm_uint16_t flags;
1374 lbm_uint8_t instance[LBM_CONTEXT_INSTANCE_BLOCK_SZ];
1375 } lbmr_tnwg_opt_ctxinst_t;
1376 #define O_LBMR_TNWG_OPT_CTXINST_T_TYPE OFFSETOF(lbmr_tnwg_opt_ctxinst_t, type)
1377 #define L_LBMR_TNWG_OPT_CTXINST_T_TYPE SIZEOF(lbmr_tnwg_opt_ctxinst_t, type)
1378 #define O_LBMR_TNWG_OPT_CTXINST_T_LEN OFFSETOF(lbmr_tnwg_opt_ctxinst_t, len)
1379 #define L_LBMR_TNWG_OPT_CTXINST_T_LEN SIZEOF(lbmr_tnwg_opt_ctxinst_t, len)
1380 #define O_LBMR_TNWG_OPT_CTXINST_T_FLAGS OFFSETOF(lbmr_tnwg_opt_ctxinst_t, flags)
1381 #define L_LBMR_TNWG_OPT_CTXINST_T_FLAGS SIZEOF(lbmr_tnwg_opt_ctxinst_t, flags)
1382 #define O_LBMR_TNWG_OPT_CTXINST_T_INSTANCE OFFSETOF(lbmr_tnwg_opt_ctxinst_t, instance)
1383 #define L_LBMR_TNWG_OPT_CTXINST_T_INSTANCE SIZEOF(lbmr_tnwg_opt_ctxinst_t, instance)
1384 #define L_LBMR_TNWG_OPT_CTXINST_T (gint) sizeof(lbmr_tnwg_opt_ctxinst_t)
1385
1386 #define LBMR_TNWG_OPT_CTXINST_TYPE 0x00
1387
1388 /* LBMR (extended) gateway message - address option */
1389 typedef struct
1390 {
1391 lbm_uint8_t type;
1392 lbm_uint8_t len;
1393 lbm_uint16_t flags;
1394 lbm_uint16_t port;
1395 lbm_uint16_t res;
1396 lbm_uint32_t ip;
1397 } lbmr_tnwg_opt_address_t;
1398 #define O_LBMR_TNWG_OPT_ADDRESS_T_TYPE OFFSETOF(lbmr_tnwg_opt_address_t, type)
1399 #define L_LBMR_TNWG_OPT_ADDRESS_T_TYPE SIZEOF(lbmr_tnwg_opt_address_t, type)
1400 #define O_LBMR_TNWG_OPT_ADDRESS_T_LEN OFFSETOF(lbmr_tnwg_opt_address_t, len)
1401 #define L_LBMR_TNWG_OPT_ADDRESS_T_LEN SIZEOF(lbmr_tnwg_opt_address_t, len)
1402 #define O_LBMR_TNWG_OPT_ADDRESS_T_FLAGS OFFSETOF(lbmr_tnwg_opt_address_t, flags)
1403 #define L_LBMR_TNWG_OPT_ADDRESS_T_FLAGS SIZEOF(lbmr_tnwg_opt_address_t, flags)
1404 #define O_LBMR_TNWG_OPT_ADDRESS_T_PORT OFFSETOF(lbmr_tnwg_opt_address_t, port)
1405 #define L_LBMR_TNWG_OPT_ADDRESS_T_PORT SIZEOF(lbmr_tnwg_opt_address_t, port)
1406 #define O_LBMR_TNWG_OPT_ADDRESS_T_RES OFFSETOF(lbmr_tnwg_opt_address_t, res)
1407 #define L_LBMR_TNWG_OPT_ADDRESS_T_RES SIZEOF(lbmr_tnwg_opt_address_t, res)
1408 #define O_LBMR_TNWG_OPT_ADDRESS_T_IP OFFSETOF(lbmr_tnwg_opt_address_t, ip)
1409 #define L_LBMR_TNWG_OPT_ADDRESS_T_IP SIZEOF(lbmr_tnwg_opt_address_t, ip)
1410 #define L_LBMR_TNWG_OPT_ADDRESS_T (gint) sizeof(lbmr_tnwg_opt_address_t)
1411
1412 #define LBMR_TNWG_OPT_ADDRESS_TYPE 0x01
1413
1414 /* LBMR (extended) gateway message - domain option */
1415 typedef struct
1416 {
1417 lbm_uint8_t type;
1418 lbm_uint8_t len;
1419 lbm_uint16_t flags;
1420 lbm_uint32_t domain_id;
1421 } lbmr_tnwg_opt_domain_t;
1422 #define O_LBMR_TNWG_OPT_DOMAIN_T_TYPE OFFSETOF(lbmr_tnwg_opt_domain_t, type)
1423 #define L_LBMR_TNWG_OPT_DOMAIN_T_TYPE SIZEOF(lbmr_tnwg_opt_domain_t, type)
1424 #define O_LBMR_TNWG_OPT_DOMAIN_T_LEN OFFSETOF(lbmr_tnwg_opt_domain_t, len)
1425 #define L_LBMR_TNWG_OPT_DOMAIN_T_LEN SIZEOF(lbmr_tnwg_opt_domain_t, len)
1426 #define O_LBMR_TNWG_OPT_DOMAIN_T_FLAGS OFFSETOF(lbmr_tnwg_opt_domain_t, flags)
1427 #define L_LBMR_TNWG_OPT_DOMAIN_T_FLAGS SIZEOF(lbmr_tnwg_opt_domain_t, flags)
1428 #define O_LBMR_TNWG_OPT_DOMAIN_T_DOMAIN_ID OFFSETOF(lbmr_tnwg_opt_domain_t, domain_id)
1429 #define L_LBMR_TNWG_OPT_DOMAIN_T_DOMAIN_ID SIZEOF(lbmr_tnwg_opt_domain_t, domain_id)
1430 #define L_LBMR_TNWG_OPT_DOMAIN_T (gint) sizeof(lbmr_tnwg_opt_domain_t)
1431
1432 #define LBMR_TNWG_OPT_DOMAIN_TYPE 0x02
1433
1434 /* LBMR (extended) gateway message - name option (a base option) */
1435 #define LBMR_TNWG_OPT_NAME_TYPE 0x03
1436
1437 /* LBMR (extended) remote domain route message */
1438 typedef struct
1439 {
1440 lbm_uint8_t ver_type;
1441 lbm_uint8_t ext_type;
1442 lbm_uint16_t num_domains;
1443 lbm_uint32_t ip;
1444 lbm_uint16_t port;
1445 lbm_uint16_t reserved;
1446 lbm_uint32_t length;
1447 /* lbm_uint32_t domains[num_domains]; */
1448 } lbmr_remote_domain_route_hdr_t;
1449 #define O_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_VER_TYPE OFFSETOF(lbmr_remote_domain_route_hdr_t, ver_type)
1450 #define L_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_VER_TYPE SIZEOF(lbmr_remote_domain_route_hdr_t, ver_type)
1451 #define O_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_EXT_TYPE OFFSETOF(lbmr_remote_domain_route_hdr_t, ext_type)
1452 #define L_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_EXT_TYPE SIZEOF(lbmr_remote_domain_route_hdr_t, ext_type)
1453 #define O_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_NUM_DOMAINS OFFSETOF(lbmr_remote_domain_route_hdr_t, num_domains)
1454 #define L_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_NUM_DOMAINS SIZEOF(lbmr_remote_domain_route_hdr_t, num_domains)
1455 #define O_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_IP OFFSETOF(lbmr_remote_domain_route_hdr_t, ip)
1456 #define L_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_IP SIZEOF(lbmr_remote_domain_route_hdr_t, ip)
1457 #define O_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_PORT OFFSETOF(lbmr_remote_domain_route_hdr_t, port)
1458 #define L_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_PORT SIZEOF(lbmr_remote_domain_route_hdr_t, port)
1459 #define O_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_RESERVED OFFSETOF(lbmr_remote_domain_route_hdr_t, reserved)
1460 #define L_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_RESERVED SIZEOF(lbmr_remote_domain_route_hdr_t, reserved)
1461 #define O_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_LENGTH OFFSETOF(lbmr_remote_domain_route_hdr_t, length)
1462 #define L_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_LENGTH SIZEOF(lbmr_remote_domain_route_hdr_t, length)
1463 #define L_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T (gint) sizeof(lbmr_remote_domain_route_hdr_t)
1464
1465 /* LBMR (extended) remote context information message */
1466 typedef struct
1467 {
1468 lbm_uint8_t ver_type;
1469 lbm_uint8_t ext_type;
1470 lbm_uint16_t len;
1471 lbm_uint16_t num_recs;
1472 lbm_uint16_t reserved;
1473 } lbmr_rctxinfo_t;
1474 #define O_LBMR_RCTXINFO_T_VER_TYPE OFFSETOF(lbmr_rctxinfo_t, ver_type)
1475 #define L_LBMR_RCTXINFO_T_VER_TYPE SIZEOF(lbmr_rctxinfo_t, ver_type)
1476 #define O_LBMR_RCTXINFO_T_EXT_TYPE OFFSETOF(lbmr_rctxinfo_t, ext_type)
1477 #define L_LBMR_RCTXINFO_T_EXT_TYPE SIZEOF(lbmr_rctxinfo_t, ext_type)
1478 #define O_LBMR_RCTXINFO_T_LEN OFFSETOF(lbmr_rctxinfo_t, len)
1479 #define L_LBMR_RCTXINFO_T_LEN SIZEOF(lbmr_rctxinfo_t, len)
1480 #define O_LBMR_RCTXINFO_T_NUM_RECS OFFSETOF(lbmr_rctxinfo_t, num_recs)
1481 #define L_LBMR_RCTXINFO_T_NUM_RECS SIZEOF(lbmr_rctxinfo_t, num_recs)
1482 #define O_LBMR_RCTXINFO_T_RESERVED OFFSETOF(lbmr_rctxinfo_t, reserved)
1483 #define L_LBMR_RCTXINFO_T_RESERVED SIZEOF(lbmr_rctxinfo_t, reserved)
1484 #define L_LBMR_RCTXINFO_T (gint) sizeof(lbmr_rctxinfo_t)
1485
1486 /* LBMR (extended) remote context information record */
1487 typedef struct
1488 {
1489 lbm_uint16_t len;
1490 lbm_uint16_t flags;
1491 } lbmr_rctxinfo_rec_t;
1492 #define O_LBMR_RCTXINFO_REC_T_LEN OFFSETOF(lbmr_rctxinfo_rec_t, len)
1493 #define L_LBMR_RCTXINFO_REC_T_LEN SIZEOF(lbmr_rctxinfo_rec_t, len)
1494 #define O_LBMR_RCTXINFO_REC_T_FLAGS OFFSETOF(lbmr_rctxinfo_rec_t, flags)
1495 #define L_LBMR_RCTXINFO_REC_T_FLAGS SIZEOF(lbmr_rctxinfo_rec_t, flags)
1496 #define L_LBMR_RCTXINFO_REC_T (gint) sizeof(lbmr_rctxinfo_rec_t)
1497
1498 #define LBMR_RCTXINFO_REC_FLAG_QUERY 0x8000
1499
1500 /* LBMR (extended) remote context information record option */
1501 typedef struct
1502 {
1503 lbm_uint8_t type;
1504 lbm_uint8_t len;
1505 lbm_uint16_t flags;
1506 } lbmr_rctxinfo_rec_opt_t;
1507 #define O_LBMR_RCTXINFO_REC_OPT_T_TYPE OFFSETOF(lbmr_rctxinfo_rec_opt_t, type)
1508 #define L_LBMR_RCTXINFO_REC_OPT_T_TYPE SIZEOF(lbmr_rctxinfo_rec_opt_t, type)
1509 #define O_LBMR_RCTXINFO_REC_OPT_T_LEN OFFSETOF(lbmr_rctxinfo_rec_opt_t, len)
1510 #define L_LBMR_RCTXINFO_REC_OPT_T_LEN SIZEOF(lbmr_rctxinfo_rec_opt_t, len)
1511 #define O_LBMR_RCTXINFO_REC_OPT_T_FLAGS OFFSETOF(lbmr_rctxinfo_rec_opt_t, flags)
1512 #define L_LBMR_RCTXINFO_REC_OPT_T_FLAGS SIZEOF(lbmr_rctxinfo_rec_opt_t, flags)
1513 #define L_LBMR_RCTXINFO_REC_OPT_T (gint) sizeof(lbmr_rctxinfo_rec_opt_t)
1514
1515 /* LBMR (extended) remote context information record address option */
1516 typedef struct
1517 {
1518 lbm_uint8_t type;
1519 lbm_uint8_t len;
1520 lbm_uint16_t flags;
1521 lbm_uint32_t domain_id;
1522 lbm_uint32_t ip;
1523 lbm_uint16_t port;
1524 lbm_uint16_t res;
1525 } lbmr_rctxinfo_rec_address_opt_t;
1526 #define O_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_TYPE OFFSETOF(lbmr_rctxinfo_rec_address_opt_t, type)
1527 #define L_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_TYPE SIZEOF(lbmr_rctxinfo_rec_address_opt_t, type)
1528 #define O_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_LEN OFFSETOF(lbmr_rctxinfo_rec_address_opt_t, len)
1529 #define L_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_LEN SIZEOF(lbmr_rctxinfo_rec_address_opt_t, len)
1530 #define O_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_FLAGS OFFSETOF(lbmr_rctxinfo_rec_address_opt_t, flags)
1531 #define L_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_FLAGS SIZEOF(lbmr_rctxinfo_rec_address_opt_t, flags)
1532 #define O_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_DOMAIN_ID OFFSETOF(lbmr_rctxinfo_rec_address_opt_t, domain_id)
1533 #define L_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_DOMAIN_ID SIZEOF(lbmr_rctxinfo_rec_address_opt_t, domain_id)
1534 #define O_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_IP OFFSETOF(lbmr_rctxinfo_rec_address_opt_t, ip)
1535 #define L_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_IP SIZEOF(lbmr_rctxinfo_rec_address_opt_t, ip)
1536 #define O_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_PORT OFFSETOF(lbmr_rctxinfo_rec_address_opt_t, port)
1537 #define L_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_PORT SIZEOF(lbmr_rctxinfo_rec_address_opt_t, port)
1538 #define O_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_RES OFFSETOF(lbmr_rctxinfo_rec_address_opt_t, res)
1539 #define L_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_RES SIZEOF(lbmr_rctxinfo_rec_address_opt_t, res)
1540 #define L_LBMR_RCTXINFO_REC_ADDRESS_OPT_T (gint) sizeof(lbmr_rctxinfo_rec_address_opt_t)
1541
1542 #define LBMR_RCTXINFO_OPT_ADDRESS_TYPE 0x01
1543
1544 /* LBMR (extended) remote context information record instance option */
1545 typedef struct
1546 {
1547 lbm_uint8_t type;
1548 lbm_uint8_t len;
1549 lbm_uint16_t flags;
1550 lbm_uint8_t instance[LBM_CONTEXT_INSTANCE_BLOCK_SZ];
1551 } lbmr_rctxinfo_rec_instance_opt_t;
1552 #define O_LBMR_RCTXINFO_REC_INSTANCE_OPT_T_TYPE OFFSETOF(lbmr_rctxinfo_rec_instance_opt_t, type)
1553 #define L_LBMR_RCTXINFO_REC_INSTANCE_OPT_T_TYPE SIZEOF(lbmr_rctxinfo_rec_instance_opt_t, type)
1554 #define O_LBMR_RCTXINFO_REC_INSTANCE_OPT_T_LEN OFFSETOF(lbmr_rctxinfo_rec_instance_opt_t, len)
1555 #define L_LBMR_RCTXINFO_REC_INSTANCE_OPT_T_LEN SIZEOF(lbmr_rctxinfo_rec_instance_opt_t, len)
1556 #define O_LBMR_RCTXINFO_REC_INSTANCE_OPT_T_FLAGS OFFSETOF(lbmr_rctxinfo_rec_instance_opt_t, flags)
1557 #define L_LBMR_RCTXINFO_REC_INSTANCE_OPT_T_FLAGS SIZEOF(lbmr_rctxinfo_rec_instance_opt_t, flags)
1558 #define O_LBMR_RCTXINFO_REC_INSTANCE_OPT_T_INSTANCE OFFSETOF(lbmr_rctxinfo_rec_instance_opt_t, instance)
1559 #define L_LBMR_RCTXINFO_REC_INSTANCE_OPT_T_INSTANCE SIZEOF(lbmr_rctxinfo_rec_instance_opt_t, instance)
1560 #define L_LBMR_RCTXINFO_REC_INSTANCE_OPT_T (gint) sizeof(lbmr_rctxinfo_rec_instance_opt_t)
1561
1562 #define LBMR_RCTXINFO_OPT_INSTANCE_TYPE 0x02
1563
1564 /* LBMR (extended) remote context information record odomain option */
1565 typedef struct
1566 {
1567 lbm_uint8_t type;
1568 lbm_uint8_t len;
1569 lbm_uint16_t flags;
1570 lbm_uint32_t domain_id;
1571 } lbmr_rctxinfo_rec_odomain_opt_t;
1572 #define O_LBMR_RCTXINFO_REC_ODOMAIN_OPT_T_TYPE OFFSETOF(lbmr_rctxinfo_rec_odomain_opt_t, type)
1573 #define L_LBMR_RCTXINFO_REC_ODOMAIN_OPT_T_TYPE SIZEOF(lbmr_rctxinfo_rec_odomain_opt_t, type)
1574 #define O_LBMR_RCTXINFO_REC_ODOMAIN_OPT_T_LEN OFFSETOF(lbmr_rctxinfo_rec_odomain_opt_t, len)
1575 #define L_LBMR_RCTXINFO_REC_ODOMAIN_OPT_T_LEN SIZEOF(lbmr_rctxinfo_rec_odomain_opt_t, len)
1576 #define O_LBMR_RCTXINFO_REC_ODOMAIN_OPT_T_FLAGS OFFSETOF(lbmr_rctxinfo_rec_odomain_opt_t, flags)
1577 #define L_LBMR_RCTXINFO_REC_ODOMAIN_OPT_T_FLAGS SIZEOF(lbmr_rctxinfo_rec_odomain_opt_t, flags)
1578 #define O_LBMR_RCTXINFO_REC_ODOMAIN_OPT_T_DOMAIN_ID OFFSETOF(lbmr_rctxinfo_rec_odomain_opt_t, domain_id)
1579 #define L_LBMR_RCTXINFO_REC_ODOMAIN_OPT_T_DOMAIN_ID SIZEOF(lbmr_rctxinfo_rec_odomain_opt_t, domain_id)
1580 #define L_LBMR_RCTXINFO_REC_ODOMAIN_OPT_T (gint) sizeof(lbmr_rctxinfo_rec_odomain_opt_t)
1581
1582 #define LBMR_RCTXINFO_OPT_ODOMAIN_TYPE 0x03
1583
1584 /* LBMR (extended) remote context information record name option */
1585 typedef struct
1586 {
1587 lbm_uint8_t type;
1588 lbm_uint8_t len;
1589 lbm_uint16_t flags;
1590 } lbmr_rctxinfo_rec_name_opt_t;
1591 #define O_LBMR_RCTXINFO_REC_NAME_OPT_T_TYPE OFFSETOF(lbmr_rctxinfo_rec_name_opt_t, type)
1592 #define L_LBMR_RCTXINFO_REC_NAME_OPT_T_TYPE SIZEOF(lbmr_rctxinfo_rec_name_opt_t, type)
1593 #define O_LBMR_RCTXINFO_REC_NAME_OPT_T_LEN OFFSETOF(lbmr_rctxinfo_rec_name_opt_t, len)
1594 #define L_LBMR_RCTXINFO_REC_NAME_OPT_T_LEN SIZEOF(lbmr_rctxinfo_rec_name_opt_t, len)
1595 #define O_LBMR_RCTXINFO_REC_NAME_OPT_T_FLAGS OFFSETOF(lbmr_rctxinfo_rec_name_opt_t, flags)
1596 #define L_LBMR_RCTXINFO_REC_NAME_OPT_T_FLAGS SIZEOF(lbmr_rctxinfo_rec_name_opt_t, flags)
1597 #define L_LBMR_RCTXINFO_REC_NAME_OPT_T (gint) sizeof(lbmr_rctxinfo_rec_name_opt_t)
1598
1599 #define LBMR_RCTXINFO_OPT_NAME_TYPE 0x04
1600
1601 /* Queue management headers (may appear in LBMR or LBMC packets) */
1602 typedef struct
1603 {
1604 lbm_uint8_t ver_type;
1605 lbm_uint8_t ext_type;
1606 } lbmr_umq_qmgmt_hdr_t;
1607 #define O_LBMR_UMQ_QMGMT_HDR_T_VER_TYPE OFFSETOF(lbmr_umq_qmgmt_hdr_t, ver_type)
1608 #define L_LBMR_UMQ_QMGMT_HDR_T_VER_TYPE SIZEOF(lbmr_umq_qmgmt_hdr_t, ver_type)
1609 #define O_LBMR_UMQ_QMGMT_HDR_T_EXT_TYPE OFFSETOF(lbmr_umq_qmgmt_hdr_t, ext_type)
1610 #define L_LBMR_UMQ_QMGMT_HDR_T_EXT_TYPE SIZEOF(lbmr_umq_qmgmt_hdr_t, ext_type)
1611 #define L_LBMR_UMQ_QMGMT_HDR_T (gint) sizeof(lbmr_umq_qmgmt_hdr_t)
1612
1613 typedef struct
1614 {
1615 lbm_uint8_t filler1;
1616 lbm_uint8_t filler2;
1617 lbm_uint8_t flags;
1618 lbm_uint8_t pckt_type;
1619 lbm_uint8_t cfgsig[20];
1620 lbm_uint32_t queue_id;
1621 lbm_uint32_t queue_ver;
1622 lbm_uint32_t ip;
1623 lbm_uint16_t port;
1624 lbm_uint16_t inst_idx;
1625 lbm_uint16_t grp_idx;
1626 lbm_uint16_t pckt_type_dep16;
1627 } umq_qmgmt_hdr_t;
1628 #define O_UMQ_QMGMT_HDR_T_FLAGS OFFSETOF(umq_qmgmt_hdr_t, flags)
1629 #define L_UMQ_QMGMT_HDR_T_FLAGS SIZEOF(umq_qmgmt_hdr_t, flags)
1630 #define O_UMQ_QMGMT_HDR_T_PCKT_TYPE OFFSETOF(umq_qmgmt_hdr_t, pckt_type)
1631 #define L_UMQ_QMGMT_HDR_T_PCKT_TYPE SIZEOF(umq_qmgmt_hdr_t, pckt_type)
1632 #define O_UMQ_QMGMT_HDR_T_CFGSIG OFFSETOF(umq_qmgmt_hdr_t, cfgsig)
1633 #define L_UMQ_QMGMT_HDR_T_CFGSIG SIZEOF(umq_qmgmt_hdr_t, cfgsig)
1634 #define O_UMQ_QMGMT_HDR_T_QUEUE_ID OFFSETOF(umq_qmgmt_hdr_t, queue_id)
1635 #define L_UMQ_QMGMT_HDR_T_QUEUE_ID SIZEOF(umq_qmgmt_hdr_t, queue_id)
1636 #define O_UMQ_QMGMT_HDR_T_QUEUE_VER OFFSETOF(umq_qmgmt_hdr_t, queue_ver)
1637 #define L_UMQ_QMGMT_HDR_T_QUEUE_VER SIZEOF(umq_qmgmt_hdr_t, queue_ver)
1638 #define O_UMQ_QMGMT_HDR_T_IP OFFSETOF(umq_qmgmt_hdr_t, ip)
1639 #define L_UMQ_QMGMT_HDR_T_IP SIZEOF(umq_qmgmt_hdr_t, ip)
1640 #define O_UMQ_QMGMT_HDR_T_PORT OFFSETOF(umq_qmgmt_hdr_t, port)
1641 #define L_UMQ_QMGMT_HDR_T_PORT SIZEOF(umq_qmgmt_hdr_t, port)
1642 #define O_UMQ_QMGMT_HDR_T_INST_IDX OFFSETOF(umq_qmgmt_hdr_t, inst_idx)
1643 #define L_UMQ_QMGMT_HDR_T_INST_IDX SIZEOF(umq_qmgmt_hdr_t, inst_idx)
1644 #define O_UMQ_QMGMT_HDR_T_GRP_IDX OFFSETOF(umq_qmgmt_hdr_t, grp_idx)
1645 #define L_UMQ_QMGMT_HDR_T_GRP_IDX SIZEOF(umq_qmgmt_hdr_t, grp_idx)
1646 #define O_UMQ_QMGMT_HDR_T_PCKT_TYPE_DEP16 OFFSETOF(umq_qmgmt_hdr_t, pckt_type_dep16)
1647 #define L_UMQ_QMGMT_HDR_T_PCKT_TYPE_DEP16 SIZEOF(umq_qmgmt_hdr_t, pckt_type_dep16)
1648 #define L_UMQ_QMGMT_HDR_T (gint) sizeof(umq_qmgmt_hdr_t)
1649
1650 #define UMQ_QMGMT_HDR_I_FLAG 0x80
1651 #define UMQ_QMGMT_HDR_N_FLAG 0x40
1652 #define UMQ_QMGMT_HDR_IL_L_FLAG 0x20
1653 #define UMQ_QMGMT_HDR_IL_K_FLAG 0x10
1654
1655 typedef struct
1656 {
1657 lbm_uint32_t highest_rcr_tsp;
1658 } umq_qmgmt_il_hdr_t;
1659 #define O_UMQ_QMGMT_IL_HDR_T_HIGHEST_RCR_TSP OFFSETOF(umq_qmgmt_il_hdr_t, highest_rcr_tsp)
1660 #define L_UMQ_QMGMT_IL_HDR_T_HIGHEST_RCR_TSP SIZEOF(umq_qmgmt_il_hdr_t, highest_rcr_tsp)
1661 #define L_UMQ_QMGMT_IL_HDR_T (gint) sizeof(umq_qmgmt_il_hdr_t)
1662
1663 typedef struct
1664 {
1665 lbm_uint32_t ip;
1666 lbm_uint16_t port;
1667 lbm_uint16_t inst_idx;
1668 lbm_uint16_t grp_idx;
1669 lbm_uint16_t flags;
1670 } umq_qmgmt_il_inst_hdr_t;
1671 #define O_UMQ_QMGMT_IL_INST_HDR_T_IP OFFSETOF(umq_qmgmt_il_inst_hdr_t, ip)
1672 #define L_UMQ_QMGMT_IL_INST_HDR_T_IP SIZEOF(umq_qmgmt_il_inst_hdr_t, ip)
1673 #define O_UMQ_QMGMT_IL_INST_HDR_T_PORT OFFSETOF(umq_qmgmt_il_inst_hdr_t, port)
1674 #define L_UMQ_QMGMT_IL_INST_HDR_T_PORT SIZEOF(umq_qmgmt_il_inst_hdr_t, port)
1675 #define O_UMQ_QMGMT_IL_INST_HDR_T_INST_IDX OFFSETOF(umq_qmgmt_il_inst_hdr_t, inst_idx)
1676 #define L_UMQ_QMGMT_IL_INST_HDR_T_INST_IDX SIZEOF(umq_qmgmt_il_inst_hdr_t, inst_idx)
1677 #define O_UMQ_QMGMT_IL_INST_HDR_T_GRP_IDX OFFSETOF(umq_qmgmt_il_inst_hdr_t, grp_idx)
1678 #define L_UMQ_QMGMT_IL_INST_HDR_T_GRP_IDX SIZEOF(umq_qmgmt_il_inst_hdr_t, grp_idx)
1679 #define O_UMQ_QMGMT_IL_INST_HDR_T_FLAGS OFFSETOF(umq_qmgmt_il_inst_hdr_t, flags)
1680 #define L_UMQ_QMGMT_IL_INST_HDR_T_FLAGS SIZEOF(umq_qmgmt_il_inst_hdr_t, flags)
1681 #define L_UMQ_QMGMT_IL_INST_HDR_T (gint) sizeof(umq_qmgmt_il_inst_hdr_t)
1682
1683 #define UMQ_QMGMT_HDR_IL_INST_M_FLAG 0x8000
1684 #define UMQ_QMGMT_HDR_IL_INST_Q_FLAG 0x4000
1685 #define UMQ_QMGMT_HDR_IL_INST_P_FLAG 0x2000
1686
1687 typedef struct
1688 {
1689 lbm_uint32_t queue_new_ver;
1690 } umq_qmgmt_ec_hdr_t;
1691 #define O_UMQ_QMGMT_EC_HDR_T_QUEUE_NEW_VER OFFSETOF(umq_qmgmt_ec_hdr_t, queue_new_ver)
1692 #define L_UMQ_QMGMT_EC_HDR_T_QUEUE_NEW_VER SIZEOF(umq_qmgmt_ec_hdr_t, queue_new_ver)
1693 #define L_UMQ_QMGMT_EC_HDR_T (gint) sizeof(umq_qmgmt_ec_hdr_t)
1694
1695 typedef struct
1696 {
1697 lbm_uint32_t highest_rcr_tsp;
1698 lbm_uint32_t age;
1699 } umq_qmgmt_ev_hdr_t;
1700 #define O_UMQ_QMGMT_EV_HDR_T_HIGHEST_RCR_TSP OFFSETOF(umq_qmgmt_ev_hdr_t, highest_rcr_tsp)
1701 #define L_UMQ_QMGMT_EV_HDR_T_HIGHEST_RCR_TSP SIZEOF(umq_qmgmt_ev_hdr_t, highest_rcr_tsp)
1702 #define O_UMQ_QMGMT_EV_HDR_T_AGE OFFSETOF(umq_qmgmt_ev_hdr_t, age)
1703 #define L_UMQ_QMGMT_EV_HDR_T_AGE SIZEOF(umq_qmgmt_ev_hdr_t, age)
1704 #define L_UMQ_QMGMT_EV_HDR_T (gint) sizeof(umq_qmgmt_ev_hdr_t)
1705
1706 typedef struct
1707 {
1708 lbm_uint32_t highest_rcr_tsp;
1709 } umq_qmgmt_qro_hdr_t;
1710 #define O_UMQ_QMGMT_QRO_HDR_T_HIGHEST_RCR_TSP OFFSETOF(umq_qmgmt_qro_hdr_t, highest_rcr_tsp)
1711 #define L_UMQ_QMGMT_QRO_HDR_T_HIGHEST_RCR_TSP SIZEOF(umq_qmgmt_qro_hdr_t, highest_rcr_tsp)
1712 #define L_UMQ_QMGMT_QRO_HDR_T (gint) sizeof(umq_qmgmt_qro_hdr_t)
1713
1714 #define UMQ_QMGMT_HDR_PCKT_TYPE_IL 0x1
1715 #define UMQ_QMGMT_HDR_PCKT_TYPE_JR 0x2
1716 #define UMQ_QMGMT_HDR_PCKT_TYPE_JREJ 0x3
1717 #define UMQ_QMGMT_HDR_PCKT_TYPE_IKA 0x4
1718 #define UMQ_QMGMT_HDR_PCKT_TYPE_EC 0x5
1719 #define UMQ_QMGMT_HDR_PCKT_TYPE_EV 0x6
1720 #define UMQ_QMGMT_HDR_PCKT_TYPE_CNIL 0x7
1721 #define UMQ_QMGMT_HDR_PCKT_TYPE_QRO 0x8
1722
1723 #define LBMR_VERSION_0 0x00
1724 #define LBMR_VERSION_1 0x01
1725 #define LBMR_VERSION_GATEWAY LBMR_VERSION_1
1726 #define LBMR_VERSION LBMR_VERSION_0
1727
1728 /*----------------------------------------------------------------------------*/
1729 /* Value translation tables. */
1730 /*----------------------------------------------------------------------------*/
1731
1732 static const value_string lbmr_packet_type[] =
1733 {
1734 { LBMR_HDR_TYPE_NORMAL, "NORMAL" },
1735 { LBMR_HDR_TYPE_WC_TQRS, "WC-TQR" },
1736 { LBMR_HDR_TYPE_UCAST_RCV_ALIVE, "Rcv Alive" },
1737 { LBMR_HDR_TYPE_UCAST_SRC_ALIVE, "Src Alive" },
1738 { LBMR_HDR_TYPE_TOPIC_MGMT, "Topic Mgmt" },
1739 { LBMR_HDR_TYPE_QUEUE_RES, "UMQ" },
1740 { LBMR_HDR_TYPE_EXT, "Extended" },
1741 { 0x0, NULL }
1742 };
1743
1744 static const value_string lbmr_ext_packet_type[] =
1745 {
1746 { LBMR_HDR_EXT_TYPE_UME_PROXY_SRC_ELECT, "Proxy Source Election" },
1747 { LBMR_HDR_EXT_TYPE_UMQ_QUEUE_MGMT, "Queue Management" },
1748 { LBMR_HDR_EXT_TYPE_CONTEXT_INFO, "Context Information" },
1749 { LBMR_HDR_EXT_TYPE_TOPIC_RES_REQUEST, "Topic Resolution Request" },
1750 { LBMR_HDR_EXT_TYPE_TNWG_MSG, "Gateway Message" },
1751 { LBMR_HDR_EXT_TYPE_REMOTE_DOMAIN_ROUTE, "Remote Domain Route" },
1752 { LBMR_HDR_EXT_TYPE_REMOTE_CONTEXT_INFO, "Remote Context Information" },
1753 { 0x0, NULL }
1754 };
1755
1756 static const value_string lbmr_transport_type[] =
1757 {
1758 { LBMR_TRANSPORT_TCP, "TCP" },
1759 { LBMR_TRANSPORT_LBTSMX, "LBT-SMX" },
1760 { LBMR_TRANSPORT_LBTRU, "LBT-RU" },
1761 { LBMR_TRANSPORT_LBTRM, "LBT-RM" },
1762 { LBMR_TRANSPORT_LBTIPC, "LBT-IPC" },
1763 { LBMR_TRANSPORT_LBTRDMA, "LBT-RDMA" },
1764 { 0x0, NULL }
1765 };
1766
1767 static const value_string lbmr_tmr_type[] =
1768 {
1769 { LBMR_TMR_LEAVE_TOPIC, "Leave Topic" },
1770 { LBMR_TMR_TOPIC_USE, "Topic Use" },
1771 { 0x0, NULL }
1772 };
1773
1774 static const value_string lbmr_topic_option_type[] =
1775 {
1776 { LBMR_TOPIC_OPT_LEN_TYPE, "Option Length" },
1777 { LBMR_TOPIC_OPT_UME_TYPE, "UME" },
1778 { LBMR_TOPIC_OPT_UME_STORE_TYPE, "UME Store" },
1779 { LBMR_TOPIC_OPT_UME_STORE_GROUP_TYPE, "UME Store Group" },
1780 { LBMR_TOPIC_OPT_LATEJOIN_TYPE, "Late Join" },
1781 { LBMR_TOPIC_OPT_UMQ_RCRIDX_TYPE, "UMQ Receiver Control Record Index" },
1782 { LBMR_TOPIC_OPT_UMQ_QINFO_TYPE, "UMQ Queue Info" },
1783 { LBMR_TOPIC_OPT_COST_TYPE, "Cost" },
1784 { LBMR_TOPIC_OPT_OTID_TYPE, "Originating Transport" },
1785 { LBMR_TOPIC_OPT_CTXINST_TYPE, "Context Instance" },
1786 { LBMR_TOPIC_OPT_CTXINSTS_TYPE, "Store Context Instance" },
1787 { LBMR_TOPIC_OPT_ULB_TYPE, "UMQ ULB" },
1788 { LBMR_TOPIC_OPT_CTXINSTQ_TYPE, "Queue Context Instance" },
1789 { LBMR_TOPIC_OPT_DOMAIN_ID_TYPE, "Domain ID" },
1790 { LBMR_TOPIC_OPT_EXFUNC_TYPE, "Extended Functionality" },
1791 { 0x0, NULL }
1792 };
1793
1794 static const value_string lbmr_pser_dependent_type[] =
1795 {
1796 { LBMR_HDR_EXT_TYPE_UME_PROXY_SRC_ELECT_DEP_ELECT, "Election" },
1797 { LBMR_HDR_EXT_TYPE_UME_PROXY_SRC_ELECT_DEP_REELECT, "Re-election" },
1798 { 0x0, NULL }
1799 };
1800
1801 static const value_string lbmr_option_type[] =
1802 {
1803 { LBMR_LBMR_OPT_LEN_TYPE, "Option length" },
1804 { LBMR_LBMR_OPT_SRC_ID_TYPE, "Source ID" },
1805 { LBMR_LBMR_OPT_SRC_TYPE_TYPE, "Source type" },
1806 { LBMR_LBMR_OPT_VERSION_TYPE, "Version" },
1807 { LBMR_LBMR_OPT_LOCAL_DOMAIN_TYPE, "Local Domain" },
1808 { 0x0, NULL }
1809 };
1810
1811 static const value_string lbmr_pser_option_type[] =
1812 {
1813 { LBMR_PSER_OPT_SRC_CTXINST_TYPE, "Source context instance" },
1814 { LBMR_PSER_OPT_STORE_CTXINST_TYPE, "Store context instance" },
1815 { 0x0, NULL }
1816 };
1817
1818 static const value_string lbmr_option_source_type[] =
1819 {
1820 { LBMR_LBMR_OPT_SRC_TYPE_SRC_TYPE_APPLICATION, "Application" },
1821 { LBMR_LBMR_OPT_SRC_TYPE_SRC_TYPE_TNWGD, "Gateway" },
1822 { LBMR_LBMR_OPT_SRC_TYPE_SRC_TYPE_STORE, "Store" },
1823 { 0x0, NULL }
1824 };
1825
1826 static const value_string lbmr_tnwg_function_type[] =
1827 {
1828 { LBMR_TNWG_TYPE_INTEREST, "Interest" },
1829 { LBMR_TNWG_TYPE_CTXINFO, "Context information" },
1830 { LBMR_TNWG_TYPE_TRREQ, "Topic res request" },
1831 { 0x0, NULL }
1832 };
1833
1834 static const value_string lbmr_tnwg_option_type[] =
1835 {
1836 { LBMR_TNWG_OPT_CTXINST_TYPE, "Context instance" },
1837 { LBMR_TNWG_OPT_ADDRESS_TYPE, "Address" },
1838 { LBMR_TNWG_OPT_DOMAIN_TYPE, "Domain" },
1839 { LBMR_TNWG_OPT_NAME_TYPE, "Name" },
1840 { 0x0, NULL }
1841 };
1842
1843 static const value_string umq_qmgmt_packet_type[] =
1844 {
1845 { UMQ_QMGMT_HDR_PCKT_TYPE_IL, "Instance List" },
1846 { UMQ_QMGMT_HDR_PCKT_TYPE_JR, "Join Request" },
1847 { UMQ_QMGMT_HDR_PCKT_TYPE_JREJ, "Join Request Rejection" },
1848 { UMQ_QMGMT_HDR_PCKT_TYPE_IKA, "Instance Keepalive" },
1849 { UMQ_QMGMT_HDR_PCKT_TYPE_EC, "Election Call" },
1850 { UMQ_QMGMT_HDR_PCKT_TYPE_EV, "Election Vote" },
1851 { UMQ_QMGMT_HDR_PCKT_TYPE_CNIL, "Confirm New Instance List" },
1852 { UMQ_QMGMT_HDR_PCKT_TYPE_QRO, "Queue resume operation" },
1853 { 0x0, NULL }
1854 };
1855
1856 static const value_string lbmr_rctxinfo_option_type[] =
1857 {
1858 { LBMR_RCTXINFO_OPT_ADDRESS_TYPE, "Address" },
1859 { LBMR_RCTXINFO_OPT_INSTANCE_TYPE, "Instance" },
1860 { LBMR_RCTXINFO_OPT_ODOMAIN_TYPE, "Originating Domain" },
1861 { LBMR_RCTXINFO_OPT_NAME_TYPE, "Name" },
1862 { 0x0, NULL }
1863 };
1864
1865 /*----------------------------------------------------------------------------*/
1866 /* Preferences. */
1867 /*----------------------------------------------------------------------------*/
1868
1869 /* Preferences default values. */
1870 #define LBMR_DEFAULT_MC_INCOMING_UDP_PORT 12965
1871 #define LBMR_DEFAULT_MC_INCOMING_UDP_PORT_STRING MAKESTRING(LBMR_DEFAULT_MC_INCOMING_UDP_PORT)
1872 #define LBMR_DEFAULT_MC_OUTGOING_UDP_PORT 12965
1873 #define LBMR_DEFAULT_MC_OUTGOING_UDP_PORT_STRING MAKESTRING(LBMR_DEFAULT_MC_OUTGOING_UDP_PORT)
1874 #define LBMR_DEFAULT_MC_INCOMING_ADDRESS "224.9.10.11"
1875 #define LBMR_DEFAULT_MC_OUTGOING_ADDRESS "224.9.10.11"
1876 #define LBMR_DEFAULT_UC_PORT_HIGH 14406
1877 #define LBMR_DEFAULT_UC_PORT_HIGH_STRING MAKESTRING(LBMR_DEFAULT_UC_PORT_HIGH)
1878 #define LBMR_DEFAULT_UC_PORT_LOW 14402
1879 #define LBMR_DEFAULT_UC_PORT_LOW_STRING MAKESTRING(LBMR_DEFAULT_UC_PORT_LOW)
1880 #define LBMR_DEFAULT_UC_DEST_PORT 15380
1881 #define LBMR_DEFAULT_UC_DEST_PORT_STRING MAKESTRING(LBMR_DEFAULT_UC_DEST_PORT)
1882 #define LBMR_DEFAULT_UC_ADDRESS "0.0.0.0"
1883
1884 /* Global preferences variables (altered by the preferences dialog). */
1885 static guint32 global_lbmr_mc_incoming_udp_port = LBMR_DEFAULT_MC_INCOMING_UDP_PORT;
1886 static guint32 global_lbmr_mc_outgoing_udp_port = LBMR_DEFAULT_MC_OUTGOING_UDP_PORT;
1887 static const char * global_lbmr_mc_incoming_address = LBMR_DEFAULT_MC_INCOMING_ADDRESS;
1888 static const char * global_lbmr_mc_outgoing_address = LBMR_DEFAULT_MC_OUTGOING_ADDRESS;
1889 static guint32 global_lbmr_uc_port_high = LBMR_DEFAULT_UC_PORT_HIGH;
1890 static guint32 global_lbmr_uc_port_low = LBMR_DEFAULT_UC_PORT_LOW;
1891 static guint32 global_lbmr_uc_dest_port = LBMR_DEFAULT_UC_DEST_PORT;
1892 static const char * global_lbmr_uc_address = LBMR_DEFAULT_UC_ADDRESS;
1893 static gboolean global_lbmr_use_tag = FALSE;
1894
1895 /* Local preferences variables (used by the dissector). */
1896 static guint32 lbmr_mc_incoming_udp_port = LBMR_DEFAULT_MC_INCOMING_UDP_PORT;
1897 static guint32 lbmr_mc_outgoing_udp_port = LBMR_DEFAULT_MC_OUTGOING_UDP_PORT;
1898 static guint32 lbmr_mc_incoming_address_host = 0;
1899 static guint32 lbmr_mc_outgoing_address_host = 0;
1900 static guint32 lbmr_uc_port_high = LBMR_DEFAULT_UC_PORT_HIGH;
1901 static guint32 lbmr_uc_port_low = LBMR_DEFAULT_UC_PORT_LOW;
1902 static guint32 lbmr_uc_dest_port = LBMR_DEFAULT_UC_DEST_PORT;
1903 static guint32 lbmr_uc_address_host = 0;
1904 static gboolean lbmr_use_tag = FALSE;
1905
1906 typedef struct
1907 {
1908 char * name;
1909 guint32 mc_outgoing_udp_port;
1910 guint32 mc_incoming_udp_port;
1911 char * mc_incoming_address;
1912 guint32 mc_incoming_address_val_h;
1913 char * mc_outgoing_address;
1914 guint32 mc_outgoing_address_val_h;
1915 guint32 uc_port_high;
1916 guint32 uc_port_low;
1917 guint32 uc_dest_port;
1918 char * uc_address;
1919 guint32 uc_address_val_h;
1920 } lbmr_tag_entry_t;
1921
1922 static lbmr_tag_entry_t * lbmr_tag_entry = NULL;
1923 static guint lbmr_tag_count = 0;
1924
1925 UAT_CSTRING_CB_DEF(lbmr_tag, name, lbmr_tag_entry_t)
1926 UAT_DEC_CB_DEF(lbmr_tag, mc_outgoing_udp_port, lbmr_tag_entry_t)
1927 UAT_DEC_CB_DEF(lbmr_tag, mc_incoming_udp_port, lbmr_tag_entry_t)
1928 UAT_IPV4_MC_CB_DEF(lbmr_tag, mc_incoming_address, lbmr_tag_entry_t)
1929 UAT_IPV4_MC_CB_DEF(lbmr_tag, mc_outgoing_address, lbmr_tag_entry_t)
1930 UAT_DEC_CB_DEF(lbmr_tag, uc_port_high, lbmr_tag_entry_t)
1931 UAT_DEC_CB_DEF(lbmr_tag, uc_port_low, lbmr_tag_entry_t)
1932 UAT_DEC_CB_DEF(lbmr_tag, uc_dest_port, lbmr_tag_entry_t)
1933 UAT_IPV4_CB_DEF(lbmr_tag, uc_address, lbmr_tag_entry_t)
1934 static uat_field_t lbmr_tag_array[] =
1935 {
1936 UAT_FLD_CSTRING(lbmr_tag, name, "Tag name", "Tag name"),
1937 UAT_FLD_DEC(lbmr_tag, mc_incoming_udp_port, "Incoming multicast UDP port", "Incoming UDP port"),
1938 UAT_FLD_IPV4_MC(lbmr_tag, mc_incoming_address, "Incoming multicast address", "Incoming multicast address"),
1939 UAT_FLD_DEC(lbmr_tag, mc_outgoing_udp_port, "Outgoing UDP port", "Outgoing UDP port"),
1940 UAT_FLD_IPV4_MC(lbmr_tag, mc_outgoing_address, "Outgoing multicast address", "Outgoing multicast address"),
1941 UAT_FLD_DEC(lbmr_tag, uc_port_low, "Unicast UDP port low", "Unicast UDP port low"),
1942 UAT_FLD_DEC(lbmr_tag, uc_port_high, "Unicast UDP port high", "Unicast UDP port high"),
1943 UAT_FLD_DEC(lbmr_tag, uc_dest_port, "Unicast UDP destination port", "Unicast UDP destination port"),
1944 UAT_FLD_IPV4(lbmr_tag, uc_address, "Unicast resolver address", "Unicast resolver address"),
1945 UAT_END_FIELDS
1946 };
1947
1948 /*----------------------------------------------------------------------------*/
1949 /* UAT callback functions. */
1950 /*----------------------------------------------------------------------------*/
lbmr_tag_update_cb(void * record,char ** error_string)1951 static gboolean lbmr_tag_update_cb(void * record, char * * error_string)
1952 {
1953 lbmr_tag_entry_t * tag = (lbmr_tag_entry_t *)record;
1954
1955 if (tag->name == NULL)
1956 {
1957 *error_string = g_strdup("Tag name can't be empty");
1958 return FALSE;
1959 }
1960 else
1961 {
1962 g_strstrip(tag->name);
1963 if (tag->name[0] == 0)
1964 {
1965 *error_string = g_strdup("Tag name can't be empty");
1966 return FALSE;
1967 }
1968 }
1969 return TRUE;
1970 }
1971
lbmr_tag_copy_cb(void * destination,const void * source,size_t length _U_)1972 static void * lbmr_tag_copy_cb(void * destination, const void * source, size_t length _U_)
1973 {
1974 const lbmr_tag_entry_t * src = (const lbmr_tag_entry_t *)source;
1975 lbmr_tag_entry_t * dest = (lbmr_tag_entry_t *)destination;
1976
1977 dest->name = g_strdup(src->name);
1978 dest->mc_outgoing_udp_port = src->mc_outgoing_udp_port;
1979 dest->mc_incoming_udp_port = src->mc_incoming_udp_port;
1980 dest->mc_incoming_address = g_strdup(src->mc_incoming_address);
1981 dest->mc_incoming_address_val_h = src->mc_incoming_address_val_h;
1982 dest->mc_outgoing_address = g_strdup(src->mc_outgoing_address);
1983 dest->mc_outgoing_address_val_h = src->mc_outgoing_address_val_h;
1984 dest->uc_port_high = src->uc_port_high;
1985 dest->uc_port_low = src->uc_port_low;
1986 dest->uc_dest_port = src->uc_dest_port;
1987 dest->uc_address = g_strdup(src->uc_address);
1988 dest->uc_address_val_h = src->uc_address_val_h;
1989 return (dest);
1990 }
1991
lbmr_tag_free_cb(void * record)1992 static void lbmr_tag_free_cb(void * record)
1993 {
1994 lbmr_tag_entry_t * tag = (lbmr_tag_entry_t *)record;
1995
1996 if (tag->name != NULL)
1997 {
1998 g_free(tag->name);
1999 tag->name = NULL;
2000 }
2001 if (tag->mc_incoming_address != NULL)
2002 {
2003 g_free(tag->mc_incoming_address);
2004 tag->mc_incoming_address = NULL;
2005 }
2006 if (tag->mc_outgoing_address != NULL)
2007 {
2008 g_free(tag->mc_outgoing_address);
2009 tag->mc_outgoing_address = NULL;
2010 }
2011 if (tag->uc_address != NULL)
2012 {
2013 g_free(tag->uc_address);
2014 tag->uc_address = NULL;
2015 }
2016 }
2017
lbmr_match_packet(packet_info * pinfo,const lbmr_tag_entry_t * entry)2018 static tap_packet_status lbmr_match_packet(packet_info * pinfo, const lbmr_tag_entry_t * entry)
2019 {
2020 guint32 dest_addr_h;
2021 guint32 src_addr_h;
2022
2023 if ((pinfo->dst.type != AT_IPv4) || (pinfo->dst.len != 4) ||
2024 (pinfo->src.type != AT_IPv4) || (pinfo->src.len != 4))
2025 return (TAP_PACKET_DONT_REDRAW);
2026 dest_addr_h = pntoh32(pinfo->dst.data);
2027 src_addr_h = pntoh32(pinfo->src.data);
2028
2029 if (IN_MULTICAST(dest_addr_h))
2030 {
2031 /* Check multicast topic resolution values. */
2032 if ((dest_addr_h != entry->mc_incoming_address_val_h) && (dest_addr_h != entry->mc_outgoing_address_val_h))
2033 {
2034 /* No match. */
2035 return (TAP_PACKET_DONT_REDRAW);
2036 }
2037 /* Check for the correct port. */
2038 if ((dest_addr_h == entry->mc_incoming_address_val_h) && (pinfo->destport != entry->mc_incoming_udp_port))
2039 {
2040 /* Wrong incoming port. */
2041 return (TAP_PACKET_DONT_REDRAW);
2042 }
2043 if ((dest_addr_h == entry->mc_outgoing_address_val_h) && (pinfo->destport != entry->mc_outgoing_udp_port))
2044 {
2045 /* Wrong outgoing port. */
2046 return (TAP_PACKET_DONT_REDRAW);
2047 }
2048 /* Must be one of ours. */
2049 return (TAP_PACKET_REDRAW);
2050 }
2051 else
2052 {
2053 /* Check unicast topic resolution values. */
2054 /* Address should be either not specified, or match the src or dest address of the packet. */
2055 if ((entry->uc_address_val_h == 0) || (entry->uc_address_val_h == dest_addr_h) || (entry->uc_address_val_h == src_addr_h))
2056 {
2057 if (((pinfo->destport == entry->uc_dest_port) || (pinfo->srcport == entry->uc_dest_port))
2058 && (((pinfo->destport <= entry->uc_port_high) && (pinfo->destport >= entry->uc_port_low))
2059 || ((pinfo->srcport <= entry->uc_port_high) && (pinfo->srcport >= entry->uc_port_low))))
2060 {
2061 /* One of ours, so handle it. */
2062 return (TAP_PACKET_REDRAW);
2063 }
2064 }
2065 }
2066 return (TAP_PACKET_DONT_REDRAW);
2067 }
2068
lbmr_tag_find(packet_info * pinfo)2069 static char * lbmr_tag_find(packet_info * pinfo)
2070 {
2071 guint idx;
2072 lbmr_tag_entry_t * tag = NULL;
2073
2074 if (!lbmr_use_tag)
2075 {
2076 return (NULL);
2077 }
2078 for (idx = 0; idx < lbmr_tag_count; ++idx)
2079 {
2080 tag = &(lbmr_tag_entry[idx]);
2081 if (lbmr_match_packet(pinfo, tag))
2082 {
2083 return tag->name;
2084 }
2085 }
2086 return (NULL);
2087 }
2088
2089 /*----------------------------------------------------------------------------*/
2090 /* Handles of all types. */
2091 /*----------------------------------------------------------------------------*/
2092 /* Protocol handle */
2093 static int proto_lbmr = -1;
2094
2095 /* Dissector handle */
2096 static dissector_handle_t lbmr_dissector_handle;
2097
2098 /* Dissector tree handles */
2099 static gint ett_lbmr = -1;
2100 static gint ett_lbmr_hdr = -1;
2101 static gint ett_lbmr_tqrs = -1;
2102 static gint ett_lbmr_tqr = -1;
2103 static gint ett_lbmr_tirs = -1;
2104 static gint ett_lbmr_tir = -1;
2105 static gint ett_lbmr_tir_tcp = -1;
2106 static gint ett_lbmr_tir_lbtrm = -1;
2107 static gint ett_lbmr_tir_lbtru = -1;
2108 static gint ett_lbmr_tir_lbtipc = -1;
2109 static gint ett_lbmr_tir_lbtrdma = -1;
2110 static gint ett_lbmr_tir_lbtsmx = -1;
2111 static gint ett_lbmr_topts = -1;
2112 static gint ett_lbmr_topt_len = -1;
2113 static gint ett_lbmr_topt_ume = -1;
2114 static gint ett_lbmr_topt_ume_flags = -1;
2115 static gint ett_lbmr_topt_ume_store = -1;
2116 static gint ett_lbmr_topt_ume_store_flags = -1;
2117 static gint ett_lbmr_topt_ume_store_group = -1;
2118 static gint ett_lbmr_topt_ume_store_group_flags = -1;
2119 static gint ett_lbmr_topt_latejoin = -1;
2120 static gint ett_lbmr_topt_latejoin_flags = -1;
2121 static gint ett_lbmr_topt_umq_rcridx = -1;
2122 static gint ett_lbmr_topt_umq_rcridx_flags = -1;
2123 static gint ett_lbmr_topt_umq_qinfo = -1;
2124 static gint ett_lbmr_topt_umq_qinfo_flags = -1;
2125 static gint ett_lbmr_topt_cost = -1;
2126 static gint ett_lbmr_topt_cost_flags = -1;
2127 static gint ett_lbmr_topt_otid = -1;
2128 static gint ett_lbmr_topt_otid_flags = -1;
2129 static gint ett_lbmr_topt_ctxinst = -1;
2130 static gint ett_lbmr_topt_ctxinst_flags = -1;
2131 static gint ett_lbmr_topt_ctxinsts = -1;
2132 static gint ett_lbmr_topt_ctxinsts_flags = -1;
2133 static gint ett_lbmr_topt_ulb = -1;
2134 static gint ett_lbmr_topt_ulb_flags = -1;
2135 static gint ett_lbmr_topt_ctxinstq = -1;
2136 static gint ett_lbmr_topt_ctxinstq_flags = -1;
2137 static gint ett_lbmr_topt_domain_id = -1;
2138 static gint ett_lbmr_topt_domain_id_flags = -1;
2139 static gint ett_lbmr_topt_exfunc = -1;
2140 static gint ett_lbmr_topt_exfunc_flags = -1;
2141 static gint ett_lbmr_topt_exfunc_functionality_flags = -1;
2142 static gint ett_lbmr_topt_unknown = -1;
2143 static gint ett_lbmr_tmb = -1;
2144 static gint ett_lbmr_tmrs = -1;
2145 static gint ett_lbmr_tmr = -1;
2146 static gint ett_lbmr_tmr_flags = -1;
2147 static gint ett_lbmr_pser_flags = -1;
2148 static gint ett_lbmr_pser_opts = -1;
2149 static gint ett_lbmr_pser_opt_len = -1;
2150 static gint ett_lbmr_pser_opt_ctxinst = -1;
2151 static gint ett_lbmr_qqrs = -1;
2152 static gint ett_lbmr_qirs = -1;
2153 static gint ett_lbmr_qir = -1;
2154 static gint ett_lbmr_qir_options = -1;
2155 static gint ett_lbmr_qir_grp_blk = -1;
2156 static gint ett_lbmr_qir_queue_blk = -1;
2157 static gint ett_lbmr_qir_grp = -1;
2158 static gint ett_lbmr_qir_queue = -1;
2159 static gint ett_lbmr_topic_res_request_flags = -1;
2160 static gint ett_lbmr_ctxinfo_flags = -1;
2161 static gint ett_lbmr_tnwg = -1;
2162 static gint ett_lbmr_tnwg_interest = -1;
2163 static gint ett_lbmr_tnwg_interest_rec = -1;
2164 static gint ett_lbmr_tnwg_interest_rec_flags = -1;
2165 static gint ett_lbmr_tnwg_ctxinfo = -1;
2166 static gint ett_lbmr_tnwg_ctxinfo_flags1 = -1;
2167 static gint ett_lbmr_tnwg_trreq = -1;
2168 static gint ett_lbmr_tnwg_ctxinst_opt = -1;
2169 static gint ett_lbmr_tnwg_ctxinst_opt_flags = -1;
2170 static gint ett_lbmr_tnwg_address_opt = -1;
2171 static gint ett_lbmr_tnwg_address_opt_flags = -1;
2172 static gint ett_lbmr_tnwg_domain_opt = -1;
2173 static gint ett_lbmr_tnwg_domain_opt_flags = -1;
2174 static gint ett_lbmr_tnwg_name_opt = -1;
2175 static gint ett_lbmr_tnwg_name_opt_flags = -1;
2176 static gint ett_lbmr_tnwg_unknown_opt = -1;
2177 static gint ett_lbmr_tnwg_unknown_opt_flags = -1;
2178 static gint ett_lbmr_remote_domain_route_hdr = -1;
2179 static gint ett_lbmr_rctxinfo = -1;
2180 static gint ett_lbmr_rctxinfo_rec = -1;
2181 static gint ett_lbmr_rctxinfo_rec_flags = -1;
2182 static gint ett_lbmr_rctxinfo_rec_address = -1;
2183 static gint ett_lbmr_rctxinfo_rec_instance = -1;
2184 static gint ett_lbmr_rctxinfo_rec_odomain = -1;
2185 static gint ett_lbmr_rctxinfo_rec_name = -1;
2186 static gint ett_lbmr_rctxinfo_rec_unknown = -1;
2187 static gint ett_qmgmt_flags = -1;
2188 static gint ett_qmgmt_il = -1;
2189 static gint ett_qmgmt_il_inst = -1;
2190 static gint ett_qmgmt_il_inst_flags = -1;
2191 static gint ett_qmgmt_ec = -1;
2192 static gint ett_qmgmt_ev = -1;
2193 static gint ett_qmgmt_qro = -1;
2194 static gint ett_lbmr_opts = -1;
2195 static gint ett_lbmr_opt_src_id = -1;
2196 static gint ett_lbmr_opt_src_id_flags = -1;
2197 static gint ett_lbmr_opt_len = -1;
2198 static gint ett_lbmr_opt_src_type = -1;
2199 static gint ett_lbmr_opt_src_type_flags = -1;
2200 static gint ett_lbmr_opt_version = -1;
2201 static gint ett_lbmr_opt_version_flags = -1;
2202 static gint ett_lbmr_opt_local_domain = -1;
2203 static gint ett_lbmr_opt_local_domain_flags = -1;
2204 static gint ett_lbmr_opt_unknown = -1;
2205
2206 /* Dissector field handles */
2207 static int hf_lbmr_tag = -1;
2208 static int hf_lbmr_hdr = -1;
2209 static int hf_lbmr_hdr_ver = -1;
2210 static int hf_lbmr_hdr_opt = -1;
2211 static int hf_lbmr_hdr_type = -1;
2212 static int hf_lbmr_hdr_tqrs = -1;
2213 static int hf_lbmr_hdr_tirs = -1;
2214 static int hf_lbmr_hdr_qqrs = -1;
2215 static int hf_lbmr_hdr_qirs = -1;
2216 static int hf_lbmr_hdr_ext_type = -1;
2217 static int hf_lbmr_tqrs = -1;
2218 static int hf_lbmr_tqr = -1;
2219 static int hf_lbmr_tqr_pattern_type = -1;
2220 static int hf_lbmr_tqr_pattern = -1;
2221 static int hf_lbmr_tqr_name = -1;
2222 static int hf_lbmr_tirs = -1;
2223 static int hf_lbmr_tir = -1;
2224 static int hf_lbmr_tir_transport_opts = -1;
2225 static int hf_lbmr_tir_transport_type = -1;
2226 static int hf_lbmr_tir_tlen = -1;
2227 static int hf_lbmr_tir_ttl = -1;
2228 static int hf_lbmr_tir_index = -1;
2229 static int hf_lbmr_tir_name = -1;
2230 static int hf_lbmr_tir_tcp = -1;
2231 static int hf_lbmr_tir_tcp_ip = -1;
2232 static int hf_lbmr_tir_tcp_session_id = -1;
2233 static int hf_lbmr_tir_tcp_port = -1;
2234 static int hf_lbmr_tir_lbtrm = -1;
2235 static int hf_lbmr_tir_lbtrm_src_addr = -1;
2236 static int hf_lbmr_tir_lbtrm_mcast_addr = -1;
2237 static int hf_lbmr_tir_lbtrm_session_id = -1;
2238 static int hf_lbmr_tir_lbtrm_udp_dest_port = -1;
2239 static int hf_lbmr_tir_lbtrm_src_ucast_port = -1;
2240 static int hf_lbmr_tir_lbtru = -1;
2241 static int hf_lbmr_tir_lbtru_ip = -1;
2242 static int hf_lbmr_tir_lbtru_port = -1;
2243 static int hf_lbmr_tir_lbtru_session_id = -1;
2244 static int hf_lbmr_tir_lbtipc = -1;
2245 static int hf_lbmr_tir_lbtipc_host_id = -1;
2246 static int hf_lbmr_tir_lbtipc_session_id = -1;
2247 static int hf_lbmr_tir_lbtipc_xport_id = -1;
2248 static int hf_lbmr_tir_lbtrdma = -1;
2249 static int hf_lbmr_tir_lbtrdma_ip = -1;
2250 static int hf_lbmr_tir_lbtrdma_session_id = -1;
2251 static int hf_lbmr_tir_lbtrdma_port = -1;
2252 static int hf_lbmr_tir_lbtsmx = -1;
2253 static int hf_lbmr_tir_lbtsmx_host_id = -1;
2254 static int hf_lbmr_tir_lbtsmx_session_id = -1;
2255 static int hf_lbmr_tir_lbtsmx_xport_id = -1;
2256 static int hf_lbmr_tir_channel = -1;
2257 static int hf_lbmr_tir_unknown_transport = -1;
2258 static int hf_lbmr_topts = -1;
2259 static int hf_lbmr_topt_len = -1;
2260 static int hf_lbmr_topt_len_type = -1;
2261 static int hf_lbmr_topt_len_len = -1;
2262 static int hf_lbmr_topt_len_total_len = -1;
2263 static int hf_lbmr_topt_ume = -1;
2264 static int hf_lbmr_topt_ume_type = -1;
2265 static int hf_lbmr_topt_ume_len = -1;
2266 static int hf_lbmr_topt_ume_flags = -1;
2267 static int hf_lbmr_topt_ume_flags_ignore = -1;
2268 static int hf_lbmr_topt_ume_flags_latejoin = -1;
2269 static int hf_lbmr_topt_ume_flags_store = -1;
2270 static int hf_lbmr_topt_ume_flags_qccap = -1;
2271 static int hf_lbmr_topt_ume_flags_acktosrc = -1;
2272 static int hf_lbmr_topt_ume_store_tcp_port = -1;
2273 static int hf_lbmr_topt_ume_src_tcp_port = -1;
2274 static int hf_lbmr_topt_ume_store_tcp_addr = -1;
2275 static int hf_lbmr_topt_ume_src_tcp_addr = -1;
2276 static int hf_lbmr_topt_ume_src_reg_id = -1;
2277 static int hf_lbmr_topt_ume_transport_idx = -1;
2278 static int hf_lbmr_topt_ume_high_seqnum = -1;
2279 static int hf_lbmr_topt_ume_low_seqnum = -1;
2280 static int hf_lbmr_topt_ume_store = -1;
2281 static int hf_lbmr_topt_ume_store_type = -1;
2282 static int hf_lbmr_topt_ume_store_len = -1;
2283 static int hf_lbmr_topt_ume_store_flags = -1;
2284 static int hf_lbmr_topt_ume_store_flags_ignore = -1;
2285 static int hf_lbmr_topt_ume_store_grp_idx = -1;
2286 static int hf_lbmr_topt_ume_store_store_tcp_port = -1;
2287 static int hf_lbmr_topt_ume_store_store_idx = -1;
2288 static int hf_lbmr_topt_ume_store_store_ip_addr = -1;
2289 static int hf_lbmr_topt_ume_store_src_reg_id = -1;
2290 static int hf_lbmr_topt_ume_store_group = -1;
2291 static int hf_lbmr_topt_ume_store_group_type = -1;
2292 static int hf_lbmr_topt_ume_store_group_len = -1;
2293 static int hf_lbmr_topt_ume_store_group_flags = -1;
2294 static int hf_lbmr_topt_ume_store_group_flags_ignore = -1;
2295 static int hf_lbmr_topt_ume_store_group_grp_idx = -1;
2296 static int hf_lbmr_topt_ume_store_group_grp_sz = -1;
2297 static int hf_lbmr_topt_ume_store_group_reserved = -1;
2298 static int hf_lbmr_topt_latejoin = -1;
2299 static int hf_lbmr_topt_latejoin_type = -1;
2300 static int hf_lbmr_topt_latejoin_len = -1;
2301 static int hf_lbmr_topt_latejoin_flags = -1;
2302 static int hf_lbmr_topt_latejoin_flags_ignore = -1;
2303 static int hf_lbmr_topt_latejoin_flags_acktosrc = -1;
2304 static int hf_lbmr_topt_latejoin_src_tcp_port = -1;
2305 static int hf_lbmr_topt_latejoin_reserved = -1;
2306 static int hf_lbmr_topt_latejoin_src_ip_addr = -1;
2307 static int hf_lbmr_topt_latejoin_transport_idx = -1;
2308 static int hf_lbmr_topt_latejoin_high_seqnum = -1;
2309 static int hf_lbmr_topt_latejoin_low_seqnum = -1;
2310 static int hf_lbmr_topt_umq_rcridx = -1;
2311 static int hf_lbmr_topt_umq_rcridx_type = -1;
2312 static int hf_lbmr_topt_umq_rcridx_len = -1;
2313 static int hf_lbmr_topt_umq_rcridx_flags = -1;
2314 static int hf_lbmr_topt_umq_rcridx_flags_ignore = -1;
2315 static int hf_lbmr_topt_umq_rcridx_rcr_idx = -1;
2316 static int hf_lbmr_topt_umq_qinfo = -1;
2317 static int hf_lbmr_topt_umq_qinfo_type = -1;
2318 static int hf_lbmr_topt_umq_qinfo_len = -1;
2319 static int hf_lbmr_topt_umq_qinfo_flags = -1;
2320 static int hf_lbmr_topt_umq_qinfo_flags_ignore = -1;
2321 static int hf_lbmr_topt_umq_qinfo_flags_queue = -1;
2322 static int hf_lbmr_topt_umq_qinfo_flags_rcvlisten = -1;
2323 static int hf_lbmr_topt_umq_qinfo_flags_control = -1;
2324 static int hf_lbmr_topt_umq_qinfo_flags_srcrcvlisten = -1;
2325 static int hf_lbmr_topt_umq_qinfo_flags_participants_only = -1;
2326 static int hf_lbmr_topt_umq_qinfo_queue = -1;
2327 static int hf_lbmr_topt_cost = -1;
2328 static int hf_lbmr_topt_cost_type = -1;
2329 static int hf_lbmr_topt_cost_len = -1;
2330 static int hf_lbmr_topt_cost_flags = -1;
2331 static int hf_lbmr_topt_cost_flags_ignore = -1;
2332 static int hf_lbmr_topt_cost_hop_count = -1;
2333 static int hf_lbmr_topt_cost_cost = -1;
2334 static int hf_lbmr_topt_otid = -1;
2335 static int hf_lbmr_topt_otid_type = -1;
2336 static int hf_lbmr_topt_otid_len = -1;
2337 static int hf_lbmr_topt_otid_flags = -1;
2338 static int hf_lbmr_topt_otid_flags_ignore = -1;
2339 static int hf_lbmr_topt_otid_originating_transport = -1;
2340 static int hf_lbmr_topt_ctxinst = -1;
2341 static int hf_lbmr_topt_ctxinst_type = -1;
2342 static int hf_lbmr_topt_ctxinst_len = -1;
2343 static int hf_lbmr_topt_ctxinst_flags = -1;
2344 static int hf_lbmr_topt_ctxinst_flags_ignore = -1;
2345 static int hf_lbmr_topt_ctxinst_res = -1;
2346 static int hf_lbmr_topt_ctxinst_ctxinst = -1;
2347 static int hf_lbmr_topt_ctxinsts = -1;
2348 static int hf_lbmr_topt_ctxinsts_type = -1;
2349 static int hf_lbmr_topt_ctxinsts_len = -1;
2350 static int hf_lbmr_topt_ctxinsts_flags = -1;
2351 static int hf_lbmr_topt_ctxinsts_flags_ignore = -1;
2352 static int hf_lbmr_topt_ctxinsts_idx = -1;
2353 static int hf_lbmr_topt_ctxinsts_ctxinst = -1;
2354 static int hf_lbmr_topt_ulb = -1;
2355 static int hf_lbmr_topt_ulb_type = -1;
2356 static int hf_lbmr_topt_ulb_len = -1;
2357 static int hf_lbmr_topt_ulb_flags = -1;
2358 static int hf_lbmr_topt_ulb_flags_ignore = -1;
2359 static int hf_lbmr_topt_ulb_queue_id = -1;
2360 static int hf_lbmr_topt_ulb_regid = -1;
2361 static int hf_lbmr_topt_ulb_ulb_src_id = -1;
2362 static int hf_lbmr_topt_ulb_src_ip_addr = -1;
2363 static int hf_lbmr_topt_ulb_src_tcp_port = -1;
2364 static int hf_lbmr_topt_ulb_reserved = -1;
2365 static int hf_lbmr_topt_ctxinstq = -1;
2366 static int hf_lbmr_topt_ctxinstq_type = -1;
2367 static int hf_lbmr_topt_ctxinstq_len = -1;
2368 static int hf_lbmr_topt_ctxinstq_flags = -1;
2369 static int hf_lbmr_topt_ctxinstq_flags_ignore = -1;
2370 static int hf_lbmr_topt_ctxinstq_idx = -1;
2371 static int hf_lbmr_topt_ctxinstq_ctxinst = -1;
2372 static int hf_lbmr_topt_domain_id = -1;
2373 static int hf_lbmr_topt_domain_id_type = -1;
2374 static int hf_lbmr_topt_domain_id_len = -1;
2375 static int hf_lbmr_topt_domain_id_flags = -1;
2376 static int hf_lbmr_topt_domain_id_flags_ignore = -1;
2377 static int hf_lbmr_topt_domain_id_domain_id = -1;
2378 static int hf_lbmr_topt_exfunc = -1;
2379 static int hf_lbmr_topt_exfunc_type = -1;
2380 static int hf_lbmr_topt_exfunc_len = -1;
2381 static int hf_lbmr_topt_exfunc_flags = -1;
2382 static int hf_lbmr_topt_exfunc_flags_ignore = -1;
2383 static int hf_lbmr_topt_exfunc_src_tcp_port = -1;
2384 static int hf_lbmr_topt_exfunc_reserved = -1;
2385 static int hf_lbmr_topt_exfunc_src_ip_addr = -1;
2386 static int hf_lbmr_topt_exfunc_functionality_flags = -1;
2387 static int hf_lbmr_topt_exfunc_functionality_flags_lj = -1;
2388 static int hf_lbmr_topt_exfunc_functionality_flags_ume = -1;
2389 static int hf_lbmr_topt_exfunc_functionality_flags_umq = -1;
2390 static int hf_lbmr_topt_exfunc_functionality_flags_ulb = -1;
2391 static int hf_lbmr_topt_unknown = -1;
2392 static int hf_lbmr_topt_unknown_type = -1;
2393 static int hf_lbmr_topt_unknown_len = -1;
2394 static int hf_lbmr_topt_unknown_flags = -1;
2395 static int hf_lbmr_topt_unknown_data = -1;
2396 static int hf_lbmr_qqr = -1;
2397 static int hf_lbmr_qqr_name = -1;
2398 static int hf_lbmr_qirs = -1;
2399 static int hf_lbmr_qir = -1;
2400 static int hf_lbmr_qir_queue_name = -1;
2401 static int hf_lbmr_qir_topic_name = -1;
2402 static int hf_lbmr_qir_queue_id = -1;
2403 static int hf_lbmr_qir_queue_ver = -1;
2404 static int hf_lbmr_qir_queue_prev_ver = -1;
2405 static int hf_lbmr_qir_option_flag = -1;
2406 static int hf_lbmr_qir_grp_blks = -1;
2407 static int hf_lbmr_qir_queue_blks = -1;
2408 static int hf_lbmr_qir_grps = -1;
2409 static int hf_lbmr_qir_grp_blk = -1;
2410 static int hf_lbmr_qir_grp_blk_grp_idx = -1;
2411 static int hf_lbmr_qir_grp_blk_grp_sz = -1;
2412 static int hf_lbmr_qir_queues = -1;
2413 static int hf_lbmr_qir_queue_blk = -1;
2414 static int hf_lbmr_qir_queue_blk_ip = -1;
2415 static int hf_lbmr_qir_queue_blk_port = -1;
2416 static int hf_lbmr_qir_queue_blk_idx = -1;
2417 static int hf_lbmr_qir_queue_blk_grp_idx = -1;
2418 static int hf_lbmr_qir_queue_blk_reserved = -1;
2419 static int hf_lbmr_tmb = -1;
2420 static int hf_lbmr_tmb_len = -1;
2421 static int hf_lbmr_tmb_tmrs = -1;
2422 static int hf_lbmr_tmb_tmr_list = -1;
2423 static int hf_lbmr_tmr = -1;
2424 static int hf_lbmr_tmr_len = -1;
2425 static int hf_lbmr_tmr_type = -1;
2426 static int hf_lbmr_tmr_flags = -1;
2427 static int hf_lbmr_tmr_flags_response = -1;
2428 static int hf_lbmr_tmr_flags_wildcard_pcre = -1;
2429 static int hf_lbmr_tmr_flags_wildcard_regex = -1;
2430 static int hf_lbmr_tmr_name = -1;
2431 static int hf_lbmr_pser_dep_type = -1;
2432 static int hf_lbmr_pser_len = -1;
2433 static int hf_lbmr_pser_flags = -1;
2434 static int hf_lbmr_pser_flags_option = -1;
2435 static int hf_lbmr_pser_source_ip = -1;
2436 static int hf_lbmr_pser_store_ip = -1;
2437 static int hf_lbmr_pser_transport_idx = -1;
2438 static int hf_lbmr_pser_topic_idx = -1;
2439 static int hf_lbmr_pser_source_port = -1;
2440 static int hf_lbmr_pser_store_port = -1;
2441 static int hf_lbmr_pser_topic = -1;
2442 static int hf_lbmr_pser_opts = -1;
2443 static int hf_lbmr_pser_optlen = -1;
2444 static int hf_lbmr_pser_optlen_type = -1;
2445 static int hf_lbmr_pser_optlen_optlen = -1;
2446 static int hf_lbmr_pser_opt_ctxinst = -1;
2447 static int hf_lbmr_pser_opt_ctxinst_len = -1;
2448 static int hf_lbmr_pser_opt_ctxinst_type = -1;
2449 static int hf_lbmr_pser_opt_ctxinst_ctxinst = -1;
2450 static int hf_lbmr_opts = -1;
2451 static int hf_lbmr_opt_len = -1;
2452 static int hf_lbmr_opt_len_type = -1;
2453 static int hf_lbmr_opt_len_len = -1;
2454 static int hf_lbmr_opt_len_total_len = -1;
2455 static int hf_lbmr_opt_src_id = -1;
2456 static int hf_lbmr_opt_src_id_type = -1;
2457 static int hf_lbmr_opt_src_id_len = -1;
2458 static int hf_lbmr_opt_src_id_flags = -1;
2459 static int hf_lbmr_opt_src_id_flags_ignore = -1;
2460 static int hf_lbmr_opt_src_id_src_id = -1;
2461 static int hf_lbmr_opt_src_type = -1;
2462 static int hf_lbmr_opt_src_type_type = -1;
2463 static int hf_lbmr_opt_src_type_len = -1;
2464 static int hf_lbmr_opt_src_type_flags = -1;
2465 static int hf_lbmr_opt_src_type_flags_ignore = -1;
2466 static int hf_lbmr_opt_src_type_src_type = -1;
2467 static int hf_lbmr_opt_version = -1;
2468 static int hf_lbmr_opt_version_type = -1;
2469 static int hf_lbmr_opt_version_len = -1;
2470 static int hf_lbmr_opt_version_flags = -1;
2471 static int hf_lbmr_opt_version_flags_ignore = -1;
2472 static int hf_lbmr_opt_version_flags_ume = -1;
2473 static int hf_lbmr_opt_version_flags_umq = -1;
2474 static int hf_lbmr_opt_version_version = -1;
2475 static int hf_lbmr_opt_local_domain = -1;
2476 static int hf_lbmr_opt_local_domain_type = -1;
2477 static int hf_lbmr_opt_local_domain_len = -1;
2478 static int hf_lbmr_opt_local_domain_flags = -1;
2479 static int hf_lbmr_opt_local_domain_flags_ignore = -1;
2480 static int hf_lbmr_opt_local_domain_local_domain_id = -1;
2481 static int hf_lbmr_opt_unknown = -1;
2482 static int hf_lbmr_opt_unknown_type = -1;
2483 static int hf_lbmr_opt_unknown_len = -1;
2484 static int hf_lbmr_opt_unknown_flags = -1;
2485 static int hf_lbmr_opt_unknown_data = -1;
2486 static int hf_lbmr_topic_res_request_flags = -1;
2487 static int hf_lbmr_topic_res_request_flags_gw_remote_interest = -1;
2488 static int hf_lbmr_topic_res_request_flags_context_query = -1;
2489 static int hf_lbmr_topic_res_request_flags_context_advertisement = -1;
2490 static int hf_lbmr_topic_res_request_flags_gateway_meta = -1;
2491 static int hf_lbmr_topic_res_request_flags_advertisement = -1;
2492 static int hf_lbmr_topic_res_request_flags_query = -1;
2493 static int hf_lbmr_topic_res_request_flags_wildcard_query = -1;
2494 static int hf_lbmr_ctxinfo_len = -1;
2495 static int hf_lbmr_ctxinfo_hop_count = -1;
2496 static int hf_lbmr_ctxinfo_flags = -1;
2497 static int hf_lbmr_ctxinfo_flags_query = -1;
2498 static int hf_lbmr_ctxinfo_flags_ip = -1;
2499 static int hf_lbmr_ctxinfo_flags_instance = -1;
2500 static int hf_lbmr_ctxinfo_flags_tnwg_src = -1;
2501 static int hf_lbmr_ctxinfo_flags_tnwg_rcv = -1;
2502 static int hf_lbmr_ctxinfo_flags_proxy = -1;
2503 static int hf_lbmr_ctxinfo_flags_name = -1;
2504 static int hf_lbmr_ctxinfo_port = -1;
2505 static int hf_lbmr_ctxinfo_ip = -1;
2506 static int hf_lbmr_ctxinfo_instance = -1;
2507 static int hf_lbmr_ctxinfo_name = -1;
2508 static int hf_lbmr_tnwg_len = -1;
2509 static int hf_lbmr_tnwg_type = -1;
2510 static int hf_lbmr_tnwg_reserved = -1;
2511 static int hf_lbmr_tnwg_interest = -1;
2512 static int hf_lbmr_tnwg_interest_len = -1;
2513 static int hf_lbmr_tnwg_interest_count = -1;
2514 static int hf_lbmr_tnwg_interest_rec = -1;
2515 static int hf_lbmr_tnwg_interest_rec_len = -1;
2516 static int hf_lbmr_tnwg_interest_rec_flags = -1;
2517 static int hf_lbmr_tnwg_interest_rec_flags_pattern = -1;
2518 static int hf_lbmr_tnwg_interest_rec_flags_cancel = -1;
2519 static int hf_lbmr_tnwg_interest_rec_flags_refresh = -1;
2520 static int hf_lbmr_tnwg_interest_rec_pattype = -1;
2521 static int hf_lbmr_tnwg_interest_rec_domain_id = -1;
2522 static int hf_lbmr_tnwg_interest_rec_symbol = -1;
2523 static int hf_lbmr_tnwg_ctxinfo = -1;
2524 static int hf_lbmr_tnwg_ctxinfo_len = -1;
2525 static int hf_lbmr_tnwg_ctxinfo_hop_count = -1;
2526 static int hf_lbmr_tnwg_ctxinfo_reserved = -1;
2527 static int hf_lbmr_tnwg_ctxinfo_flags1 = -1;
2528 static int hf_lbmr_tnwg_ctxinfo_flags1_query = -1;
2529 static int hf_lbmr_tnwg_ctxinfo_flags1_tnwg_src = -1;
2530 static int hf_lbmr_tnwg_ctxinfo_flags1_tnwg_rcv = -1;
2531 static int hf_lbmr_tnwg_ctxinfo_flags1_proxy = -1;
2532 static int hf_lbmr_tnwg_ctxinfo_flags2 = -1;
2533 static int hf_lbmr_tnwg_trreq = -1;
2534 static int hf_lbmr_tnwg_trreq_len = -1;
2535 static int hf_lbmr_tnwg_opt = -1;
2536 static int hf_lbmr_tnwg_opt_type = -1;
2537 static int hf_lbmr_tnwg_opt_len = -1;
2538 static int hf_lbmr_tnwg_opt_flags = -1;
2539 static int hf_lbmr_tnwg_opt_flags_ignore = -1;
2540 static int hf_lbmr_tnwg_opt_data = -1;
2541 static int hf_lbmr_tnwg_opt_ctxinst = -1;
2542 static int hf_lbmr_tnwg_opt_ctxinst_type = -1;
2543 static int hf_lbmr_tnwg_opt_ctxinst_len = -1;
2544 static int hf_lbmr_tnwg_opt_ctxinst_flags = -1;
2545 static int hf_lbmr_tnwg_opt_ctxinst_flags_ignore = -1;
2546 static int hf_lbmr_tnwg_opt_ctxinst_instance = -1;
2547 static int hf_lbmr_tnwg_opt_address = -1;
2548 static int hf_lbmr_tnwg_opt_address_type = -1;
2549 static int hf_lbmr_tnwg_opt_address_len = -1;
2550 static int hf_lbmr_tnwg_opt_address_flags = -1;
2551 static int hf_lbmr_tnwg_opt_address_flags_ignore = -1;
2552 static int hf_lbmr_tnwg_opt_address_port = -1;
2553 static int hf_lbmr_tnwg_opt_address_res = -1;
2554 static int hf_lbmr_tnwg_opt_address_ip = -1;
2555 static int hf_lbmr_tnwg_opt_domain = -1;
2556 static int hf_lbmr_tnwg_opt_domain_type = -1;
2557 static int hf_lbmr_tnwg_opt_domain_len = -1;
2558 static int hf_lbmr_tnwg_opt_domain_flags = -1;
2559 static int hf_lbmr_tnwg_opt_domain_flags_ignore = -1;
2560 static int hf_lbmr_tnwg_opt_domain_domain_id = -1;
2561 static int hf_lbmr_tnwg_opt_name = -1;
2562 static int hf_lbmr_tnwg_opt_name_type = -1;
2563 static int hf_lbmr_tnwg_opt_name_len = -1;
2564 static int hf_lbmr_tnwg_opt_name_flags = -1;
2565 static int hf_lbmr_tnwg_opt_name_flags_ignore = -1;
2566 static int hf_lbmr_tnwg_opt_name_name = -1;
2567 static int hf_lbmr_remote_domain_route_hdr_num_domains = -1;
2568 static int hf_lbmr_remote_domain_route_hdr_ip = -1;
2569 static int hf_lbmr_remote_domain_route_hdr_port = -1;
2570 static int hf_lbmr_remote_domain_route_hdr_reserved = -1;
2571 static int hf_lbmr_remote_domain_route_hdr_length = -1;
2572 static int hf_lbmr_remote_domain_route_hdr_domain = -1;
2573 static int hf_lbmr_rctxinfo_len = -1;
2574 static int hf_lbmr_rctxinfo_num_recs = -1;
2575 static int hf_lbmr_rctxinfo_reserved = -1;
2576 static int hf_lbmr_rctxinfo_rec = -1;
2577 static int hf_lbmr_rctxinfo_rec_len = -1;
2578 static int hf_lbmr_rctxinfo_rec_flags = -1;
2579 static int hf_lbmr_rctxinfo_rec_flags_query = -1;
2580 static int hf_lbmr_rctxinfo_rec_address = -1;
2581 static int hf_lbmr_rctxinfo_rec_address_type = -1;
2582 static int hf_lbmr_rctxinfo_rec_address_len = -1;
2583 static int hf_lbmr_rctxinfo_rec_address_flags = -1;
2584 static int hf_lbmr_rctxinfo_rec_address_domain_id = -1;
2585 static int hf_lbmr_rctxinfo_rec_address_ip = -1;
2586 static int hf_lbmr_rctxinfo_rec_address_port = -1;
2587 static int hf_lbmr_rctxinfo_rec_address_res = -1;
2588 static int hf_lbmr_rctxinfo_rec_instance = -1;
2589 static int hf_lbmr_rctxinfo_rec_instance_type = -1;
2590 static int hf_lbmr_rctxinfo_rec_instance_len = -1;
2591 static int hf_lbmr_rctxinfo_rec_instance_flags = -1;
2592 static int hf_lbmr_rctxinfo_rec_instance_instance = -1;
2593 static int hf_lbmr_rctxinfo_rec_odomain = -1;
2594 static int hf_lbmr_rctxinfo_rec_odomain_type = -1;
2595 static int hf_lbmr_rctxinfo_rec_odomain_len = -1;
2596 static int hf_lbmr_rctxinfo_rec_odomain_flags = -1;
2597 static int hf_lbmr_rctxinfo_rec_odomain_domain_id = -1;
2598 static int hf_lbmr_rctxinfo_rec_name = -1;
2599 static int hf_lbmr_rctxinfo_rec_name_type = -1;
2600 static int hf_lbmr_rctxinfo_rec_name_len = -1;
2601 static int hf_lbmr_rctxinfo_rec_name_flags = -1;
2602 static int hf_lbmr_rctxinfo_rec_name_name = -1;
2603 static int hf_lbmr_rctxinfo_rec_unknown = -1;
2604 static int hf_lbmr_rctxinfo_rec_unknown_type = -1;
2605 static int hf_lbmr_rctxinfo_rec_unknown_len = -1;
2606 static int hf_lbmr_rctxinfo_rec_unknown_flags = -1;
2607 static int hf_lbmr_rctxinfo_rec_unknown_data = -1;
2608 static int hf_qmgmt_flags = -1;
2609 static int hf_qmgmt_flags_i_flag = -1;
2610 static int hf_qmgmt_flags_n_flag = -1;
2611 static int hf_qmgmt_flags_il_l_flag = -1;
2612 static int hf_qmgmt_flags_il_k_flag = -1;
2613 static int hf_qmgmt_pckt_type = -1;
2614 static int hf_qmgmt_cfgsig = -1;
2615 static int hf_qmgmt_queue_id = -1;
2616 static int hf_qmgmt_queue_ver = -1;
2617 static int hf_qmgmt_ip = -1;
2618 static int hf_qmgmt_port = -1;
2619 static int hf_qmgmt_inst_idx = -1;
2620 static int hf_qmgmt_grp_idx = -1;
2621 static int hf_qmgmt_pckt_type_dep16 = -1;
2622 static int hf_qmgmt_il_num_insts = -1;
2623 static int hf_qmgmt_jrej_code = -1;
2624 static int hf_qmgmt_ev_bias = -1;
2625 static int hf_qmgmt_il = -1;
2626 static int hf_qmgmt_il_highest_rcr_tsp = -1;
2627 static int hf_qmgmt_il_inst = -1;
2628 static int hf_qmgmt_il_inst_ip = -1;
2629 static int hf_qmgmt_il_inst_port = -1;
2630 static int hf_qmgmt_il_inst_inst_idx = -1;
2631 static int hf_qmgmt_il_inst_grp_idx = -1;
2632 static int hf_qmgmt_il_inst_flags = -1;
2633 static int hf_qmgmt_il_inst_flags_m_flag = -1;
2634 static int hf_qmgmt_il_inst_flags_q_flag = -1;
2635 static int hf_qmgmt_il_inst_flags_p_flag = -1;
2636 static int hf_qmgmt_ec = -1;
2637 static int hf_qmgmt_ec_queue_new_ver = -1;
2638 static int hf_qmgmt_ev = -1;
2639 static int hf_qmgmt_ev_highest_rcr_tsp = -1;
2640 static int hf_qmgmt_ev_age = -1;
2641 static int hf_qmgmt_qro = -1;
2642 static int hf_qmgmt_qro_highest_rcr_tsp = -1;
2643 static int hf_qmgmt_qname = -1;
2644
2645 /* Expert info handles */
2646 static expert_field ei_lbmr_analysis_length_incorrect = EI_INIT;
2647 static expert_field ei_lbmr_analysis_invalid_value = EI_INIT;
2648 static expert_field ei_lbmr_analysis_zero_len_option = EI_INIT;
2649
2650
2651 /* Tap handles */
2652 static int lbmr_topic_advertisement_tap_handle = -1;
2653 static int lbmr_topic_query_tap_handle = -1;
2654 static int lbmr_pattern_query_tap_handle = -1;
2655 static int lbmr_queue_advertisement_tap_handle = -1;
2656 static int lbmr_queue_query_tap_handle = -1;
2657
2658 #define LBMR_TOPIC_ADVERTISEMENT_TAP_STRING "lbm_lbmr_topic_advertisement"
2659 #define LBMR_TOPIC_QUERY_TAP_STRING "lbm_lbmr_topic_query"
2660 #define LBMR_PATTERN_QUERY_TAP_STRING "lbm_lbmr_pattern_query"
2661 #define LBMR_QUEUE_ADVERTISEMENT_TAP_STRING "lbm_lbmr_queue_advertisement"
2662 #define LBMR_QUEUE_QUERY_TAP_STRING "lbm_lbmr_queue_query"
2663
2664 /*----------------------------------------------------------------------------*/
2665 /* Statistics. */
2666 /*----------------------------------------------------------------------------*/
2667 /* Statistics structures */
2668 struct tqr_node_t_stct;
2669 struct tqr_node_t_stct
2670 {
2671 char * topic;
2672 struct tqr_node_t_stct * next;
2673 };
2674 typedef struct tqr_node_t_stct tqr_node_t;
2675
2676 struct wctqr_node_t_stct;
2677 struct wctqr_node_t_stct
2678 {
2679 guint8 type;
2680 char * pattern;
2681 struct wctqr_node_t_stct * next;
2682 };
2683 typedef struct wctqr_node_t_stct wctqr_node_t;
2684
2685 struct tir_node_t_stct;
2686 struct tir_node_t_stct
2687 {
2688 char * topic;
2689 char * source_string;
2690 guint32 idx;
2691 struct tir_node_t_stct * next;
2692 };
2693 typedef struct tir_node_t_stct tir_node_t;
2694
2695 typedef struct
2696 {
2697 gint tqr_count;
2698 tqr_node_t * tqr;
2699 gint tir_count;
2700 tir_node_t * tir;
2701 gint wctqr_count;
2702 wctqr_node_t * wctqr;
2703 } lbmr_topic_contents_t;
2704
2705 struct qqr_node_t_stct;
2706 struct qqr_node_t_stct
2707 {
2708 char * queue;
2709 struct qqr_node_t_stct * next;
2710 };
2711 typedef struct qqr_node_t_stct qqr_node_t;
2712
2713 struct qir_node_t_stct;
2714 struct qir_node_t_stct
2715 {
2716 char * queue;
2717 char * topic;
2718 guint16 port;
2719 struct qir_node_t_stct * next;
2720 };
2721 typedef struct qir_node_t_stct qir_node_t;
2722
2723 typedef struct
2724 {
2725 gint qqr_count;
2726 qqr_node_t * qqr;
2727 gint qir_count;
2728 qir_node_t * qir;
2729 } lbmr_queue_contents_t;
2730
2731 typedef struct
2732 {
2733 gint type;
2734 union
2735 {
2736 lbmr_topic_contents_t topic;
2737 lbmr_queue_contents_t queue;
2738 } contents;
2739 } lbmr_contents_t;
2740
2741 #define LBMR_CONTENTS_TOPIC 0
2742 #define LBMR_CONTENTS_QUEUE 1
2743
2744 /* Statistics titles */
2745 static const gchar * lbmr_stat_tree_name_topic_ads_topic = "29West/Topics/Advertisements by Topic";
2746 static const gchar * lbmr_stat_tree_name_topic_ads_source = "29West/Topics/Advertisements by Source";
2747 static const gchar * lbmr_stat_tree_name_topic_ads_transport = "29West/Topics/Advertisements by Transport";
2748 static const gchar * lbmr_stat_tree_name_topic_queries_topic = "29West/Topics/Queries by Topic";
2749 static const gchar * lbmr_stat_tree_name_topic_queries_receiver = "29West/Topics/Queries by Receiver";
2750 static const gchar * lbmr_stat_tree_name_topic_queries_pattern = "29West/Topics/Wildcard Queries by Pattern";
2751 static const gchar * lbmr_stat_tree_name_topic_queries_pattern_receiver = "29West/Topics/Wildcard Queries by Receiver";
2752 static const gchar * lbmr_stat_tree_name_queue_ads_queue = "29West/Queues/Advertisements by Queue";
2753 static const gchar * lbmr_stat_tree_name_queue_ads_source = "29West/Queues/Advertisements by Source";
2754 static const gchar * lbmr_stat_tree_name_queue_queries_queue = "29West/Queues/Queries by Queue";
2755 static const gchar * lbmr_stat_tree_name_queue_queries_receiver = "29West/Queues/Queries by Receiver";
2756
2757 /* Statistics handles */
2758 static int lbmr_stats_tree_handle_topic_ads_topic = -1;
2759 static int lbmr_stats_tree_handle_topic_ads_source = -1;
2760 static int lbmr_stats_tree_handle_topic_ads_transport = -1;
2761 static int lbmr_stats_tree_handle_topic_queries_topic = -1;
2762 static int lbmr_stats_tree_handle_topic_queries_receiver = -1;
2763 static int lbmr_stats_tree_handle_topic_queries_pattern = -1;
2764 static int lbmr_stats_tree_handle_topic_queries_pattern_receiver = -1;
2765 static int lbmr_stats_tree_handle_queue_ads_queue = -1;
2766 static int lbmr_stats_tree_handle_queue_ads_source = -1;
2767 static int lbmr_stats_tree_handle_queue_queries_queue = -1;
2768 static int lbmr_stats_tree_handle_queue_queries_receiver = -1;
2769
2770 /*----------------------------------------------------------------------------*/
2771 /* Statistics tree utility functions. */
2772 /*----------------------------------------------------------------------------*/
2773
add_contents_tqr(lbmr_contents_t * contents,const char * topic)2774 static void add_contents_tqr(lbmr_contents_t * contents, const char * topic)
2775 {
2776 tqr_node_t * node = NULL;
2777
2778 node = wmem_new(wmem_packet_scope(), tqr_node_t);
2779 node->topic = wmem_strdup(wmem_packet_scope(), topic);
2780 node->next = contents->contents.topic.tqr;
2781 contents->contents.topic.tqr = node;
2782 contents->contents.topic.tqr_count++;
2783 }
2784
add_contents_wctqr(lbmr_contents_t * contents,unsigned char type,const char * pattern)2785 static void add_contents_wctqr(lbmr_contents_t * contents, unsigned char type, const char * pattern)
2786 {
2787 wctqr_node_t * node = NULL;
2788
2789 node = wmem_new(wmem_packet_scope(), wctqr_node_t);
2790 node->type = type;
2791 node->pattern = wmem_strdup(wmem_packet_scope(), pattern);
2792 node->next = contents->contents.topic.wctqr;
2793 contents->contents.topic.wctqr = node;
2794 contents->contents.topic.wctqr_count++;
2795 }
2796
add_contents_tir(lbmr_contents_t * contents,const char * topic,char * source,guint32 topic_index)2797 static void add_contents_tir(lbmr_contents_t * contents, const char * topic, char * source, guint32 topic_index)
2798 {
2799 tir_node_t * node = NULL;
2800
2801 node = wmem_new(wmem_packet_scope(), tir_node_t);
2802 node->topic = wmem_strdup(wmem_packet_scope(), topic);
2803 node->source_string = source;
2804 node->idx = topic_index;
2805 node->next = contents->contents.topic.tir;
2806 contents->contents.topic.tir = node;
2807 contents->contents.topic.tir_count++;
2808 }
2809
add_contents_qqr(lbmr_contents_t * contents,const char * queue)2810 static void add_contents_qqr(lbmr_contents_t * contents, const char * queue)
2811 {
2812 qqr_node_t * node = NULL;
2813
2814 node = wmem_new(wmem_packet_scope(), qqr_node_t);
2815 node->queue = wmem_strdup(wmem_packet_scope(), queue);
2816 node->next = contents->contents.queue.qqr;
2817 contents->contents.queue.qqr = node;
2818 contents->contents.queue.qqr_count++;
2819 }
2820
add_contents_qir(lbmr_contents_t * contents,const char * queue,const char * topic,guint16 port)2821 static void add_contents_qir(lbmr_contents_t * contents, const char * queue, const char * topic, guint16 port)
2822 {
2823 qir_node_t * node = NULL;
2824
2825 node = wmem_new(wmem_packet_scope(), qir_node_t);
2826 node->queue = wmem_strdup(wmem_packet_scope(), queue);
2827 node->topic = wmem_strdup(wmem_packet_scope(), topic);
2828 node->port = port;
2829 node->next = contents->contents.queue.qir;
2830 contents->contents.queue.qir = node;
2831 contents->contents.queue.qir_count++;
2832 }
2833
2834 /*----------------------------------------------------------------------------*/
2835 /* Topic advertisements by Topic: */
2836 /* Topic name */
2837 /* - Source address */
2838 /* - Source string (including topic index) */
2839 /*----------------------------------------------------------------------------*/
2840
lbmr_topic_ads_topic_stats_tree_init(stats_tree * tree)2841 static void lbmr_topic_ads_topic_stats_tree_init(stats_tree * tree)
2842 {
2843 lbmr_stats_tree_handle_topic_ads_topic = stats_tree_create_node(tree, lbmr_stat_tree_name_topic_ads_topic, 0, STAT_DT_INT, TRUE);
2844 }
2845
lbmr_topic_ads_topic_stats_tree_packet(stats_tree * tree,packet_info * pinfo,epan_dissect_t * edt _U_,const void * data)2846 static tap_packet_status lbmr_topic_ads_topic_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
2847 {
2848 const lbm_lbmr_topic_advertisement_tap_info_t * info = (const lbm_lbmr_topic_advertisement_tap_info_t *) data;
2849 int topic_node;
2850 int source_node;
2851 gchar * full_source_string;
2852
2853 tick_stat_node(tree, lbmr_stat_tree_name_topic_ads_topic, 0, FALSE);
2854 topic_node = tick_stat_node(tree, info->topic, lbmr_stats_tree_handle_topic_ads_topic, TRUE);
2855 source_node = tick_stat_node(tree, address_to_str(wmem_packet_scope(), &pinfo->net_src), topic_node, TRUE);
2856 full_source_string = wmem_strdup_printf(wmem_packet_scope(), "%s[%" G_GUINT32_FORMAT "]", info->source, info->topic_index);
2857 tick_stat_node(tree, full_source_string, source_node, TRUE);
2858 return (TAP_PACKET_REDRAW);
2859 }
2860
2861 /*----------------------------------------------------------------------------*/
2862 /* Topic advertisements by Source: */
2863 /* Source address */
2864 /* - Topic name */
2865 /* - Source string (including topic index) */
2866 /*----------------------------------------------------------------------------*/
2867
lbmr_topic_ads_source_stats_tree_init(stats_tree * tree)2868 static void lbmr_topic_ads_source_stats_tree_init(stats_tree * tree)
2869 {
2870 lbmr_stats_tree_handle_topic_ads_source = stats_tree_create_node(tree, lbmr_stat_tree_name_topic_ads_source, 0, STAT_DT_INT, TRUE);
2871 }
2872
lbmr_topic_ads_source_stats_tree_packet(stats_tree * tree,packet_info * pinfo,epan_dissect_t * edt _U_,const void * data)2873 static tap_packet_status lbmr_topic_ads_source_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
2874 {
2875 const lbm_lbmr_topic_advertisement_tap_info_t * info = (const lbm_lbmr_topic_advertisement_tap_info_t *) data;
2876 int source_node;
2877 int topic_node;
2878 gchar * full_source_string;
2879
2880 tick_stat_node(tree, lbmr_stat_tree_name_topic_ads_source, 0, FALSE);
2881 source_node = tick_stat_node(tree, address_to_str(wmem_packet_scope(), &pinfo->net_src), lbmr_stats_tree_handle_topic_ads_source, TRUE);
2882 topic_node = tick_stat_node(tree, info->topic, source_node, TRUE);
2883 full_source_string = wmem_strdup_printf(wmem_packet_scope(), "%s[%" G_GUINT32_FORMAT "]", info->source, info->topic_index);
2884 tick_stat_node(tree, full_source_string, topic_node, TRUE);
2885 return (TAP_PACKET_REDRAW);
2886 }
2887
2888 /*----------------------------------------------------------------------------*/
2889 /* Topic advertisements by Transport: */
2890 /* Source string */
2891 /* - Topic name (including topic index) */
2892 /*----------------------------------------------------------------------------*/
2893
lbmr_topic_ads_transport_stats_tree_init(stats_tree * tree)2894 static void lbmr_topic_ads_transport_stats_tree_init(stats_tree * tree)
2895 {
2896 lbmr_stats_tree_handle_topic_ads_transport = stats_tree_create_node(tree, lbmr_stat_tree_name_topic_ads_transport, 0, STAT_DT_INT, TRUE);
2897 }
2898
lbmr_topic_ads_transport_stats_tree_packet(stats_tree * tree,packet_info * pinfo _U_,epan_dissect_t * edt _U_,const void * data)2899 static tap_packet_status lbmr_topic_ads_transport_stats_tree_packet(stats_tree * tree, packet_info * pinfo _U_, epan_dissect_t * edt _U_, const void * data)
2900 {
2901 const lbm_lbmr_topic_advertisement_tap_info_t * info = (const lbm_lbmr_topic_advertisement_tap_info_t *) data;
2902 int transport_node;
2903 gchar * full_source_string;
2904
2905 tick_stat_node(tree, lbmr_stat_tree_name_topic_ads_transport, 0, FALSE);
2906 transport_node = tick_stat_node(tree, info->source, lbmr_stats_tree_handle_topic_ads_transport, TRUE);
2907 full_source_string = wmem_strdup_printf(wmem_packet_scope(), "%s [%" G_GUINT32_FORMAT "]", info->topic, info->topic_index);
2908 tick_stat_node(tree, full_source_string, transport_node, TRUE);
2909 return (TAP_PACKET_REDRAW);
2910 }
2911
2912 /*----------------------------------------------------------------------------*/
2913 /* Topic queries by Topic: */
2914 /* Topic name */
2915 /* - Receiver address */
2916 /*----------------------------------------------------------------------------*/
2917
lbmr_topic_queries_topic_stats_tree_init(stats_tree * tree)2918 static void lbmr_topic_queries_topic_stats_tree_init(stats_tree * tree)
2919 {
2920 lbmr_stats_tree_handle_topic_queries_topic = stats_tree_create_node(tree, lbmr_stat_tree_name_topic_queries_topic, 0, STAT_DT_INT, TRUE);
2921 }
2922
lbmr_topic_queries_topic_stats_tree_packet(stats_tree * tree,packet_info * pinfo,epan_dissect_t * edt _U_,const void * data)2923 static tap_packet_status lbmr_topic_queries_topic_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
2924 {
2925 const lbm_lbmr_topic_query_tap_info_t * info = (const lbm_lbmr_topic_query_tap_info_t *) data;
2926 int topic_node;
2927
2928 tick_stat_node(tree, lbmr_stat_tree_name_topic_queries_topic, 0, FALSE);
2929 topic_node = tick_stat_node(tree, info->topic, lbmr_stats_tree_handle_topic_queries_topic, TRUE);
2930 tick_stat_node(tree, address_to_str(wmem_packet_scope(), &pinfo->net_src), topic_node, TRUE);
2931 return (TAP_PACKET_REDRAW);
2932 }
2933
2934 /*----------------------------------------------------------------------------*/
2935 /* Topic queries by Receiver: */
2936 /* Receiver address */
2937 /* - Topic name */
2938 /*----------------------------------------------------------------------------*/
2939
lbmr_topic_queries_receiver_stats_tree_init(stats_tree * tree)2940 static void lbmr_topic_queries_receiver_stats_tree_init(stats_tree * tree)
2941 {
2942 lbmr_stats_tree_handle_topic_queries_receiver = stats_tree_create_node(tree, lbmr_stat_tree_name_topic_queries_receiver, 0, STAT_DT_INT, TRUE);
2943 }
2944
lbmr_topic_queries_receiver_stats_tree_packet(stats_tree * tree,packet_info * pinfo,epan_dissect_t * edt _U_,const void * data)2945 static tap_packet_status lbmr_topic_queries_receiver_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
2946 {
2947 const lbm_lbmr_topic_query_tap_info_t * info = (const lbm_lbmr_topic_query_tap_info_t *) data;
2948 int receiver_node;
2949
2950 tick_stat_node(tree, lbmr_stat_tree_name_topic_queries_receiver, 0, FALSE);
2951 receiver_node = tick_stat_node(tree, address_to_str(wmem_packet_scope(), &pinfo->net_src), lbmr_stats_tree_handle_topic_queries_receiver, TRUE);
2952 tick_stat_node(tree, info->topic, receiver_node, TRUE);
2953 return (TAP_PACKET_REDRAW);
2954 }
2955
2956 /*----------------------------------------------------------------------------*/
2957 /* Topic queries by Pattern: */
2958 /* Pattern */
2959 /* - Receiver address */
2960 /*----------------------------------------------------------------------------*/
2961
lbmr_topic_queries_pattern_stats_tree_init(stats_tree * tree)2962 static void lbmr_topic_queries_pattern_stats_tree_init(stats_tree * tree)
2963 {
2964 lbmr_stats_tree_handle_topic_queries_pattern = stats_tree_create_node(tree, lbmr_stat_tree_name_topic_queries_pattern, 0, STAT_DT_INT, TRUE);
2965 }
2966
lbmr_topic_queries_pattern_stats_tree_packet(stats_tree * tree,packet_info * pinfo,epan_dissect_t * edt _U_,const void * data)2967 static tap_packet_status lbmr_topic_queries_pattern_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
2968 {
2969 const lbm_lbmr_pattern_query_tap_info_t * info = (const lbm_lbmr_pattern_query_tap_info_t *) data;
2970 int pattern_node;
2971 char * pattern_str;
2972
2973 tick_stat_node(tree, lbmr_stat_tree_name_topic_queries_pattern, 0, FALSE);
2974 pattern_str = wmem_strdup_printf(wmem_packet_scope(), "%s (%s)",
2975 info->pattern,
2976 val_to_str(info->type, lbm_wildcard_pattern_type_short, "UNKN[0x%02x]"));
2977 pattern_node = tick_stat_node(tree, pattern_str, lbmr_stats_tree_handle_topic_queries_pattern, TRUE);
2978 tick_stat_node(tree, address_to_str(wmem_packet_scope(), &pinfo->net_src), pattern_node, TRUE);
2979 return (TAP_PACKET_REDRAW);
2980 }
2981
2982 /*----------------------------------------------------------------------------*/
2983 /* Topic queries by Pattern: */
2984 /* Receiver address */
2985 /* - Patternme */
2986 /*----------------------------------------------------------------------------*/
2987
lbmr_topic_queries_pattern_receiver_stats_tree_init(stats_tree * tree)2988 static void lbmr_topic_queries_pattern_receiver_stats_tree_init(stats_tree * tree)
2989 {
2990 lbmr_stats_tree_handle_topic_queries_pattern_receiver = stats_tree_create_node(tree, lbmr_stat_tree_name_topic_queries_pattern_receiver, 0, STAT_DT_INT, TRUE);
2991 }
2992
lbmr_topic_queries_pattern_receiver_stats_tree_packet(stats_tree * tree,packet_info * pinfo,epan_dissect_t * edt _U_,const void * data)2993 static tap_packet_status lbmr_topic_queries_pattern_receiver_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
2994 {
2995 const lbm_lbmr_pattern_query_tap_info_t * info = (const lbm_lbmr_pattern_query_tap_info_t *) data;
2996 int receiver_node;
2997 char * pattern_str;
2998
2999 tick_stat_node(tree, lbmr_stat_tree_name_topic_queries_pattern_receiver, 0, FALSE);
3000 receiver_node = tick_stat_node(tree, address_to_str(wmem_packet_scope(), &pinfo->net_src), lbmr_stats_tree_handle_topic_queries_pattern_receiver, TRUE);
3001 pattern_str = wmem_strdup_printf(wmem_packet_scope(), "%s (%s)",
3002 info->pattern,
3003 val_to_str(info->type, lbm_wildcard_pattern_type_short, "UNKN[0x%02x]"));
3004 tick_stat_node(tree, pattern_str, receiver_node, TRUE);
3005 return (TAP_PACKET_REDRAW);
3006 }
3007
3008 /*----------------------------------------------------------------------------*/
3009 /* Queue advertisements by Queue: */
3010 /* Queue name */
3011 /* - Source address and port */
3012 /*----------------------------------------------------------------------------*/
3013
lbmr_queue_ads_queue_stats_tree_init(stats_tree * tree)3014 static void lbmr_queue_ads_queue_stats_tree_init(stats_tree * tree)
3015 {
3016 lbmr_stats_tree_handle_queue_ads_queue = stats_tree_create_node(tree, lbmr_stat_tree_name_queue_ads_queue, 0, STAT_DT_INT, TRUE);
3017 }
3018
lbmr_queue_ads_queue_stats_tree_packet(stats_tree * tree,packet_info * pinfo,epan_dissect_t * edt _U_,const void * data)3019 static tap_packet_status lbmr_queue_ads_queue_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
3020 {
3021 const lbm_lbmr_queue_advertisement_tap_info_t * info = (const lbm_lbmr_queue_advertisement_tap_info_t *) data;
3022 int queue_node;
3023 gchar * str;
3024
3025 tick_stat_node(tree, lbmr_stat_tree_name_queue_ads_queue, 0, FALSE);
3026 queue_node = tick_stat_node(tree, info->queue, lbmr_stats_tree_handle_queue_ads_queue, TRUE);
3027 str = wmem_strdup_printf(wmem_packet_scope(), "%s:%" G_GUINT16_FORMAT, address_to_str(wmem_packet_scope(), &pinfo->net_src), info->port);
3028 tick_stat_node(tree, str, queue_node, TRUE);
3029 return (TAP_PACKET_REDRAW);
3030 }
3031
3032 /*----------------------------------------------------------------------------*/
3033 /* Queue advertisements by Source: */
3034 /* Source address */
3035 /* - Queue name and port */
3036 /*----------------------------------------------------------------------------*/
3037
lbmr_queue_ads_source_stats_tree_init(stats_tree * tree)3038 static void lbmr_queue_ads_source_stats_tree_init(stats_tree * tree)
3039 {
3040 lbmr_stats_tree_handle_queue_ads_source = stats_tree_create_node(tree, lbmr_stat_tree_name_queue_ads_source, 0, STAT_DT_INT, TRUE);
3041 }
3042
lbmr_queue_ads_source_stats_tree_packet(stats_tree * tree,packet_info * pinfo,epan_dissect_t * edt _U_,const void * data)3043 static tap_packet_status lbmr_queue_ads_source_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
3044 {
3045 const lbm_lbmr_queue_advertisement_tap_info_t * info = (const lbm_lbmr_queue_advertisement_tap_info_t *) data;
3046 int source_node;
3047 gchar * str;
3048
3049 tick_stat_node(tree, lbmr_stat_tree_name_queue_ads_source, 0, FALSE);
3050 source_node = tick_stat_node(tree, address_to_str(wmem_packet_scope(), &pinfo->net_src), lbmr_stats_tree_handle_queue_ads_source, TRUE);
3051 str = wmem_strdup_printf(wmem_packet_scope(), "%s:%" G_GUINT16_FORMAT, info->queue, info->port);
3052 tick_stat_node(tree, str, source_node, TRUE);
3053 return (TAP_PACKET_REDRAW);
3054 }
3055
3056 /*----------------------------------------------------------------------------*/
3057 /* Queue queries by Queue: */
3058 /* Queue name */
3059 /* - Receiver address */
3060 /*----------------------------------------------------------------------------*/
3061
lbmr_queue_queries_queue_stats_tree_init(stats_tree * tree)3062 static void lbmr_queue_queries_queue_stats_tree_init(stats_tree * tree)
3063 {
3064 lbmr_stats_tree_handle_queue_queries_queue = stats_tree_create_node(tree, lbmr_stat_tree_name_queue_queries_queue, 0, STAT_DT_INT, TRUE);
3065 }
3066
lbmr_queue_queries_queue_stats_tree_packet(stats_tree * tree,packet_info * pinfo,epan_dissect_t * edt _U_,const void * data)3067 static tap_packet_status lbmr_queue_queries_queue_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
3068 {
3069 const lbm_lbmr_queue_query_tap_info_t * info = (const lbm_lbmr_queue_query_tap_info_t *) data;
3070 int queue_node = 0;
3071
3072 tick_stat_node(tree, lbmr_stat_tree_name_queue_queries_queue, 0, FALSE);
3073 queue_node = tick_stat_node(tree, info->queue, lbmr_stats_tree_handle_queue_queries_queue, TRUE);
3074 tick_stat_node(tree, address_to_str(wmem_packet_scope(), &pinfo->net_src), queue_node, TRUE);
3075 return (TAP_PACKET_REDRAW);
3076 }
3077
3078 /*----------------------------------------------------------------------------*/
3079 /* Queue queries by Receiver: */
3080 /* Receiver address */
3081 /* - Queue name */
3082 /*----------------------------------------------------------------------------*/
3083
lbmr_queue_queries_receiver_stats_tree_init(stats_tree * tree)3084 static void lbmr_queue_queries_receiver_stats_tree_init(stats_tree * tree)
3085 {
3086 lbmr_stats_tree_handle_queue_queries_receiver = stats_tree_create_node(tree, lbmr_stat_tree_name_queue_queries_receiver, 0, STAT_DT_INT, TRUE);
3087 }
3088
lbmr_queue_queries_receiver_stats_tree_packet(stats_tree * tree,packet_info * pinfo,epan_dissect_t * edt _U_,const void * data)3089 static tap_packet_status lbmr_queue_queries_receiver_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
3090 {
3091 const lbm_lbmr_queue_query_tap_info_t * info = (const lbm_lbmr_queue_query_tap_info_t *) data;
3092 int receiver_node;
3093
3094 tick_stat_node(tree, lbmr_stat_tree_name_queue_queries_receiver, 0, FALSE);
3095 receiver_node = tick_stat_node(tree, address_to_str(wmem_packet_scope(), &pinfo->net_src), lbmr_stats_tree_handle_queue_queries_receiver, TRUE);
3096 tick_stat_node(tree, info->queue, receiver_node, TRUE);
3097 return (TAP_PACKET_REDRAW);
3098 }
3099
3100 /*----------------------------------------------------------------------------*/
3101 /* Dissector functions. */
3102 /*----------------------------------------------------------------------------*/
3103
3104 /*----------------------------------------------------------------------------*/
3105 /* LBMR TNWG option dissection functions. */
3106 /*----------------------------------------------------------------------------*/
dissect_lbmr_tnwg_ctxinst_opt(tvbuff_t * tvb,int offset,packet_info * pinfo _U_,proto_tree * tree)3107 static int dissect_lbmr_tnwg_ctxinst_opt(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
3108 {
3109 proto_tree * opt_tree = NULL;
3110 proto_item * opt_item = NULL;
3111 guint8 opt_len = 0;
3112 static int * const flags[] =
3113 {
3114 &hf_lbmr_tnwg_opt_ctxinst_flags_ignore,
3115 NULL
3116 };
3117
3118 opt_len = tvb_get_guint8(tvb, offset + O_LBMR_TNWG_OPT_CTXINST_T_LEN);
3119 opt_item = proto_tree_add_item(tree, hf_lbmr_tnwg_opt_ctxinst, tvb, offset, opt_len, ENC_NA);
3120 opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_tnwg_ctxinst_opt);
3121 proto_tree_add_item(opt_tree, hf_lbmr_tnwg_opt_ctxinst_type, tvb, offset + O_LBMR_TNWG_OPT_CTXINST_T_TYPE, L_LBMR_TNWG_OPT_CTXINST_T_TYPE, ENC_BIG_ENDIAN);
3122 proto_tree_add_item(opt_tree, hf_lbmr_tnwg_opt_ctxinst_len, tvb, offset + O_LBMR_TNWG_OPT_CTXINST_T_LEN, L_LBMR_TNWG_OPT_CTXINST_T_LEN, ENC_BIG_ENDIAN);
3123 proto_tree_add_bitmask(opt_tree, tvb, offset + O_LBMR_TNWG_OPT_CTXINST_T_FLAGS, hf_lbmr_tnwg_opt_ctxinst_flags, ett_lbmr_tnwg_ctxinst_opt_flags, flags, ENC_BIG_ENDIAN);
3124 proto_tree_add_item(opt_tree, hf_lbmr_tnwg_opt_ctxinst_instance, tvb, offset + O_LBMR_TNWG_OPT_CTXINST_T_INSTANCE, L_LBMR_TNWG_OPT_CTXINST_T_INSTANCE, ENC_NA);
3125 return ((int) opt_len);
3126 }
3127
dissect_lbmr_tnwg_address_opt(tvbuff_t * tvb,int offset,packet_info * pinfo _U_,proto_tree * tree)3128 static int dissect_lbmr_tnwg_address_opt(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
3129 {
3130 proto_tree * opt_tree = NULL;
3131 proto_item * opt_item = NULL;
3132 guint8 opt_len = 0;
3133 static int * const flags[] =
3134 {
3135 &hf_lbmr_tnwg_opt_address_flags_ignore,
3136 NULL
3137 };
3138
3139 opt_len = tvb_get_guint8(tvb, offset + O_LBMR_TNWG_OPT_ADDRESS_T_LEN);
3140 opt_item = proto_tree_add_item(tree, hf_lbmr_tnwg_opt_address, tvb, offset, opt_len, ENC_NA);
3141 opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_tnwg_address_opt);
3142 proto_tree_add_item(opt_tree, hf_lbmr_tnwg_opt_address_type, tvb, offset + O_LBMR_TNWG_OPT_ADDRESS_T_TYPE, L_LBMR_TNWG_OPT_ADDRESS_T_TYPE, ENC_BIG_ENDIAN);
3143 proto_tree_add_item(opt_tree, hf_lbmr_tnwg_opt_address_len, tvb, offset + O_LBMR_TNWG_OPT_ADDRESS_T_LEN, L_LBMR_TNWG_OPT_ADDRESS_T_LEN, ENC_BIG_ENDIAN);
3144 proto_tree_add_bitmask(opt_tree, tvb, offset + O_LBMR_TNWG_OPT_ADDRESS_T_FLAGS, hf_lbmr_tnwg_opt_address_flags, ett_lbmr_tnwg_address_opt_flags, flags, ENC_BIG_ENDIAN);
3145 proto_tree_add_item(opt_tree, hf_lbmr_tnwg_opt_address_port, tvb, offset + O_LBMR_TNWG_OPT_ADDRESS_T_PORT, L_LBMR_TNWG_OPT_ADDRESS_T_PORT, ENC_BIG_ENDIAN);
3146 proto_tree_add_item(opt_tree, hf_lbmr_tnwg_opt_address_res, tvb, offset + O_LBMR_TNWG_OPT_ADDRESS_T_RES, L_LBMR_TNWG_OPT_ADDRESS_T_RES, ENC_BIG_ENDIAN);
3147 proto_tree_add_item(opt_tree, hf_lbmr_tnwg_opt_address_ip, tvb, offset + O_LBMR_TNWG_OPT_ADDRESS_T_IP, L_LBMR_TNWG_OPT_ADDRESS_T_IP, ENC_BIG_ENDIAN);
3148 return ((int)opt_len);
3149 }
3150
dissect_lbmr_tnwg_domain_opt(tvbuff_t * tvb,int offset,packet_info * pinfo _U_,proto_tree * tree)3151 static int dissect_lbmr_tnwg_domain_opt(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
3152 {
3153 proto_tree * opt_tree = NULL;
3154 proto_item * opt_item = NULL;
3155 guint8 opt_len = 0;
3156 static int * const flags[] =
3157 {
3158 &hf_lbmr_tnwg_opt_domain_flags_ignore,
3159 NULL
3160 };
3161
3162 opt_len = tvb_get_guint8(tvb, offset + O_LBMR_TNWG_OPT_DOMAIN_T_LEN);
3163 opt_item = proto_tree_add_item(tree, hf_lbmr_tnwg_opt_domain, tvb, offset, opt_len, ENC_NA);
3164 opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_tnwg_domain_opt);
3165 proto_tree_add_item(opt_tree, hf_lbmr_tnwg_opt_domain_type, tvb, offset + O_LBMR_TNWG_OPT_DOMAIN_T_TYPE, L_LBMR_TNWG_OPT_DOMAIN_T_TYPE, ENC_BIG_ENDIAN);
3166 proto_tree_add_item(opt_tree, hf_lbmr_tnwg_opt_domain_len, tvb, offset + O_LBMR_TNWG_OPT_DOMAIN_T_LEN, L_LBMR_TNWG_OPT_DOMAIN_T_LEN, ENC_BIG_ENDIAN);
3167 proto_tree_add_bitmask(opt_tree, tvb, offset + O_LBMR_TNWG_OPT_DOMAIN_T_FLAGS, hf_lbmr_tnwg_opt_domain_flags, ett_lbmr_tnwg_domain_opt_flags, flags, ENC_BIG_ENDIAN);
3168 proto_tree_add_item(opt_tree, hf_lbmr_tnwg_opt_domain_domain_id, tvb, offset + O_LBMR_TNWG_OPT_DOMAIN_T_DOMAIN_ID, L_LBMR_TNWG_OPT_DOMAIN_T_DOMAIN_ID, ENC_BIG_ENDIAN);
3169 return ((int)opt_len);
3170 }
3171
dissect_lbmr_tnwg_name_opt(tvbuff_t * tvb,int offset,packet_info * pinfo _U_,proto_tree * tree)3172 static int dissect_lbmr_tnwg_name_opt(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
3173 {
3174 proto_tree * opt_tree = NULL;
3175 proto_item * opt_item = NULL;
3176 guint8 opt_len = 0;
3177 static int * const flags[] =
3178 {
3179 &hf_lbmr_tnwg_opt_name_flags_ignore,
3180 NULL
3181 };
3182 guint32 name_len = 0;
3183
3184 opt_len = tvb_get_guint8(tvb, offset + O_LBMR_TNWG_OPT_T_LEN);
3185 name_len = opt_len - L_LBMR_TNWG_OPT_T;
3186 opt_item = proto_tree_add_item(tree, hf_lbmr_tnwg_opt_name, tvb, offset, opt_len, ENC_NA);
3187 opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_tnwg_name_opt);
3188 proto_tree_add_item(opt_tree, hf_lbmr_tnwg_opt_name_type, tvb, offset + O_LBMR_TNWG_OPT_T_TYPE, L_LBMR_TNWG_OPT_T_TYPE, ENC_BIG_ENDIAN);
3189 proto_tree_add_item(opt_tree, hf_lbmr_tnwg_opt_name_len, tvb, offset + O_LBMR_TNWG_OPT_T_LEN, L_LBMR_TNWG_OPT_T_LEN, ENC_BIG_ENDIAN);
3190 proto_tree_add_bitmask(opt_tree, tvb, offset + O_LBMR_TNWG_OPT_T_FLAGS, hf_lbmr_tnwg_opt_name_flags, ett_lbmr_tnwg_name_opt_flags, flags, ENC_BIG_ENDIAN);
3191 proto_tree_add_item(opt_tree, hf_lbmr_tnwg_opt_name_name, tvb, offset + L_LBMR_TNWG_OPT_T, name_len, ENC_ASCII|ENC_NA);
3192 return ((int)opt_len);
3193 }
3194
dissect_lbmr_tnwg_unknown_opt(tvbuff_t * tvb,int offset,packet_info * pinfo _U_,proto_tree * tree)3195 static int dissect_lbmr_tnwg_unknown_opt(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
3196 {
3197 proto_tree * opt_tree = NULL;
3198 proto_item * opt_item = NULL;
3199 guint8 opt_len = 0;
3200 static int * const flags[] =
3201 {
3202 &hf_lbmr_tnwg_opt_flags_ignore,
3203 NULL
3204 };
3205 guint32 data_len = 0;
3206
3207 opt_len = tvb_get_guint8(tvb, offset + O_LBMR_TNWG_OPT_T_LEN);
3208 data_len = opt_len - L_LBMR_TNWG_OPT_T;
3209 opt_item = proto_tree_add_item(tree, hf_lbmr_tnwg_opt, tvb, offset, opt_len, ENC_NA);
3210 opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_tnwg_unknown_opt);
3211 proto_tree_add_item(opt_tree, hf_lbmr_tnwg_opt_type, tvb, offset + O_LBMR_TNWG_OPT_T_TYPE, L_LBMR_TNWG_OPT_T_TYPE, ENC_BIG_ENDIAN);
3212 proto_tree_add_item(opt_tree, hf_lbmr_tnwg_opt_len, tvb, offset + O_LBMR_TNWG_OPT_T_LEN, L_LBMR_TNWG_OPT_T_LEN, ENC_BIG_ENDIAN);
3213 proto_tree_add_bitmask(opt_tree, tvb, offset + O_LBMR_TNWG_OPT_T_FLAGS, hf_lbmr_tnwg_opt_flags, ett_lbmr_tnwg_unknown_opt_flags, flags, ENC_BIG_ENDIAN);
3214 proto_tree_add_item(opt_tree, hf_lbmr_tnwg_opt_data, tvb, offset + L_LBMR_TNWG_OPT_T, data_len, ENC_NA);
3215 return ((int)opt_len);
3216 }
3217
dissect_lbmr_tnwg_opts(tvbuff_t * tvb,int offset,int length,packet_info * pinfo,proto_tree * tree)3218 static int dissect_lbmr_tnwg_opts(tvbuff_t * tvb, int offset, int length, packet_info * pinfo, proto_tree * tree)
3219 {
3220 int len_remaining = length;
3221 int curr_offset = offset;
3222 int dissected_len = 0;
3223 guint8 type = 0;
3224 int len_used = 0;
3225
3226 while (len_remaining >= L_LBMR_TNWG_OPT_T)
3227 {
3228 type = tvb_get_guint8(tvb, curr_offset);
3229 switch (type)
3230 {
3231 case LBMR_TNWG_OPT_CTXINST_TYPE:
3232 dissected_len += dissect_lbmr_tnwg_ctxinst_opt(tvb, curr_offset, pinfo, tree);
3233 break;
3234 case LBMR_TNWG_OPT_ADDRESS_TYPE:
3235 dissected_len += dissect_lbmr_tnwg_address_opt(tvb, curr_offset, pinfo, tree);
3236 break;
3237 case LBMR_TNWG_OPT_DOMAIN_TYPE:
3238 dissected_len += dissect_lbmr_tnwg_domain_opt(tvb, curr_offset, pinfo, tree);
3239 break;
3240 case LBMR_TNWG_OPT_NAME_TYPE:
3241 dissected_len += dissect_lbmr_tnwg_name_opt(tvb, curr_offset, pinfo, tree);
3242 break;
3243 default:
3244 dissected_len += dissect_lbmr_tnwg_unknown_opt(tvb, curr_offset, pinfo, tree);
3245 break;
3246 }
3247 len_remaining -= dissected_len;
3248 len_used += dissected_len;
3249 curr_offset += dissected_len;
3250 }
3251 return (len_used);
3252 }
3253
3254 /*----------------------------------------------------------------------------*/
3255 /* LBMR TNWG Interest dissection functions. */
3256 /*----------------------------------------------------------------------------*/
dissect_lbmr_tnwg_interest_rec(tvbuff_t * tvb,int offset,packet_info * pinfo _U_,proto_tree * tree)3257 static int dissect_lbmr_tnwg_interest_rec(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
3258 {
3259 proto_tree * rec_tree = NULL;
3260 proto_item * rec_item = NULL;
3261 guint16 rec_len = 0;
3262 gint string_len = 0;
3263 static int * const flags[] =
3264 {
3265 &hf_lbmr_tnwg_interest_rec_flags_pattern,
3266 &hf_lbmr_tnwg_interest_rec_flags_cancel,
3267 &hf_lbmr_tnwg_interest_rec_flags_refresh,
3268 NULL
3269 };
3270
3271 rec_len = tvb_get_ntohs(tvb, offset + O_LBMR_TNWG_INTEREST_REC_T_LEN);
3272
3273 rec_item = proto_tree_add_item(tree, hf_lbmr_tnwg_interest_rec, tvb, offset, rec_len, ENC_NA);
3274 rec_tree = proto_item_add_subtree(rec_item, ett_lbmr_tnwg_interest_rec);
3275 proto_tree_add_item(rec_tree, hf_lbmr_tnwg_interest_rec_len, tvb, offset + O_LBMR_TNWG_INTEREST_REC_T_LEN, L_LBMR_TNWG_INTEREST_REC_T_LEN, ENC_BIG_ENDIAN);
3276 if (rec_len < L_LBMR_TNWG_INTEREST_REC_T)
3277 {
3278 /* XXX - report an error */
3279 return ((int)rec_len);
3280 }
3281 proto_tree_add_bitmask(rec_tree, tvb, offset + O_LBMR_TNWG_INTEREST_REC_T_FLAGS, hf_lbmr_tnwg_interest_rec_flags, ett_lbmr_tnwg_interest_rec_flags, flags, ENC_BIG_ENDIAN);
3282 proto_tree_add_item(rec_tree, hf_lbmr_tnwg_interest_rec_pattype, tvb, offset + O_LBMR_TNWG_INTEREST_REC_T_PATTYPE, L_LBMR_TNWG_INTEREST_REC_T_PATTYPE, ENC_BIG_ENDIAN);
3283 proto_tree_add_item(rec_tree, hf_lbmr_tnwg_interest_rec_domain_id, tvb, offset + O_LBMR_TNWG_INTEREST_REC_T_DOMAIN_ID, L_LBMR_TNWG_INTEREST_REC_T_DOMAIN_ID, ENC_BIG_ENDIAN);
3284 string_len = rec_len - L_LBMR_TNWG_INTEREST_REC_T;
3285 proto_tree_add_item(rec_tree, hf_lbmr_tnwg_interest_rec_symbol, tvb, offset + L_LBMR_TNWG_INTEREST_REC_T, string_len, ENC_ASCII|ENC_NA);
3286 return ((int)rec_len);
3287 }
3288
dissect_lbmr_tnwg_interest(tvbuff_t * tvb,int offset,packet_info * pinfo,proto_tree * tree)3289 static int dissect_lbmr_tnwg_interest(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tree)
3290 {
3291 proto_tree * int_tree = NULL;
3292 proto_item * int_item = NULL;
3293 guint16 rec_count = 0;
3294 int curr_offset = 0;
3295 int len = 0;
3296 int len_remaining = 0;
3297 int len_dissected = 0;
3298
3299 len_remaining = tvb_get_ntohs(tvb, offset + O_LBMR_TNWG_INTEREST_T_LEN);
3300 rec_count = tvb_get_ntohs(tvb, offset + O_LBMR_TNWG_INTEREST_T_COUNT);
3301 int_item = proto_tree_add_item(tree, hf_lbmr_tnwg_interest, tvb, offset, len_remaining, ENC_NA);
3302 int_tree = proto_item_add_subtree(int_item, ett_lbmr_tnwg_interest);
3303 proto_tree_add_item(int_tree, hf_lbmr_tnwg_interest_len, tvb, offset + O_LBMR_TNWG_INTEREST_T_LEN, L_LBMR_TNWG_INTEREST_T_LEN, ENC_BIG_ENDIAN);
3304 proto_tree_add_item(int_tree, hf_lbmr_tnwg_interest_count, tvb, offset + O_LBMR_TNWG_INTEREST_T_COUNT, L_LBMR_TNWG_INTEREST_T_COUNT, ENC_BIG_ENDIAN);
3305
3306 curr_offset = offset + L_LBMR_TNWG_INTEREST_T;
3307 len = L_LBMR_TNWG_INTEREST_T;
3308 while (rec_count > 0)
3309 {
3310 len_dissected = dissect_lbmr_tnwg_interest_rec(tvb, curr_offset, pinfo, int_tree);
3311 curr_offset += len_dissected;
3312 len += len_dissected;
3313 rec_count--;
3314 }
3315 return (len);
3316 }
3317
3318 /*----------------------------------------------------------------------------*/
3319 /* LBMR TNWG ContextInfo dissection functions. */
3320 /*----------------------------------------------------------------------------*/
dissect_lbmr_tnwg_ctxinfo(tvbuff_t * tvb,int offset,packet_info * pinfo,proto_tree * tree)3321 static int dissect_lbmr_tnwg_ctxinfo(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tree)
3322 {
3323 proto_tree * ctxinfo_tree = NULL;
3324 proto_item * ctxinfo_item = NULL;
3325 static int * const flags1[] =
3326 {
3327 &hf_lbmr_tnwg_ctxinfo_flags1_query,
3328 &hf_lbmr_tnwg_ctxinfo_flags1_tnwg_src,
3329 &hf_lbmr_tnwg_ctxinfo_flags1_tnwg_rcv,
3330 &hf_lbmr_tnwg_ctxinfo_flags1_proxy,
3331 NULL
3332 };
3333 guint16 reclen = 0;
3334 guint16 len_remaining = 0;
3335 int len_used = 0;
3336
3337 reclen = tvb_get_ntohs(tvb, offset + O_LBMR_TNWG_CTXINFO_T_LEN);
3338 len_remaining = reclen;
3339 ctxinfo_item = proto_tree_add_item(tree, hf_lbmr_tnwg_ctxinfo, tvb, offset, (gint)reclen, ENC_NA);
3340 ctxinfo_tree = proto_item_add_subtree(ctxinfo_item, ett_lbmr_tnwg_ctxinfo);
3341 proto_tree_add_item(ctxinfo_tree, hf_lbmr_tnwg_ctxinfo_len, tvb, offset + O_LBMR_TNWG_CTXINFO_T_LEN, L_LBMR_TNWG_CTXINFO_T_LEN, ENC_BIG_ENDIAN);
3342 proto_tree_add_item(ctxinfo_tree, hf_lbmr_tnwg_ctxinfo_hop_count, tvb, offset + O_LBMR_TNWG_CTXINFO_T_HOP_COUNT, L_LBMR_TNWG_CTXINFO_T_HOP_COUNT, ENC_BIG_ENDIAN);
3343 proto_tree_add_item(ctxinfo_tree, hf_lbmr_tnwg_ctxinfo_reserved, tvb, offset + O_LBMR_TNWG_CTXINFO_T_RESERVED, L_LBMR_TNWG_CTXINFO_T_RESERVED, ENC_BIG_ENDIAN);
3344 proto_tree_add_bitmask(ctxinfo_tree, tvb, offset + O_LBMR_TNWG_CTXINFO_T_FLAGS1, hf_lbmr_tnwg_ctxinfo_flags1, ett_lbmr_tnwg_ctxinfo_flags1, flags1, ENC_BIG_ENDIAN);
3345 proto_tree_add_item(ctxinfo_tree, hf_lbmr_tnwg_ctxinfo_flags2, tvb, offset + O_LBMR_TNWG_CTXINFO_T_FLAGS2, L_LBMR_TNWG_CTXINFO_T_FLAGS2, ENC_BIG_ENDIAN);
3346 offset += L_LBMR_TNWG_CTXINFO_T;
3347 len_remaining -= L_LBMR_TNWG_CTXINFO_T;
3348 len_used = L_LBMR_TNWG_CTXINFO_T;
3349 if (len_remaining >= L_LBMR_TNWG_OPT_T)
3350 {
3351 len_used += dissect_lbmr_tnwg_opts(tvb, offset, len_remaining, pinfo, ctxinfo_tree);
3352 }
3353 return (len_used);
3354 }
3355
3356 /*----------------------------------------------------------------------------*/
3357 /* LBMR TNWG TopicRes Request dissection functions. */
3358 /*----------------------------------------------------------------------------*/
dissect_lbmr_tnwg_trreq(tvbuff_t * tvb,int offset,packet_info * pinfo,proto_tree * tree)3359 static int dissect_lbmr_tnwg_trreq(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tree)
3360 {
3361 proto_tree * trreq_tree = NULL;
3362 proto_item * trreq_item = NULL;
3363 guint16 reclen = 0;
3364 guint16 len_remaining = 0;
3365 int len_used = 0;
3366
3367 reclen = tvb_get_ntohs(tvb, offset + O_LBMR_TNWG_TRREQ_T_LEN);
3368 len_remaining = reclen;
3369
3370 trreq_item = proto_tree_add_item(tree, hf_lbmr_tnwg_trreq, tvb, offset, (gint)reclen, ENC_NA);
3371 trreq_tree = proto_item_add_subtree(trreq_item, ett_lbmr_tnwg_trreq);
3372 proto_tree_add_item(trreq_tree, hf_lbmr_tnwg_trreq_len, tvb, offset + O_LBMR_TNWG_TRREQ_T_LEN, L_LBMR_TNWG_TRREQ_T_LEN, ENC_BIG_ENDIAN);
3373
3374 offset += L_LBMR_TNWG_TRREQ_T;
3375 len_remaining -= L_LBMR_TNWG_TRREQ_T;
3376 len_used = L_LBMR_TNWG_TRREQ_T;
3377 if (len_remaining >= L_LBMR_TNWG_OPT_T)
3378 {
3379 len_used += dissect_lbmr_tnwg_opts(tvb, offset, len_remaining, pinfo, trreq_tree);
3380 }
3381 return (len_used);
3382 }
3383
3384 /*----------------------------------------------------------------------------*/
3385 /* LBMR TNWG dissection functions. */
3386 /*----------------------------------------------------------------------------*/
dissect_lbmr_tnwg(tvbuff_t * tvb,int offset,packet_info * pinfo,proto_tree * tree)3387 static int dissect_lbmr_tnwg(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tree)
3388 {
3389 guint16 type = 0;
3390 int curr_offset = 0;
3391 int len_dissected = 0;
3392 proto_item * type_item = NULL;
3393
3394 type = tvb_get_ntohs(tvb, offset + O_LBMR_TNWG_T_TYPE);
3395 proto_tree_add_item(tree, hf_lbmr_tnwg_len, tvb, offset + O_LBMR_TNWG_T_LEN, L_LBMR_TNWG_T_LEN, ENC_BIG_ENDIAN);
3396 type_item = proto_tree_add_item(tree, hf_lbmr_tnwg_type, tvb, offset + O_LBMR_TNWG_T_TYPE, L_LBMR_TNWG_T_TYPE, ENC_BIG_ENDIAN);
3397 proto_tree_add_item(tree, hf_lbmr_tnwg_reserved, tvb, offset + O_LBMR_TNWG_T_RESERVED, L_LBMR_TNWG_T_RESERVED, ENC_BIG_ENDIAN);
3398 len_dissected = L_LBMR_TNWG_T;
3399 curr_offset = offset + L_LBMR_TNWG_T;
3400 switch (type)
3401 {
3402 case LBMR_TNWG_TYPE_INTEREST:
3403 len_dissected += dissect_lbmr_tnwg_interest(tvb, curr_offset, pinfo, tree);
3404 break;
3405 case LBMR_TNWG_TYPE_CTXINFO:
3406 len_dissected += dissect_lbmr_tnwg_ctxinfo(tvb, curr_offset, pinfo, tree);
3407 break;
3408 case LBMR_TNWG_TYPE_TRREQ:
3409 len_dissected += dissect_lbmr_tnwg_trreq(tvb, curr_offset, pinfo, tree);
3410 break;
3411 default:
3412 expert_add_info_format(pinfo, type_item, &ei_lbmr_analysis_invalid_value, "Unknown LBMR TNWG type 0x%04x", type);
3413 break;
3414 }
3415 return ((int)len_dissected);
3416 }
3417
3418 /*----------------------------------------------------------------------------*/
3419 /* LBMR Topic Management dissection functions. */
3420 /*----------------------------------------------------------------------------*/
dissect_lbmr_tmr(tvbuff_t * tvb,int offset,packet_info * pinfo _U_,proto_tree * tree)3421 static int dissect_lbmr_tmr(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
3422 {
3423 gint namelen = 0;
3424 int name_offset = 0;
3425 char * name = NULL;
3426 proto_item * ti = NULL;
3427 proto_tree * tinfo_tree = NULL;
3428 static int * const flags[] =
3429 {
3430 &hf_lbmr_tmr_flags_response,
3431 &hf_lbmr_tmr_flags_wildcard_pcre,
3432 &hf_lbmr_tmr_flags_wildcard_regex,
3433 NULL
3434 };
3435 guint16 tmr_len;
3436 guint8 tmr_type;
3437 guint8 tmr_flags;
3438 const char * info_string = "";
3439
3440 tmr_len = tvb_get_ntohs(tvb, offset + O_LBMR_TMR_T_LEN);
3441 tmr_type = tvb_get_guint8(tvb, offset + O_LBMR_TMR_T_TYPE);
3442 tmr_flags = tvb_get_guint8(tvb, offset + O_LBMR_TMR_T_FLAGS);
3443 name_offset = offset + L_LBMR_TMR_T;
3444
3445 name = tvb_get_stringz_enc(wmem_packet_scope(), tvb, name_offset, &namelen, ENC_ASCII);
3446
3447 switch (tmr_type)
3448 {
3449 case LBMR_TMR_LEAVE_TOPIC:
3450 default:
3451 break;
3452 case LBMR_TMR_TOPIC_USE:
3453 if (tmr_flags & LBMR_TMR_FLAG_RESPONSE)
3454 {
3455 info_string = " Response";
3456 }
3457 else
3458 {
3459 info_string = " Query";
3460 }
3461 break;
3462 }
3463 ti = proto_tree_add_none_format(tree, hf_lbmr_tmr, tvb, offset, tmr_len, "%s: %s%s, Length %" G_GUINT16_FORMAT,
3464 name, val_to_str(tmr_type, lbmr_tmr_type, "Unknown (0x%02x)"), info_string, tmr_len);
3465 tinfo_tree = proto_item_add_subtree(ti, ett_lbmr_tmr);
3466 proto_tree_add_item(tinfo_tree, hf_lbmr_tmr_len, tvb, offset + O_LBMR_TMR_T_LEN, L_LBMR_TMR_T_LEN, ENC_BIG_ENDIAN);
3467 proto_tree_add_item(tinfo_tree, hf_lbmr_tmr_type, tvb, offset + O_LBMR_TMR_T_TYPE, L_LBMR_TMR_T_TYPE, ENC_BIG_ENDIAN);
3468 proto_tree_add_bitmask(tinfo_tree, tvb, offset + O_LBMR_TMR_T_FLAGS, hf_lbmr_tmr_flags, ett_lbmr_tmr_flags, flags, ENC_BIG_ENDIAN);
3469 proto_tree_add_item(tinfo_tree, hf_lbmr_tmr_name, tvb, name_offset, namelen, ENC_ASCII|ENC_NA);
3470 return ((int) tmr_len);
3471 }
3472
dissect_lbmr_tmb(tvbuff_t * tvb,int offset,packet_info * pinfo,proto_tree * tree)3473 static int dissect_lbmr_tmb(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tree)
3474 {
3475 int tmr_len = 0;
3476 proto_tree * tmb_tree = NULL;
3477 proto_item * ti = NULL;
3478 proto_tree * tmr_tree = NULL;
3479 proto_item * tmr_ti = NULL;
3480 int tmr_count = 0;
3481 guint16 tmrs;
3482 int len_dissected;
3483
3484 tmrs = tvb_get_ntohs(tvb, offset + O_LBMR_TMB_T_TMRS);
3485 ti = proto_tree_add_item(tree, hf_lbmr_tmb, tvb, offset, -1, ENC_NA);
3486 tmb_tree = proto_item_add_subtree(ti, ett_lbmr_tmb);
3487 proto_tree_add_item(tmb_tree, hf_lbmr_tmb_len, tvb, offset + O_LBMR_TMB_T_LEN, L_LBMR_TMB_T_LEN, ENC_BIG_ENDIAN);
3488 proto_tree_add_item(tmb_tree, hf_lbmr_tmb_tmrs, tvb, offset + O_LBMR_TMB_T_TMRS, L_LBMR_TMB_T_TMRS, ENC_BIG_ENDIAN);
3489 tmr_ti = proto_tree_add_item(tmb_tree, hf_lbmr_tmb_tmr_list, tvb, offset + L_LBMR_TMB_T, -1, ENC_NA);
3490 tmr_tree = proto_item_add_subtree(tmr_ti, ett_lbmr_tmrs);
3491
3492 offset += L_LBMR_TMB_T;
3493 len_dissected = L_LBMR_TMB_T;
3494 while (tmr_count < tmrs)
3495 {
3496 tmr_len = dissect_lbmr_tmr(tvb, offset, pinfo, tmr_tree);
3497 len_dissected += tmr_len;
3498 offset += tmr_len;
3499 tmr_count++;
3500 }
3501 return (len_dissected);
3502 }
3503
3504 /*----------------------------------------------------------------------------*/
3505 /* LBMR Topic Query Record dissection functions. */
3506 /*----------------------------------------------------------------------------*/
dissect_lbmr_tqr(tvbuff_t * tvb,int offset,packet_info * pinfo _U_,proto_tree * tree,gboolean wildcard_tqr,lbmr_contents_t * contents)3507 static int dissect_lbmr_tqr(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, gboolean wildcard_tqr, lbmr_contents_t * contents)
3508 {
3509 gint namelen = 0;
3510 guint reclen = 0;
3511 char * name = NULL;
3512 guint8 pattern_type;
3513 proto_item * tqr_item = NULL;
3514 proto_tree * tqr_tree = NULL;
3515 gint name_offset = offset;
3516
3517 if (wildcard_tqr)
3518 {
3519 pattern_type = tvb_get_guint8(tvb, offset);
3520 name_offset++;
3521 reclen++;
3522 }
3523 name = tvb_get_stringz_enc(wmem_packet_scope(), tvb, name_offset, &namelen, ENC_ASCII);
3524 reclen += namelen;
3525
3526 if (wildcard_tqr)
3527 {
3528 tqr_item = proto_tree_add_none_format(tree, hf_lbmr_tqr, tvb, offset, reclen, "Wildcard TQR: %s", name);
3529 }
3530 else
3531 {
3532 tqr_item = proto_tree_add_none_format(tree, hf_lbmr_tqr, tvb, offset, reclen, "TQR: %s", name);
3533 }
3534 tqr_tree = proto_item_add_subtree(tqr_item, ett_lbmr_tqr);
3535 if (wildcard_tqr)
3536 {
3537 proto_tree_add_item(tqr_tree, hf_lbmr_tqr_pattern_type, tvb, offset, 1, ENC_BIG_ENDIAN);
3538 proto_tree_add_item(tqr_tree, hf_lbmr_tqr_pattern, tvb, offset, namelen, ENC_ASCII|ENC_NA);
3539 add_contents_wctqr(contents, pattern_type, name);
3540 }
3541 else
3542 {
3543 proto_tree_add_item(tqr_tree, hf_lbmr_tqr_name, tvb, offset, namelen, ENC_ASCII|ENC_NA);
3544 add_contents_tqr(contents, name);
3545 }
3546 return (reclen);
3547 }
3548
dissect_lbmr_tqrs(tvbuff_t * tvb,int offset,guint8 tqr_count,packet_info * pinfo,proto_tree * tree,gboolean wildcard_tqr,lbmr_contents_t * contents)3549 static int dissect_lbmr_tqrs(tvbuff_t * tvb, int offset, guint8 tqr_count, packet_info * pinfo, proto_tree * tree,
3550 gboolean wildcard_tqr, lbmr_contents_t * contents)
3551 {
3552 int start_offset = 0;
3553 int tqr_len = 0;
3554 proto_tree * tqrs_tree = NULL;
3555 proto_item * ti = NULL;
3556 int len = 0;
3557
3558 start_offset = offset;
3559 if (wildcard_tqr)
3560 {
3561 ti = proto_tree_add_none_format(tree, hf_lbmr_tqrs, tvb, start_offset, -1, "Wildcard TQRs");
3562 }
3563 else
3564 {
3565 ti = proto_tree_add_none_format(tree, hf_lbmr_tqrs, tvb, start_offset, -1, "TQRs");
3566 }
3567 tqrs_tree = proto_item_add_subtree(ti, ett_lbmr_tqrs);
3568 while (tqr_count-- > 0)
3569 {
3570 tqr_len = dissect_lbmr_tqr(tvb, offset, pinfo, tqrs_tree, wildcard_tqr, contents);
3571 len += tqr_len;
3572 offset += tqr_len;
3573 }
3574 proto_item_set_len(ti, len);
3575 return (len);
3576 }
3577
3578 /*----------------------------------------------------------------------------*/
3579 /* LBMR Topic Information Record dissection functions. */
3580 /*----------------------------------------------------------------------------*/
dissect_lbmr_tir_options(tvbuff_t * tvb,int offset,packet_info * pinfo,proto_tree * tree)3581 static int dissect_lbmr_tir_options(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tree)
3582 {
3583 guint8 opt_type = 0;
3584 guint8 opt_len = 0;
3585 int opt_total_len = 0;
3586 int opt_remaining_len = 0;
3587 int curr_offset = offset;
3588 proto_item * oi = NULL;
3589 proto_tree * otree = NULL;
3590 proto_item * optlen_item = NULL;
3591 proto_tree * optlen_tree = NULL;
3592 static int * const opt_ume_flags[] =
3593 {
3594 &hf_lbmr_topt_ume_flags_ignore,
3595 &hf_lbmr_topt_ume_flags_latejoin,
3596 &hf_lbmr_topt_ume_flags_store,
3597 &hf_lbmr_topt_ume_flags_qccap,
3598 &hf_lbmr_topt_ume_flags_acktosrc,
3599 NULL
3600 };
3601 static int * const opt_ume_store_flags[] =
3602 {
3603 &hf_lbmr_topt_ume_store_flags_ignore,
3604 NULL
3605 };
3606 static int * const opt_ume_store_group_flags[] =
3607 {
3608 &hf_lbmr_topt_ume_store_group_flags_ignore,
3609 NULL
3610 };
3611 static int * const opt_latejoin_flags[] =
3612 {
3613 &hf_lbmr_topt_latejoin_flags_ignore,
3614 &hf_lbmr_topt_latejoin_flags_acktosrc,
3615 NULL
3616 };
3617 static int * const opt_umq_rcridx_flags[] =
3618 {
3619 &hf_lbmr_topt_umq_rcridx_flags_ignore,
3620 NULL
3621 };
3622 static int * const opt_umq_qinfo_flags[] =
3623 {
3624 &hf_lbmr_topt_umq_qinfo_flags_ignore,
3625 &hf_lbmr_topt_umq_qinfo_flags_queue,
3626 &hf_lbmr_topt_umq_qinfo_flags_rcvlisten,
3627 &hf_lbmr_topt_umq_qinfo_flags_control,
3628 &hf_lbmr_topt_umq_qinfo_flags_srcrcvlisten,
3629 &hf_lbmr_topt_umq_qinfo_flags_participants_only,
3630 NULL
3631 };
3632 static int * const opt_cost_flags[] =
3633 {
3634 &hf_lbmr_topt_cost_flags_ignore,
3635 NULL
3636 };
3637 static int * const opt_otid_flags[] =
3638 {
3639 &hf_lbmr_topt_otid_flags_ignore,
3640 NULL
3641 };
3642 static int * const opt_ctxinst_flags[] =
3643 {
3644 &hf_lbmr_topt_ctxinst_flags_ignore,
3645 NULL
3646 };
3647 static int * const opt_ctxinsts_flags[] =
3648 {
3649 &hf_lbmr_topt_ctxinsts_flags_ignore,
3650 NULL
3651 };
3652 static int * const opt_ulb_flags[] =
3653 {
3654 &hf_lbmr_topt_ulb_flags_ignore,
3655 NULL
3656 };
3657 static int * const opt_ctxinstq_flags[] =
3658 {
3659 &hf_lbmr_topt_ctxinstq_flags_ignore,
3660 NULL
3661 };
3662 static int * const opt_domain_id_flags[] =
3663 {
3664 &hf_lbmr_topt_domain_id_flags_ignore,
3665 NULL
3666 };
3667 static int * const opt_exfunc_flags[] =
3668 {
3669 &hf_lbmr_topt_exfunc_flags_ignore,
3670 NULL
3671 };
3672 static int * const opt_exfunc_functionality_flags[] =
3673 {
3674 &hf_lbmr_topt_exfunc_functionality_flags_ulb,
3675 &hf_lbmr_topt_exfunc_functionality_flags_umq,
3676 &hf_lbmr_topt_exfunc_functionality_flags_ume,
3677 &hf_lbmr_topt_exfunc_functionality_flags_lj,
3678 NULL
3679 };
3680 int len = 0;
3681
3682 opt_total_len = (int)tvb_get_ntohs(tvb, curr_offset + O_LBMR_TOPIC_OPT_LEN_T_TOTAL_LEN);
3683 opt_remaining_len = opt_total_len;
3684
3685 oi = proto_tree_add_none_format(tree, hf_lbmr_topts, tvb, curr_offset, opt_total_len, "Options: %d bytes", opt_total_len);
3686 otree = proto_item_add_subtree(oi, ett_lbmr_topts);
3687 optlen_item = proto_tree_add_item(otree, hf_lbmr_topt_len, tvb, curr_offset, L_LBMR_TOPIC_OPT_LEN_T, ENC_NA);
3688 optlen_tree = proto_item_add_subtree(optlen_item, ett_lbmr_topt_len);
3689 proto_tree_add_item(optlen_tree, hf_lbmr_topt_len_type, tvb, curr_offset + O_LBMR_TOPIC_OPT_LEN_T_TYPE, L_LBMR_TOPIC_OPT_LEN_T_TYPE, ENC_BIG_ENDIAN);
3690 proto_tree_add_item(optlen_tree, hf_lbmr_topt_len_len, tvb, curr_offset + O_LBMR_TOPIC_OPT_LEN_T_LEN, L_LBMR_TOPIC_OPT_LEN_T_LEN, ENC_BIG_ENDIAN);
3691 proto_tree_add_item(optlen_tree, hf_lbmr_topt_len_total_len, tvb, curr_offset + O_LBMR_TOPIC_OPT_LEN_T_TOTAL_LEN, L_LBMR_TOPIC_OPT_LEN_T_TOTAL_LEN, ENC_BIG_ENDIAN);
3692 len = L_LBMR_TOPIC_OPT_LEN_T;
3693 curr_offset += L_LBMR_TOPIC_OPT_LEN_T;
3694 opt_remaining_len -= L_LBMR_TOPIC_OPT_LEN_T;
3695 while (opt_remaining_len > 0)
3696 {
3697 proto_item * opt_item = NULL;
3698 proto_tree * opt_tree = NULL;
3699 proto_item * ei_item = NULL;
3700 int qname_len;
3701
3702 opt_type = tvb_get_guint8(tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE);
3703 opt_len = tvb_get_guint8(tvb, curr_offset + O_LBMR_TOPIC_OPT_T_LEN);
3704 if (opt_len == 0)
3705 {
3706 opt_item = proto_tree_add_item(otree, hf_lbmr_topt_unknown, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE, opt_len, ENC_NA);
3707 opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_topt_unknown);
3708 proto_tree_add_item(opt_tree, hf_lbmr_topt_unknown_type, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE, L_LBMR_TOPIC_OPT_T_TYPE, ENC_BIG_ENDIAN);
3709 ei_item = proto_tree_add_item(opt_tree, hf_lbmr_topt_unknown_len, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_LEN, L_LBMR_TOPIC_OPT_T_LEN, ENC_BIG_ENDIAN);
3710 proto_tree_add_item(opt_tree, hf_lbmr_topt_unknown_flags, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_FLAGS, L_LBMR_TOPIC_OPT_T_FLAGS, ENC_BIG_ENDIAN);
3711 if (((int) opt_len) > L_LBMR_TOPIC_OPT_T)
3712 {
3713 proto_tree_add_item(opt_tree, hf_lbmr_topt_unknown_data, tvb, curr_offset + L_LBMR_TOPIC_OPT_T, ((int) opt_len) - L_LBMR_TOPIC_OPT_T, ENC_NA);
3714 }
3715 expert_add_info_format(pinfo, ei_item, &ei_lbmr_analysis_zero_len_option, "Zero-length LBMR option");
3716 return (len);
3717 }
3718 switch (opt_type)
3719 {
3720 case LBMR_TOPIC_OPT_UME_TYPE:
3721 opt_item = proto_tree_add_item(otree, hf_lbmr_topt_ume, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE, opt_len, ENC_NA);
3722 opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_topt_ume);
3723 proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_type, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_T_TYPE, L_LBMR_TOPIC_OPT_UME_T_TYPE, ENC_BIG_ENDIAN);
3724 proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_len, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_T_LEN, L_LBMR_TOPIC_OPT_UME_T_LEN, ENC_BIG_ENDIAN);
3725 proto_tree_add_bitmask(opt_tree, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_T_FLAGS, hf_lbmr_topt_ume_flags, ett_lbmr_topt_ume_flags, opt_ume_flags, ENC_BIG_ENDIAN);
3726 proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_store_tcp_port, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_T_STORE_TCP_PORT, L_LBMR_TOPIC_OPT_UME_T_STORE_TCP_PORT, ENC_BIG_ENDIAN);
3727 proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_src_tcp_port, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_T_SRC_TCP_PORT, L_LBMR_TOPIC_OPT_UME_T_SRC_TCP_PORT, ENC_BIG_ENDIAN);
3728 proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_store_tcp_addr, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_T_STORE_TCP_ADDR, L_LBMR_TOPIC_OPT_UME_T_STORE_TCP_ADDR, ENC_BIG_ENDIAN);
3729 proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_src_tcp_addr, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_T_SRC_TCP_ADDR, L_LBMR_TOPIC_OPT_UME_T_SRC_TCP_ADDR, ENC_BIG_ENDIAN);
3730 proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_src_reg_id, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_T_SRC_REG_ID, L_LBMR_TOPIC_OPT_UME_T_SRC_REG_ID, ENC_BIG_ENDIAN);
3731 proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_transport_idx, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_T_TRANSPORT_IDX, L_LBMR_TOPIC_OPT_UME_T_TRANSPORT_IDX, ENC_BIG_ENDIAN);
3732 proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_high_seqnum, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_T_HIGH_SEQNUM, L_LBMR_TOPIC_OPT_UME_T_HIGH_SEQNUM, ENC_BIG_ENDIAN);
3733 proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_low_seqnum, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_T_LOW_SEQNUM, L_LBMR_TOPIC_OPT_UME_T_LOW_SEQNUM, ENC_BIG_ENDIAN);
3734 break;
3735 case LBMR_TOPIC_OPT_UME_STORE_TYPE:
3736 opt_item = proto_tree_add_item(otree, hf_lbmr_topt_ume_store, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE, opt_len, ENC_NA);
3737 opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_topt_ume_store);
3738 proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_store_type, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_STORE_T_TYPE, L_LBMR_TOPIC_OPT_UME_STORE_T_TYPE, ENC_BIG_ENDIAN);
3739 proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_store_len, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_STORE_T_LEN, L_LBMR_TOPIC_OPT_UME_STORE_T_LEN, ENC_BIG_ENDIAN);
3740 proto_tree_add_bitmask(opt_tree, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_STORE_T_FLAGS, hf_lbmr_topt_ume_store_flags, ett_lbmr_topt_ume_store_flags, opt_ume_store_flags, ENC_BIG_ENDIAN);
3741 proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_store_grp_idx, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_STORE_T_GRP_IDX, L_LBMR_TOPIC_OPT_UME_STORE_T_GRP_IDX, ENC_BIG_ENDIAN);
3742 proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_store_store_tcp_port, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_STORE_T_STORE_TCP_PORT, L_LBMR_TOPIC_OPT_UME_STORE_T_STORE_TCP_PORT, ENC_BIG_ENDIAN);
3743 proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_store_store_idx, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_STORE_T_STORE_IDX, L_LBMR_TOPIC_OPT_UME_STORE_T_STORE_IDX, ENC_BIG_ENDIAN);
3744 proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_store_store_ip_addr, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_STORE_T_STORE_IP_ADDR, L_LBMR_TOPIC_OPT_UME_STORE_T_STORE_IP_ADDR, ENC_BIG_ENDIAN);
3745 proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_store_src_reg_id, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_STORE_T_SRC_REG_ID, L_LBMR_TOPIC_OPT_UME_STORE_T_SRC_REG_ID, ENC_BIG_ENDIAN);
3746 break;
3747 case LBMR_TOPIC_OPT_UME_STORE_GROUP_TYPE:
3748 opt_item = proto_tree_add_item(otree, hf_lbmr_topt_ume_store_group, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE, opt_len, ENC_NA);
3749 opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_topt_ume_store_group);
3750 proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_store_group_type, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_TYPE, L_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_TYPE, ENC_BIG_ENDIAN);
3751 proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_store_group_len, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_LEN, L_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_LEN, ENC_BIG_ENDIAN);
3752 proto_tree_add_bitmask(opt_tree, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_FLAGS, hf_lbmr_topt_ume_store_group_flags, ett_lbmr_topt_ume_store_group_flags, opt_ume_store_group_flags, ENC_BIG_ENDIAN);
3753 proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_store_group_grp_idx, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_GRP_IDX, L_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_GRP_IDX, ENC_BIG_ENDIAN);
3754 proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_store_group_grp_sz, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_GRP_SZ, L_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_GRP_SZ, ENC_BIG_ENDIAN);
3755 proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_store_group_reserved, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_RESERVED, L_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_RESERVED, ENC_BIG_ENDIAN);
3756 break;
3757 case LBMR_TOPIC_OPT_LATEJOIN_TYPE:
3758 opt_item = proto_tree_add_item(otree, hf_lbmr_topt_latejoin, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE, opt_len, ENC_NA);
3759 opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_topt_latejoin);
3760 proto_tree_add_item(opt_tree, hf_lbmr_topt_latejoin_type, tvb, curr_offset + O_LBMR_TOPIC_OPT_LATEJOIN_T_TYPE, L_LBMR_TOPIC_OPT_LATEJOIN_T_TYPE, ENC_BIG_ENDIAN);
3761 proto_tree_add_item(opt_tree, hf_lbmr_topt_latejoin_len, tvb, curr_offset + O_LBMR_TOPIC_OPT_LATEJOIN_T_LEN, L_LBMR_TOPIC_OPT_LATEJOIN_T_LEN, ENC_BIG_ENDIAN);
3762 proto_tree_add_bitmask(opt_tree, tvb, curr_offset + O_LBMR_TOPIC_OPT_LATEJOIN_T_FLAGS, hf_lbmr_topt_latejoin_flags, ett_lbmr_topt_latejoin_flags, opt_latejoin_flags, ENC_BIG_ENDIAN);
3763 proto_tree_add_item(opt_tree, hf_lbmr_topt_latejoin_src_tcp_port, tvb, curr_offset + O_LBMR_TOPIC_OPT_LATEJOIN_T_SRC_TCP_PORT, L_LBMR_TOPIC_OPT_LATEJOIN_T_SRC_TCP_PORT, ENC_BIG_ENDIAN);
3764 proto_tree_add_item(opt_tree, hf_lbmr_topt_latejoin_reserved, tvb, curr_offset + O_LBMR_TOPIC_OPT_LATEJOIN_T_RESERVED, L_LBMR_TOPIC_OPT_LATEJOIN_T_RESERVED, ENC_BIG_ENDIAN);
3765 proto_tree_add_item(opt_tree, hf_lbmr_topt_latejoin_src_ip_addr, tvb, curr_offset + O_LBMR_TOPIC_OPT_LATEJOIN_T_SRC_IP_ADDR, L_LBMR_TOPIC_OPT_LATEJOIN_T_SRC_IP_ADDR, ENC_BIG_ENDIAN);
3766 proto_tree_add_item(opt_tree, hf_lbmr_topt_latejoin_transport_idx, tvb, curr_offset + O_LBMR_TOPIC_OPT_LATEJOIN_T_TRANSPORT_IDX, L_LBMR_TOPIC_OPT_LATEJOIN_T_TRANSPORT_IDX, ENC_BIG_ENDIAN);
3767 proto_tree_add_item(opt_tree, hf_lbmr_topt_latejoin_high_seqnum, tvb, curr_offset + O_LBMR_TOPIC_OPT_LATEJOIN_T_HIGH_SEQNUM, L_LBMR_TOPIC_OPT_LATEJOIN_T_HIGH_SEQNUM, ENC_BIG_ENDIAN);
3768 proto_tree_add_item(opt_tree, hf_lbmr_topt_latejoin_low_seqnum, tvb, curr_offset + O_LBMR_TOPIC_OPT_LATEJOIN_T_LOW_SEQNUM, L_LBMR_TOPIC_OPT_LATEJOIN_T_LOW_SEQNUM, ENC_BIG_ENDIAN);
3769 break;
3770 case LBMR_TOPIC_OPT_UMQ_RCRIDX_TYPE:
3771 opt_item = proto_tree_add_item(otree, hf_lbmr_topt_umq_rcridx, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE, opt_len, ENC_NA);
3772 opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_topt_umq_rcridx);
3773 proto_tree_add_item(opt_tree, hf_lbmr_topt_umq_rcridx_type, tvb, curr_offset + O_LBMR_TOPIC_OPT_UMQ_RCRIDX_T_TYPE, L_LBMR_TOPIC_OPT_UMQ_RCRIDX_T_TYPE, ENC_BIG_ENDIAN);
3774 proto_tree_add_item(opt_tree, hf_lbmr_topt_umq_rcridx_len, tvb, curr_offset + O_LBMR_TOPIC_OPT_UMQ_RCRIDX_T_LEN, L_LBMR_TOPIC_OPT_UMQ_RCRIDX_T_LEN, ENC_BIG_ENDIAN);
3775 proto_tree_add_bitmask(opt_tree, tvb, curr_offset + O_LBMR_TOPIC_OPT_UMQ_RCRIDX_T_FLAGS, hf_lbmr_topt_umq_rcridx_flags, ett_lbmr_topt_umq_rcridx_flags, opt_umq_rcridx_flags, ENC_BIG_ENDIAN);
3776 proto_tree_add_item(opt_tree, hf_lbmr_topt_umq_rcridx_rcr_idx, tvb, curr_offset + O_LBMR_TOPIC_OPT_UMQ_RCRIDX_T_RCR_IDX, L_LBMR_TOPIC_OPT_UMQ_RCRIDX_T_RCR_IDX, ENC_BIG_ENDIAN);
3777 break;
3778 case LBMR_TOPIC_OPT_UMQ_QINFO_TYPE:
3779 opt_item = proto_tree_add_item(otree, hf_lbmr_topt_umq_qinfo, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE, opt_len, ENC_NA);
3780 opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_topt_umq_qinfo);
3781 proto_tree_add_item(opt_tree, hf_lbmr_topt_umq_qinfo_type, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE, L_LBMR_TOPIC_OPT_T_TYPE, ENC_BIG_ENDIAN);
3782 proto_tree_add_item(opt_tree, hf_lbmr_topt_umq_qinfo_len, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_LEN, L_LBMR_TOPIC_OPT_T_LEN, ENC_BIG_ENDIAN);
3783 qname_len = opt_len - L_LBMR_TOPIC_OPT_T;
3784 proto_tree_add_bitmask(opt_tree, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_FLAGS, hf_lbmr_topt_umq_qinfo_flags, ett_lbmr_topt_umq_qinfo_flags, opt_umq_qinfo_flags, ENC_BIG_ENDIAN);
3785 proto_tree_add_item(opt_tree, hf_lbmr_topt_umq_qinfo_queue, tvb, curr_offset + L_LBMR_TOPIC_OPT_T, qname_len, ENC_ASCII|ENC_NA);
3786 break;
3787 case LBMR_TOPIC_OPT_COST_TYPE:
3788 opt_item = proto_tree_add_item(otree, hf_lbmr_topt_cost, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE, opt_len, ENC_NA);
3789 opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_topt_cost);
3790 proto_tree_add_item(opt_tree, hf_lbmr_topt_cost_type, tvb, curr_offset + O_LBMR_TOPIC_OPT_COST_T_TYPE, L_LBMR_TOPIC_OPT_COST_T_TYPE, ENC_BIG_ENDIAN);
3791 proto_tree_add_item(opt_tree, hf_lbmr_topt_cost_len, tvb, curr_offset + O_LBMR_TOPIC_OPT_COST_T_LEN, L_LBMR_TOPIC_OPT_COST_T_LEN, ENC_BIG_ENDIAN);
3792 proto_tree_add_bitmask(opt_tree, tvb, curr_offset + O_LBMR_TOPIC_OPT_COST_T_FLAGS, hf_lbmr_topt_cost_flags, ett_lbmr_topt_cost_flags, opt_cost_flags, ENC_BIG_ENDIAN);
3793 proto_tree_add_item(opt_tree, hf_lbmr_topt_cost_hop_count, tvb, curr_offset + O_LBMR_TOPIC_OPT_COST_T_HOP_COUNT, L_LBMR_TOPIC_OPT_COST_T_HOP_COUNT, ENC_BIG_ENDIAN);
3794 proto_tree_add_item(opt_tree, hf_lbmr_topt_cost_cost, tvb, curr_offset + O_LBMR_TOPIC_OPT_COST_T_COST, L_LBMR_TOPIC_OPT_COST_T_COST, ENC_BIG_ENDIAN);
3795 break;
3796 case LBMR_TOPIC_OPT_OTID_TYPE:
3797 opt_item = proto_tree_add_item(otree, hf_lbmr_topt_otid, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE, opt_len, ENC_NA);
3798 opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_topt_otid);
3799 proto_tree_add_item(opt_tree, hf_lbmr_topt_otid_type, tvb, curr_offset + O_LBMR_TOPIC_OPT_OTID_T_TYPE, L_LBMR_TOPIC_OPT_OTID_T_TYPE, ENC_BIG_ENDIAN);
3800 proto_tree_add_item(opt_tree, hf_lbmr_topt_otid_len, tvb, curr_offset + O_LBMR_TOPIC_OPT_OTID_T_LEN, L_LBMR_TOPIC_OPT_OTID_T_LEN, ENC_BIG_ENDIAN);
3801 proto_tree_add_bitmask(opt_tree, tvb, curr_offset + O_LBMR_TOPIC_OPT_OTID_T_FLAGS, hf_lbmr_topt_otid_flags, ett_lbmr_topt_otid_flags, opt_otid_flags, ENC_BIG_ENDIAN);
3802 proto_tree_add_item(opt_tree, hf_lbmr_topt_otid_originating_transport, tvb, curr_offset + O_LBMR_TOPIC_OPT_OTID_T_ORIGINATING_TRANSPORT, L_LBMR_TOPIC_OPT_OTID_T_ORIGINATING_TRANSPORT, ENC_NA);
3803 break;
3804 case LBMR_TOPIC_OPT_CTXINST_TYPE:
3805 opt_item = proto_tree_add_item(otree, hf_lbmr_topt_ctxinst, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE, opt_len, ENC_NA);
3806 opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_topt_ctxinst);
3807 proto_tree_add_item(opt_tree, hf_lbmr_topt_ctxinst_type, tvb, curr_offset + O_LBMR_TOPIC_OPT_CTXINST_T_TYPE, L_LBMR_TOPIC_OPT_CTXINST_T_TYPE, ENC_BIG_ENDIAN);
3808 proto_tree_add_item(opt_tree, hf_lbmr_topt_ctxinst_len, tvb, curr_offset + O_LBMR_TOPIC_OPT_CTXINST_T_LEN, L_LBMR_TOPIC_OPT_CTXINST_T_LEN, ENC_BIG_ENDIAN);
3809 proto_tree_add_bitmask(opt_tree, tvb, curr_offset + O_LBMR_TOPIC_OPT_CTXINST_T_FLAGS, hf_lbmr_topt_ctxinst_flags, ett_lbmr_topt_ctxinst_flags, opt_ctxinst_flags, ENC_BIG_ENDIAN);
3810 proto_tree_add_item(opt_tree, hf_lbmr_topt_ctxinst_res, tvb, curr_offset + O_LBMR_TOPIC_OPT_CTXINST_T_RES, L_LBMR_TOPIC_OPT_CTXINST_T_RES, ENC_BIG_ENDIAN);
3811 proto_tree_add_item(opt_tree, hf_lbmr_topt_ctxinst_ctxinst, tvb, curr_offset + O_LBMR_TOPIC_OPT_CTXINST_T_CTXINST, L_LBMR_TOPIC_OPT_CTXINST_T_CTXINST, ENC_NA);
3812 break;
3813 case LBMR_TOPIC_OPT_CTXINSTS_TYPE:
3814 opt_item = proto_tree_add_item(otree, hf_lbmr_topt_ctxinsts, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE, opt_len, ENC_NA);
3815 opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_topt_ctxinsts);
3816 proto_tree_add_item(opt_tree, hf_lbmr_topt_ctxinsts_type, tvb, curr_offset + O_LBMR_TOPIC_OPT_CTXINSTS_T_TYPE, L_LBMR_TOPIC_OPT_CTXINSTS_T_TYPE, ENC_BIG_ENDIAN);
3817 proto_tree_add_item(opt_tree, hf_lbmr_topt_ctxinsts_len, tvb, curr_offset + O_LBMR_TOPIC_OPT_CTXINSTS_T_LEN, L_LBMR_TOPIC_OPT_CTXINSTS_T_LEN, ENC_BIG_ENDIAN);
3818 proto_tree_add_bitmask(opt_tree, tvb, curr_offset + O_LBMR_TOPIC_OPT_CTXINSTS_T_FLAGS, hf_lbmr_topt_ctxinsts_flags, ett_lbmr_topt_ctxinsts_flags, opt_ctxinsts_flags, ENC_BIG_ENDIAN);
3819 proto_tree_add_item(opt_tree, hf_lbmr_topt_ctxinsts_idx, tvb, curr_offset + O_LBMR_TOPIC_OPT_CTXINSTS_T_IDX, L_LBMR_TOPIC_OPT_CTXINSTS_T_IDX, ENC_BIG_ENDIAN);
3820 proto_tree_add_item(opt_tree, hf_lbmr_topt_ctxinsts_ctxinst, tvb, curr_offset + O_LBMR_TOPIC_OPT_CTXINSTS_T_CTXINST, L_LBMR_TOPIC_OPT_CTXINSTS_T_CTXINST, ENC_NA);
3821 break;
3822 case LBMR_TOPIC_OPT_ULB_TYPE:
3823 opt_item = proto_tree_add_item(otree, hf_lbmr_topt_ulb, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE, opt_len, ENC_NA);
3824 opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_topt_ulb);
3825 proto_tree_add_item(opt_tree, hf_lbmr_topt_ulb_type, tvb, curr_offset + O_LBMR_TOPIC_OPT_ULB_T_TYPE, L_LBMR_TOPIC_OPT_ULB_T_TYPE, ENC_BIG_ENDIAN);
3826 proto_tree_add_item(opt_tree, hf_lbmr_topt_ulb_len, tvb, curr_offset + O_LBMR_TOPIC_OPT_ULB_T_LEN, L_LBMR_TOPIC_OPT_ULB_T_LEN, ENC_BIG_ENDIAN);
3827 proto_tree_add_bitmask(opt_tree, tvb, curr_offset + O_LBMR_TOPIC_OPT_ULB_T_FLAGS, hf_lbmr_topt_ulb_flags, ett_lbmr_topt_ulb_flags, opt_ulb_flags, ENC_BIG_ENDIAN);
3828 proto_tree_add_item(opt_tree, hf_lbmr_topt_ulb_queue_id, tvb, curr_offset + O_LBMR_TOPIC_OPT_ULB_T_QUEUE_ID, L_LBMR_TOPIC_OPT_ULB_T_QUEUE_ID, ENC_BIG_ENDIAN);
3829 proto_tree_add_item(opt_tree, hf_lbmr_topt_ulb_regid, tvb, curr_offset + O_LBMR_TOPIC_OPT_ULB_T_REGID, L_LBMR_TOPIC_OPT_ULB_T_REGID, ENC_BIG_ENDIAN);
3830 proto_tree_add_item(opt_tree, hf_lbmr_topt_ulb_ulb_src_id, tvb, curr_offset + O_LBMR_TOPIC_OPT_ULB_T_ULB_SRC_ID, L_LBMR_TOPIC_OPT_ULB_T_ULB_SRC_ID, ENC_BIG_ENDIAN);
3831 proto_tree_add_item(opt_tree, hf_lbmr_topt_ulb_src_ip_addr, tvb, curr_offset + O_LBMR_TOPIC_OPT_ULB_T_SRC_IP_ADDR, L_LBMR_TOPIC_OPT_ULB_T_SRC_IP_ADDR, ENC_BIG_ENDIAN);
3832 proto_tree_add_item(opt_tree, hf_lbmr_topt_ulb_src_tcp_port, tvb, curr_offset + O_LBMR_TOPIC_OPT_ULB_T_SRC_TCP_PORT, L_LBMR_TOPIC_OPT_ULB_T_SRC_TCP_PORT, ENC_BIG_ENDIAN);
3833 proto_tree_add_item(opt_tree, hf_lbmr_topt_ulb_reserved, tvb, curr_offset + O_LBMR_TOPIC_OPT_ULB_T_RESERVED, L_LBMR_TOPIC_OPT_ULB_T_RESERVED, ENC_BIG_ENDIAN);
3834 break;
3835 case LBMR_TOPIC_OPT_CTXINSTQ_TYPE:
3836 opt_item = proto_tree_add_item(otree, hf_lbmr_topt_ctxinstq, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE, opt_len, ENC_NA);
3837 opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_topt_ctxinstq);
3838 proto_tree_add_item(opt_tree, hf_lbmr_topt_ctxinstq_type, tvb, curr_offset + O_LBMR_TOPIC_OPT_CTXINSTQ_T_TYPE, L_LBMR_TOPIC_OPT_CTXINSTQ_T_TYPE, ENC_BIG_ENDIAN);
3839 proto_tree_add_item(opt_tree, hf_lbmr_topt_ctxinstq_len, tvb, curr_offset + O_LBMR_TOPIC_OPT_CTXINSTQ_T_LEN, L_LBMR_TOPIC_OPT_CTXINSTQ_T_LEN, ENC_BIG_ENDIAN);
3840 proto_tree_add_bitmask(opt_tree, tvb, curr_offset + O_LBMR_TOPIC_OPT_CTXINSTQ_T_FLAGS, hf_lbmr_topt_ctxinstq_flags, ett_lbmr_topt_ctxinstq_flags, opt_ctxinstq_flags, ENC_BIG_ENDIAN);
3841 proto_tree_add_item(opt_tree, hf_lbmr_topt_ctxinstq_idx, tvb, curr_offset + O_LBMR_TOPIC_OPT_CTXINSTQ_T_IDX, L_LBMR_TOPIC_OPT_CTXINSTQ_T_IDX, ENC_BIG_ENDIAN);
3842 proto_tree_add_item(opt_tree, hf_lbmr_topt_ctxinstq_ctxinst, tvb, curr_offset + O_LBMR_TOPIC_OPT_CTXINSTQ_T_CTXINST, L_LBMR_TOPIC_OPT_CTXINSTQ_T_CTXINST, ENC_NA);
3843 break;
3844 case LBMR_TOPIC_OPT_DOMAIN_ID_TYPE:
3845 opt_item = proto_tree_add_item(otree, hf_lbmr_topt_domain_id, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE, opt_len, ENC_NA);
3846 opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_topt_domain_id);
3847 proto_tree_add_item(opt_tree, hf_lbmr_topt_domain_id_type, tvb, curr_offset + O_LBMR_TOPIC_OPT_DOMAIN_ID_T_TYPE, L_LBMR_TOPIC_OPT_DOMAIN_ID_T_TYPE, ENC_BIG_ENDIAN);
3848 proto_tree_add_item(opt_tree, hf_lbmr_topt_domain_id_len, tvb, curr_offset + O_LBMR_TOPIC_OPT_DOMAIN_ID_T_LEN, L_LBMR_TOPIC_OPT_DOMAIN_ID_T_LEN, ENC_BIG_ENDIAN);
3849 proto_tree_add_bitmask(opt_tree, tvb, curr_offset + O_LBMR_TOPIC_OPT_DOMAIN_ID_T_FLAGS, hf_lbmr_topt_domain_id_flags, ett_lbmr_topt_domain_id_flags, opt_domain_id_flags, ENC_BIG_ENDIAN);
3850 proto_tree_add_item(opt_tree, hf_lbmr_topt_domain_id_domain_id, tvb, curr_offset + O_LBMR_TOPIC_OPT_DOMAIN_ID_T_DOMAIN_ID, L_LBMR_TOPIC_OPT_DOMAIN_ID_T_DOMAIN_ID, ENC_BIG_ENDIAN);
3851 break;
3852 case LBMR_TOPIC_OPT_EXFUNC_TYPE:
3853 opt_item = proto_tree_add_item(otree, hf_lbmr_topt_exfunc, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE, opt_len, ENC_NA);
3854 opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_topt_exfunc);
3855 proto_tree_add_item(opt_tree, hf_lbmr_topt_exfunc_type, tvb, curr_offset + O_LBMR_TOPIC_OPT_EXFUNC_T_TYPE, L_LBMR_TOPIC_OPT_EXFUNC_T_TYPE, ENC_BIG_ENDIAN);
3856 proto_tree_add_item(opt_tree, hf_lbmr_topt_exfunc_len, tvb, curr_offset + O_LBMR_TOPIC_OPT_EXFUNC_T_LEN, L_LBMR_TOPIC_OPT_EXFUNC_T_LEN, ENC_BIG_ENDIAN);
3857 proto_tree_add_bitmask(opt_tree, tvb, curr_offset + O_LBMR_TOPIC_OPT_EXFUNC_T_FLAGS, hf_lbmr_topt_exfunc_flags, ett_lbmr_topt_exfunc_flags, opt_exfunc_flags, ENC_BIG_ENDIAN);
3858 proto_tree_add_item(opt_tree, hf_lbmr_topt_exfunc_src_tcp_port, tvb, curr_offset + O_LBMR_TOPIC_OPT_EXFUNC_T_SRC_TCP_PORT, L_LBMR_TOPIC_OPT_EXFUNC_T_SRC_TCP_PORT, ENC_BIG_ENDIAN);
3859 proto_tree_add_item(opt_tree, hf_lbmr_topt_exfunc_reserved, tvb, curr_offset + O_LBMR_TOPIC_OPT_EXFUNC_T_RESERVED, L_LBMR_TOPIC_OPT_EXFUNC_T_RESERVED, ENC_BIG_ENDIAN);
3860 proto_tree_add_item(opt_tree, hf_lbmr_topt_exfunc_src_ip_addr, tvb, curr_offset + O_LBMR_TOPIC_OPT_EXFUNC_T_SRC_IP_ADDR, L_LBMR_TOPIC_OPT_EXFUNC_T_SRC_IP_ADDR, ENC_BIG_ENDIAN);
3861 proto_tree_add_bitmask(opt_tree, tvb, curr_offset + O_LBMR_TOPIC_OPT_EXFUNC_T_FUNCTIONALITY_FLAGS, hf_lbmr_topt_exfunc_functionality_flags, ett_lbmr_topt_exfunc_functionality_flags, opt_exfunc_functionality_flags, ENC_BIG_ENDIAN);
3862 break;
3863 default:
3864 opt_item = proto_tree_add_item(otree, hf_lbmr_topt_unknown, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE, opt_len, ENC_NA);
3865 opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_topt_unknown);
3866 ei_item = proto_tree_add_item(opt_tree, hf_lbmr_topt_unknown_type, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE, L_LBMR_TOPIC_OPT_T_TYPE, ENC_BIG_ENDIAN);
3867 proto_tree_add_item(opt_tree, hf_lbmr_topt_unknown_len, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_LEN, L_LBMR_TOPIC_OPT_T_LEN, ENC_BIG_ENDIAN);
3868 proto_tree_add_item(opt_tree, hf_lbmr_topt_unknown_flags, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_FLAGS, L_LBMR_TOPIC_OPT_T_FLAGS, ENC_BIG_ENDIAN);
3869 if (((int) opt_len) > L_LBMR_TOPIC_OPT_T)
3870 {
3871 proto_tree_add_item(opt_tree, hf_lbmr_topt_unknown_data, tvb, curr_offset + L_LBMR_TOPIC_OPT_T, ((int) opt_len) - L_LBMR_TOPIC_OPT_T, ENC_NA);
3872 }
3873 expert_add_info_format(pinfo, ei_item, &ei_lbmr_analysis_invalid_value, "Unknown option 0x%02x", opt_type);
3874 break;
3875 }
3876 len += opt_len;
3877 curr_offset += opt_len;
3878 opt_remaining_len -= opt_len;
3879 }
3880 return (opt_total_len);
3881 }
3882
dissect_lbmr_tir_transport(tvbuff_t * tvb,int offset,lbm_uint8_t transport,lbm_uint8_t transport_len,const char * topic_name,guint32 topic_index,packet_info * pinfo,proto_tree * tree,lbmr_contents_t * contents,proto_item * transport_len_item)3883 static int dissect_lbmr_tir_transport(tvbuff_t * tvb, int offset, lbm_uint8_t transport, lbm_uint8_t transport_len, const char * topic_name,
3884 guint32 topic_index, packet_info * pinfo, proto_tree * tree, lbmr_contents_t * contents, proto_item * transport_len_item)
3885 {
3886 int len = 0;
3887 guint64 channel;
3888 proto_item * channel_item = NULL;
3889 proto_item * ei_item = NULL;
3890
3891 switch (transport)
3892 {
3893 case LBMR_TRANSPORT_TCP:
3894 {
3895 guint16 port = 0;
3896 guint32 session_id = 0;
3897 proto_item * tcp_item = NULL;
3898 proto_tree * tcp_tree = NULL;
3899 lbttcp_transport_t * lbttcp_transport = NULL;
3900
3901 tcp_item = proto_tree_add_item(tree, hf_lbmr_tir_tcp, tvb, offset, (gint) transport_len, ENC_NA);
3902 tcp_tree = proto_item_add_subtree(tcp_item, ett_lbmr_tir_tcp);
3903 if ((transport_len != L_LBMR_TIR_TCP_T) && (transport_len != L_LBMR_TIR_TCP_WITH_SID_T))
3904 {
3905 expert_add_info_format(pinfo, transport_len_item, &ei_lbmr_analysis_length_incorrect, "Wrong transport length for LBMR TIR TCP info");
3906 return (0);
3907 }
3908 if (transport_len == L_LBMR_TIR_TCP_WITH_SID_T)
3909 {
3910 session_id = tvb_get_ntohl(tvb, offset + O_LBMR_TIR_TCP_WITH_SID_T_SESSION_ID);
3911 port = tvb_get_ntohs(tvb, offset + O_LBMR_TIR_TCP_WITH_SID_T_PORT);
3912 proto_tree_add_item(tcp_tree, hf_lbmr_tir_tcp_ip, tvb, offset + O_LBMR_TIR_TCP_WITH_SID_T_IP, L_LBMR_TIR_TCP_WITH_SID_T_IP, ENC_BIG_ENDIAN);
3913 proto_tree_add_item(tcp_tree, hf_lbmr_tir_tcp_session_id, tvb, offset + O_LBMR_TIR_TCP_WITH_SID_T_SESSION_ID, L_LBMR_TIR_TCP_WITH_SID_T_SESSION_ID, ENC_BIG_ENDIAN);
3914 proto_tree_add_item(tcp_tree, hf_lbmr_tir_tcp_port, tvb, offset + O_LBMR_TIR_TCP_WITH_SID_T_PORT, L_LBMR_TIR_TCP_WITH_SID_T_PORT, ENC_BIG_ENDIAN);
3915 len += L_LBMR_TIR_TCP_WITH_SID_T;
3916 }
3917 else
3918 {
3919 port = tvb_get_ntohs(tvb, offset + O_LBMR_TIR_TCP_T_PORT);
3920 proto_tree_add_item(tcp_tree, hf_lbmr_tir_tcp_ip, tvb, offset + O_LBMR_TIR_TCP_T_IP, L_LBMR_TIR_TCP_T_IP, ENC_BIG_ENDIAN);
3921 proto_tree_add_item(tcp_tree, hf_lbmr_tir_tcp_port, tvb, offset + O_LBMR_TIR_TCP_T_PORT, L_LBMR_TIR_TCP_T_PORT, ENC_BIG_ENDIAN);
3922 session_id = 0;
3923 len += L_LBMR_TIR_TCP_T;
3924 }
3925 lbttcp_transport = lbttcp_transport_add(&(pinfo->src), port, session_id, pinfo->num);
3926 channel = lbttcp_transport->channel;
3927 add_contents_tir(contents, topic_name, lbttcp_transport_source_string(&(pinfo->src), port, session_id), topic_index);
3928 }
3929 break;
3930 case LBMR_TRANSPORT_LBTRM:
3931 {
3932 guint16 src_ucast_port = 0;
3933 guint16 udp_dest_port = 0;
3934 guint32 session_id = 0;
3935 proto_item * lbtrm_item = NULL;
3936 proto_tree * lbtrm_tree = NULL;
3937 lbtrm_transport_t * lbtrm_transport = NULL;
3938 address multicast_group;
3939
3940 lbtrm_item = proto_tree_add_item(tree, hf_lbmr_tir_lbtrm, tvb, offset, (gint)transport_len, ENC_NA);
3941 lbtrm_tree = proto_item_add_subtree(lbtrm_item, ett_lbmr_tir_lbtrm);
3942 set_address_tvb(&multicast_group, AT_IPv4, L_LBMR_TIR_LBTRM_T_MCAST_ADDR, tvb, offset + O_LBMR_TIR_LBTRM_T_MCAST_ADDR);
3943 session_id = tvb_get_ntohl(tvb, offset + O_LBMR_TIR_LBTRM_T_SESSION_ID);
3944 udp_dest_port = tvb_get_ntohs(tvb, offset + O_LBMR_TIR_LBTRM_T_UDP_DEST_PORT);
3945 src_ucast_port = tvb_get_ntohs(tvb, offset + O_LBMR_TIR_LBTRM_T_SRC_UCAST_PORT);
3946 proto_tree_add_item(lbtrm_tree, hf_lbmr_tir_lbtrm_src_addr, tvb, offset + O_LBMR_TIR_LBTRM_T_SRC_ADDR, L_LBMR_TIR_LBTRM_T_SRC_ADDR, ENC_BIG_ENDIAN);
3947 proto_tree_add_item(lbtrm_tree, hf_lbmr_tir_lbtrm_mcast_addr, tvb, offset + O_LBMR_TIR_LBTRM_T_MCAST_ADDR, L_LBMR_TIR_LBTRM_T_MCAST_ADDR, ENC_BIG_ENDIAN);
3948 proto_tree_add_item(lbtrm_tree, hf_lbmr_tir_lbtrm_session_id, tvb, offset + O_LBMR_TIR_LBTRM_T_SESSION_ID, L_LBMR_TIR_LBTRM_T_SESSION_ID, ENC_BIG_ENDIAN);
3949 proto_tree_add_item(lbtrm_tree, hf_lbmr_tir_lbtrm_udp_dest_port, tvb, offset + O_LBMR_TIR_LBTRM_T_UDP_DEST_PORT, L_LBMR_TIR_LBTRM_T_UDP_DEST_PORT, ENC_BIG_ENDIAN);
3950 proto_tree_add_item(lbtrm_tree, hf_lbmr_tir_lbtrm_src_ucast_port, tvb, offset + O_LBMR_TIR_LBTRM_T_SRC_UCAST_PORT, L_LBMR_TIR_LBTRM_T_SRC_UCAST_PORT, ENC_BIG_ENDIAN);
3951 lbtrm_transport = lbtrm_transport_add(&(pinfo->src), src_ucast_port, session_id, &multicast_group, udp_dest_port, pinfo->num);
3952 channel = lbtrm_transport->channel;
3953 add_contents_tir(contents, topic_name, lbtrm_transport_source_string(&(pinfo->src), src_ucast_port, session_id, &multicast_group, udp_dest_port), topic_index);
3954 len += L_LBMR_TIR_LBTRM_T;
3955 if (transport_len != L_LBMR_TIR_LBTRM_T)
3956 {
3957 expert_add_info_format(pinfo, transport_len_item, &ei_lbmr_analysis_length_incorrect, "Wrong transport length for LBMR TIR LBTRM info");
3958 }
3959 }
3960 break;
3961 case LBMR_TRANSPORT_LBTRU:
3962 {
3963 guint32 session_id;
3964 guint16 port;
3965 proto_item * lbtru_item = NULL;
3966 proto_tree * lbtru_tree = NULL;
3967 lbtru_transport_t * lbtru_transport = NULL;
3968
3969 lbtru_item = proto_tree_add_item(tree, hf_lbmr_tir_lbtru, tvb, offset, (gint)transport_len, ENC_NA);
3970 lbtru_tree = proto_item_add_subtree(lbtru_item, ett_lbmr_tir_lbtru);
3971 if ((transport_len != L_LBMR_TIR_LBTRU_T) && (transport_len != L_LBMR_TIR_LBTRU_WITH_SID_T))
3972 {
3973 expert_add_info_format(pinfo, transport_len_item, &ei_lbmr_analysis_length_incorrect, "Wrong transport length for LBMR TIR LBTRU info");
3974 return (0);
3975 }
3976 if (transport_len == L_LBMR_TIR_LBTRU_WITH_SID_T)
3977 {
3978 session_id = tvb_get_ntohl(tvb, offset + O_LBMR_TIR_LBTRU_WITH_SID_T_SESSION_ID);
3979 port = tvb_get_ntohs(tvb, offset + O_LBMR_TIR_LBTRU_WITH_SID_T_PORT);
3980 proto_tree_add_item(lbtru_tree, hf_lbmr_tir_lbtru_ip, tvb, offset + O_LBMR_TIR_LBTRU_WITH_SID_T_IP, L_LBMR_TIR_LBTRU_WITH_SID_T_IP, ENC_BIG_ENDIAN);
3981 proto_tree_add_item(lbtru_tree, hf_lbmr_tir_lbtru_session_id, tvb, offset + O_LBMR_TIR_LBTRU_WITH_SID_T_SESSION_ID, L_LBMR_TIR_LBTRU_WITH_SID_T_SESSION_ID, ENC_BIG_ENDIAN);
3982 proto_tree_add_item(lbtru_tree, hf_lbmr_tir_lbtru_port, tvb, offset + O_LBMR_TIR_LBTRU_WITH_SID_T_PORT, L_LBMR_TIR_LBTRU_WITH_SID_T_PORT, ENC_BIG_ENDIAN);
3983 len += L_LBMR_TIR_LBTRU_WITH_SID_T;
3984 }
3985 else
3986 {
3987 session_id = 0;
3988 port = tvb_get_ntohs(tvb, offset + O_LBMR_TIR_LBTRU_T_PORT);
3989 proto_tree_add_item(lbtru_tree, hf_lbmr_tir_lbtru_ip, tvb, offset + O_LBMR_TIR_LBTRU_T_IP, L_LBMR_TIR_LBTRU_T_IP, ENC_BIG_ENDIAN);
3990 proto_tree_add_item(lbtru_tree, hf_lbmr_tir_lbtru_port, tvb, offset + O_LBMR_TIR_LBTRU_T_PORT, L_LBMR_TIR_LBTRU_T_PORT, ENC_BIG_ENDIAN);
3991 len += L_LBMR_TIR_LBTRU_T;
3992 }
3993 lbtru_transport = lbtru_transport_add(&(pinfo->src), port, session_id, pinfo->num);
3994 channel = lbtru_transport->channel;
3995 add_contents_tir(contents, topic_name, lbtru_transport_source_string(&(pinfo->src), port, session_id), topic_index);
3996 }
3997 break;
3998 case LBMR_TRANSPORT_LBTIPC:
3999 {
4000 guint32 host_id;
4001 guint32 session_id;
4002 guint16 xport_id;
4003 proto_item * lbtipc_item = NULL;
4004 proto_tree * lbtipc_tree = NULL;
4005 lbtipc_transport_t * lbtipc_transport = NULL;
4006
4007 lbtipc_item = proto_tree_add_item(tree, hf_lbmr_tir_lbtipc, tvb, offset, (gint)transport_len, ENC_NA);
4008 lbtipc_tree = proto_item_add_subtree(lbtipc_item, ett_lbmr_tir_lbtipc);
4009 if (transport_len != L_LBMR_TIR_LBTIPC_T)
4010 {
4011 expert_add_info_format(pinfo, transport_len_item, &ei_lbmr_analysis_length_incorrect, "Wrong transport length for LBMR TIR LBTIPC info");
4012 return (0);
4013 }
4014 host_id = tvb_get_ntohl(tvb, offset + O_LBMR_TIR_LBTIPC_T_HOST_ID);
4015 session_id = tvb_get_ntohl(tvb, offset + O_LBMR_TIR_LBTIPC_T_SESSION_ID);
4016 xport_id = tvb_get_ntohs(tvb, offset + O_LBMR_TIR_LBTIPC_T_XPORT_ID);
4017 proto_tree_add_item(lbtipc_tree, hf_lbmr_tir_lbtipc_host_id, tvb, offset + O_LBMR_TIR_LBTIPC_T_HOST_ID, L_LBMR_TIR_LBTIPC_T_HOST_ID, ENC_BIG_ENDIAN);
4018 proto_tree_add_item(lbtipc_tree, hf_lbmr_tir_lbtipc_session_id, tvb, offset + O_LBMR_TIR_LBTIPC_T_SESSION_ID, L_LBMR_TIR_LBTIPC_T_SESSION_ID, ENC_BIG_ENDIAN);
4019 proto_tree_add_item(lbtipc_tree, hf_lbmr_tir_lbtipc_xport_id, tvb, offset + O_LBMR_TIR_LBTIPC_T_XPORT_ID, L_LBMR_TIR_LBTIPC_T_XPORT_ID, ENC_BIG_ENDIAN);
4020 lbtipc_transport = lbtipc_transport_add(host_id, session_id, xport_id);
4021 channel = lbtipc_transport->channel;
4022 add_contents_tir(contents, topic_name, lbtipc_transport_source_string(host_id, session_id, xport_id), topic_index);
4023 len += L_LBMR_TIR_LBTIPC_T;
4024 }
4025 break;
4026 case LBMR_TRANSPORT_LBTRDMA:
4027 {
4028 guint32 session_id;
4029 guint16 port;
4030 proto_item * lbtrdma_item = NULL;
4031 proto_tree * lbtrdma_tree = NULL;
4032 lbtrdma_transport_t * lbtrdma_transport = NULL;
4033 address source_addr;
4034
4035 lbtrdma_item = proto_tree_add_item(tree, hf_lbmr_tir_lbtrdma, tvb, offset, (gint)transport_len, ENC_NA);
4036 lbtrdma_tree = proto_item_add_subtree(lbtrdma_item, ett_lbmr_tir_lbtrdma);
4037 if (transport_len != L_LBMR_TIR_LBTRDMA_T)
4038 {
4039 expert_add_info_format(pinfo, transport_len_item, &ei_lbmr_analysis_length_incorrect, "Wrong transport length for LBMR TIR LBTRDMA info");
4040 return (0);
4041 }
4042 set_address_tvb(&source_addr, AT_IPv4, L_LBMR_TIR_LBTRDMA_T_IP, tvb, offset + O_LBMR_TIR_LBTRDMA_T_IP);
4043 session_id = tvb_get_ntohl(tvb, offset + O_LBMR_TIR_LBTRDMA_T_SESSION_ID);
4044 port = tvb_get_ntohs(tvb, offset + O_LBMR_TIR_LBTRDMA_T_PORT);
4045 proto_tree_add_item(lbtrdma_tree, hf_lbmr_tir_lbtrdma_ip, tvb, offset + O_LBMR_TIR_LBTRDMA_T_IP, L_LBMR_TIR_LBTRDMA_T_IP, ENC_BIG_ENDIAN);
4046 proto_tree_add_item(lbtrdma_tree, hf_lbmr_tir_lbtrdma_session_id, tvb, offset + O_LBMR_TIR_LBTRDMA_T_SESSION_ID, L_LBMR_TIR_LBTRDMA_T_SESSION_ID, ENC_BIG_ENDIAN);
4047 proto_tree_add_item(lbtrdma_tree, hf_lbmr_tir_lbtrdma_port, tvb, offset + O_LBMR_TIR_LBTRDMA_T_PORT, L_LBMR_TIR_LBTRDMA_T_PORT, ENC_BIG_ENDIAN);
4048 lbtrdma_transport = lbtrdma_transport_add(&source_addr, port, session_id);
4049 channel = lbtrdma_transport->channel;
4050 add_contents_tir(contents, topic_name, lbtrdma_transport_source_string(&source_addr, port, session_id), topic_index);
4051 len += L_LBMR_TIR_LBTRDMA_T;
4052 }
4053 break;
4054 case LBMR_TRANSPORT_LBTSMX:
4055 {
4056 guint32 host_id;
4057 guint32 session_id;
4058 guint16 xport_id;
4059 proto_item * lbtsmx_item = NULL;
4060 proto_tree * lbtsmx_tree = NULL;
4061 lbtsmx_transport_t * lbtsmx_transport = NULL;
4062
4063 lbtsmx_item = proto_tree_add_item(tree, hf_lbmr_tir_lbtsmx, tvb, offset, (gint)transport_len, ENC_NA);
4064 lbtsmx_tree = proto_item_add_subtree(lbtsmx_item, ett_lbmr_tir_lbtsmx);
4065 if (transport_len != L_LBMR_TIR_LBTSMX_T)
4066 {
4067 expert_add_info_format(pinfo, transport_len_item, &ei_lbmr_analysis_length_incorrect, "Wrong transport length for LBMR TIR LBTSMX info");
4068 }
4069 host_id = tvb_get_ntohl(tvb, offset + O_LBMR_TIR_LBTSMX_T_HOST_ID);
4070 session_id = tvb_get_ntohl(tvb, offset + O_LBMR_TIR_LBTSMX_T_SESSION_ID);
4071 xport_id = tvb_get_ntohs(tvb, offset + O_LBMR_TIR_LBTSMX_T_XPORT_ID);
4072 proto_tree_add_item(lbtsmx_tree, hf_lbmr_tir_lbtsmx_host_id, tvb, offset + O_LBMR_TIR_LBTSMX_T_HOST_ID, L_LBMR_TIR_LBTSMX_T_HOST_ID, ENC_BIG_ENDIAN);
4073 proto_tree_add_item(lbtsmx_tree, hf_lbmr_tir_lbtsmx_session_id, tvb, offset + O_LBMR_TIR_LBTSMX_T_SESSION_ID, L_LBMR_TIR_LBTSMX_T_SESSION_ID, ENC_BIG_ENDIAN);
4074 proto_tree_add_item(lbtsmx_tree, hf_lbmr_tir_lbtsmx_xport_id, tvb, offset + O_LBMR_TIR_LBTSMX_T_XPORT_ID, L_LBMR_TIR_LBTSMX_T_XPORT_ID, ENC_BIG_ENDIAN);
4075 lbtsmx_transport = lbtsmx_transport_add(host_id, session_id, xport_id);
4076 channel = lbtsmx_transport->channel;
4077 add_contents_tir(contents, topic_name, lbtsmx_transport_source_string(host_id, session_id, xport_id), topic_index);
4078 len += L_LBMR_TIR_LBTSMX_T;
4079 }
4080 break;
4081 default:
4082 ei_item = proto_tree_add_item(tree, hf_lbmr_tir_unknown_transport, tvb, offset, transport_len, ENC_NA);
4083 expert_add_info_format(pinfo, ei_item, &ei_lbmr_analysis_invalid_value, "Unknown LBMR TIR transport 0x%02x", transport);
4084 len = transport_len;
4085 channel = LBM_CHANNEL_NO_CHANNEL;
4086 break;
4087 }
4088 if (channel != LBM_CHANNEL_NO_CHANNEL)
4089 {
4090 lbm_topic_add(channel, topic_index, topic_name);
4091 channel_item = proto_tree_add_uint64(tree, hf_lbmr_tir_channel, tvb, 0, 0, channel);
4092 proto_item_set_generated(channel_item);
4093 }
4094 return (len);
4095 }
4096
dissect_lbmr_tir_entry(tvbuff_t * tvb,int offset,packet_info * pinfo,proto_tree * tree,lbmr_contents_t * contents)4097 static int dissect_lbmr_tir_entry(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tree, lbmr_contents_t * contents)
4098 {
4099 gint namelen = 0;
4100 gint reclen = 0;
4101 int dissect_len = 0;
4102 int tinfo_offset = 0;
4103 char * name = NULL;
4104 proto_item * ti = NULL;
4105 proto_tree * tinfo_tree = NULL;
4106 guint8 transport;
4107 guint8 tlen;
4108 guint16 ttl;
4109 guint32 idx;
4110 int curr_offset;
4111 proto_item * transport_len_item = NULL;
4112
4113 name = tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset, &namelen, ENC_ASCII);
4114 reclen += namelen;
4115 curr_offset = offset + namelen;
4116 tinfo_offset = curr_offset;
4117 transport = tvb_get_guint8(tvb, curr_offset + O_LBMR_TIR_T_TRANSPORT);
4118 tlen = tvb_get_guint8(tvb, curr_offset + O_LBMR_TIR_T_TLEN);
4119 ttl = tvb_get_ntohs(tvb, curr_offset + O_LBMR_TIR_T_TTL);
4120 idx = tvb_get_ntohl(tvb, curr_offset + O_LBMR_TIR_T_INDEX);
4121 reclen += L_LBMR_TIR_T;
4122 curr_offset += L_LBMR_TIR_T;
4123
4124 ti = proto_tree_add_none_format(tree, hf_lbmr_tir, tvb, offset, reclen, "%s: %s, Length %u, Index %" G_GUINT32_FORMAT ", TTL %" G_GUINT16_FORMAT,
4125 name, val_to_str((transport & LBMR_TIR_TRANSPORT), lbmr_transport_type, "Unknown (0x%02x)"), tlen, idx, ttl);
4126 tinfo_tree = proto_item_add_subtree(ti, ett_lbmr_tir);
4127 proto_tree_add_item(tinfo_tree, hf_lbmr_tir_name, tvb, offset, namelen, ENC_ASCII|ENC_NA);
4128 proto_tree_add_item(tinfo_tree, hf_lbmr_tir_transport_opts, tvb, tinfo_offset + O_LBMR_TIR_T_TRANSPORT, L_LBMR_TIR_T_TRANSPORT, ENC_BIG_ENDIAN);
4129 proto_tree_add_item(tinfo_tree, hf_lbmr_tir_transport_type, tvb, tinfo_offset + O_LBMR_TIR_T_TRANSPORT, L_LBMR_TIR_T_TRANSPORT, ENC_BIG_ENDIAN);
4130 transport_len_item = proto_tree_add_item(tinfo_tree, hf_lbmr_tir_tlen, tvb, tinfo_offset + O_LBMR_TIR_T_TLEN, L_LBMR_TIR_T_TLEN, ENC_BIG_ENDIAN);
4131 proto_tree_add_item(tinfo_tree, hf_lbmr_tir_ttl, tvb, tinfo_offset + O_LBMR_TIR_T_TTL, L_LBMR_TIR_T_TTL, ENC_BIG_ENDIAN);
4132 proto_tree_add_item(tinfo_tree, hf_lbmr_tir_index, tvb, tinfo_offset + O_LBMR_TIR_T_INDEX, L_LBMR_TIR_T_INDEX, ENC_BIG_ENDIAN);
4133 if ((transport & LBMR_TIR_OPTIONS) != 0)
4134 {
4135 dissect_len = dissect_lbmr_tir_options(tvb, curr_offset, pinfo, tinfo_tree);
4136 reclen += dissect_len;
4137 curr_offset += dissect_len;
4138 }
4139 reclen += dissect_lbmr_tir_transport(tvb, curr_offset, (lbm_uint8_t)(transport & LBMR_TIR_TRANSPORT), tlen, name, idx, pinfo, tinfo_tree, contents, transport_len_item);
4140 proto_item_set_len(ti, reclen);
4141 return (reclen);
4142 }
4143
dissect_lbmr_tirs(tvbuff_t * tvb,int offset,guint16 tir_count,packet_info * pinfo,proto_tree * tree,const char * name,lbmr_contents_t * contents)4144 static int dissect_lbmr_tirs(tvbuff_t * tvb, int offset, guint16 tir_count, packet_info * pinfo, proto_tree * tree,
4145 const char * name, lbmr_contents_t * contents)
4146 {
4147 int start_offset;
4148 int tir_len;
4149 proto_tree * tirs_tree = NULL;
4150 proto_item * ti = NULL;
4151 int len = 0;
4152
4153 start_offset = offset;
4154 ti = proto_tree_add_none_format(tree, hf_lbmr_tirs, tvb, start_offset, -1, "%s", name);
4155 tirs_tree = proto_item_add_subtree(ti, ett_lbmr_tirs);
4156 while (tir_count-- > 0)
4157 {
4158 tir_len = dissect_lbmr_tir_entry(tvb, offset, pinfo, tirs_tree, contents);
4159 offset += tir_len;
4160 len += tir_len;
4161 }
4162 proto_item_set_len(ti, len);
4163 return (len);
4164 }
4165
4166 /*----------------------------------------------------------------------------*/
4167 /* LBMR Queue Query Record dissection functions. */
4168 /*----------------------------------------------------------------------------*/
dissect_lbmr_qqr(tvbuff_t * tvb,int offset,packet_info * pinfo _U_,proto_tree * tree,lbmr_contents_t * contents)4169 static int dissect_lbmr_qqr(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, lbmr_contents_t * contents)
4170 {
4171 gint namelen = 0;
4172 guint reclen = 0;
4173 char * name = NULL;
4174
4175 name = tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset, &namelen, ENC_ASCII);
4176 reclen += namelen;
4177 add_contents_qqr(contents, name);
4178 proto_tree_add_item(tree, hf_lbmr_qqr_name, tvb, offset, namelen, ENC_ASCII|ENC_NA);
4179 return (reclen);
4180 }
4181
dissect_lbmr_qqrs(tvbuff_t * tvb,int offset,guint8 qqr_count,packet_info * pinfo,proto_tree * tree,lbmr_contents_t * contents)4182 static int dissect_lbmr_qqrs(tvbuff_t * tvb, int offset, guint8 qqr_count, packet_info * pinfo, proto_tree * tree, lbmr_contents_t * contents)
4183 {
4184 int start_offset;
4185 int qqr_len;
4186 proto_tree * qqrs_tree = NULL;
4187 proto_item * qqrs_ti = NULL;
4188 int total_len = 0;
4189
4190 start_offset = offset;
4191 qqrs_ti = proto_tree_add_item(tree, hf_lbmr_qqr, tvb, start_offset, -1, ENC_NA);
4192 qqrs_tree = proto_item_add_subtree(qqrs_ti, ett_lbmr_qqrs);
4193 while (qqr_count-- > 0)
4194 {
4195 qqr_len = dissect_lbmr_qqr(tvb, offset, pinfo, qqrs_tree, contents);
4196 total_len += qqr_len;
4197 offset += qqr_len;
4198 }
4199 proto_item_set_len(qqrs_ti, total_len);
4200 return (total_len);
4201 }
4202
4203 /*----------------------------------------------------------------------------*/
4204 /* LBMR Queue Information Record dissection functions. */
4205 /*----------------------------------------------------------------------------*/
dissect_lbmr_qir_queue_blk(tvbuff_t * tvb,int offset,packet_info * pinfo _U_,proto_tree * tree,const char * queue_name,const char * topic_name,lbmr_contents_t * contents)4206 static int dissect_lbmr_qir_queue_blk(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, const char * queue_name,
4207 const char * topic_name, lbmr_contents_t * contents)
4208 {
4209 guint16 port = 0;
4210 proto_item * ti = NULL;
4211 proto_tree * blk_tree = NULL;
4212
4213 port = tvb_get_ntohs(tvb, offset + O_LBMR_QIR_QUEUE_BLK_T_PORT);
4214 ti = proto_tree_add_item(tree, hf_lbmr_qir_queue_blk, tvb, offset, L_LBMR_QIR_QUEUE_BLK_T, ENC_NA);
4215 blk_tree = proto_item_add_subtree(ti, ett_lbmr_qir_queue_blk);
4216 proto_tree_add_item(blk_tree, hf_lbmr_qir_queue_blk_ip, tvb, offset + O_LBMR_QIR_QUEUE_BLK_T_IP, L_LBMR_QIR_QUEUE_BLK_T_IP, ENC_BIG_ENDIAN);
4217 proto_tree_add_item(blk_tree, hf_lbmr_qir_queue_blk_port, tvb, offset + O_LBMR_QIR_QUEUE_BLK_T_PORT, L_LBMR_QIR_QUEUE_BLK_T_PORT, ENC_BIG_ENDIAN);
4218 proto_tree_add_item(blk_tree, hf_lbmr_qir_queue_blk_idx, tvb, offset + O_LBMR_QIR_QUEUE_BLK_T_IDX, L_LBMR_QIR_QUEUE_BLK_T_IDX, ENC_BIG_ENDIAN);
4219 proto_tree_add_item(blk_tree, hf_lbmr_qir_queue_blk_grp_idx, tvb, offset + O_LBMR_QIR_QUEUE_BLK_T_GRP_IDX, L_LBMR_QIR_QUEUE_BLK_T_GRP_IDX, ENC_BIG_ENDIAN);
4220 proto_tree_add_item(blk_tree, hf_lbmr_qir_queue_blk_reserved, tvb, offset + O_LBMR_QIR_QUEUE_BLK_T_RESERVED, L_LBMR_QIR_QUEUE_BLK_T_RESERVED, ENC_BIG_ENDIAN);
4221 add_contents_qir(contents, queue_name, topic_name, port);
4222 return ((int)L_LBMR_QIR_QUEUE_BLK_T);
4223 }
4224
dissect_lbmr_qir_grp_blk(tvbuff_t * tvb,int offset,packet_info * pinfo _U_,proto_tree * tree,lbmr_contents_t * contents _U_)4225 static int dissect_lbmr_qir_grp_blk(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, lbmr_contents_t * contents _U_)
4226 {
4227 proto_item * ti = NULL;
4228 proto_tree * blk_tree = NULL;
4229 guint16 idx = 0;
4230 guint16 sz = 0;
4231
4232 idx = tvb_get_ntohs(tvb, offset + O_LBMR_QIR_GRP_BLK_T_GRP_IDX);
4233 sz = tvb_get_ntohs(tvb, offset + O_LBMR_QIR_GRP_BLK_T_GRP_SZ);
4234 ti = proto_tree_add_none_format(tree, hf_lbmr_qir_grp_blk, tvb, offset, L_LBMR_QIR_GRP_BLK_T, "Group block, Index %" G_GUINT16_FORMAT ", Size %" G_GUINT16_FORMAT, idx, sz);
4235 blk_tree = proto_item_add_subtree(ti, ett_lbmr_qir_grp_blk);
4236 proto_tree_add_item(blk_tree, hf_lbmr_qir_grp_blk_grp_idx, tvb, offset + O_LBMR_QIR_GRP_BLK_T_GRP_IDX, L_LBMR_QIR_GRP_BLK_T_GRP_IDX, ENC_BIG_ENDIAN);
4237 proto_tree_add_item(blk_tree, hf_lbmr_qir_grp_blk_grp_sz, tvb, offset + O_LBMR_QIR_GRP_BLK_T_GRP_SZ, L_LBMR_QIR_GRP_BLK_T_GRP_SZ, ENC_BIG_ENDIAN);
4238 return ((int)L_LBMR_QIR_GRP_BLK_T);
4239 }
4240
dissect_lbmr_qir_entry(tvbuff_t * tvb,int offset,packet_info * pinfo,proto_tree * tree,lbmr_contents_t * contents)4241 static int dissect_lbmr_qir_entry(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tree, lbmr_contents_t * contents)
4242 {
4243 gint qnamelen = 0;
4244 gint qnameoffset = 0;
4245 char * qname = NULL;
4246 gint tnamelen = 0;
4247 gint tnameoffset = 0;
4248 char * tname = NULL;
4249 gint reclen = 0;
4250 int curr_offset = 0;
4251 proto_item * qirti = NULL;
4252 proto_tree * qirtree = NULL;
4253 proto_item * grpti = NULL;
4254 proto_tree * grptree = NULL;
4255 int grplen = 0;
4256 proto_item * queueti = NULL;
4257 proto_item * queuetree = NULL;
4258 int queuelen = 0;
4259 guint32 queue_id = 0;
4260 guint16 grp_blks = 0;
4261 guint16 queue_blks = 0;
4262 guint16 have_options = 0;
4263 int optlen = 0;
4264
4265 /*
4266 queue name (null-terminated)
4267 topic name (null-terminated)
4268 lbmr_qir_t
4269 if qir.grp_blks & LBMR_QIR_OPTIONS
4270 parse options (normal topic options - though there shouldn't be any) can use dissect_lbmr_tir_options
4271 endif
4272 group blocks (lbmr_qir_grp_blk_t)
4273 queue blocks (lbmr_qir_queue_blk_t)
4274 */
4275 curr_offset = offset;
4276 qnameoffset = curr_offset;
4277 qname = tvb_get_stringz_enc(wmem_packet_scope(), tvb, qnameoffset, &qnamelen, ENC_ASCII);
4278 curr_offset += qnamelen;
4279 reclen += qnamelen;
4280 tnameoffset = curr_offset;
4281 tname = tvb_get_stringz_enc(wmem_packet_scope(), tvb, tnameoffset, &tnamelen, ENC_ASCII);
4282 curr_offset += tnamelen;
4283 reclen += tnamelen;
4284 queue_id = tvb_get_ntohl(tvb, curr_offset + O_LBMR_QIR_T_QUEUE_ID);
4285 have_options = tvb_get_ntohs(tvb, curr_offset + O_LBMR_QIR_T_GRP_BLKS);
4286 grp_blks = have_options & LBMR_QIR_GRP_BLOCKS_MASK;
4287 have_options &= LBMR_QIR_OPTIONS;
4288 queue_blks = tvb_get_ntohs(tvb, curr_offset + O_LBMR_QIR_T_QUEUE_BLKS);
4289 qirti = proto_tree_add_none_format(tree, hf_lbmr_qir, tvb, offset, reclen, "%s: %s, ID %" G_GUINT32_FORMAT, qname, tname, queue_id);
4290 qirtree = proto_item_add_subtree(qirti, ett_lbmr_qir);
4291 proto_tree_add_item(qirtree, hf_lbmr_qir_queue_name, tvb, qnameoffset, qnamelen, ENC_ASCII|ENC_NA);
4292 proto_tree_add_item(qirtree, hf_lbmr_qir_topic_name, tvb, tnameoffset, tnamelen, ENC_ASCII|ENC_NA);
4293 proto_tree_add_item(qirtree, hf_lbmr_qir_queue_id, tvb, curr_offset + O_LBMR_QIR_T_QUEUE_ID, L_LBMR_QIR_T_QUEUE_ID, ENC_BIG_ENDIAN);
4294 proto_tree_add_item(qirtree, hf_lbmr_qir_queue_ver, tvb, curr_offset + O_LBMR_QIR_T_QUEUE_VER, L_LBMR_QIR_T_QUEUE_VER, ENC_BIG_ENDIAN);
4295 proto_tree_add_item(qirtree, hf_lbmr_qir_queue_prev_ver, tvb, curr_offset + O_LBMR_QIR_T_QUEUE_PREV_VER, L_LBMR_QIR_T_QUEUE_PREV_VER, ENC_BIG_ENDIAN);
4296 proto_tree_add_item(qirtree, hf_lbmr_qir_option_flag, tvb, curr_offset + O_LBMR_QIR_T_GRP_BLKS, L_LBMR_QIR_T_GRP_BLKS, ENC_BIG_ENDIAN);
4297 proto_tree_add_item(qirtree, hf_lbmr_qir_grp_blks, tvb, curr_offset + O_LBMR_QIR_T_GRP_BLKS, L_LBMR_QIR_T_GRP_BLKS, ENC_BIG_ENDIAN);
4298 proto_tree_add_item(qirtree, hf_lbmr_qir_queue_blks, tvb, curr_offset + O_LBMR_QIR_T_QUEUE_BLKS, L_LBMR_QIR_T_QUEUE_BLKS, ENC_BIG_ENDIAN);
4299 curr_offset += L_LBMR_QIR_T;
4300 reclen += L_LBMR_QIR_T;
4301 if (have_options)
4302 {
4303 optlen = dissect_lbmr_tir_options(tvb, curr_offset, pinfo, tree);
4304 curr_offset += optlen;
4305 reclen += optlen;
4306 }
4307 if (grp_blks > 0)
4308 {
4309 grpti = proto_tree_add_item(qirtree, hf_lbmr_qir_grps, tvb, curr_offset, 1, ENC_NA);
4310 grptree = proto_item_add_subtree(grpti, ett_lbmr_qir_grp);
4311 grplen = 0;
4312 while (grp_blks-- > 0)
4313 {
4314 optlen = dissect_lbmr_qir_grp_blk(tvb, curr_offset, pinfo, grptree, contents);
4315 curr_offset += optlen;
4316 reclen += optlen;
4317 grplen += optlen;
4318 }
4319 proto_item_set_len(grpti, grplen);
4320 }
4321 if (queue_blks > 0)
4322 {
4323 queueti = proto_tree_add_item(qirtree, hf_lbmr_qir_queues, tvb, curr_offset, 1, ENC_NA);
4324 queuetree = proto_item_add_subtree(queueti, ett_lbmr_qir_queue);
4325 queuelen = 0;
4326 while (queue_blks-- > 0)
4327 {
4328 optlen = dissect_lbmr_qir_queue_blk(tvb, curr_offset, pinfo, queuetree, qname, tname, contents);
4329 curr_offset += optlen;
4330 reclen += optlen;
4331 queuelen += optlen;
4332 }
4333 proto_item_set_len(queueti, queuelen);
4334 }
4335 proto_item_set_len(qirti, reclen);
4336 return (reclen);
4337 }
4338
dissect_lbmr_qirs(tvbuff_t * tvb,int offset,guint16 qirs,packet_info * pinfo,proto_tree * tree,lbmr_contents_t * contents)4339 static int dissect_lbmr_qirs(tvbuff_t * tvb, int offset, guint16 qirs, packet_info * pinfo, proto_tree * tree, lbmr_contents_t * contents)
4340 {
4341 int start_offset;
4342 int qir_len;
4343 proto_tree * qirs_tree = NULL;
4344 proto_item * qirs_ti = NULL;
4345 int len = 0;
4346
4347 start_offset = offset;
4348 qirs_ti = proto_tree_add_item(tree, hf_lbmr_qirs, tvb, start_offset, -1, ENC_NA);
4349 qirs_tree = proto_item_add_subtree(qirs_ti, ett_lbmr_qirs);
4350 while (qirs-- > 0)
4351 {
4352 qir_len = dissect_lbmr_qir_entry(tvb, offset, pinfo, qirs_tree, contents);
4353 len += qir_len;
4354 offset += qir_len;
4355 }
4356 proto_item_set_len(qirs_ti, len);
4357 return (len);
4358 }
4359
4360 /*----------------------------------------------------------------------------*/
4361 /* LBMR Proxy Source Election Record dissection functions. */
4362 /*----------------------------------------------------------------------------*/
dissect_lbmr_pser(tvbuff_t * tvb,int offset,packet_info * pinfo,proto_tree * tree)4363 static int dissect_lbmr_pser(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tree)
4364 {
4365 int hdr_len = 0;
4366 int len = 0;
4367 int topic_len = 0;
4368 static int * const flags[] =
4369 {
4370 &hf_lbmr_pser_flags_option,
4371 NULL
4372 };
4373 int curr_offset = offset;
4374 guint16 flags_val = 0;
4375
4376 hdr_len = (int)tvb_get_ntohs(tvb, curr_offset + O_LBMR_PSER_T_LEN);
4377 flags_val = tvb_get_ntohs(tvb, curr_offset + O_LBMR_PSER_T_FLAGS);
4378 topic_len = hdr_len - L_LBMR_PSER_T;
4379 proto_tree_add_item(tree, hf_lbmr_pser_dep_type, tvb, offset + O_LBMR_PSER_T_DEP_TYPE, L_LBMR_PSER_T_DEP_TYPE, ENC_BIG_ENDIAN);
4380 proto_tree_add_item(tree, hf_lbmr_pser_len, tvb, offset + O_LBMR_PSER_T_LEN, L_LBMR_PSER_T_LEN, ENC_BIG_ENDIAN);
4381 proto_tree_add_bitmask(tree, tvb, offset + O_LBMR_PSER_T_FLAGS, hf_lbmr_pser_flags, ett_lbmr_pser_flags, flags, ENC_BIG_ENDIAN);
4382 proto_tree_add_item(tree, hf_lbmr_pser_source_ip, tvb, offset + O_LBMR_PSER_T_SOURCE_IP, L_LBMR_PSER_T_SOURCE_IP, ENC_BIG_ENDIAN);
4383 proto_tree_add_item(tree, hf_lbmr_pser_store_ip, tvb, offset + O_LBMR_PSER_T_STORE_IP, L_LBMR_PSER_T_STORE_IP, ENC_BIG_ENDIAN);
4384 proto_tree_add_item(tree, hf_lbmr_pser_transport_idx, tvb, offset + O_LBMR_PSER_T_TRANSPORT_IDX, L_LBMR_PSER_T_TRANSPORT_IDX, ENC_BIG_ENDIAN);
4385 proto_tree_add_item(tree, hf_lbmr_pser_topic_idx, tvb, offset + O_LBMR_PSER_T_TOPIC_IDX, L_LBMR_PSER_T_TOPIC_IDX, ENC_BIG_ENDIAN);
4386 proto_tree_add_item(tree, hf_lbmr_pser_source_port, tvb, offset + O_LBMR_PSER_T_SOURCE_PORT, L_LBMR_PSER_T_SOURCE_PORT, ENC_BIG_ENDIAN);
4387 proto_tree_add_item(tree, hf_lbmr_pser_store_port, tvb, offset + O_LBMR_PSER_T_STORE_PORT, L_LBMR_PSER_T_STORE_PORT, ENC_BIG_ENDIAN);
4388 proto_tree_add_item(tree, hf_lbmr_pser_topic, tvb, offset + O_LBMR_PSER_T_TOPIC, topic_len, ENC_ASCII|ENC_NA);
4389 curr_offset += hdr_len;
4390 len = hdr_len;
4391 if ((flags_val & LBMR_PSER_OPT_FLAG) != 0)
4392 {
4393 proto_tree * opts_tree = NULL;
4394 proto_item * opts_item = NULL;
4395 proto_tree * optlen_tree = NULL;
4396 proto_tree * optlen_item = NULL;
4397 guint16 opt_len = 0;
4398
4399 opt_len = tvb_get_ntohs(tvb, curr_offset + O_LBMR_PSER_OPTLEN_T_OPTLEN);
4400 opts_item = proto_tree_add_item(tree, hf_lbmr_pser_opts, tvb, curr_offset, -1, ENC_NA);
4401 opts_tree = proto_item_add_subtree(opts_item, ett_lbmr_pser_opts);
4402 optlen_item = proto_tree_add_item(opts_tree, hf_lbmr_pser_optlen, tvb, curr_offset, L_LBMR_PSER_OPTLEN_T, ENC_NA);
4403 optlen_tree = proto_item_add_subtree(optlen_item, ett_lbmr_pser_opt_len);
4404 proto_tree_add_item(optlen_tree, hf_lbmr_pser_optlen_type, tvb, curr_offset + O_LBMR_PSER_OPTLEN_T_TYPE, L_LBMR_PSER_OPTLEN_T_TYPE, ENC_BIG_ENDIAN);
4405 proto_tree_add_item(optlen_tree, hf_lbmr_pser_optlen_optlen, tvb, curr_offset + O_LBMR_PSER_OPTLEN_T_OPTLEN, L_LBMR_PSER_OPTLEN_T_OPTLEN, ENC_BIG_ENDIAN);
4406 proto_item_set_len(opts_item, opt_len);
4407 len += L_LBMR_PSER_OPTLEN_T;
4408 curr_offset += L_LBMR_PSER_OPTLEN_T;
4409 opt_len -= L_LBMR_PSER_OPTLEN_T;
4410 while (opt_len > 0)
4411 {
4412 proto_tree * ctxinst_tree = NULL;
4413 proto_item * ctxinst_item = NULL;
4414 guint8 opt_type = tvb_get_guint8(tvb, curr_offset + O_LBMR_PSER_OPT_HDR_T_TYPE);
4415 guint8 option_len = tvb_get_guint8(tvb, curr_offset + O_LBMR_PSER_OPT_HDR_T_LEN);
4416
4417 switch (opt_type)
4418 {
4419 case LBMR_PSER_OPT_SRC_CTXINST_TYPE:
4420 case LBMR_PSER_OPT_STORE_CTXINST_TYPE:
4421 ctxinst_item = proto_tree_add_item(opts_tree, hf_lbmr_pser_opt_ctxinst, tvb, curr_offset, L_LBMR_PSER_OPT_CTXINST_T, ENC_NA);
4422 ctxinst_tree = proto_item_add_subtree(ctxinst_item, ett_lbmr_pser_opt_ctxinst);
4423 proto_tree_add_item(ctxinst_tree, hf_lbmr_pser_opt_ctxinst_len, tvb, curr_offset + O_LBMR_PSER_OPT_CTXINST_T_LEN, L_LBMR_PSER_OPT_CTXINST_T_LEN, ENC_BIG_ENDIAN);
4424 proto_tree_add_item(ctxinst_tree, hf_lbmr_pser_opt_ctxinst_type, tvb, curr_offset + O_LBMR_PSER_OPT_CTXINST_T_TYPE, L_LBMR_PSER_OPT_CTXINST_T_TYPE, ENC_BIG_ENDIAN);
4425 proto_tree_add_item(ctxinst_tree, hf_lbmr_pser_opt_ctxinst_ctxinst, tvb, curr_offset + O_LBMR_PSER_OPT_CTXINST_T_CTXINST, L_LBMR_PSER_OPT_CTXINST_T_CTXINST, ENC_NA);
4426 len += L_LBMR_PSER_OPT_CTXINST_T;
4427 curr_offset += L_LBMR_PSER_OPT_CTXINST_T;
4428 opt_len -= L_LBMR_PSER_OPT_CTXINST_T;
4429 break;
4430 default:
4431 len += option_len;
4432 curr_offset += option_len;
4433 opt_len -= option_len;
4434 expert_add_info_format(pinfo, NULL, &ei_lbmr_analysis_invalid_value, "Unknown LBMR PSER option 0x%02x", opt_type);
4435 if (option_len == 0) {
4436 return (len);
4437 }
4438 break;
4439 }
4440 }
4441 }
4442 return (len);
4443 }
4444
4445 /*----------------------------------------------------------------------------*/
4446 /* LBMR Queue Management dissection functions. */
4447 /*----------------------------------------------------------------------------*/
lbmr_dissect_umq_qmgmt(tvbuff_t * tvb,int offset,packet_info * pinfo,proto_tree * tree)4448 int lbmr_dissect_umq_qmgmt(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tree)
4449 {
4450 guint8 pckt_type = 0;
4451 int curr_offset = 0;
4452 guint16 dep16;
4453 guint16 idx;
4454 guint8 flags_val = 0;
4455 int len_dissected = 0;
4456 static int * const flags[] =
4457 {
4458 &hf_qmgmt_flags_i_flag,
4459 &hf_qmgmt_flags_n_flag,
4460 NULL
4461 };
4462 static int * const il_flags[] =
4463 {
4464 &hf_qmgmt_flags_i_flag,
4465 &hf_qmgmt_flags_n_flag,
4466 &hf_qmgmt_flags_il_l_flag,
4467 &hf_qmgmt_flags_il_k_flag,
4468 NULL
4469 };
4470
4471 flags_val = tvb_get_guint8(tvb, offset + O_UMQ_QMGMT_HDR_T_FLAGS);
4472 pckt_type = tvb_get_guint8(tvb, offset + O_UMQ_QMGMT_HDR_T_PCKT_TYPE);
4473 dep16 = tvb_get_ntohs(tvb, offset + O_UMQ_QMGMT_HDR_T_PCKT_TYPE_DEP16);
4474 if (pckt_type == UMQ_QMGMT_HDR_PCKT_TYPE_IL)
4475 {
4476 proto_tree_add_bitmask(tree, tvb, offset + O_UMQ_QMGMT_HDR_T_FLAGS, hf_qmgmt_flags, ett_qmgmt_flags, il_flags, ENC_BIG_ENDIAN);
4477 }
4478 else
4479 {
4480 proto_tree_add_bitmask(tree, tvb, offset + O_UMQ_QMGMT_HDR_T_FLAGS, hf_qmgmt_flags, ett_qmgmt_flags, flags, ENC_BIG_ENDIAN);
4481 }
4482 proto_tree_add_item(tree, hf_qmgmt_pckt_type, tvb, offset + O_UMQ_QMGMT_HDR_T_PCKT_TYPE, L_UMQ_QMGMT_HDR_T_PCKT_TYPE, ENC_BIG_ENDIAN);
4483 proto_tree_add_item(tree, hf_qmgmt_cfgsig, tvb, offset + O_UMQ_QMGMT_HDR_T_CFGSIG, L_UMQ_QMGMT_HDR_T_CFGSIG, ENC_NA);
4484 proto_tree_add_item(tree, hf_qmgmt_queue_id, tvb, offset + O_UMQ_QMGMT_HDR_T_QUEUE_ID, L_UMQ_QMGMT_HDR_T_QUEUE_ID, ENC_BIG_ENDIAN);
4485 proto_tree_add_item(tree, hf_qmgmt_queue_ver, tvb, offset + O_UMQ_QMGMT_HDR_T_QUEUE_VER, L_UMQ_QMGMT_HDR_T_QUEUE_VER, ENC_BIG_ENDIAN);
4486 proto_tree_add_item(tree, hf_qmgmt_ip, tvb, offset + O_UMQ_QMGMT_HDR_T_IP, L_UMQ_QMGMT_HDR_T_IP, ENC_BIG_ENDIAN);
4487 proto_tree_add_item(tree, hf_qmgmt_port, tvb, offset + O_UMQ_QMGMT_HDR_T_PORT, L_UMQ_QMGMT_HDR_T_PORT, ENC_BIG_ENDIAN);
4488 proto_tree_add_item(tree, hf_qmgmt_inst_idx, tvb, offset + O_UMQ_QMGMT_HDR_T_INST_IDX, L_UMQ_QMGMT_HDR_T_INST_IDX, ENC_BIG_ENDIAN);
4489 proto_tree_add_item(tree, hf_qmgmt_grp_idx, tvb, offset + O_UMQ_QMGMT_HDR_T_GRP_IDX, L_UMQ_QMGMT_HDR_T_GRP_IDX, ENC_BIG_ENDIAN);
4490 switch (pckt_type)
4491 {
4492 case UMQ_QMGMT_HDR_PCKT_TYPE_IL:
4493 proto_tree_add_item(tree, hf_qmgmt_il_num_insts, tvb, offset + O_UMQ_QMGMT_HDR_T_PCKT_TYPE_DEP16, L_UMQ_QMGMT_HDR_T_PCKT_TYPE_DEP16, ENC_BIG_ENDIAN);
4494 break;
4495 case UMQ_QMGMT_HDR_PCKT_TYPE_JREJ:
4496 proto_tree_add_item(tree, hf_qmgmt_jrej_code, tvb, offset + O_UMQ_QMGMT_HDR_T_PCKT_TYPE_DEP16, L_UMQ_QMGMT_HDR_T_PCKT_TYPE_DEP16, ENC_BIG_ENDIAN);
4497 break;
4498 case UMQ_QMGMT_HDR_PCKT_TYPE_EV:
4499 proto_tree_add_item(tree, hf_qmgmt_ev_bias, tvb, offset + O_UMQ_QMGMT_HDR_T_PCKT_TYPE_DEP16, L_UMQ_QMGMT_HDR_T_PCKT_TYPE_DEP16, ENC_BIG_ENDIAN);
4500 break;
4501 default:
4502 proto_tree_add_item(tree, hf_qmgmt_pckt_type_dep16, tvb, offset + O_UMQ_QMGMT_HDR_T_PCKT_TYPE_DEP16, L_UMQ_QMGMT_HDR_T_PCKT_TYPE_DEP16, ENC_BIG_ENDIAN);
4503 break;
4504 }
4505 len_dissected = L_UMQ_QMGMT_HDR_T;
4506 curr_offset = offset + L_UMQ_QMGMT_HDR_T;
4507 switch (pckt_type)
4508 {
4509 case UMQ_QMGMT_HDR_PCKT_TYPE_IL:
4510 {
4511 proto_item * il_subtree_item = NULL;
4512 proto_tree * il_subtree = NULL;
4513 static int * const il_inst_flags[] =
4514 {
4515 &hf_qmgmt_il_inst_flags_m_flag,
4516 &hf_qmgmt_il_inst_flags_q_flag,
4517 &hf_qmgmt_il_inst_flags_p_flag,
4518 NULL
4519 };
4520
4521 il_subtree_item = proto_tree_add_item(tree, hf_qmgmt_il, tvb, curr_offset, L_UMQ_QMGMT_IL_HDR_T, ENC_NA);
4522 il_subtree = proto_item_add_subtree(il_subtree_item, ett_qmgmt_il);
4523 proto_tree_add_item(il_subtree, hf_qmgmt_il_highest_rcr_tsp, tvb, curr_offset + O_UMQ_QMGMT_IL_HDR_T_HIGHEST_RCR_TSP, L_UMQ_QMGMT_IL_HDR_T_HIGHEST_RCR_TSP, ENC_BIG_ENDIAN);
4524 len_dissected += L_UMQ_QMGMT_IL_HDR_T;
4525 curr_offset += L_UMQ_QMGMT_IL_HDR_T;
4526 for (idx = 0; idx < dep16; ++idx)
4527 {
4528 proto_item * il_inst_subtree_item = NULL;
4529 proto_tree * il_inst_subtree = NULL;
4530
4531 il_inst_subtree_item = proto_tree_add_item(tree, hf_qmgmt_il_inst, tvb, curr_offset, L_UMQ_QMGMT_IL_INST_HDR_T, ENC_NA);
4532 il_inst_subtree = proto_item_add_subtree(il_inst_subtree_item, ett_qmgmt_il_inst);
4533 proto_tree_add_item(il_inst_subtree, hf_qmgmt_il_inst_ip, tvb, curr_offset + O_UMQ_QMGMT_IL_INST_HDR_T_IP, L_UMQ_QMGMT_IL_INST_HDR_T_IP, ENC_BIG_ENDIAN);
4534 proto_tree_add_item(il_inst_subtree, hf_qmgmt_il_inst_port, tvb, curr_offset + O_UMQ_QMGMT_IL_INST_HDR_T_PORT, L_UMQ_QMGMT_IL_INST_HDR_T_PORT, ENC_BIG_ENDIAN);
4535 proto_tree_add_item(il_inst_subtree, hf_qmgmt_il_inst_inst_idx, tvb, curr_offset + O_UMQ_QMGMT_IL_INST_HDR_T_INST_IDX, L_UMQ_QMGMT_IL_INST_HDR_T_INST_IDX, ENC_BIG_ENDIAN);
4536 proto_tree_add_item(il_inst_subtree, hf_qmgmt_il_inst_grp_idx, tvb, curr_offset + O_UMQ_QMGMT_IL_INST_HDR_T_GRP_IDX, L_UMQ_QMGMT_IL_INST_HDR_T_GRP_IDX, ENC_BIG_ENDIAN);
4537 proto_tree_add_bitmask(il_inst_subtree, tvb, curr_offset + O_UMQ_QMGMT_IL_INST_HDR_T_FLAGS, hf_qmgmt_il_inst_flags, ett_qmgmt_il_inst_flags, il_inst_flags, ENC_BIG_ENDIAN);
4538 len_dissected += L_UMQ_QMGMT_IL_INST_HDR_T;
4539 curr_offset += L_UMQ_QMGMT_IL_INST_HDR_T;
4540 }
4541 }
4542 break;
4543 case UMQ_QMGMT_HDR_PCKT_TYPE_JR:
4544 /* Nothing to do */
4545 break;
4546 case UMQ_QMGMT_HDR_PCKT_TYPE_JREJ:
4547 /* Nothing to do */
4548 break;
4549 case UMQ_QMGMT_HDR_PCKT_TYPE_IKA:
4550 /* Nothing to do */
4551 break;
4552 case UMQ_QMGMT_HDR_PCKT_TYPE_EC:
4553 {
4554 proto_item * ec_subtree_item = NULL;
4555 proto_tree * ec_subtree = NULL;
4556
4557 ec_subtree_item = proto_tree_add_item(tree, hf_qmgmt_ec, tvb, curr_offset, L_UMQ_QMGMT_EC_HDR_T, ENC_NA);
4558 ec_subtree = proto_item_add_subtree(ec_subtree_item, ett_qmgmt_ec);
4559 proto_tree_add_item(ec_subtree, hf_qmgmt_ec_queue_new_ver, tvb, curr_offset + O_UMQ_QMGMT_EC_HDR_T_QUEUE_NEW_VER, L_UMQ_QMGMT_EC_HDR_T_QUEUE_NEW_VER, ENC_BIG_ENDIAN);
4560 len_dissected += L_UMQ_QMGMT_EC_HDR_T;
4561 curr_offset += L_UMQ_QMGMT_EC_HDR_T;
4562 }
4563 break;
4564 case UMQ_QMGMT_HDR_PCKT_TYPE_EV:
4565 {
4566 proto_item * ev_subtree_item = NULL;
4567 proto_tree * ev_subtree = NULL;
4568
4569 ev_subtree_item = proto_tree_add_item(tree, hf_qmgmt_ev, tvb, curr_offset, L_UMQ_QMGMT_EV_HDR_T, ENC_NA);
4570 ev_subtree = proto_item_add_subtree(ev_subtree_item, ett_qmgmt_ev);
4571 proto_tree_add_item(ev_subtree, hf_qmgmt_ev_highest_rcr_tsp, tvb, curr_offset + O_UMQ_QMGMT_EV_HDR_T_HIGHEST_RCR_TSP, L_UMQ_QMGMT_EV_HDR_T_HIGHEST_RCR_TSP, ENC_BIG_ENDIAN);
4572 proto_tree_add_item(ev_subtree, hf_qmgmt_ev_age, tvb, curr_offset + O_UMQ_QMGMT_EV_HDR_T_AGE, L_UMQ_QMGMT_EV_HDR_T_AGE, ENC_BIG_ENDIAN);
4573 len_dissected += L_UMQ_QMGMT_EV_HDR_T;
4574 curr_offset += L_UMQ_QMGMT_EV_HDR_T;
4575 }
4576 break;
4577 case UMQ_QMGMT_HDR_PCKT_TYPE_CNIL:
4578 /* Nothing to do */
4579 break;
4580 case UMQ_QMGMT_HDR_PCKT_TYPE_QRO:
4581 {
4582 proto_item * qro_subtree_item = NULL;
4583 proto_tree * qro_subtree = NULL;
4584
4585 qro_subtree_item = proto_tree_add_item(tree, hf_qmgmt_qro, tvb, curr_offset, L_UMQ_QMGMT_QRO_HDR_T, ENC_NA);
4586 qro_subtree = proto_item_add_subtree(qro_subtree_item, ett_qmgmt_qro);
4587 proto_tree_add_item(qro_subtree, hf_qmgmt_qro_highest_rcr_tsp, tvb, curr_offset + O_UMQ_QMGMT_QRO_HDR_T_HIGHEST_RCR_TSP, L_UMQ_QMGMT_QRO_HDR_T_HIGHEST_RCR_TSP, ENC_BIG_ENDIAN);
4588 len_dissected += L_UMQ_QMGMT_QRO_HDR_T;
4589 curr_offset += L_UMQ_QMGMT_QRO_HDR_T;
4590 }
4591 break;
4592 default:
4593 expert_add_info_format(pinfo, NULL, &ei_lbmr_analysis_invalid_value, "Unknown LBMR QMGMT packet type 0x%02x", pckt_type);
4594 break;
4595 }
4596 if ((flags_val & UMQ_QMGMT_HDR_N_FLAG) != 0)
4597 {
4598 int qnamelen = tvb_reported_length_remaining(tvb, curr_offset);
4599 if (qnamelen > 1)
4600 {
4601 proto_tree_add_item(tree, hf_qmgmt_qname, tvb, curr_offset, qnamelen, ENC_ASCII|ENC_NA);
4602 }
4603 len_dissected += qnamelen;
4604 }
4605 return (len_dissected);
4606 }
4607
4608 /*----------------------------------------------------------------------------*/
4609 /* LBMR ContextInfo dissection functions. */
4610 /*----------------------------------------------------------------------------*/
dissect_lbmr_ctxinfo(tvbuff_t * tvb,int offset,packet_info * pinfo _U_,proto_tree * tree)4611 static int dissect_lbmr_ctxinfo(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
4612 {
4613 guint16 flags16 = 0;
4614 guint8 reclen = 0;
4615 static int * const flags[] =
4616 {
4617 &hf_lbmr_ctxinfo_flags_query,
4618 &hf_lbmr_ctxinfo_flags_ip,
4619 &hf_lbmr_ctxinfo_flags_instance,
4620 &hf_lbmr_ctxinfo_flags_tnwg_src,
4621 &hf_lbmr_ctxinfo_flags_tnwg_rcv,
4622 &hf_lbmr_ctxinfo_flags_proxy,
4623 &hf_lbmr_ctxinfo_flags_name,
4624 NULL
4625 };
4626
4627 flags16 = tvb_get_ntohs(tvb, offset + O_LBMR_CTXINFO_T_FLAGS);
4628 reclen = tvb_get_guint8(tvb, offset + O_LBMR_CTXINFO_T_LEN);
4629 proto_tree_add_item(tree, hf_lbmr_ctxinfo_len, tvb, offset + O_LBMR_CTXINFO_T_LEN, L_LBMR_CTXINFO_T_LEN, ENC_BIG_ENDIAN);
4630 proto_tree_add_item(tree, hf_lbmr_ctxinfo_hop_count, tvb, offset + O_LBMR_CTXINFO_T_HOP_COUNT, L_LBMR_CTXINFO_T_HOP_COUNT, ENC_BIG_ENDIAN);
4631 proto_tree_add_bitmask(tree, tvb, offset + O_LBMR_CTXINFO_T_FLAGS, hf_lbmr_ctxinfo_flags, ett_lbmr_ctxinfo_flags, flags, ENC_BIG_ENDIAN);
4632 proto_tree_add_item(tree, hf_lbmr_ctxinfo_port, tvb, offset + O_LBMR_CTXINFO_T_PORT, L_LBMR_CTXINFO_T_FLAGS, ENC_BIG_ENDIAN);
4633 proto_tree_add_item(tree, hf_lbmr_ctxinfo_ip, tvb, offset + O_LBMR_CTXINFO_T_IP, L_LBMR_CTXINFO_T_IP, ENC_BIG_ENDIAN);
4634 proto_tree_add_item(tree, hf_lbmr_ctxinfo_instance, tvb, offset + O_LBMR_CTXINFO_T_INSTANCE, L_LBMR_CTXINFO_T_INSTANCE, ENC_NA);
4635 if ((flags16 & LBMR_CTXINFO_NAME_FLAG) != 0)
4636 {
4637 proto_tree_add_item(tree, hf_lbmr_ctxinfo_name, tvb, offset + L_LBMR_CTXINFO_T, reclen - L_LBMR_CTXINFO_T, ENC_ASCII|ENC_NA);
4638 }
4639 return ((int)reclen);
4640 }
4641
4642 /*----------------------------------------------------------------------------*/
4643 /* LBMR Topic Res Request dissection functions. */
4644 /*----------------------------------------------------------------------------*/
dissect_lbmr_topic_res_request(tvbuff_t * tvb,int offset,packet_info * pinfo _U_,proto_tree * tree)4645 static int dissect_lbmr_topic_res_request(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
4646 {
4647 static int * const flags[] =
4648 {
4649 &hf_lbmr_topic_res_request_flags_gw_remote_interest,
4650 &hf_lbmr_topic_res_request_flags_context_query,
4651 &hf_lbmr_topic_res_request_flags_context_advertisement,
4652 &hf_lbmr_topic_res_request_flags_gateway_meta,
4653 &hf_lbmr_topic_res_request_flags_advertisement,
4654 &hf_lbmr_topic_res_request_flags_query,
4655 &hf_lbmr_topic_res_request_flags_wildcard_query,
4656 NULL
4657 };
4658
4659 proto_tree_add_bitmask(tree, tvb, offset + O_LBMR_TOPIC_RES_REQUEST_T_FLAGS, hf_lbmr_topic_res_request_flags, ett_lbmr_topic_res_request_flags, flags, ENC_BIG_ENDIAN);
4660 return (L_LBMR_TOPIC_RES_REQUEST_T);
4661 }
4662
4663 /*----------------------------------------------------------------------------*/
4664 /* LBMR Remote Domain Route dissection functions. */
4665 /*----------------------------------------------------------------------------*/
dissect_lbmr_remote_domain_route(tvbuff_t * tvb,int offset,packet_info * pinfo _U_,proto_tree * tree)4666 static int dissect_lbmr_remote_domain_route(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
4667 {
4668 guint16 num_domains;
4669 int len_dissected = 0;
4670 int ofs = 0;
4671 guint16 idx;
4672
4673 num_domains = tvb_get_ntohs(tvb, offset + O_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_NUM_DOMAINS);
4674 proto_tree_add_item(tree, hf_lbmr_remote_domain_route_hdr_num_domains, tvb, offset + O_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_NUM_DOMAINS, L_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_NUM_DOMAINS, ENC_BIG_ENDIAN);
4675 proto_tree_add_item(tree, hf_lbmr_remote_domain_route_hdr_ip, tvb, offset + O_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_IP, L_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_IP, ENC_BIG_ENDIAN);
4676 proto_tree_add_item(tree, hf_lbmr_remote_domain_route_hdr_port, tvb, offset + O_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_PORT, L_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_PORT, ENC_BIG_ENDIAN);
4677 proto_tree_add_item(tree, hf_lbmr_remote_domain_route_hdr_reserved, tvb, offset + O_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_RESERVED, L_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_RESERVED, ENC_BIG_ENDIAN);
4678 proto_tree_add_item(tree, hf_lbmr_remote_domain_route_hdr_length, tvb, offset + O_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_LENGTH, L_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_LENGTH, ENC_BIG_ENDIAN);
4679 len_dissected = L_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T;
4680 ofs = offset + L_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T;
4681 for (idx = 0; idx < num_domains; ++idx)
4682 {
4683 proto_tree_add_item(tree, hf_lbmr_remote_domain_route_hdr_domain, tvb, ofs, sizeof(lbm_uint32_t), ENC_BIG_ENDIAN);
4684 len_dissected += (int)sizeof(lbm_uint32_t);
4685 ofs += (int)sizeof(lbm_uint32_t);
4686 }
4687 return (len_dissected);
4688 }
4689
4690 /*----------------------------------------------------------------------------*/
4691 /* LBMR Remote ContextInfo option dissection functions. */
4692 /*----------------------------------------------------------------------------*/
dissect_lbmr_rctxinfo_rec_address_opt(tvbuff_t * tvb,int offset,packet_info * pinfo _U_,proto_tree * tree)4693 static int dissect_lbmr_rctxinfo_rec_address_opt(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
4694 {
4695 proto_tree * subtree = NULL;
4696 proto_item * subtree_item = NULL;
4697
4698 subtree_item = proto_tree_add_item(tree, hf_lbmr_rctxinfo_rec_address, tvb, offset, L_LBMR_RCTXINFO_REC_ADDRESS_OPT_T, ENC_NA);
4699 subtree = proto_item_add_subtree(subtree_item, ett_lbmr_rctxinfo_rec_address);
4700 proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_address_type, tvb, offset + O_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_TYPE, L_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_TYPE, ENC_BIG_ENDIAN);
4701 proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_address_len, tvb, offset + O_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_LEN, L_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_LEN, ENC_BIG_ENDIAN);
4702 proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_address_flags, tvb, offset + O_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_FLAGS, L_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_FLAGS, ENC_BIG_ENDIAN);
4703 proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_address_domain_id, tvb, offset + O_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_DOMAIN_ID, L_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_DOMAIN_ID, ENC_BIG_ENDIAN);
4704 proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_address_ip, tvb, offset + O_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_IP, L_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_IP, ENC_BIG_ENDIAN);
4705 proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_address_port, tvb, offset + O_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_PORT, L_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_PORT, ENC_BIG_ENDIAN);
4706 proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_address_res, tvb, offset + O_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_RES, L_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_RES, ENC_BIG_ENDIAN);
4707 return ((int)L_LBMR_RCTXINFO_REC_ADDRESS_OPT_T);
4708 }
4709
dissect_lbmr_rctxinfo_rec_instance_opt(tvbuff_t * tvb,int offset,packet_info * pinfo _U_,proto_tree * tree)4710 static int dissect_lbmr_rctxinfo_rec_instance_opt(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
4711 {
4712 proto_tree * subtree = NULL;
4713 proto_item * subtree_item = NULL;
4714 guint8 len = 0;
4715
4716 len = tvb_get_guint8(tvb, offset + O_LBMR_RCTXINFO_REC_INSTANCE_OPT_T_LEN);
4717 subtree_item = proto_tree_add_item(tree, hf_lbmr_rctxinfo_rec_instance, tvb, offset, (int)len, ENC_NA);
4718 subtree = proto_item_add_subtree(subtree_item, ett_lbmr_rctxinfo_rec_instance);
4719 proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_instance_type, tvb, offset + O_LBMR_RCTXINFO_REC_INSTANCE_OPT_T_TYPE, L_LBMR_RCTXINFO_REC_INSTANCE_OPT_T_TYPE, ENC_BIG_ENDIAN);
4720 proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_instance_len, tvb, offset + O_LBMR_RCTXINFO_REC_INSTANCE_OPT_T_LEN, L_LBMR_RCTXINFO_REC_INSTANCE_OPT_T_LEN, ENC_BIG_ENDIAN);
4721 proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_instance_flags, tvb, offset + O_LBMR_RCTXINFO_REC_INSTANCE_OPT_T_FLAGS, L_LBMR_RCTXINFO_REC_INSTANCE_OPT_T_FLAGS, ENC_BIG_ENDIAN);
4722 proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_instance_instance, tvb, offset + O_LBMR_RCTXINFO_REC_INSTANCE_OPT_T_INSTANCE, L_LBMR_RCTXINFO_REC_INSTANCE_OPT_T_INSTANCE, ENC_NA);
4723 return ((int)L_LBMR_RCTXINFO_REC_INSTANCE_OPT_T);
4724 }
4725
dissect_lbmr_rctxinfo_rec_odomain_opt(tvbuff_t * tvb,int offset,packet_info * pinfo _U_,proto_tree * tree)4726 static int dissect_lbmr_rctxinfo_rec_odomain_opt(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
4727 {
4728 proto_tree * subtree = NULL;
4729 proto_item * subtree_item = NULL;
4730 guint8 len = 0;
4731
4732 len = tvb_get_guint8(tvb, offset + O_LBMR_RCTXINFO_REC_ODOMAIN_OPT_T_LEN);
4733 subtree_item = proto_tree_add_item(tree, hf_lbmr_rctxinfo_rec_odomain, tvb, offset, (int)len, ENC_NA);
4734 subtree = proto_item_add_subtree(subtree_item, ett_lbmr_rctxinfo_rec_odomain);
4735 proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_odomain_type, tvb, offset + O_LBMR_RCTXINFO_REC_ODOMAIN_OPT_T_TYPE, L_LBMR_RCTXINFO_REC_ODOMAIN_OPT_T_TYPE, ENC_BIG_ENDIAN);
4736 proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_odomain_len, tvb, offset + O_LBMR_RCTXINFO_REC_ODOMAIN_OPT_T_LEN, L_LBMR_RCTXINFO_REC_ODOMAIN_OPT_T_LEN, ENC_BIG_ENDIAN);
4737 proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_odomain_flags, tvb, offset + O_LBMR_RCTXINFO_REC_ODOMAIN_OPT_T_FLAGS, L_LBMR_RCTXINFO_REC_ODOMAIN_OPT_T_FLAGS, ENC_BIG_ENDIAN);
4738 proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_odomain_domain_id, tvb, offset + O_LBMR_RCTXINFO_REC_ODOMAIN_OPT_T_DOMAIN_ID, L_LBMR_RCTXINFO_REC_ODOMAIN_OPT_T_DOMAIN_ID, ENC_BIG_ENDIAN);
4739 return ((int)L_LBMR_RCTXINFO_REC_ODOMAIN_OPT_T);
4740 }
4741
dissect_lbmr_rctxinfo_rec_name_opt(tvbuff_t * tvb,int offset,packet_info * pinfo _U_,proto_tree * tree)4742 static int dissect_lbmr_rctxinfo_rec_name_opt(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
4743 {
4744 proto_tree * subtree = NULL;
4745 proto_item * subtree_item = NULL;
4746 guint8 len = 0;
4747 int name_len = 0;
4748
4749 len = tvb_get_guint8(tvb, offset + O_LBMR_RCTXINFO_REC_NAME_OPT_T_LEN);
4750 subtree_item = proto_tree_add_item(tree, hf_lbmr_rctxinfo_rec_name, tvb, offset, (int)len, ENC_NA);
4751 subtree = proto_item_add_subtree(subtree_item, ett_lbmr_rctxinfo_rec_name);
4752 proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_name_type, tvb, offset + O_LBMR_RCTXINFO_REC_NAME_OPT_T_TYPE, L_LBMR_RCTXINFO_REC_NAME_OPT_T_TYPE, ENC_BIG_ENDIAN);
4753 proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_name_len, tvb, offset + O_LBMR_RCTXINFO_REC_NAME_OPT_T_LEN, L_LBMR_RCTXINFO_REC_NAME_OPT_T_LEN, ENC_BIG_ENDIAN);
4754 proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_name_flags, tvb, offset + O_LBMR_RCTXINFO_REC_NAME_OPT_T_FLAGS, L_LBMR_RCTXINFO_REC_NAME_OPT_T_FLAGS, ENC_BIG_ENDIAN);
4755 name_len = ((int)len) - L_LBMR_RCTXINFO_REC_NAME_OPT_T;
4756 proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_name_name, tvb, offset + L_LBMR_RCTXINFO_REC_NAME_OPT_T, name_len, ENC_ASCII|ENC_NA);
4757 return ((int)len);
4758 }
4759
dissect_lbmr_rctxinfo_rec_unknown_opt(tvbuff_t * tvb,int offset,packet_info * pinfo,proto_tree * tree)4760 static int dissect_lbmr_rctxinfo_rec_unknown_opt(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tree)
4761 {
4762 proto_tree * subtree = NULL;
4763 proto_item * subtree_item = NULL;
4764 guint8 len = 0;
4765 int data_len = 0;
4766 guint8 opt_type;
4767
4768 opt_type = tvb_get_guint8(tvb, offset + O_LBMR_RCTXINFO_REC_OPT_T_TYPE);
4769 len = tvb_get_guint8(tvb, offset + O_LBMR_RCTXINFO_REC_OPT_T_LEN);
4770 subtree_item = proto_tree_add_item(tree, hf_lbmr_rctxinfo_rec_unknown, tvb, offset, (int)len, ENC_NA);
4771 subtree = proto_item_add_subtree(subtree_item, ett_lbmr_rctxinfo_rec_unknown);
4772 proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_unknown_type, tvb, offset + O_LBMR_RCTXINFO_REC_OPT_T_TYPE, L_LBMR_RCTXINFO_REC_OPT_T_TYPE, ENC_BIG_ENDIAN);
4773 proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_unknown_len, tvb, offset + O_LBMR_RCTXINFO_REC_OPT_T_LEN, L_LBMR_RCTXINFO_REC_OPT_T_LEN, ENC_BIG_ENDIAN);
4774 proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_unknown_flags, tvb, offset + O_LBMR_RCTXINFO_REC_OPT_T_FLAGS, L_LBMR_RCTXINFO_REC_OPT_T_FLAGS, ENC_BIG_ENDIAN);
4775 data_len = ((int) len) - L_LBMR_RCTXINFO_REC_OPT_T;
4776 proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_unknown_data, tvb, offset + L_LBMR_RCTXINFO_REC_OPT_T, data_len, ENC_NA);
4777 expert_add_info_format(pinfo, subtree_item, &ei_lbmr_analysis_invalid_value, "Unknown LBMR RCTXINFO option 0x%02x", opt_type);
4778 return ((int) len);
4779 }
4780
4781 /*----------------------------------------------------------------------------*/
4782 /* LBMR Remote ContextInfo dissection functions. */
4783 /*----------------------------------------------------------------------------*/
dissect_lbmr_rctxinfo_rec(tvbuff_t * tvb,int offset,packet_info * pinfo,proto_tree * tree)4784 static int dissect_lbmr_rctxinfo_rec(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tree)
4785 {
4786 proto_tree * subtree = NULL;
4787 proto_item * subtree_item = NULL;
4788 guint8 opt_type = 0;
4789 static int * const flags[] =
4790 {
4791 &hf_lbmr_rctxinfo_rec_flags_query,
4792 NULL
4793 };
4794 guint16 len = 0;
4795 int rec_len_remaining = 0;
4796 int ofs = 0;
4797 int opt_len_dissected = 0;
4798 int len_dissected = 0;
4799
4800 len = tvb_get_ntohs(tvb, offset + O_LBMR_RCTXINFO_REC_T_LEN);
4801 subtree_item = proto_tree_add_item(tree, hf_lbmr_rctxinfo_rec, tvb, offset, -1, ENC_NA);
4802 subtree = proto_item_add_subtree(subtree_item, ett_lbmr_rctxinfo_rec);
4803 proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_len, tvb, offset + O_LBMR_RCTXINFO_REC_T_LEN, L_LBMR_RCTXINFO_REC_T_LEN, ENC_BIG_ENDIAN);
4804 proto_tree_add_bitmask(subtree, tvb, offset + O_LBMR_RCTXINFO_REC_T_FLAGS, hf_lbmr_rctxinfo_rec_flags, ett_lbmr_rctxinfo_rec_flags, flags, ENC_BIG_ENDIAN);
4805 ofs = offset + L_LBMR_RCTXINFO_REC_T;
4806 rec_len_remaining = len - L_LBMR_RCTXINFO_REC_T;
4807 len_dissected = L_LBMR_RCTXINFO_REC_T;
4808 while (rec_len_remaining > 0)
4809 {
4810 opt_type = tvb_get_guint8(tvb, ofs + O_LBMR_RCTXINFO_REC_OPT_T_TYPE);
4811 switch (opt_type)
4812 {
4813 case LBMR_RCTXINFO_OPT_ADDRESS_TYPE:
4814 opt_len_dissected = dissect_lbmr_rctxinfo_rec_address_opt(tvb, ofs, pinfo, subtree);
4815 break;
4816 case LBMR_RCTXINFO_OPT_INSTANCE_TYPE:
4817 opt_len_dissected = dissect_lbmr_rctxinfo_rec_instance_opt(tvb, ofs, pinfo, subtree);
4818 break;
4819 case LBMR_RCTXINFO_OPT_ODOMAIN_TYPE:
4820 opt_len_dissected = dissect_lbmr_rctxinfo_rec_odomain_opt(tvb, ofs, pinfo, subtree);
4821 break;
4822 case LBMR_RCTXINFO_OPT_NAME_TYPE:
4823 opt_len_dissected = dissect_lbmr_rctxinfo_rec_name_opt(tvb, ofs, pinfo, subtree);
4824 break;
4825 default:
4826 opt_len_dissected = dissect_lbmr_rctxinfo_rec_unknown_opt(tvb, ofs, pinfo, subtree);
4827 break;
4828 }
4829 len_dissected += opt_len_dissected;
4830 rec_len_remaining -= opt_len_dissected;
4831 ofs += opt_len_dissected;
4832 }
4833 proto_item_set_len(subtree_item, len_dissected);
4834 return (len_dissected);
4835 }
4836
dissect_lbmr_rctxinfo(tvbuff_t * tvb,int offset,packet_info * pinfo,proto_tree * tree)4837 static int dissect_lbmr_rctxinfo(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tree)
4838 {
4839 guint16 num_recs = 0;
4840 int ofs = 0;
4841 int len_dissected = 0;
4842 int rec_len_dissected = 0;
4843
4844 num_recs = tvb_get_ntohs(tvb, offset + O_LBMR_RCTXINFO_T_NUM_RECS);
4845 proto_tree_add_item(tree, hf_lbmr_rctxinfo_len, tvb, offset + O_LBMR_RCTXINFO_T_LEN, L_LBMR_RCTXINFO_T_LEN, ENC_BIG_ENDIAN);
4846 proto_tree_add_item(tree, hf_lbmr_rctxinfo_num_recs, tvb, offset + O_LBMR_RCTXINFO_T_NUM_RECS, L_LBMR_RCTXINFO_T_NUM_RECS, ENC_BIG_ENDIAN);
4847 proto_tree_add_item(tree, hf_lbmr_rctxinfo_reserved, tvb, offset + O_LBMR_RCTXINFO_T_RESERVED, L_LBMR_RCTXINFO_T_RESERVED, ENC_BIG_ENDIAN);
4848 len_dissected = L_LBMR_RCTXINFO_T;
4849 ofs = offset + L_LBMR_RCTXINFO_T;
4850 while (num_recs > 0)
4851 {
4852 rec_len_dissected = dissect_lbmr_rctxinfo_rec(tvb, ofs, pinfo, tree);
4853 ofs += rec_len_dissected;
4854 len_dissected += rec_len_dissected;
4855 num_recs--;
4856 }
4857 return (len_dissected);
4858 }
4859
format_ver_type(tvbuff_t * tvb,int offset,packet_info * pinfo _U_,proto_tree * tree)4860 static proto_item * format_ver_type(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
4861 {
4862 proto_item * type_item = NULL;
4863
4864 proto_tree_add_item(tree, hf_lbmr_hdr_ver, tvb, offset + O_LBMR_HDR_T_VER_TYPE, L_LBMR_HDR_T_VER_TYPE, ENC_BIG_ENDIAN);
4865 proto_tree_add_item(tree, hf_lbmr_hdr_opt, tvb, offset + O_LBMR_HDR_T_VER_TYPE, L_LBMR_HDR_T_VER_TYPE, ENC_BIG_ENDIAN);
4866 type_item = proto_tree_add_item(tree, hf_lbmr_hdr_type, tvb, offset + O_LBMR_HDR_T_VER_TYPE, L_LBMR_HDR_T_VER_TYPE, ENC_BIG_ENDIAN);
4867 return (type_item);
4868 }
4869
4870 /*----------------------------------------------------------------------------*/
4871 /* LBMR Option dissection functions. */
4872 /*----------------------------------------------------------------------------*/
dissect_lbmr_opt_len(tvbuff_t * tvb,int offset,packet_info * pinfo _U_,proto_tree * tree)4873 static int dissect_lbmr_opt_len(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
4874 {
4875 proto_tree * subtree = NULL;
4876 proto_item * subtree_item = NULL;
4877 int len = 0;
4878
4879 subtree_item = proto_tree_add_item(tree, hf_lbmr_opt_len, tvb, offset, L_LBMR_LBMR_OPT_SRC_ID_T, ENC_NA);
4880 subtree = proto_item_add_subtree(subtree_item, ett_lbmr_opt_len);
4881 proto_tree_add_item(subtree, hf_lbmr_opt_len_type, tvb, offset + O_LBMR_LBMR_OPT_LEN_T_TYPE, L_LBMR_LBMR_OPT_LEN_T_TYPE, ENC_BIG_ENDIAN);
4882 proto_tree_add_item(subtree, hf_lbmr_opt_len_len, tvb, offset + O_LBMR_LBMR_OPT_LEN_T_LEN, L_LBMR_LBMR_OPT_LEN_T_LEN, ENC_BIG_ENDIAN);
4883 proto_tree_add_item(subtree, hf_lbmr_opt_len_total_len, tvb, offset + O_LBMR_LBMR_OPT_LEN_T_TOTAL_LEN, L_LBMR_LBMR_OPT_LEN_T_TOTAL_LEN, ENC_BIG_ENDIAN);
4884 len = L_LBMR_LBMR_OPT_LEN_T;
4885 return (len);
4886 }
4887
dissect_lbmr_opt_src_id(tvbuff_t * tvb,int offset,packet_info * pinfo _U_,proto_tree * tree)4888 static int dissect_lbmr_opt_src_id(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
4889 {
4890 proto_tree * subtree = NULL;
4891 proto_item * subtree_item = NULL;
4892 static int * const flags[] =
4893 {
4894 &hf_lbmr_opt_src_id_flags_ignore,
4895 NULL
4896 };
4897
4898 subtree_item = proto_tree_add_item(tree, hf_lbmr_opt_src_id, tvb, offset, L_LBMR_LBMR_OPT_SRC_ID_T, ENC_NA);
4899 subtree = proto_item_add_subtree(subtree_item, ett_lbmr_opt_src_id);
4900 proto_tree_add_item(subtree, hf_lbmr_opt_src_id_type, tvb, offset + O_LBMR_LBMR_OPT_SRC_ID_T_TYPE, L_LBMR_LBMR_OPT_SRC_ID_T_TYPE, ENC_BIG_ENDIAN);
4901 proto_tree_add_item(subtree, hf_lbmr_opt_src_id_len, tvb, offset + O_LBMR_LBMR_OPT_SRC_ID_T_LEN, L_LBMR_LBMR_OPT_SRC_ID_T_LEN, ENC_BIG_ENDIAN);
4902 proto_tree_add_bitmask(subtree, tvb, offset + O_LBMR_LBMR_OPT_SRC_ID_T_FLAGS, hf_lbmr_opt_src_id_flags, ett_lbmr_opt_src_id_flags, flags, ENC_BIG_ENDIAN);
4903 proto_tree_add_item(subtree, hf_lbmr_opt_src_id_src_id, tvb, offset + O_LBMR_LBMR_OPT_SRC_ID_T_SRC_ID, L_LBMR_LBMR_OPT_SRC_ID_T_SRC_ID, ENC_NA);
4904 return (L_LBMR_LBMR_OPT_SRC_ID_T);
4905 }
4906
dissect_lbmr_opt_src_type(tvbuff_t * tvb,int offset,packet_info * pinfo _U_,proto_tree * tree)4907 static int dissect_lbmr_opt_src_type(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
4908 {
4909 proto_tree * subtree = NULL;
4910 proto_item * subtree_item = NULL;
4911 static int * const flags[] =
4912 {
4913 &hf_lbmr_opt_src_type_flags_ignore,
4914 NULL
4915 };
4916
4917 subtree_item = proto_tree_add_item(tree, hf_lbmr_opt_src_type, tvb, offset, L_LBMR_LBMR_OPT_SRC_TYPE_T, ENC_NA);
4918 subtree = proto_item_add_subtree(subtree_item, ett_lbmr_opt_src_type);
4919 proto_tree_add_item(subtree, hf_lbmr_opt_src_type_type, tvb, offset + O_LBMR_LBMR_OPT_SRC_TYPE_T_TYPE, L_LBMR_LBMR_OPT_SRC_TYPE_T_TYPE, ENC_BIG_ENDIAN);
4920 proto_tree_add_item(subtree, hf_lbmr_opt_src_type_len, tvb, offset + O_LBMR_LBMR_OPT_SRC_TYPE_T_LEN, L_LBMR_LBMR_OPT_SRC_TYPE_T_LEN, ENC_BIG_ENDIAN);
4921 proto_tree_add_bitmask(subtree, tvb, offset + O_LBMR_LBMR_OPT_SRC_TYPE_T_FLAGS, hf_lbmr_opt_src_type_flags, ett_lbmr_opt_src_type_flags, flags, ENC_BIG_ENDIAN);
4922 proto_tree_add_item(subtree, hf_lbmr_opt_src_type_src_type, tvb, offset + O_LBMR_LBMR_OPT_SRC_TYPE_T_SRC_TYPE, L_LBMR_LBMR_OPT_SRC_TYPE_T_SRC_TYPE, ENC_BIG_ENDIAN);
4923 return (L_LBMR_LBMR_OPT_SRC_TYPE_T);
4924 }
4925
dissect_lbmr_opt_version(tvbuff_t * tvb,int offset,packet_info * pinfo _U_,proto_tree * tree)4926 static int dissect_lbmr_opt_version(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
4927 {
4928 proto_tree * subtree = NULL;
4929 proto_item * subtree_item = NULL;
4930 static int * const flags[] =
4931 {
4932 &hf_lbmr_opt_version_flags_ignore,
4933 &hf_lbmr_opt_version_flags_ume,
4934 &hf_lbmr_opt_version_flags_umq,
4935 NULL
4936 };
4937
4938 subtree_item = proto_tree_add_item(tree, hf_lbmr_opt_version, tvb, offset, L_LBMR_LBMR_OPT_VERSION_T, ENC_NA);
4939 subtree = proto_item_add_subtree(subtree_item, ett_lbmr_opt_version);
4940 proto_tree_add_item(subtree, hf_lbmr_opt_version_type, tvb, offset + O_LBMR_LBMR_OPT_VERSION_T_TYPE, L_LBMR_LBMR_OPT_VERSION_T_TYPE, ENC_BIG_ENDIAN);
4941 proto_tree_add_item(subtree, hf_lbmr_opt_version_len, tvb, offset + O_LBMR_LBMR_OPT_VERSION_T_LEN, L_LBMR_LBMR_OPT_VERSION_T_LEN, ENC_BIG_ENDIAN);
4942 proto_tree_add_bitmask(subtree, tvb, offset + O_LBMR_LBMR_OPT_VERSION_T_FLAGS, hf_lbmr_opt_version_flags, ett_lbmr_opt_version_flags, flags, ENC_BIG_ENDIAN);
4943 proto_tree_add_item(subtree, hf_lbmr_opt_version_version, tvb, offset + O_LBMR_LBMR_OPT_VERSION_T_VERSION, L_LBMR_LBMR_OPT_VERSION_T_VERSION, ENC_BIG_ENDIAN);
4944 return (L_LBMR_LBMR_OPT_VERSION_T);
4945 }
4946
dissect_lbmr_opt_local_domain(tvbuff_t * tvb,int offset,packet_info * pinfo _U_,proto_tree * tree)4947 static int dissect_lbmr_opt_local_domain(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
4948 {
4949 proto_tree * subtree = NULL;
4950 proto_item * subtree_item = NULL;
4951 static int * const flags[] =
4952 {
4953 &hf_lbmr_opt_local_domain_flags_ignore,
4954 NULL
4955 };
4956
4957 subtree_item = proto_tree_add_item(tree, hf_lbmr_opt_local_domain, tvb, offset, L_LBMR_LBMR_OPT_LOCAL_DOMAIN_T, ENC_NA);
4958 subtree = proto_item_add_subtree(subtree_item, ett_lbmr_opt_local_domain);
4959 proto_tree_add_item(subtree, hf_lbmr_opt_local_domain_type, tvb, offset + O_LBMR_LBMR_OPT_LOCAL_DOMAIN_T_TYPE, L_LBMR_LBMR_OPT_LOCAL_DOMAIN_T_TYPE, ENC_BIG_ENDIAN);
4960 proto_tree_add_item(subtree, hf_lbmr_opt_local_domain_len, tvb, offset + O_LBMR_LBMR_OPT_LOCAL_DOMAIN_T_LEN, L_LBMR_LBMR_OPT_LOCAL_DOMAIN_T_LEN, ENC_BIG_ENDIAN);
4961 proto_tree_add_bitmask(subtree, tvb, offset + O_LBMR_LBMR_OPT_LOCAL_DOMAIN_T_FLAGS, hf_lbmr_opt_local_domain_flags, ett_lbmr_opt_local_domain_flags, flags, ENC_BIG_ENDIAN);
4962 proto_tree_add_item(subtree, hf_lbmr_opt_local_domain_local_domain_id, tvb, offset + O_LBMR_LBMR_OPT_LOCAL_DOMAIN_T_LOCAL_DOMAIN_ID, L_LBMR_LBMR_OPT_LOCAL_DOMAIN_T_LOCAL_DOMAIN_ID, ENC_BIG_ENDIAN);
4963 return (L_LBMR_LBMR_OPT_LOCAL_DOMAIN_T);
4964 }
4965
dissect_lbmr_opt_unknown(tvbuff_t * tvb,int offset,packet_info * pinfo,proto_tree * tree)4966 static int dissect_lbmr_opt_unknown(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tree)
4967 {
4968 proto_tree * subtree = NULL;
4969 proto_item * subtree_item = NULL;
4970 guint8 len = 0;
4971 proto_item * type_item = NULL;
4972 guint8 opt_type = 0;
4973
4974 subtree_item = proto_tree_add_item(tree, hf_lbmr_opt_unknown, tvb, offset, -1, ENC_NA);
4975 subtree = proto_item_add_subtree(subtree_item, ett_lbmr_opt_unknown);
4976 opt_type = tvb_get_guint8(tvb, offset + O_LBMR_LBMR_OPT_HDR_T_TYPE);
4977 type_item = proto_tree_add_item(subtree, hf_lbmr_opt_unknown_type, tvb, offset + O_LBMR_LBMR_OPT_HDR_T_TYPE, L_LBMR_LBMR_OPT_HDR_T_TYPE, ENC_BIG_ENDIAN);
4978 len = tvb_get_guint8(tvb, offset + O_LBMR_LBMR_OPT_HDR_T_LEN);
4979 proto_tree_add_item(subtree, hf_lbmr_opt_unknown_len, tvb, offset + O_LBMR_LBMR_OPT_HDR_T_LEN, L_LBMR_LBMR_OPT_HDR_T_LEN, ENC_BIG_ENDIAN);
4980 proto_tree_add_item(subtree, hf_lbmr_opt_unknown_flags, tvb, offset + O_LBMR_LBMR_OPT_HDR_T_FLAGS, L_LBMR_LBMR_OPT_HDR_T_FLAGS, ENC_NA);
4981 proto_tree_add_item(subtree, hf_lbmr_opt_unknown_data, tvb, offset + L_LBMR_LBMR_OPT_HDR_T, (int) len - L_LBMR_LBMR_OPT_HDR_T, ENC_NA);
4982 proto_item_set_len(subtree_item, (int) len);
4983 expert_add_info_format(pinfo, type_item, &ei_lbmr_analysis_invalid_value, "Unknown LBMR option type 0x%02x", opt_type);
4984 return ((int) len);
4985 }
4986
dissect_lbmr_options(tvbuff_t * tvb,int offset,packet_info * pinfo,proto_tree * tree)4987 static int dissect_lbmr_options(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tree)
4988 {
4989 proto_tree * opt_tree = NULL;
4990 proto_item * ti = NULL;
4991 int curr_offset = offset;
4992 int len = 0;
4993
4994 ti = proto_tree_add_item(tree, hf_lbmr_opts, tvb, curr_offset, -1, ENC_NA);
4995 opt_tree = proto_item_add_subtree(ti, ett_lbmr_opts);
4996 while (tvb_reported_length_remaining(tvb, curr_offset) > 0)
4997 {
4998 int opt_len;
4999 guint8 opt_type;
5000
5001 opt_type = tvb_get_guint8(tvb, curr_offset + O_LBMR_LBMR_OPT_HDR_T_TYPE);
5002 switch (opt_type)
5003 {
5004 case LBMR_LBMR_OPT_LEN_TYPE:
5005 opt_len = dissect_lbmr_opt_len(tvb, curr_offset, pinfo, opt_tree);
5006 break;
5007 case LBMR_LBMR_OPT_SRC_ID_TYPE:
5008 opt_len = dissect_lbmr_opt_src_id(tvb, curr_offset, pinfo, opt_tree);
5009 break;
5010 case LBMR_LBMR_OPT_SRC_TYPE_TYPE:
5011 opt_len = dissect_lbmr_opt_src_type(tvb, curr_offset, pinfo, opt_tree);
5012 break;
5013 case LBMR_LBMR_OPT_VERSION_TYPE:
5014 opt_len = dissect_lbmr_opt_version(tvb, curr_offset, pinfo, opt_tree);
5015 break;
5016 case LBMR_LBMR_OPT_LOCAL_DOMAIN_TYPE:
5017 opt_len = dissect_lbmr_opt_local_domain(tvb, curr_offset, pinfo, opt_tree);
5018 break;
5019 default:
5020 opt_len = dissect_lbmr_opt_unknown(tvb, curr_offset, pinfo, opt_tree);
5021 break;
5022 }
5023 len += opt_len;
5024 curr_offset += opt_len;
5025 }
5026 return (len);
5027 }
5028
lbmr_tap_queue_packet(packet_info * pinfo,const lbmr_contents_t * contents)5029 static void lbmr_tap_queue_packet(packet_info * pinfo, const lbmr_contents_t * contents)
5030 {
5031 const lbmr_topic_contents_t * topic;
5032 const lbmr_queue_contents_t * queue;
5033
5034 switch (contents->type)
5035 {
5036 case LBMR_CONTENTS_TOPIC:
5037 topic = &(contents->contents.topic);
5038 if (topic->tqr_count > 0)
5039 {
5040 tqr_node_t * tqr = topic->tqr;
5041 while (tqr != NULL)
5042 {
5043 lbm_lbmr_topic_query_tap_info_t * tqr_tap = wmem_new0(wmem_packet_scope(), lbm_lbmr_topic_query_tap_info_t);
5044 tqr_tap->size = (guint16) sizeof(lbm_lbmr_topic_query_tap_info_t);
5045 tqr_tap->topic_length = (guint8)strlen(tqr->topic);
5046 memcpy(tqr_tap->topic, tqr->topic, tqr_tap->topic_length);
5047 tap_queue_packet(lbmr_topic_query_tap_handle, pinfo, (void *) tqr_tap);
5048 tqr = tqr->next;
5049 }
5050 }
5051 if (topic->tir_count > 0)
5052 {
5053 tir_node_t * tir = topic->tir;
5054 while (tir != NULL)
5055 {
5056 lbm_lbmr_topic_advertisement_tap_info_t * tir_tap = wmem_new0(wmem_packet_scope(), lbm_lbmr_topic_advertisement_tap_info_t);
5057 tir_tap->size = (guint16) sizeof(lbm_lbmr_topic_advertisement_tap_info_t);
5058 tir_tap->topic_length = (guint8)strlen(tir->topic);
5059 tir_tap->source_length = (guint8)strlen(tir->source_string);
5060 tir_tap->topic_index = tir->idx;
5061 memcpy(tir_tap->topic, tir->topic, tir_tap->topic_length);
5062 memcpy(tir_tap->source, tir->source_string, tir_tap->source_length);
5063 tap_queue_packet(lbmr_topic_advertisement_tap_handle, pinfo, (void *) tir_tap);
5064 tir = tir->next;
5065 }
5066 }
5067 if (topic->wctqr_count > 0)
5068 {
5069 wctqr_node_t * wctqr = topic->wctqr;
5070 while (wctqr != NULL)
5071 {
5072 lbm_lbmr_pattern_query_tap_info_t * wctqr_tap = wmem_new0(wmem_packet_scope(), lbm_lbmr_pattern_query_tap_info_t);
5073 wctqr_tap->size = (guint16) sizeof(lbm_lbmr_pattern_query_tap_info_t);
5074 wctqr_tap->type = wctqr->type;
5075 wctqr_tap->pattern_length = (guint8)strlen(wctqr->pattern);
5076 memcpy(wctqr_tap->pattern, wctqr->pattern, wctqr_tap->pattern_length);
5077 tap_queue_packet(lbmr_pattern_query_tap_handle, pinfo, (void *) wctqr_tap);
5078 wctqr = wctqr->next;
5079 }
5080 }
5081 break;
5082 case LBMR_CONTENTS_QUEUE:
5083 queue = &(contents->contents.queue);
5084 if (queue->qqr_count > 0)
5085 {
5086 qqr_node_t * qqr = queue->qqr;
5087 while (qqr != NULL)
5088 {
5089 lbm_lbmr_queue_query_tap_info_t * qqr_tap = wmem_new0(wmem_packet_scope(), lbm_lbmr_queue_query_tap_info_t);
5090 qqr_tap->size = (guint16) sizeof(lbm_lbmr_queue_query_tap_info_t);
5091 qqr_tap->queue_length = (guint8)strlen(qqr->queue);
5092 memcpy(qqr_tap->queue, qqr->queue, qqr_tap->queue_length);
5093 tap_queue_packet(lbmr_queue_advertisement_tap_handle, pinfo, (void *) qqr_tap);
5094 qqr = qqr->next;
5095 }
5096 }
5097 if (queue->qir_count > 0)
5098 {
5099 qir_node_t * qir = queue->qir;
5100 while (qir != NULL)
5101 {
5102 lbm_lbmr_queue_advertisement_tap_info_t * qir_tap = wmem_new0(wmem_packet_scope(), lbm_lbmr_queue_advertisement_tap_info_t);
5103 qir_tap->size = (guint16) sizeof(lbm_lbmr_queue_advertisement_tap_info_t);
5104 qir_tap->port = qir->port;
5105 qir_tap->queue_length = (guint8)strlen(qir->queue);
5106 qir_tap->topic_length = (guint8)strlen(qir->topic);
5107 memcpy(qir_tap->queue, qir->queue, qir_tap->queue_length);
5108 memcpy(qir_tap->topic, qir->topic, qir_tap->topic_length);
5109 tap_queue_packet(lbmr_queue_query_tap_handle, pinfo, (void *) qir_tap);
5110 qir = qir->next;
5111 }
5112 }
5113 break;
5114 default:
5115 break;
5116 }
5117 }
5118
5119 /*----------------------------------------------------------------------------*/
5120 /* dissect_lbmr - The dissector for LBM Topic Resolution protocol. */
5121 /*----------------------------------------------------------------------------*/
dissect_lbmr(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * user_data _U_)5122 static int dissect_lbmr(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void * user_data _U_)
5123 {
5124 proto_tree * lbmr_tree = NULL;
5125 proto_item * ti = NULL;
5126 int offset = 0;
5127 guint8 ver_type;
5128 guint8 ver;
5129 guint8 type;
5130 lbmr_contents_t * contents = NULL;
5131 char * tag_name = NULL;
5132 int total_len_dissected = 0;
5133 int len_dissected = 0;
5134 tvbuff_t * packet_tvb = NULL;
5135 proto_item * lbmr_hdr_item = NULL;
5136 proto_tree * lbmr_hdr_tree = NULL;
5137
5138 col_set_str(pinfo->cinfo, COL_PROTOCOL, "LBMR");
5139 if (lbmr_use_tag)
5140 {
5141 tag_name = lbmr_tag_find(pinfo);
5142 }
5143 col_clear(pinfo->cinfo, COL_INFO);
5144 if (tag_name != NULL)
5145 {
5146 col_add_fstr(pinfo->cinfo, COL_INFO, "[Tag: %s]", tag_name);
5147 }
5148 col_set_fence(pinfo->cinfo, COL_INFO);
5149
5150 ver_type = tvb_get_guint8(tvb, O_LBMR_HDR_T_VER_TYPE);
5151 ver = LBMR_HDR_VER(ver_type);
5152 type = LBMR_HDR_TYPE(ver_type);
5153 offset = 0;
5154 total_len_dissected = 0;
5155 packet_tvb = tvb;
5156
5157 if ((ver_type & LBMR_HDR_TYPE_OPTS_MASK) != 0)
5158 {
5159 guint8 opt_type;
5160 guint8 opt_len;
5161
5162 opt_type = tvb_get_guint8(tvb, -L_LBMR_LBMR_OPT_LEN_T + O_LBMR_LBMR_OPT_LEN_T_TYPE);
5163 opt_len = tvb_get_guint8(tvb, -L_LBMR_LBMR_OPT_LEN_T + O_LBMR_LBMR_OPT_LEN_T_LEN);
5164 if ((opt_type == LBMR_LBMR_OPT_LEN_TYPE) && (((gint)opt_len) == L_LBMR_LBMR_OPT_LEN_T))
5165 {
5166 gint opt_total_len = 0;
5167 gint packet_len;
5168
5169 packet_len = tvb_reported_length_remaining(tvb, 0);
5170 opt_total_len = tvb_get_ntohis(tvb, -L_LBMR_LBMR_OPT_LEN_T + O_LBMR_LBMR_OPT_LEN_T_TOTAL_LEN);
5171 if (packet_len > opt_total_len)
5172 {
5173 gint tvb_len = packet_len - opt_total_len;
5174
5175 packet_tvb = tvb_new_subset_length(tvb, 0, tvb_len);
5176 }
5177 }
5178 }
5179
5180 if (type == LBMR_HDR_TYPE_EXT)
5181 {
5182 guint8 ext_type = 0;
5183 const gchar * ext_string;
5184 proto_item * ext_type_item = NULL;
5185
5186 ext_type = tvb_get_guint8(tvb, O_LBMR_HDR_EXT_TYPE_T_EXT_TYPE);
5187 ext_string = val_to_str(ext_type, lbmr_ext_packet_type, "Unknown(0x%02x)");
5188 col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "ExtType %s", ext_string);
5189 if (tag_name != NULL)
5190 {
5191 ti = proto_tree_add_protocol_format(tree, proto_lbmr, tvb, O_LBMR_HDR_EXT_TYPE_T_VER_TYPE, -1, "LBM Topic Resolution Protocol (Tag: %s): Version %u, Type 0x%x (%s), ExtType %s",
5192 tag_name, ver, type, val_to_str(type, lbmr_packet_type, "Unknown(0x%02x)"), ext_string);
5193 }
5194 else
5195 {
5196 ti = proto_tree_add_protocol_format(tree, proto_lbmr, tvb, O_LBMR_HDR_EXT_TYPE_T_VER_TYPE, -1, "LBM Topic Resolution Protocol: Version %u, Type 0x%x (%s), ExtType %s",
5197 ver, type, val_to_str(type, lbmr_packet_type, "Unknown(0x%02x)"), ext_string);
5198 }
5199 lbmr_tree = proto_item_add_subtree(ti, ett_lbmr);
5200 if (tag_name != NULL)
5201 {
5202 proto_item * item = NULL;
5203
5204 item = proto_tree_add_string(lbmr_tree, hf_lbmr_tag, tvb, 0, 0, tag_name);
5205 proto_item_set_generated(item);
5206 }
5207 lbmr_hdr_item = proto_tree_add_item(lbmr_tree, hf_lbmr_hdr, tvb, 0, -1, ENC_NA);
5208 lbmr_hdr_tree = proto_item_add_subtree(lbmr_hdr_item, ett_lbmr_hdr);
5209 (void) format_ver_type(tvb, 0, pinfo, lbmr_hdr_tree);
5210 ext_type_item = proto_tree_add_item(lbmr_hdr_tree, hf_lbmr_hdr_ext_type, tvb, O_LBMR_HDR_EXT_TYPE_T_EXT_TYPE, L_LBMR_HDR_EXT_TYPE_T_EXT_TYPE, ENC_BIG_ENDIAN);
5211
5212 /* ver_type and ext_type have already been processed. But their dissected length is included in the individual type dissections below. */
5213 switch (ext_type)
5214 {
5215 case LBMR_HDR_EXT_TYPE_UME_PROXY_SRC_ELECT:
5216 len_dissected = dissect_lbmr_pser(packet_tvb, offset, pinfo, lbmr_tree);
5217 break;
5218 case LBMR_HDR_EXT_TYPE_UMQ_QUEUE_MGMT:
5219 offset += L_LBMR_UMQ_QMGMT_HDR_T_VER_TYPE + L_LBMR_UMQ_QMGMT_HDR_T_EXT_TYPE;
5220 total_len_dissected += L_LBMR_UMQ_QMGMT_HDR_T_VER_TYPE + L_LBMR_UMQ_QMGMT_HDR_T_EXT_TYPE;
5221 len_dissected = lbmr_dissect_umq_qmgmt(packet_tvb, offset - 2, pinfo, lbmr_tree);
5222 break;
5223 case LBMR_HDR_EXT_TYPE_CONTEXT_INFO:
5224 len_dissected = dissect_lbmr_ctxinfo(packet_tvb, offset, pinfo, lbmr_tree);
5225 break;
5226 case LBMR_HDR_EXT_TYPE_TOPIC_RES_REQUEST:
5227 len_dissected = dissect_lbmr_topic_res_request(packet_tvb, offset, pinfo, lbmr_tree);
5228 break;
5229 case LBMR_HDR_EXT_TYPE_TNWG_MSG:
5230 len_dissected = dissect_lbmr_tnwg(packet_tvb, offset, pinfo, lbmr_tree);
5231 break;
5232 case LBMR_HDR_EXT_TYPE_REMOTE_DOMAIN_ROUTE:
5233 len_dissected = dissect_lbmr_remote_domain_route(packet_tvb, offset, pinfo, lbmr_tree);
5234 break;
5235 case LBMR_HDR_EXT_TYPE_REMOTE_CONTEXT_INFO:
5236 len_dissected = dissect_lbmr_rctxinfo(packet_tvb, offset, pinfo, lbmr_tree);
5237 break;
5238 default:
5239 len_dissected = L_LBMR_HDR_EXT_TYPE_T_VER_TYPE + L_LBMR_HDR_EXT_TYPE_T_EXT_TYPE;
5240 expert_add_info_format(pinfo, ext_type_item, &ei_lbmr_analysis_invalid_value, "Unknown LBMR extended type 0x%02x", ext_type);
5241 break;
5242 }
5243 offset += len_dissected;
5244 total_len_dissected += len_dissected;
5245 }
5246 else
5247 {
5248 guint8 tqrs = 0;
5249 guint16 tirs = 0;
5250 gboolean rd_keepalive = FALSE;
5251 gboolean topic_mgmt = FALSE;
5252 gboolean client_rd_keepalive = FALSE;
5253 gboolean zero_tirs_tqrs = FALSE;
5254 proto_item * type_item = NULL;
5255
5256 tqrs = tvb_get_guint8(tvb, O_LBMR_HDR_T_TQRS);
5257 tirs = tvb_get_ntohs(tvb, O_LBMR_HDR_T_TIRS);
5258 if ((tqrs == 0) && (tirs == 0))
5259 {
5260 zero_tirs_tqrs = TRUE;
5261 }
5262 if ((type == LBMR_HDR_TYPE_NORMAL) && zero_tirs_tqrs)
5263 {
5264 rd_keepalive = TRUE;
5265 }
5266 else if (zero_tirs_tqrs && ((type == LBMR_HDR_TYPE_UCAST_RCV_ALIVE) || (type == LBMR_HDR_TYPE_UCAST_SRC_ALIVE)))
5267 {
5268 client_rd_keepalive = TRUE;
5269 }
5270 else if (type == LBMR_HDR_TYPE_TOPIC_MGMT)
5271 {
5272 topic_mgmt = TRUE;
5273 }
5274 switch (type)
5275 {
5276 case LBMR_HDR_TYPE_QUEUE_RES:
5277 col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "QQRs %u QIRs %" G_GUINT16_FORMAT, tqrs, tirs);
5278 break;
5279 default:
5280 if (rd_keepalive)
5281 {
5282 col_append_sep_str(pinfo->cinfo, COL_INFO, " ", "Unicast Resolver Keepalive");
5283 }
5284 else if (client_rd_keepalive)
5285 {
5286 if (type == LBMR_HDR_TYPE_UCAST_RCV_ALIVE)
5287 {
5288 col_append_sep_str(pinfo->cinfo, COL_INFO, " ", "Receiver Alive");
5289 }
5290 else
5291 {
5292 col_append_sep_str(pinfo->cinfo, COL_INFO, " ", "Source Alive");
5293 }
5294 }
5295 else if (topic_mgmt)
5296 {
5297 col_append_sep_str(pinfo->cinfo, COL_INFO, " ", "Topic Management");
5298 }
5299 else
5300 {
5301 col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "TQRs %u TIRs %" G_GUINT16_FORMAT, tqrs, tirs);
5302 }
5303 break;
5304 }
5305
5306 switch (type)
5307 {
5308 case LBMR_HDR_TYPE_QUEUE_RES:
5309 if (tag_name != NULL)
5310 {
5311 ti = proto_tree_add_protocol_format(tree, proto_lbmr, tvb, O_LBMR_HDR_T_VER_TYPE, -1, "LBM Topic Resolution Protocol (Tag: %s): Version %u, Type 0x%x (%s) QQRs %u, QIRs %" G_GUINT16_FORMAT,
5312 tag_name, ver, type, val_to_str(type, lbmr_packet_type, "Unknown(0x%02x)"), tqrs, tirs);
5313 }
5314 else
5315 {
5316 ti = proto_tree_add_protocol_format(tree, proto_lbmr, tvb, O_LBMR_HDR_T_VER_TYPE, -1, "LBM Topic Resolution Protocol: Version %u, Type 0x%x (%s) QQRs %u, QIRs %" G_GUINT16_FORMAT,
5317 ver, type, val_to_str(type, lbmr_packet_type, "Unknown(0x%02x)"), tqrs, tirs);
5318 }
5319 break;
5320 default:
5321 if (tag_name != NULL)
5322 {
5323 if (rd_keepalive)
5324 {
5325 ti = proto_tree_add_protocol_format(tree, proto_lbmr, tvb, O_LBMR_HDR_T_VER_TYPE, -1, "LBM Topic Resolution Protocol (Tag: %s): Version %u, Type 0x%x (%s) Unicast Resolver Keepalive",
5326 tag_name, ver, type, val_to_str(type, lbmr_packet_type, "Unknown(0x%02x)"));
5327 }
5328 else if (topic_mgmt)
5329 {
5330 ti = proto_tree_add_protocol_format(tree, proto_lbmr, tvb, O_LBMR_HDR_T_VER_TYPE, -1, "LBM Topic Resolution Protocol (Tag: %s): Version %u, Type 0x%x (%s) Topic Management",
5331 tag_name, ver, type, val_to_str(type, lbmr_packet_type, "Unknown(0x%02x)"));
5332 }
5333 else
5334 {
5335 ti = proto_tree_add_protocol_format(tree, proto_lbmr, tvb, O_LBMR_HDR_T_VER_TYPE, -1, "LBM Topic Resolution Protocol (Tag: %s): Version %u, Type 0x%x (%s) TQRs %u, TIRs %" G_GUINT16_FORMAT,
5336 tag_name, ver, type, val_to_str(type, lbmr_packet_type, "Unknown(0x%02x)"), tqrs, tirs);
5337 }
5338 }
5339 else
5340 {
5341 if (rd_keepalive)
5342 {
5343 ti = proto_tree_add_protocol_format(tree, proto_lbmr, tvb, O_LBMR_HDR_T_VER_TYPE, -1, "LBM Topic Resolution Protocol: Version %u, Type 0x%x (%s) Unicast Resolver Keepalive",
5344 ver, type, val_to_str(type, lbmr_packet_type, "Unknown(0x%02x)"));
5345 }
5346 else if (topic_mgmt)
5347 {
5348 ti = proto_tree_add_protocol_format(tree, proto_lbmr, tvb, O_LBMR_HDR_T_VER_TYPE, -1, "LBM Topic Resolution Protocol: Version %u, Type 0x%x (%s) Topic Management",
5349 ver, type, val_to_str(type, lbmr_packet_type, "Unknown(0x%02x)"));
5350 }
5351 else
5352 {
5353 ti = proto_tree_add_protocol_format(tree, proto_lbmr, tvb, O_LBMR_HDR_T_VER_TYPE, -1, "LBM Topic Resolution Protocol: Version %u, Type 0x%x (%s) TQRs %u, TIRs %" G_GUINT16_FORMAT,
5354 ver, type, val_to_str(type, lbmr_packet_type, "Unknown(0x%02x)"), tqrs, tirs);
5355 }
5356 }
5357 break;
5358 }
5359 lbmr_tree = proto_item_add_subtree(ti, ett_lbmr);
5360 if (tag_name != NULL)
5361 {
5362 proto_item * item;
5363 item = proto_tree_add_string(lbmr_tree, hf_lbmr_tag, tvb, 0, 0, tag_name);
5364 proto_item_set_generated(item);
5365 }
5366 lbmr_hdr_item = proto_tree_add_item(lbmr_tree, hf_lbmr_hdr, tvb, 0, -1, ENC_NA);
5367 lbmr_hdr_tree = proto_item_add_subtree(lbmr_hdr_item, ett_lbmr_hdr);
5368 type_item = format_ver_type(tvb, 0, pinfo, lbmr_hdr_tree);
5369 switch (type)
5370 {
5371 case LBMR_HDR_TYPE_QUEUE_RES:
5372 proto_tree_add_item(lbmr_hdr_tree, hf_lbmr_hdr_qqrs, tvb, O_LBMR_HDR_T_TQRS, L_LBMR_HDR_T_TQRS, ENC_BIG_ENDIAN);
5373 proto_tree_add_item(lbmr_hdr_tree, hf_lbmr_hdr_qirs, tvb, O_LBMR_HDR_T_TIRS, L_LBMR_HDR_T_TIRS, ENC_BIG_ENDIAN);
5374 break;
5375 default:
5376 proto_tree_add_item(lbmr_hdr_tree, hf_lbmr_hdr_tqrs, tvb, O_LBMR_HDR_T_TQRS, L_LBMR_HDR_T_TQRS, ENC_BIG_ENDIAN);
5377 proto_tree_add_item(lbmr_hdr_tree, hf_lbmr_hdr_tirs, tvb, O_LBMR_HDR_T_TIRS, L_LBMR_HDR_T_TIRS, ENC_BIG_ENDIAN);
5378 break;
5379 }
5380
5381 offset = L_LBMR_HDR_T;
5382 total_len_dissected = L_LBMR_HDR_T;
5383 contents = wmem_new0(wmem_packet_scope(), lbmr_contents_t);
5384 switch (type)
5385 {
5386 case LBMR_HDR_TYPE_QUEUE_RES:
5387 contents->type = LBMR_CONTENTS_QUEUE;
5388 if (tqrs > 0)
5389 {
5390 len_dissected = dissect_lbmr_qqrs(packet_tvb, offset, tqrs, pinfo, lbmr_tree, contents);
5391 total_len_dissected += len_dissected;
5392 offset += len_dissected;
5393 }
5394 if (tirs > 0)
5395 {
5396 len_dissected = dissect_lbmr_qirs(packet_tvb, offset, tirs, pinfo, lbmr_tree, contents);
5397 total_len_dissected += len_dissected;
5398 offset += len_dissected;
5399 }
5400 lbmr_tap_queue_packet(pinfo, contents);
5401 break;
5402 case LBMR_HDR_TYPE_NORMAL:
5403 case LBMR_HDR_TYPE_WC_TQRS:
5404 if (!rd_keepalive)
5405 {
5406 contents->type = LBMR_CONTENTS_TOPIC;
5407 if (tqrs > 0)
5408 {
5409 gboolean wc_tqrs = FALSE;
5410
5411 if (type == LBMR_HDR_TYPE_WC_TQRS)
5412 {
5413 wc_tqrs = TRUE;
5414 }
5415 len_dissected = dissect_lbmr_tqrs(packet_tvb, offset, tqrs, pinfo, lbmr_tree, wc_tqrs, contents);
5416 total_len_dissected += len_dissected;
5417 offset += len_dissected;
5418 }
5419 if (tirs > 0)
5420 {
5421 len_dissected = dissect_lbmr_tirs(packet_tvb, offset, tirs, pinfo, lbmr_tree, "TIRs", contents);
5422 total_len_dissected += len_dissected;
5423 offset += len_dissected;
5424 }
5425 lbmr_tap_queue_packet(pinfo, contents);
5426 }
5427 break;
5428 case LBMR_HDR_TYPE_TOPIC_MGMT:
5429 len_dissected = dissect_lbmr_tmb(packet_tvb, offset, pinfo, lbmr_tree);
5430 total_len_dissected += len_dissected;
5431 offset += len_dissected;
5432 break;
5433 case LBMR_HDR_TYPE_UCAST_RCV_ALIVE:
5434 case LBMR_HDR_TYPE_UCAST_SRC_ALIVE:
5435 break;
5436 default:
5437 expert_add_info_format(pinfo, type_item, &ei_lbmr_analysis_invalid_value, "Unknown LBMR type 0x%02x", type);
5438 break;
5439 }
5440 }
5441 if ((tvb_reported_length_remaining(tvb, offset) > 0) && ((ver_type & LBMR_HDR_TYPE_OPTS_MASK) != 0))
5442 {
5443 /* Process LBMR packet options. */
5444 len_dissected = dissect_lbmr_options(tvb, offset, pinfo, lbmr_tree);
5445 total_len_dissected += len_dissected;
5446 }
5447 return (total_len_dissected);
5448 }
5449
test_lbmr_packet(tvbuff_t * tvb,packet_info * pinfo,proto_tree * tree,void * user_data _U_)5450 static gboolean test_lbmr_packet(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void * user_data _U_)
5451 {
5452 lbmr_tag_entry_t entry;
5453 gboolean valid_packet = FALSE;
5454
5455 /* Must be a UDP packet. */
5456 if (pinfo->ptype != PT_UDP)
5457 {
5458 return (FALSE);
5459 }
5460 /* Destination address must be IPV4 and 4 bytes in length. */
5461 if ((pinfo->dst.type != AT_IPv4) || (pinfo->dst.len != 4))
5462 {
5463 return (FALSE);
5464 }
5465
5466 if (lbmr_use_tag)
5467 {
5468 if (lbmr_tag_find(pinfo) != NULL)
5469 {
5470 valid_packet = TRUE;
5471 }
5472 }
5473 else
5474 {
5475 entry.name = NULL;
5476 entry.mc_outgoing_udp_port = lbmr_mc_outgoing_udp_port;
5477 entry.mc_incoming_udp_port = lbmr_mc_incoming_udp_port;
5478 entry.mc_incoming_address = NULL;
5479 entry.mc_incoming_address_val_h = lbmr_mc_incoming_address_host;
5480 entry.mc_outgoing_address = NULL;
5481 entry.mc_outgoing_address_val_h = lbmr_mc_outgoing_address_host;
5482 entry.uc_port_high = lbmr_uc_port_high;
5483 entry.uc_port_low = lbmr_uc_port_low;
5484 entry.uc_dest_port = lbmr_uc_dest_port;
5485 entry.uc_address = NULL;
5486 entry.uc_address_val_h = lbmr_uc_address_host;
5487 valid_packet = lbmr_match_packet(pinfo, &entry);
5488 }
5489 if (valid_packet)
5490 {
5491 dissect_lbmr(tvb, pinfo, tree, NULL);
5492 return (TRUE);
5493 }
5494 return (FALSE);
5495 }
5496
5497 /* Register all the bits needed with the filtering engine */
proto_register_lbmr(void)5498 void proto_register_lbmr(void)
5499 {
5500 static hf_register_info hf[] =
5501 {
5502 { &hf_lbmr_tag,
5503 { "Tag", "lbmr.tag", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5504 { &hf_lbmr_hdr,
5505 { "Header", "lbmr.hdr", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5506 { &hf_lbmr_hdr_ver,
5507 { "Version", "lbmr.hdr.ver", FT_UINT8, BASE_DEC, NULL, LBMR_HDR_VER_VER_MASK, NULL, HFILL } },
5508 { &hf_lbmr_hdr_opt,
5509 { "Options", "lbmr.hdr.opts", FT_BOOLEAN, 8, TFS(&tfs_present_not_present), LBMR_HDR_TYPE_OPTS_MASK, "Set if LBMR options are present", HFILL } },
5510 { &hf_lbmr_hdr_type,
5511 { "Type", "lbmr.hdr.type", FT_UINT8, BASE_HEX, VALS(lbmr_packet_type), LBMR_HDR_VER_TYPE_MASK, NULL, HFILL } },
5512 { &hf_lbmr_hdr_tqrs,
5513 { "Topic Query Records", "lbmr.hdr.tqrs", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5514 { &hf_lbmr_hdr_tirs,
5515 { "Topic Information Records", "lbmr.hdr.tirs", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5516 { &hf_lbmr_hdr_qqrs,
5517 { "Queue Query Records", "lbmr.hdr.qqrs", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5518 { &hf_lbmr_hdr_qirs,
5519 { "Queue Information Records", "lbmr.hdr.qirs", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5520 { &hf_lbmr_hdr_ext_type,
5521 { "Extended Type", "lbmr.hdr.ext_type", FT_UINT8, BASE_HEX, VALS(lbmr_ext_packet_type), 0x0, NULL, HFILL } },
5522 { &hf_lbmr_tqrs,
5523 { "TQRs", "lbmr.tqrs", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5524 { &hf_lbmr_tqr,
5525 { "TQR", "lbmr.tqr", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5526 { &hf_lbmr_tqr_pattern_type,
5527 { "Pattern Type", "lbmr.tqr.pattern_type", FT_UINT8, BASE_DEC, VALS(lbm_wildcard_pattern_type), 0x0, NULL, HFILL } },
5528 { &hf_lbmr_tqr_pattern,
5529 { "Pattern", "lbmr.tqr.pattern", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5530 { &hf_lbmr_tqr_name,
5531 { "Topic Name", "lbmr.tqr.name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5532 { &hf_lbmr_tirs,
5533 { "TIRs", "lbmr.tirs", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5534 { &hf_lbmr_tir,
5535 { "TIR", "lbmr.tir", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5536 { &hf_lbmr_tir_name,
5537 { "Topic Name", "lbmr.tir.name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5538 { &hf_lbmr_tir_transport_opts,
5539 { "Transport Options Present", "lbmr.tir.transport_opts", FT_BOOLEAN, L_LBMR_TIR_T_TRANSPORT * 8, TFS(&tfs_set_notset), LBMR_TIR_OPTIONS, "Set if transport options are present", HFILL } },
5540 { &hf_lbmr_tir_transport_type,
5541 { "Transport Type", "lbmr.tir.transport_type", FT_UINT8, BASE_HEX, VALS(lbmr_transport_type), LBMR_TIR_TRANSPORT, NULL, HFILL } },
5542 { &hf_lbmr_tir_tlen,
5543 { "Transport Info Length", "lbmr.tir.tlen", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5544 { &hf_lbmr_tir_ttl,
5545 { "TTL", "lbmr.tir.ttl", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5546 { &hf_lbmr_tir_index,
5547 { "Index", "lbmr.tir.index", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5548 { &hf_lbmr_tir_tcp,
5549 { "TCP Transport", "lbmr.tir.tcp", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5550 { &hf_lbmr_tir_tcp_ip,
5551 { "Source IP", "lbmr.tir.tcp.ip", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5552 { &hf_lbmr_tir_tcp_session_id,
5553 { "Session ID", "lbmr.tir.tcp.session_id", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } },
5554 { &hf_lbmr_tir_tcp_port,
5555 { "Source Port", "lbmr.tir.tcp.port", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5556 { &hf_lbmr_tir_lbtrm,
5557 { "LBTRM Transport", "lbmr.tir.lbtrm", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5558 { &hf_lbmr_tir_lbtrm_src_addr,
5559 { "Source IP", "lbmr.tir.lbtrm.srcip", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5560 { &hf_lbmr_tir_lbtrm_mcast_addr,
5561 { "Multicast IP", "lbmr.tir.lbtrm.mcastip", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5562 { &hf_lbmr_tir_lbtrm_session_id,
5563 { "Session ID", "lbmr.tir.lbtrm.sessid", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } },
5564 { &hf_lbmr_tir_lbtrm_udp_dest_port,
5565 { "Destination Port", "lbmr.tir.lbtrm.dport", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5566 { &hf_lbmr_tir_lbtrm_src_ucast_port,
5567 { "Source Port", "lbmr.tir.lbtrm.sport", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5568 { &hf_lbmr_tir_lbtru,
5569 { "LBTRU Transport", "lbmr.tir.lbtru", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5570 { &hf_lbmr_tir_lbtru_ip,
5571 { "Source IP", "lbmr.tir.lbtru.ip", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5572 { &hf_lbmr_tir_lbtru_port,
5573 { "Source Port", "lbmr.tir.lbtru.port", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5574 { &hf_lbmr_tir_lbtru_session_id,
5575 { "Session ID", "lbmr.tir.lbtru.session_id", FT_UINT32, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
5576 { &hf_lbmr_tir_lbtipc,
5577 { "LBTIPC Transport", "lbmr.tir.lbtipc", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5578 { &hf_lbmr_tir_lbtipc_host_id,
5579 { "Host ID", "lbmr.tir.lbtipc.host_id", FT_UINT32, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL } },
5580 { &hf_lbmr_tir_lbtipc_session_id,
5581 { "Session ID", "lbmr.tir.lbtipc.session_id", FT_UINT32, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL } },
5582 { &hf_lbmr_tir_lbtipc_xport_id,
5583 { "Transport ID", "lbmr.tir.lbtipc.xport_id", FT_UINT16, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL } },
5584 { &hf_lbmr_tir_lbtrdma,
5585 { "LBTRDMA Transport", "lbmr.tir.lbtrdma", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5586 { &hf_lbmr_tir_lbtrdma_ip,
5587 { "Source IP", "lbmr.tir.lbtrdma.ip", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5588 { &hf_lbmr_tir_lbtrdma_session_id,
5589 { "Session ID", "lbmr.tir.lbtrdma.session_id", FT_UINT32, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL } },
5590 { &hf_lbmr_tir_lbtrdma_port,
5591 { "Port", "lbmr.tir.lbtrdma.port", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5592 { &hf_lbmr_tir_lbtsmx,
5593 { "LBTSMX Transport", "lbmr.tir.lbtsmx", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5594 { &hf_lbmr_tir_lbtsmx_host_id,
5595 { "Host ID", "lbmr.tir.lbtsmx.host_id", FT_UINT32, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL } },
5596 { &hf_lbmr_tir_lbtsmx_session_id,
5597 { "Session ID", "lbmr.tir.lbtsmx.session_id", FT_UINT32, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL } },
5598 { &hf_lbmr_tir_lbtsmx_xport_id,
5599 { "Transport ID", "lbmr.tir.lbtsmx.xport_id", FT_UINT16, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL } },
5600 { &hf_lbmr_tir_channel,
5601 { "Channel", "lbmr.tir.channel", FT_UINT64, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL } },
5602 { &hf_lbmr_tir_unknown_transport,
5603 { "Unknown Transport", "lbmr.tir.unknown_transport", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5604 { &hf_lbmr_topts,
5605 { "Options", "lbmr.topts", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5606 { &hf_lbmr_topt_len,
5607 { "Length Option", "lbmr.topt.len", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5608 { &hf_lbmr_topt_len_type,
5609 { "Type", "lbmr.topt.len.type", FT_UINT8, BASE_DEC, VALS(lbmr_topic_option_type), 0x0, NULL, HFILL } },
5610 { &hf_lbmr_topt_len_len,
5611 { "Length", "lbmr.topt.len.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
5612 { &hf_lbmr_topt_len_total_len,
5613 { "Total Length", "lbmr.topt.len.total_len", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
5614 { &hf_lbmr_topt_ume,
5615 { "UME Option", "lbmr.topt.ume", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5616 { &hf_lbmr_topt_ume_type,
5617 { "Type", "lbmr.topt.ume.type", FT_UINT8, BASE_DEC, VALS(lbmr_topic_option_type), 0x0, NULL, HFILL } },
5618 { &hf_lbmr_topt_ume_len,
5619 { "Length", "lbmr.topt.ume.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
5620 { &hf_lbmr_topt_ume_flags,
5621 { "Flags", "lbmr.topt.ume.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
5622 { &hf_lbmr_topt_ume_flags_ignore,
5623 { "Ignore", "lbmr.topt.ume.flags.ignore", FT_BOOLEAN, L_LBMR_TOPIC_OPT_UME_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_TOPIC_OPT_UME_FLAG_IGNORE, NULL, HFILL } },
5624 { &hf_lbmr_topt_ume_flags_latejoin,
5625 { "Late Join", "lbmr.topt.ume.flags.latejoin", FT_BOOLEAN, L_LBMR_TOPIC_OPT_UME_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_TOPIC_OPT_UME_FLAG_LATEJOIN, "If set, the source provides late join", HFILL } },
5626 { &hf_lbmr_topt_ume_flags_store,
5627 { "Store", "lbmr.topt.ume.flags.store", FT_BOOLEAN, L_LBMR_TOPIC_OPT_UME_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_TOPIC_OPT_UME_FLAG_STORE, "If set, one or more stores are specified", HFILL } },
5628 { &hf_lbmr_topt_ume_flags_qccap,
5629 { "Q/C Capable", "lbmr.topt.ume.flags.qccap", FT_BOOLEAN, L_LBMR_TOPIC_OPT_UME_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_TOPIC_OPT_UME_FLAG_QCCAP, "If set, the source supports quorun/consensus", HFILL } },
5630 { &hf_lbmr_topt_ume_flags_acktosrc,
5631 { "Send ACKs to Source", "lbmr.topt.ume.flags.acktosrc", FT_BOOLEAN, L_LBMR_TOPIC_OPT_UME_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_TOPIC_OPT_UME_FLAG_ACKTOSRC, "If set, receivers send ACKs to the source", HFILL } },
5632 { &hf_lbmr_topt_ume_store_tcp_port,
5633 { "Store TCP Port", "lbmr.topt.ume.store_tcp_port", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5634 { &hf_lbmr_topt_ume_src_tcp_port,
5635 { "Source TCP Port", "lbmr.topt.ume.src_tcp_port", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5636 { &hf_lbmr_topt_ume_store_tcp_addr,
5637 { "Store TCP Address", "lbmr.topt.ume.store_tcp_addr", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5638 { &hf_lbmr_topt_ume_src_tcp_addr,
5639 { "Source TCP Address", "lbmr.topt.ume.src_tcp_addr", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5640 { &hf_lbmr_topt_ume_src_reg_id,
5641 { "Source Registration ID", "lbmr.topt.ume.src_reg_id", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5642 { &hf_lbmr_topt_ume_transport_idx,
5643 { "Transport Index", "lbmr.topt.ume.transport_idx", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5644 { &hf_lbmr_topt_ume_high_seqnum,
5645 { "High Sequence Number", "lbmr.topt.ume.high_seqnum", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5646 { &hf_lbmr_topt_ume_low_seqnum,
5647 { "Low Sequence Number", "lbmr.topt.ume.low_seqnum", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5648 { &hf_lbmr_topt_ume_store,
5649 { "UME Store Option", "lbmr.topt.ume_store", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5650 { &hf_lbmr_topt_ume_store_type,
5651 { "Type", "lbmr.topt.ume_store.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_topic_option_type), 0x0, NULL, HFILL } },
5652 { &hf_lbmr_topt_ume_store_len,
5653 { "Length", "lbmr.topt.ume_store.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
5654 { &hf_lbmr_topt_ume_store_flags,
5655 { "Flags", "lbmr.topt.ume_store.flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } },
5656 { &hf_lbmr_topt_ume_store_flags_ignore,
5657 { "Ignore", "lbmr.topt.ume_store.flags.ignore", FT_BOOLEAN, L_LBMR_TOPIC_OPT_UME_STORE_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_TOPIC_OPT_UME_STORE_FLAG_IGNORE, NULL, HFILL } },
5658 { &hf_lbmr_topt_ume_store_grp_idx,
5659 { "Group Index", "lbmr.topt.ume_store.grp_idx", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5660 { &hf_lbmr_topt_ume_store_store_tcp_port,
5661 { "Store TCP Port", "lbmr.topt.ume_store.store_tcp_port", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5662 { &hf_lbmr_topt_ume_store_store_idx,
5663 { "Store Index", "lbmr.topt.ume_store.store_idx", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5664 { &hf_lbmr_topt_ume_store_store_ip_addr,
5665 { "Store IP Address", "lbmr.topt.ume_store.store_ip_addr", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5666 { &hf_lbmr_topt_ume_store_src_reg_id,
5667 { "Source Registration ID", "lbmr.topt.ume_store.src_reg_id", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5668 { &hf_lbmr_topt_ume_store_group,
5669 { "UME Store Group Option", "lbmr.topt.ume_store_group", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5670 { &hf_lbmr_topt_ume_store_group_type,
5671 { "Type", "lbmr.topt.ume_store_group.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_topic_option_type), 0x0, NULL, HFILL } },
5672 { &hf_lbmr_topt_ume_store_group_len,
5673 { "Length", "lbmr.topt.ume_store_group.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
5674 { &hf_lbmr_topt_ume_store_group_flags,
5675 { "Flags", "lbmr.topt.ume_store_group.flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } },
5676 { &hf_lbmr_topt_ume_store_group_flags_ignore,
5677 { "Ignore", "lbmr.topt.ume_store_group.flags.ignore", FT_BOOLEAN, L_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_TOPIC_OPT_UME_STORE_GROUP_FLAG_IGNORE, NULL, HFILL } },
5678 { &hf_lbmr_topt_ume_store_group_grp_idx,
5679 { "Group Index", "lbmr.topt.ume_store_group.grp_idx", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5680 { &hf_lbmr_topt_ume_store_group_grp_sz,
5681 { "Group Size", "lbmr.topt.ume_store_group.grp_sz", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5682 { &hf_lbmr_topt_ume_store_group_reserved,
5683 { "Reserved", "lbmr.topt.ume_store_group.reserved", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
5684 { &hf_lbmr_topt_latejoin,
5685 { "Late Join Option", "lbmr.topt.latejoin", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5686 { &hf_lbmr_topt_latejoin_type,
5687 { "Type", "lbmr.topt.latejoin.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_topic_option_type), 0x0, NULL, HFILL } },
5688 { &hf_lbmr_topt_latejoin_len,
5689 { "Length", "lbmr.topt.latejoin.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
5690 { &hf_lbmr_topt_latejoin_flags,
5691 { "Flags", "lbmr.topt.latejoin.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
5692 { &hf_lbmr_topt_latejoin_flags_ignore,
5693 { "Ignore", "lbmr.topt.latejoin.flags.ignore", FT_BOOLEAN, L_LBMR_TOPIC_OPT_LATEJOIN_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_TOPIC_OPT_LATEJOIN_FLAG_IGNORE, NULL, HFILL } },
5694 { &hf_lbmr_topt_latejoin_flags_acktosrc,
5695 { "Send ACKs to Source", "lbmr.topt.latejoin.flags.acktosrc", FT_BOOLEAN, L_LBMR_TOPIC_OPT_LATEJOIN_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_TOPIC_OPT_LATEJOIN_FLAG_ACKTOSRC, "If set, ACKs are sent to source", HFILL } },
5696 { &hf_lbmr_topt_latejoin_src_tcp_port,
5697 { "Source TCP Port", "lbmr.topt.latejoin.src_tcp_port", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5698 { &hf_lbmr_topt_latejoin_reserved,
5699 { "Reserved", "lbmr.topt.latejoin.reserved", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
5700 { &hf_lbmr_topt_latejoin_src_ip_addr,
5701 { "Source IP Address", "lbmr.topt.latejoin.src_ip_addr", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5702 { &hf_lbmr_topt_latejoin_transport_idx,
5703 { "Transport Index", "lbmr.topt.latejoin.transport_idx", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5704 { &hf_lbmr_topt_latejoin_high_seqnum,
5705 { "High Sequence Number", "lbmr.topt.latejoin.high_seqnum", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5706 { &hf_lbmr_topt_latejoin_low_seqnum,
5707 { "Low Sequence Number", "lbmr.topt.latejoin.low_seqnum", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5708 { &hf_lbmr_topt_umq_rcridx,
5709 { "Receiver Control Record Index Option", "lbmr.topt.umq_rcridx", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5710 { &hf_lbmr_topt_umq_rcridx_type,
5711 { "Type", "lbmr.topt.umq_rcridx.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_topic_option_type), 0x0, NULL, HFILL } },
5712 { &hf_lbmr_topt_umq_rcridx_len,
5713 { "Length", "lbmr.topt.umq_rcridx.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
5714 { &hf_lbmr_topt_umq_rcridx_flags,
5715 { "Flags", "lbmr.topt.umq_rcridx.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
5716 { &hf_lbmr_topt_umq_rcridx_flags_ignore,
5717 { "Ignore", "lbmr.topt.umq_rcridx.flags.ignore", FT_BOOLEAN, L_LBMR_TOPIC_OPT_UMQ_RCRIDX_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_TOPIC_OPT_UMQ_RCRIDX_FLAG_IGNORE, NULL, HFILL } },
5718 { &hf_lbmr_topt_umq_rcridx_rcr_idx,
5719 { "Receiver Control Record Index", "lbmr.topt.umq_rcridx.rcr_idx", FT_UINT32, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL } },
5720 { &hf_lbmr_topt_umq_qinfo,
5721 { "Queue Info Option", "lbmr.topt.umq_qinfo", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5722 { &hf_lbmr_topt_umq_qinfo_type,
5723 { "Type", "lbmr.topt.umq_qinfo.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_topic_option_type), 0x0, NULL, HFILL } },
5724 { &hf_lbmr_topt_umq_qinfo_len,
5725 { "Length", "lbmr.topt.umq_qinfo.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
5726 { &hf_lbmr_topt_umq_qinfo_flags,
5727 { "Flags", "lbmr.topt.umq_qinfo.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
5728 { &hf_lbmr_topt_umq_qinfo_flags_ignore,
5729 { "Ignore", "lbmr.topt.umq_qinfo.flags.ignore", FT_BOOLEAN, L_LBMR_TOPIC_OPT_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_TOPIC_OPT_UMQ_FLAG_IGNORE, NULL, HFILL } },
5730 { &hf_lbmr_topt_umq_qinfo_flags_queue,
5731 { "Queue", "lbmr.topt.umq_qinfo.flags.queue", FT_BOOLEAN, L_LBMR_TOPIC_OPT_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_TOPIC_OPT_UMQ_FLAG_QUEUE, NULL, HFILL } },
5732 { &hf_lbmr_topt_umq_qinfo_flags_rcvlisten,
5733 { "Receiver Listen", "lbmr.topt.umq_qinfo.flags.rcvlisten", FT_BOOLEAN, L_LBMR_TOPIC_OPT_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_TOPIC_OPT_UMQ_FLAG_RCVLISTEN, NULL, HFILL } },
5734 { &hf_lbmr_topt_umq_qinfo_flags_control,
5735 { "Control", "lbmr.topt.umq_qinfo.flags.control", FT_BOOLEAN, L_LBMR_TOPIC_OPT_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_TOPIC_OPT_UMQ_FLAG_CONTROL, NULL, HFILL } },
5736 { &hf_lbmr_topt_umq_qinfo_flags_srcrcvlisten,
5737 { "Source Receiver Listen", "lbmr.topt.umq_qinfo.flags.srcrcvlisten", FT_BOOLEAN, L_LBMR_TOPIC_OPT_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_TOPIC_OPT_UMQ_FLAG_SRCRCVLISTEN, NULL, HFILL } },
5738 { &hf_lbmr_topt_umq_qinfo_flags_participants_only,
5739 { "Participants Only", "lbmr.topt.umq_qinfo.flags.participants_only", FT_BOOLEAN, L_LBMR_TOPIC_OPT_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_TOPIC_OPT_UMQ_FLAG_PARTICIPANTS_ONLY, NULL, HFILL } },
5740 { &hf_lbmr_topt_umq_qinfo_queue,
5741 { "Queue", "lbmr.topt.ume_qinfo.queue", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5742 { &hf_lbmr_topt_cost,
5743 { "Cost Option", "lbmr.topt.cost", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5744 { &hf_lbmr_topt_cost_type,
5745 { "Type", "lbmr.topt.cost.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_topic_option_type), 0x0, NULL, HFILL } },
5746 { &hf_lbmr_topt_cost_len,
5747 { "Length", "lbmr.topt.cost.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
5748 { &hf_lbmr_topt_cost_flags,
5749 { "Flags", "lbmr.topt.cost.flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } },
5750 { &hf_lbmr_topt_cost_flags_ignore,
5751 { "Ignore", "lbmr.topt.cost.flags.ignore", FT_BOOLEAN, L_LBMR_TOPIC_OPT_COST_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_TOPIC_OPT_COST_FLAG_IGNORE, NULL, HFILL } },
5752 { &hf_lbmr_topt_cost_hop_count,
5753 { "Hop count", "lbmr.topt.cost.hop_count", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5754 { &hf_lbmr_topt_cost_cost,
5755 { "Cost", "lbmr.topt.cost.cost", FT_INT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5756 { &hf_lbmr_topt_otid,
5757 { "Originating Transport ID Option", "lbmr.topt.otid", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5758 { &hf_lbmr_topt_otid_type,
5759 { "Type", "lbmr.topt.otid.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_topic_option_type), 0x0, NULL, HFILL } },
5760 { &hf_lbmr_topt_otid_len,
5761 { "Length", "lbmr.topt.otid.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
5762 { &hf_lbmr_topt_otid_flags,
5763 { "Flags", "lbmr.topt.otid.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
5764 { &hf_lbmr_topt_otid_flags_ignore,
5765 { "Ignore", "lbmr.topt.otid.flags.ignore", FT_BOOLEAN, L_LBMR_TOPIC_OPT_OTID_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_TOPIC_OPT_OTID_FLAG_IGNORE, NULL, HFILL } },
5766 { &hf_lbmr_topt_otid_originating_transport,
5767 { "Originating Transport ID", "lbmr.topt.otid.originating_transport", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5768 { &hf_lbmr_topt_ctxinst,
5769 { "Context Instance Option", "lbmr.topt.ctxinst", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5770 { &hf_lbmr_topt_ctxinst_type,
5771 { "Type", "lbmr.topt.ctxinst.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_topic_option_type), 0x0, NULL, HFILL } },
5772 { &hf_lbmr_topt_ctxinst_len,
5773 { "Length", "lbmr.topt.ctxinst.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
5774 { &hf_lbmr_topt_ctxinst_flags,
5775 { "Flags", "lbmr.topt.ctxinst.flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } },
5776 { &hf_lbmr_topt_ctxinst_flags_ignore,
5777 { "Ignore", "lbmr.topt.ctxinst.flags.ignore", FT_BOOLEAN, L_LBMR_TOPIC_OPT_CTXINST_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_TOPIC_OPT_CTXINST_FLAG_IGNORE, NULL, HFILL } },
5778 { &hf_lbmr_topt_ctxinst_res,
5779 { "Reserved", "lbmr.topt.ctxinst.res", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } },
5780 { &hf_lbmr_topt_ctxinst_ctxinst,
5781 { "Context Instance", "lbmr.topt.ctxinst.ctxinst", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5782 { &hf_lbmr_topt_ctxinsts,
5783 { "Store Context Instance Option", "lbmr.topt.ctxinsts", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5784 { &hf_lbmr_topt_ctxinsts_type,
5785 { "Type", "lbmr.topt.ctxinsts.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_topic_option_type), 0x0, NULL, HFILL } },
5786 { &hf_lbmr_topt_ctxinsts_len,
5787 { "Length", "lbmr.topt.ctxinsts.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
5788 { &hf_lbmr_topt_ctxinsts_flags,
5789 { "Flags", "lbmr.topt.ctxinsts.flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } },
5790 { &hf_lbmr_topt_ctxinsts_flags_ignore,
5791 { "Ignore", "lbmr.topt.ctxinsts.flags.ignore", FT_BOOLEAN, L_LBMR_TOPIC_OPT_CTXINSTS_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_TOPIC_OPT_CTXINSTS_FLAG_IGNORE, NULL, HFILL } },
5792 { &hf_lbmr_topt_ctxinsts_idx,
5793 { "Index", "lbmr.topt.ctxinsts.idx", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
5794 { &hf_lbmr_topt_ctxinsts_ctxinst,
5795 { "Store Context Instance", "lbmr.topt.ctxinsts.ctxinsts", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5796 { &hf_lbmr_topt_ulb,
5797 { "ULB Option", "lbmr.topt.ulb", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5798 { &hf_lbmr_topt_ulb_type,
5799 { "Type", "lbmr.topt.ulb.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_topic_option_type), 0x0, NULL, HFILL } },
5800 { &hf_lbmr_topt_ulb_len,
5801 { "Length", "lbmr.topt.ulb.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
5802 { &hf_lbmr_topt_ulb_flags,
5803 { "Flags", "lbmr.topt.ulb.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
5804 { &hf_lbmr_topt_ulb_flags_ignore,
5805 { "Ignore", "lbmr.topt.ulb.flags.ignore", FT_BOOLEAN, L_LBMR_TOPIC_OPT_ULB_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_TOPIC_OPT_ULB_FLAG_IGNORE, NULL, HFILL } },
5806 { &hf_lbmr_topt_ulb_queue_id,
5807 { "Queue ID", "lbmr.topt.ulb.queue_id", FT_UINT32, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL } },
5808 { &hf_lbmr_topt_ulb_regid,
5809 { "Registration ID", "lbmr.topt.ulb.regid", FT_UINT64, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL } },
5810 { &hf_lbmr_topt_ulb_ulb_src_id,
5811 { "ULB Source ID", "lbmr.topt.ulb.ulb_src_id", FT_UINT32, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL } },
5812 { &hf_lbmr_topt_ulb_src_ip_addr,
5813 { "Source IP Address", "lbmr.topt.ulb.src_ip_addr", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5814 { &hf_lbmr_topt_ulb_src_tcp_port,
5815 { "Source TCP Port", "lbmr.topt.ulb.src_tcp_port", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5816 { &hf_lbmr_topt_ulb_reserved,
5817 { "Reserved", "lbmr.topt.ulb.reserved", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
5818 { &hf_lbmr_topt_ctxinstq,
5819 { "Queue Context Instance Option", "lbmr.topt.ctxinstq", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5820 { &hf_lbmr_topt_ctxinstq_type,
5821 { "Type", "lbmr.topt.ctxinstq.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_topic_option_type), 0x0, NULL, HFILL } },
5822 { &hf_lbmr_topt_ctxinstq_len,
5823 { "Length", "lbmr.topt.ctxinstq.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
5824 { &hf_lbmr_topt_ctxinstq_flags,
5825 { "Flags", "lbmr.topt.ctxinstq.flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } },
5826 { &hf_lbmr_topt_ctxinstq_flags_ignore,
5827 { "Ignore", "lbmr.topt.ctxinstq.flags.ignore", FT_BOOLEAN, L_LBMR_TOPIC_OPT_CTXINSTQ_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_TOPIC_OPT_CTXINSTQ_FLAG_IGNORE, NULL, HFILL } },
5828 { &hf_lbmr_topt_ctxinstq_idx,
5829 { "Index", "lbmr.topt.ctxinstq.idx", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
5830 { &hf_lbmr_topt_ctxinstq_ctxinst,
5831 { "Store Context Instance", "lbmr.topt.ctxinstq.ctxinstq", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5832 { &hf_lbmr_topt_domain_id,
5833 { "Domain ID Option", "lbmr.topt.domain_id", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5834 { &hf_lbmr_topt_domain_id_type,
5835 { "Type", "lbmr.topt.domain_id.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_topic_option_type), 0x0, NULL, HFILL } },
5836 { &hf_lbmr_topt_domain_id_len,
5837 { "Length", "lbmr.topt.domain_id.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
5838 { &hf_lbmr_topt_domain_id_flags,
5839 { "Flags", "lbmr.topt.domain_id.flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } },
5840 { &hf_lbmr_topt_domain_id_flags_ignore,
5841 { "Ignore", "lbmr.topt.domain_id.flags.ignore", FT_BOOLEAN, L_LBMR_TOPIC_OPT_DOMAIN_ID_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_TOPIC_OPT_DOMAIN_ID_FLAG_IGNORE, NULL, HFILL } },
5842 { &hf_lbmr_topt_domain_id_domain_id,
5843 { "Domain ID", "lbmr.topt.domain_id.domain_id", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5844 { &hf_lbmr_topt_exfunc,
5845 { "Extended Functionality Option", "lbmr.topt.exfunc", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5846 { &hf_lbmr_topt_exfunc_type,
5847 { "Type", "lbmr.topt.exfunc.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_topic_option_type), 0x0, NULL, HFILL } },
5848 { &hf_lbmr_topt_exfunc_len,
5849 { "Length", "lbmr.topt.exfunc.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
5850 { &hf_lbmr_topt_exfunc_flags,
5851 { "Flags", "lbmr.topt.exfunc.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
5852 { &hf_lbmr_topt_exfunc_flags_ignore,
5853 { "Ignore", "lbmr.topt.exfunc.flags.ignore", FT_BOOLEAN, L_LBMR_TOPIC_OPT_EXFUNC_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_TOPIC_OPT_EXFUNC_FLAG_IGNORE, NULL, HFILL } },
5854 { &hf_lbmr_topt_exfunc_src_tcp_port,
5855 { "Source TCP Port", "lbmr.topt.exfunc.src_tcp_port", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
5856 { &hf_lbmr_topt_exfunc_reserved,
5857 { "Reserved", "lbmr.topt.exfunc.reserved", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
5858 { &hf_lbmr_topt_exfunc_src_ip_addr,
5859 { "Source IP Address", "lbmr.topt.exfunc.src_ip_addr", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5860 { &hf_lbmr_topt_exfunc_functionality_flags,
5861 { "Functionality Flags", "lbmr.topt.exfunc.functionality_flags", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } },
5862 { &hf_lbmr_topt_exfunc_functionality_flags_ulb,
5863 { "ULB", "lbmr.topt.exfunc.functionality_flags.ulb", FT_BOOLEAN, L_LBMR_TOPIC_OPT_EXFUNC_T_FUNCTIONALITY_FLAGS * 8, TFS(&tfs_capable_not_capable), LBM_TOPIC_OPT_EXFUNC_FFLAG_ULB, "Set if ULB supported", HFILL } },
5864 { &hf_lbmr_topt_exfunc_functionality_flags_umq,
5865 { "UMQ", "lbmr.topt.exfunc.functionality_flags.umq", FT_BOOLEAN, L_LBMR_TOPIC_OPT_EXFUNC_T_FUNCTIONALITY_FLAGS * 8, TFS(&tfs_capable_not_capable), LBM_TOPIC_OPT_EXFUNC_FFLAG_UMQ, "Set if UMQ supported", HFILL } },
5866 { &hf_lbmr_topt_exfunc_functionality_flags_ume,
5867 { "UME", "lbmr.topt.exfunc.functionality_flags.ume", FT_BOOLEAN, L_LBMR_TOPIC_OPT_EXFUNC_T_FUNCTIONALITY_FLAGS * 8, TFS(&tfs_capable_not_capable), LBM_TOPIC_OPT_EXFUNC_FFLAG_UME, "Set if UME supported", HFILL } },
5868 { &hf_lbmr_topt_exfunc_functionality_flags_lj,
5869 { "Late Join", "lbmr.topt.exfunc.functionality_flags.lj", FT_BOOLEAN, L_LBMR_TOPIC_OPT_EXFUNC_T_FUNCTIONALITY_FLAGS * 8, TFS(&tfs_capable_not_capable), LBM_TOPIC_OPT_EXFUNC_FFLAG_LJ, "Set if late join supported", HFILL } },
5870 { &hf_lbmr_topt_unknown,
5871 { "Unknown Option", "lbmr.topt.unknown", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5872 { &hf_lbmr_topt_unknown_type,
5873 { "Type", "lbmr.topt.unknown.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_topic_option_type), 0x0, NULL, HFILL } },
5874 { &hf_lbmr_topt_unknown_len,
5875 { "Length", "lbmr.topt.unknown.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
5876 { &hf_lbmr_topt_unknown_flags,
5877 { "Flags", "lbmr.topt.unknown.flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } },
5878 { &hf_lbmr_topt_unknown_data,
5879 { "Data", "lbmr.topt.unknown.data", FT_BYTES, FT_NONE, NULL, 0x0, NULL, HFILL } },
5880 { &hf_lbmr_tmb,
5881 { "Topic Management Block", "lbmr.tmb", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5882 { &hf_lbmr_tmb_len,
5883 { "Length", "lbmr.tmb.len", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
5884 { &hf_lbmr_tmb_tmrs,
5885 { "Topic Management Record Count", "lbmr.tmb.tmrs", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5886 { &hf_lbmr_tmb_tmr_list,
5887 { "Topic Management Records", "lbmr.tmb.tmr_list", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5888 { &hf_lbmr_tmr,
5889 { "Topic Management Record", "lbmr.tmb.tmr", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5890 { &hf_lbmr_tmr_len,
5891 { "Length", "lbmr.tmb.tmr.len", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
5892 { &hf_lbmr_tmr_type,
5893 { "TMR Type", "lbmr.tmb.tmr.type", FT_UINT8, BASE_DEC, VALS(lbmr_tmr_type), 0x0, NULL, HFILL } },
5894 { &hf_lbmr_tmr_flags,
5895 { "Flags", "lbmr.tmb.tmr.flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } },
5896 { &hf_lbmr_tmr_flags_response,
5897 { "Response", "lbmr.tmb.tmr.flags.response", FT_BOOLEAN, L_LBMR_TMR_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_TMR_FLAG_RESPONSE, "Set if this is a response", HFILL } },
5898 { &hf_lbmr_tmr_flags_wildcard_pcre,
5899 { "PCRE pattern", "lbmr.tmb.tmr.flags.wildcard_pcre", FT_BOOLEAN, L_LBMR_TMR_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_TMR_FLAG_WILDCARD_PCRE, "Set if topic is a PCRE pattern", HFILL } },
5900 { &hf_lbmr_tmr_flags_wildcard_regex,
5901 { "Regex pattern", "lbmr.tmb.tmr.flags.wildcard_regex", FT_BOOLEAN, L_LBMR_TMR_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_TMR_FLAG_WILDCARD_REGEX, "Set if topic is a Regex pattern", HFILL } },
5902 { &hf_lbmr_tmr_name,
5903 { "Topic Name", "lbmr.tmb.tmr.name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5904 { &hf_lbmr_pser_dep_type,
5905 { "Dependent Type", "lbmr.pser.dep_type", FT_UINT16, BASE_DEC_HEX, VALS(lbmr_pser_dependent_type), 0x0, NULL, HFILL } },
5906 { &hf_lbmr_pser_len,
5907 { "Length", "lbmr.pser.len", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
5908 { &hf_lbmr_pser_flags,
5909 { "Flags", "lbmr.pser.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
5910 { &hf_lbmr_pser_flags_option,
5911 { "Option", "lbmr.pser.flags.option", FT_BOOLEAN, L_LBMR_PSER_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_PSER_OPT_FLAG, NULL, HFILL } },
5912 { &hf_lbmr_pser_source_ip,
5913 { "Source IP", "lbmr.pser.source_ip", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5914 { &hf_lbmr_pser_store_ip,
5915 { "Store IP", "lbmr.pser.store_ip", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5916 { &hf_lbmr_pser_transport_idx,
5917 { "Transport Index", "lbmr.pser.transport_idx", FT_UINT32, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
5918 { &hf_lbmr_pser_topic_idx,
5919 { "Topic Index", "lbmr.pser.topic_idx", FT_UINT32, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
5920 { &hf_lbmr_pser_source_port,
5921 { "Source Port", "lbmr.pser.source_port", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5922 { &hf_lbmr_pser_store_port,
5923 { "Store Port", "lbmr.pser.store_port", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5924 { &hf_lbmr_pser_topic,
5925 { "Topic", "lbmr.pser.topic", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5926 { &hf_lbmr_pser_opts,
5927 { "Options", "lbmr.pser.opts", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5928 { &hf_lbmr_pser_optlen,
5929 { "Option Length", "lbmr.pser.opt.optlen", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5930 { &hf_lbmr_pser_optlen_type,
5931 { "Type", "lbmr.pser.opt.optlen.type", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
5932 { &hf_lbmr_pser_optlen_optlen,
5933 { "Options Length", "lbmr.pser.opt.optlen.optlen", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
5934 { &hf_lbmr_pser_opt_ctxinst,
5935 { "Context Instance Option", "lbmr.pser.opt.ctxinst", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5936 { &hf_lbmr_pser_opt_ctxinst_len,
5937 { "Length", "lbmr.pser.opt.ctxinst.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
5938 { &hf_lbmr_pser_opt_ctxinst_type,
5939 { "Type", "lbmr.pser.opt.ctxinst.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_pser_option_type), 0x0, NULL, HFILL } },
5940 { &hf_lbmr_pser_opt_ctxinst_ctxinst,
5941 { "Context Instance", "lbmr.pser.opt.ctxinst.ctxinst", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5942 { &hf_lbmr_qqr,
5943 { "QQRs", "lbmr.qqr", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5944 { &hf_lbmr_qqr_name,
5945 { "Queue name", "lbmr.qqr.name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5946 { &hf_lbmr_qirs,
5947 { "QIRs", "lbmr.qirs", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5948 { &hf_lbmr_qir,
5949 { "QIR", "lbmr.qir", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5950 { &hf_lbmr_qir_queue_name,
5951 { "Queue name", "lbmr.qir.qname", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5952 { &hf_lbmr_qir_topic_name,
5953 { "Topic name", "lbmr.qir.tname", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5954 { &hf_lbmr_qir_queue_id,
5955 { "Queue ID", "lbmr.qir.queue_id", FT_UINT32, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
5956 { &hf_lbmr_qir_queue_ver,
5957 { "Queue Version", "lbmr.qir.queue_ver", FT_UINT32, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
5958 { &hf_lbmr_qir_queue_prev_ver,
5959 { "Queue Previous Version", "lbmr.qir.queue_prev_ver", FT_UINT32, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
5960 { &hf_lbmr_qir_option_flag,
5961 { "QIR Options Present", "lbmr.qir.opts", FT_BOOLEAN, L_LBMR_QIR_T_GRP_BLKS * 8, TFS(&tfs_set_notset), LBMR_QIR_OPTIONS, NULL, HFILL } },
5962 { &hf_lbmr_qir_grp_blks,
5963 { "Group Block Count", "lbmr.qir.grp_blks", FT_UINT16, BASE_DEC_HEX, NULL, LBMR_QIR_GRP_BLOCKS_MASK, NULL, HFILL } },
5964 { &hf_lbmr_qir_queue_blks,
5965 { "Queue Blocks", "lbmr.qir.queue_blks", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5966 { &hf_lbmr_qir_grps,
5967 { "Groups", "lbmr.qir.grps", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5968 { &hf_lbmr_qir_grp_blk,
5969 { "Group Block", "lbmr.qir.grp", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5970 { &hf_lbmr_qir_grp_blk_grp_idx,
5971 { "Group Index", "lbmr.qir.grp.grp_idx", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5972 { &hf_lbmr_qir_grp_blk_grp_sz,
5973 { "Group Size", "lbmr.qir.grp.grp_sz", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5974 { &hf_lbmr_qir_queues,
5975 { "Queues", "lbmr.qir.queues", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5976 { &hf_lbmr_qir_queue_blk,
5977 { "Queue Block", "lbmr.qir.queue", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5978 { &hf_lbmr_qir_queue_blk_ip,
5979 { "IP Address", "lbmr.qir.queue.ip", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5980 { &hf_lbmr_qir_queue_blk_port,
5981 { "Port", "lbmr.qir.queue.port", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5982 { &hf_lbmr_qir_queue_blk_idx,
5983 { "Index", "lbmr.qir.queue.idx", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5984 { &hf_lbmr_qir_queue_blk_grp_idx,
5985 { "Group Index", "lbmr.qir.queue.grp_idx", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5986 { &hf_lbmr_qir_queue_blk_reserved,
5987 { "Reserved", "lbmr.qir.queue.reserved", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
5988 { &hf_lbmr_opts,
5989 { "Options", "lbmr.opt", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5990 { &hf_lbmr_opt_len,
5991 { "Length Option", "lbmr.opt.len", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
5992 { &hf_lbmr_opt_len_type,
5993 { "Type", "lbmr.opt.len.type", FT_UINT8, BASE_HEX_DEC, VALS(lbmr_option_type), 0x0, NULL, HFILL } },
5994 { &hf_lbmr_opt_len_len,
5995 { "Length", "lbmr.opt.len.len", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5996 { &hf_lbmr_opt_len_total_len,
5997 { "Total Length", "lbmr.opt.len.total_len", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
5998 { &hf_lbmr_opt_src_id,
5999 { "Source ID Option", "lbmr.opt.src_id", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6000 { &hf_lbmr_opt_src_id_type,
6001 { "Type", "lbmr.opt.src_id.type", FT_UINT8, BASE_HEX_DEC, VALS(lbmr_option_type), 0x0, NULL, HFILL } },
6002 { &hf_lbmr_opt_src_id_len,
6003 { "Length", "lbmr.opt.src_id.len", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
6004 { &hf_lbmr_opt_src_id_flags,
6005 { "Flags", "lbmr.opt.src_id.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
6006 { &hf_lbmr_opt_src_id_flags_ignore,
6007 { "Ignore", "lbmr.opt.src_id.flags.ignore", FT_BOOLEAN, L_LBMR_LBMR_OPT_SRC_ID_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_LBMR_OPT_SRC_ID_FLAG_IGNORE, NULL, HFILL } },
6008 { &hf_lbmr_opt_src_id_src_id,
6009 { "Source ID", "lbmr.opt.src_id.src_id", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6010 { &hf_lbmr_opt_src_type,
6011 { "Source Type Option", "lbmr.opt.src_type", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6012 { &hf_lbmr_opt_src_type_type,
6013 { "Type", "lbmr.opt.src_type.type", FT_UINT8, BASE_HEX_DEC, VALS(lbmr_option_type), 0x0, NULL, HFILL } },
6014 { &hf_lbmr_opt_src_type_len,
6015 { "Length", "lbmr.opt.src_type.len", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
6016 { &hf_lbmr_opt_src_type_flags,
6017 { "Flags", "lbmr.opt.src_type.flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } },
6018 { &hf_lbmr_opt_src_type_flags_ignore,
6019 { "Ignore", "lbmr.opt.src_type.flags.ignore", FT_BOOLEAN, L_LBMR_LBMR_OPT_SRC_TYPE_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_LBMR_OPT_SRC_TYPE_FLAG_IGNORE, NULL, HFILL } },
6020 { &hf_lbmr_opt_src_type_src_type,
6021 { "Source Type", "lbmr.opt.src_type.src_type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_option_source_type), 0x0, NULL, HFILL } },
6022 { &hf_lbmr_opt_version,
6023 { "Version Option", "lbmr.opt.version", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6024 { &hf_lbmr_opt_version_type,
6025 { "Type", "lbmr.opt.version.type", FT_UINT8, BASE_HEX_DEC, VALS(lbmr_option_type), 0x0, NULL, HFILL } },
6026 { &hf_lbmr_opt_version_len,
6027 { "Length", "lbmr.opt.version.len", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
6028 { &hf_lbmr_opt_version_flags,
6029 { "Flags", "lbmr.opt.version.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
6030 { &hf_lbmr_opt_version_flags_ignore,
6031 { "Ignore", "lbmr.opt.version.flags.ignore", FT_BOOLEAN, L_LBMR_LBMR_OPT_VERSION_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_LBMR_OPT_VERSION_FLAG_IGNORE, NULL, HFILL } },
6032 { &hf_lbmr_opt_version_flags_ume,
6033 { "UME Capable", "lbmr.opt.version.flags.ume", FT_BOOLEAN, L_LBMR_LBMR_OPT_VERSION_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_LBMR_OPT_VERSION_FLAG_UME, "Set if UME capable", HFILL } },
6034 { &hf_lbmr_opt_version_flags_umq,
6035 { "UMQ Capable", "lbmr.opt.version.flags.umq", FT_BOOLEAN, L_LBMR_LBMR_OPT_VERSION_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_LBMR_OPT_VERSION_FLAG_UMQ, "Set if UMQ capable", HFILL } },
6036 { &hf_lbmr_opt_version_version,
6037 { "Version", "lbmr.opt.version.version", FT_UINT32, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6038 { &hf_lbmr_opt_local_domain,
6039 { "Local Domain Option", "lbmr.opt.local_domain", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6040 { &hf_lbmr_opt_local_domain_type,
6041 { "Type", "lbmr.opt.local_domain.type", FT_UINT8, BASE_HEX_DEC, VALS(lbmr_option_type), 0x0, NULL, HFILL } },
6042 { &hf_lbmr_opt_local_domain_len,
6043 { "Length", "lbmr.opt.local_domain.len", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
6044 { &hf_lbmr_opt_local_domain_flags,
6045 { "Flags", "lbmr.opt.local_domain.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
6046 { &hf_lbmr_opt_local_domain_flags_ignore,
6047 { "Ignore", "lbmr.opt.local_domain.flags.ignore", FT_BOOLEAN, L_LBMR_LBMR_OPT_LOCAL_DOMAIN_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_LBMR_OPT_VERSION_FLAG_IGNORE, NULL, HFILL } },
6048 { &hf_lbmr_opt_local_domain_local_domain_id,
6049 { "Local Domain ID", "lbmr.opt.local_domain.local_domain_id", FT_UINT32, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6050 { &hf_lbmr_opt_unknown,
6051 { "Unknown ID Option", "lbmr.opt.unknown", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6052 { &hf_lbmr_opt_unknown_type,
6053 { "Type", "lbmr.opt.unknown.type", FT_UINT8, BASE_HEX_DEC, VALS(lbmr_option_type), 0x0, NULL, HFILL } },
6054 { &hf_lbmr_opt_unknown_len,
6055 { "Length", "lbmr.opt.unknown.len", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
6056 { &hf_lbmr_opt_unknown_flags,
6057 { "Flags", "lbmr.opt.unknown.flags", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6058 { &hf_lbmr_opt_unknown_data,
6059 { "Data", "lbmr.opt.unknown.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6060 { &hf_lbmr_topic_res_request_flags,
6061 { "Flags", "lbmr.topic_res_request.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
6062 { &hf_lbmr_topic_res_request_flags_gw_remote_interest,
6063 { "Gateway Remote Interest", "lbmr.topic_res_request.flags.gw_remote_interest", FT_BOOLEAN, 8 * L_LBMR_TOPIC_RES_REQUEST_T_FLAGS, TFS(&tfs_set_notset), LBM_TOPIC_RES_REQUEST_GW_REMOTE_INTEREST, "Set if gateway remote interest is requested", HFILL } },
6064 { &hf_lbmr_topic_res_request_flags_context_query,
6065 { "Context Queries", "lbmr.topic_res_request.flags.context_query", FT_BOOLEAN, 8 * L_LBMR_TOPIC_RES_REQUEST_T_FLAGS, TFS(&tfs_set_notset), LBM_TOPIC_RES_REQUEST_CONTEXT_QUERY, "Set if context queries are requested", HFILL } },
6066 { &hf_lbmr_topic_res_request_flags_context_advertisement,
6067 { "Context Advertisements", "lbmr.topic_res_request.flags.context_advertisement", FT_BOOLEAN, 8 * L_LBMR_TOPIC_RES_REQUEST_T_FLAGS, TFS(&tfs_set_notset), LBM_TOPIC_RES_REQUEST_CONTEXT_ADVERTISEMENT, "Set if context advertisements are requested", HFILL } },
6068 { &hf_lbmr_topic_res_request_flags_gateway_meta,
6069 { "Gateway Meta Flag", "lbmr.topic_res_request.flags.gateway_meta", FT_BOOLEAN, 8 * L_LBMR_TOPIC_RES_REQUEST_T_FLAGS, TFS(&tfs_set_notset), LBM_TOPIC_RES_REQUEST_RESERVED1, NULL, HFILL } },
6070 { &hf_lbmr_topic_res_request_flags_advertisement,
6071 { "Advertisements", "lbmr.topic_res_request.flags.advertisement", FT_BOOLEAN, 8 * L_LBMR_TOPIC_RES_REQUEST_T_FLAGS, TFS(&tfs_set_notset), LBM_TOPIC_RES_REQUEST_ADVERTISEMENT, "Set if advertisements are requested", HFILL } },
6072 { &hf_lbmr_topic_res_request_flags_query,
6073 { "Queries", "lbmr.topic_res_request.flags.query", FT_BOOLEAN, 8 * L_LBMR_TOPIC_RES_REQUEST_T_FLAGS, TFS(&tfs_set_notset), LBM_TOPIC_RES_REQUEST_QUERY, "Set if queries are requested", HFILL } },
6074 { &hf_lbmr_topic_res_request_flags_wildcard_query,
6075 { "Wildcard Queries", "lbmr.topic_res_request.flags.wildcard_query", FT_BOOLEAN, 8 * L_LBMR_TOPIC_RES_REQUEST_T_FLAGS, TFS(&tfs_set_notset), LBM_TOPIC_RES_REQUEST_WILDCARD_QUERY, "Set if wildcard queries are requested", HFILL } },
6076 { &hf_lbmr_ctxinfo_len,
6077 { "Length", "lbmr.ctxinfo.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6078 { &hf_lbmr_ctxinfo_hop_count,
6079 { "Hop Count", "lbmr.ctxinfo.hop_count", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6080 { &hf_lbmr_ctxinfo_flags,
6081 { "Flags", "lbmr.ctxinfo.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
6082 { &hf_lbmr_ctxinfo_flags_query,
6083 { "Query", "lbmr.ctxinfo.flags.query", FT_BOOLEAN, 16, TFS(&tfs_set_notset), LBMR_CTXINFO_QUERY_FLAG, "Set if query, clear if response", HFILL } },
6084 { &hf_lbmr_ctxinfo_flags_ip,
6085 { "IP Address", "lbmr.ctxinfo.flags.ip", FT_BOOLEAN, 16, TFS(&tfs_present_not_present), LBMR_CTXINFO_IP_FLAG, "Set if IP address is included", HFILL } },
6086 { &hf_lbmr_ctxinfo_flags_instance,
6087 { "Instance", "lbmr.ctxinfo.flags.instance", FT_BOOLEAN, 16, TFS(&tfs_present_not_present), LBMR_CTXINFO_INSTANCE_FLAG, "Set if context instance is included", HFILL } },
6088 { &hf_lbmr_ctxinfo_flags_tnwg_src,
6089 { "Gateway Source", "lbmr.ctxinfo.flags.tnwg_src", FT_BOOLEAN, 16, TFS(&tfs_set_notset), LBMR_CTXINFO_TNWG_SRC_FLAG, "Set if a gateway source", HFILL } },
6090 { &hf_lbmr_ctxinfo_flags_tnwg_rcv,
6091 { "Gateway Receiver", "lbmr.ctxinfo.flags.tnwg_rcv", FT_BOOLEAN, 16, TFS(&tfs_set_notset), LBMR_CTXINFO_TNWG_RCV_FLAG, "Set if a gateway receiver", HFILL } },
6092 { &hf_lbmr_ctxinfo_flags_proxy,
6093 { "Proxy", "lbmr.ctxinfo.flags.proxy", FT_BOOLEAN, 16, TFS(&tfs_set_notset), LBMR_CTXINFO_PROXY_FLAG, "Set if a proxy for another context", HFILL } },
6094 { &hf_lbmr_ctxinfo_flags_name,
6095 { "Name", "lbmr.ctxinfo.flags.name", FT_BOOLEAN, 16, TFS(&tfs_present_not_present), LBMR_CTXINFO_NAME_FLAG, "Set if context name is included", HFILL } },
6096 { &hf_lbmr_ctxinfo_port,
6097 { "Port", "lbmr.ctxinfo.port", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6098 { &hf_lbmr_ctxinfo_ip,
6099 { "IP Address", "lbmr.ctxinfo.ip", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6100 { &hf_lbmr_ctxinfo_instance,
6101 { "Instance", "lbmr.ctxinfo.instance", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6102 { &hf_lbmr_ctxinfo_name,
6103 { "Name", "lbmr.ctxinfo.name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6104 { &hf_lbmr_tnwg_len,
6105 { "Length", "lbmr.tnwg.len", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6106 { &hf_lbmr_tnwg_type,
6107 { "Type", "lbmr.tnwg.type", FT_UINT16, BASE_DEC_HEX, VALS(lbmr_tnwg_function_type), 0x0, NULL, HFILL } },
6108 { &hf_lbmr_tnwg_reserved,
6109 { "Reserved", "lbmr.tnwg.reserved", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
6110 { &hf_lbmr_tnwg_interest,
6111 { "Interest", "lbmr.tnwg.interest", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6112 { &hf_lbmr_tnwg_interest_len,
6113 { "Length", "lbmr.tnwg.interest.len", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6114 { &hf_lbmr_tnwg_interest_count,
6115 { "Record Count", "lbmr.tnwg.interest.count", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6116 { &hf_lbmr_tnwg_interest_rec,
6117 { "Interest Record", "lbmr.tnwg.interest_rec", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6118 { &hf_lbmr_tnwg_interest_rec_len,
6119 { "Length", "lbmr.tnwg.interest_rec.len", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
6120 { &hf_lbmr_tnwg_interest_rec_flags,
6121 { "Flags", "lbmr.tnwg.interest_rec.flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } },
6122 { &hf_lbmr_tnwg_interest_rec_flags_pattern,
6123 { "Pattern", "lbmr.tnwg.interest_rec.flags.pattern", FT_BOOLEAN, L_LBMR_TNWG_INTEREST_REC_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_TNWG_INTEREST_REC_PATTERN_FLAG, "Set if interest is for a pattern", HFILL } },
6124 { &hf_lbmr_tnwg_interest_rec_flags_cancel,
6125 { "Cancel", "lbmr.tnwg.interest_rec.flags.cancel", FT_BOOLEAN, L_LBMR_TNWG_INTEREST_REC_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_TNWG_INTEREST_REC_CANCEL_FLAG, "Set if interest is being cancelled", HFILL } },
6126 { &hf_lbmr_tnwg_interest_rec_flags_refresh,
6127 { "Refresh", "lbmr.tnwg.interest_rec.flags.refresh", FT_BOOLEAN, L_LBMR_TNWG_INTEREST_REC_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_TNWG_INTEREST_REC_REFRESH_FLAG, "Set if interest is being refreshed", HFILL } },
6128 { &hf_lbmr_tnwg_interest_rec_pattype,
6129 { "Pattern Type", "lbmr.tnwg.interest_rec.pattype", FT_UINT8, BASE_DEC_HEX, VALS(lbm_wildcard_pattern_type_short), 0x0, NULL, HFILL } },
6130 { &hf_lbmr_tnwg_interest_rec_domain_id,
6131 { "Domain ID", "lbmr.tnwg.interest_rec.domain_id", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
6132 { &hf_lbmr_tnwg_interest_rec_symbol,
6133 { "Symbol", "lbmr.tnwg.interest_rec.symbol", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6134 { &hf_lbmr_tnwg_ctxinfo,
6135 { "Context Information", "lbmr.tnwg.ctxinfo", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6136 { &hf_lbmr_tnwg_ctxinfo_len,
6137 { "Length", "lbmr.tnwg.ctxinfo.len", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
6138 { &hf_lbmr_tnwg_ctxinfo_hop_count,
6139 { "Hop Count", "lbmr.tnwg.ctxinfo.hop_count", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
6140 { &hf_lbmr_tnwg_ctxinfo_reserved,
6141 { "Reserved", "lbmr.tnwg.ctxinfo.reserved", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } },
6142 { &hf_lbmr_tnwg_ctxinfo_flags1,
6143 { "Flags1", "lbmr.tnwg.ctxinfo.flags1", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } },
6144 { &hf_lbmr_tnwg_ctxinfo_flags1_query,
6145 { "Query", "lbmr.tnwg.ctxinfo.flags1.query", FT_BOOLEAN, L_LBMR_TNWG_CTXINFO_T_FLAGS1 * 8, TFS(&tfs_set_notset), LBMR_TNWG_CTXINFO_QUERY_FLAG, "Set if a query, clear if a response", HFILL } },
6146 { &hf_lbmr_tnwg_ctxinfo_flags1_tnwg_src,
6147 { "TNWG Source", "lbmr.tnwg.ctxinfo.flags1.tnwg_src", FT_BOOLEAN, L_LBMR_TNWG_CTXINFO_T_FLAGS1 * 8, TFS(&tfs_set_notset), LBMR_TNWG_CTXINFO_TNWG_SRC_FLAG, "Set if a gateway source", HFILL } },
6148 { &hf_lbmr_tnwg_ctxinfo_flags1_tnwg_rcv,
6149 { "TNWG Receiver", "lbmr.tnwg.ctxinfo.flags1.tnwg_rcv", FT_BOOLEAN, L_LBMR_TNWG_CTXINFO_T_FLAGS1 * 8, TFS(&tfs_set_notset), LBMR_TNWG_CTXINFO_TNWG_RCV_FLAG, "Set if a gateway receiver", HFILL } },
6150 { &hf_lbmr_tnwg_ctxinfo_flags1_proxy,
6151 { "Proxy", "lbmr.tnwg.ctxinfo.flags1.proxy", FT_BOOLEAN, L_LBMR_TNWG_CTXINFO_T_FLAGS1 * 8, TFS(&tfs_set_notset), LBMR_TNWG_CTXINFO_PROXY_FLAG, "Set if a proxy for another context", HFILL } },
6152 { &hf_lbmr_tnwg_ctxinfo_flags2,
6153 { "Flags2", "lbmr.tnwg.ctxinfo.flags2", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } },
6154 { &hf_lbmr_tnwg_trreq,
6155 { "Topic Res Request", "lbmr.tnwg.trreq", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6156 { &hf_lbmr_tnwg_trreq_len,
6157 { "Length", "lbmr.tnwg.trreq.len", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6158 { &hf_lbmr_tnwg_opt,
6159 { "Unknown Option", "lbmr.tnwg.opt", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6160 { &hf_lbmr_tnwg_opt_type,
6161 { "Type", "lbmr.tnwg.opt.type", FT_UINT8, BASE_HEX_DEC, VALS(lbmr_tnwg_option_type), 0x0, NULL, HFILL } },
6162 { &hf_lbmr_tnwg_opt_len,
6163 { "Length", "lbmr.tnwg.opt.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6164 { &hf_lbmr_tnwg_opt_flags,
6165 { "Flags", "lbmr.tnwg.opt.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
6166 { &hf_lbmr_tnwg_opt_flags_ignore,
6167 { "Ignore", "lbmr.tnwg.opt.flags.ignore", FT_BOOLEAN, L_LBMR_TNWG_OPT_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_TNWG_OPT_IGNORE_FLAG, NULL, HFILL } },
6168 { &hf_lbmr_tnwg_opt_data,
6169 { "Data", "lbmr.tnwg.opt.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6170 { &hf_lbmr_tnwg_opt_ctxinst,
6171 { "Context Instance Option", "lbmr.tnwg.opt_ctxinst", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6172 { &hf_lbmr_tnwg_opt_ctxinst_type,
6173 { "Type", "lbmr.tnwg.opt_ctxinst.type", FT_UINT8, BASE_HEX_DEC, VALS(lbmr_tnwg_option_type), 0x0, NULL, HFILL } },
6174 { &hf_lbmr_tnwg_opt_ctxinst_len,
6175 { "Length", "lbmr.tnwg.opt_ctxinst.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6176 { &hf_lbmr_tnwg_opt_ctxinst_flags,
6177 { "Flags", "lbmr.tnwg.opt_ctxinst.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
6178 { &hf_lbmr_tnwg_opt_ctxinst_flags_ignore,
6179 { "Ignore", "lbmr.tnwg.opt_ctxinst.flags.ignore", FT_BOOLEAN, L_LBMR_TNWG_OPT_CTXINST_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_TNWG_OPT_IGNORE_FLAG, NULL, HFILL } },
6180 { &hf_lbmr_tnwg_opt_ctxinst_instance,
6181 { "Context Instance", "lbmr.tnwg.opt_ctxinst.instance", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6182 { &hf_lbmr_tnwg_opt_address,
6183 { "Address Option", "lbmr.tnwg.opt_address", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6184 { &hf_lbmr_tnwg_opt_address_type,
6185 { "Type", "lbmr.tnwg.opt_address.type", FT_UINT8, BASE_HEX_DEC, VALS(lbmr_tnwg_option_type), 0x0, NULL, HFILL } },
6186 { &hf_lbmr_tnwg_opt_address_len,
6187 { "Length", "lbmr.tnwg.opt_address.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6188 { &hf_lbmr_tnwg_opt_address_flags,
6189 { "Flags", "lbmr.tnwg.opt_address.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
6190 { &hf_lbmr_tnwg_opt_address_flags_ignore,
6191 { "Ignore", "lbmr.tnwg.opt_address.flags.ignore", FT_BOOLEAN, L_LBMR_TNWG_OPT_ADDRESS_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_TNWG_OPT_IGNORE_FLAG, NULL, HFILL } },
6192 { &hf_lbmr_tnwg_opt_address_port,
6193 { "Port", "lbmr.tnwg.opt_address.port", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6194 { &hf_lbmr_tnwg_opt_address_res,
6195 { "Reserved", "lbmr.tnwg.opt_address.res", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
6196 { &hf_lbmr_tnwg_opt_address_ip,
6197 { "IP Address", "lbmr.tnwg.opt_address.ip", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6198 { &hf_lbmr_tnwg_opt_domain,
6199 { "Domain Option", "lbmr.tnwg.opt_domain", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6200 { &hf_lbmr_tnwg_opt_domain_type,
6201 { "Type", "lbmr.tnwg.opt_domain.type", FT_UINT8, BASE_HEX_DEC, VALS(lbmr_tnwg_option_type), 0x0, NULL, HFILL } },
6202 { &hf_lbmr_tnwg_opt_domain_len,
6203 { "Length", "lbmr.tnwg.opt_domain.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6204 { &hf_lbmr_tnwg_opt_domain_flags,
6205 { "Flags", "lbmr.tnwg.opt_domain.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
6206 { &hf_lbmr_tnwg_opt_domain_flags_ignore,
6207 { "Ignore", "lbmr.tnwg.opt_domain.flags.ignore", FT_BOOLEAN, L_LBMR_TNWG_OPT_DOMAIN_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_TNWG_OPT_IGNORE_FLAG, NULL, HFILL } },
6208 { &hf_lbmr_tnwg_opt_domain_domain_id,
6209 { "Domain ID", "lbmr.tnwg.opt_domain.domain_id", FT_UINT32, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6210 { &hf_lbmr_tnwg_opt_name,
6211 { "Name Option", "lbmr.tnwg.opt_name", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6212 { &hf_lbmr_tnwg_opt_name_type,
6213 { "Type", "lbmr.tnwg.opt_name.type", FT_UINT8, BASE_HEX_DEC, VALS(lbmr_tnwg_option_type), 0x0, NULL, HFILL } },
6214 { &hf_lbmr_tnwg_opt_name_len,
6215 { "Length", "lbmr.tnwg.opt_name.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6216 { &hf_lbmr_tnwg_opt_name_flags,
6217 { "Flags", "lbmr.tnwg.opt_name.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
6218 { &hf_lbmr_tnwg_opt_name_flags_ignore,
6219 { "Ignore", "lbmr.tnwg.opt_name.flags.ignore", FT_BOOLEAN, L_LBMR_TNWG_OPT_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_TNWG_OPT_IGNORE_FLAG, NULL, HFILL } },
6220 { &hf_lbmr_tnwg_opt_name_name,
6221 { "Name", "lbmr.tnwg.opt_name.name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6222 { &hf_lbmr_remote_domain_route_hdr_num_domains,
6223 { "Number of Domains", "lbmr.remote_domain_route.num_domains", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6224 { &hf_lbmr_remote_domain_route_hdr_ip,
6225 { "IP Address", "lbmr.remote_domain_route.ip", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6226 { &hf_lbmr_remote_domain_route_hdr_port,
6227 { "Port", "lbmr.remote_domain_route.port", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
6228 { &hf_lbmr_remote_domain_route_hdr_reserved,
6229 { "Reserved", "lbmr.remote_domain_route.reserved", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
6230 { &hf_lbmr_remote_domain_route_hdr_length,
6231 { "Length", "lbmr.remote_domain_route.length", FT_UINT32, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6232 { &hf_lbmr_remote_domain_route_hdr_domain,
6233 { "Domain", "lbmr.remote_domain_route.domain", FT_UINT32, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6234 { &hf_lbmr_rctxinfo_len,
6235 { "Length", "lbmr.rctxinfo.len", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6236 { &hf_lbmr_rctxinfo_num_recs,
6237 { "Number of Records", "lbmr.rctxinfo.num_recs", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6238 { &hf_lbmr_rctxinfo_reserved,
6239 { "Reserved", "lbmr.rctxinfo.reserved", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
6240 { &hf_lbmr_rctxinfo_rec,
6241 { "Remote Context Information Record", "lbmr.rctxinfo.rec", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6242 { &hf_lbmr_rctxinfo_rec_len,
6243 { "Length", "lbmr.rctxinfo.rec.len", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6244 { &hf_lbmr_rctxinfo_rec_flags,
6245 { "Flags", "lbmr.rctxinfo.rec.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
6246 { &hf_lbmr_rctxinfo_rec_flags_query,
6247 { "Query", "lbmr.rctxinfo.rec.flags.query", FT_BOOLEAN, L_LBMR_RCTXINFO_REC_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_RCTXINFO_REC_FLAG_QUERY, "Set if a query, clear if a response", HFILL } },
6248 { &hf_lbmr_rctxinfo_rec_address,
6249 { "Address Option", "lbmr.rctxinfo.rec.address", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6250 { &hf_lbmr_rctxinfo_rec_address_type,
6251 { "Type", "lbmr.rctxinfo.rec.address.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_rctxinfo_option_type), 0x0, NULL, HFILL } },
6252 { &hf_lbmr_rctxinfo_rec_address_len,
6253 { "Length", "lbmr.rctxinfo.rec.address.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6254 { &hf_lbmr_rctxinfo_rec_address_flags,
6255 { "Flags", "lbmr.rctxinfo.rec.address.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
6256 { &hf_lbmr_rctxinfo_rec_address_domain_id,
6257 { "Domain ID", "lbmr.rctxinfo.rec.address.domain_id", FT_UINT32, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6258 { &hf_lbmr_rctxinfo_rec_address_ip,
6259 { "Address", "lbmr.rctxinfo.rec.address.ip", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6260 { &hf_lbmr_rctxinfo_rec_address_port,
6261 { "Port", "lbmr.rctxinfo.rec.address.port", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6262 { &hf_lbmr_rctxinfo_rec_address_res,
6263 { "Reserved", "lbmr.rctxinfo.rec.address.res", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
6264 { &hf_lbmr_rctxinfo_rec_instance,
6265 { "Instance Option", "lbmr.rctxinfo.rec.instance", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6266 { &hf_lbmr_rctxinfo_rec_instance_type,
6267 { "Type", "lbmr.rctxinfo.rec.instance.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_rctxinfo_option_type), 0x0, NULL, HFILL } },
6268 { &hf_lbmr_rctxinfo_rec_instance_len,
6269 { "Length", "lbmr.rctxinfo.rec.instance.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6270 { &hf_lbmr_rctxinfo_rec_instance_flags,
6271 { "Flags", "lbmr.rctxinfo.rec.instance.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
6272 { &hf_lbmr_rctxinfo_rec_instance_instance,
6273 { "Instance", "lbmr.rctxinfo.rec.instance.instance", FT_BYTES, FT_NONE, NULL, 0x0, NULL, HFILL } },
6274 { &hf_lbmr_rctxinfo_rec_odomain,
6275 { "Originating Domain Option", "lbmr.rctxinfo.rec.odomain", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6276 { &hf_lbmr_rctxinfo_rec_odomain_type,
6277 { "Type", "lbmr.rctxinfo.rec.odomain.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_rctxinfo_option_type), 0x0, NULL, HFILL } },
6278 { &hf_lbmr_rctxinfo_rec_odomain_len,
6279 { "Length", "lbmr.rctxinfo.rec.odomain.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6280 { &hf_lbmr_rctxinfo_rec_odomain_flags,
6281 { "Flags", "lbmr.rctxinfo.rec.odomain.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
6282 { &hf_lbmr_rctxinfo_rec_odomain_domain_id,
6283 { "Domain ID", "lbmr.rctxinfo.rec.odomain.domain_id", FT_UINT32, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6284 { &hf_lbmr_rctxinfo_rec_name,
6285 { "Name Option", "lbmr.rctxinfo.rec.name", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6286 { &hf_lbmr_rctxinfo_rec_name_type,
6287 { "Type", "lbmr.rctxinfo.rec.name.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_rctxinfo_option_type), 0x0, NULL, HFILL } },
6288 { &hf_lbmr_rctxinfo_rec_name_len,
6289 { "Length", "lbmr.rctxinfo.rec.name.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6290 { &hf_lbmr_rctxinfo_rec_name_flags,
6291 { "Flags", "lbmr.rctxinfo.rec.name.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
6292 { &hf_lbmr_rctxinfo_rec_name_name,
6293 { "Name", "lbmr.rctxinfo.rec.name.name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6294 { &hf_lbmr_rctxinfo_rec_unknown,
6295 { "Unknown Option", "lbmr.rctxinfo.rec.unknown", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6296 { &hf_lbmr_rctxinfo_rec_unknown_type,
6297 { "Type", "lbmr.rctxinfo.rec.unknown.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_rctxinfo_option_type), 0x0, NULL, HFILL } },
6298 { &hf_lbmr_rctxinfo_rec_unknown_len,
6299 { "Length", "lbmr.rctxinfo.rec.unknown.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6300 { &hf_lbmr_rctxinfo_rec_unknown_flags,
6301 { "Flags", "lbmr.rctxinfo.rec.unknown.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
6302 { &hf_lbmr_rctxinfo_rec_unknown_data,
6303 { "Data", "lbmr.rctxinfo.rec.unknown.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6304 { &hf_qmgmt_flags,
6305 { "Flags", "lbmr.qmgmt.flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } },
6306 { &hf_qmgmt_flags_i_flag,
6307 { "Ignore", "lbmr.qmgmt.flags.i_flag", FT_BOOLEAN, L_UMQ_QMGMT_HDR_T_FLAGS * 8, TFS(&lbm_ignore_flag), UMQ_QMGMT_HDR_I_FLAG, NULL, HFILL } },
6308 { &hf_qmgmt_flags_n_flag,
6309 { "Queue Name", "lbmr.qmgmt.flags.n_flag", FT_BOOLEAN, L_UMQ_QMGMT_HDR_T_FLAGS * 8, TFS(&tfs_present_not_present), UMQ_QMGMT_HDR_N_FLAG, "Set if queue name is present", HFILL } },
6310 { &hf_qmgmt_flags_il_l_flag,
6311 { "New Instance List", "lbmr.qmgmt.flags.il_l_flag", FT_BOOLEAN, L_UMQ_QMGMT_HDR_T_FLAGS * 8, TFS(&tfs_set_notset), UMQ_QMGMT_HDR_IL_L_FLAG, "Set if contains a new instance list", HFILL } },
6312 { &hf_qmgmt_flags_il_k_flag,
6313 { "Keepalive Requested", "lbmr.qmgmt.flags.il_k_flag", FT_BOOLEAN, L_UMQ_QMGMT_HDR_T_FLAGS * 8, TFS(&tfs_set_notset), UMQ_QMGMT_HDR_IL_K_FLAG, "Set if a keepalive requester", HFILL } },
6314 { &hf_qmgmt_pckt_type,
6315 { "Packet Type", "lbmr.qmgmt.pckt_type", FT_UINT8, BASE_HEX_DEC, VALS(umq_qmgmt_packet_type), 0x0, NULL, HFILL } },
6316 { &hf_qmgmt_cfgsig,
6317 { "Configuration Signature", "lbmr.qmgmt.cfg_sig", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6318 { &hf_qmgmt_queue_id,
6319 { "Queue ID", "lbmr.qmgmt.queue_id", FT_UINT32, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL } },
6320 { &hf_qmgmt_queue_ver,
6321 { "Queue Version", "lbmr.qmgmt.queue_ver", FT_UINT32, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL } },
6322 { &hf_qmgmt_ip,
6323 { "IP Address", "lbmr.qmgmt.ip", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6324 { &hf_qmgmt_port,
6325 { "Port", "lbmr.qmgmt.port", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6326 { &hf_qmgmt_inst_idx,
6327 { "Instance Index", "lbmr.qmgmt.inst_idx", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6328 { &hf_qmgmt_grp_idx,
6329 { "Group Index", "lbmr.qmgmt.grp_idx", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6330 { &hf_qmgmt_pckt_type_dep16,
6331 { "Packet-Type Dependent Data", "lbmr.qmgmt.pckt_type_dep16", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
6332 { &hf_qmgmt_il_num_insts,
6333 { "Number of IL Instances", "lbmr.qmgmt.il_num_insts", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6334 { &hf_qmgmt_jrej_code,
6335 { "Join Rejection Code", "lbmr.qmgmt.jrej_code", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6336 { &hf_qmgmt_ev_bias,
6337 { "EV Bias", "lbmr.qmgmt.ev_bias", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6338 { &hf_qmgmt_il,
6339 { "Instance List Header", "lbmr.qmgmt.il", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6340 { &hf_qmgmt_il_highest_rcr_tsp,
6341 { "Highest RCR TSP", "lbmr.qmgmt.il.highest_rcr_tsp", FT_UINT32, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL } },
6342 { &hf_qmgmt_il_inst,
6343 { "Instance Header", "lbmr.qmgmt.il_inst", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6344 { &hf_qmgmt_il_inst_ip,
6345 { "IP", "lbmr.qmgmt.il_inst.ip", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6346 { &hf_qmgmt_il_inst_port,
6347 { "Port", "lbmr.qmgmt.il_inst.port", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6348 { &hf_qmgmt_il_inst_inst_idx,
6349 { "Instance Index", "lbmr.qmgmt.il_inst.inst_idx", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6350 { &hf_qmgmt_il_inst_grp_idx,
6351 { "Group Index", "lbmr.qmgmt.il_inst.grp_idx", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6352 { &hf_qmgmt_il_inst_flags,
6353 { "Flags", "lbmr.qmgmt.il_inst.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
6354 { &hf_qmgmt_il_inst_flags_m_flag,
6355 { "Master", "lbmr.qmgmt.il_inst.flags.m_flag", FT_BOOLEAN, L_UMQ_QMGMT_IL_INST_HDR_T_FLAGS * 8, TFS(&tfs_set_notset), UMQ_QMGMT_HDR_IL_INST_M_FLAG, "Set if the master queue", HFILL } },
6356 { &hf_qmgmt_il_inst_flags_q_flag,
6357 { "Queue Election Master", "lbmr.qmgmt.il_inst.flags.q_flag", FT_BOOLEAN, L_UMQ_QMGMT_IL_INST_HDR_T_FLAGS * 8, TFS(&tfs_set_notset), UMQ_QMGMT_HDR_IL_INST_Q_FLAG, "Set if a queue election master", HFILL } },
6358 { &hf_qmgmt_il_inst_flags_p_flag,
6359 { "Post Election Master", "lbmr.qmgmt.il_inst.flags.p_flag", FT_BOOLEAN, L_UMQ_QMGMT_IL_INST_HDR_T_FLAGS * 8, TFS(&tfs_set_notset), UMQ_QMGMT_HDR_IL_INST_P_FLAG, "Set if a post election master", HFILL } },
6360 { &hf_qmgmt_ec,
6361 { "Election Call Header", "lbmr.qmgmt.ec", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6362 { &hf_qmgmt_ec_queue_new_ver,
6363 { "Queue New Version", "lbmr.qmgmt.ec.queue_new_ver", FT_UINT32, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL } },
6364 { &hf_qmgmt_ev,
6365 { "Election Vote Header", "lbmr.qmgmt.ev", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6366 { &hf_qmgmt_ev_highest_rcr_tsp,
6367 { "Highest RCR TSP", "lbmr.qmgmt.ev.highest_rcr_tsp", FT_UINT32, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL } },
6368 { &hf_qmgmt_ev_age,
6369 { "Age", "lbmr.qmgmt.ev.age", FT_UINT32, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
6370 { &hf_qmgmt_qro,
6371 { "Queue Resume Operation Header", "lbmr.qmgmt.qro", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
6372 { &hf_qmgmt_qro_highest_rcr_tsp,
6373 { "Highest RCR TSP", "lbmr.qmgmt.qro.highest_rcr_tsp", FT_UINT32, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL } },
6374 { &hf_qmgmt_qname,
6375 { "Queue Name", "lbmr.qmgmt.qname", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } }
6376 };
6377 static gint * ett[] =
6378 {
6379 &ett_lbmr,
6380 &ett_lbmr_hdr,
6381 &ett_lbmr_opts,
6382 &ett_lbmr_opt_src_id,
6383 &ett_lbmr_opt_src_id_flags,
6384 &ett_lbmr_opt_len,
6385 &ett_lbmr_opt_src_type,
6386 &ett_lbmr_opt_src_type_flags,
6387 &ett_lbmr_opt_version,
6388 &ett_lbmr_opt_version_flags,
6389 &ett_lbmr_opt_local_domain,
6390 &ett_lbmr_opt_local_domain_flags,
6391 &ett_lbmr_opt_unknown,
6392 &ett_lbmr_tqrs,
6393 &ett_lbmr_tqr,
6394 &ett_lbmr_tirs,
6395 &ett_lbmr_tir,
6396 &ett_lbmr_tir_tcp,
6397 &ett_lbmr_tir_lbtrm,
6398 &ett_lbmr_tir_lbtru,
6399 &ett_lbmr_tir_lbtipc,
6400 &ett_lbmr_tir_lbtrdma,
6401 &ett_lbmr_tir_lbtsmx,
6402 &ett_lbmr_topts,
6403 &ett_lbmr_topt_len,
6404 &ett_lbmr_topt_ume,
6405 &ett_lbmr_topt_ume_flags,
6406 &ett_lbmr_topt_ume_store,
6407 &ett_lbmr_topt_ume_store_flags,
6408 &ett_lbmr_topt_ume_store_group,
6409 &ett_lbmr_topt_ume_store_group_flags,
6410 &ett_lbmr_topt_latejoin,
6411 &ett_lbmr_topt_latejoin_flags,
6412 &ett_lbmr_topt_umq_rcridx,
6413 &ett_lbmr_topt_umq_rcridx_flags,
6414 &ett_lbmr_topt_umq_qinfo,
6415 &ett_lbmr_topt_umq_qinfo_flags,
6416 &ett_lbmr_topt_cost,
6417 &ett_lbmr_topt_cost_flags,
6418 &ett_lbmr_topt_otid,
6419 &ett_lbmr_topt_otid_flags,
6420 &ett_lbmr_topt_ctxinst,
6421 &ett_lbmr_topt_ctxinst_flags,
6422 &ett_lbmr_topt_ctxinsts,
6423 &ett_lbmr_topt_ctxinsts_flags,
6424 &ett_lbmr_topt_ulb,
6425 &ett_lbmr_topt_ulb_flags,
6426 &ett_lbmr_topt_ctxinstq,
6427 &ett_lbmr_topt_ctxinstq_flags,
6428 &ett_lbmr_topt_domain_id,
6429 &ett_lbmr_topt_domain_id_flags,
6430 &ett_lbmr_topt_exfunc,
6431 &ett_lbmr_topt_exfunc_flags,
6432 &ett_lbmr_topt_exfunc_functionality_flags,
6433 &ett_lbmr_topt_unknown,
6434 &ett_lbmr_tmb,
6435 &ett_lbmr_tmrs,
6436 &ett_lbmr_tmr,
6437 &ett_lbmr_tmr_flags,
6438 &ett_lbmr_pser_flags,
6439 &ett_lbmr_pser_opts,
6440 &ett_lbmr_pser_opt_len,
6441 &ett_lbmr_pser_opt_ctxinst,
6442 &ett_lbmr_qqrs,
6443 &ett_lbmr_qirs,
6444 &ett_lbmr_qir,
6445 &ett_lbmr_qir_options,
6446 &ett_lbmr_qir_grp_blk,
6447 &ett_lbmr_qir_queue_blk,
6448 &ett_lbmr_qir_grp,
6449 &ett_lbmr_qir_queue,
6450 &ett_lbmr_topic_res_request_flags,
6451 &ett_lbmr_ctxinfo_flags,
6452 &ett_lbmr_tnwg,
6453 &ett_lbmr_tnwg_interest,
6454 &ett_lbmr_tnwg_interest_rec,
6455 &ett_lbmr_tnwg_interest_rec_flags,
6456 &ett_lbmr_tnwg_ctxinfo,
6457 &ett_lbmr_tnwg_ctxinfo_flags1,
6458 &ett_lbmr_tnwg_trreq,
6459 &ett_lbmr_tnwg_ctxinst_opt,
6460 &ett_lbmr_tnwg_ctxinst_opt_flags,
6461 &ett_lbmr_tnwg_address_opt,
6462 &ett_lbmr_tnwg_address_opt_flags,
6463 &ett_lbmr_tnwg_domain_opt,
6464 &ett_lbmr_tnwg_domain_opt_flags,
6465 &ett_lbmr_tnwg_name_opt,
6466 &ett_lbmr_tnwg_name_opt_flags,
6467 &ett_lbmr_tnwg_unknown_opt,
6468 &ett_lbmr_tnwg_unknown_opt_flags,
6469 &ett_lbmr_remote_domain_route_hdr,
6470 &ett_lbmr_rctxinfo,
6471 &ett_lbmr_rctxinfo_rec,
6472 &ett_lbmr_rctxinfo_rec_flags,
6473 &ett_lbmr_rctxinfo_rec_address,
6474 &ett_lbmr_rctxinfo_rec_instance,
6475 &ett_lbmr_rctxinfo_rec_odomain,
6476 &ett_lbmr_rctxinfo_rec_name,
6477 &ett_lbmr_rctxinfo_rec_unknown,
6478 &ett_qmgmt_flags,
6479 &ett_qmgmt_il,
6480 &ett_qmgmt_il_inst,
6481 &ett_qmgmt_il_inst_flags,
6482 &ett_qmgmt_ec,
6483 &ett_qmgmt_ev,
6484 &ett_qmgmt_qro
6485 };
6486 static ei_register_info ei[] =
6487 {
6488 { &ei_lbmr_analysis_length_incorrect, { "lbmr.analysis.length_incorrect", PI_MALFORMED, PI_ERROR, "Header length incorrect", EXPFILL } },
6489 { &ei_lbmr_analysis_invalid_value, { "lbmr.analysis.invalid_value", PI_UNDECODED, PI_WARN, "Invalid value", EXPFILL } },
6490 { &ei_lbmr_analysis_zero_len_option, { "lbmr.analysis.zero_len_option", PI_MALFORMED, PI_ERROR, "Zero-length LBMR option", EXPFILL } },
6491 };
6492 module_t * lbmr_module;
6493 guint32 addr;
6494 uat_t * tag_uat;
6495 expert_module_t * expert_lbmr;
6496
6497 proto_lbmr = proto_register_protocol("LBM Topic Resolution Protocol",
6498 "LBMR", "lbmr");
6499
6500 proto_register_field_array(proto_lbmr, hf, array_length(hf));
6501 proto_register_subtree_array(ett, array_length(ett));
6502 expert_lbmr = expert_register_protocol(proto_lbmr);
6503 expert_register_field_array(expert_lbmr, ei, array_length(ei));
6504
6505 lbmr_module = prefs_register_protocol_subtree("29West", proto_lbmr, proto_reg_handoff_lbmr);
6506 prefs_register_uint_preference(lbmr_module,
6507 "mc_incoming_port",
6508 "Incoming multicast UDP port (default " LBMR_DEFAULT_MC_INCOMING_UDP_PORT_STRING ")",
6509 "Set the UDP port for incoming multicast topic resolution (context resolver_multicast_incoming_port)",
6510 10,
6511 &global_lbmr_mc_incoming_udp_port);
6512 ws_inet_pton4(LBMR_DEFAULT_MC_INCOMING_ADDRESS, &addr);
6513 lbmr_mc_incoming_address_host = g_ntohl(addr);
6514 prefs_register_string_preference(lbmr_module,
6515 "mc_incoming_address",
6516 "Incoming multicast address (default " LBMR_DEFAULT_MC_INCOMING_ADDRESS ")",
6517 "Set the multicast address for incoming multicast topic resolution (context resolver_multicast_incoming_address)",
6518 &global_lbmr_mc_incoming_address);
6519 prefs_register_uint_preference(lbmr_module,
6520 "mc_outgoing_port",
6521 "Outgoing multicast UDP port (default " LBMR_DEFAULT_MC_OUTGOING_UDP_PORT_STRING ")",
6522 "Set the UDP port for outgoing multicast topic resolution (context resolver_multicast_outgoing_port)",
6523 10,
6524 &global_lbmr_mc_outgoing_udp_port);
6525 ws_inet_pton4(LBMR_DEFAULT_MC_OUTGOING_ADDRESS, &addr);
6526 lbmr_mc_outgoing_address_host = g_ntohl(addr);
6527 prefs_register_string_preference(lbmr_module,
6528 "mc_outgoing_address",
6529 "Outgoing multicast address (default " LBMR_DEFAULT_MC_OUTGOING_ADDRESS ")",
6530 "Set the multicast address for outgoing multicast topic resolution (context resolver_multicast_outgoing_address)",
6531 &global_lbmr_mc_outgoing_address);
6532 prefs_register_uint_preference(lbmr_module,
6533 "uc_port_low",
6534 "Unicast UDP port low (default " LBMR_DEFAULT_UC_PORT_LOW_STRING ")",
6535 "Set the low UDP port for unicast topic resolution (context resolver_unicast_port_low)",
6536 10,
6537 &global_lbmr_uc_port_low);
6538 prefs_register_uint_preference(lbmr_module,
6539 "uc_port_high",
6540 "Unicast UDP port high (default " LBMR_DEFAULT_UC_PORT_HIGH_STRING ")",
6541 "Set the high UDP port for unicast topic resolution (context resolver_unicast_port_high)",
6542 10,
6543 &global_lbmr_uc_port_high);
6544 prefs_register_uint_preference(lbmr_module,
6545 "uc_dest_port",
6546 "Unicast UDP destination port (default " LBMR_DEFAULT_UC_DEST_PORT_STRING ")",
6547 "Set the destination port for unicast topic resolution (context resolver_unicast_destination_port)",
6548 10,
6549 &global_lbmr_uc_dest_port);
6550 ws_inet_pton4(LBMR_DEFAULT_UC_ADDRESS, &addr);
6551 lbmr_uc_address_host = g_ntohl(addr);
6552 prefs_register_string_preference(lbmr_module,
6553 "uc_address",
6554 "Unicast resolver address (default " LBMR_DEFAULT_UC_ADDRESS ")",
6555 "Set the address of the unicast resolver daemon (context resolver_unicast_address)",
6556 &global_lbmr_uc_address);
6557 prefs_register_bool_preference(lbmr_module,
6558 "use_lbmr_domain",
6559 "Use LBMR tag table",
6560 "Use table of LBMR tags to decode the packet instead of above values",
6561 &global_lbmr_use_tag);
6562 tag_uat = uat_new("LBMR tag definitions",
6563 sizeof(lbmr_tag_entry_t),
6564 "lbmr_domains",
6565 TRUE,
6566 (void * *)&lbmr_tag_entry,
6567 &lbmr_tag_count,
6568 UAT_AFFECTS_DISSECTION,
6569 NULL,
6570 lbmr_tag_copy_cb,
6571 lbmr_tag_update_cb,
6572 lbmr_tag_free_cb,
6573 NULL,
6574 NULL,
6575 lbmr_tag_array);
6576 prefs_register_uat_preference(lbmr_module,
6577 "tnw_lbmr_tags",
6578 "LBMR Tags",
6579 "A table to define LBMR tags",
6580 tag_uat);
6581
6582 lbmr_topic_advertisement_tap_handle = register_tap(LBMR_TOPIC_ADVERTISEMENT_TAP_STRING);
6583 lbmr_topic_query_tap_handle = register_tap(LBMR_TOPIC_QUERY_TAP_STRING);
6584 lbmr_pattern_query_tap_handle = register_tap(LBMR_PATTERN_QUERY_TAP_STRING);
6585 lbmr_queue_advertisement_tap_handle = register_tap(LBMR_QUEUE_ADVERTISEMENT_TAP_STRING);
6586 lbmr_queue_query_tap_handle = register_tap(LBMR_QUEUE_QUERY_TAP_STRING);
6587
6588 stats_tree_register(LBMR_TOPIC_ADVERTISEMENT_TAP_STRING,
6589 "lbmr_topic_ads_topic",
6590 lbmr_stat_tree_name_topic_ads_topic,
6591 0,
6592 lbmr_topic_ads_topic_stats_tree_packet,
6593 lbmr_topic_ads_topic_stats_tree_init,
6594 NULL);
6595 stats_tree_register(LBMR_TOPIC_ADVERTISEMENT_TAP_STRING,
6596 "lbmr_topic_ads_source",
6597 lbmr_stat_tree_name_topic_ads_source,
6598 0,
6599 lbmr_topic_ads_source_stats_tree_packet,
6600 lbmr_topic_ads_source_stats_tree_init,
6601 NULL);
6602 stats_tree_register(LBMR_TOPIC_ADVERTISEMENT_TAP_STRING,
6603 "lbmr_topic_ads_transport",
6604 lbmr_stat_tree_name_topic_ads_transport,
6605 0,
6606 lbmr_topic_ads_transport_stats_tree_packet,
6607 lbmr_topic_ads_transport_stats_tree_init,
6608 NULL);
6609 stats_tree_register(LBMR_TOPIC_QUERY_TAP_STRING,
6610 "lbmr_topic_queries_topic",
6611 lbmr_stat_tree_name_topic_queries_topic,
6612 0,
6613 lbmr_topic_queries_topic_stats_tree_packet,
6614 lbmr_topic_queries_topic_stats_tree_init,
6615 NULL);
6616 stats_tree_register(LBMR_TOPIC_QUERY_TAP_STRING,
6617 "lbmr_topic_queries_receiver",
6618 lbmr_stat_tree_name_topic_queries_receiver,
6619 0,
6620 lbmr_topic_queries_receiver_stats_tree_packet,
6621 lbmr_topic_queries_receiver_stats_tree_init,
6622 NULL);
6623 stats_tree_register(LBMR_PATTERN_QUERY_TAP_STRING,
6624 "lbmr_topic_queries_pattern",
6625 lbmr_stat_tree_name_topic_queries_pattern,
6626 0,
6627 lbmr_topic_queries_pattern_stats_tree_packet,
6628 lbmr_topic_queries_pattern_stats_tree_init,
6629 NULL);
6630 stats_tree_register(LBMR_PATTERN_QUERY_TAP_STRING,
6631 "lbmr_topic_queries_pattern_receiver",
6632 lbmr_stat_tree_name_topic_queries_pattern_receiver,
6633 0,
6634 lbmr_topic_queries_pattern_receiver_stats_tree_packet,
6635 lbmr_topic_queries_pattern_receiver_stats_tree_init,
6636 NULL);
6637 stats_tree_register(LBMR_QUEUE_ADVERTISEMENT_TAP_STRING,
6638 "lbmr_queue_ads_queue",
6639 lbmr_stat_tree_name_queue_ads_queue,
6640 0,
6641 lbmr_queue_ads_queue_stats_tree_packet,
6642 lbmr_queue_ads_queue_stats_tree_init,
6643 NULL);
6644 stats_tree_register(LBMR_QUEUE_ADVERTISEMENT_TAP_STRING,
6645 "lbmr_queue_ads_source",
6646 lbmr_stat_tree_name_queue_ads_source,
6647 0,
6648 lbmr_queue_ads_source_stats_tree_packet,
6649 lbmr_queue_ads_source_stats_tree_init,
6650 NULL);
6651 stats_tree_register(LBMR_QUEUE_QUERY_TAP_STRING,
6652 "lbmr_queue_queries_queue",
6653 lbmr_stat_tree_name_queue_queries_queue,
6654 0,
6655 lbmr_queue_queries_queue_stats_tree_packet,
6656 lbmr_queue_queries_queue_stats_tree_init,
6657 NULL);
6658 stats_tree_register(LBMR_QUEUE_QUERY_TAP_STRING,
6659 "lbmr_queue_queries_receiver",
6660 lbmr_stat_tree_name_queue_queries_receiver,
6661 0,
6662 lbmr_queue_queries_receiver_stats_tree_packet,
6663 lbmr_queue_queries_receiver_stats_tree_init,
6664 NULL);
6665
6666 lbm_topic_init();
6667 lbtsmx_transport_init();
6668 lbtipc_transport_init();
6669 lbtrdma_transport_init();
6670 }
6671
6672 /* The registration hand-off routine */
proto_reg_handoff_lbmr(void)6673 void proto_reg_handoff_lbmr(void)
6674 {
6675 static gboolean already_registered = FALSE;
6676 guint32 addr;
6677
6678 if (!already_registered)
6679 {
6680 lbmr_dissector_handle = create_dissector_handle(dissect_lbmr, proto_lbmr);
6681 dissector_add_for_decode_as_with_preference("udp.port", lbmr_dissector_handle);
6682 heur_dissector_add("udp", test_lbmr_packet, "LBM Topic Resolution over UDP", "lbmr_udp", proto_lbmr, HEURISTIC_ENABLE);
6683 }
6684
6685 lbmr_mc_incoming_udp_port = global_lbmr_mc_incoming_udp_port;
6686 lbmr_mc_outgoing_udp_port = global_lbmr_mc_outgoing_udp_port;
6687 ws_inet_pton4(global_lbmr_mc_incoming_address, &addr);
6688 lbmr_mc_incoming_address_host = g_ntohl(addr);
6689
6690 ws_inet_pton4(global_lbmr_mc_outgoing_address, &addr);
6691 lbmr_mc_outgoing_address_host = g_ntohl(addr);
6692
6693 /* Make sure the low port is <= the high port. If not, don't change them. */
6694 if (global_lbmr_uc_port_low <= global_lbmr_uc_port_high)
6695 {
6696 lbmr_uc_port_high = global_lbmr_uc_port_high;
6697 lbmr_uc_port_low = global_lbmr_uc_port_low;
6698 }
6699 lbmr_uc_dest_port = global_lbmr_uc_dest_port;
6700 ws_inet_pton4(global_lbmr_uc_address, &addr);
6701 lbmr_uc_address_host = g_ntohl(addr);
6702 lbmr_use_tag = global_lbmr_use_tag;
6703
6704 already_registered = TRUE;
6705 }
6706
6707 /*
6708 * Editor modelines - https://www.wireshark.org/tools/modelines.html
6709 *
6710 * Local variables:
6711 * c-basic-offset: 4
6712 * tab-width: 8
6713 * indent-tabs-mode: nil
6714 * End:
6715 *
6716 * vi: set shiftwidth=4 tabstop=8 expandtab:
6717 * :indentSize=4:tabSize=8:noTabs=true:
6718 */
6719