From d67c163eba47a775354f213d99b050881bbcf808 Mon Sep 17 00:00:00 2001 From: Ryan Doyle Date: Sun, 31 May 2015 13:48:44 +1000 Subject: 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 Petri-Dish: Alexis La Goutte Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- epan/dissectors/packet-pcp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'epan/dissectors/packet-pcp.c') 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); } -- cgit v1.2.3