aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mongo.c
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss.ws@gmail.com>2015-02-12 17:23:46 -0500
committerJeff Morriss <jeff.morriss.ws@gmail.com>2015-02-13 14:03:24 +0000
commit48a95dea4f9ac9629e15dc170a7e0f82489884e6 (patch)
tree9bde6d719484b54210513672e81145f9c4bf7da2 /epan/dissectors/packet-mongo.c
parentc1610c7bd8c9478e535acde6dc5eb9ef90e2dbb5 (diff)
Register the Mongo dissector by name so it can be used with TLS.
Change-Id: Ic9d688603747312aa29e5af038363f70c3cbae33 Reviewed-on: https://code.wireshark.org/review/7097 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-mongo.c')
-rw-r--r--epan/dissectors/packet-mongo.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/epan/dissectors/packet-mongo.c b/epan/dissectors/packet-mongo.c
index c46a81ccbf..1d9ecfeed9 100644
--- a/epan/dissectors/packet-mongo.c
+++ b/epan/dissectors/packet-mongo.c
@@ -400,6 +400,7 @@ dissect_bson_document(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tre
return document_length;
}
+
static int
dissect_mongo_reply(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree)
{
@@ -431,6 +432,7 @@ dissect_mongo_reply(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree
}
return offset;
}
+
static int
dissect_mongo_msg(tvbuff_t *tvb, guint offset, proto_tree *tree)
{
@@ -572,6 +574,7 @@ dissect_mongo_kill_cursors(tvbuff_t *tvb, guint offset, proto_tree *tree)
}
return offset;
}
+
static int
dissect_mongo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
@@ -1028,6 +1031,9 @@ proto_register_mongo(void)
proto_mongo = proto_register_protocol("Mongo Wire Protocol", "MONGO", "mongo");
+ /* Allow dissector to find be found by name. */
+ new_register_dissector("mongo", dissect_mongo, proto_mongo);
+
proto_register_field_array(proto_mongo, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
expert_mongo = expert_register_protocol(proto_mongo);