2 * Routines for MSX mapi packet dissection
4 * $Id: packet-mapi.c,v 1.1 1999/11/11 23:13:42 nneul Exp $
6 * Ethereal - Network traffic analyzer
7 * By Gerald Combs <gerald@unicom.net>
8 * Copyright 1998 Gerald Combs
10 * Copied from packet-tftp.c
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
33 #ifdef HAVE_SYS_TYPES_H
34 # include <sys/types.h>
37 #ifdef HAVE_NETINET_IN_H
38 # include <netinet/in.h>
45 static int proto_mapi = -1;
48 dissect_mapi(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
50 proto_tree *mapi_tree, *ti;
52 if (check_col(fd, COL_PROTOCOL))
53 col_add_str(fd, COL_PROTOCOL, "MAPI");
55 if (check_col(fd, COL_INFO))
57 col_add_fstr(fd, COL_INFO, "%s",
58 (pi.match_port == pi.destport) ? "Request" : "Response");
63 ti = proto_tree_add_item(tree, proto_mapi, offset, END_OF_FRAME, NULL);
64 mapi_tree = proto_item_add_subtree(ti, ETT_MAPI);
66 if (pi.match_port == pi.destport)
68 proto_tree_add_text(mapi_tree, offset,
69 END_OF_FRAME, "Request: <opaque data>" );
73 proto_tree_add_text(mapi_tree, offset,
74 END_OF_FRAME, "Response: <opaque data>");
80 proto_register_mapi(void)
82 proto_mapi = proto_register_protocol("MAPI", "mapi");