diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2003-04-16 12:15:06 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2003-04-16 12:15:06 +0000 |
commit | b7931e40fde009e90f8799bd6e59b855cf202ca0 (patch) | |
tree | 415422a0c388646ce2c05780c085c45abc7083d7 /packet-rpc.c | |
parent | 7ddca7ecafcc8b383251e0b001b5e01a090a4fea (diff) |
Register RPC as dissector for both TCP and UDP port 111 which is used by ONC-RPC/PORTMAPPER
The reason for doing this is to allow a user to pick RPC as a protocol offered
by DecodeAs...
Why:
If ethereal has tcp-reseembly enabled, the heuristic dissector for rpc will not even attempt to find RPC packets.
If no PORTMAPPER/GETPORT are available either in the capture there is
currently no way for ethereal to know/learn that the conversation is ONC-RPC.
This at least will allow users to manually tell ethereal that such a conversation is ONC-RPC.
svn path=/trunk/; revision=7470
Diffstat (limited to 'packet-rpc.c')
-rw-r--r-- | packet-rpc.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/packet-rpc.c b/packet-rpc.c index 3b38f5297e..ec252ccc11 100644 --- a/packet-rpc.c +++ b/packet-rpc.c @@ -2,7 +2,7 @@ * Routines for rpc dissection * Copyright 1999, Uwe Girlich <Uwe.Girlich@philosys.de> * - * $Id: packet-rpc.c,v 1.115 2003/03/10 02:06:31 jmayer Exp $ + * $Id: packet-rpc.c,v 1.116 2003/04/16 12:15:06 sahlberg Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -3171,6 +3171,18 @@ proto_register_rpc(void) void proto_reg_handoff_rpc(void) { + dissector_handle_t rpc_tcp_handle; + dissector_handle_t rpc_udp_handle; + + /* tcp/udp port 111 is used by portmapper which is an onc-rpc service. + we register onc-rpc on this port so that we can choose RPC in + the list offered by DecodeAs. + */ + rpc_tcp_handle = create_dissector_handle(dissect_rpc_tcp, proto_rpc); + dissector_add("tcp.port", 111, rpc_tcp_handle); + rpc_udp_handle = create_dissector_handle(dissect_rpc, proto_rpc); + dissector_add("udp.port", 111, rpc_udp_handle); + heur_dissector_add("tcp", dissect_rpc_tcp_heur, proto_rpc); heur_dissector_add("udp", dissect_rpc_heur, proto_rpc); gssapi_handle = find_dissector("gssapi"); |