diff options
author | Ryan Doyle <ryan@doylenet.net> | 2015-05-31 13:48:44 +1000 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2015-06-04 06:29:36 +0000 |
commit | d67c163eba47a775354f213d99b050881bbcf808 (patch) | |
tree | 92e37dd9f71dc8abd666649782391977e1cdbb7e /epan/dissectors/packet-pcp.c | |
parent | 305960174de658510c81877bed01323bdb0b9dc6 (diff) |
Dissection support for pmproxy
Implements dissection for the Performance Co-Pilot proxy protocol. Its a
simple protocol that exchanges host and port information and then passes
all traffic via the usual PCP protocol.
Change-Id: I54fbf6b7755b7b1c60e0e1696ac9c4f0d98d8fe7
Reviewed-on: https://code.wireshark.org/review/8704
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-pcp.c')
-rw-r--r-- | epan/dissectors/packet-pcp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/epan/dissectors/packet-pcp.c b/epan/dissectors/packet-pcp.c index d6ceb2f928..1de4c09019 100644 --- a/epan/dissectors/packet-pcp.c +++ b/epan/dissectors/packet-pcp.c @@ -32,6 +32,7 @@ void proto_register_pcp(void); void proto_reg_handoff_pcp(void); #define PCP_PORT 44321 +#define PMPROXY_PORT 44322 #define PCP_HEADER_LEN 12 static dissector_handle_t pcp_handle; @@ -1500,7 +1501,7 @@ static int dissect_pcp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr packet_type = tvb_get_ntohl(tvb, 4); /* check if we are the client requesting or the server */ - if (pinfo->srcport == PCP_PORT) { + if (pinfo->srcport == PCP_PORT || pinfo->srcport == PMPROXY_PORT) { col_set_str(pinfo->cinfo, COL_INFO, "Server > Client "); } else { col_set_str(pinfo->cinfo, COL_INFO, "Client > Server "); @@ -2412,11 +2413,12 @@ void proto_register_pcp(void) proto_register_field_array(proto_pcp, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); + + pcp_handle = new_register_dissector("pcp", dissect_pcp, proto_pcp); } void proto_reg_handoff_pcp(void) { - pcp_handle = new_create_dissector_handle(dissect_pcp, proto_pcp); dissector_add_uint("tcp.port", PCP_PORT, pcp_handle); } |