Got rid of dissect_rpc_string routine, renamed dissect_rpc_string_item to
authorNathan Neulinger <nneul@umr.edu>
Mon, 15 Nov 1999 17:16:51 +0000 (17:16 -0000)
committerNathan Neulinger <nneul@umr.edu>
Mon, 15 Nov 1999 17:16:51 +0000 (17:16 -0000)
dissect_rpc_string. Replaced only instance of this routine being called.

Added display filtering to rpc dissector. Replaced most instances of
proto_tree_add_text with proto_tree_add_item.

Added program version and procedure to the program tree in addition to it
being in the RPC tree.

svn path=/trunk/; revision=1037

packet-bootparams.c
packet-mount.c
packet-rpc.c
packet-rpc.h
packet-ypserv.c

index 9205f840f7203176705c8e10f25266fe346032e8..a07b2ca60cdba27ae79efd54de8e6ebd9da80151 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-bootparams.c
  * Routines for bootparams dissection
  *
- * $Id: packet-bootparams.c,v 1.4 1999/11/11 20:18:46 nneul Exp $
+ * $Id: packet-bootparams.c,v 1.5 1999/11/15 17:16:50 nneul Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@unicom.net>
@@ -88,8 +88,8 @@ int dissect_getfile_call(const u_char *pd, int offset, frame_data *fd,
 {
        if ( tree )
        {
-               offset = dissect_rpc_string_item(pd,offset,fd,tree,hf_bootparams_host);
-               offset = dissect_rpc_string_item(pd,offset,fd,tree,hf_bootparams_fileid);
+               offset = dissect_rpc_string(pd,offset,fd,tree,hf_bootparams_host);
+               offset = dissect_rpc_string(pd,offset,fd,tree,hf_bootparams_fileid);
        }
        
        return offset;
@@ -101,9 +101,9 @@ int dissect_getfile_reply(const u_char *pd, int offset, frame_data *fd,
 {
        if ( tree )
        {
-               offset = dissect_rpc_string_item(pd,offset,fd,tree,hf_bootparams_host);
+               offset = dissect_rpc_string(pd,offset,fd,tree,hf_bootparams_host);
                offset = dissect_bp_address(pd,offset,fd,tree,hf_bootparams_hostaddr);
-               offset = dissect_rpc_string_item(pd,offset,fd,tree,hf_bootparams_filepath);
+               offset = dissect_rpc_string(pd,offset,fd,tree,hf_bootparams_filepath);
        }
        
        return offset;
@@ -127,8 +127,8 @@ int dissect_whoami_reply(const u_char *pd, int offset, frame_data *fd,
 {
        if ( tree )
        {
-               offset = dissect_rpc_string_item(pd,offset,fd,tree,hf_bootparams_host);
-               offset = dissect_rpc_string_item(pd,offset,fd,tree,hf_bootparams_domain);
+               offset = dissect_rpc_string(pd,offset,fd,tree,hf_bootparams_host);
+               offset = dissect_rpc_string(pd,offset,fd,tree,hf_bootparams_domain);
                offset = dissect_bp_address(pd,offset,fd,tree,hf_bootparams_routeraddr);
        }
        
index 2ac5afd307b56d8aa1315efd7f3703a68598cbbc..fe2763a135c7b8b30bee159b409befb4648ddbd6 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-mount.c
  * Routines for mount dissection
  *
- * $Id: packet-mount.c,v 1.2 1999/11/15 14:17:18 nneul Exp $
+ * $Id: packet-mount.c,v 1.3 1999/11/15 17:16:51 nneul Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@unicom.net>
@@ -47,7 +47,7 @@ int dissect_mount_dirpath_call(const u_char *pd, int offset, frame_data *fd,
 {
        if ( tree )
        {
-               offset = dissect_rpc_string_item(pd,offset,fd,tree,hf_mount_path);
+               offset = dissect_rpc_string(pd,offset,fd,tree,hf_mount_path);
        }
        
        return offset;
index 3b17b85635edca206f9b612fc605a3561a2c0359..6bef7ea18771e23fe2b77ebb59f487149740e2c8 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for rpc dissection
  * Copyright 1999, Uwe Girlich <Uwe.Girlich@philosys.de>
  * 
- * $Id: packet-rpc.c,v 1.14 1999/11/15 14:57:38 nneul Exp $
+ * $Id: packet-rpc.c,v 1.15 1999/11/15 17:16:51 nneul Exp $
  * 
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@unicom.net>
@@ -91,14 +91,24 @@ const value_string rpc_auth_state[6] = {
 static int proto_rpc = -1;
 static int hf_rpc_xid = -1;
 static int hf_rpc_msgtype = -1;
-static int hf_rpc_rpcversion = -1;
+static int hf_rpc_version = -1;
+static int hf_rpc_version_min = -1;
+static int hf_rpc_version_max = -1;
 static int hf_rpc_program = -1;
 static int hf_rpc_programversion = -1;
+static int hf_rpc_programversion_min = -1;
+static int hf_rpc_programversion_max = -1;
 static int hf_rpc_procedure = -1;
-static int hf_rpc_cred_flavor = -1;
-static int hf_rpc_cred_length = -1;
-static int hf_rpc_verify_flavor = -1;
-static int hf_rpc_verify_length = -1;
+static int hf_rpc_auth_flavor = -1;
+static int hf_rpc_auth_length = -1;
+static int hf_rpc_auth_machinename = -1;
+static int hf_rpc_auth_stamp = -1;
+static int hf_rpc_auth_uid = -1;
+static int hf_rpc_auth_gid = -1;
+static int hf_rpc_state_accept = -1;
+static int hf_rpc_state_reply = -1;
+static int hf_rpc_state_reject = -1;
+static int hf_rpc_state_auth = -1;
 
 
 /* Hash table with info on RPC program numbers */
@@ -368,48 +378,7 @@ char* name, char* type)
 #define RPC_STRING_MAXBUF 2048
 
 int
-dissect_rpc_string(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, char* name)
-{
-       proto_item *string_item;
-       proto_tree *string_tree = NULL;
-
-       guint32 string_length;
-       guint32 string_fill;
-       guint32 string_length_full;
-       char string_buffer[RPC_STRING_MAXBUF];
-
-       if (!BYTES_ARE_IN_FRAME(offset,4)) return offset;
-       string_length = EXTRACT_UINT(pd,offset+0);
-       string_length_full = rpc_roundup(string_length);
-       string_fill = string_length_full - string_length;
-       if (!BYTES_ARE_IN_FRAME(offset+4,string_length_full)) return offset;
-       if (string_length>=sizeof(string_buffer)) return offset;
-       memcpy(string_buffer,pd+offset+4,string_length);
-       string_buffer[string_length] = '\0';
-       if (tree) {
-               string_item = proto_tree_add_text(tree,offset+0,
-                       4+string_length_full,
-                       "%s: %s", name, string_buffer);
-               if (string_item) {
-                       string_tree = proto_item_add_subtree(string_item, ETT_RPC_STRING);
-               }
-       }
-       if (string_tree) {
-               proto_tree_add_text(string_tree,offset+0,4,
-                       "length: %u", string_length);
-               proto_tree_add_text(string_tree,offset+4,string_length,
-                       "text: %s", string_buffer);
-               if (string_fill)
-                       proto_tree_add_text(string_tree,offset+4+string_length,string_fill,
-                               "fill bytes: opaque data");
-       }
-
-       offset += 4 + string_length_full;
-       return offset;
-}
-
-int
-dissect_rpc_string_item(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int hfindex)
+dissect_rpc_string(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, int hfindex)
 {
        proto_item *string_item;
        proto_tree *string_tree = NULL;
@@ -467,10 +436,10 @@ dissect_rpc_auth( const u_char *pd, int offset, frame_data *fd, proto_tree *tree
        /* if (!BYTES_ARE_IN_FRAME(offset+8,full_length)) return; */
 
        if (tree) {
-               proto_tree_add_text(tree,offset+0,4,
-               "Flavor: %s (%u)", val_to_str(flavor,rpc_auth_flavor,"Unknown"),flavor);
-               proto_tree_add_text(tree,offset+4,4,
-                       "Length: %u", length);
+               proto_tree_add_item(tree, hf_rpc_auth_flavor, offset+0, 4,
+                       flavor);
+               proto_tree_add_item(tree, hf_rpc_auth_length, offset+4, 4,
+                       length);
        }
 
        offset += 8;
@@ -489,31 +458,32 @@ dissect_rpc_auth( const u_char *pd, int offset, frame_data *fd, proto_tree *tree
                        if (!BYTES_ARE_IN_FRAME(offset,4)) return;
                        stamp = EXTRACT_UINT(pd,offset+0);
                        if (tree)
-                               proto_tree_add_text(tree,offset+0,4,
-                                       "stamp: 0x%08x", stamp);
+                               proto_tree_add_item(tree, hf_rpc_auth_stamp,
+                                       offset+0, 4, stamp);
                        offset += 4;
 
-                       offset = dissect_rpc_string(pd,offset,fd,tree,"machinename");
+                       offset = dissect_rpc_string(pd,offset,fd,
+                               tree,hf_rpc_auth_machinename);
 
                        if (!BYTES_ARE_IN_FRAME(offset,4)) return;
                        uid = EXTRACT_UINT(pd,offset+0);
                        if (tree)
-                               proto_tree_add_text(tree,offset+0,4,
-                                       "uid: %u", uid);
+                               proto_tree_add_item(tree, hf_rpc_auth_uid,
+                                       offset+0, 4, uid);
                        offset += 4;
 
                        if (!BYTES_ARE_IN_FRAME(offset,4)) return;
                        gid = EXTRACT_UINT(pd,offset+0);
                        if (tree)
-                               proto_tree_add_text(tree,offset+0,4,
-                                       "gid: %u", gid);
+                               proto_tree_add_item(tree, hf_rpc_auth_gid,
+                                       offset+0, 4, gid);
                        offset += 4;
 
                        if (!BYTES_ARE_IN_FRAME(offset,4)) return;
                        gids_count = EXTRACT_UINT(pd,offset+0);
                        if (tree) {
                                gitem = proto_tree_add_text(tree, offset, 4+gids_count*4,
-                               "gids");
+                               "Auxilliary GIDs");
                                gtree = proto_item_add_subtree(gitem, ETT_RPC_GIDS);
                        }
                        offset += 4;
@@ -521,8 +491,8 @@ dissect_rpc_auth( const u_char *pd, int offset, frame_data *fd, proto_tree *tree
                        for (gids_i = 0 ; gids_i < gids_count ; gids_i++) {
                                gids_entry = EXTRACT_UINT(pd,offset+0);
                                if (gtree)
-                               proto_tree_add_text(gtree, offset, 4, 
-                                       "%u", gids_entry);
+                               proto_tree_add_item(gtree, hf_rpc_auth_gid,
+                                       offset, 4, gids_entry);
                                offset+=4;
                        }
                        /* how can I NOW change the gitem to print a list with
@@ -611,7 +581,7 @@ dissect_rpc( const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
 
        unsigned int xid;
        unsigned int rpcvers;
-       unsigned int prog;
+       unsigned int prog = 0;
        unsigned int vers = 0;
        unsigned int proc = 0;
        int     proto = 0;
@@ -727,15 +697,14 @@ dissect_rpc( const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
 
        xid      = EXTRACT_UINT(pd,offset+0);
        if (rpc_tree) {
-               proto_tree_add_text(rpc_tree,offset+0,4,
-                       "XID: 0x%x (%u)", xid, xid);
+               proto_tree_add_item_format(rpc_tree,hf_rpc_xid,
+                       offset+0, 4, xid, "XID: 0x%x (%u)", xid, xid);
        }
 
        msg_type_name = val_to_str(msg_type,rpc_msg_type,"%u");
        if (rpc_tree) {
-               proto_tree_add_text(rpc_tree,offset+4,4,
-                       "Message Type: %s (%u)",
-                       msg_type_name, msg_type);
+               proto_tree_add_item(rpc_tree, hf_rpc_msgtype,
+                       offset+4, 4, msg_type);
        }
 
        offset += 8;
@@ -749,14 +718,15 @@ dissect_rpc( const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
 
                rpcvers = EXTRACT_UINT(pd,offset+0);
                if (rpc_tree) {
-                       proto_tree_add_text(rpc_tree,offset+0,4,
-                               "RPC Version: %u", rpcvers);
+                       proto_tree_add_item(rpc_tree,
+                               hf_rpc_version, offset+0, 4, rpcvers);
                }
 
                prog = EXTRACT_UINT(pd,offset+4);
                
                if (rpc_tree) {
-                       proto_tree_add_text(rpc_tree,offset+4,4,
+                       proto_tree_add_item_format(rpc_tree,
+                               hf_rpc_program, offset+4, 4, prog,
                                "Program: %s (%u)", progname, prog);
                }
                
@@ -770,8 +740,8 @@ dissect_rpc( const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
                        return TRUE;
                vers = EXTRACT_UINT(pd,offset+8);
                if (rpc_tree) {
-                       proto_tree_add_text(rpc_tree,offset+8,4,
-                               "Program Version: %u",vers);
+                       proto_tree_add_item(rpc_tree,
+                               hf_rpc_programversion, offset+8, 4, vers);
                }
 
                if (!BYTES_ARE_IN_FRAME(offset+12,4))
@@ -795,7 +765,8 @@ dissect_rpc( const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
                        procname = procname_static;
                }
                if (rpc_tree) {
-                       proto_tree_add_text(rpc_tree,offset+12,4,
+                       proto_tree_add_item_format(rpc_tree,
+                               hf_rpc_procedure, offset+12, 4, prog,
                                "Procedure: %s (%u)", procname, proc);
                }
 
@@ -905,12 +876,13 @@ dissect_rpc( const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
                }
 
                if (rpc_tree) {
-                       proto_tree_add_text(rpc_tree,0,0,
-                               "Program: %s (%u)", 
-                               progname, prog);
-                       proto_tree_add_text(rpc_tree,0,0,
-                               "Program Version: %u", vers);
-                       proto_tree_add_text(rpc_tree,0,0,
+                       proto_tree_add_item_format(rpc_tree,
+                               hf_rpc_program, 0, 0, prog,
+                               "Program: %s (%u)", progname, prog);
+                       proto_tree_add_item(rpc_tree,
+                               hf_rpc_programversion, 0, 0, vers);
+                       proto_tree_add_item_format(rpc_tree,
+                               hf_rpc_procedure, 0, 0, prog,
                                "Procedure: %s (%u)", procname, proc);
                }
 
@@ -924,10 +896,8 @@ dissect_rpc( const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
                        return TRUE;
                reply_state = EXTRACT_UINT(pd,offset+0);
                if (rpc_tree) {
-                       proto_tree_add_text(rpc_tree,offset+0, 4,
-                               "Reply State: %s (%u)",
-                               val_to_str(reply_state,rpc_reply_state,"Unknown"),
-                               reply_state);
+                       proto_tree_add_item(rpc_tree, hf_rpc_state_reply,
+                               offset+0, 4, reply_state);
                }
                offset += 4;
 
@@ -937,10 +907,8 @@ dissect_rpc( const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
                                return TRUE;
                        accept_state = EXTRACT_UINT(pd,offset+0);
                        if (rpc_tree) {
-                               proto_tree_add_text(rpc_tree,offset+0, 4,
-                                       "Accept State: %s (%u)", 
-                                       val_to_str(accept_state,rpc_accept_state,"Unknown"),
-                                       accept_state);
+                               proto_tree_add_item(rpc_tree, hf_rpc_state_accept,
+                                       offset+0, 4, accept_state);
                        }
                        offset += 4;
                        switch (accept_state) {
@@ -954,14 +922,12 @@ dissect_rpc( const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
                                        vers_low = EXTRACT_UINT(pd,offset+0);
                                        vers_high = EXTRACT_UINT(pd,offset+4);
                                        if (rpc_tree) {
-                                               proto_tree_add_text(rpc_tree,
-                                                       offset+0, 4,
-                                                       "min. Program Version: %u",
-                                                       vers_low);
-                                               proto_tree_add_text(rpc_tree,
-                                                       offset+4, 4,
-                                                       "max. Program Version: %u",
-                                                       vers_high);
+                                               proto_tree_add_item(rpc_tree,
+                                                       hf_rpc_programversion_min,
+                                                       offset+0, 4, vers_low);
+                                               proto_tree_add_item(rpc_tree,
+                                                       hf_rpc_programversion_max,
+                                                       offset+4, 4, vers_high);
                                        }
                                        offset += 8;
                                break;
@@ -974,9 +940,8 @@ dissect_rpc( const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
                                return TRUE;
                        reject_state = EXTRACT_UINT(pd,offset+0);
                        if (rpc_tree) {
-                               proto_tree_add_text(rpc_tree, offset+0, 4,
-                                       "Reject State: %s (%u)",
-                                       val_to_str(reject_state,rpc_reject_state,"Unknown"),
+                               proto_tree_add_item(rpc_tree,
+                                       hf_rpc_state_reject, offset+0, 4,
                                        reject_state);
                        }
                        offset += 4;
@@ -987,14 +952,12 @@ dissect_rpc( const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
                                vers_low = EXTRACT_UINT(pd,offset+0);
                                vers_high = EXTRACT_UINT(pd,offset+4);
                                if (rpc_tree) {
-                                       proto_tree_add_text(rpc_tree,
-                                               offset+0, 4,
-                                               "min. RPC Version: %u",
-                                               vers_low);
-                                       proto_tree_add_text(rpc_tree,
-                                               offset+4, 4,
-                                               "max. RPC Version: %u",
-                                               vers_high);
+                                       proto_tree_add_item(rpc_tree,
+                                               hf_rpc_version_min,
+                                               offset+0, 4, vers_low);
+                                       proto_tree_add_item(rpc_tree,
+                                               hf_rpc_version_max,
+                                               offset+4, 4, vers_high);
                                }
                                offset += 8;
                        } else if (reject_state==AUTH_ERROR) {
@@ -1002,10 +965,8 @@ dissect_rpc( const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
                                        return TRUE;
                                auth_state = EXTRACT_UINT(pd,offset+0);
                                if (rpc_tree) {
-                                       proto_tree_add_text(rpc_tree,
-                                               offset+0, 4,
-                                               "Authentication error: %s (%u)",
-                                               val_to_str(auth_state,rpc_auth_state,"Unknown"),
+                                       proto_tree_add_item(rpc_tree,
+                                               hf_rpc_state_auth, offset+0, 4,
                                                auth_state);
                                }
                                offset += 4;
@@ -1024,10 +985,19 @@ dissect_rpc_prog:
        /* create here the program specific sub-tree */
        if (tree) {
                pitem = proto_tree_add_item(tree, proto, offset, END_OF_FRAME);
-               if (pitem)
+               if (pitem) {
                        ptree = proto_item_add_subtree(pitem, ett);
                }
 
+               if (ptree) {
+                       proto_tree_add_item(ptree,
+                               hf_rpc_programversion, 0, 0, vers);
+                       proto_tree_add_item_format(ptree,
+                               hf_rpc_procedure, 0, 0, prog,
+                               "Procedure: %s (%u)", procname, proc);
+               }
+       }
+
        /* call a specific dissection */
        if (dissect_function != NULL) {
                offset = dissect_function(pd, offset, fd, ptree);
@@ -1058,32 +1028,62 @@ proto_register_rpc(void)
                        "XID", "rpc.xid", FT_UINT32, BASE_HEX,
                        NULL, 0, "XID" }},
                { &hf_rpc_msgtype, {
-                       "Message Type", "rpc.msgtyp", FT_UINT32, BASE_HEX,
-                       NULL, 0, "Message Type" }},
-               { &hf_rpc_rpcversion, {
-                       "RPC Version", "rpc.version", FT_UINT32, BASE_HEX,
+                       "Message Type", "rpc.msgtyp", FT_UINT32, BASE_DEC,
+                       VALS(rpc_msg_type), 0, "Message Type" }},
+               { &hf_rpc_state_reply, {
+                       "Reply State", "rpc.replystat", FT_UINT32, BASE_DEC,
+                       VALS(rpc_reply_state), 0, "Reply State" }},
+               { &hf_rpc_state_accept, {
+                       "Accept State", "rpc.state_accept", FT_UINT32, BASE_DEC,
+                       VALS(rpc_accept_state), 0, "Accept State" }},
+               { &hf_rpc_state_reject, {
+                       "Reject State", "rpc.state_reject", FT_UINT32, BASE_DEC,
+                       VALS(rpc_reject_state), 0, "Reject State" }},
+               { &hf_rpc_state_auth, {
+                       "Auth State", "rpc.state_auth", FT_UINT32, BASE_DEC,
+                       VALS(rpc_auth_state), 0, "Auth State" }},
+               { &hf_rpc_version, {
+                       "RPC Version", "rpc.version", FT_UINT32, BASE_DEC,
                        NULL, 0, "RPC Version" }},
+               { &hf_rpc_version_min, {
+                       "RPC Version (Minimum)", "rpc.version.min", FT_UINT32, 
+                       BASE_DEC, NULL, 0, "Program Version (Minimum)" }},
+               { &hf_rpc_version_max, {
+                       "RPC Version (Maximum)", "rpc.version.max", FT_UINT32, 
+                       BASE_DEC, NULL, 0, "RPC Version (Maximum)" }},
                { &hf_rpc_program, {
-                       "Program", "rpc.program", FT_UINT32, BASE_HEX,
+                       "Program", "rpc.program", FT_UINT32, BASE_DEC,
                        NULL, 0, "Program" }},
                { &hf_rpc_programversion, {
                        "Program Version", "rpc.programversion", FT_UINT32, 
-                       BASE_HEX, NULL, 0, "Program Version" }},
+                       BASE_DEC, NULL, 0, "Program Version" }},
+               { &hf_rpc_programversion_min, {
+                       "Program Version (Minimum)", "rpc.programversion.min", FT_UINT32, 
+                       BASE_DEC, NULL, 0, "Program Version (Minimum)" }},
+               { &hf_rpc_programversion_max, {
+                       "Program Version (Maximum)", "rpc.programversion.max", FT_UINT32, 
+                       BASE_DEC, NULL, 0, "Program Version (Maximum)" }},
                { &hf_rpc_procedure, {
-                       "Procedure", "rpc.procedure", FT_UINT32, BASE_HEX,
+                       "Procedure", "rpc.procedure", FT_UINT32, BASE_DEC,
                        NULL, 0, "Procedure" }},
-               { &hf_rpc_cred_flavor, {
-                       "Flavor", "rpc.cred.flavor", FT_UINT32, BASE_HEX,
-                       NULL, 0, "Flavor" }},
-               { &hf_rpc_cred_length, {
-                       "Length", "rpc.cred.length", FT_UINT32, BASE_HEX,
-                       NULL, 0, "Length" }},
-               { &hf_rpc_verify_flavor, {
-                       "Flavor", "rpc.verify.flavor", FT_UINT32, BASE_HEX,
-                       NULL, 0, "Flavor" }},
-               { &hf_rpc_verify_length, {
-                       "Length", "rpc.verify.length", FT_UINT32, BASE_HEX,
+               { &hf_rpc_auth_flavor, {
+                       "Flavor", "rpc.auth.flavor", FT_UINT32, BASE_DEC,
+                       VALS(rpc_auth_flavor), 0, "Flavor" }},
+               { &hf_rpc_auth_length, {
+                       "Length", "rpc.auth.length", FT_UINT32, BASE_DEC,
                        NULL, 0, "Length" }},
+               { &hf_rpc_auth_stamp, {
+                       "Stamp", "rpc.auth.stamp", FT_UINT32, BASE_HEX,
+                       NULL, 0, "Stamp" }},
+               { &hf_rpc_auth_uid, {
+                       "UID", "rpc.auth.uid", FT_UINT32, BASE_DEC,
+                       NULL, 0, "UID" }},
+               { &hf_rpc_auth_gid, {
+                       "GID", "rpc.auth.gid", FT_UINT32, BASE_DEC,
+                       NULL, 0, "GID" }},
+               { &hf_rpc_auth_machinename, {
+                       "Machine Name", "rpc.auth.machinename", FT_STRING, 
+                       BASE_DEC, NULL, 0, "Machine Name" }},
        };
 
 
index e204f82cab7e5bd4ff682cf64a2d82784d144a2d..31b8fe4e8912c9409395d8ca6964863dd94ca55a 100644 (file)
@@ -1,5 +1,5 @@
 /* packet-rpc.h (c) 1999 Uwe Girlich */
-/* $Id: packet-rpc.h,v 1.5 1999/11/15 14:17:19 nneul Exp $ */
+/* $Id: packet-rpc.h,v 1.6 1999/11/15 17:16:51 nneul Exp $ */
 
 #ifndef __PACKET_RPC_H__
 #define __PACKET_RPC_H__
@@ -98,8 +98,6 @@ extern void cleanup_dissect_rpc();
 
 extern unsigned int rpc_roundup(unsigned int a);
 extern int dissect_rpc_string(const u_char *pd, int offset, frame_data *fd,
-       proto_tree *tree, char* name);
-extern int dissect_rpc_string_item(const u_char *pd, int offset, frame_data *fd,
        proto_tree *tree, int hfindex);
 extern int dissect_rpc_uint32(const u_char *pd, int offset, frame_data *fd,
        proto_tree *tree, char* name, char* type);
index 03d2fc439b0e82f085731433d8214dcebd9e1024..15b414972bde6b2485a67f29cab5f0f36cdb926a 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-ypserv.c
  * Routines for ypserv dissection
  *
- * $Id: packet-ypserv.c,v 1.4 1999/11/12 15:12:23 nneul Exp $
+ * $Id: packet-ypserv.c,v 1.5 1999/11/15 17:16:51 nneul Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@unicom.net>
@@ -51,7 +51,7 @@ int dissect_domain_call(const u_char *pd, int offset, frame_data *fd,
 {
        if ( tree )
        {
-               offset = dissect_rpc_string_item(pd,offset,fd,tree,hf_ypserv_domain);
+               offset = dissect_rpc_string(pd,offset,fd,tree,hf_ypserv_domain);
        }
        
        return offset;
@@ -78,9 +78,9 @@ int dissect_next_call(const u_char *pd, int offset, frame_data *fd,
 {
        if ( tree )
        {
-               offset = dissect_rpc_string_item(pd,offset,fd,tree,hf_ypserv_domain);
-               offset = dissect_rpc_string_item(pd,offset,fd,tree,hf_ypserv_map);
-               offset = dissect_rpc_string_item(pd,offset,fd,tree,hf_ypserv_key);
+               offset = dissect_rpc_string(pd,offset,fd,tree,hf_ypserv_domain);
+               offset = dissect_rpc_string(pd,offset,fd,tree,hf_ypserv_map);
+               offset = dissect_rpc_string(pd,offset,fd,tree,hf_ypserv_key);
        }
        
        return offset;
@@ -91,8 +91,8 @@ int dissect_first_call(const u_char *pd, int offset, frame_data *fd,
 {
        if ( tree )
        {
-               offset = dissect_rpc_string_item(pd,offset,fd,tree,hf_ypserv_domain);
-               offset = dissect_rpc_string_item(pd,offset,fd,tree,hf_ypserv_map);
+               offset = dissect_rpc_string(pd,offset,fd,tree,hf_ypserv_domain);
+               offset = dissect_rpc_string(pd,offset,fd,tree,hf_ypserv_map);
        }
        
        return offset;
@@ -103,9 +103,9 @@ int dissect_match_call(const u_char *pd, int offset, frame_data *fd,
 {
        if ( tree )
        {
-               offset = dissect_rpc_string_item(pd,offset,fd,tree,hf_ypserv_domain);
-               offset = dissect_rpc_string_item(pd,offset,fd,tree,hf_ypserv_map);
-               offset = dissect_rpc_string_item(pd,offset,fd,tree,hf_ypserv_key);
+               offset = dissect_rpc_string(pd,offset,fd,tree,hf_ypserv_domain);
+               offset = dissect_rpc_string(pd,offset,fd,tree,hf_ypserv_map);
+               offset = dissect_rpc_string(pd,offset,fd,tree,hf_ypserv_key);
        }
        
        return offset;
@@ -122,7 +122,7 @@ int dissect_match_reply(const u_char *pd, int offset, frame_data *fd,
                        offset, 4, pntohl(&pd[offset]));
                offset += 4;
 
-               offset = dissect_rpc_string_item(pd,offset,fd,tree,hf_ypserv_value);
+               offset = dissect_rpc_string(pd,offset,fd,tree,hf_ypserv_value);
        }
        
        return offset;
@@ -139,8 +139,8 @@ int dissect_firstnext_reply(const u_char *pd, int offset, frame_data *fd,
                        offset, 4, pntohl(&pd[offset]));
                offset += 4;
 
-               offset = dissect_rpc_string_item(pd,offset,fd,tree,hf_ypserv_value);
-               offset = dissect_rpc_string_item(pd,offset,fd,tree,hf_ypserv_key);      }
+               offset = dissect_rpc_string(pd,offset,fd,tree,hf_ypserv_value);
+               offset = dissect_rpc_string(pd,offset,fd,tree,hf_ypserv_key);   }
        
        return offset;
 }