Ethereal-dev: Re: [Ethereal-dev] Updates to NCP dissector.

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Joerg Mayer <jmayer@xxxxxxxxx>
Date: Thu, 26 Sep 2002 04:13:52 +0200
On Wed, Sep 25, 2002 at 01:47:26PM -0600, Greg Morris wrote:
> If you run into anymore
> then you can forward the information to me and I will do my best
> (blindly) or you can attempt to resolve them yourself.

I've applied your patch (still except for the too -> to conversion :)
and applied the attached stuff on top of it (I don't think it's worth
bothering you to fix warnings that you can't see :-) Please have a
look at the format string stuff, as gcc complained that the format string
contained no place holders for values but the argument list was not
empty - it contains value1.

 Ciao
       Jörg

--
Joerg Mayer                                          <jmayer@xxxxxxxxx>
I found out that "pro" means "instead of" (as in proconsul). Now I know
what proactive means.
diff -u -p -r1.34 ncp2222.py
--- ncp2222.py	25 Sep 2002 00:36:58 -0000	1.34
+++ ncp2222.py	26 Sep 2002 01:59:57 -0000
@@ -5490,7 +5490,7 @@ def produce_code():
 # include "config.h"
 #endif
 
+#include <string.h>
 #include <glib.h>
 #include <epan/packet.h>
 static void ncp_init_protocol(void);

diff -u -p -r1.21 packet-ncp2222.inc
--- packet-ncp2222.inc	25 Sep 2002 00:36:59 -0000	1.21
+++ packet-ncp2222.inc	26 Sep 2002 02:00:01 -0000
@@ -1888,7 +1887,7 @@ print_nds_values(proto_tree *vtree, tvbu
                        case 0x00000017:        /* Back Link */
                                value1 = tvb_get_letohl(tvb, voffset);         /* Length */
                                proto_tree_add_uint_format(nvtree, hf_nds_uint32value, tvb, voffset,
-                                        4, value1, "Lenght of Record", value1);
+                                        4, value1, "Length of Record %08x", value1);
                                voffset = voffset+4;
                                value2 = tvb_get_letohl(tvb, voffset);         /* Remote ID */
                                proto_tree_add_uint_format(nvtree, hf_nds_uint32value, tvb, voffset,
@@ -1905,7 +1904,7 @@ print_nds_values(proto_tree *vtree, tvbu
                        case 0x00000019:        /* Typed Name */
                                value1 = tvb_get_letohl(tvb, voffset);         /* Length */
                                proto_tree_add_uint_format(nvtree, hf_nds_uint32value, tvb, voffset,
-                                        4, value1, "Lenght of Record", value1);
+                                        4, value1, "Length of Record %08x", value1);
                                voffset = voffset+4;
                                value2 = tvb_get_letohl(tvb, voffset);         /* Level */
                                proto_tree_add_uint_format(nvtree, hf_nds_uint32value, tvb, voffset,
@@ -1926,7 +1925,7 @@ print_nds_values(proto_tree *vtree, tvbu
                        case 0x0000001a:        /* Hold */
                                value1 = tvb_get_letohl(tvb, voffset);         /* Length */
                                proto_tree_add_uint_format(nvtree, hf_nds_uint32value, tvb, voffset,
-                                        4, value1, "Lenght of Record", value1);
+                                        4, value1, "Length of Record %08x", value1);
                                voffset = voffset+4;
                                value2 = tvb_get_letohl(tvb, voffset);         /* Amount */
                                proto_tree_add_uint_format(nvtree, hf_nds_uint32value, tvb, voffset,
@@ -5308,7 +5302,7 @@ dissect_ncp_reply(tvbuff_t *tvb, packet_
                        			                verb_string = "NDS Continuation Fragment";
                                                         break;
                                         }        
-        			        if(request_value->nds_request_verb != NULL)
+        			        if(request_value->nds_request_verb != 0)
                                         {
                                                 proto_tree_add_uint_format(ncp_tree, hf_ncp_nds_verb, tvb, 6, 0,
 			        	                request_value->nds_request_verb, "NDS Verb: %d, %s",