diff options
author | Michael Mann <mmann78@netscape.net> | 2017-10-29 10:12:59 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-10-29 16:53:57 +0000 |
commit | abfb6441177961fbdfa9648fdd2c40ef0ef3cefd (patch) | |
tree | dc5d1b438a052e73ec243d2f10e772e39fec3894 /epan/dissectors/packet-enip.c | |
parent | 1bc6d4e96573f89ecdd719cb3cac92754b91f52c (diff) |
Add conversation endpoint type
For the moment this mirrors the port_type enumeration (PT_XXX), but the
intent is to move away from using "port types", eliminating most (if not
all)
Added conversation_pt_to_endpoint_type() so that conversations deal with the
correct enumeration. This is for dissector that use pinfo->ptype as input
to conversation APIs. Explicit use of port types are converted to using
ENDPOINT_XXX type.
Change-Id: Ia0bf553a3943b702c921f185407e03ce93ebf0ef
Reviewed-on: https://code.wireshark.org/review/24166
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-enip.c')
-rw-r--r-- | epan/dissectors/packet-enip.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/epan/dissectors/packet-enip.c b/epan/dissectors/packet-enip.c index adb73837bf..aa5f9872b8 100644 --- a/epan/dissectors/packet-enip.c +++ b/epan/dissectors/packet-enip.c @@ -1134,10 +1134,10 @@ enip_open_cip_connection( packet_info *pinfo, cip_conn_info_t* connInfo) /* similar logic to find_or_create_conversation(), but since I/O traffic is on UDP, the pinfo parameter doesn't have the correct information */ if ((conversation = find_conversation(pinfo->num, &pinfo->dst, &dest_address, - PT_UDP, connInfo->O2T.port, 0, NO_PORT_B)) == NULL) { + ENDPOINT_UDP, connInfo->O2T.port, 0, NO_PORT_B)) == NULL) { conversation = conversation_new(pinfo->num, &pinfo->dst, &dest_address, - PT_UDP, connInfo->O2T.port, 0, NO_PORT2); + ENDPOINT_UDP, connInfo->O2T.port, 0, NO_PORT2); } enip_info = (enip_conv_info_t *)conversation_get_proto_data(conversation, proto_enip); @@ -1155,10 +1155,10 @@ enip_open_cip_connection( packet_info *pinfo, cip_conn_info_t* connInfo) or ports aren't equal, a separate conversation must be generated */ dest_address.data = connInfo->T2O.ipaddress.data; if ((conversationTO = find_conversation(pinfo->num, &pinfo->src, &dest_address, - PT_UDP, connInfo->T2O.port, 0, NO_PORT_B)) == NULL) { + ENDPOINT_UDP, connInfo->T2O.port, 0, NO_PORT_B)) == NULL) { conversationTO = conversation_new(pinfo->num, &pinfo->src, - &dest_address, PT_UDP, + &dest_address, ENDPOINT_UDP, connInfo->T2O.port, 0, NO_PORT2); } @@ -1317,7 +1317,7 @@ enip_get_io_connid(packet_info *pinfo, guint32 connid, enum enip_connid_type* pc */ conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, - pinfo->ptype, + conversation_pt_to_endpoint_type(pinfo->ptype), pinfo->destport, 0, NO_PORT_B); if (conversation == NULL) |