diff options
author | Tim Potter <tpot@samba.org> | 2002-04-16 02:02:04 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2002-04-16 02:02:04 +0000 |
commit | 0f7ea5950dcc1c6a9610a591c49aa224cc094ae3 (patch) | |
tree | a6a5bd54e66fbe70f4db52e74ad6b358a8d132ac /packet-dcerpc-nt.c | |
parent | 693bcba7cb34a04d925fa73a2cf95dc36bac3e1d (diff) |
Display non-zero return codes in COL_INFO.
svn path=/trunk/; revision=5170
Diffstat (limited to 'packet-dcerpc-nt.c')
-rw-r--r-- | packet-dcerpc-nt.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/packet-dcerpc-nt.c b/packet-dcerpc-nt.c index 0ec9387083..8514c64c36 100644 --- a/packet-dcerpc-nt.c +++ b/packet-dcerpc-nt.c @@ -2,7 +2,7 @@ * Routines for DCERPC over SMB packet disassembly * Copyright 2001, Tim Potter <tpot@samba.org> * - * $Id: packet-dcerpc-nt.c,v 1.24 2002/03/29 04:35:48 sahlberg Exp $ + * $Id: packet-dcerpc-nt.c,v 1.25 2002/04/16 02:02:04 tpot Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -889,3 +889,25 @@ void dcerpc_smb_check_long_frame(tvbuff_t *tvb, int offset, tvb_length_remaining(tvb, offset)); } } + +/* Dissect a NT status code */ + +int +dissect_ntstatus(tvbuff_t *tvb, gint offset, packet_info *pinfo, + proto_tree *tree, char *drep, + int hfindex, guint32 *pdata) +{ + guint32 status; + + offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, + hfindex, &status); + + if (status != 0 && check_col(pinfo->cinfo, COL_INFO)) + col_append_fstr(pinfo->cinfo, COL_INFO, ", %s", + val_to_str(status, NT_errors, + "Unknown error")); + if (pdata) + *pdata = status; + + return offset; +} |