diff options
author | Michael Mann <mmann78@netscape.net> | 2014-07-23 13:38:55 -0400 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2014-07-26 20:59:42 +0000 |
commit | 31ecdf5b06bff3bb2e706e840c28c519698e6f67 (patch) | |
tree | 71b3e59889e862560412d317df71113f66b094b6 /epan/dissectors/packet-rsvp.c | |
parent | 507d07eda6ad562d4567cf0ee83aa9b03997beca (diff) |
Refactor "common" Conversation table functionality.
Refactor (non-GUI) conversation table functionality from gtk/Qt to epan. Also refactor "common GUI" conversation table functionality.
The idea is to not have to modify the GUI when a dissector adds a new "conversation type"
Change-Id: I11f08d0d7edd631218663ba4b902c4a4c849acda
Reviewed-on: https://code.wireshark.org/review/3113
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'epan/dissectors/packet-rsvp.c')
-rw-r--r-- | epan/dissectors/packet-rsvp.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/epan/dissectors/packet-rsvp.c b/epan/dissectors/packet-rsvp.c index 1eabc28539..a4c3363aa2 100644 --- a/epan/dissectors/packet-rsvp.c +++ b/epan/dissectors/packet-rsvp.c @@ -108,6 +108,7 @@ #include <epan/etypes.h> #include <epan/ipproto.h> #include <epan/conversation.h> +#include <epan/conversation_table.h> #include <epan/tap.h> #include <epan/sminmpec.h> #include <epan/wmem/wmem.h> @@ -1871,6 +1872,26 @@ rsvp_init_protocol(void) rsvp_request_hash = g_hash_table_new(rsvp_hash, rsvp_equal); } +static const char* rsvp_conv_get_filter_type(conv_item_t* conv _U_, conv_filter_type_e filter _U_) +{ + /* XXX - Not sure about this */ + return CONV_FILTER_INVALID; +} + +static ct_dissector_info_t rsvp_ct_dissector_info = {&rsvp_conv_get_filter_type}; + +static int +rsvp_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip) +{ + conv_hash_t *hash = (conv_hash_t*) pct; + const rsvp_conversation_info *rsvph = (const rsvp_conversation_info *)vip; + + add_conversation_table_data(hash, &rsvph->source, &rsvph->destination, + 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &rsvp_ct_dissector_info, PT_NONE); + + return 1; +} + static inline int rsvp_class_to_filter_num(int classnum) { @@ -9156,6 +9177,8 @@ proto_register_rsvp(void) /* Initialization routine for RSVP conversations */ register_init_routine(&rsvp_init_protocol); + + register_conversation_table(proto_rsvp, TRUE, rsvp_conversation_packet); } void |