From Tim Potter: dissect some of the LSA RPCs stub data.
[obnox/wireshark/wip.git] / packet-nlm.c
index 7232bf1866cda966e2878ed9cebb125bbdbe5192..14a9d5e9f1cb1801427fe5441727b58c763bf570 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-nlm.c
  * Routines for nlm dissection
  *
- * $Id: packet-nlm.c,v 1.18 2001/06/18 02:17:50 guy Exp $
+ * $Id: packet-nlm.c,v 1.21 2001/10/29 21:13:08 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -68,8 +68,11 @@ static int hf_nlm_lock_caller_name = -1;
 static int hf_nlm_lock_owner = -1;
 static int hf_nlm_lock_svid = -1;
 static int hf_nlm_lock_l_offset = -1;
+static int hf_nlm_lock_l_offset64 = -1;
 static int hf_nlm_lock_l_len = -1;
+static int hf_nlm_lock_l_len64 = -1;
 static int hf_nlm_reclaim = -1;
+static int hf_nlm_stat = -1;
 static int hf_nlm_state = -1;
 static int hf_nlm_test_stat = -1;
 static int hf_nlm_test_stat_stat = -1;
@@ -84,7 +87,7 @@ static gint ett_nlm = -1;
 static gint ett_nlm_lock = -1;
 
 
-const value_string names_nlm_state[] =
+const value_string names_nlm_stats[] =
 {
        /* NLM_GRANTED is the function number 5 and the state code 0.
         * So we use for the state the postfix _S.
@@ -171,8 +174,8 @@ dissect_lock(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int version, i
        offset = dissect_rpc_uint32(tvb, pinfo, lock_tree, hf_nlm_lock_svid, offset);
 
        if (version == 4) {
-               offset = dissect_rpc_uint64(tvb, pinfo, lock_tree, hf_nlm_lock_l_offset, offset);
-               offset = dissect_rpc_uint64(tvb, pinfo, lock_tree, hf_nlm_lock_l_len, offset);
+               offset = dissect_rpc_uint64(tvb, pinfo, lock_tree, hf_nlm_lock_l_offset64, offset);
+               offset = dissect_rpc_uint64(tvb, pinfo, lock_tree, hf_nlm_lock_l_len64, offset);
        }
        else {
                offset = dissect_rpc_uint32(tvb, pinfo, lock_tree, hf_nlm_lock_l_offset, offset);
@@ -284,9 +287,9 @@ dissect_nlm_test_res(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
        if (version == 4) {
                offset = dissect_rpc_uint64(tvb, pinfo, lock_tree,
-                   hf_nlm_lock_l_offset, offset);
+                   hf_nlm_lock_l_offset64, offset);
                offset = dissect_rpc_uint64(tvb, pinfo, lock_tree,
-                   hf_nlm_lock_l_len, offset);
+                   hf_nlm_lock_l_len64, offset);
        }
        else {
                offset = dissect_rpc_uint32(tvb, pinfo, lock_tree,
@@ -338,7 +341,7 @@ dissect_nlm_shareres(tvbuff_t *tvb, int offset, packet_info *pinfo,
     proto_tree *tree, int version)
 {
        offset = dissect_rpc_data(tvb, pinfo, tree, hf_nlm_cookie, offset);
-       offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_nlm_state, offset);
+       offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_nlm_stat, offset);
        offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_nlm_sequence, offset);
        return offset;
 }
@@ -350,7 +353,7 @@ dissect_nlm_freeall(tvbuff_t *tvb, int offset, packet_info *pinfo,
        offset = dissect_rpc_string(tvb,pinfo,tree,
                        hf_nlm_share_name, offset, NULL);
 
-       offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_nlm_state, offset);
+       offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_nlm_stat, offset);
 
        return offset;
 }
@@ -365,7 +368,7 @@ dissect_nlm_gen_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
     proto_tree *tree)
 {
        offset = dissect_rpc_data(tvb, pinfo, tree, hf_nlm_cookie, offset);
-       offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_nlm_state, offset);
+       offset = dissect_rpc_uint32(tvb, pinfo, tree, hf_nlm_stat, offset);
        return offset;
 }
 
@@ -707,9 +710,15 @@ proto_register_nlm(void)
                { &hf_nlm_lock_svid, {
                        "svid", "nlm.lock.svid", FT_UINT32, BASE_DEC,
                        NULL, 0, "svid", HFILL }},
+               { &hf_nlm_lock_l_offset64, {
+                       "l_offset", "nlm.lock.l_offset", FT_UINT64, BASE_DEC,
+                       NULL, 0, "l_offset", HFILL }},
                { &hf_nlm_lock_l_offset, {
                        "l_offset", "nlm.lock.l_offset", FT_UINT32, BASE_DEC,
                        NULL, 0, "l_offset", HFILL }},
+               { &hf_nlm_lock_l_len64, {
+                       "l_len", "nlm.lock.l_len", FT_UINT64, BASE_DEC,
+                       NULL, 0, "l_len", HFILL }},
                { &hf_nlm_lock_l_len, {
                        "l_len", "nlm.lock.l_len", FT_UINT32, BASE_DEC,
                        NULL, 0, "l_len", HFILL }},
@@ -718,13 +727,16 @@ proto_register_nlm(void)
                        &yesno, 0, "reclaim", HFILL }},
                { &hf_nlm_state, {
                        "state", "nlm.state", FT_UINT32, BASE_DEC,
-                       VALS(names_nlm_state), 0, "state", HFILL }},
+                       NULL, 0, "STATD state", HFILL }},
+               { &hf_nlm_stat, {
+                       "stat", "nlm.stat", FT_UINT32, BASE_DEC,
+                       VALS(names_nlm_stats), 0, "stat", HFILL }},
                { &hf_nlm_test_stat, {
                        "test_stat", "nlm.test_stat", FT_NONE, 0,
                        NULL, 0, "test_stat", HFILL }},
                { &hf_nlm_test_stat_stat, {
                        "stat", "nlm.test_stat.stat", FT_UINT32, BASE_DEC,
-                       VALS(names_nlm_state), 0, "stat", HFILL }},
+                       VALS(names_nlm_stats), 0, "stat", HFILL }},
                { &hf_nlm_holder, {
                        "holder", "nlm.holder", FT_NONE, 0,
                        NULL, 0, "holder", HFILL }},