2 * Routines for portmap dissection
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 1998 Gerald Combs
8 * Copied from packet-smb.c
10 * SPDX-License-Identifier: GPL-2.0-or-later
15 #include <epan/packet.h>
16 #include <epan/conversation.h>
17 #include <epan/ipproto.h>
18 #include "packet-rpc.h"
19 #include "packet-portmap.h"
24 * RFC 1833, "Binding Protocols for ONC RPC Version 2".
26 void proto_register_portmap(void);
27 void proto_reg_handoff_portmap(void);
29 static int proto_portmap
;
30 static int hf_portmap_procedure_v1
;
31 static int hf_portmap_procedure_v2
;
32 static int hf_portmap_procedure_v3
;
33 static int hf_portmap_procedure_v4
;
34 static int hf_portmap_proto
;
35 static int hf_portmap_prog
;
36 static int hf_portmap_proc
;
37 static int hf_portmap_version
;
38 static int hf_portmap_port
;
39 static int hf_portmap_answer
;
40 static int hf_portmap_args
;
41 static int hf_portmap_result
;
42 static int hf_portmap_rpcb
;
43 static int hf_portmap_rpcb_prog
;
44 static int hf_portmap_rpcb_version
;
45 static int hf_portmap_rpcb_netid
;
46 static int hf_portmap_rpcb_addr
;
47 static int hf_portmap_rpcb_owner
;
48 static int hf_portmap_uaddr
;
51 static int ett_portmap
;
52 static int ett_portmap_rpcb
;
53 static int ett_portmap_entry
;
55 static dissector_handle_t rpc_handle
;
57 /* Dissect a getport call */
59 dissect_getport_call(tvbuff_t
*tvb
, packet_info
*pinfo _U_
,
60 proto_tree
*tree
, void* data
)
62 uint32_t proto
, version
;
64 const char *prog_name
;
65 const char *proto_name
;
68 /* make sure we remember protocol type until the reply packet */
69 if(!pinfo
->fd
->visited
){
70 rpc_call_info_value
*rpc_call
=(rpc_call_info_value
*)data
;
72 proto
= tvb_get_ntohl(tvb
, offset
+8);
73 if(proto
==IP_PROTO_UDP
){ /* only do this for UDP */
74 rpc_call
->private_data
=(void *)PT_UDP
;
80 prog
= tvb_get_ntohl(tvb
, offset
+0);
81 prog_name
= rpc_prog_name(prog
);
82 proto_tree_add_uint_format_value(tree
, hf_portmap_prog
, tvb
,
83 offset
, 4, prog
, "%s (%u)",
85 col_append_fstr(pinfo
->cinfo
, COL_INFO
, " %s(%u)", prog_name
, prog
);
87 proto_item_append_text(tree
, " GETPORT Call %s(%u)", prog_name
, prog
);
90 version
= tvb_get_ntohl(tvb
, offset
+4);
91 proto_tree_add_item(tree
, hf_portmap_version
, tvb
,
92 offset
+4, 4, ENC_BIG_ENDIAN
);
93 col_append_fstr(pinfo
->cinfo
, COL_INFO
, " V:%d", version
);
96 proto_item_append_text(tree
, " Version:%d", version
);
100 proto
= tvb_get_ntohl(tvb
, offset
+8);
101 proto_name
= ipprotostr(proto
);
102 proto_tree_add_uint_format(tree
, hf_portmap_proto
, tvb
,
103 offset
+8, 4, proto
, "Proto: %s (%u)", proto_name
, proto
);
104 col_append_fstr(pinfo
->cinfo
, COL_INFO
, " %s", proto_name
);
106 proto_item_append_text(tree
, " %s", proto_name
);
109 proto_tree_add_item(tree
, hf_portmap_port
, tvb
,
110 offset
+12, 4, ENC_BIG_ENDIAN
);
116 dissect_getport_reply(tvbuff_t
*tvb
, packet_info
*pinfo _U_
,
117 proto_tree
*tree
, void* data
)
122 /* we might have learnt a <ipaddr><protocol><port> mapping for ONC-RPC*/
123 if(!pinfo
->fd
->visited
){
124 rpc_call_info_value
*rpc_call
=(rpc_call_info_value
*)data
;
125 /* only do this for UDP, TCP does not need anything like this */
126 if(rpc_call
&& (GPOINTER_TO_UINT(rpc_call
->private_data
)==PT_UDP
) ){
128 port
=tvb_get_ntohl(tvb
, offset
);
130 conversation_t
*conv
;
131 conv
=find_conversation(pinfo
->num
, &pinfo
->src
, &pinfo
->dst
, CONVERSATION_UDP
, port
, 0, NO_ADDR_B
|NO_PORT_B
);
133 conv
=conversation_new(pinfo
->num
, &pinfo
->src
, &pinfo
->dst
, CONVERSATION_UDP
, port
, 0, NO_ADDR2
|NO_PORT2
);
135 conversation_set_dissector(conv
, rpc_handle
);
140 portx
= tvb_get_ntohl(tvb
, offset
);
141 offset
= dissect_rpc_uint32(tvb
, tree
, hf_portmap_port
,
143 proto_item_append_text(tree
, " GETPORT Reply Port:%d", portx
);
145 col_append_fstr(pinfo
->cinfo
, COL_INFO
, " Port:%d", portx
);
147 col_append_str(pinfo
->cinfo
, COL_INFO
, " PROGRAM_NOT_AVAILABLE");
148 proto_item_append_text(tree
, " PROGRAM_NOT_AVAILABLE");
154 /* Dissect a 'set' call */
156 dissect_set_call(tvbuff_t
*tvb
, packet_info
*pinfo _U_
,
157 proto_tree
*tree
, void* data _U_
)
165 prog
= tvb_get_ntohl(tvb
, offset
+0);
166 proto_tree_add_uint_format_value(tree
, hf_portmap_prog
, tvb
,
167 offset
, 4, prog
, "%s (%d)",
168 rpc_prog_name(prog
), prog
);
169 proto_tree_add_item(tree
, hf_portmap_version
, tvb
,
170 offset
+4, 4, ENC_BIG_ENDIAN
);
172 proto
= tvb_get_ntohl(tvb
, offset
+8);
173 proto_tree_add_uint_format(tree
, hf_portmap_proto
,tvb
,
174 offset
+8, 4, proto
, "Proto: %s (%d)", ipprotostr(proto
), proto
);
176 proto_tree_add_item(tree
, hf_portmap_port
, tvb
,
177 offset
+12, 4, ENC_BIG_ENDIAN
);
183 /* Dissect a 'unset' call */
185 dissect_unset_call(tvbuff_t
*tvb
, packet_info
*pinfo _U_
,
186 proto_tree
*tree
, void* data _U_
)
194 prog
= tvb_get_ntohl(tvb
, offset
+0);
195 proto_tree_add_uint_format_value(tree
, hf_portmap_prog
, tvb
,
196 offset
, 4, prog
, "%s (%d)",
197 rpc_prog_name(prog
), prog
);
198 proto_tree_add_item(tree
, hf_portmap_version
, tvb
,
199 offset
+4, 4, ENC_BIG_ENDIAN
);
201 proto
= tvb_get_ntohl(tvb
, offset
+8);
202 proto_tree_add_uint(tree
, hf_portmap_proto
, tvb
,
205 proto_tree_add_item(tree
, hf_portmap_port
, tvb
,
206 offset
+12, 4, ENC_BIG_ENDIAN
);
213 dissect_set_reply(tvbuff_t
*tvb
, packet_info
*pinfo _U_
,
214 proto_tree
*tree
, void* data _U_
)
216 return dissect_rpc_bool(tvb
, tree
, hf_portmap_answer
, 0);
220 dissect_dump_entry(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
,
221 proto_tree
*tree
, void* data _U_
)
223 int prog
, version
, proto
, port
;
226 prog
= tvb_get_ntohl(tvb
, offset
+0);
227 version
= tvb_get_ntohl(tvb
, offset
+4);
228 proto
= tvb_get_ntohl(tvb
, offset
+8);
229 port
= tvb_get_ntohl(tvb
, offset
+12);
232 subtree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, 16,
233 ett_portmap_entry
, NULL
, "Map Entry: %s (%u) V%d",
234 rpc_prog_name(prog
), prog
, version
);
236 proto_tree_add_uint_format_value(subtree
, hf_portmap_prog
, tvb
,
238 "%s (%u)", rpc_prog_name(prog
), prog
);
239 proto_tree_add_uint(subtree
, hf_portmap_version
, tvb
,
240 offset
+4, 4, version
);
241 proto_tree_add_uint_format_value(subtree
, hf_portmap_proto
, tvb
,
243 "%s (0x%02x)", ipprotostr(proto
), proto
);
244 proto_tree_add_uint(subtree
, hf_portmap_port
, tvb
,
252 dissect_dump_reply(tvbuff_t
*tvb
, packet_info
*pinfo
,
253 proto_tree
*tree
, void* data _U_
)
255 return dissect_rpc_list(tvb
, pinfo
, tree
, 0, dissect_dump_entry
, NULL
);
258 /* Dissect a callit call */
260 dissect_callit_call(tvbuff_t
*tvb
, packet_info
*pinfo
,
261 proto_tree
*tree
, void* data _U_
)
263 uint32_t prog
, vers
, proc
;
266 prog
= tvb_get_ntohl(tvb
, offset
+0);
269 proto_tree_add_uint_format_value(tree
, hf_portmap_prog
, tvb
,
270 offset
, 4, prog
, "%s (%u)",
271 rpc_prog_name(prog
), prog
);
274 vers
= tvb_get_ntohl(tvb
, offset
+4);
277 proto_tree_add_uint(tree
, hf_portmap_version
, tvb
,
281 proc
= tvb_get_ntohl(tvb
, offset
+8);
284 proto_tree_add_uint_format_value(tree
, hf_portmap_proc
, tvb
,
285 offset
+8, 4, proc
, "%s (%u)",
286 rpc_proc_name(pinfo
->pool
, prog
, vers
, proc
), proc
);
291 /* Dissect the arguments for this procedure.
292 Make the columns non-writable, so the dissector won't change
293 them out from under us. */
294 col_set_writable(pinfo
->cinfo
, -1, false);
295 offset
= dissect_rpc_indir_call(tvb
, pinfo
, tree
, offset
,
296 hf_portmap_args
, prog
, vers
, proc
);
301 /* Dissect a callit reply */
303 dissect_callit_reply(tvbuff_t
*tvb
, packet_info
*pinfo
,
304 proto_tree
*tree
, void* data _U_
)
308 proto_tree_add_item(tree
, hf_portmap_port
, tvb
,
309 offset
, 4, ENC_BIG_ENDIAN
);
312 /* Dissect the result of this procedure.
313 Make the columns non-writable, so the dissector won't change
314 them out from under us. */
315 col_set_writable(pinfo
->cinfo
, -1, false);
316 offset
= dissect_rpc_indir_reply(tvb
, pinfo
, tree
, offset
,
317 hf_portmap_result
, hf_portmap_prog
, hf_portmap_version
,
323 /* proc number, "proc name", dissect_request, dissect_reply */
324 static const vsff portmap1_proc
[] = {
325 { PORTMAPPROC_NULL
, "NULL", dissect_rpc_void
, dissect_rpc_void
},
326 { PORTMAPPROC_SET
, "SET", dissect_rpc_unknown
, dissect_rpc_unknown
},
327 { PORTMAPPROC_UNSET
, "UNSET", dissect_rpc_unknown
, dissect_rpc_unknown
},
328 { PORTMAPPROC_GETPORT
, "GETPORT", dissect_rpc_unknown
, dissect_rpc_unknown
},
329 { PORTMAPPROC_DUMP
, "DUMP", dissect_rpc_unknown
, dissect_rpc_unknown
},
330 { PORTMAPPROC_CALLIT
, "CALLIT", dissect_rpc_unknown
, dissect_rpc_unknown
},
331 { 0, NULL
, NULL
, NULL
}
333 static const value_string portmap1_proc_vals
[] = {
334 { PORTMAPPROC_NULL
, "NULL" },
335 { PORTMAPPROC_SET
, "SET" },
336 { PORTMAPPROC_UNSET
, "UNSET" },
337 { PORTMAPPROC_GETPORT
, "GETPORT" },
338 { PORTMAPPROC_DUMP
, "DUMP" },
339 { PORTMAPPROC_CALLIT
, "CALLIT" },
342 /* end of Portmap version 1 */
344 static const vsff portmap2_proc
[] = {
345 { PORTMAPPROC_NULL
, "NULL",
346 dissect_rpc_void
, dissect_rpc_void
},
347 { PORTMAPPROC_SET
, "SET",
348 dissect_set_call
, dissect_set_reply
},
349 { PORTMAPPROC_UNSET
, "UNSET",
350 dissect_unset_call
, dissect_set_reply
},
351 { PORTMAPPROC_GETPORT
, "GETPORT",
352 dissect_getport_call
, dissect_getport_reply
},
353 { PORTMAPPROC_DUMP
, "DUMP",
354 dissect_rpc_void
, dissect_dump_reply
},
355 { PORTMAPPROC_CALLIT
, "CALLIT",
356 dissect_callit_call
, dissect_callit_reply
},
357 { 0, NULL
, NULL
, NULL
}
359 static const value_string portmap2_proc_vals
[] = {
360 { PORTMAPPROC_NULL
, "NULL" },
361 { PORTMAPPROC_SET
, "SET" },
362 { PORTMAPPROC_UNSET
, "UNSET" },
363 { PORTMAPPROC_GETPORT
, "GETPORT" },
364 { PORTMAPPROC_DUMP
, "DUMP" },
365 { PORTMAPPROC_CALLIT
, "CALLIT" },
368 /* end of Portmap version 2 */
371 /* RFC 1833, Page 3 */
373 dissect_rpcb(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
, void* data _U_
)
375 proto_item
* rpcb_item
;
376 proto_tree
* rpcb_tree
;
377 int old_offset
= offset
;
380 rpcb_item
= proto_tree_add_item(tree
, hf_portmap_rpcb
, tvb
,
382 rpcb_tree
= proto_item_add_subtree(rpcb_item
, ett_portmap_rpcb
);
384 prog
= tvb_get_ntohl(tvb
, offset
);
386 proto_tree_add_uint_format_value(rpcb_tree
, hf_portmap_rpcb_prog
, tvb
,
388 "%s (%u)", rpc_prog_name(prog
), prog
);
391 offset
= dissect_rpc_uint32(tvb
, rpcb_tree
,
392 hf_portmap_rpcb_version
, offset
);
393 offset
= dissect_rpc_string(tvb
, rpcb_tree
,
394 hf_portmap_rpcb_netid
, offset
, NULL
);
395 offset
= dissect_rpc_string(tvb
, rpcb_tree
,
396 hf_portmap_rpcb_addr
, offset
, NULL
);
397 offset
= dissect_rpc_string(tvb
, rpcb_tree
,
398 hf_portmap_rpcb_owner
, offset
, NULL
);
400 /* now we know, that rpcb is shorter */
402 proto_item_set_len(rpcb_item
, offset
- old_offset
);
410 /* RFC 1833, Page 7 */
412 dissect_rpcb3_getaddr_call(tvbuff_t
*tvb
, packet_info
*pinfo
,
413 proto_tree
*tree
, void* data _U_
)
415 return dissect_rpcb(tvb
, 0, pinfo
, tree
, data
);
419 /* RFC 1833, Page 7 */
421 dissect_rpcb3_getaddr_reply(tvbuff_t
*tvb
, packet_info
*pinfo _U_
,
422 proto_tree
*tree
, void* data _U_
)
424 return dissect_rpc_string(tvb
, tree
, hf_portmap_uaddr
, 0, NULL
);
428 /* RFC 1833, Page 7 */
430 dissect_rpcb3_dump_reply(tvbuff_t
*tvb
, packet_info
*pinfo
,
431 proto_tree
*tree
, void* data _U_
)
433 return dissect_rpc_list(tvb
, pinfo
, tree
, 0, dissect_rpcb
, NULL
);
436 /* RFC 1833, page 4 */
438 dissect_rpcb_rmtcallres(tvbuff_t
*tvb
, packet_info
*pinfo _U_
,
439 proto_tree
*tree
, void* data _U_
)
443 /* Dissect the remote universal address. */
444 offset
= dissect_rpc_string(tvb
, tree
,
445 hf_portmap_rpcb_addr
, offset
, NULL
);
447 /* Dissect the result of this procedure.
448 Make the columns non-writable, so the dissector won't change
449 them out from under us. */
450 col_set_writable(pinfo
->cinfo
, -1, false);
451 offset
= dissect_rpc_indir_reply(tvb
, pinfo
, tree
, offset
,
452 hf_portmap_result
, hf_portmap_prog
, hf_portmap_version
,
459 /* Portmapper version 3, RFC 1833, Page 7 */
460 static const vsff portmap3_proc
[] = {
461 { RPCBPROC_NULL
, "NULL",
462 dissect_rpc_void
, dissect_rpc_void
},
463 { RPCBPROC_SET
, "SET",
464 dissect_rpc_unknown
, dissect_rpc_unknown
},
465 { RPCBPROC_UNSET
, "UNSET",
466 dissect_rpc_unknown
, dissect_rpc_unknown
},
467 { RPCBPROC_GETADDR
, "GETADDR",
468 dissect_rpcb3_getaddr_call
, dissect_rpcb3_getaddr_reply
},
469 { RPCBPROC_DUMP
, "DUMP",
470 dissect_rpc_void
, dissect_rpcb3_dump_reply
},
471 { RPCBPROC_CALLIT
, "CALLIT",
472 dissect_callit_call
, dissect_rpcb_rmtcallres
},
473 { RPCBPROC_GETTIME
, "GETTIME",
474 dissect_rpc_unknown
, dissect_rpc_unknown
},
475 { RPCBPROC_UADDR2TADDR
, "UADDR2TADDR",
476 dissect_rpc_unknown
, dissect_rpc_unknown
},
477 { RPCBPROC_TADDR2UADDR
, "TADDR2UADDR",
478 dissect_rpc_unknown
, dissect_rpc_unknown
},
479 { 0, NULL
, NULL
, NULL
}
481 static const value_string portmap3_proc_vals
[] = {
482 { RPCBPROC_NULL
, "NULL" },
483 { RPCBPROC_SET
, "SET" },
484 { RPCBPROC_UNSET
, "UNSET" },
485 { RPCBPROC_GETADDR
, "GETADDR" },
486 { RPCBPROC_DUMP
, "DUMP" },
487 { RPCBPROC_CALLIT
, "CALLIT" },
488 { RPCBPROC_GETTIME
, "GETTIME" },
489 { RPCBPROC_UADDR2TADDR
, "UADDR2TADDR" },
490 { RPCBPROC_TADDR2UADDR
, "TADDR2UADDR" },
493 /* end of Portmap version 3 */
496 /* Portmapper version 4, RFC 1833, Page 8 */
497 static const vsff portmap4_proc
[] = {
498 { RPCBPROC_NULL
, "NULL",
499 dissect_rpc_void
, dissect_rpc_void
},
500 { RPCBPROC_SET
, "SET",
501 dissect_rpc_unknown
, dissect_rpc_unknown
},
502 { RPCBPROC_UNSET
, "UNSET",
503 dissect_rpc_unknown
, dissect_rpc_unknown
},
504 { RPCBPROC_GETADDR
, "GETADDR",
505 dissect_rpcb3_getaddr_call
, dissect_rpcb3_getaddr_reply
},
506 { RPCBPROC_DUMP
, "DUMP",
507 dissect_rpc_void
, dissect_rpcb3_dump_reply
},
508 { RPCBPROC_BCAST
, "BCAST",
509 dissect_callit_call
, dissect_rpcb_rmtcallres
},
510 { RPCBPROC_GETTIME
, "GETTIME",
511 dissect_rpc_unknown
, dissect_rpc_unknown
},
512 { RPCBPROC_UADDR2TADDR
, "UADDR2TADDR",
513 dissect_rpc_unknown
, dissect_rpc_unknown
},
514 { RPCBPROC_TADDR2UADDR
, "TADDR2UADDR",
515 dissect_rpc_unknown
, dissect_rpc_unknown
},
516 { RPCBPROC_GETVERSADDR
, "GETVERSADDR",
517 dissect_rpc_unknown
, dissect_rpc_unknown
},
518 { RPCBPROC_INDIRECT
, "INDIRECT",
519 dissect_callit_call
, dissect_rpcb_rmtcallres
},
520 { RPCBPROC_GETADDRLIST
, "GETADDRLIST",
521 dissect_rpc_unknown
, dissect_rpc_unknown
},
522 { RPCBPROC_GETSTAT
, "GETSTAT",
523 dissect_rpc_unknown
, dissect_rpc_unknown
},
524 { 0, NULL
, NULL
, NULL
}
526 static const value_string portmap4_proc_vals
[] = {
527 { RPCBPROC_NULL
, "NULL" },
528 { RPCBPROC_SET
, "SET" },
529 { RPCBPROC_UNSET
, "UNSET" },
530 { RPCBPROC_GETADDR
, "GETADDR" },
531 { RPCBPROC_DUMP
, "DUMP" },
532 { RPCBPROC_BCAST
, "BCAST" },
533 { RPCBPROC_GETTIME
, "GETTIME" },
534 { RPCBPROC_UADDR2TADDR
, "UADDR2TADDR" },
535 { RPCBPROC_TADDR2UADDR
, "TADDR2UADDR" },
536 { RPCBPROC_GETVERSADDR
, "GETVERSADDR" },
537 { RPCBPROC_INDIRECT
, "INDIRECT" },
538 { RPCBPROC_GETADDRLIST
, "GETADDRLIST" },
539 { RPCBPROC_GETSTAT
, "GETSTAT" },
542 /* end of Portmap version 4 */
544 static const rpc_prog_vers_info portmap_vers_info
[] = {
545 { 1, portmap1_proc
, &hf_portmap_procedure_v1
},
546 { 2, portmap2_proc
, &hf_portmap_procedure_v2
},
547 { 3, portmap3_proc
, &hf_portmap_procedure_v3
},
548 { 4, portmap4_proc
, &hf_portmap_procedure_v4
},
552 proto_register_portmap(void)
554 static hf_register_info hf
[] = {
555 { &hf_portmap_procedure_v1
, {
556 "V1 Procedure", "portmap.procedure_v1", FT_UINT32
, BASE_DEC
,
557 VALS(portmap1_proc_vals
), 0, NULL
, HFILL
}},
558 { &hf_portmap_procedure_v2
, {
559 "V2 Procedure", "portmap.procedure_v2", FT_UINT32
, BASE_DEC
,
560 VALS(portmap2_proc_vals
), 0, NULL
, HFILL
}},
561 { &hf_portmap_procedure_v3
, {
562 "V3 Procedure", "portmap.procedure_v3", FT_UINT32
, BASE_DEC
,
563 VALS(portmap3_proc_vals
), 0, NULL
, HFILL
}},
564 { &hf_portmap_procedure_v4
, {
565 "V4 Procedure", "portmap.procedure_v4", FT_UINT32
, BASE_DEC
,
566 VALS(portmap4_proc_vals
), 0, NULL
, HFILL
}},
567 { &hf_portmap_prog
, {
568 "Program", "portmap.prog", FT_UINT32
, BASE_DEC
,
569 NULL
, 0, NULL
, HFILL
}},
570 { &hf_portmap_port
, {
571 "Port", "portmap.port", FT_UINT32
, BASE_DEC
,
572 NULL
, 0, NULL
, HFILL
}},
573 { &hf_portmap_proc
, {
574 "Procedure", "portmap.proc", FT_UINT32
, BASE_DEC
,
575 NULL
, 0, NULL
, HFILL
}},
576 { &hf_portmap_proto
, {
577 "Protocol", "portmap.proto", FT_UINT32
, BASE_DEC
,
578 NULL
, 0, NULL
, HFILL
}},
579 { &hf_portmap_version
, {
580 "Version", "portmap.version", FT_UINT32
, BASE_DEC
,
581 NULL
, 0, NULL
, HFILL
}},
582 { &hf_portmap_answer
, {
583 "Answer", "portmap.answer", FT_BOOLEAN
, BASE_NONE
,
584 NULL
, 0x0, NULL
, HFILL
}},
585 { &hf_portmap_args
, {
586 "Arguments", "portmap.args", FT_BYTES
, BASE_NONE
,
587 NULL
, 0, NULL
, HFILL
}},
588 { &hf_portmap_result
, {
589 "Result", "portmap.result", FT_BYTES
, BASE_NONE
,
590 NULL
, 0, NULL
, HFILL
}},
591 { &hf_portmap_rpcb
, {
592 "RPCB", "portmap.rpcb", FT_NONE
, BASE_NONE
,
593 NULL
, 0, NULL
, HFILL
}},
594 { &hf_portmap_rpcb_prog
, {
595 "Program", "portmap.rpcb.prog", FT_UINT32
, BASE_DEC
,
596 NULL
, 0, NULL
, HFILL
}},
597 { &hf_portmap_rpcb_version
, {
598 "Version", "portmap.rpcb.version", FT_UINT32
, BASE_DEC
,
599 NULL
, 0, NULL
, HFILL
}},
600 { &hf_portmap_rpcb_netid
, {
601 "Network Id", "portmap.rpcb.netid", FT_STRING
, BASE_NONE
,
602 NULL
, 0, NULL
, HFILL
}},
603 { &hf_portmap_rpcb_addr
, { /* address in rpcb structure in request */
604 "Universal Address", "portmap.rpcb.addr", FT_STRING
, BASE_NONE
,
605 NULL
, 0, NULL
, HFILL
}},
606 { &hf_portmap_rpcb_owner
, {
607 "Owner of this Service", "portmap.rpcb.owner", FT_STRING
, BASE_NONE
,
608 NULL
, 0, NULL
, HFILL
}},
609 { &hf_portmap_uaddr
, { /* address in RPCBPROC_GETADDR reply */
610 "Universal Address", "portmap.uaddr", FT_STRING
, BASE_NONE
,
611 NULL
, 0, NULL
, HFILL
}},
613 static int *ett
[] = {
619 proto_portmap
= proto_register_protocol("Portmap", "Portmap", "portmap");
620 proto_register_field_array(proto_portmap
, hf
, array_length(hf
));
621 proto_register_subtree_array(ett
, array_length(ett
));
625 proto_reg_handoff_portmap(void)
627 /* Register the protocol as RPC */
628 rpc_init_prog(proto_portmap
, PORTMAP_PROGRAM
, ett_portmap
,
629 G_N_ELEMENTS(portmap_vers_info
), portmap_vers_info
);
631 rpc_handle
= find_dissector("rpc");
635 * Editor modelines - https://www.wireshark.org/tools/modelines.html
640 * indent-tabs-mode: t
643 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
644 * :indentSize=8:tabSize=8:noTabs=false: