/* packet-mapi.c
* Routines for MSX mapi packet dissection
*
- * $Id: packet-mapi.c,v 1.4 2000/01/07 22:05:32 guy Exp $
+ * $Id: packet-mapi.c,v 1.8 2000/08/07 03:20:51 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
static gint ett_mapi = -1;
-void
+#define TCP_PORT_MAPI 1065
+
+static void
dissect_mapi(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
{
proto_tree *mapi_tree, *ti;
if (check_col(fd, COL_PROTOCOL))
- col_add_str(fd, COL_PROTOCOL, "MAPI");
+ col_add_str(fd, COL_PROTOCOL, "MAPI");
if (check_col(fd, COL_INFO))
{
if (tree)
{
- ti = proto_tree_add_item(tree, proto_mapi, offset, END_OF_FRAME, NULL);
+ ti = proto_tree_add_item(tree, proto_mapi, NullTVB, offset, END_OF_FRAME, FALSE);
mapi_tree = proto_item_add_subtree(ti, ett_mapi);
if (pi.match_port == pi.destport)
{
- proto_tree_add_item_hidden(mapi_tree, hf_mapi_request,
+ proto_tree_add_boolean_hidden(mapi_tree, hf_mapi_request, NullTVB,
offset, END_OF_FRAME, TRUE);
- proto_tree_add_text(mapi_tree, offset,
+ proto_tree_add_text(mapi_tree, NullTVB, offset,
END_OF_FRAME, "Request: <opaque data>" );
}
else
{
- proto_tree_add_item_hidden(mapi_tree, hf_mapi_response,
+ proto_tree_add_boolean_hidden(mapi_tree, hf_mapi_response, NullTVB,
offset, END_OF_FRAME, TRUE);
- proto_tree_add_text(mapi_tree, offset,
+ proto_tree_add_text(mapi_tree, NullTVB, offset,
END_OF_FRAME, "Response: <opaque data>");
}
}
proto_register_field_array(proto_mapi, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
+
+void
+proto_reg_handoff_mapi(void)
+{
+ old_dissector_add("tcp.port", TCP_PORT_MAPI, dissect_mapi);
+}