* Routines for MS Exchange MAPI
* Copyright 2002, Ronnie Sahlberg
*
- * $Id: packet-dcerpc-mapi.c,v 1.21 2003/05/10 02:15:04 guy Exp $
+ * $Id: packet-dcerpc-mapi.c,v 1.27 2004/02/25 09:31:05 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#include "prefs.h"
static int proto_dcerpc_mapi = -1;
+static int hf_mapi_opnum = -1;
static int hf_mapi_unknown_string = -1;
static int hf_mapi_unknown_short = -1;
static int hf_mapi_unknown_long = -1;
static int
mapi_decrypt_pdu(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, char *drep)
+ packet_info *pinfo, proto_tree *tree, guint8 *drep)
{
dcerpc_info *di;
mapi_decrypted_data_t *mmd=NULL;
}
if(!pinfo->fd->flags.visited){
+ ptr=(const unsigned char *)tvb_get_ptr(tvb, offset, len);
mmd=g_mem_chunk_alloc(mapi_decrypted_data_chunk);
mmd->callid=di->call_id;
mmd->frame=pinfo->fd->num;
mmd->data=g_malloc(len);
- ptr=(const unsigned char *)tvb_get_ptr(tvb, offset, len);
for(i=0;i<len;i++){
mmd->data[i]=ptr[i]^0xa5;
}
static int
mapi_logon_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, char *drep)
+ packet_info *pinfo, proto_tree *tree, guint8 *drep)
{
offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, drep,
sizeof(guint8), hf_mapi_unknown_string, TRUE, NULL);
or padding bytes. Captures where this code breaks will tell us about that */
static int
mapi_logon_reply(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, char *drep)
+ packet_info *pinfo, proto_tree *tree, guint8 *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_mapi_hnd, NULL, FALSE, FALSE);
+ hf_mapi_hnd, NULL, NULL, FALSE, FALSE);
DISSECT_UNKNOWN(20); /* this is 20 bytes, unless there are pointers */
}
static int
-mapi_unknown_02_request(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, char *drep)
+mapi_ec_do_rpc_request(tvbuff_t *tvb, int offset,
+ packet_info *pinfo, proto_tree *tree, guint8 *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_mapi_hnd, NULL, FALSE, FALSE);
+ hf_mapi_hnd, NULL, NULL, FALSE, FALSE);
if(!mapi_decrypt){
/* this is a unidimensional varying and conformant array of
return offset;
}
static int
-mapi_unknown_02_reply(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, char *drep)
+mapi_ec_do_rpc_reply(tvbuff_t *tvb, int offset,
+ packet_info *pinfo, proto_tree *tree, guint8 *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_mapi_hnd, NULL, FALSE, FALSE);
+ hf_mapi_hnd, NULL, NULL, FALSE, FALSE);
if(!mapi_decrypt){
/* this is a unidimensional varying and conformant array of
static int
mapi_logoff_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, char *drep)
+ packet_info *pinfo, proto_tree *tree, guint8 *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_mapi_hnd, NULL, FALSE, FALSE);
+ hf_mapi_hnd, NULL, NULL, FALSE, FALSE);
return offset;
}
static int
mapi_logoff_reply(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, char *drep)
+ packet_info *pinfo, proto_tree *tree, guint8 *drep)
{
offset = dissect_nt_policy_hnd(tvb, offset, pinfo, tree, drep,
- hf_mapi_hnd, NULL, FALSE, FALSE);
+ hf_mapi_hnd, NULL, NULL, FALSE, FALSE);
offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep,
hf_mapi_rc, NULL);
static dcerpc_sub_dissector dcerpc_mapi_dissectors[] = {
- { MAPI_LOGON, "Logon",
+ { MAPI_EC_DO_CONNECT, "EcDoConnect",
mapi_logon_rqst,
mapi_logon_reply },
- { MAPI_LOGOFF, "Logoff",
+ { MAPI_EC_DO_DISCONNECT,"EcDoDisconnect",
mapi_logoff_rqst,
mapi_logoff_reply },
- { MAPI_UNKNOWN_02, "unknown_02",
- mapi_unknown_02_request,
- mapi_unknown_02_reply },
-
+ { MAPI_EC_DO_RPC, "EcDoRpc",
+ mapi_ec_do_rpc_request,
+ mapi_ec_do_rpc_reply },
+ { MAPI_EC_GET_MORE_RPC, "EcGetMoreRpc", NULL, NULL },
+ { MAPI_EC_REGISTER_PUSH_NOTIFICATION, "EcRRegisterPushNotification",
+ NULL, NULL },
+ { MAPI_EC_UNREGISTER_PUSH_NOTIFICATION, "EcRUnregisterPushNotification",
+ NULL, NULL },
+ { MAPI_EC_DUMMY_RPC, "EcDummyRpc", NULL, NULL },
+ { MAPI_EC_GET_DC_NAME, "EcRGetDCName", NULL, NULL },
+ { MAPI_EC_NET_GET_DC_NAME, "EcRNetGetDCName", NULL, NULL },
+ { MAPI_EC_DO_RPC_EXT, "EcDoRpcExt", NULL, NULL },
{0, NULL, NULL, NULL }
};
{
static hf_register_info hf[] = {
+ { &hf_mapi_opnum,
+ { "Operation", "mapi.opnum", FT_UINT16, BASE_DEC,
+ NULL, 0x0, "", HFILL }},
+
{ &hf_mapi_hnd,
{ "Context Handle", "mapi.hnd", FT_BYTES, BASE_NONE,
NULL, 0x0, "", HFILL }},
dcerpc_init_uuid(proto_dcerpc_mapi, ett_dcerpc_mapi,
&uuid_dcerpc_mapi, ver_dcerpc_mapi,
- dcerpc_mapi_dissectors, -1);
+ dcerpc_mapi_dissectors, hf_mapi_opnum);
}