Greg Morris:

This update adds NCP 87/66.
Also add additional error codes, added hf_definition for super class
(NDS). Cleaned up some unused variables (Warnings when building
Ethereal). Fixed NCP type 0x9999 (server busy packets to echo
information to summary information), Added subtree format to NDS
dissector to cleanup display.

svn path=/trunk/; revision=6331
This commit is contained in:
Jörg Mayer 2002-09-25 00:37:01 +00:00
parent 4de3370e14
commit 8c3a0d068f
3 changed files with 103 additions and 58 deletions

View File

@ -24,7 +24,7 @@ http://developer.novell.com/ndk/doc/docui/index.htm#../ncp/ncp__enu/data/
for a badly-formatted HTML version of the same PDF.
$Id: ncp2222.py,v 1.33 2002/09/22 15:46:41 gerald Exp $
$Id: ncp2222.py,v 1.34 2002/09/25 00:36:58 jmayer Exp $
Copyright (c) 2000-2002 by Gilbert Ramirez <gram@alumni.rice.edu>
@ -5137,6 +5137,7 @@ def define_errors():
errors[0x7f00] = "Lock Waiting"
errors[0x8000] = "Lock fail"
errors[0x8001] = "File in Use"
errors[0x8100] = "A file handle could not be allocated by the file server"
errors[0x8101] = "Out of File Handles"
@ -5155,8 +5156,8 @@ def define_errors():
errors[0x8701] = "Create Filename Error"
errors[0x8800] = "Invalid file handle"
errors[0x8900] = "Unauthorized to search this directory"
errors[0x8a00] = "Unauthorized to delete this directory"
errors[0x8900] = "Unauthorized to search this file/directory"
errors[0x8a00] = "Unauthorized to delete this file/directory"
errors[0x8b00] = "Unauthorized to rename a file in this directory"
errors[0x8c00] = "No set privileges"
@ -5874,6 +5875,7 @@ static int hf_nds_new_part_id = -1;
static int hf_nds_child_part_id = -1;
static int hf_nds_master_part_id = -1;
static int hf_nds_target_name = -1;
static int hf_nds_super = -1;
"""
@ -7257,6 +7259,9 @@ proto_register_ncp2222(void)
{ &hf_nds_base,
{ "Base Class", "ncp.nds_base", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
{ &hf_nds_super,
{ "Super Class", "ncp.nds_super", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }},
{ &hf_nds_entry_info,
{ "Entry Information", "ncp.nds_entry_info", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
@ -11364,7 +11369,7 @@ def define_ncp2222():
srec( FileNameStruct, req_cond="ncp.ret_info_mask_fname == 1" ),
])
pkt.ReqCondSizeVariable()
pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
pkt.CompletionCodes([0x0000, 0x8001, 0x8101, 0x8401, 0x8501,
0x8701, 0x8900, 0x8d00, 0x8f00, 0x9001, 0x9600,
0x9804, 0x9b03, 0x9c03, 0xa500, 0xbf00, 0xfd00, 0xff16])
# 2222/5702, 87/02
@ -11609,7 +11614,7 @@ def define_ncp2222():
], info_str=(Path, "Delete: %s", "/%s"))
pkt.Reply(8)
pkt.CompletionCodes([0x0000, 0x8000, 0x8101, 0x8401, 0x8501,
0x8701, 0x8d00, 0x8e00, 0x8f00, 0x9001, 0x9600,
0x8701, 0x8a00, 0x8d00, 0x8e00, 0x8f00, 0x9001, 0x9600,
0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
# 2222/5709, 87/09
pkt = NCP(0x5709, "Set Short Directory Handle", 'file', has_length=0)
@ -12504,6 +12509,13 @@ def define_ncp2222():
rec( 8, 4, FileHandle, BE ),
rec( 12, 4, EffectiveRights ),
])
pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])
# 2222/5742, 87/66
pkt = NCP(0x5742, "Novell Advanced Auditing Service (NAAS)", 'auditing', has_length=0)
pkt.Request(8)
pkt.Reply(8)
pkt.CompletionCodes([0x0000, 0x7300, 0x8000, 0x8101, 0x8401, 0x8501,
0x8701, 0x8800, 0x8d00, 0x8f00, 0x9001, 0x9600,
0x9804, 0x9b03, 0x9c03, 0xbf00, 0xfd00, 0xff16])

View File

@ -5,7 +5,7 @@
* Modified to decode server op-lock
* & NDS packets by Greg Morris <gmorris@novell.com>
*
* $Id: packet-ncp.c,v 1.69 2002/09/22 15:46:42 gerald Exp $
* $Id: packet-ncp.c,v 1.70 2002/09/25 00:37:01 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -82,7 +82,7 @@ static int hf_ncp_slot = -1;
static int hf_ncp_control_code = -1;
static int hf_ncp_fragment_handle = -1;
static int hf_lip_echo = -1;
static int hf_ping_version = -1;
/*static int hf_ping_version = -1;*/
gint ett_ncp = -1;
gint ett_nds = -1;
@ -90,7 +90,7 @@ static gint ett_ncp_system_flags = -1;
/* desegmentation of NCP over TCP */
static gboolean ncp_desegment = TRUE;
static ncp_nds_true = FALSE;
/*static int ncp_nds_true = FALSE;*/
static dissector_handle_t data_handle;
@ -399,11 +399,12 @@ dissect_ncp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
break;
}
}
case NCP_POSITIVE_ACK: /* Positive Acknowledgement */
case NCP_SERVICE_REQUEST: /* Server NCP Request */
case NCP_SERVICE_REPLY: /* Server NCP Reply */
case NCP_WATCHDOG: /* Watchdog Packet */
case NCP_DEALLOCATE_SLOT: /* Deallocate Slot Request */
case NCP_POSITIVE_ACK: /* Positive Acknowledgement */
default:
proto_tree_add_uint(ncp_tree, hf_ncp_seq, tvb, commhdr + 2, 1, header.sequence);
proto_tree_add_uint(ncp_tree, hf_ncp_connection,tvb, commhdr + 3, 3, nw_connection);

View File

@ -8,7 +8,7 @@
* Gilbert Ramirez <gram@alumni.rice.edu>
* Modified to decode NDS packets by Greg Morris <gmorris@novell.com>
*
* $Id: packet-ncp2222.inc,v 1.20 2002/09/22 17:39:00 gerald Exp $
* $Id: packet-ncp2222.inc,v 1.21 2002/09/25 00:36:59 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -928,6 +928,7 @@ typedef struct {
guint32 bit16hfname;
guint8 mvtype;
guint32 vflags;
guint32 nds_version;
} nds_val;
@ -1321,7 +1322,6 @@ void free_proto_tree(void *tree)
}
}
static guint32
align_4(tvbuff_t *tvb, guint32 aoffset)
{
@ -1330,8 +1330,8 @@ align_4(tvbuff_t *tvb, guint32 aoffset)
return (aoffset%4);
}
return 0;
}
}
static void
get_string(tvbuff_t* tvb, guint offset, guint str_length, char *dest_buf)
{
@ -1566,7 +1566,7 @@ process_bitfield(proto_tree *ncp_tree, tvbuff_t *tvb, nds_val *values)
static void
print_nds_values(proto_tree *vtree, tvbuff_t *tvb, guint32 syntax_type, nds_val *vvalues)
{
gint value1 = 0;
guint32 value1 = 0;
guint32 value2 = 0;
guint32 value3 = 0;
guint32 value4 = 0;
@ -1785,6 +1785,10 @@ print_nds_values(proto_tree *vtree, tvbuff_t *tvb, guint32 syntax_type, nds_val
proto_tree_add_uint_format(nvtree, hf_replica_number, tvb, voffset,
4, value3, "Replica Number %d", value3);
voffset = voffset+4;
if(vvalues->nds_version == 0xfe)
{
voffset += 4;
}
number_of_items = tvb_get_letohl(tvb, voffset); /* Number of Addresses */
aditem = proto_tree_add_uint_format(vtree, hf_nds_uint32value, tvb, voffset,
4, number_of_items, "Number of Addresses: %d", number_of_items);
@ -1963,7 +1967,7 @@ return;
static guint32
print_es_type(proto_tree *estree, tvbuff_t *tvb, nds_val *values, guint32 vtype, guint32 ioffset)
{
guint32 value1;
gint value1;
guint32 value2;
guint32 value3;
guint32 value4;
@ -2412,6 +2416,10 @@ process_multivalues(proto_tree *ncp_tree, tvbuff_t *tvb, nds_val *values)
guint16 event_num = 0;
guint32 bvalue=0;
nds_val temp_values;
proto_tree *sub1tree;
proto_item *sub1item;
proto_tree *sub2tree;
proto_item *sub2item;
mval_buf.buffer = "";
if(values->mvtype != 12)
@ -2476,7 +2484,7 @@ process_multivalues(proto_tree *ncp_tree, tvbuff_t *tvb, nds_val *values)
get_string(tvb, ioffset, value2, mval_buf.buffer);
values->vstring = mval_buf.buffer;
proto_tree_add_string(ntree, hf_mv_string, tvb, ioffset,
value2, values->vstring);
value2, values->vstring);
values->voffset=ioffset + value2;
print_nds_values(ntree, tvb, value1, values);
ioffset = values->voffset;
@ -3415,12 +3423,14 @@ process_multivalues(proto_tree *ncp_tree, tvbuff_t *tvb, nds_val *values)
number_of_referals = values->vvalue;
for (i = 0; i < number_of_referals; i++)
{
ioffset += align_4(tvb, ioffset);
value1 = tvb_get_letohl(tvb, ioffset);
ioffset = ioffset + 4;
get_string(tvb, ioffset, value1, mval_buf.buffer);
temp_values.vstring = mval_buf.buffer;
proto_tree_add_string(ntree, hf_nds_base_class, tvb, ioffset,
sub1item = proto_tree_add_string(ntree, hf_nds_base_class, tvb, ioffset,
value1, temp_values.vstring);
sub1tree = proto_item_add_subtree(sub1item, ett_nds);
ioffset = ioffset + value1;
ioffset += align_4(tvb, ioffset);
if(values->vflags != 0)
@ -3464,7 +3474,7 @@ process_multivalues(proto_tree *ncp_tree, tvbuff_t *tvb, nds_val *values)
temp_values.bit15hfname = hf_bit15cflags;
temp_values.bit16 = "Not Defined";
temp_values.bit16hfname = hf_bit16cflags;
process_bitfield(ntree, tvb, &temp_values);
process_bitfield(sub1tree, tvb, &temp_values);
ioffset = ioffset+4;
if(values->vflags != 5)
{
@ -3474,15 +3484,16 @@ process_multivalues(proto_tree *ncp_tree, tvbuff_t *tvb, nds_val *values)
break;
}
ioffset += 4;
proto_tree_add_bytes(ntree, hf_nds_asn1, tvb, ioffset, value1, tvb_get_ptr(tvb, ioffset, value1));
proto_tree_add_bytes(sub1tree, hf_nds_asn1, tvb, ioffset, value1, tvb_get_ptr(tvb, ioffset, value1));
ioffset += value1;
ioffset += (value1%2);
}
if(values->vflags == 1 || values->vflags == 2 || values->vflags == 4)
{
value1 = tvb_get_letohl(tvb, ioffset); /* Super Classes */
proto_tree_add_uint_format(ntree, hf_nds_purge, tvb, ioffset,
sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_purge, tvb, ioffset,
4, value1, "Super Classes %d", value1);
sub2tree = proto_item_add_subtree(sub2item, ett_nds);
ioffset = ioffset + 4;
for (r = 0; r < value1; r++)
{
@ -3490,14 +3501,15 @@ process_multivalues(proto_tree *ncp_tree, tvbuff_t *tvb, nds_val *values)
ioffset = ioffset + 4;
get_string(tvb, ioffset, value2, mval_buf.buffer);
temp_values.vstring = mval_buf.buffer;
proto_tree_add_string(ntree, hf_nds_base_class, tvb, ioffset,
proto_tree_add_string(sub2tree, hf_nds_super, tvb, ioffset,
value2, temp_values.vstring);
ioffset = ioffset + value2;
ioffset += align_4(tvb, ioffset);
}
value1 = tvb_get_letohl(tvb, ioffset); /* Containment Classes */
proto_tree_add_uint_format(ntree, hf_nds_purge, tvb, ioffset,
sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_purge, tvb, ioffset,
4, value1, "Containment Classes %d", value1);
sub2tree = proto_item_add_subtree(sub2item, ett_nds);
ioffset = ioffset + 4;
for (r = 0; r < value1; r++)
{
@ -3505,14 +3517,15 @@ process_multivalues(proto_tree *ncp_tree, tvbuff_t *tvb, nds_val *values)
ioffset = ioffset + 4;
get_string(tvb, ioffset, value2, mval_buf.buffer);
temp_values.vstring = mval_buf.buffer;
proto_tree_add_string(ntree, hf_nds_base_class, tvb, ioffset,
proto_tree_add_string(sub2tree, hf_nds_base_class, tvb, ioffset,
value2, temp_values.vstring);
ioffset = ioffset + value2;
ioffset += align_4(tvb, ioffset);
}
value1 = tvb_get_letohl(tvb, ioffset); /* Naming Attributes */
proto_tree_add_uint_format(ntree, hf_nds_purge, tvb, ioffset,
sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_purge, tvb, ioffset,
4, value1, "Naming Attributes %d", value1);
sub2tree = proto_item_add_subtree(sub2item, ett_nds);
ioffset = ioffset + 4;
for (r = 0; r < value1; r++)
{
@ -3520,14 +3533,15 @@ process_multivalues(proto_tree *ncp_tree, tvbuff_t *tvb, nds_val *values)
ioffset = ioffset + 4;
get_string(tvb, ioffset, value2, mval_buf.buffer);
temp_values.vstring = mval_buf.buffer;
proto_tree_add_string(ntree, hf_nds_base_class, tvb, ioffset,
proto_tree_add_string(sub2tree, hf_mv_string, tvb, ioffset,
value2, temp_values.vstring);
ioffset = ioffset + value2;
ioffset += align_4(tvb, ioffset);
}
value1 = tvb_get_letohl(tvb, ioffset); /* Mandatory Attributes */
proto_tree_add_uint_format(ntree, hf_nds_purge, tvb, ioffset,
sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_purge, tvb, ioffset,
4, value1, "Mandatory Attributes %d", value1);
sub2tree = proto_item_add_subtree(sub2item, ett_nds);
ioffset = ioffset + 4;
for (r = 0; r < value1; r++)
{
@ -3535,14 +3549,15 @@ process_multivalues(proto_tree *ncp_tree, tvbuff_t *tvb, nds_val *values)
ioffset = ioffset + 4;
get_string(tvb, ioffset, value2, mval_buf.buffer);
temp_values.vstring = mval_buf.buffer;
proto_tree_add_string(ntree, hf_nds_base_class, tvb, ioffset,
proto_tree_add_string(sub2tree, hf_mv_string, tvb, ioffset,
value2, temp_values.vstring);
ioffset = ioffset + value2;
ioffset += align_4(tvb, ioffset);
}
value1 = tvb_get_letohl(tvb, ioffset); /* Optional Attributes */
proto_tree_add_uint_format(ntree, hf_nds_purge, tvb, ioffset,
sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_purge, tvb, ioffset,
4, value1, "Optional Attributes %d", value1);
sub2tree = proto_item_add_subtree(sub2item, ett_nds);
ioffset = ioffset + 4;
for (r = 0; r < value1; r++)
{
@ -3551,7 +3566,7 @@ process_multivalues(proto_tree *ncp_tree, tvbuff_t *tvb, nds_val *values)
ioffset = ioffset + 4;
get_string(tvb, ioffset, value2, mval_buf.buffer);
temp_values.vstring = mval_buf.buffer;
proto_tree_add_string(ntree, hf_nds_base_class, tvb, ioffset,
proto_tree_add_string(sub2tree, hf_mv_string, tvb, ioffset,
value2, temp_values.vstring);
ioffset = ioffset + value2;
if(tvb_length_remaining(tvb, ioffset) < 4 )
@ -3563,8 +3578,9 @@ process_multivalues(proto_tree *ncp_tree, tvbuff_t *tvb, nds_val *values)
if(values->vflags == 2 || values->vflags == 4) /* Class Definitions of Super Classes */
{
value1 = tvb_get_letohl(tvb, ioffset); /* Containment Classes */
proto_tree_add_uint_format(ntree, hf_nds_purge, tvb, ioffset,
sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_purge, tvb, ioffset,
4, value1, "Containment Classes %d", value1);
sub2tree = proto_item_add_subtree(sub2item, ett_nds);
ioffset = ioffset + 4;
for (r = 0; r < value1; r++)
{
@ -3572,14 +3588,15 @@ process_multivalues(proto_tree *ncp_tree, tvbuff_t *tvb, nds_val *values)
ioffset = ioffset + 4;
get_string(tvb, ioffset, value2, mval_buf.buffer);
temp_values.vstring = mval_buf.buffer;
proto_tree_add_string(ntree, hf_nds_base_class, tvb, ioffset,
proto_tree_add_string(sub2tree, hf_nds_base_class, tvb, ioffset,
value2, temp_values.vstring);
ioffset = ioffset + value2;
ioffset += align_4(tvb, ioffset);
}
value1 = tvb_get_letohl(tvb, ioffset); /* Naming Attributes */
proto_tree_add_uint_format(ntree, hf_nds_purge, tvb, ioffset,
sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_purge, tvb, ioffset,
4, value1, "Naming Attributes %d", value1);
sub2tree = proto_item_add_subtree(sub2item, ett_nds);
ioffset = ioffset + 4;
for (r = 0; r < value1; r++)
{
@ -3587,14 +3604,15 @@ process_multivalues(proto_tree *ncp_tree, tvbuff_t *tvb, nds_val *values)
ioffset = ioffset + 4;
get_string(tvb, ioffset, value2, mval_buf.buffer);
temp_values.vstring = mval_buf.buffer;
proto_tree_add_string(ntree, hf_nds_base_class, tvb, ioffset,
proto_tree_add_string(sub2tree, hf_mv_string, tvb, ioffset,
value2, temp_values.vstring);
ioffset = ioffset + value2;
ioffset += align_4(tvb, ioffset);
}
value1 = tvb_get_letohl(tvb, ioffset); /* Mandatory Attributes */
proto_tree_add_uint_format(ntree, hf_nds_purge, tvb, ioffset,
sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_purge, tvb, ioffset,
4, value1, "Mandatory Attributes %d", value1);
sub2tree = proto_item_add_subtree(sub2item, ett_nds);
ioffset = ioffset + 4;
for (r = 0; r < value1; r++)
{
@ -3602,14 +3620,15 @@ process_multivalues(proto_tree *ncp_tree, tvbuff_t *tvb, nds_val *values)
ioffset = ioffset + 4;
get_string(tvb, ioffset, value2, mval_buf.buffer);
temp_values.vstring = mval_buf.buffer;
proto_tree_add_string(ntree, hf_nds_base_class, tvb, ioffset,
proto_tree_add_string(sub2tree, hf_mv_string, tvb, ioffset,
value2, temp_values.vstring);
ioffset = ioffset + value2;
ioffset += align_4(tvb, ioffset);
}
value1 = tvb_get_letohl(tvb, ioffset); /* Optional Attributes */
proto_tree_add_uint_format(ntree, hf_nds_purge, tvb, ioffset,
sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_purge, tvb, ioffset,
4, value1, "Optional Attributes %d", value1);
sub2tree = proto_item_add_subtree(sub2item, ett_nds);
ioffset = ioffset + 4;
for (r = 0; r < value1; r++)
{
@ -3617,13 +3636,13 @@ process_multivalues(proto_tree *ncp_tree, tvbuff_t *tvb, nds_val *values)
ioffset = ioffset + 4;
get_string(tvb, ioffset, value2, mval_buf.buffer);
temp_values.vstring = mval_buf.buffer;
proto_tree_add_string(ntree, hf_nds_base_class, tvb, ioffset,
proto_tree_add_string(sub2tree, hf_mv_string, tvb, ioffset,
value2, temp_values.vstring);
ioffset = ioffset + value2;
ioffset += align_4(tvb, ioffset);
}
value1 = tvb_get_letohl(tvb, ioffset); /* Default ACL */
proto_tree_add_uint_format(ntree, hf_nds_eid, tvb, ioffset,
proto_tree_add_uint_format(sub1tree, hf_nds_eid, tvb, ioffset,
4, value1, "Default ACL %08x", value1);
ioffset = ioffset + 4;
if(tvb_length_remaining(tvb, ioffset) < 4 )
@ -3634,33 +3653,34 @@ process_multivalues(proto_tree *ncp_tree, tvbuff_t *tvb, nds_val *values)
if(values->vflags == 5) /* Base Class Definitions */
{
value1 = tvb_get_letohl(tvb, ioffset); /* Creation Timestamp */
proto_tree_add_uint_format(ntree, hf_es_seconds, tvb, ioffset,
proto_tree_add_uint_format(sub1tree, hf_es_seconds, tvb, ioffset,
4, value1, "Creation Timestamp Seconds %d", value1);
ioffset = ioffset + 4;
replica_num = tvb_get_letohs(tvb, ioffset); /* Replica */
proto_tree_add_item(ntree, hf_nds_replica_num, tvb, ioffset,
proto_tree_add_item(sub1tree, hf_nds_replica_num, tvb, ioffset,
2, replica_num);
ioffset = ioffset + 2;
event_num = tvb_get_letohs(tvb, ioffset); /* Event */
proto_tree_add_item(ntree, hf_nds_event_num, tvb, ioffset,
proto_tree_add_item(sub1tree, hf_nds_event_num, tvb, ioffset,
2, event_num);
ioffset = ioffset + 2;
value1 = tvb_get_letohl(tvb, ioffset); /* Modification Timestamp */
proto_tree_add_uint_format(ntree, hf_es_seconds, tvb, ioffset,
proto_tree_add_uint_format(sub1tree, hf_es_seconds, tvb, ioffset,
4, value1, "Modification Timestamp Seconds %d", value1);
ioffset = ioffset + 4;
replica_num = tvb_get_letohs(tvb, ioffset); /* Replica */
proto_tree_add_item(ntree, hf_nds_replica_num, tvb, ioffset,
proto_tree_add_item(sub1tree, hf_nds_replica_num, tvb, ioffset,
2, replica_num);
ioffset = ioffset + 2;
event_num = tvb_get_letohs(tvb, ioffset); /* Event */
proto_tree_add_item(ntree, hf_nds_event_num, tvb, ioffset,
proto_tree_add_item(sub1tree, hf_nds_event_num, tvb, ioffset,
2, event_num);
ioffset = ioffset + 2;
/* Class Definition */
value1 = tvb_get_letohl(tvb, ioffset); /* Super Classes */
proto_tree_add_uint_format(ntree, hf_nds_purge, tvb, ioffset,
sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_purge, tvb, ioffset,
4, value1, "Super Classes %d", value1);
sub2tree = proto_item_add_subtree(sub2item, ett_nds);
ioffset = ioffset + 4;
for (r = 0; r < value1; r++)
{
@ -3668,14 +3688,15 @@ process_multivalues(proto_tree *ncp_tree, tvbuff_t *tvb, nds_val *values)
ioffset = ioffset + 4;
get_string(tvb, ioffset, value2, mval_buf.buffer);
temp_values.vstring = mval_buf.buffer;
proto_tree_add_string(ntree, hf_nds_base_class, tvb, ioffset,
proto_tree_add_string(sub2tree, hf_nds_super, tvb, ioffset,
value2, temp_values.vstring);
ioffset = ioffset + value2;
ioffset += align_4(tvb, ioffset);
}
value1 = tvb_get_letohl(tvb, ioffset); /* Containment Classes */
proto_tree_add_uint_format(ntree, hf_nds_purge, tvb, ioffset,
sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_purge, tvb, ioffset,
4, value1, "Containment Classes %d", value1);
sub2tree = proto_item_add_subtree(sub2item, ett_nds);
ioffset = ioffset + 4;
for (r = 0; r < value1; r++)
{
@ -3683,14 +3704,15 @@ process_multivalues(proto_tree *ncp_tree, tvbuff_t *tvb, nds_val *values)
ioffset = ioffset + 4;
get_string(tvb, ioffset, value2, mval_buf.buffer);
temp_values.vstring = mval_buf.buffer;
proto_tree_add_string(ntree, hf_nds_base_class, tvb, ioffset,
proto_tree_add_string(sub2tree, hf_nds_base_class, tvb, ioffset,
value2, temp_values.vstring);
ioffset = ioffset + value2;
ioffset += align_4(tvb, ioffset);
}
value1 = tvb_get_letohl(tvb, ioffset); /* Naming Attributes */
proto_tree_add_uint_format(ntree, hf_nds_purge, tvb, ioffset,
sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_purge, tvb, ioffset,
4, value1, "Naming Attributes %d", value1);
sub2tree = proto_item_add_subtree(sub2item, ett_nds);
ioffset = ioffset + 4;
for (r = 0; r < value1; r++)
{
@ -3698,14 +3720,15 @@ process_multivalues(proto_tree *ncp_tree, tvbuff_t *tvb, nds_val *values)
ioffset = ioffset + 4;
get_string(tvb, ioffset, value2, mval_buf.buffer);
temp_values.vstring = mval_buf.buffer;
proto_tree_add_string(ntree, hf_nds_base_class, tvb, ioffset,
proto_tree_add_string(sub2tree, hf_mv_string, tvb, ioffset,
value2, temp_values.vstring);
ioffset = ioffset + value2;
ioffset += align_4(tvb, ioffset);
}
value1 = tvb_get_letohl(tvb, ioffset); /* Mandatory Attributes */
proto_tree_add_uint_format(ntree, hf_nds_purge, tvb, ioffset,
sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_purge, tvb, ioffset,
4, value1, "Mandatory Attributes %d", value1);
sub2tree = proto_item_add_subtree(sub2item, ett_nds);
ioffset = ioffset + 4;
for (r = 0; r < value1; r++)
{
@ -3713,14 +3736,15 @@ process_multivalues(proto_tree *ncp_tree, tvbuff_t *tvb, nds_val *values)
ioffset = ioffset + 4;
get_string(tvb, ioffset, value2, mval_buf.buffer);
temp_values.vstring = mval_buf.buffer;
proto_tree_add_string(ntree, hf_nds_base_class, tvb, ioffset,
proto_tree_add_string(sub2tree, hf_mv_string, tvb, ioffset,
value2, temp_values.vstring);
ioffset = ioffset + value2;
ioffset += align_4(tvb, ioffset);
}
value1 = tvb_get_letohl(tvb, ioffset); /* Optional Attributes */
proto_tree_add_uint_format(ntree, hf_nds_purge, tvb, ioffset,
sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_purge, tvb, ioffset,
4, value1, "Optional Attributes %d", value1);
sub2tree = proto_item_add_subtree(sub2item, ett_nds);
ioffset = ioffset + 4;
for (r = 0; r < value1; r++)
{
@ -3728,13 +3752,13 @@ process_multivalues(proto_tree *ncp_tree, tvbuff_t *tvb, nds_val *values)
ioffset = ioffset + 4;
get_string(tvb, ioffset, value2, mval_buf.buffer);
temp_values.vstring = mval_buf.buffer;
proto_tree_add_string(ntree, hf_nds_base_class, tvb, ioffset,
proto_tree_add_string(sub2tree, hf_mv_string, tvb, ioffset,
value2, temp_values.vstring);
ioffset = ioffset + value2;
ioffset += align_4(tvb, ioffset);
}
value1 = tvb_get_letohl(tvb, ioffset); /* Default ACL */
proto_tree_add_uint_format(ntree, hf_nds_eid, tvb, ioffset,
proto_tree_add_uint_format(sub1tree, hf_nds_eid, tvb, ioffset,
4, value1, "Default ACL %08x", value1);
ioffset = ioffset + 4;
if(tvb_length_remaining(tvb, ioffset) < 4 )
@ -4229,7 +4253,14 @@ dissect_ncp_reply(tvbuff_t *tvb, packet_info *pinfo,
error_string = ncp_error_string(ncp_rec->errors, completion_code);
}
else if (completion_code == 0) {
error_string = "OK";
if(type == NCP_POSITIVE_ACK)
{
error_string = "Server Busy, Request Being Processed";
}
else
{
error_string = "OK";
}
}
else {
error_string = "Not OK";
@ -4338,7 +4369,6 @@ dissect_ncp_reply(tvbuff_t *tvb, packet_info *pinfo,
if (nds_flags & 0x00020000) {
nds_string_len = tvb_get_letohl(tvb, nds_offset);
get_string(tvb, nds_offset+4, nds_string_len, reply_buffer.buffer);
/*nds_string_len = strlen(reply_buffer.buffer);*/
proto_tree_add_text(ncp_tree, tvb, nds_offset+4, nds_string_len, "NDS Tree Name: %s", reply_buffer.buffer);
}
}
@ -4795,6 +4825,7 @@ dissect_ncp_reply(tvbuff_t *tvb, packet_info *pinfo,
p3values.hfname = hf_nds_attr;
p3values.mvtype = 2;
p3values.vflags = request_value->req_nds_flags;
p3values.nds_version = request_value->nds_version;
}
else
{
@ -4835,6 +4866,7 @@ dissect_ncp_reply(tvbuff_t *tvb, packet_info *pinfo,
p4values.hfname = hf_nds_attr;
p4values.mvtype = 2;
p4values.vflags = request_value->req_nds_flags;
p4values.nds_version = request_value->nds_version;
}
break;
case 0x04:
@ -5276,7 +5308,7 @@ dissect_ncp_reply(tvbuff_t *tvb, packet_info *pinfo,
verb_string = "NDS Continuation Fragment";
break;
}
if(request_value->nds_request_verb != 0)
if(request_value->nds_request_verb != NULL)
{
proto_tree_add_uint_format(ncp_tree, hf_ncp_nds_verb, tvb, 6, 0,
request_value->nds_request_verb, "NDS Verb: %d, %s",