* Gilbert Ramirez <gram@alumni.rice.edu>
* Modified to decode NDS packets by Greg Morris <gmorris@novell.com>
*
- * $Id: packet-ncp2222.inc,v 1.43 2002/10/19 01:05:44 guy Exp $
+ * Portions Copyright (c) Gilbert Ramirez 2000-2002
+ * Portions Copyright (c) Novell, Inc. 2000-2003
+ *
+ * $Id: packet-ncp2222.inc,v 1.68 2003/12/03 09:28:17 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#define NCP_PACKET_INIT_COUNT 200
#define PROTO_LENGTH_UNTIL_END -1
+gboolean nds_defragment = TRUE;
+
+typedef struct {
+ guint32 nds_frag_verb;
+ guint32 nds_frag_version;
+ guint32 nds_frag_flags;
+ guint32 nds_length;
+ guint32 nds_frag;
+ gboolean nds_fragmented;
+} frag_info;
+
+frag_info frags[100];
+
+const fragment_items nds_frag_items = {
+ &ett_nds_segment,
+ &ett_nds_segments,
+ &hf_nds_segments,
+ &hf_nds_segment,
+ &hf_nds_segment_overlap,
+ &hf_nds_segment_overlap_conflict,
+ &hf_nds_segment_multiple_tails,
+ &hf_nds_segment_too_long_segment,
+ &hf_nds_segment_error,
+ NULL,
+ "segments"
+};
+
static const value_string nds_tags[] = {
{ 0x00000000, "No Such Entry" },
{ 0x00000001, "Local Entry" },
{ 0, NULL }
};
+static const value_string nds_search_scope[] = {
+ { 0x0000, "Examine the base object only" },
+ { 0x0001, "Search the immediate subordinates of the base object" },
+ { 0x0002, "Search the base object and all its subordinates" },
+ { 0x0003, "Search the base objects and all objects in its partition (Implemented in NDS 8)" },
+ { 0, NULL }
+};
+
static const value_string nds_reply_errors[] = {
{ 0xffffffff, "(-1) Insufficient Space" },
{ 0xffffff89, "(-119) Buffer too Small" },
{ 0xfffffd0d, "(-755) Invalid Synchronization Data" },
{ 0xfffffd0c, "(-756) Stream Exists" },
{ 0xfffffd0b, "(-757) Auxiliary Has Containment" },
- { 0xfffffd0a, "(-758) Auxiliary Not Containere" },
+ { 0xfffffd0a, "(-758) Auxiliary Not Container" },
{ 0xfffffd09, "(-759) Auxiliary Not Effective" },
{ 0xfffffd08, "(-760) Auxiliary On Alias" },
{ 0xfffffd07, "(-761) Have Seen State" },
{ 0xfffffcfb, "(-773) Iterator Syntax" },
{ 0xfffffcfa, "(-774) Repairing DIB" },
{ 0xfffffcf9, "(-775) Invalid OID Format" },
+ { 0xfffffcf8, "(-776) Attempted to perform an NDS operation, and the DS agent on this server is closing" },
+ { 0xfffffcf7, "(-777) Attempted to modify an object's attribute that is not stored on the sparse replica" },
+ { 0xfffffcf6, "(-778) VpVector and VpvUser which must be correlated, are out of sync" },
+ { 0xfffffcf5, "(-779) Error Cannot Go Remote" },
+ { 0xfffffcf4, "(-780) Request not Supported" },
+ { 0xfffffcf3, "(-781) Entry Not Local" },
+ { 0xfffffcf2, "(-782) Root Unreachable" },
+ { 0xfffffcf1, "(-783) VRDIM Not Initialized" },
+ { 0xfffffcf0, "(-784) Wait Timeout" },
+ { 0xfffffcef, "(-785) DIB Error" },
+ { 0xfffffcee, "(-786) DIB IO Failure" },
+ { 0xfffffced, "(-787) Illegal Schema Attribute" },
+ { 0xfffffcec, "(-788) Error Schema Partition" },
+ { 0xfffffceb, "(-789) Invalid Template" },
+ { 0xfffffcea, "(-790) Error Opening File" },
+ { 0xfffffce9, "(-791) Error Direct Opening File" },
+ { 0xfffffce8, "(-792) Error Creating File" },
+ { 0xfffffce7, "(-793) Error Direct Creating File" },
+ { 0xfffffce6, "(-794) Error Reading File" },
+ { 0xfffffce5, "(-795) Error Direct Reading File" },
+ { 0xfffffce4, "(-796) Error Writing File" },
+ { 0xfffffce3, "(-797) Error Direct Writing File" },
+ { 0xfffffce2, "(-798) Error Positioning in File" },
+ { 0xfffffce1, "(-799) Error Getting File Size" },
+ { 0xffffe88f, "(-6001) Error Truncating File" },
+ { 0xffffe88e, "(-6002) Error Parsing File Name" },
+ { 0xffffe88d, "(-6003) Error Closing File" },
+ { 0xffffe88c, "(-6004) Error Getting File Info" },
+ { 0xffffe88b, "(-6005) Error Expanding File" },
+ { 0xffffe88a, "(-6006) Error Getting Free Blocks" },
+ { 0xffffe889, "(-6007) Error Checking File Existence" },
+ { 0xffffe888, "(-6008) Error Deleting File" },
+ { 0xffffe887, "(-6009) Error Renaming File" },
+ { 0xffffe886, "(-6010) Error Initializing IO System" },
+ { 0xffffe885, "(-6011) Error Flushing File" },
+ { 0xffffe884, "(-6012) Error Setting Up for Read" },
+ { 0xffffe883, "(-6013) Error Setting up for Write" },
+ { 0xffffe882, "(-6014) Error Old View" },
+ { 0xffffe881, "(-6015) Server in Skulk" },
+ { 0xffffe880, "(-6016) Error Returning Partial Results" },
+ { 0xffffe87f, "(-6017) No Such Schema" },
+ { 0xffffe87e, "(-6018) Serial Number Mismatch" },
+ { 0xffffe87d, "(-6019) Bad Referal Database Serial Number" },
+ { 0xffffe87c, "(-6020) Bad Referal Serial Number" },
+ { 0xffffe87b, "(-6021) Invalid File Sequence" },
+ { 0xffffe87a, "(-6022) Error Referal Trans Gap" },
+ { 0xffffe879, "(-6023) Bad Referal File Number" },
+ { 0xffffe878, "(-6024) Referal File Not Found" },
+ { 0xffffe877, "(-6025) Error Backup Active" },
+ { 0xffffe876, "(-6026) Referal Device Full" },
+ { 0xffffe875, "(-6027) Unsupported Version" },
+ { 0xffffe874, "(-6028) Error Must Wait Checkpoint" },
+ { 0xffffe873, "(-6029) Attribute Maintenance in Progress" },
+ { 0xffffe872, "(-6030) Error Abort Transaction" },
{ 0xffff0000, "Ok" },
{ 0x0000, "Ok" },
{ 0, NULL }
guint32 nw_eid;
} ncp_req_eid_hash_key;
-typedef struct {
- const ncp_record *ncp_rec;
- gboolean *req_cond_results;
- guint32 req_frame_num;
- guint32 req_nds_flags;
- guint8 nds_request_verb;
- guint8 nds_version;
- char * object_name;
-} ncp_req_hash_value;
-
typedef struct {
char object_name[256];
char *object_class;
gint
ncp_equal(gconstpointer v, gconstpointer v2)
{
- ncp_req_hash_key *val1 = (ncp_req_hash_key*)v;
- ncp_req_hash_key *val2 = (ncp_req_hash_key*)v2;
+ const ncp_req_hash_key *val1 = (const ncp_req_hash_key*)v;
+ const ncp_req_hash_key *val2 = (const ncp_req_hash_key*)v2;
if (val1->conversation == val2->conversation &&
val1->nw_sequence == val2->nw_sequence ) {
gint
ncp_eid_equal(gconstpointer v, gconstpointer v2)
{
- ncp_req_eid_hash_key *val1 = (ncp_req_eid_hash_key*)v;
- ncp_req_eid_hash_key *val2 = (ncp_req_eid_hash_key*)v2;
+ const ncp_req_eid_hash_key *val1 = (const ncp_req_eid_hash_key*)v;
+ const ncp_req_eid_hash_key *val2 = (const ncp_req_eid_hash_key*)v2;
if (val1->nw_eid == val2->nw_eid ) {
return 1;
guint
ncp_hash(gconstpointer v)
{
- ncp_req_hash_key *ncp_key = (ncp_req_hash_key*)v;
+ const ncp_req_hash_key *ncp_key = (const ncp_req_hash_key*)v;
return GPOINTER_TO_UINT(ncp_key->conversation) + ncp_key->nw_sequence;
}
guint
ncp_eid_hash(gconstpointer v)
{
- ncp_req_eid_hash_key *ncp_eid_key = (ncp_req_eid_hash_key*)v;
+ const ncp_req_eid_hash_key *ncp_eid_key = (const ncp_req_eid_hash_key*)v;
return GPOINTER_TO_UINT(ncp_eid_key->nw_eid);
}
static void
ncp_init_protocol(void)
{
+ /* fragment */
+ fragment_table_init(&nds_fragment_table);
+ reassembled_table_init(&nds_reassembled_table);
+
if (ncp_req_hash) {
g_hash_table_foreach(ncp_req_hash, ncp_req_hash_cleanup, NULL);
g_hash_table_destroy(ncp_req_hash);
{
if (ncp_req_hash) {
/* Destroy the hash, but don't clean up request_condition data. */
- g_hash_table_destroy(ncp_req_hash);
- ncp_req_hash = NULL;
+ /*g_hash_table_destroy(ncp_req_hash);
+ ncp_req_hash = NULL;*/
}
if (ncp_req_hash_keys) {
- g_mem_chunk_destroy(ncp_req_hash_keys);
- ncp_req_hash_keys = NULL;
+ /*g_mem_chunk_destroy(ncp_req_hash_keys);
+ ncp_req_hash_keys = NULL;*/
}
- /* Don't free the ncp_req_hash_values, as they're
+ /* Don't free the ncp_req_hash_values or EID_hash_table, as they're
* needed during random-access processing of the proto_tree.*/
- if (ncp_req_eid_hash) {
- /* Destroy the hash, but don't clean up request_condition data. */
- g_hash_table_destroy(ncp_req_eid_hash);
- ncp_req_eid_hash = NULL;
- }
- if (ncp_req_eid_hash_keys) {
- g_mem_chunk_destroy(ncp_req_eid_hash_keys);
- ncp_req_eid_hash_keys = NULL;
- }
}
ncp_req_hash_value*
request_value->req_nds_flags = 0;
request_value->nds_request_verb = 0;
request_value->nds_version = 0;
- request_value->object_name = NULL;
+ strcpy(request_value->object_name, " ");
+ request_value->nds_frag = TRUE;
g_hash_table_insert(ncp_req_hash, request_key, request_value);
guint
get_item_value(proto_item *item)
{
- return fvalue_get_integer(PITEM_FINFO(item)->value);
+ return fvalue_get_integer(&PITEM_FINFO(item)->value);
}
char *
get_item_string(proto_item *item)
{
- return fvalue_get(PITEM_FINFO(item)->value);
+ return fvalue_get(&PITEM_FINFO(item)->value);
}
char *
#define MVTYPE_LIST_PARTITIONS 12
#define MVTYPE_CLASS_NAMES 13
#define MVTYPE_MODIFY_CLASS 14
+#define MVTYPE_ADD_ATTR_REQUEST 15
typedef struct {
guint8 vtype;
{
/* 2-second resolution */
nwtime->second = (data & 0x001f) * 2;
- nwtime->minute = ((data & 0x07e0) >> 5) + 1;
- nwtime->hour = ((data & 0xf800) >> 11) + 1;
+ nwtime->minute = ((data & 0x07e0) >> 5);
+ nwtime->hour = ((data & 0xf800) >> 11);
}
char *
guint32 i;
guint16 c_char;
guint32 length_remaining = 0;
-
+
length_remaining = tvb_length_remaining(tvb, offset);
if(str_length > length_remaining || str_length > 1024)
{
strcpy(dest_buf, "String too long to process");
return;
- }
+ }
+ dest_buf[0] = '\0';
+ if(str_length == 0)
+ {
+ return;
+ }
for ( i = 0; i < str_length; i++ )
{
c_char = tvb_get_guint8(tvb, offset );
{
if (c_char != 0x00)
{
- c_char = 0x2e;
- dest_buf[i] = c_char & 0xff;
+ c_char = '.';
+ dest_buf[i] = c_char & 0xff;
}
else
{
return;
}
}
-dest_buf[i] = '\0';
-return;
+ dest_buf[i] = '\0';
+ return;
+}
+
+static void
+uni_to_string(char * data, guint32 str_length, char *dest_buf)
+{
+ guint32 i;
+ guint16 c_char;
+ guint32 length_remaining = 0;
+
+ length_remaining = str_length;
+ dest_buf[0] = '\0';
+ if(str_length == 0)
+ {
+ return;
+ }
+ for ( i = 0; i < str_length; i++ )
+ {
+ c_char = data[i];
+ if (c_char<0x20 || c_char>0x7e)
+ {
+ if (c_char != 0x00)
+ {
+ c_char = '.';
+ dest_buf[i] = c_char & 0xff;
+ }
+ else
+ {
+ i--;
+ str_length--;
+ }
+ }
+ else
+ {
+ dest_buf[i] = c_char & 0xff;
+ }
+ length_remaining--;
+
+ if(length_remaining==0)
+ {
+ dest_buf[i+1] = '\0';
+ return;
+ }
+ }
+ dest_buf[i] = '\0';
+ return;
}
/*************************************
* %s = string = 2
**************************************/
int
-get_info_type(gchar* check_string)
+get_info_type(const gchar* check_string)
{
guint length;
guint i;
for (i = 0 ; i < length-1 ; i++ ) {
char_val = check_string[i+1];
- if (check_string[i] == 0x25 && check_string[i+1] == 0x64) {
+ if (check_string[i] == 0x25 && check_string[i+1] == 0x64) { /* %d Digits*/
return 0;
}
- if ( check_string[i] == 0x25 && check_string[i+1] == 0x78) {
+ if ( check_string[i] == 0x78 && check_string[i+1] == 0x25 && check_string[i+2] == 0x73) { /* x%s Bytes*/
return 1;
}
}
- return 2;
+ return 2; /* Normal String */
}
static void
process_bitfield(proto_tree *ncp_tree, tvbuff_t *tvb, nds_val *values)
{
- char flags_str[512];
- char * sep = NULL;
+ gchar flags_str[512];
+ gchar *sep;
proto_item *tinew;
proto_tree *flags_tree;
guint32 i;
guint32 bvalue = 0;
bvalue = 0x00000001;
- strcpy(flags_str, "");
- sep = "";
+ flags_str[0]='\0';
+ sep="";
for (i = 0 ; i < (values->vlength*8); i++ ) {
if (values->vvalue & bvalue)
{
case 0x00000004:
proto_tree_add_item(flags_tree, values->bit3hfname, tvb, values->voffset, values->vlength, TRUE);
break;
- case 0x0000008:
+ case 0x00000008:
proto_tree_add_item(flags_tree, values->bit4hfname, tvb, values->voffset, values->vlength, TRUE);
break;
case 0x00000010:
guint16 rstate = 0;
guint16 rnum = 0;
guint16 revent = 0;
+ gint length_remaining;
voffset = vvalues->voffset;
if(tvb_get_guint8(tvb, voffset) == 0x00)
proto_tree_add_string(nvtree, hf_value_string, tvb, voffset,
value1, vvalues->vstring);
voffset = voffset + value1;
+ voffset += align_4(tvb, voffset);
}
- voffset += align_4(tvb, voffset);
break;
case 0x00000007: /* Boolean */
value1 = tvb_get_letohl(tvb, voffset); /* length of field */
if (value1==0)
{
- vvalues->vstring = "False";
+ vvalues->vstring = "False";
}
else
{
- vvalues->vstring = "True";
+ vvalues->vstring = "True";
}
proto_tree_add_string(nvtree, hf_value_string, tvb, voffset,
value1, vvalues->vstring);
case 0x00000009: /* Binary String */
case 0x00000015: /* Stream */
value1 = tvb_get_letohl(tvb, voffset); /* length of field */
- if(value1 > tvb_length_remaining(tvb, voffset))
+ length_remaining = tvb_length_remaining(tvb, voffset);
+ if(length_remaining == -1 || value1 > (guint32) length_remaining)
{
break;
}
proto_tree_add_ipv4(nvtree, hf_add_ref_tcp, tvb, voffset+2, 4, value4);
break;
case 0x00000001:
+ proto_tree_add_item(nvtree, hf_nds_port, tvb, voffset, 2, FALSE);
+ value4 = tvb_get_letohl(tvb, voffset+2);
+ proto_tree_add_ipv4(nvtree, hf_add_ref_ip, tvb, voffset+2, 4, value4);
+ break;
case 0x0000000d:
get_string(tvb, voffset, value3, vvalues->vstring);
proto_tree_add_string(nvtree, hf_value_string, tvb, voffset,
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,
+ aditem = proto_tree_add_uint_format(nvtree, hf_nds_uint32value, tvb, voffset,
4, number_of_items, "Number of Addresses: %u", number_of_items);
adtree = proto_item_add_subtree(aditem, ett_nds);
value2, values->vstring);
values->voffset=ioffset + value2;
ioffset = values->voffset;
+ ioffset += align_4(tvb, ioffset);
break;
case 2: /* Based */
value1 = tvb_get_letohl(tvb, ioffset); /* ES Type */
value3, values->vstring);
values->voffset=ioffset + value3;
ioffset = values->voffset;
+ ioffset += align_4(tvb, ioffset);
break;
case 2: /* Based */
break;
value3, values->vstring);
values->voffset=ioffset + value3;
ioffset = values->voffset;
+ ioffset += align_4(tvb, ioffset);
break;
case 2: /* Based */
break;
value3, values->vstring);
values->voffset=ioffset + value3;
ioffset = values->voffset;
+ ioffset += align_4(tvb, ioffset);
break;
case 2: /* Based */
break;
proto_item *sub1item;
proto_tree *sub2tree;
proto_item *sub2item;
+ gint length_remaining;
strcpy(mval_buf.buffer, "");
+
if(values->mvtype != MVTYPE_LIST_PARTITIONS)
{
nitem = proto_tree_add_uint_format(ncp_tree, values->hfname, tvb, values->voffset+ioffset,
values->vstring = mval_buf.buffer;
proto_tree_add_string(ntree, hf_mv_string, tvb, ioffset,
value2, values->vstring);
- values->voffset=ioffset + value2;
+ ioffset += value2;
+ ioffset += align_4(tvb, ioffset);
+ values->voffset = ioffset;
+
print_nds_values(ntree, tvb, value1, values);
ioffset = values->voffset;
}
}
break;
+ case MVTYPE_ADD_ATTR_REQUEST: /* Add Attribute Request */
+ for (i = 1 ; i <= values->vvalue; i++ )
+ {
+ value1 = tvb_get_letohl(tvb, ioffset);
+ ioffset = ioffset + 4;
+ get_string(tvb, ioffset, value1, mval_buf.buffer);
+ values->vstring = mval_buf.buffer;
+ proto_tree_add_string(ntree, hf_mv_string, tvb, ioffset,
+ value1, values->vstring);
+ ioffset = ioffset + value1;
+ ioffset += align_4(tvb, ioffset);
+ values->voffset = ioffset;
+ print_nds_values(ntree, tvb, 9, values);
+ ioffset = values->voffset;
+ }
+ break;
+
case MVTYPE_READ_CLASS_REQ: /* Read Class Request */
for (i = 1 ; i <= values->vvalue; i++ )
{
case 0x00000001: /* Information Flags */
temp_values.vvalue = tvb_get_letohs(tvb, ioffset);
temp_values.vtype = VTYPE_BITFIELD;
- temp_values.vstring = "";
+ temp_values.vstring = mval_buf.buffer;
temp_values.vdesc = "Information Flags (low) Byte:";
temp_values.vlength = 2;
temp_values.hfname= hf_nds_rflags;
ioffset = ioffset+2;
temp_values.vvalue = tvb_get_letohs(tvb, ioffset);
temp_values.vtype = VTYPE_BITFIELD;
- temp_values.vstring = "";
+ temp_values.vstring = mval_buf.buffer;
temp_values.vdesc = "Information Flags (high) Byte:";
temp_values.vlength = 2;
temp_values.hfname= hf_nds_rflags;
case 0x00000004: /* Entry Flags */
temp_values.vvalue = tvb_get_letohl(tvb, ioffset);
temp_values.vtype = VTYPE_BITFIELD;
- temp_values.vstring = "";
+ temp_values.vstring = mval_buf.buffer;
temp_values.vdesc = "Entry Flags:";
temp_values.vlength = 2;
temp_values.hfname= hf_nds_eflags;
{
temp_values.vvalue = tvb_get_letohl(tvb, ioffset);
temp_values.vtype = VTYPE_BITFIELD;
- temp_values.vstring = "";
+ temp_values.vstring = mval_buf.buffer;
temp_values.vdesc = "Class Flags:";
temp_values.vlength = 2;
temp_values.hfname= hf_nds_cflags;
if(values->vflags != 5)
{
value1 = tvb_get_letohl(tvb, ioffset); /* length of field */
- if(value1 > tvb_length_remaining(tvb, ioffset))
+ length_remaining = tvb_length_remaining(tvb, ioffset);
+ if(length_remaining == -1 || value1 > (guint32) length_remaining)
{
break;
}
}
}
}
- if(values->vflags == 2 || values->vflags == 4) /* Class Definitions of Super Classes */
+ /*if(values->vflags == 2 || values->vflags == 4)*/ /* Class Definitions of Super Classes */
+ if(values->vflags == 4) /* Class Definitions of Super Classes */
{
value1 = tvb_get_letohl(tvb, ioffset); /* Containment Classes */
sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_purge, tvb, ioffset,
}
}
+/*
+ * Defrag logic
+ *
+ * NDS fragment not being set to 0xffffffff indicates we are inside or at the
+ * beginning of a fragment. But when the end of the fragment
+ * is encounterd the flag is set to 0xffffffff. So we must mark what the
+ * frame number is of the end fragment so that we will be
+ * able to redissect if the user clicks on the packet
+ * or resorts/filters the trace.
+ *
+ * Once we are certain that we are in a fragment sequence
+ * then we can just process each fragment in this conversation
+ * until we reach the fragment == 0xffffffff packet.
+ *
+ * We will be able to easily determine if a conversation is a fragment
+ * with the exception of the last packet in the fragment. So remember
+ * the last fragment packet number.
+ *
+ * Also the NDS dissection requires the values of NDS Verb, Version, and Flags.
+ * Without this values being remembered from the first request packet then
+ * we will be unable to dissect the reply packet. For this reason we remember
+ * these values on the first fragment and then populate the values in the final
+ * fragment. We only do this on the first dissection.
+ *
+*/
+void
+nds_defrag(tvbuff_t *tvb, packet_info *pinfo, guint16 nw_connection, guint8 sequence, guint16 type, proto_tree *tree)
+{
+ int i, frag_count=0;
+ guint len=0;
+ guint32 tid = 1;
+ tvbuff_t *frag_tvb = NULL;
+ fragment_data *fd_head;
+ ncp_req_hash_value *request_value = NULL;
+ conversation_t *conversation;
+ guint32 nds_frag;
+
+ for (i = 0; i < 9; i++) {
+ if (!frags[i].nds_fragmented)
+ {
+ frags[i].nds_frag = 0;
+ }
+ }
+ /* Check to see if defragmentation is enabeled in the dissector */
+ if (!nds_defragment || type != NCP_SERVICE_REPLY) {
+ dissect_ncp_reply(tvb, pinfo, nw_connection, sequence, type, tree);
+ return;
+ }
+ /* Has this already been dissected? */
+ if (!pinfo->fd->flags.visited) {
+ /* Find the conversation whence the request would have come. */
+ conversation = find_conversation(&pinfo->src, &pinfo->dst,
+ PT_NCP, nw_connection, nw_connection, 0);
+ if (conversation != NULL) {
+ /* find the record telling us the request made that caused
+ this reply */
+ request_value = ncp_hash_lookup(conversation, sequence);
+ if (!request_value) {
+ dissect_ncp_reply(tvb, pinfo, nw_connection, sequence, type, tree);
+ return;
+ }
+ p_add_proto_data(pinfo->fd, proto_ncp, (void*) request_value);
+ }
+ /* else... we haven't seen an NCP Request for that conversation and sequence. */
+ else
+ {
+ dissect_ncp_reply(tvb, pinfo, nw_connection, sequence, type, tree);
+ return;
+ }
+ }
+ else {
+ request_value = p_get_proto_data(pinfo->fd, proto_ncp);
+ if (!request_value) {
+ dissect_ncp_reply(tvb, pinfo, nw_connection, sequence, type, tree);
+ return;
+ }
+ }
+ /* Validate that this is an NDS packet */
+ /* If this isn't an NDS packet then just return */
+ if (!request_value->ncp_rec ||
+ request_value->ncp_rec->func!=104 || request_value->ncp_rec->subfunc!=2) {
+ dissect_ncp_reply(tvb, pinfo, nw_connection, sequence, type, tree);
+ return;
+ }
+ /* Get the fragment flag */
+ nds_frag = tvb_get_letohl(tvb, 12);
+ /* Now we need to find if this is a new fragment or already one defined. */
+ /* We currently limit the maximum number of simultaneous fragments to 100. */
+ for (i=0; i<100; i++)
+ {
+ if (frags[i].nds_frag == nds_frag || frags[i].nds_frag == 0)
+ {
+ if (frags[i].nds_frag == 0)
+ {
+ frags[i].nds_length = 0;
+ frags[i].nds_frag = nds_frag;
+ frags[i].nds_fragmented = TRUE;
+ }
+ break;
+ }
+ }
+ frag_count = i;
+
+ /* Now we process the fragments */
+ if (request_value->nds_frag || (request_value->nds_end_frag == pinfo->fd->num))
+ {
+ /* Check to see of this is a fragment. If so then mark as a fragment. */
+ if (frags[frag_count].nds_frag==0xffffffff) {
+ request_value->nds_frag = FALSE;
+ /* nds_length of 0 means start of fragment */
+ frags[frag_count].nds_length = 0;
+ }
+ else
+ {
+ if (frags[frag_count].nds_length == 0)
+ {
+ frags[frag_count].nds_length = tvb_get_letohl(tvb, 0);
+ }
+ }
+ /*
+ * Fragment
+ *
+ */
+ tid = (pinfo->srcport+pinfo->destport);
+ len = tvb_reported_length(tvb);
+ if (len > 0 && tvb_bytes_exist(tvb, 0, len))
+ {
+ if (frags[frag_count].nds_length > len)
+ {
+ /* This is the first fragment so remember the verb, version, and flags. */
+ frags[frag_count].nds_frag_verb = request_value->nds_request_verb;
+ frags[frag_count].nds_frag_version = request_value->nds_version;
+ frags[frag_count].nds_frag_flags = request_value->req_nds_flags;
+ fd_head = fragment_add_seq_next(tvb, 0, pinfo, tid, nds_fragment_table, nds_reassembled_table, len, request_value->nds_frag);
+ frags[frag_count].nds_length = 1;
+ }
+ else
+ {
+ /* Subsequent fragments should be offset by 16 since we do not need */
+ /* the additional fragment handle and size fields in our composite data */
+ fd_head = fragment_add_seq_next(tvb, 16, pinfo, tid, nds_fragment_table, nds_reassembled_table, len-16, request_value->nds_frag);
+ }
+ if (fd_head != NULL)
+ {
+ /* Is this the last fragment? nds_frag will indicate */
+ if (fd_head->next != NULL && !request_value->nds_frag)
+ {
+ frag_tvb = tvb_new_real_data(fd_head->data,
+ fd_head->len, fd_head->len);
+ tvb_set_child_real_data_tvbuff(tvb,
+ frag_tvb);
+ add_new_data_source(pinfo,
+ frag_tvb,
+ "Reassembled NDS");
+ /* Show all fragments. */
+ if (tree)
+ {
+ show_fragment_seq_tree(fd_head,
+ &nds_frag_items,
+ tree, pinfo,
+ frag_tvb);
+ tid++;
+ }
+
+ if (!pinfo->fd->flags.visited)
+ {
+ /* Now we need to find the original fragment number. */
+ /* Get the fragment flag */
+ nds_frag = tvb_get_letohl(frag_tvb, 12);
+ for (i=0; i<100; i++)
+ {
+ if (frags[i].nds_frag == nds_frag)
+ {
+ break;
+ }
+ }
+ if (frags[i].nds_frag == 0)
+ {
+ /* Error can't find fragment */
+ /*g_assert(0);*/
+ }
+ frag_count = i;
+ /* Remember this fragment information so we can dissect.
+ * Only do this on the first dissection. After the first
+ * dissection we will just read the memory values.
+ */
+ request_value->nds_end_frag = pinfo->fd->num;
+ request_value->nds_request_verb = frags[frag_count].nds_frag_verb;
+ request_value->nds_version = frags[frag_count].nds_frag_version;
+ request_value->req_nds_flags = frags[frag_count].nds_frag_flags;
+ }
+
+ }
+ else
+ {
+ /* This is either a beggining or middle fragment on second dissection */
+ frag_tvb = tvb_new_subset(tvb, 0, -1, -1);
+ if (check_col(pinfo->cinfo, COL_INFO))
+ {
+ if (request_value->nds_frag)
+ {
+ col_add_fstr(pinfo->cinfo, COL_INFO, "[NDS Fragment %08x]", frags[frag_count].nds_frag);
+ }
+ }
+ }
+ }
+ else
+ {
+ /* Fragment from first pass of dissection */
+ if (check_col(pinfo->cinfo, COL_INFO))
+ {
+ if (request_value->nds_frag)
+ {
+ col_add_fstr(pinfo->cinfo, COL_INFO, "[NDS Fragment %08x]", frags[frag_count].nds_frag);
+ }
+ }
+ frag_tvb = NULL;
+ }
+ }
+ else
+ {
+ /*
+ * There are no bytes so Dissect this
+ */
+ frag_tvb = tvb_new_subset(tvb, 0, -1, -1);
+ }
+ if (frag_tvb == NULL)
+ {
+ /* This is a fragment packet */
+ frag_tvb = tvb_new_subset (tvb, 0, -1, -1);
+ nds_data_handle = find_dissector("data");
+ call_dissector(nds_data_handle, frag_tvb, pinfo, tree);
+ }
+ else
+ {
+ /* This is the end fragment so dissect */
+ if (!request_value->nds_frag) {
+ frags[frag_count].nds_length = 0;
+ dissect_ncp_reply(frag_tvb, pinfo, nw_connection, sequence, type, tree);
+ }
+ }
+ }
+ else
+ {
+ /* This is not any fragment packet */
+ frags[frag_count].nds_length = 0;
+ request_value->nds_frag = FALSE;
+ dissect_ncp_reply(tvb, pinfo, nw_connection, sequence, type, tree);
+ }
+}
+
void
dissect_ncp_request(tvbuff_t *tvb, packet_info *pinfo,
guint16 nw_connection, guint8 sequence,
guint16 type, proto_tree *ncp_tree)
{
guint8 func, subfunc = 0;
- gboolean requires_subfunc;
- gboolean has_length = TRUE;
+ gboolean requires_subfunc = FALSE;
+ gboolean has_length = FALSE;
ncp_req_hash_value *request_value = NULL;
const ncp_record *ncp_rec = NULL;
conversation_t *conversation;
func = tvb_get_guint8(tvb, 6);
- requires_subfunc = ncp_requires_subfunc(func);
- has_length = ncp_has_length_parameter(func);
- if (requires_subfunc) {
- if (has_length) {
- subfunc = tvb_get_guint8(tvb, 9);
- }
- else {
- subfunc = tvb_get_guint8(tvb, 7);
- }
- }
-
/* Determine which ncp_record to use. */
switch (type) {
case NCP_ALLOCATE_SLOT:
}
break;
case NCP_SERVICE_REQUEST:
+ requires_subfunc = ncp_requires_subfunc(func);
+ has_length = ncp_has_length_parameter(func);
+ if (requires_subfunc) {
+ if (has_length) {
+ subfunc = tvb_get_guint8(tvb, 9);
+ }
+ else {
+ subfunc = tvb_get_guint8(tvb, 7);
+ }
+ }
ncp_rec = ncp_record_find(func, subfunc);
break;
case NCP_DEALLOCATE_SLOT:
break;
default:
ncp_rec = NULL;
+ break;
}
/* Fill in the INFO column. */
if (check_col(pinfo->cinfo, COL_INFO)) {
if (ncp_rec) {
col_add_fstr(pinfo->cinfo, COL_INFO, "C %s", ncp_rec->name);
+ if (ncp_rec->req_info_str) {
+ /* We want to add more stuff to the Info
+ column. */
+ run_info_str = TRUE;
+ }
}
else {
if (requires_subfunc) {
}
request_value = ncp_hash_insert(conversation, sequence, ncp_rec);
request_value->req_frame_num = pinfo->fd->num;
+ request_value->req_frame_time.secs=pinfo->fd->abs_secs;
+ request_value->req_frame_time.nsecs=pinfo->fd->abs_usecs*1000;
/* If this is the first time we're examining the packet,
* check to see if this NCP type uses a "request condition".
* If so, we have to build a proto_tree because request conditions
* use display filters to work, and without a proto_tree,
- * display filters can't possibly work. If we already have
- * a proto_tree, then wonderful. If we don't, we need to build
- * one. */
+ * display filters can't possibly work. */
if (ncp_rec) {
if (ncp_rec->req_cond_indexes) {
run_req_cond = TRUE;
}
- /* Only create info string if COL_INFO is available. */
- if (ncp_rec->req_info_str && check_col(pinfo->cinfo, COL_INFO)) {
- run_info_str = TRUE;
- }
- /* We also have to use a tree if we have to construct an info_str */
- if ((run_info_str || run_req_cond) && !ncp_tree) {
- proto_item *ti;
-
- temp_tree = proto_tree_create_root();
- proto_tree_set_visible(temp_tree, FALSE);
- ti = proto_tree_add_item(temp_tree, proto_ncp, tvb, 0, -1, FALSE);
- ncp_tree = proto_item_add_subtree(ti, ett_ncp);
- }
}
}
+ /* If we have to handle a request condition, or have to
+ add to the Info column, we need to construct a protocol
+ tree. If we already have a proto_tree, then wonderful.
+ If we don't, we need to build one. */
+ if ((run_info_str || run_req_cond) && !ncp_tree) {
+ proto_item *ti;
+
+ temp_tree = proto_tree_create_root();
+ proto_tree_set_visible(temp_tree, FALSE);
+ ti = proto_tree_add_item(temp_tree, proto_ncp, tvb, 0, -1, FALSE);
+ ncp_tree = proto_item_add_subtree(ti, ett_ncp);
+ }
+
if (ncp_tree) {
/* If the dissection throws an exception, be sure to free
* the temporary proto_tree that was created. Because of the
proto_tree_prime_hfid(ncp_tree, *ncp_rec->req_info_str->hf_ptr);
}
- conversation = find_conversation(&pinfo->src, &pinfo->dst,
- PT_NCP, nw_connection, nw_connection, 0);
-
switch (type) {
case NCP_BROADCAST_SLOT:
; /* nothing */
/* The group is not part of the packet, but it's useful
* information to display anyway. */
if (ncp_rec) {
- proto_tree_add_text(ncp_tree, tvb, 6, 1, "Group: %s",
+ proto_tree_add_text(ncp_tree, tvb, 0, 0, "Group: %s",
ncp_groups[ncp_rec->group]);
}
* get to them. */
request_value->req_cond_results = results;
}
-
/* Construct the info string if necessary */
if (run_info_str) {
GPtrArray *parray;
+ char* byte_string;
+ char non_uni_string[1024];
int i, len;
field_info *finfo;
int info_type;
+ if (!request_value)
+ {
+ conversation = find_conversation(&pinfo->src, &pinfo->dst,
+ PT_NCP, nw_connection, nw_connection, 0);
+ if (conversation != NULL) {
+ /* find the record telling us the request made that caused
+ this reply */
+ request_value = ncp_hash_lookup(conversation, sequence);
+ }
+ if (!conversation || !request_value)
+ {
+ return;
+ }
+ }
+
parray = proto_get_finfo_ptr_array(ncp_tree,
*ncp_rec->req_info_str->hf_ptr);
len = g_ptr_array_len(parray);
finfo = g_ptr_array_index(parray, 0);
- info_type = get_info_type((gchar*) ncp_rec->req_info_str->first_string);
+ info_type = get_info_type((const gchar*) ncp_rec->req_info_str->first_string);
- if (info_type == 2) { /* Is this a string or not? */
-
- col_append_fstr(pinfo->cinfo, COL_INFO,
- (gchar*) ncp_rec->req_info_str->first_string,
- fvalue_get(finfo->value));
+ if (info_type != 0) { /* Is this a string or not? */
+
+ if (info_type == 1) { /* Is this bytes? */
+ byte_string = bytes_to_str(fvalue_get(&finfo->value), fvalue_length(&finfo->value));
+ col_append_fstr(pinfo->cinfo, COL_INFO,
+ (const gchar*) ncp_rec->req_info_str->first_string,
+ byte_string);
+ }
+ else
+ {
+ if (info_type == 2) { /* Is this a String? */
+ uni_to_string(fvalue_get(&finfo->value), fvalue_length(&finfo->value), non_uni_string);
+ col_append_fstr(pinfo->cinfo, COL_INFO,
+ (const gchar*) ncp_rec->req_info_str->first_string,
+ non_uni_string);
+ }
+ else
+ {
+ col_append_fstr(pinfo->cinfo, COL_INFO,
+ (const gchar*) ncp_rec->req_info_str->first_string,
+ fvalue_get(&finfo->value));
+ }
+ }
}
else
{
-
col_append_fstr(pinfo->cinfo, COL_INFO,
- (gchar*) ncp_rec->req_info_str->first_string,
- fvalue_get_integer(finfo->value));
+ (const gchar*) ncp_rec->req_info_str->first_string,
+ fvalue_get_integer(&finfo->value));
}
}
if (len > 1) {
for (i = 1; i < len; i++) {
+ non_uni_string[0]='\0';
finfo = g_ptr_array_index(parray, i);
- info_type = get_info_type((gchar*) ncp_rec->req_info_str->repeat_string);
+ info_type = get_info_type((const gchar*) ncp_rec->req_info_str->repeat_string);
- if (info_type == 2) { /* Is this a string or not? */
-
+ if (info_type != 0) { /* Is this a string or not? */
+ if (info_type == 1)
+ { /* Is this bytes? */
+ byte_string = bytes_to_str(fvalue_get(&finfo->value), fvalue_length(&finfo->value));
col_append_fstr(pinfo->cinfo, COL_INFO,
- (gchar*) ncp_rec->req_info_str->repeat_string,
- fvalue_get(finfo->value));
+ (const gchar*) ncp_rec->req_info_str->repeat_string,
+ byte_string);
+ }
+ else
+ {
+ if (info_type == 2) { /* Is this a String? */
+ uni_to_string(fvalue_get(&finfo->value), fvalue_length(&finfo->value), non_uni_string);
+ col_append_fstr(pinfo->cinfo, COL_INFO,
+ (const gchar*) ncp_rec->req_info_str->repeat_string,
+ non_uni_string);
+ }
+ else
+ {
+ col_append_fstr(pinfo->cinfo, COL_INFO,
+ (const gchar*) ncp_rec->req_info_str->repeat_string,
+ fvalue_get(&finfo->value));
+ }
+ }
}
else
{
-
col_append_fstr(pinfo->cinfo, COL_INFO,
- (gchar*) ncp_rec->req_info_str->repeat_string,
- fvalue_get_integer(finfo->value));
+ (const gchar*) ncp_rec->req_info_str->repeat_string,
+ fvalue_get_integer(&finfo->value));
}
}
}
}
-
/* Free the temporary proto_tree */
CLEANUP_CALL_AND_POP;
}
char * nds_error_string = NULL;
guint32 nds_frag=0;
nds_val pvalues[9];
+ char string_buffer[9][1024];
gboolean resolve_eid=FALSE;
guint32 global_eid=0;
gboolean add_eid = FALSE;
- char *global_object_name='\0';
+ char global_object_name[256];
int i;
+ guint32 bvalue=0;
- strcpy(reply_buffer.buffer, "");
-
+ strcpy(reply_buffer.buffer, "");
+ strcpy(global_object_name, "");
+
if (!pinfo->fd->flags.visited) {
/* Find the conversation whence the request would have come. */
conversation = find_conversation(&pinfo->src, &pinfo->dst,
* can have different meanings, depending on the ncp.func (and ncp.subfunc)
* value. */
completion_code = tvb_get_guint8(tvb, 6);
- if (ncp_rec && ncp_rec->errors) {
- error_string = ncp_error_string(ncp_rec->errors, completion_code);
- }
- else if (completion_code == 0) {
- if(type == NCP_POSITIVE_ACK)
+ if (completion_code == 0) {
+
+ if(type == NCP_POSITIVE_ACK)
{
error_string = "Server Busy, Request Being Processed";
}
{
error_string = "OK";
}
- }
- else {
- error_string = "Not OK";
+ } else {
+ if (ncp_rec && ncp_rec->errors) {
+ error_string = ncp_error_string(ncp_rec->errors, completion_code);
+ }
+ else {
+ error_string = "Not OK";
+ }
}
if (type == NCP_SERVICE_REPLY && ncp_rec && ncp_rec->func==0x68 &&
ncp_rec->subfunc==0x02)
{
nds_offset = 8;
- nds_reply_buffer = tvb_get_letohl(tvb, nds_offset);
- nds_frag = tvb_get_letohl(tvb, 12);
+ nds_reply_buffer = tvb_get_letohl(tvb, nds_offset);
+ nds_offset += 4;
+ nds_frag = tvb_get_letohl(tvb, nds_offset);
if (nds_reply_buffer > 7)
{
- nds_offset = 16;
+ nds_offset += 4;
nds_error_code = tvb_get_letohl(tvb, nds_offset);
nds_error_string = match_strval(nds_error_code, nds_reply_errors);
if (nds_error_string == NULL)
{
- nds_offset = 19;
- nds_error_code = tvb_get_letohl(tvb, nds_offset);
- nds_error_string = match_strval(nds_error_code, nds_reply_errors);
+ nds_error_string = "NDS Error - No Definition Found";
}
if (nds_error_string == NULL || nds_error_code == 0x00000000)
{
- if (nds_frag != 0xffffffff)
- {
- nds_error_string = "NDS Fragment";
- }
- else
- {
- nds_error_string = "Ok";
- }
+ nds_error_string = "Ok";
}
}
}
if (ncp_tree) {
if (request_value) {
+ nstime_t ns;
+
proto_tree_add_uint(ncp_tree, hf_ncp_req_frame_num, tvb, 0, 0,
request_value->req_frame_num);
+ ns.secs=pinfo->fd->abs_secs-request_value->req_frame_time.secs;
+ ns.nsecs=pinfo->fd->abs_usecs*1000-request_value->req_frame_time.nsecs;
+ if(ns.nsecs<0){
+ ns.nsecs+=1000000000;
+ ns.secs--;
+ }
+ proto_tree_add_time(ncp_tree, hf_ncp_req_frame_time, tvb, 0, 0, &ns);
+
}
/* Put the func (and maybe subfunc) from the request packet
/* Decode NDS Reply packets */
if (ncp_rec) {
- if (ncp_rec->func == 0x68 && ncp_rec->subfunc == 0x01) {
+ if ((ncp_rec->func == 0x68 && ncp_rec->subfunc == 0x01) && completion_code == 0) {
ping_version = tvb_get_guint8(tvb, 8);
proto_tree_add_item(ncp_tree, hf_ping_version, tvb, 8, 1, TRUE);
if (ping_version == 9) {
else {
nds_offset = 12;
nds_flags = request_value->req_nds_flags;
- if (nds_flags & 0x00200000) {
- nds_offset = nds_offset+4;
- }
- if (nds_flags & 0x00000002) {
- proto_tree_add_item(ncp_tree, hf_nds_reply_depth, tvb, nds_offset, 4, TRUE);
- nds_offset = nds_offset+4;
- }
- if (nds_flags & 0x00000004) {
- proto_tree_add_item(ncp_tree, hf_nds_reply_rev, tvb, nds_offset, 4, TRUE);
- nds_offset = nds_offset+4;
- }
- if (nds_flags & 0x00000008) {
- proto_tree_add_item(ncp_tree, hf_nds_reply_flags, tvb, nds_offset, 4, TRUE);
- nds_offset = nds_offset+4;
- }
- 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);
- proto_tree_add_text(ncp_tree, tvb, nds_offset+4, nds_string_len, "NDS Tree Name: %s", reply_buffer.buffer);
+ bvalue = 0x00000001;
+
+ for (i = 0 ; i < 32; i++ ) {
+ if (nds_flags & bvalue)
+ {
+ switch(bvalue)
+ {
+ case 0x00000001: /* Supported Fields */
+ pvalues[0].vvalue = tvb_get_letohs(tvb, nds_offset);
+ pvalues[0].vtype = VTYPE_BITFIELD;
+ pvalues[0].vstring = "";
+ pvalues[0].vdesc = "Ping (low) Supported Fields:";
+ pvalues[0].vlength = 2;
+ pvalues[0].hfname= hf_nds_rflags;
+ pvalues[0].voffset = nds_offset;
+ pvalues[0].bit1 = "Supported Fields";
+ pvalues[0].bit1hfname = hf_bit1pingflags1;
+ pvalues[0].bit2 = "Depth";
+ pvalues[0].bit2hfname = hf_bit2pingflags1;
+ pvalues[0].bit3 = "Revision";
+ pvalues[0].bit3hfname = hf_bit3pingflags1;
+ pvalues[0].bit4 = "Flags";
+ pvalues[0].bit4hfname = hf_bit4pingflags1;
+ pvalues[0].bit5 = "Verification Flags";
+ pvalues[0].bit5hfname = hf_bit5pingflags1;
+ pvalues[0].bit6 = "Letter Version";
+ pvalues[0].bit6hfname = hf_bit6pingflags1;
+ pvalues[0].bit7 = "OS Version";
+ pvalues[0].bit7hfname = hf_bit7pingflags1;
+ pvalues[0].bit8 = "License Flags";
+ pvalues[0].bit8hfname = hf_bit8pingflags1;
+ pvalues[0].bit9 = "DS Time";
+ pvalues[0].bit9hfname = hf_bit9pingflags1;
+ pvalues[0].bit10 = "Not Defined";
+ pvalues[0].bit10hfname = hf_bit10pingflags1;
+ pvalues[0].bit11 = "Not Defined";
+ pvalues[0].bit11hfname = hf_bit11pingflags1;
+ pvalues[0].bit12 = "Not Defined";
+ pvalues[0].bit12hfname = hf_bit12pingflags1;
+ pvalues[0].bit13 = "Not Defined";
+ pvalues[0].bit13hfname = hf_bit13pingflags1;
+ pvalues[0].bit14 = "Not Defined";
+ pvalues[0].bit14hfname = hf_bit14pingflags1;
+ pvalues[0].bit15 = "Not Defined";
+ pvalues[0].bit15hfname = hf_bit15pingflags1;
+ pvalues[0].bit16 = "Not Defined";
+ pvalues[0].bit16hfname = hf_bit16pingflags1;
+
+ process_bitfield(ncp_tree, tvb, &pvalues[0]);
+ nds_offset += 2;
+
+ pvalues[0].vvalue = tvb_get_letohs(tvb, nds_offset);
+ pvalues[0].vtype = VTYPE_BITFIELD;
+ pvalues[0].vstring = "";
+ pvalues[0].vdesc = "Ping (high) Supported Fields:";
+ pvalues[0].vlength = 2;
+ pvalues[0].hfname= hf_nds_rflags;
+ pvalues[0].voffset = nds_offset;
+ pvalues[0].bit1 = "Sap Name";
+ pvalues[0].bit1hfname = hf_bit1pingflags2;
+ pvalues[0].bit2 = "Tree Name";
+ pvalues[0].bit2hfname = hf_bit2pingflags2;
+ pvalues[0].bit3 = "OS Name";
+ pvalues[0].bit3hfname = hf_bit3pingflags2;
+ pvalues[0].bit4 = "Hardware Name";
+ pvalues[0].bit4hfname = hf_bit4pingflags2;
+ pvalues[0].bit5 = "Vendor Name";
+ pvalues[0].bit5hfname = hf_bit5pingflags2;
+ pvalues[0].bit6 = "Not Defined";
+ pvalues[0].bit6hfname = hf_bit6pingflags2;
+ pvalues[0].bit7 = "Not Defined";
+ pvalues[0].bit7hfname = hf_bit7pingflags2;
+ pvalues[0].bit8 = "Not Defined";
+ pvalues[0].bit8hfname = hf_bit8pingflags2;
+ pvalues[0].bit9 = "Not Defined";
+ pvalues[0].bit9hfname = hf_bit9pingflags2;
+ pvalues[0].bit10 = "Not Defined";
+ pvalues[0].bit10hfname = hf_bit10pingflags2;
+ pvalues[0].bit11 = "Not Defined";
+ pvalues[0].bit11hfname = hf_bit11pingflags2;
+ pvalues[0].bit12 = "Not Defined";
+ pvalues[0].bit12hfname = hf_bit12pingflags2;
+ pvalues[0].bit13 = "Not Defined";
+ pvalues[0].bit13hfname = hf_bit13pingflags2;
+ pvalues[0].bit14 = "Not Defined";
+ pvalues[0].bit14hfname = hf_bit14pingflags2;
+ pvalues[0].bit15 = "Not Defined";
+ pvalues[0].bit15hfname = hf_bit15pingflags2;
+ pvalues[0].bit16 = "Not Defined";
+ pvalues[0].bit16hfname = hf_bit16pingflags2;
+
+ process_bitfield(ncp_tree, tvb, &pvalues[0]);
+ nds_offset += 2;
+ break;
+ case 0x00000002:
+ proto_tree_add_item(ncp_tree, hf_nds_reply_depth, tvb, nds_offset, 4, TRUE);
+ nds_offset += 4;
+ break;
+ case 0x00000004:
+ proto_tree_add_item(ncp_tree, hf_nds_reply_rev, tvb, nds_offset, 4, TRUE);
+ nds_offset += 4;
+ break;
+ case 0x00000008:
+ pvalues[0].vvalue = tvb_get_letohl(tvb, nds_offset);
+ pvalues[0].vtype = VTYPE_BITFIELD;
+ pvalues[0].vstring = "";
+ pvalues[0].vdesc = "Ping Flags:";
+ pvalues[0].vlength = 4;
+ pvalues[0].hfname= hf_nds_rflags;
+ pvalues[0].voffset = nds_offset;
+ pvalues[0].bit1 = "Root Most Master Replica";
+ pvalues[0].bit1hfname = hf_bit1pingpflags1;
+ pvalues[0].bit2 = "Time Synchronized";
+ pvalues[0].bit2hfname = hf_bit2pingpflags1;
+ pvalues[0].bit3 = "Not Defined";
+ pvalues[0].bit3hfname = hf_bit3pingpflags1;
+ pvalues[0].bit4 = "Not Defined";
+ pvalues[0].bit4hfname = hf_bit4pingpflags1;
+ pvalues[0].bit5 = "Not Defined";
+ pvalues[0].bit5hfname = hf_bit5pingpflags1;
+ pvalues[0].bit6 = "Not Defined";
+ pvalues[0].bit6hfname = hf_bit6pingpflags1;
+ pvalues[0].bit7 = "Not Defined";
+ pvalues[0].bit7hfname = hf_bit7pingpflags1;
+ pvalues[0].bit8 = "Not Defined";
+ pvalues[0].bit8hfname = hf_bit8pingpflags1;
+ pvalues[0].bit9 = "Not Defined";
+ pvalues[0].bit9hfname = hf_bit9pingpflags1;
+ pvalues[0].bit10 = "Not Defined";
+ pvalues[0].bit10hfname = hf_bit10pingpflags1;
+ pvalues[0].bit11 = "Not Defined";
+ pvalues[0].bit11hfname = hf_bit11pingpflags1;
+ pvalues[0].bit12 = "Not Defined";
+ pvalues[0].bit12hfname = hf_bit12pingpflags1;
+ pvalues[0].bit13 = "Not Defined";
+ pvalues[0].bit13hfname = hf_bit13pingpflags1;
+ pvalues[0].bit14 = "Not Defined";
+ pvalues[0].bit14hfname = hf_bit14pingpflags1;
+ pvalues[0].bit15 = "Not Defined";
+ pvalues[0].bit15hfname = hf_bit15pingpflags1;
+ pvalues[0].bit16 = "Not Defined";
+ pvalues[0].bit16hfname = hf_bit16pingpflags1;
+
+ process_bitfield(ncp_tree, tvb, &pvalues[0]);
+ nds_offset += 4;
+ break;
+ case 0x00000010:
+ pvalues[0].vvalue = tvb_get_letohl(tvb, nds_offset);
+ pvalues[0].vtype = VTYPE_BITFIELD;
+ pvalues[0].vstring = "";
+ pvalues[0].vdesc = "Verification Flags:";
+ pvalues[0].vlength = 4;
+ pvalues[0].hfname= hf_nds_rflags;
+ pvalues[0].voffset = nds_offset;
+ pvalues[0].bit1 = "Checksum";
+ pvalues[0].bit1hfname = hf_bit1pingvflags1;
+ pvalues[0].bit2 = "CRC32";
+ pvalues[0].bit2hfname = hf_bit2pingvflags1;
+ pvalues[0].bit3 = "Not Defined";
+ pvalues[0].bit3hfname = hf_bit3pingvflags1;
+ pvalues[0].bit4 = "Not Defined";
+ pvalues[0].bit4hfname = hf_bit4pingvflags1;
+ pvalues[0].bit5 = "Not Defined";
+ pvalues[0].bit5hfname = hf_bit5pingvflags1;
+ pvalues[0].bit6 = "Not Defined";
+ pvalues[0].bit6hfname = hf_bit6pingvflags1;
+ pvalues[0].bit7 = "Not Defined";
+ pvalues[0].bit7hfname = hf_bit7pingvflags1;
+ pvalues[0].bit8 = "Not Defined";
+ pvalues[0].bit8hfname = hf_bit8pingvflags1;
+ pvalues[0].bit9 = "Not Defined";
+ pvalues[0].bit9hfname = hf_bit9pingvflags1;
+ pvalues[0].bit10 = "Not Defined";
+ pvalues[0].bit10hfname = hf_bit10pingvflags1;
+ pvalues[0].bit11 = "Not Defined";
+ pvalues[0].bit11hfname = hf_bit11pingvflags1;
+ pvalues[0].bit12 = "Not Defined";
+ pvalues[0].bit12hfname = hf_bit12pingvflags1;
+ pvalues[0].bit13 = "Not Defined";
+ pvalues[0].bit13hfname = hf_bit13pingvflags1;
+ pvalues[0].bit14 = "Not Defined";
+ pvalues[0].bit14hfname = hf_bit14pingvflags1;
+ pvalues[0].bit15 = "Not Defined";
+ pvalues[0].bit15hfname = hf_bit15pingvflags1;
+ pvalues[0].bit16 = "Not Defined";
+ pvalues[0].bit16hfname = hf_bit16pingvflags1;
+
+ process_bitfield(ncp_tree, tvb, &pvalues[0]);
+ nds_offset += 4;
+ break;
+ case 0x00000020:
+ proto_tree_add_item(ncp_tree, hf_nds_letter_ver, tvb, nds_offset, 4, TRUE);
+ nds_offset += 4;
+ break;
+ case 0x00000040:
+ proto_tree_add_item(ncp_tree, hf_nds_os_ver, tvb, nds_offset, 4, TRUE);
+ nds_offset += 4;
+ break;
+ case 0x00000080:
+ proto_tree_add_item(ncp_tree, hf_nds_lic_flags, tvb, nds_offset, 4, TRUE);
+ nds_offset += 4;
+ break;
+ case 0x00000100:
+ proto_tree_add_item(ncp_tree, hf_nds_ds_time, tvb, nds_offset, 4, TRUE);
+ nds_offset += 4;
+ break;
+ case 0x00010000:
+ nds_string_len = tvb_get_letohl(tvb, nds_offset);
+ nds_offset += 4;
+ get_string(tvb, nds_offset, nds_string_len, reply_buffer.buffer);
+ proto_tree_add_text(ncp_tree, tvb, nds_offset, nds_string_len, "SAP Name: %s", reply_buffer.buffer);
+ nds_offset += nds_string_len;
+ nds_offset += align_4(tvb, nds_offset);
+ nds_offset += 2;
+ break;
+ case 0x00020000:
+ nds_string_len = tvb_get_letohl(tvb, nds_offset);
+ nds_offset += 4;
+ get_string(tvb, nds_offset, nds_string_len, reply_buffer.buffer);
+ proto_tree_add_text(ncp_tree, tvb, nds_offset, nds_string_len, "NDS Tree Name: %s", reply_buffer.buffer);
+ nds_offset += nds_string_len;
+ nds_offset += align_4(tvb, nds_offset);
+ break;
+ case 0x00040000:
+ nds_string_len = tvb_get_letohl(tvb, nds_offset);
+ nds_offset += 4;
+ get_string(tvb, nds_offset, nds_string_len, reply_buffer.buffer);
+ proto_tree_add_text(ncp_tree, tvb, nds_offset, nds_string_len, "OS Name: %s", reply_buffer.buffer);
+ nds_offset += nds_string_len;
+ nds_offset += align_4(tvb, nds_offset);
+ break;
+ case 0x00080000:
+ nds_string_len = tvb_get_letohl(tvb, nds_offset);
+ nds_offset += 4;
+ get_string(tvb, nds_offset, nds_string_len, reply_buffer.buffer);
+ proto_tree_add_text(ncp_tree, tvb, nds_offset, nds_string_len, "Hardware Name: %s", reply_buffer.buffer);
+ nds_offset += nds_string_len;
+ nds_offset += align_4(tvb, nds_offset);
+ break;
+ case 0x00100000:
+ nds_string_len = tvb_get_letohl(tvb, nds_offset);
+ nds_offset += 4;
+ get_string(tvb, nds_offset, nds_string_len, reply_buffer.buffer);
+ proto_tree_add_text(ncp_tree, tvb, nds_offset, nds_string_len, "Vendor Name: %s", reply_buffer.buffer);
+ nds_offset += nds_string_len;
+ nds_offset += align_4(tvb, nds_offset);
+ break;
+ case 0x00000200:
+ /* Not Defined */
+ case 0x00000400:
+ /* Not Defined */
+ case 0x00000800:
+ /* Not Defined */
+ case 0x00001000:
+ /* Not Defined */
+ case 0x00002000:
+ /* Not Defined */
+ case 0x00004000:
+ /* Not Defined */
+ case 0x00008000:
+ /* Not Defined */
+ case 0x00200000:
+ /* Not Defined */
+ case 0x00400000:
+ /* Not Defined */
+ case 0x00800000:
+ /* Not Defined */
+ case 0x01000000:
+ /* Not Defined */
+ case 0x02000000:
+ /* Not Defined */
+ case 0x04000000:
+ /* Not Defined */
+ case 0x08000000:
+ /* Not Defined */
+ case 0x10000000:
+ /* Not Defined */
+ case 0x20000000:
+ /* Not Defined */
+ case 0x40000000:
+ /* Not Defined */
+ case 0x80000000:
+ /* Not Defined */
+ default:
+ break;
+ }
+ }
+ bvalue = bvalue*2;
}
}
}
nds_offset = 8;
nds_reply_buffer = tvb_get_letohl(tvb, nds_offset);
- proto_tree_add_uint(ncp_tree, hf_ncp_fragment_size, tvb, 8,
+ proto_tree_add_uint(ncp_tree, hf_ncp_fragment_size, tvb, nds_offset,
4, nds_reply_buffer);
- nds_frag = tvb_get_letohl(tvb, 12);
- proto_tree_add_uint(ncp_tree, hf_ncp_fragment_handle, tvb, 12,
+ nds_offset += 4;
+ nds_frag = tvb_get_letohl(tvb, nds_offset);
+ proto_tree_add_uint(ncp_tree, hf_ncp_fragment_handle, tvb, nds_offset,
4, nds_frag);
+ nds_offset += 4;
if (nds_reply_buffer > 7)
{
+ /*
+ * XXX - is this present in
+ * replies to continuation
+ * messages? It doesn't appear to
+ * be.
+ */
proto_tree_add_uint_format(ncp_tree, hf_nds_reply_error, tvb, nds_offset,
4, nds_error_code, "NDS Completion Code: 0x%08x, %s",
nds_error_code, nds_error_string);
}
- if (request_value && nds_error_code == 0x00000000 && nds_frag == 0xffffffff)
+ if (request_value && nds_error_code == 0x00000000)
{
nds_offset = 20;
for (i = 0; i < 9; i++) {
pvalues[i].voffset = 0;
pvalues[i].hfname = 0;
pvalues[i].vdesc = "";
- pvalues[i].vstring = "";
+ string_buffer[i][0] = '\0';
+ pvalues[i].vstring = string_buffer[i];
+ pvalues[i].mvtype = 0;
}
+ verb_string = val_to_str(request_value->nds_request_verb,
+ ncp_nds_verb_vals,
+ "Continuation Fragment");
switch (request_value->nds_request_verb)
{
case 0x01:
- verb_string = "Resolve Name";
if(request_value->nds_version == 0)
{
pvalues[0].vvalue = tvb_get_letohl(tvb, nds_offset);
break;
case 1: /* Local Entry */
pvalues[1].vvalue = tvb_get_letohl(tvb, nds_offset);
- pvalues[1].vstring = "";
pvalues[1].vtype = VTYPE_UINT32;
pvalues[1].vdesc = "Entry ID: 0x%08x";
add_eid = TRUE;
- global_object_name = request_value->object_name;
+ strcpy(global_object_name, request_value->object_name);
global_eid = pvalues[1].vvalue;
pvalues[1].vlength = 4;
pvalues[1].voffset = nds_offset;
nds_offset = nds_offset+pvalues[1].vlength;
pvalues[2].vvalue = tvb_get_letohl(tvb, nds_offset);
pvalues[2].vtype = VTYPE_MULTIVALUE_UINT32;
- pvalues[2].vstring = "";
pvalues[2].vdesc = "Referral Records: %u";
pvalues[2].vlength = 4;
pvalues[2].voffset = nds_offset;
case 2: /* Remote Entry */
nds_offset += 4; /* GUINT32 reserved field */
pvalues[1].vvalue = tvb_get_letohl(tvb, nds_offset);
- pvalues[1].vstring = "";
pvalues[1].vtype = VTYPE_UINT32;
pvalues[1].vdesc = "Entry ID: 0x%08x";
add_eid = TRUE;
global_eid = pvalues[1].vvalue;
- global_object_name = request_value->object_name;
+ strcpy(global_object_name, request_value->object_name);
pvalues[1].vlength = 4;
pvalues[1].voffset = nds_offset;
pvalues[1].hfname = hf_nds_eid;
nds_offset = nds_offset+pvalues[1].vlength;
pvalues[2].vvalue = tvb_get_letohl(tvb, nds_offset);
pvalues[2].vtype = VTYPE_MULTIVALUE_UINT32;
- pvalues[2].vstring = "";
pvalues[2].vdesc = "Referral Records: %u";
pvalues[2].vlength = 4;
pvalues[2].voffset = nds_offset;
case 3: /* Alias Entry */
pvalues[1].vtype = VTYPE_STRING;
pvalues[1].vdesc = "Alias Name: %s";
- pvalues[1].vstring = "";
pvalues[1].mvtype = MVTYPE_ATTR_REQUEST;
pvalues[1].vvalue = 0;
pvalues[1].vlength = 256;
break;
case 4: /* Referral Information */
pvalues[1].vvalue = tvb_get_letohl(tvb, nds_offset);
- pvalues[1].vstring = "";
pvalues[1].vtype = VTYPE_UINT32;
pvalues[1].vdesc = "Distance Object is From Root: 0x%08x";
pvalues[1].vlength = 4;
nds_offset = nds_offset+pvalues[1].vlength;
pvalues[2].vvalue = tvb_get_letohl(tvb, nds_offset);
pvalues[2].vtype = VTYPE_MULTIVALUE_UINT32;
- pvalues[2].vstring = "";
pvalues[2].vdesc = "Referral Records: %u";
pvalues[2].vlength = 4;
pvalues[2].voffset = nds_offset;
break;
case 6: /* Entry and Referrals */
pvalues[1].vvalue = tvb_get_letohl(tvb, nds_offset);
- pvalues[1].vstring = "";
pvalues[1].vtype = VTYPE_UINT32;
pvalues[1].vdesc = "Result Flags: 0x%08x";
pvalues[1].vlength = 4;
pvalues[1].hfname = hf_nds_result_flags;
nds_offset = nds_offset+pvalues[1].vlength;
pvalues[2].vvalue = tvb_get_letohl(tvb, nds_offset);
- pvalues[2].vstring = "";
pvalues[2].vtype = VTYPE_UINT32;
pvalues[2].vdesc = "Entry ID: 0x%08x";
add_eid = TRUE;
global_eid = pvalues[2].vvalue;
- global_object_name = request_value->object_name;
+ strcpy(global_object_name, request_value->object_name);
pvalues[2].vlength = 4;
pvalues[2].voffset = nds_offset;
pvalues[2].hfname = hf_nds_eid;
nds_offset = nds_offset+pvalues[2].vlength;
pvalues[3].vvalue = tvb_get_letohl(tvb, nds_offset);
pvalues[3].vtype = VTYPE_MULTIVALUE_UINT32;
- pvalues[3].vstring = "";
pvalues[3].vdesc = "Referral Records: %u";
pvalues[3].vlength = 4;
pvalues[3].voffset = nds_offset;
else
{
pvalues[0].vvalue = tvb_get_letohl(tvb, nds_offset);
- pvalues[0].vstring = "";
pvalues[0].vtype = VTYPE_UINT32;
pvalues[0].vdesc = "CRC: 0x%08x";
pvalues[0].vlength = 4;
break;
case 1: /* Local Entry */
pvalues[2].vvalue = tvb_get_letohl(tvb, nds_offset);
- pvalues[2].vstring = "";
pvalues[2].vtype = VTYPE_UINT32;
pvalues[2].vdesc = "Entry ID: 0x%08x";
add_eid = TRUE;
global_eid = pvalues[2].vvalue;
- global_object_name = request_value->object_name;
+ strcpy(global_object_name, request_value->object_name);
pvalues[2].vlength = 4;
pvalues[2].voffset = nds_offset;
pvalues[2].hfname = hf_nds_eid;
nds_offset = nds_offset+pvalues[2].vlength;
pvalues[3].vvalue = tvb_get_letohl(tvb, nds_offset);
pvalues[3].vtype = VTYPE_MULTIVALUE_UINT32;
- pvalues[3].vstring = "";
pvalues[3].vdesc = "Referral Records: %u";
pvalues[3].vlength = 4;
pvalues[3].voffset = nds_offset;
case 2: /* Remote Entry */
nds_offset += 4; /* GUINT32 reserved field */
pvalues[2].vvalue = tvb_get_letohl(tvb, nds_offset);
- pvalues[2].vstring = "";
add_eid = TRUE;
global_eid = pvalues[2].vvalue;
- global_object_name = request_value->object_name;
+ strcpy(global_object_name, request_value->object_name);
pvalues[2].vtype = VTYPE_UINT32;
pvalues[2].vdesc = "Entry ID: 0x%08x";
pvalues[2].vlength = 4;
nds_offset = nds_offset+pvalues[2].vlength;
pvalues[3].vvalue = tvb_get_letohl(tvb, nds_offset);
pvalues[3].vtype = VTYPE_MULTIVALUE_UINT32;
- pvalues[3].vstring = "";
pvalues[3].vdesc = "Referral Records: %u";
pvalues[3].vlength = 4;
pvalues[3].voffset = nds_offset;
case 3: /* Alias Entry */
pvalues[2].vtype = VTYPE_STRING;
pvalues[2].vdesc = "Alias Name: %s";
- pvalues[2].vstring = "";
pvalues[2].mvtype = MVTYPE_ATTR_REQUEST;
pvalues[2].vvalue = 0;
pvalues[2].vlength = 256;
break;
case 4: /* Referral Information */
pvalues[2].vvalue = tvb_get_letohl(tvb, nds_offset);
- pvalues[2].vstring = "";
pvalues[2].vtype = VTYPE_UINT32;
pvalues[2].vdesc = "Distance Object is From Root: 0x%08x";
pvalues[2].vlength = 4;
nds_offset = nds_offset+pvalues[2].vlength;
pvalues[3].vvalue = tvb_get_letohl(tvb, nds_offset);
pvalues[3].vtype = VTYPE_MULTIVALUE_UINT32;
- pvalues[3].vstring = "";
pvalues[3].vdesc = "Referral Records: %u";
pvalues[3].vlength = 4;
pvalues[3].voffset = nds_offset;
break;
case 6: /* Entry and Referrals */
pvalues[2].vvalue = tvb_get_letohl(tvb, nds_offset);
- pvalues[2].vstring = "";
pvalues[2].vtype = VTYPE_UINT32;
pvalues[2].vdesc = "Result Flags: 0x%08x";
pvalues[2].vlength = 4;
pvalues[2].hfname = hf_nds_result_flags;
nds_offset = nds_offset+pvalues[2].vlength;
pvalues[3].vvalue = tvb_get_letohl(tvb, nds_offset);
- pvalues[3].vstring = "";
pvalues[3].vtype = VTYPE_UINT32;
pvalues[3].vdesc = "Entry ID: 0x%08x";
add_eid = TRUE;
- global_object_name = request_value->object_name;
+ strcpy(global_object_name, request_value->object_name);
global_eid = pvalues[3].vvalue;
pvalues[3].vlength = 4;
pvalues[3].voffset = nds_offset;
nds_offset = nds_offset+pvalues[3].vlength;
pvalues[4].vvalue = tvb_get_letohl(tvb, nds_offset);
pvalues[4].vtype = VTYPE_MULTIVALUE_UINT32;
- pvalues[4].vstring = "";
pvalues[4].vdesc = "Referral Records: %u";
pvalues[4].vlength = 4;
pvalues[4].voffset = nds_offset;
}
break;
case 0x02:
- verb_string = "Read Entry Information";
if(request_value->nds_version != 0x000000fe)
{
pvalues[0].vvalue = 1;
pvalues[0].vtype = VTYPE_MULTIVALUE_UINT32;
- pvalues[0].vstring = "";
pvalues[0].vdesc = "Entry Information";
pvalues[0].vlength = 0;
pvalues[0].voffset = nds_offset-4;
else
{
pvalues[0].vvalue = tvb_get_letohl(tvb, nds_offset);
- pvalues[0].vstring = "";
pvalues[0].vtype = VTYPE_UINT32;
pvalues[0].vdesc = "CRC: 0x%08x";
pvalues[0].vlength = 4;
nds_offset = nds_offset+pvalues[0].vlength;
pvalues[1].vvalue = 1;
pvalues[1].vtype = VTYPE_MULTIVALUE_UINT32;
- pvalues[1].vstring = "";
pvalues[1].vdesc = "Entry Information";
pvalues[1].vlength = 0;
pvalues[1].voffset = nds_offset-4;
}
break;
case 0x03:
- verb_string = "Read";
if(request_value->nds_version != 0x000000fe)
{
pvalues[0].vvalue = tvb_get_letohl(tvb, nds_offset);
- pvalues[0].vstring = "";
pvalues[0].vtype = VTYPE_UINT32;
pvalues[0].vdesc = "Iteration Handle: 0x%08x";
pvalues[0].vlength = 4;
nds_offset = nds_offset+pvalues[1].vlength;
pvalues[2].vvalue = tvb_get_letohl(tvb, nds_offset);
pvalues[2].vtype = VTYPE_MULTIVALUE_UINT32;
- pvalues[2].vstring = "";
pvalues[2].vdesc = "Number of Attributes: %u";
pvalues[2].vlength = 4;
pvalues[2].voffset = nds_offset;
else
{
pvalues[0].vvalue = tvb_get_letohl(tvb, nds_offset);
- pvalues[0].vstring = "";
pvalues[0].vtype = VTYPE_UINT32;
pvalues[0].vdesc = "CRC: 0x%08x";
pvalues[0].vlength = 4;
pvalues[0].hfname = hf_nds_crc;
nds_offset = nds_offset+pvalues[0].vlength;
pvalues[1].vvalue = tvb_get_letohl(tvb, nds_offset);
- pvalues[1].vstring = "";
pvalues[1].vtype = VTYPE_UINT32;
pvalues[1].vdesc = "Iteration Handle: 0x%08x";
pvalues[1].vlength = 4;
nds_offset = nds_offset+pvalues[2].vlength;
pvalues[3].vvalue = tvb_get_letohl(tvb, nds_offset);
pvalues[3].vtype = VTYPE_MULTIVALUE_UINT32;
- pvalues[3].vstring = "";
pvalues[3].vdesc = "Number of Attributes: %u";
pvalues[3].vlength = 4;
pvalues[3].voffset = nds_offset;
}
break;
case 0x04:
- verb_string = "Compare";
pvalues[0].vvalue = tvb_get_letohl(tvb, nds_offset);
if (pvalues[0].vvalue == 0x00000000)
{
nds_offset += pvalues[0].vlength;
break;
case 0x05:
- verb_string = "List";
pvalues[0].vvalue = tvb_get_letohl(tvb, nds_offset);
- pvalues[0].vstring = "";
pvalues[0].vtype = VTYPE_UINT32;
pvalues[0].vdesc = "Iteration Handle: 0x%08x";
pvalues[0].vlength = 4;
nds_offset = nds_offset+pvalues[0].vlength;
pvalues[1].vvalue = tvb_get_letohl(tvb, nds_offset);
pvalues[1].vtype = VTYPE_MULTIVALUE_UINT32;
- pvalues[1].vstring = "";
pvalues[1].vdesc = "Entry Information";
pvalues[1].vlength = 0;
pvalues[1].voffset = nds_offset;
pvalues[1].vflags = request_value->req_nds_flags;
break;
case 0x06:
- verb_string = "Search Entries";
break;
case 0x07:
- verb_string = "Add Entry";
break;
case 0x08:
- verb_string = "Remove Entry";
break;
case 0x09:
- verb_string = "Modify Entry";
break;
case 0x0a:
- verb_string = "Modify RDN";
break;
case 0x0b:
- verb_string = "Define Attribute";
break;
case 0x0c:
- verb_string = "Read Attribute Definition";
break;
case 0x0d:
- verb_string = "Remove Attribute Definition";
break;
case 0x0e:
- verb_string = "Define Class";
break;
case 0x0f:
- verb_string = "Read Class Definition";
pvalues[0].vvalue = tvb_get_letohl(tvb, nds_offset);
- pvalues[0].vstring = "";
pvalues[0].vtype = VTYPE_UINT32;
pvalues[0].vdesc = "Iteration Handle: 0x%08x";
pvalues[0].vlength = 4;
nds_offset = nds_offset + pvalues[1].vlength;
pvalues[2].vvalue = tvb_get_letohl(tvb, nds_offset);;
pvalues[2].vtype = VTYPE_MULTIVALUE_UINT32;
- pvalues[2].vstring = "";
pvalues[2].vdesc = "Class Definitions %u";
pvalues[2].vlength = 0;
pvalues[2].voffset = nds_offset;
pvalues[2].vflags = request_value->req_nds_flags;
break;
case 0x10:
- verb_string = "Modify Class Definition";
break;
case 0x11:
- verb_string = "Remove Class Definition";
break;
case 0x12:
- verb_string = "List Containable Classes";
pvalues[0].vvalue = tvb_get_letohl(tvb, nds_offset);
- pvalues[0].vstring = "";
pvalues[0].vtype = VTYPE_UINT32;
pvalues[0].vdesc = "Iteration Handle: 0x%08x";
pvalues[0].vlength = 4;
nds_offset = nds_offset+pvalues[0].vlength;
pvalues[1].vvalue = tvb_get_letohl(tvb, nds_offset);
pvalues[1].vtype = VTYPE_MULTIVALUE_UINT32;
- pvalues[1].vstring = "";
pvalues[1].vdesc = "Classes: %u";
pvalues[1].vlength = 4;
pvalues[1].voffset = nds_offset;
break;
case 0x13:
pvalues[0].vvalue = tvb_get_letohl(tvb, nds_offset);
- pvalues[0].vstring = "";
pvalues[0].vtype = VTYPE_UINT32;
pvalues[0].vdesc = "Privileges: 0x%08x";
pvalues[0].vlength = 4;
nds_offset = nds_offset+pvalues[0].vlength;
break;
case 0x14:
- verb_string = "Add Partition";
break;
case 0x15:
- verb_string = "Remove Partition";
break;
case 0x16:
- verb_string = "List Partitions";
pvalues[0].vvalue = tvb_get_letohl(tvb, nds_offset);
- pvalues[0].vstring = "";
pvalues[0].vtype = VTYPE_UINT32;
pvalues[0].vdesc = "Iteration Handle: 0x%08x";
pvalues[0].vlength = 4;
nds_offset = nds_offset+pvalues[0].vlength;
pvalues[1].vtype = VTYPE_STRING;
pvalues[1].vdesc = "Server Distinguished Name: %s";
- pvalues[1].vstring = "";
pvalues[1].mvtype = MVTYPE_ATTR_REQUEST;
pvalues[1].vvalue = 0;
pvalues[1].vlength = 256;
nds_offset += align_4(tvb, nds_offset);
pvalues[2].vvalue = tvb_get_letohl(tvb, nds_offset);
pvalues[2].vtype = VTYPE_MULTIVALUE_UINT32;
- pvalues[2].vstring = "";
pvalues[2].vdesc = "Replicas: %u";
pvalues[2].vlength = 4;
pvalues[2].voffset = nds_offset;
pvalues[2].vflags = request_value->req_nds_flags;
break;
case 0x17:
- verb_string = "Split Partition";
break;
case 0x18:
- verb_string = "Join Partitions";
break;
case 0x19:
- verb_string = "Add Replica";
break;
case 0x1a:
- verb_string = "Remove Replica";
break;
case 0x1b:
- verb_string = "Open Stream";
pvalues[0].vvalue = tvb_get_ntohl(tvb, nds_offset);
- pvalues[0].vstring = "";
pvalues[0].vtype = VTYPE_UINT32;
pvalues[0].vdesc = "File Handle: 0x%08x";
pvalues[0].vlength = 4;
pvalues[0].hfname = hf_nds_file_handle;
nds_offset = nds_offset+pvalues[0].vlength;
pvalues[1].vvalue = tvb_get_letohl(tvb, nds_offset);
- pvalues[1].vstring = "";
pvalues[1].vtype = VTYPE_UINT32;
pvalues[1].vdesc = "File Size: %u";
pvalues[1].vlength = 4;
nds_offset = nds_offset+pvalues[1].vlength;
break;
case 0x1c:
- verb_string = "Search Filter";
break;
case 0x1d:
- verb_string = "Create Subordinate Reference";
break;
case 0x1e:
- verb_string = "Link Replica";
break;
case 0x1f:
- verb_string = "Change Replica Type";
break;
case 0x20:
- verb_string = "Start Update Schema";
break;
case 0x21:
- verb_string = "End Update Schema";
break;
case 0x22:
- verb_string = "Update Schema";
break;
case 0x23:
- verb_string = "Start Update Replica";
break;
case 0x24:
- verb_string = "End Update Replica";
break;
case 0x25:
- verb_string = "Update Replica";
break;
case 0x26:
- verb_string = "Synchronize Partition";
break;
case 0x27:
- verb_string = "Synchronize Schema";
break;
case 0x28:
- verb_string = "Read Syntaxes";
break;
case 0x29:
- verb_string = "Get Replica Root ID";
break;
case 0x2a:
- verb_string = "Begin Move Entry";
break;
case 0x2b:
- verb_string = "Finish Move Entry";
break;
case 0x2c:
- verb_string = "Release Moved Entry";
break;
case 0x2d:
- verb_string = "Backup Entry";
break;
case 0x2e:
- verb_string = "Restore Entry";
break;
case 0x2f:
- verb_string = "Save DIB";
break;
case 0x30:
- verb_string = "Control";
break;
case 0x31:
- verb_string = "Remove Backlink";
break;
case 0x32:
- verb_string = "Close Iteration";
break;
case 0x33:
- verb_string = "Mutate Entry";
break;
case 0x34:
- verb_string = "Audit Skulking";
break;
case 0x35:
- verb_string = "Get Server Address";
if(request_value->nds_version != 0x000000fe)
{
pvalues[0].vtype = VTYPE_STRING;
pvalues[0].vdesc = "Distinguished Name: %s";
- pvalues[0].vstring = "";
pvalues[0].mvtype = MVTYPE_ATTR_REQUEST;
pvalues[0].vvalue = 0;
pvalues[0].vlength = 256;
pvalues[0].hfname= hf_nds_name;
pvalues[1].vvalue = tvb_get_letohl(tvb, nds_offset);
pvalues[1].vtype = VTYPE_MULTIVALUE_UINT32;
- pvalues[1].vstring = "";
pvalues[1].vdesc = "Referral Records: %u";
pvalues[1].vlength = 4;
pvalues[1].voffset = nds_offset;
else
{
pvalues[0].vvalue = tvb_get_letohl(tvb, nds_offset);
- pvalues[0].vstring = "";
pvalues[0].vtype = VTYPE_UINT32;
pvalues[0].vdesc = "Iteration Handle: 0x%08x";
pvalues[0].vlength = 4;
nds_offset = nds_offset+pvalues[0].vlength;
pvalues[1].vtype = VTYPE_STRING;
pvalues[1].vdesc = "Distinguished Name: %s";
- pvalues[1].vstring = "";
pvalues[1].mvtype = MVTYPE_ATTR_REQUEST;
pvalues[1].vvalue = 0;
pvalues[1].vlength = 256;
pvalues[1].hfname= hf_nds_name;
pvalues[2].vvalue = tvb_get_letohl(tvb, nds_offset);
pvalues[2].vtype = VTYPE_MULTIVALUE_UINT32;
- pvalues[2].vstring = "";
pvalues[2].vdesc = "Referral Records: %u";
pvalues[2].vlength = 4;
pvalues[2].voffset = nds_offset;
}
break;
case 0x36:
- verb_string = "Set Keys";
break;
case 0x37:
- verb_string = "Change Password";
break;
case 0x38:
- verb_string = "Verify Password";
break;
case 0x39:
- verb_string = "Begin Login";
break;
case 0x3a:
- verb_string = "Finish Login";
break;
case 0x3b:
- verb_string = "Begin Authentication";
break;
case 0x3c:
- verb_string = "Finish Authentication";
break;
case 0x3d:
- verb_string = "Logout";
break;
case 0x3e:
- verb_string = "Repair Ring";
break;
case 0x3f:
- verb_string = "Repair Timestamps";
break;
case 0x40:
- verb_string = "Create Back Link";
break;
case 0x41:
- verb_string = "Delete External Reference";
break;
case 0x42:
- verb_string = "Rename External Reference";
break;
case 0x43:
- verb_string = "Create Directory Entry";
break;
case 0x44:
- verb_string = "Remove Directory Entry";
break;
case 0x45:
- verb_string = "Designate New Master";
break;
case 0x46:
- verb_string = "Change Tree Name";
break;
case 0x47:
- verb_string = "Partition Entry Count";
break;
case 0x48:
- verb_string = "Check Login Restrictions";
break;
case 0x49:
- verb_string = "Start Join";
break;
case 0x4a:
- verb_string = "Low Level Split";
break;
case 0x4b:
- verb_string = "Low Level Join";
break;
case 0x4c:
- verb_string = "Abort Low Level Join";
break;
case 0x4d:
- verb_string = "Get All Servers";
break;
default:
- verb_string = "NDS Continuation Fragment";
break;
}
if(request_value->nds_request_verb != 0)
/* For NDS requests with just an EID, resolve name from hash table. */
if(resolve_eid)
{
- request_eid_value = ncp_eid_hash_lookup(conversation, global_eid);
- if (request_eid_value) {
- global_object_name = request_eid_value->object_name;
+ request_eid_value = ncp_eid_hash_lookup(conversation, global_eid);
+ if (request_eid_value) {
+ strcpy(global_object_name, request_eid_value->object_name);
proto_tree_add_string_format(ncp_tree, hf_nds_name, tvb, 6, 0,
- global_object_name, "NDS Name for EID - %s",
- global_object_name);
- }
- }
+ global_object_name, "NDS Name for EID - %s",
+ global_object_name);
+ }
+ }
for (i = 0; i < 9; i++) {
switch (pvalues[i].vtype) {
conversation_t *conversation;
ptvcursor_t *ptvc = NULL;
proto_tree *temp_tree = NULL;
+ gboolean run_req_cond = FALSE;
+ gboolean run_info_str = FALSE;
guint8 nds_verb = 0;
char * verb_string = "";
guint32 nds_frag = 0;
+ gboolean added_arrow;
nds_val pvalues[9];
+ char string_buffer[9][1024];
guint8 nds_version = 0;
guint32 foffset = 0;
guint32 nds_reply_buffer;
nw_uni_t req_buffer;
- char * global_object_name="\0";
+ char global_object_name[256];
guint32 global_eid=0;
gboolean resolve_eid=FALSE;
guint32 global_flags=0;
for (i = 0; i < 9; i++) {
pvalues[i].vtype = 0;
+ pvalues[i].vvalue = 0;
+ pvalues[i].vlength = 0;
+ pvalues[i].voffset = 0;
+ pvalues[i].hfname = 0;
+ pvalues[i].vdesc = "";
+ string_buffer[i][0] = '\0';
+ pvalues[i].vstring = string_buffer[i];
pvalues[i].mvtype = 0;
}
-
+
strcpy(req_buffer.buffer, "");
+ strcpy(global_object_name, "");
+
func = tvb_get_guint8(tvb, 6);
subfunc = tvb_get_guint8(tvb, 7);
proto_tree_add_uint(ncp_tree, hf_nds_buffer_size, tvb, foffset,
4, nds_reply_buffer);
foffset = foffset+4;
+ verb_string = val_to_str(nds_verb, ncp_nds_verb_vals,
+ "Continuation Fragment");
switch(nds_verb) {
case 0x01:
- verb_string = "Resolve Name -> ";
pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
nds_version = pvalues[0].vvalue;
- pvalues[0].vstring = "";
pvalues[0].vtype = VTYPE_UINT32;
pvalues[0].vdesc = "Version: %u";
pvalues[0].vlength = 4;
foffset = foffset+pvalues[0].vlength;
pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
pvalues[1].vtype = VTYPE_BITFIELD;
- pvalues[1].vstring = "";
pvalues[1].vdesc = "Flags:";
pvalues[1].vlength = 2;
pvalues[1].hfname= hf_nds_nflags;
{
pvalues[2].vtype = VTYPE_UINT32;
pvalues[2].vdesc = "Scope: %u";
- pvalues[2].vstring = "";
pvalues[2].vlength = 4;
pvalues[2].voffset = foffset;
pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
foffset = foffset+pvalues[2].vlength;
pvalues[3].vtype = VTYPE_STRING;
pvalues[3].vdesc = "Name: %s";
- pvalues[3].vstring = "";
pvalues[3].mvtype = MVTYPE_ATTR_REQUEST;
pvalues[3].vvalue = 0;
pvalues[3].vlength = 256;
foffset = foffset + 4;
get_string(tvb, pvalues[3].voffset, pvalues[3].vlength, req_buffer.buffer);
pvalues[3].vstring = req_buffer.buffer;
- global_object_name = req_buffer.buffer;
+ strcpy(global_object_name, req_buffer.buffer);
pvalues[3].hfname= hf_nds_name;
foffset = foffset+pvalues[3].vlength;
foffset += align_4(tvb, foffset);
pvalues[4].vvalue = tvb_get_letohl(tvb, foffset);
pvalues[4].vtype = VTYPE_MULTIVALUE_UINT32;
- pvalues[4].vstring = "";
pvalues[4].vdesc = "Communications Transports: %u";
pvalues[4].vlength = 4;
pvalues[4].hfname= hf_nds_comm_trans;
foffset = foffset + (pvalues[4].vvalue * 4) + 4;
pvalues[5].vvalue = tvb_get_letohl(tvb, foffset);
pvalues[5].vtype = VTYPE_MULTIVALUE_UINT32;
- pvalues[5].vstring = "";
pvalues[5].vdesc = "Tree Walker Transport Type: %u";
pvalues[5].vlength = 4;
pvalues[5].mvtype = MVTYPE_ADDR_REFERRAL_REQUEST;
{
pvalues[2].vtype = VTYPE_UINT32;
pvalues[2].vdesc = "Minimum DS Version: %u";
- pvalues[2].vstring = "";
pvalues[2].vlength = 4;
pvalues[2].voffset = foffset;
pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
foffset = foffset+pvalues[2].vlength;
pvalues[3].vvalue = tvb_get_letohl(tvb, foffset);
pvalues[3].vtype = VTYPE_MULTIVALUE_UINT32;
- pvalues[3].vstring = "";
pvalues[3].vdesc = "Number of Versions to Include: %u";
pvalues[3].vlength = 4;
pvalues[3].mvtype = MVTYPE_ATTR_REQUEST2;
foffset += (pvalues[3].vvalue * 4) + 4;
pvalues[4].vvalue = tvb_get_letohl(tvb, foffset);
pvalues[4].vtype = VTYPE_MULTIVALUE_UINT32;
- pvalues[4].vstring = "";
pvalues[4].vdesc = "Number of Versions to Exclude: %u";
pvalues[4].vlength = 4;
pvalues[4].mvtype = MVTYPE_ATTR_REQUEST2;
foffset += 4;
pvalues[5].vtype = VTYPE_UINT32;
pvalues[5].vdesc = "DN Output Type: %u";
- pvalues[5].vstring = "";
pvalues[5].vlength = 4;
pvalues[5].voffset = foffset;
pvalues[5].vvalue = tvb_get_letohl(tvb, foffset);
foffset = foffset+pvalues[5].vlength;
pvalues[6].vtype = VTYPE_UINT32;
pvalues[6].vdesc = "Nested Output Type: %u";
- pvalues[6].vstring = "";
pvalues[6].vlength = 4;
pvalues[6].voffset = foffset;
pvalues[6].vvalue = tvb_get_letohl(tvb, foffset);
foffset = foffset+pvalues[6].vlength;
pvalues[7].vtype = VTYPE_STRING;
pvalues[7].vdesc = "Output Delimiter: %s";
- pvalues[7].vstring = "";
pvalues[7].mvtype = MVTYPE_ATTR_REQUEST;
pvalues[7].vvalue = 0;
pvalues[7].vlength = 256;
foffset += align_4(tvb, foffset);
pvalues[8].vvalue = tvb_get_letohl(tvb, foffset);
pvalues[8].vtype = VTYPE_MULTIVALUE_UINT32;
- pvalues[8].vstring = "";
pvalues[8].vdesc = "Size of Entry Specifier: %u";
pvalues[8].vlength = 4;
pvalues[8].mvtype = MVTYPE_PROC_ENTRY_SPECIFIERS;
}
break;
case 0x02:
- verb_string = "Read Entry Information";
pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[0].vstring = "";
pvalues[0].vtype = VTYPE_UINT32;
pvalues[0].vdesc = "Version: %u";
pvalues[0].vlength = 4;
{
case 0:
pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[1].vstring = "";
pvalues[1].vtype = VTYPE_UINT32;
pvalues[1].vdesc = "Entry ID: 0x%08x";
pvalues[1].vlength = 4;
case 1:
pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
pvalues[1].vtype = VTYPE_BITFIELD;
- pvalues[1].vstring = "";
pvalues[1].vdesc = "Request Flags:";
pvalues[1].vlength = 2;
pvalues[1].hfname= hf_nds_rflags;
}
foffset = foffset+4;
pvalues[3].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[3].vstring = "";
pvalues[3].vtype = VTYPE_UINT32;
pvalues[3].vdesc = "Entry ID: 0x%08x";
pvalues[3].vlength = 4;
case 2:
pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
pvalues[1].vtype = VTYPE_BITFIELD;
- pvalues[1].vstring = "";
pvalues[1].vdesc = "Request Flags:";
pvalues[1].vlength = 2;
pvalues[1].hfname= hf_nds_rflags;
pvalues[3].vvalue = tvb_get_letohs(tvb, foffset);
global_flags = tvb_get_letohl(tvb, foffset);
pvalues[3].vtype = VTYPE_BITFIELD;
- pvalues[3].vstring = "";
pvalues[3].vdesc = "Information Flags (low) Byte:";
pvalues[3].vlength = 2;
pvalues[3].hfname= hf_nds_rflags;
foffset = foffset+2;
pvalues[4].vvalue = tvb_get_letohs(tvb, foffset);
pvalues[4].vtype = VTYPE_BITFIELD;
- pvalues[4].vstring = "";
pvalues[4].vdesc = "Information Flags (high) Byte:";
pvalues[4].vlength = 2;
pvalues[4].hfname= hf_nds_rflags;
pvalues[4].bit16hfname = hf_bit16infoflagsh;
foffset = foffset+2;
pvalues[5].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[5].vstring = "";
pvalues[5].vtype = VTYPE_UINT32;
pvalues[5].vdesc = "Entry ID: 0x%08x";
pvalues[5].vlength = 4;
break;
case 0x03:
- verb_string = "Read -> ";
pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[0].vstring = "";
pvalues[0].vtype = VTYPE_UINT32;
pvalues[0].vdesc = "Version: %u";
pvalues[0].vlength = 4;
if(pvalues[0].vvalue == 0)
{
pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[1].vstring = "";
pvalues[1].vtype = VTYPE_UINT32;
pvalues[1].vdesc = "Iteration Handle: 0x%08x";
pvalues[1].vlength = 4;
pvalues[1].hfname= hf_nds_iteration;
foffset = foffset+pvalues[1].vlength;
pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[2].vstring = "";
pvalues[2].vtype = VTYPE_UINT32;
pvalues[2].vdesc = "Entry ID: 0x%08x";
pvalues[2].vlength = 4;
pvalues[3].hfname= hf_nds_info_type;
foffset = foffset + pvalues[3].vlength;
pvalues[4].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[4].vstring = "";
pvalues[4].vtype = VTYPE_UINT32;
pvalues[4].vdesc = "All Attributes: %u";
pvalues[4].vlength = 4;
foffset = foffset+pvalues[4].vlength;
pvalues[5].vvalue = tvb_get_letohl(tvb, foffset);
pvalues[5].vtype = VTYPE_MULTIVALUE_UINT32;
- pvalues[5].vstring = "";
pvalues[5].vdesc = "Attributes: %u";
pvalues[5].vlength = 4;
pvalues[5].voffset = foffset;
else
{
pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[1].vstring = "";
pvalues[1].vtype = VTYPE_UINT32;
pvalues[1].vdesc = "Request Flags: 0x%08x";
pvalues[1].vlength = 4;
pvalues[1].hfname= hf_nds_req_flags;
foffset = foffset+pvalues[1].vlength;
pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[2].vstring = "";
pvalues[2].vtype = VTYPE_UINT32;
pvalues[2].vdesc = "Iteration Handle: 0x%08x";
pvalues[2].vlength = 4;
pvalues[2].hfname= hf_nds_iteration;
foffset = foffset+pvalues[2].vlength;
pvalues[3].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[3].vstring = "";
pvalues[3].vtype = VTYPE_UINT32;
pvalues[3].vdesc = "Entry ID: 0x%08x";
pvalues[3].vlength = 4;
pvalues[4].mvtype = MVTYPE_ATTR_REQUEST;
foffset = foffset+pvalues[4].vlength;
pvalues[5].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[5].vstring = "";
pvalues[5].vtype = VTYPE_UINT32;
pvalues[5].vdesc = "All Attributes: %u";
pvalues[5].vlength = 4;
foffset = foffset+pvalues[5].vlength;
pvalues[6].vvalue = tvb_get_letohl(tvb, foffset);
pvalues[6].vtype = VTYPE_MULTIVALUE_UINT32;
- pvalues[6].vstring = "";
pvalues[6].vdesc = "Attributes: %u";
pvalues[6].vlength = 4;
pvalues[6].voffset = foffset;
}
break;
case 0x04:
- verb_string = "Compare";
pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[0].vstring = "";
pvalues[0].vtype = VTYPE_UINT32;
pvalues[0].vdesc = "Version: %u";
pvalues[0].vlength = 4;
pvalues[0].hfname= hf_nds_ver;
foffset = foffset+pvalues[0].vlength;
pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[1].vstring = "";
pvalues[1].vtype = VTYPE_UINT32;
pvalues[1].vdesc = "Entry ID: 0x%08x";
pvalues[1].vlength = 4;
foffset += 4; /* Attribute Count = 1 */
pvalues[2].vtype = VTYPE_STRING;
pvalues[2].vdesc = "Attribute Name Being Compared: %s";
- pvalues[2].vstring = "";
pvalues[2].mvtype = MVTYPE_ATTR_REQUEST;
pvalues[2].vvalue = 0;
pvalues[2].vlength = 256;
foffset = foffset + 4;
get_string(tvb, pvalues[2].voffset, pvalues[2].vlength, req_buffer.buffer);
pvalues[2].vstring = req_buffer.buffer;
- global_object_name = req_buffer.buffer;
+ strcpy(global_object_name, req_buffer.buffer);
pvalues[2].hfname= hf_nds_name;
foffset = foffset+pvalues[2].vlength;
foffset += align_4(tvb, foffset);
***************/
break;
case 0x05:
- verb_string = "List -> ";
pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[0].vstring = "";
pvalues[0].vtype = VTYPE_UINT32;
pvalues[0].vdesc = "Version: %u";
pvalues[0].vlength = 4;
foffset = foffset+pvalues[0].vlength;
pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
pvalues[1].vtype = VTYPE_BITFIELD;
- pvalues[1].vstring = "";
pvalues[1].vdesc = "Request Flags:";
pvalues[1].vlength = 2;
pvalues[1].hfname= hf_nds_rflags;
foffset = foffset+pvalues[1].vlength;
foffset += 2;
pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[2].vstring = "";
pvalues[2].vtype = VTYPE_UINT32;
pvalues[2].vdesc = "Iteration Handle: 0x%08x";
pvalues[2].vlength = 4;
pvalues[2].hfname= hf_nds_iteration;
foffset = foffset+pvalues[2].vlength;
pvalues[3].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[3].vstring = "";
pvalues[3].vtype = VTYPE_UINT32;
pvalues[3].vdesc = "Parent ID: 0x%08x";
pvalues[3].vlength = 4;
pvalues[4].vvalue = tvb_get_letohs(tvb, foffset);
global_flags = tvb_get_letohl(tvb, foffset);
pvalues[4].vtype = VTYPE_BITFIELD;
- pvalues[4].vstring = "";
pvalues[4].vdesc = "Information Flags (low) Byte:";
pvalues[4].vlength = 2;
pvalues[4].hfname= hf_nds_rflags;
foffset = foffset+2;
pvalues[5].vvalue = tvb_get_letohs(tvb, foffset);
pvalues[5].vtype = VTYPE_BITFIELD;
- pvalues[5].vstring = "";
pvalues[5].vdesc = "Information Flags (high) Byte:";
pvalues[5].vlength = 2;
pvalues[5].hfname= hf_nds_rflags;
foffset = foffset+2;
pvalues[6].vtype = VTYPE_STRING;
pvalues[6].vdesc = "Name Filter: %s";
- pvalues[6].vstring = "";
pvalues[6].mvtype = MVTYPE_ATTR_REQUEST;
pvalues[6].vvalue = 0;
pvalues[6].vlength = 256;
foffset += align_4(tvb, foffset);
pvalues[7].vtype = VTYPE_STRING;
pvalues[7].vdesc = "Class Filter: %s";
- pvalues[7].vstring = "";
pvalues[7].mvtype = MVTYPE_ATTR_REQUEST;
pvalues[7].vvalue = 0;
pvalues[7].vlength = 256;
foffset += align_4(tvb, foffset);
pvalues[8].vvalue = tvb_get_letohl(tvb, foffset);
pvalues[8].vtype = VTYPE_MULTIVALUE_UINT32;
- pvalues[8].vstring = "";
- pvalues[8].vdesc = "Seconds %u";
+ pvalues[8].vdesc = "Seconds: %u";
pvalues[8].vlength = 4;
pvalues[8].mvtype = MVTYPE_PRINT_TIMESTAMP;
pvalues[8].hfname= hf_nds_time_filter;
pvalues[8].voffset = foffset;
break;
case 0x06:
- verb_string = "Search Entries";
- pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
- break;
- case 0x07:
- verb_string = "Add Entry";
- pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
- break;
- case 0x08:
- verb_string = "Remove Entry";
- pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[0].vstring = "";
- pvalues[0].vtype = VTYPE_UINT32;
- pvalues[0].vdesc = "Version: %u";
- pvalues[0].vlength = 4;
- pvalues[0].voffset = foffset;
- pvalues[0].hfname= hf_nds_ver;
- foffset = foffset+pvalues[0].vlength;
- pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[1].vstring = "";
- pvalues[1].vtype = VTYPE_UINT32;
- pvalues[1].vdesc = "Entry ID: 0x%08x";
- pvalues[1].vlength = 4;
- resolve_eid = TRUE;
- global_eid = pvalues[1].vvalue;
- pvalues[1].voffset = foffset;
- pvalues[1].hfname= hf_nds_eid;
- foffset = foffset+pvalues[1].vlength;
- break;
- case 0x09:
- verb_string = "Modify Entry";
pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
pvalues[0].vstring = "";
pvalues[0].vtype = VTYPE_UINT32;
pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
pvalues[1].vtype = VTYPE_UINT32;
pvalues[1].vstring = "";
- pvalues[1].vdesc = "Request Flags: 0x%08x"; /* always 0 */
+ pvalues[1].vdesc = "Request Flags: 0x%08x";
pvalues[1].vlength = 4;
pvalues[1].hfname= hf_nds_rflags;
pvalues[1].voffset = foffset;
foffset = foffset+4;
pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
pvalues[2].vtype = VTYPE_UINT32;
- pvalues[2].vstring = "";
- pvalues[2].vdesc = "Iteration Handle: 0x%08x"; /* always 0 */
+ pvalues[2].vdesc = "Iteration Handle: 0x%08x";
pvalues[2].vlength = 4;
- pvalues[2].hfname= hf_nds_iteration;
pvalues[2].voffset = foffset;
- foffset = foffset+4;
+ pvalues[2].hfname= hf_nds_iteration;
+ foffset = foffset+pvalues[2].vlength;
pvalues[3].vvalue = tvb_get_letohl(tvb, foffset);
pvalues[3].vstring = "";
pvalues[3].vtype = VTYPE_UINT32;
- pvalues[3].vdesc = "Entry ID: 0x%08x";
+ pvalues[3].vdesc = "Base Entry ID: 0x%08x";
pvalues[3].vlength = 4;
- pvalues[3].voffset = foffset;
- resolve_eid = TRUE;
+ resolve_eid = FALSE;
global_eid = pvalues[3].vvalue;
- pvalues[3].hfname = hf_nds_eid;
+ pvalues[3].voffset = foffset;
+ pvalues[3].hfname= hf_nds_eid;
foffset = foffset+pvalues[3].vlength;
pvalues[4].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[4].vtype = VTYPE_MULTIVALUE_UINT32;
- pvalues[4].vstring = "";
- pvalues[4].vdesc = "Number of Attributes to Change %u";
+ pvalues[4].vstring = match_strval(pvalues[4].vvalue, nds_search_scope);
+ if(pvalues[4].vstring == NULL)
+ {
+ pvalues[4].vstring = "No Search Scope Defined";
+ }
+ pvalues[4].vtype = VTYPE_STRING;
+ pvalues[4].vdesc = "Replica Type: %s";
pvalues[4].vlength = 4;
- pvalues[4].mvtype = MVTYPE_MODIFY_ATTR_REQUEST;
- pvalues[4].hfname= hf_nds_number_of_changes;
pvalues[4].voffset = foffset;
+ pvalues[4].mvtype = 0;
+ pvalues[4].hfname= hf_nds_search_scope;
+ foffset = foffset + pvalues[4].vlength;
+ pvalues[5].vvalue = tvb_get_letohl(tvb, foffset);
+ pvalues[5].vtype = VTYPE_UINT32;
+ pvalues[5].vdesc = "Number of Objects to Search: 0x%08x";
+ pvalues[5].vlength = 4;
+ pvalues[5].voffset = foffset;
+ pvalues[5].hfname= hf_nds_num_objects;
+ foffset = foffset+pvalues[5].vlength;
+ pvalues[6].vvalue = tvb_get_letohl(tvb, foffset);
+ pvalues[6].vtype = VTYPE_BITFIELD;
+ pvalues[6].vdesc = "Information Types:";
+ pvalues[6].vlength = 2;
+ pvalues[6].hfname= hf_nds_nflags;
+ pvalues[6].voffset = foffset;
+ pvalues[6].bit1 = "Names";
+ pvalues[6].bit1hfname = hf_bit1siflags;
+ pvalues[6].bit2 = "Names and Values";
+ pvalues[6].bit2hfname = hf_bit2siflags;
+ pvalues[6].bit3 = "Effective Privileges";
+ pvalues[6].bit3hfname = hf_bit3siflags;
+ pvalues[6].bit4 = "Value Info";
+ pvalues[6].bit4hfname = hf_bit4siflags;
+ pvalues[6].bit5 = "Abbreviated Value";
+ pvalues[6].bit5hfname = hf_bit5siflags;
+ pvalues[6].bit6 = "Not Defined";
+ pvalues[6].bit6hfname = hf_bit6siflags;
+ pvalues[6].bit7 = "Not Defined";
+ pvalues[6].bit7hfname = hf_bit7siflags;
+ pvalues[6].bit8 = "Not Defined";
+ pvalues[6].bit8hfname = hf_bit8siflags;
+ pvalues[6].bit9 = "Expanded Class";
+ pvalues[6].bit9hfname = hf_bit9siflags;
+ pvalues[6].bit10 = "Not Defined";
+ pvalues[6].bit10hfname = hf_bit10siflags;
+ pvalues[6].bit11= "Not Defined";
+ pvalues[6].bit11hfname = hf_bit11siflags;
+ pvalues[6].bit12 = "Not Defined";
+ pvalues[6].bit12hfname = hf_bit12siflags;
+ pvalues[6].bit13 = "Not Defined";
+ pvalues[6].bit13hfname = hf_bit13siflags;
+ pvalues[6].bit14 = "Not Defined";
+ pvalues[6].bit14hfname = hf_bit14siflags;
+ pvalues[6].bit15 = "Not Defined";
+ pvalues[6].bit15hfname = hf_bit15siflags;
+ pvalues[6].bit16 = "Not Defined";
+ pvalues[6].bit16hfname = hf_bit16siflags;
+ foffset = foffset+4;
+ if(pvalues[0].vvalue != 2)
+ {
+ pvalues[7].vvalue = tvb_get_letohs(tvb, foffset);
+ global_flags = tvb_get_letohl(tvb, foffset);
+ pvalues[7].vtype = VTYPE_BITFIELD;
+ pvalues[7].vdesc = "Information Flags (low) Byte:";
+ pvalues[7].vlength = 2;
+ pvalues[7].hfname= hf_nds_rflags;
+ pvalues[7].voffset = foffset;
+ pvalues[7].bit1 = "Output Flags";
+ pvalues[7].bit1hfname = hf_bit1infoflagsl;
+ pvalues[7].bit2 = "Entry ID";
+ pvalues[7].bit2hfname = hf_bit2infoflagsl;
+ pvalues[7].bit3 = "Entry Flags";
+ pvalues[7].bit3hfname = hf_bit3infoflagsl;
+ pvalues[7].bit4 = "Subordinate Count";
+ pvalues[7].bit4hfname = hf_bit4infoflagsl;
+ pvalues[7].bit5 = "Modification Time";
+ pvalues[7].bit5hfname = hf_bit5infoflagsl;
+ pvalues[7].bit6 = "Modification Timestamp";
+ pvalues[7].bit6hfname = hf_bit6infoflagsl;
+ pvalues[7].bit7 = "Creation Timestamp";
+ pvalues[7].bit7hfname = hf_bit7infoflagsl;
+ pvalues[7].bit8 = "Partition Root ID";
+ pvalues[7].bit8hfname = hf_bit8infoflagsl;
+ pvalues[7].bit9 = "Parent ID";
+ pvalues[7].bit9hfname = hf_bit9infoflagsl;
+ pvalues[7].bit10 = "Revision Count";
+ pvalues[7].bit10hfname = hf_bit10infoflagsl;
+ pvalues[7].bit11 = "Replica Type";
+ pvalues[7].bit11hfname = hf_bit11infoflagsl;
+ pvalues[7].bit12 = "Base Class";
+ pvalues[7].bit12hfname = hf_bit12infoflagsl;
+ pvalues[7].bit13 = "Relative Distinguished Name";
+ pvalues[7].bit13hfname = hf_bit13infoflagsl;
+ pvalues[7].bit14 = "Distinguished Name";
+ pvalues[7].bit14hfname = hf_bit14infoflagsl;
+ pvalues[7].bit15 = "Root Distinguished Name";
+ pvalues[7].bit15hfname = hf_bit15infoflagsl;
+ pvalues[7].bit16 = "Parent Distinguished Name";
+ pvalues[7].bit16hfname = hf_bit16infoflagsl;
+ foffset = foffset+2;
+ pvalues[8].vvalue = tvb_get_letohs(tvb, foffset);
+ pvalues[8].vtype = VTYPE_BITFIELD;
+ pvalues[8].vdesc = "Information Flags (high) Byte:";
+ pvalues[8].vlength = 2;
+ pvalues[8].hfname= hf_nds_rflags;
+ pvalues[8].voffset = foffset;
+ pvalues[8].bit1 = "Purge Time";
+ pvalues[8].bit1hfname = hf_bit1infoflagsh;
+ pvalues[8].bit2 = "Dereference Base Class";
+ pvalues[8].bit2hfname = hf_bit2infoflagsh;
+ pvalues[8].bit3 = "Not Defined";
+ pvalues[8].bit3hfname = hf_bit3infoflagsh;
+ pvalues[8].bit4 = "Not Defined";
+ pvalues[8].bit4hfname = hf_bit4infoflagsh;
+ pvalues[8].bit5 = "Not Defined";
+ pvalues[8].bit5hfname = hf_bit5infoflagsh;
+ pvalues[8].bit6 = "Not Defined";
+ pvalues[8].bit6hfname = hf_bit6infoflagsh;
+ pvalues[8].bit7 = "Not Defined";
+ pvalues[8].bit7hfname = hf_bit7infoflagsh;
+ pvalues[8].bit8 = "Not Defined";
+ pvalues[8].bit8hfname = hf_bit8infoflagsh;
+ pvalues[8].bit9 = "Not Defined";
+ pvalues[8].bit9hfname = hf_bit9infoflagsh;
+ pvalues[8].bit10 = "Not Defined";
+ pvalues[8].bit10hfname = hf_bit10infoflagsh;
+ pvalues[8].bit11 = "Not Defined";
+ pvalues[8].bit11hfname = hf_bit11infoflagsh;
+ pvalues[8].bit12 = "Not Defined";
+ pvalues[8].bit12hfname = hf_bit12infoflagsh;
+ pvalues[8].bit13 = "Not Defined";
+ pvalues[8].bit13hfname = hf_bit13infoflagsh;
+ pvalues[8].bit14 = "Not Defined";
+ pvalues[8].bit14hfname = hf_bit14infoflagsh;
+ pvalues[8].bit15 = "Not Defined";
+ pvalues[8].bit15hfname = hf_bit15infoflagsh;
+ pvalues[8].bit16 = "Not Defined";
+ pvalues[8].bit16hfname = hf_bit16infoflagsh;
+ foffset = foffset+2;
+ }
break;
- case 0x0a:
- verb_string = "Modify RDN";
+ case 0x07:
pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
pvalues[0].vstring = "";
pvalues[0].vtype = VTYPE_UINT32;
pvalues[0].hfname= hf_nds_ver;
foffset = foffset+pvalues[0].vlength;
pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
+ pvalues[1].vtype = VTYPE_UINT32;
pvalues[1].vstring = "";
+ pvalues[1].vdesc = "Request Flags: 0x%08x";
+ pvalues[1].vlength = 4;
+ pvalues[1].hfname= hf_nds_rflags;
+ pvalues[1].voffset = foffset;
+ foffset = foffset+4;
+ if(pvalues[0].vvalue == 0)
+ {
+ pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
+ pvalues[2].vstring = "";
+ pvalues[2].vtype = VTYPE_UINT32;
+ pvalues[2].vdesc = "Parent Entry ID: 0x%08x";
+ pvalues[2].vlength = 4;
+ resolve_eid = FALSE;
+ global_eid = pvalues[2].vvalue;
+ pvalues[2].voffset = foffset;
+ pvalues[2].hfname= hf_nds_eid;
+ foffset = foffset+pvalues[2].vlength;
+ pvalues[3].vtype = VTYPE_STRING;
+ pvalues[3].vdesc = "Relative Distinguished Name: %s";
+ pvalues[3].vstring = "";
+ pvalues[3].mvtype = MVTYPE_ATTR_REQUEST;
+ pvalues[3].vvalue = 0;
+ pvalues[3].vlength = 256;
+ pvalues[3].vlength = tvb_get_letohl(tvb, foffset);
+ if (pvalues[3].vlength == 0x00)
+ {
+ pvalues[3].vtype = VTYPE_NONE;
+ break;
+ }
+ pvalues[3].voffset = foffset+4;
+ foffset = foffset + 4;
+ get_string(tvb, pvalues[3].voffset, pvalues[3].vlength, req_buffer.buffer);
+ pvalues[3].vstring = req_buffer.buffer;
+ strcpy(global_object_name, req_buffer.buffer);
+ pvalues[3].hfname= hf_nds_relative_dn;
+ foffset = foffset+pvalues[3].vlength;
+ foffset += align_4(tvb, foffset);
+ pvalues[4].vvalue = tvb_get_letohl(tvb, foffset);
+ pvalues[4].vtype = VTYPE_MULTIVALUE_UINT32;
+ pvalues[4].vstring = "";
+ pvalues[4].vdesc = "Attributes: %u";
+ pvalues[4].vlength = 4;
+ pvalues[4].voffset = foffset;
+ pvalues[4].mvtype = MVTYPE_ADD_ATTR_REQUEST;
+ pvalues[4].hfname= hf_nds_attr;
+ }
+ else
+ {
+ pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
+ pvalues[2].vstring = "";
+ pvalues[2].vtype = VTYPE_UINT32;
+ pvalues[2].vdesc = "Iteration Handle: 0x%08x";
+ pvalues[2].vlength = 4;
+ pvalues[2].voffset = foffset;
+ pvalues[2].hfname= hf_nds_iteration;
+ foffset = foffset+pvalues[2].vlength;
+ pvalues[3].vvalue = tvb_get_letohl(tvb, foffset);
+ pvalues[3].vstring = "";
+ pvalues[3].vtype = VTYPE_UINT32;
+ pvalues[3].vdesc = "Parent Entry ID: 0x%08x";
+ pvalues[3].vlength = 4;
+ resolve_eid = FALSE;
+ global_eid = pvalues[3].vvalue;
+ pvalues[3].voffset = foffset;
+ pvalues[3].hfname= hf_nds_eid;
+ foffset = foffset+pvalues[3].vlength;
+ pvalues[4].vtype = VTYPE_STRING;
+ pvalues[4].vdesc = "Relative Distinguished Name: %s";
+ pvalues[4].vstring = "";
+ pvalues[4].mvtype = MVTYPE_ATTR_REQUEST;
+ pvalues[4].vvalue = 0;
+ pvalues[4].vlength = 256;
+ pvalues[4].vlength = tvb_get_letohl(tvb, foffset);
+ if (pvalues[4].vlength == 0x00)
+ {
+ pvalues[4].vtype = VTYPE_NONE;
+ break;
+ }
+ pvalues[4].voffset = foffset+4;
+ foffset = foffset + 4;
+ get_string(tvb, pvalues[4].voffset, pvalues[4].vlength, req_buffer.buffer);
+ pvalues[4].vstring = req_buffer.buffer;
+ strcpy(global_object_name, req_buffer.buffer);
+ pvalues[4].hfname= hf_nds_relative_dn;
+ foffset = foffset+pvalues[4].vlength;
+ foffset += align_4(tvb, foffset);
+ pvalues[5].vvalue = tvb_get_letohl(tvb, foffset);
+ pvalues[5].vtype = VTYPE_MULTIVALUE_UINT32;
+ pvalues[5].vstring = "";
+ pvalues[5].vdesc = "Attributes: %u";
+ pvalues[5].vlength = 4;
+ pvalues[5].voffset = foffset;
+ pvalues[5].mvtype = MVTYPE_ADD_ATTR_REQUEST;
+ pvalues[5].hfname= hf_nds_attr;
+ }
+ break;
+ case 0x08:
+ pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
+ pvalues[0].vtype = VTYPE_UINT32;
+ pvalues[0].vdesc = "Version: %u";
+ pvalues[0].vlength = 4;
+ pvalues[0].voffset = foffset;
+ pvalues[0].hfname= hf_nds_ver;
+ foffset = foffset+pvalues[0].vlength;
+ pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
+ pvalues[1].vtype = VTYPE_UINT32;
+ pvalues[1].vdesc = "Entry ID: 0x%08x";
+ pvalues[1].vlength = 4;
+ resolve_eid = TRUE;
+ global_eid = pvalues[1].vvalue;
+ pvalues[1].voffset = foffset;
+ pvalues[1].hfname= hf_nds_eid;
+ foffset = foffset+pvalues[1].vlength;
+ break;
+ case 0x09:
+ pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
+ pvalues[0].vtype = VTYPE_UINT32;
+ pvalues[0].vdesc = "Version: %u";
+ pvalues[0].vlength = 4;
+ pvalues[0].voffset = foffset;
+ pvalues[0].hfname= hf_nds_ver;
+ foffset = foffset+pvalues[0].vlength;
+ if(pvalues[0].vvalue == 0)
+ {
+ pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
+ pvalues[1].vtype = VTYPE_UINT32;
+ pvalues[1].vstring = "";
+ pvalues[1].vdesc = "Iteration Handle: 0x%08x"; /* always 0 */
+ pvalues[1].vlength = 4;
+ pvalues[1].hfname= hf_nds_iteration;
+ pvalues[1].voffset = foffset;
+ foffset = foffset+4;
+ pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
+ pvalues[2].vstring = "";
+ pvalues[2].vtype = VTYPE_UINT32;
+ pvalues[2].vdesc = "Entry ID: 0x%08x";
+ pvalues[2].vlength = 4;
+ pvalues[2].voffset = foffset;
+ resolve_eid = TRUE;
+ global_eid = pvalues[2].vvalue;
+ pvalues[2].hfname = hf_nds_eid;
+ foffset = foffset+pvalues[2].vlength;
+ pvalues[3].vvalue = tvb_get_letohl(tvb, foffset);
+ pvalues[3].vtype = VTYPE_MULTIVALUE_UINT32;
+ pvalues[3].vstring = "";
+ pvalues[3].vdesc = "Number of Attributes to Change %u";
+ pvalues[3].vlength = 4;
+ pvalues[3].mvtype = MVTYPE_MODIFY_ATTR_REQUEST;
+ pvalues[3].hfname= hf_nds_number_of_changes;
+ pvalues[3].voffset = foffset;
+ }
+ else
+ {
+ pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
+ pvalues[1].vtype = VTYPE_UINT32;
+ pvalues[1].vstring = "";
+ pvalues[1].vdesc = "Request Flags: 0x%08x"; /* always 0 */
+ pvalues[1].vlength = 4;
+ pvalues[1].hfname= hf_nds_rflags;
+ pvalues[1].voffset = foffset;
+ foffset = foffset+4;
+ pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
+ pvalues[2].vtype = VTYPE_UINT32;
+ pvalues[2].vstring = "";
+ pvalues[2].vdesc = "Iteration Handle: 0x%08x"; /* always 0 */
+ pvalues[2].vlength = 4;
+ pvalues[2].hfname= hf_nds_iteration;
+ pvalues[2].voffset = foffset;
+ foffset = foffset+4;
+ pvalues[3].vvalue = tvb_get_letohl(tvb, foffset);
+ pvalues[3].vstring = "";
+ pvalues[3].vtype = VTYPE_UINT32;
+ pvalues[3].vdesc = "Entry ID: 0x%08x";
+ pvalues[3].vlength = 4;
+ pvalues[3].voffset = foffset;
+ resolve_eid = TRUE;
+ global_eid = pvalues[3].vvalue;
+ pvalues[3].hfname = hf_nds_eid;
+ foffset = foffset+pvalues[3].vlength;
+ pvalues[4].vvalue = tvb_get_letohl(tvb, foffset);
+ pvalues[4].vtype = VTYPE_MULTIVALUE_UINT32;
+ pvalues[4].vstring = "";
+ pvalues[4].vdesc = "Number of Attributes to Change %u";
+ pvalues[4].vlength = 4;
+ pvalues[4].mvtype = MVTYPE_MODIFY_ATTR_REQUEST;
+ pvalues[4].hfname= hf_nds_number_of_changes;
+ pvalues[4].voffset = foffset;
+ }
+ break;
+ case 0x0a:
+ pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
+ pvalues[0].vtype = VTYPE_UINT32;
+ pvalues[0].vdesc = "Version: %u";
+ pvalues[0].vlength = 4;
+ pvalues[0].voffset = foffset;
+ pvalues[0].hfname= hf_nds_ver;
+ foffset = foffset+pvalues[0].vlength;
+ pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
pvalues[1].vtype = VTYPE_UINT32;
pvalues[1].vdesc = "Entry ID: 0x%08x";
pvalues[1].vlength = 4;
foffset += align_4(tvb, foffset);
pvalues[3].vtype = VTYPE_STRING;
pvalues[3].vdesc = "New RDN: %s";
- pvalues[3].vstring = "";
pvalues[3].mvtype = 0;
pvalues[3].vvalue = 0;
pvalues[3].vlength = 256;
foffset = foffset+pvalues[3].vlength;
break;
case 0x0b:
- verb_string = "Define Attribute ->";
pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[0].vstring = "";
pvalues[0].vtype = VTYPE_UINT32;
pvalues[0].vdesc = "Version: %u";
pvalues[0].vlength = 4;
pvalues[1].vvalue = tvb_get_letohs(tvb, foffset);
global_flags = tvb_get_letohl(tvb, foffset);
pvalues[1].vtype = VTYPE_BITFIELD;
- pvalues[1].vstring = "";
pvalues[1].vdesc = "Attribute Constraints:";
pvalues[1].vlength = 2;
pvalues[1].hfname= hf_nds_acflags;
foffset = foffset+4;
pvalues[2].vtype = VTYPE_STRING;
pvalues[2].vdesc = "Attribute Name: %s";
- pvalues[2].vstring = "";
pvalues[2].mvtype = MVTYPE_ATTR_REQUEST;
pvalues[2].vvalue = 0;
pvalues[2].vlength = 256;
foffset = foffset + 4;
get_string(tvb, pvalues[2].voffset, pvalues[2].vlength, req_buffer.buffer);
pvalues[2].vstring = req_buffer.buffer;
- global_object_name = req_buffer.buffer;
+ strcpy(global_object_name, req_buffer.buffer);
pvalues[2].hfname= hf_nds_name;
foffset = foffset+pvalues[2].vlength;
foffset += align_4(tvb, foffset);
pvalues[3].mvtype = 0;
foffset = foffset+pvalues[3].vlength;
pvalues[4].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[4].vstring = "";
pvalues[4].vtype = VTYPE_UINT32;
pvalues[4].vdesc = "Lower Limit Value %u";
pvalues[4].vlength = 4;
pvalues[4].hfname = hf_nds_lower;
foffset += 4;
pvalues[5].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[5].vstring = "";
pvalues[5].vtype = VTYPE_UINT32;
pvalues[5].vdesc = "Upper Limit Value %u";
pvalues[5].vlength = 4;
pvalues[5].voffset = foffset;
pvalues[5].hfname = hf_nds_upper;
+ foffset += 4;
pvalues[6].vvalue = tvb_get_letohl(tvb, foffset); /* Length of bytes field */
foffset += 4;
- pvalues[6].vstring = "";
pvalues[6].vtype = VTYPE_BYTES;
pvalues[6].vdesc = "ASN.1 ID";
pvalues[6].vlength = pvalues[6].vvalue;
pvalues[6].hfname = hf_nds_asn1;
break;
case 0x0c:
- verb_string = "Read Attribute Definition";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x0d:
- verb_string = "Remove Attribute Definition";
pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[0].vstring = "";
pvalues[0].vtype = VTYPE_UINT32;
pvalues[0].vdesc = "Version: %u";
pvalues[0].vlength = 4;
foffset = foffset+pvalues[0].vlength;
pvalues[1].vtype = VTYPE_STRING;
pvalues[1].vdesc = "Attribute Name: %s";
- pvalues[1].vstring = "";
pvalues[1].mvtype = MVTYPE_ATTR_REQUEST;
pvalues[1].vvalue = 0;
pvalues[1].vlength = 256;
foffset = foffset + 4;
get_string(tvb, pvalues[1].voffset, pvalues[1].vlength, req_buffer.buffer);
pvalues[1].vstring = req_buffer.buffer;
- global_object_name = req_buffer.buffer;
+ strcpy(global_object_name, req_buffer.buffer);
pvalues[1].hfname= hf_nds_attribute_dn;
break;
case 0x0e:
- verb_string = "Define Class";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x0f:
- verb_string = "Read Class Definition ->";
pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[0].vstring = "";
pvalues[0].vtype = VTYPE_UINT32;
pvalues[0].vdesc = "Version: %u";
pvalues[0].vlength = 4;
pvalues[0].hfname= hf_nds_ver;
foffset = foffset+pvalues[0].vlength;
pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[1].vstring = "";
pvalues[1].vtype = VTYPE_UINT32;
pvalues[1].vdesc = "Iteration Handle: 0x%08x";
pvalues[1].vlength = 4;
pvalues[3].vvalue = tvb_get_letohl(tvb, foffset);
if (pvalues[3].vvalue == 0x00000000)
{
- pvalues[3].vstring = "Return All Classes = False";
+ pvalues[3].vstring = "Do Not Return All Classes";
+ pvalues[3].mvtype = 0;
}
else
{
- pvalues[3].vstring = "Return All Classes = True";
+ pvalues[3].vstring = "Return All Classes";
+ pvalues[3].mvtype = MVTYPE_ATTR_REQUEST;
}
pvalues[3].vtype = VTYPE_STRING;
- pvalues[3].vdesc = "Return all Classes %s";
+ pvalues[3].vdesc = "%s";
pvalues[3].vlength = 4;
pvalues[3].voffset = foffset;
- pvalues[3].mvtype = 0;
pvalues[3].hfname= hf_nds_return_all_classes;
foffset = foffset + pvalues[3].vlength;
foffset += align_4(tvb, foffset);
pvalues[4].vvalue = tvb_get_letohl(tvb, foffset);
pvalues[4].vtype = VTYPE_MULTIVALUE_UINT32;
- pvalues[4].vstring = "";
pvalues[4].vdesc = "Classes: %d";
pvalues[4].vlength = 4;
pvalues[4].voffset = foffset;
pvalues[4].hfname= hf_nds_classes;
break;
case 0x10:
- verb_string = "Modify Class Definition -> ";
pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[0].vstring = "";
pvalues[0].vtype = VTYPE_UINT32;
pvalues[0].vdesc = "Version: %u";
pvalues[0].vlength = 4;
foffset = foffset+pvalues[0].vlength;
pvalues[1].vtype = VTYPE_STRING;
pvalues[1].vdesc = "Class Name: %s";
- pvalues[1].vstring = "";
pvalues[1].mvtype = MVTYPE_ATTR_REQUEST;
pvalues[1].vvalue = 0;
pvalues[1].vlength = 256;
foffset = foffset + 4;
get_string(tvb, pvalues[1].voffset, pvalues[1].vlength, req_buffer.buffer);
pvalues[1].vstring = req_buffer.buffer;
- global_object_name = req_buffer.buffer;
+ strcpy(global_object_name, req_buffer.buffer);
pvalues[1].hfname= hf_nds_base_class;
foffset = foffset+pvalues[1].vlength;
foffset += align_4(tvb, foffset);
pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
pvalues[2].vtype = VTYPE_MULTIVALUE_UINT32;
- pvalues[2].vstring = "";
pvalues[2].vdesc = "Number of Attributes to Add: %u";
pvalues[2].vlength = 4;
pvalues[2].voffset = foffset;
pvalues[2].hfname= hf_nds_att_add;
break;
case 0x11:
- verb_string = "Remove Class Definition";
pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[0].vstring = "";
pvalues[0].vtype = VTYPE_UINT32;
pvalues[0].vdesc = "Version: %u";
pvalues[0].vlength = 4;
foffset = foffset+pvalues[0].vlength;
pvalues[1].vtype = VTYPE_STRING;
pvalues[1].vdesc = "Class Name: %s";
- pvalues[1].vstring = "";
pvalues[1].mvtype = MVTYPE_ATTR_REQUEST;
pvalues[1].vvalue = 0;
pvalues[1].vlength = 256;
foffset = foffset + 4;
get_string(tvb, pvalues[1].voffset, pvalues[1].vlength, req_buffer.buffer);
pvalues[1].vstring = req_buffer.buffer;
- global_object_name = req_buffer.buffer;
+ strcpy(global_object_name, req_buffer.buffer);
pvalues[1].hfname= hf_nds_base;
break;
case 0x12:
- verb_string = "List Containable Classes";
pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[0].vstring = "";
pvalues[0].vtype = VTYPE_UINT32;
pvalues[0].vdesc = "Version: %u";
pvalues[0].vlength = 4;
pvalues[0].hfname= hf_nds_ver;
foffset = foffset+pvalues[0].vlength;
pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[1].vstring = "";
pvalues[1].vtype = VTYPE_UINT32;
pvalues[1].vdesc = "Iteration Handle: 0x%08x";
pvalues[1].vlength = 4;
pvalues[1].hfname= hf_nds_iteration;
foffset = foffset+pvalues[1].vlength;
pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[2].vstring = "";
pvalues[2].vtype = VTYPE_UINT32;
pvalues[2].vdesc = "Entry ID: 0x%08x";
pvalues[2].vlength = 4;
foffset = foffset+pvalues[2].vlength;
break;
case 0x13:
- verb_string = "Get Effective Rights -> ";
pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[0].vstring = "";
pvalues[0].vtype = VTYPE_UINT32;
pvalues[0].vdesc = "Version: %u";
pvalues[0].vlength = 4;
pvalues[0].hfname= hf_nds_ver;
foffset = foffset+pvalues[0].vlength;
pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[1].vstring = "";
pvalues[1].vtype = VTYPE_UINT32;
pvalues[1].vdesc = "Entry ID: 0x%08x";
pvalues[1].vlength = 4;
foffset = foffset+pvalues[1].vlength;
pvalues[2].vtype = VTYPE_STRING;
pvalues[2].vdesc = "Trustee Name: %s";
- pvalues[2].vstring = "";
pvalues[2].mvtype = MVTYPE_ATTR_REQUEST;
pvalues[2].vvalue = 0;
pvalues[2].vlength = 256;
foffset += align_4(tvb, foffset);
pvalues[3].vtype = VTYPE_STRING;
pvalues[3].vdesc = "Attribute to be Checked: %s";
- pvalues[3].vstring = "";
pvalues[3].mvtype = 0;
pvalues[3].vvalue = 0;
pvalues[3].vlength = 256;
{
pvalues[4].vtype = VTYPE_STRING;
pvalues[4].vdesc = "Security Equivalence: %s";
- pvalues[4].vstring = "";
pvalues[4].mvtype = MVTYPE_ATTR_REQUEST;
pvalues[4].vvalue = 0;
pvalues[4].vlength = 256;
}
break;
case 0x14:
- verb_string = "Add Partition";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x15:
- verb_string = "Remove Partition";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x16:
- verb_string = "List Partitions";
pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[0].vstring = "";
pvalues[0].vtype = VTYPE_UINT32;
pvalues[0].vdesc = "Version: %u";
pvalues[0].vlength = 4;
foffset = foffset+pvalues[0].vlength;
pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
pvalues[1].vtype = VTYPE_BITFIELD;
- pvalues[1].vstring = "";
pvalues[1].vdesc = "Request Flags:";
pvalues[1].vlength = 2;
pvalues[1].hfname= hf_nds_rflags;
pvalues[1].bit16hfname = hf_nds_bit16;
foffset = foffset+pvalues[1].vlength;
pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[2].vstring = "";
pvalues[2].vtype = VTYPE_UINT32;
pvalues[2].vdesc = "Iteration Handle: 0x%08x";
pvalues[2].vlength = 4;
}
pvalues[3].vvalue = tvb_get_letohs(tvb, foffset);
pvalues[3].vtype = VTYPE_BITFIELD;
- pvalues[3].vstring = "";
pvalues[3].vdesc = "Information Flags (low) Byte:";
pvalues[3].vlength = 2;
pvalues[3].hfname= hf_nds_rflags;
foffset = foffset+2;
pvalues[4].vvalue = tvb_get_letohs(tvb, foffset);
pvalues[4].vtype = VTYPE_BITFIELD;
- pvalues[4].vstring = "";
pvalues[4].vdesc = "Information Flags (high) Byte:";
pvalues[4].vlength = 2;
pvalues[4].hfname= hf_nds_rflags;
break;
}
pvalues[5].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[5].vstring = "";
pvalues[5].vtype = VTYPE_UINT32;
pvalues[5].vdesc = "Partition Root ID: 0x%08x";
pvalues[5].vlength = 4;
foffset = foffset+pvalues[5].vlength;
break;
case 0x17:
- verb_string = "Split Partition";
pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
nds_version = pvalues[0].vvalue;
- pvalues[0].vstring = "";
pvalues[0].vtype = VTYPE_UINT32;
pvalues[0].vdesc = "Version: %u";
pvalues[0].vlength = 4;
foffset = foffset+pvalues[0].vlength;
pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
nds_version = pvalues[1].vvalue;
- pvalues[1].vstring = "";
pvalues[1].vtype = VTYPE_UINT32;
pvalues[1].vdesc = "Flags: 0x%08x";
pvalues[1].vlength = 4;
pvalues[1].voffset = foffset;
foffset = foffset+pvalues[1].vlength;
pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[2].vstring = "";
pvalues[2].vtype = VTYPE_UINT32;
pvalues[2].vdesc = "New Partition Root ID: 0x%08x";
pvalues[2].vlength = 4;
foffset = foffset+pvalues[2].vlength;
break;
case 0x18:
- verb_string = "Join Partitions";
pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
nds_version = pvalues[0].vvalue;
- pvalues[0].vstring = "";
pvalues[0].vtype = VTYPE_UINT32;
pvalues[0].vdesc = "Version: %u";
pvalues[0].vlength = 4;
foffset = foffset+pvalues[0].vlength;
pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
nds_version = pvalues[1].vvalue;
- pvalues[1].vstring = "";
pvalues[1].vtype = VTYPE_UINT32;
pvalues[1].vdesc = "Flags: 0x%08x";
pvalues[1].vlength = 4;
pvalues[1].voffset = foffset;
foffset = foffset+pvalues[1].vlength;
pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[2].vstring = "";
pvalues[2].vtype = VTYPE_UINT32;
pvalues[2].vdesc = "Child Partition Root ID: 0x%08x";
pvalues[2].vlength = 4;
foffset = foffset+pvalues[2].vlength;
break;
case 0x19:
- verb_string = "Add Replica";
pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
nds_version = pvalues[0].vvalue;
- pvalues[0].vstring = "";
pvalues[0].vtype = VTYPE_UINT32;
pvalues[0].vdesc = "Version: %u";
pvalues[0].vlength = 4;
foffset = foffset+pvalues[0].vlength;
pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
nds_version = pvalues[1].vvalue;
- pvalues[1].vstring = "";
pvalues[1].vtype = VTYPE_UINT32;
pvalues[1].vdesc = "Flags: 0x%08x";
pvalues[1].vlength = 4;
pvalues[1].voffset = foffset;
foffset = foffset+pvalues[1].vlength;
pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[2].vstring = "";
pvalues[2].vtype = VTYPE_UINT32;
pvalues[2].vdesc = "Master Partition Root ID: 0x%08x";
pvalues[2].vlength = 4;
foffset = foffset + pvalues[3].vlength;
pvalues[4].vtype = VTYPE_STRING;
pvalues[4].vdesc = "Target Server Name: %s";
- pvalues[4].vstring = "";
pvalues[4].mvtype = 0;
pvalues[4].vvalue = 0;
pvalues[4].vlength = 256;
pvalues[4].hfname= hf_nds_target_name;
break;
case 0x1a:
- verb_string = "Remove Replica";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x1b:
- verb_string = "Open Stream -> ";
pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
nds_version = pvalues[0].vvalue;
- pvalues[0].vstring = "";
pvalues[0].vtype = VTYPE_UINT32;
pvalues[0].vdesc = "Version: %u";
pvalues[0].vlength = 4;
foffset = foffset+pvalues[0].vlength;
pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
nds_version = pvalues[1].vvalue;
- pvalues[1].vstring = "";
pvalues[1].vtype = VTYPE_UINT32;
pvalues[1].vdesc = "Streams Flags: 0x%08x";
pvalues[1].vlength = 4;
pvalues[1].voffset = foffset;
foffset = foffset+pvalues[1].vlength;
pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[2].vstring = "";
pvalues[2].vtype = VTYPE_UINT32;
pvalues[2].vdesc = "Entry ID: 0x%08x";
pvalues[2].vlength = 4;
foffset = foffset+pvalues[2].vlength;
pvalues[3].vtype = VTYPE_STRING;
pvalues[3].vdesc = "Stream Name: %s";
- pvalues[3].vstring = "";
pvalues[3].mvtype = MVTYPE_ATTR_REQUEST;
pvalues[3].vvalue = 0;
pvalues[3].vlength = 256;
pvalues[3].hfname= hf_nds_stream_name;
break;
case 0x1c:
- verb_string = "Search Filter";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x1d:
- verb_string = "Create Subordinate Reference";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x1e:
- verb_string = "Link Replica";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x1f:
- verb_string = "Change Replica Type";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x20:
- verb_string = "Start Update Schema";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x21:
- verb_string = "End Update Schema";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x22:
- verb_string = "Update Schema";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x23:
- verb_string = "Start Update Replica";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x24:
- verb_string = "End Update Replica";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x25:
- verb_string = "Update Replica";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x26:
- verb_string = "Synchronize Partition";
pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
nds_version = pvalues[0].vvalue;
- pvalues[0].vstring = "";
pvalues[0].vtype = VTYPE_UINT32;
pvalues[0].vdesc = "Version: %u";
pvalues[0].vlength = 4;
foffset = foffset+pvalues[0].vlength;
pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
nds_version = pvalues[1].vvalue;
- pvalues[1].vstring = "";
pvalues[1].vtype = VTYPE_UINT32;
pvalues[1].vdesc = "Flags: 0x%08x";
pvalues[1].vlength = 4;
pvalues[1].voffset = foffset;
foffset = foffset+pvalues[1].vlength;
pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[2].vstring = "";
pvalues[2].vtype = VTYPE_UINT32;
pvalues[2].vdesc = "Time Delay in Seconds: %u";
pvalues[2].vlength = 4;
{
pvalues[3].vtype = VTYPE_STRING;
pvalues[3].vdesc = "Root Most Object Name: %s";
- pvalues[3].vstring = "";
pvalues[3].mvtype = MVTYPE_ATTR_REQUEST;
pvalues[3].vvalue = 0;
pvalues[3].vlength = 256;
else
{
pvalues[3].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[3].vstring = "";
pvalues[3].vtype = VTYPE_UINT32;
pvalues[3].vdesc = "Entry ID: 0x%08x";
pvalues[3].vlength = 4;
}
break;
case 0x27:
- verb_string = "Synchronize Schema";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x28:
- verb_string = "Read Syntaxes";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x29:
- verb_string = "Get Replica Root ID";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x2a:
- verb_string = "Begin Move Entry";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x2b:
- verb_string = "Finish Move Entry";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x2c:
- verb_string = "Release Moved Entry";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x2d:
- verb_string = "Backup Entry";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x2e:
- verb_string = "Restore Entry";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x2f:
- verb_string = "Save DIB";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x30:
- verb_string = "Control";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x31:
- verb_string = "Remove Backlink";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x32:
- verb_string = "Close Iteration";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x33:
- verb_string = "Mutate Entry";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x34:
- verb_string = "Audit Skulking";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x35:
- verb_string = "Get Server Address";
pvalues[0].vvalue = 0;
break;
case 0x36:
- verb_string = "Set Keys";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x37:
- verb_string = "Change Password";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x38:
- verb_string = "Verify Password";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x39:
- verb_string = "Begin Login";
pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[0].vstring = "";
pvalues[0].vtype = VTYPE_UINT32;
pvalues[0].vdesc = "Version: %u";
pvalues[0].vlength = 4;
pvalues[0].hfname= hf_nds_ver;
foffset = foffset+pvalues[0].vlength;
pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[1].vstring = "";
pvalues[1].vtype = VTYPE_UINT32;
pvalues[1].vdesc = "Entry ID: 0x%08x";
pvalues[1].vlength = 4;
foffset = foffset+pvalues[1].vlength;
break;
case 0x3a:
- verb_string = "Finish Login";
pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[0].vstring = "";
pvalues[0].vtype = VTYPE_UINT32;
pvalues[0].vdesc = "Reply Buffer Size: %u";
pvalues[0].vlength = 4;
pvalues[0].hfname= hf_nds_buffer_size;
foffset = foffset+pvalues[0].vlength;
pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[1].vstring = "";
pvalues[1].vtype = VTYPE_UINT32;
pvalues[1].vdesc = "Version: %u";
pvalues[1].vlength = 4;
pvalues[1].hfname= hf_nds_ver;
foffset = foffset+pvalues[1].vlength;
pvalues[2].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[2].vstring = "";
pvalues[2].vtype = VTYPE_UINT32;
pvalues[2].vdesc = "Entry ID: 0x%08x";
pvalues[2].vlength = 4;
foffset = foffset+pvalues[2].vlength;
break;
case 0x3b:
- verb_string = "Begin Authentication";
pvalues[0].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[0].vstring = "";
pvalues[0].vtype = VTYPE_UINT32;
pvalues[0].vdesc = "Version: %u";
pvalues[0].vlength = 4;
pvalues[0].hfname= hf_nds_ver;
foffset = foffset+pvalues[0].vlength;
pvalues[1].vvalue = tvb_get_letohl(tvb, foffset);
- pvalues[1].vstring = "";
pvalues[1].vtype = VTYPE_UINT32;
pvalues[1].vdesc = "Entry ID: 0x%08x";
pvalues[1].vlength = 4;
foffset = foffset+pvalues[1].vlength;
break;
case 0x3c:
- verb_string = "Finish Authentication";
break;
case 0x3d:
- verb_string = "Logout";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x3e:
- verb_string = "Repair Ring";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x3f:
- verb_string = "Repair Timestamps";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x40:
- verb_string = "Create Back Link";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x41:
- verb_string = "Delete External Reference";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x42:
- verb_string = "Rename External Reference";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x43:
- verb_string = "Create Directory Entry";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x44:
- verb_string = "Remove Directory Entry";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x45:
- verb_string = "Designate New Master";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x46:
- verb_string = "Change Tree Name";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x47:
- verb_string = "Partition Entry Count";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x48:
- verb_string = "Check Login Restrictions";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x49:
- verb_string = "Start Join";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x4a:
- verb_string = "Low Level Split";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x4b:
- verb_string = "Low Level Join";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x4c:
- verb_string = "Abort Low Level Join";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
case 0x4d:
- verb_string = "Get All Servers";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
break;
default:
- verb_string = "NDS Continuation Fragment";
pvalues[0].vtype = VTYPE_NONE; /* Not Defined */
}
}
/* Fill in the INFO column. */
if (check_col(pinfo->cinfo, COL_INFO)) {
if (ncp_rec) {
-
col_set_str(pinfo->cinfo, COL_PROTOCOL, "NDS");
if (nds_frag != 0xffffffff) {
col_add_fstr(pinfo->cinfo, COL_INFO, "C Continue NDS Fragment %08x", nds_frag);
else {
col_add_fstr(pinfo->cinfo, COL_INFO, "C NDS %s", verb_string);
}
+ run_info_str = TRUE;
}
else {
col_add_fstr(pinfo->cinfo, COL_INFO,
}
}
- if (!pinfo->fd->flags.visited) {
-
- /* This is the first time we've looked at this packet.
- Keep track of the address and connection whence the request
- came, and the address and connection to which the request
- is being sent, so that we can match up calls with replies.
- (We don't include the sequence number, as we may want
- to have all packets over the same connection treated
- as being part of a single conversation so that we can
- let the user select that conversation to be displayed.) */
-
- conversation = find_conversation(&pinfo->src, &pinfo->dst,
+
+ /* Keep track of the address and connection whence the request
+ came, and the address and connection to which the request
+ is being sent, so that we can match up calls with replies.
+ (We don't include the sequence number, as we may want
+ to have all packets over the same connection treated
+ as being part of a single conversation so that we can
+ let the user select that conversation to be displayed.) */
+
+ conversation = find_conversation(&pinfo->src, &pinfo->dst,
PT_NCP, nw_connection, nw_connection, 0);
+ if (conversation == NULL) {
+ /* It's not part of any conversation - create a new one. */
+ conversation = conversation_new(&pinfo->src, &pinfo->dst,
+ PT_NCP, nw_connection, nw_connection, 0);
+ }
- if (conversation == NULL) {
- /* It's not part of any conversation - create a new one. */
- conversation = conversation_new(&pinfo->src, &pinfo->dst,
- PT_NCP, nw_connection, nw_connection, 0);
- }
-
+ if (!pinfo->fd->flags.visited) {
request_value = ncp_hash_insert(conversation, sequence, ncp_rec);
request_value->req_frame_num = pinfo->fd->num;
-
+ request_value->req_frame_time.secs=pinfo->fd->abs_secs;
+ request_value->req_frame_time.nsecs=pinfo->fd->abs_usecs*1000;
+
/* If this is the first time we're examining the packet,
* check to see if this NCP type uses a "request condition".
* If so, we have to build a proto_tree because request conditions
* a proto_tree, then wonderful. If we don't, we need to build
* one. */
if (ncp_rec && !ncp_tree) {
- proto_item *ti;
-
- temp_tree = proto_tree_create_root();
- proto_tree_set_visible(temp_tree, FALSE);
- ti = proto_tree_add_item(temp_tree, proto_ncp, tvb, 0, -1, FALSE);
- ncp_tree = proto_item_add_subtree(ti, ett_ncp);
+ run_req_cond = TRUE;
}
}
+ /* If we have to handle a request condition, or have to
+ add to the Info column, we need to construct a protocol
+ tree. If we already have a proto_tree, then wonderful.
+ If we don't, we need to build one. */
+ if ((run_info_str || run_req_cond) && !ncp_tree) {
+ proto_item *ti;
+
+ temp_tree = proto_tree_create_root();
+ proto_tree_set_visible(temp_tree, FALSE);
+ ti = proto_tree_add_item(temp_tree, proto_ncp, tvb, 0, -1, FALSE);
+ ncp_tree = proto_item_add_subtree(ti, ett_ncp);
+ }
+
if (ncp_tree) {
/* If the dissection throws an exception, be sure to free
* the temporary proto_tree that was created. Because of the
CLEANUP_PUSH(free_proto_tree, temp_tree);
- conversation = find_conversation(&pinfo->src, &pinfo->dst,
- PT_NCP, nw_connection, nw_connection, 0);
-
-
+ request_value = ncp_hash_lookup(conversation, sequence);
switch (type) {
case NCP_BROADCAST_SLOT:
proto_tree_add_uint_format(ncp_tree, hf_ncp_nds_verb, tvb, 24, 4,
nds_verb, "NDS Verb: %d, (0x%02x), %s",
nds_verb, nds_verb, verb_string);
+ added_arrow = FALSE;
for (i = 0; i < 9; i++) {
switch (pvalues[i].vtype) {
case VTYPE_STRING:
proto_tree_add_string_format(ncp_tree, pvalues[i].hfname, tvb, pvalues[i].voffset,
pvalues[i].vlength, pvalues[i].vstring, pvalues[i].vdesc, pvalues[i].vstring);
+ if (pvalues[i].mvtype == MVTYPE_ATTR_REQUEST) {
+ /*
+ * The "vstring" value is set to the input ES type
+ * for MVTYPE_PROC_ENTRY_SPECIFIERS,
+ * to add string to columninfo
+ */
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ if (!added_arrow) {
+ col_append_str(pinfo->cinfo, COL_INFO, " -> ");
+ added_arrow = TRUE;
+ }
+ col_append_str(pinfo->cinfo, COL_INFO, pvalues[i].vstring);
+ }
+ }
break;
case VTYPE_BITFIELD:
* The "vstring" value is set to the input ES type
* by "process_multivalues()".
*/
- global_object_name = pvalues[i].vstring;
+ strcpy(global_object_name, pvalues[i].vstring);
}
if (pvalues[i].mvtype == MVTYPE_ATTR_REQUEST || pvalues[i].mvtype == MVTYPE_PROC_ENTRY_SPECIFIERS) {
/*
* and the last string for MVTYPE_ATTR_REQUEST,
* by "process_multivalues()".
*/
- if (check_col(pinfo->cinfo, COL_INFO))
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ if (!added_arrow) {
+ col_append_str(pinfo->cinfo, COL_INFO, " -> ");
+ added_arrow = TRUE;
+ }
col_append_str(pinfo->cinfo, COL_INFO, pvalues[i].vstring);
+ }
}
break;
pvalues[i].vtype);
break;
}
- if(resolve_eid) {
-
- /* For NDS requests with just an EID, resolve name from hash table. */
- request_eid_value = ncp_eid_hash_lookup(conversation, global_eid);
- if (request_eid_value) {
- global_object_name = request_eid_value->object_name;
- if (check_col(pinfo->cinfo, COL_INFO))
- {
- col_append_str(pinfo->cinfo, COL_INFO, ", Object Name - ");
- col_append_str(pinfo->cinfo, COL_INFO, global_object_name);
- }
+ /* For NDS requests with just an EID, resolve name from hash table. */
+ }
+ request_eid_value = ncp_eid_hash_lookup(conversation, global_eid);
+ if(resolve_eid) {
+ if (request_eid_value) {
+ strcpy(global_object_name, request_eid_value->object_name);
+ if (check_col(pinfo->cinfo, COL_INFO))
+ {
+ col_append_str(pinfo->cinfo, COL_INFO, ", Object Name - ");
+ col_append_str(pinfo->cinfo, COL_INFO, global_object_name);
}
}
}
{
request_value->nds_request_verb = nds_verb;
request_value->nds_version = nds_version;
- request_value->object_name = global_object_name;
+ strcpy(request_value->object_name, global_object_name);
request_value->req_nds_flags = global_flags;
}
}
ptvcursor_t *ptvc = NULL;
proto_tree *temp_tree = NULL;
gint length_remaining = 0;
- char flags_str[256];
- char * sep = NULL;
- proto_tree *flags_tree;
guint32 nds_flags;
- proto_item *tinew;
- guint32 nds_flag_tree = 0x00020000;
- guint32 nds_flag_depth = 0x00000002;
- guint32 nds_flag_rev = 0x00000004;
- guint32 nds_flag_flags = 0x00000008;
+ guint32 ping_version;
+ nds_val pvalue;
+ char string_buffer[1024];
+
+ pvalue.vvalue = 0;
+ pvalue.vlength = 0;
+ pvalue.voffset = 0;
+ pvalue.hfname = 0;
+ pvalue.vdesc = "";
+ string_buffer[0] = '\0';
+ pvalue.vstring = string_buffer;
+ pvalue.mvtype = 0;
func = tvb_get_guint8(tvb, 6);
subfunc = tvb_get_guint8(tvb, 7);
request_value = ncp_hash_insert(conversation, sequence, ncp_rec);
request_value->req_frame_num = pinfo->fd->num;
+ request_value->req_frame_time.secs=pinfo->fd->abs_secs;
+ request_value->req_frame_time.nsecs=pinfo->fd->abs_usecs*1000;
/* If this is the first time we're examining the packet,
* check to see if this NCP type uses a "request condition".
length_remaining = tvb_reported_length_remaining(tvb, 8);
if (length_remaining >= 8) {
- proto_tree_add_item(ncp_tree, hf_nds_version, tvb, 8, 4,
- FALSE);
-
+ ping_version = tvb_get_letohl(tvb, 8);
+ proto_tree_add_uint(ncp_tree, hf_nds_ping_version, tvb, 8,
+ 4, ping_version);
nds_flags = tvb_get_letohl(tvb, 12);
if (request_value)
request_value->req_nds_flags = nds_flags;
- strcpy(flags_str, " ");
- sep = "(";
- if (nds_flags & nds_flag_tree) {
- strcat(flags_str, sep);
- strcat(flags_str, "Tree");
- sep = ",";
- }
- if (nds_flags & nds_flag_depth) {
- strcat(flags_str, sep);
- strcat(flags_str, "Depth");
- sep = ",";
- }
- if (nds_flags & nds_flag_rev) {
- strcat(flags_str, sep);
- strcat(flags_str, "Revision");
- sep = ",";
- }
- if (nds_flags & nds_flag_flags) {
- strcat(flags_str, sep);
- strcat(flags_str, "Flags");
- }
- if (flags_str[0] != '\0') {
- strcat(flags_str, ")");
- tinew = proto_tree_add_uint_format(ncp_tree, hf_nds_flags,
- tvb, 12, 4, nds_flags, "Flags: 0x%08x -%s", nds_flags,
- flags_str);
-
- flags_tree = proto_item_add_subtree(tinew, ett_nds);
-
- proto_tree_add_item(flags_tree, hf_nds_flags_tree,
- tvb, 12, 4, TRUE);
- proto_tree_add_item(flags_tree, hf_nds_flags_flags,
- tvb, 12, 4, TRUE);
- proto_tree_add_item(flags_tree, hf_nds_flags_rev,
- tvb, 12, 4, TRUE);
- proto_tree_add_item(flags_tree, hf_nds_flags_depth,
- tvb, 12, 4, TRUE);
- }
+
+ pvalue.vvalue = tvb_get_letohs(tvb, 12);
+ pvalue.vtype = VTYPE_BITFIELD;
+ pvalue.vstring = "";
+ pvalue.vdesc = "Ping (low) Request Flags:";
+ pvalue.vlength = 2;
+ pvalue.hfname= hf_nds_rflags;
+ pvalue.voffset = 12;
+ pvalue.bit1 = "Supported Fields";
+ pvalue.bit1hfname = hf_bit1pingflags1;
+ pvalue.bit2 = "Depth";
+ pvalue.bit2hfname = hf_bit2pingflags1;
+ pvalue.bit3 = "Revision";
+ pvalue.bit3hfname = hf_bit3pingflags1;
+ pvalue.bit4 = "Flags";
+ pvalue.bit4hfname = hf_bit4pingflags1;
+ pvalue.bit5 = "Verification Flags";
+ pvalue.bit5hfname = hf_bit5pingflags1;
+ pvalue.bit6 = "Letter Version";
+ pvalue.bit6hfname = hf_bit6pingflags1;
+ pvalue.bit7 = "OS Version";
+ pvalue.bit7hfname = hf_bit7pingflags1;
+ pvalue.bit8 = "License Flags";
+ pvalue.bit8hfname = hf_bit8pingflags1;
+ pvalue.bit9 = "DS Time";
+ pvalue.bit9hfname = hf_bit9pingflags1;
+ pvalue.bit10 = "Not Defined";
+ pvalue.bit10hfname = hf_bit10pingflags1;
+ pvalue.bit11 = "Not Defined";
+ pvalue.bit11hfname = hf_bit11pingflags1;
+ pvalue.bit12 = "Not Defined";
+ pvalue.bit12hfname = hf_bit12pingflags1;
+ pvalue.bit13 = "Not Defined";
+ pvalue.bit13hfname = hf_bit13pingflags1;
+ pvalue.bit14 = "Not Defined";
+ pvalue.bit14hfname = hf_bit14pingflags1;
+ pvalue.bit15 = "Not Defined";
+ pvalue.bit15hfname = hf_bit15pingflags1;
+ pvalue.bit16 = "Not Defined";
+ pvalue.bit16hfname = hf_bit16pingflags1;
+
+ process_bitfield(ncp_tree, tvb, &pvalue);
+
+ pvalue.vvalue = tvb_get_letohs(tvb, 14);
+ pvalue.vtype = VTYPE_BITFIELD;
+ pvalue.vstring = "";
+ pvalue.vdesc = "Ping (high) Request Flags:";
+ pvalue.vlength = 2;
+ pvalue.hfname= hf_nds_rflags;
+ pvalue.voffset = 14;
+ pvalue.bit1 = "Sap Name";
+ pvalue.bit1hfname = hf_bit1pingflags2;
+ pvalue.bit2 = "Tree Name";
+ pvalue.bit2hfname = hf_bit2pingflags2;
+ pvalue.bit3 = "OS Name";
+ pvalue.bit3hfname = hf_bit3pingflags2;
+ pvalue.bit4 = "Hardware Name";
+ pvalue.bit4hfname = hf_bit4pingflags2;
+ pvalue.bit5 = "Vendor Name";
+ pvalue.bit5hfname = hf_bit5pingflags2;
+ pvalue.bit6 = "Not Defined";
+ pvalue.bit6hfname = hf_bit6pingflags2;
+ pvalue.bit7 = "Not Defined";
+ pvalue.bit7hfname = hf_bit7pingflags2;
+ pvalue.bit8 = "Not Defined";
+ pvalue.bit8hfname = hf_bit8pingflags2;
+ pvalue.bit9 = "Not Defined";
+ pvalue.bit9hfname = hf_bit9pingflags2;
+ pvalue.bit10 = "Not Defined";
+ pvalue.bit10hfname = hf_bit10pingflags2;
+ pvalue.bit11 = "Not Defined";
+ pvalue.bit11hfname = hf_bit11pingflags2;
+ pvalue.bit12 = "Not Defined";
+ pvalue.bit12hfname = hf_bit12pingflags2;
+ pvalue.bit13 = "Not Defined";
+ pvalue.bit13hfname = hf_bit13pingflags2;
+ pvalue.bit14 = "Not Defined";
+ pvalue.bit14hfname = hf_bit14pingflags2;
+ pvalue.bit15 = "Not Defined";
+ pvalue.bit15hfname = hf_bit15pingflags2;
+ pvalue.bit16 = "Not Defined";
+ pvalue.bit16hfname = hf_bit16pingflags2;
+
+ process_bitfield(ncp_tree, tvb, &pvalue);
}
break;