diff options
-rw-r--r-- | epan/conversation.c | 39 | ||||
-rw-r--r-- | epan/conversation.h | 6 | ||||
-rw-r--r-- | packaging/debian/libwireshark0.symbols | 1 |
3 files changed, 46 insertions, 0 deletions
diff --git a/epan/conversation.c b/epan/conversation.c index a9da69d940..88384aaadc 100644 --- a/epan/conversation.c +++ b/epan/conversation.c @@ -1904,6 +1904,7 @@ conversation_type conversation_pt_to_conversation_type(port_type pt) case PT_USB: return CONVERSATION_USB; case PT_I2C: + /* XXX - this doesn't currently have conversations */ return CONVERSATION_I2C; case PT_IBQP: return CONVERSATION_IBQP; @@ -1917,6 +1918,44 @@ conversation_type conversation_pt_to_conversation_type(port_type pt) return CONVERSATION_NONE; } +WS_DLL_PUBLIC +endpoint_type conversation_pt_to_endpoint_type(port_type pt) +{ + switch (pt) + { + case PT_NONE: + return ENDPOINT_NONE; + case PT_SCTP: + return ENDPOINT_SCTP; + case PT_TCP: + return ENDPOINT_TCP; + case PT_UDP: + return ENDPOINT_UDP; + case PT_DCCP: + return ENDPOINT_DCCP; + case PT_IPX: + return ENDPOINT_IPX; + case PT_DDP: + return ENDPOINT_DDP; + case PT_IDP: + return ENDPOINT_IDP; + case PT_USB: + return ENDPOINT_USB; + case PT_I2C: + /* XXX - this doesn't have ports */ + return ENDPOINT_I2C; + case PT_IBQP: + return ENDPOINT_IBQP; + case PT_BLUETOOTH: + return ENDPOINT_BLUETOOTH; + case PT_IWARP_MPA: + return ENDPOINT_IWARP_MPA; + } + + DISSECTOR_ASSERT(FALSE); + return ENDPOINT_NONE; +} + /* * Editor modelines - https://www.wireshark.org/tools/modelines.html * diff --git a/epan/conversation.h b/epan/conversation.h index 891b1a5443..086a315663 100644 --- a/epan/conversation.h +++ b/epan/conversation.h @@ -474,6 +474,12 @@ WS_DLL_PUBLIC wmem_map_t *get_conversation_hashtables(void); */ WS_DLL_PUBLIC conversation_type conversation_pt_to_conversation_type(port_type pt); +/* Temporary function to handle port_type to endpoint_type conversion + For now it's a 1-1 mapping, but the intention is to remove + many of the port_type instances in favor of endpoint_type + */ +WS_DLL_PUBLIC endpoint_type conversation_pt_to_endpoint_type(port_type pt); + #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/packaging/debian/libwireshark0.symbols b/packaging/debian/libwireshark0.symbols index 9fdd013db9..c0ecc8110c 100644 --- a/packaging/debian/libwireshark0.symbols +++ b/packaging/debian/libwireshark0.symbols @@ -181,6 +181,7 @@ libwireshark.so.0 libwireshark0 #MINVER# conversation_new_by_id@Base 2.5.0 conversation_new_full@Base 3.7.1 conversation_pt_to_conversation_type@Base 4.0.0-rc2 + conversation_pt_to_endpoint_type@Base 2.5.0 conversation_set_conv_addr_port_endpoints@Base 4.0.0-rc2 conversation_set_dissector@Base 1.9.1 conversation_set_dissector_from_frame_number@Base 2.0.0 |