[pnfs] yet another attempt for wireshark patches
J. Bruce Fields
bfields at fieldses.org
Fri Jun 20 18:13:26 EDT 2008
> epan/dissectors/packet-nfs.c | 33 ++++++++++++---------------------
> 1 files changed, 12 insertions(+), 21 deletions(-)
>
> diff --git a/epan/dissectors/packet-nfs.c b/epan/dissectors/packet-nfs.c
> index ffaef77..34b4612 100644
> --- a/epan/dissectors/packet-nfs.c
> +++ b/epan/dissectors/packet-nfs.c
> @@ -7122,16 +7122,21 @@ static const value_string names_nfsv4_operation[] = {
> { NFS4_OP_EXCHANGE_ID, "EXCHANGE_ID" },
> { NFS4_OP_CREATE_SESSION, "CREATE_SESSION" },
> { NFS4_OP_DESTROY_SESSION, "DESTROY_SESSION" },
> - { NFS4_OP_SEQUENCE, "SEQUENCE" },
> + { NFS4_OP_DESTROY_SESSION, "DESTROY_SESSION" },
> + { NFS4_OP_FREE_STATEID, "FREE_STATEID"},
> + { NFS4_OP_GET_DIR_DELEGATION, "GET_DIR_DELEGATION"},
I've fixed up the extra DESTROY_SESSION.
Also this references a bunch of defines that don't get added later.
I also combined "removed obsolete function dissect_nfs_notifydsargs4"
with this patch, and removed a few other definitions obsoleted by
removal of this stuff; diff between your version of the patch and mine
follows.
--b.
diff --git a/epan/dissectors/packet-nfs.c b/epan/dissectors/packet-nfs.c
index 3bd89ca..63a41c8 100644
--- a/epan/dissectors/packet-nfs.c
+++ b/epan/dissectors/packet-nfs.c
@@ -368,7 +368,6 @@ static int hf_nfs_deviceidx4 = -1;
static int hf_nfs_layout4 = -1;
static int hf_nfs_stripedevs4 = -1;
static int hf_nfs_devaddr4 = -1;
-static int hf_nfs_notifydsop4 = -1;
static int hf_nfs_return_on_close4 = -1;
static int hf_nfs_slotid4 = -1;
static int hf_nfs_sr_status4 = -1;
@@ -534,12 +533,10 @@ static gint ett_nfs_layoutcommit4 = -1;
static gint ett_nfs_layoutreturn4 = -1;
static gint ett_nfs_getdevinfo4 = -1;
static gint ett_nfs_getdevlist4 = -1;
-static gint ett_nfs_notifyds4 = -1;
static gint ett_nfs_exchange_id4 = -1;
static gint ett_nfs_create_session4 = -1;
static gint ett_nfs_destroy_session4 = -1;
static gint ett_nfs_sequence4 = -1;
-static gint ett_nfs_pnfs_create4 = -1;
static gint ett_nfs_slotid4 = -1;
static gint ett_nfs_sr_status4 = -1;
static gint ett_nfs_serverscope4 = -1;
@@ -7126,7 +7123,6 @@ static const value_string names_nfsv4_operation[] = {
{ NFS4_OP_EXCHANGE_ID, "EXCHANGE_ID" },
{ NFS4_OP_CREATE_SESSION, "CREATE_SESSION" },
{ NFS4_OP_DESTROY_SESSION, "DESTROY_SESSION" },
- { NFS4_OP_DESTROY_SESSION, "DESTROY_SESSION" },
{ NFS4_OP_FREE_STATEID, "FREE_STATEID"},
{ NFS4_OP_GET_DIR_DELEGATION, "GET_DIR_DELEGATION"},
{ NFS4_OP_GETDEVINFO, "GETDEVINFO"},
@@ -7203,9 +7199,6 @@ gint *nfsv4_operation_ett[] =
NULL,
NULL,
NULL,
- NULL,
- &ett_nfs_notifyds4,
- &ett_nfs_pnfs_create4
};
static int
@@ -7921,49 +7914,6 @@ dissect_rpc_secparms4(tvbuff_t *tvb, int offset, proto_tree *tree)
}
static int
-dissect_nfs_notifydsargs4(tvbuff_t *tvb, int offset, proto_tree *tree)
-{
-
- guint op;
-
- op = tvb_get_ntohl(tvb, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_nfs_notifydsop4, offset);
- switch(op) {
- case 0: { /* ADDSTATE */
- guint count, i;
- offset = dissect_rpc_uint64(tvb, tree, hf_nfs_clientid4, offset);
-
- proto_tree_add_text(tree, tvb, offset, 0, "filehandle: %s",
- tvb_bytes_to_str(tvb, offset, 16));
- offset += 16;
-
- count = tvb_get_ntohl(tvb, offset);
- offset += 4;
- for (i = 0; i < count; i++) {
- offset = dissect_nfs_stateid4(tvb, offset, tree);
- }
- break;
- }
- case 1: { /* DELSTATE */
- guint count, i;
- count = tvb_get_ntohl(tvb, offset);
- offset += 4;
- for (i = 0; i < count; i++) {
- offset = dissect_nfs_stateid4(tvb, offset, tree);
- }
- break;
- }
- case 2: /* DELCLIENT */
- offset = dissect_rpc_uint64(tvb, tree, hf_nfs_clientid4, offset);
- break;
- default:
- break;
- }
-
- return offset;
-}
-
-static int
dissect_nfs_layout(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
guint layout_type;
@@ -8911,13 +8861,6 @@ static const value_string names_nfs_nfsstat[] = {
{ 0, NULL }
};
-static const value_string notifydsop_names[] = {
- { 0, "ADD_STATE" },
- { 1, "DEL_STATE" },
- { 2, "DEL_CLIENT" },
- { 0, NULL }
-};
-
static const value_string iomode_names[] = {
{ 1, "IOMODE_READ"},
{ 2, "IOMODE_RW"},
@@ -10147,10 +10090,6 @@ proto_register_nfs(void)
"device addr", "nfs.devaddr", FT_BYTES, BASE_DEC,
NULL, 0, NULL, HFILL }},
- { &hf_nfs_notifydsop4, {
- "NotifyDS op", "nfs.notifydsop", FT_UINT32, BASE_DEC,
- VALS(notifydsop_names), 0, NULL, HFILL }},
-
{ &hf_nfs_return_on_close4, {
"return on close?", "nfs.retclose4", FT_BOOLEAN, BASE_NONE,
TFS(&tfs_yes_no), 0, NULL, HFILL }},
@@ -10380,8 +10319,6 @@ proto_register_nfs(void)
&ett_nfs_layoutreturn4,
&ett_nfs_getdevinfo4,
&ett_nfs_getdevlist4,
- &ett_nfs_notifyds4,
- &ett_nfs_pnfs_create4,
&ett_nfs_illegal4,
&ett_nfs_verifier4,
&ett_nfs_opaque,
diff --git a/epan/dissectors/packet-nfs.h b/epan/dissectors/packet-nfs.h
index b569341..4bac958 100644
--- a/epan/dissectors/packet-nfs.h
+++ b/epan/dissectors/packet-nfs.h
@@ -105,19 +105,25 @@
#define NFS4_OP_WRITE 38
#define NFS4_OP_RELEASE_LOCKOWNER 39
/* Minor version 1 */
+#define NFS4_OP_BACKCHANNEL_CTL 40
+#define NFS4_OP_BIND_CONN_TO_SESSION 41
#define NFS4_OP_EXCHANGE_ID 42
#define NFS4_OP_CREATE_SESSION 43
#define NFS4_OP_DESTROY_SESSION 44
+#define NFS4_OP_FREE_STATEID 45
+#define NFS4_OP_GET_DIR_DELEGATION 46
#define NFS4_OP_GETDEVINFO 47
#define NFS4_OP_GETDEVLIST 48
#define NFS4_OP_LAYOUTCOMMIT 49
#define NFS4_OP_LAYOUTGET 50
#define NFS4_OP_LAYOUTRETURN 51
+#define NFS4_OP_SECINFO_NO_NAME 52
#define NFS4_OP_SEQUENCE 53
-#define NFS4_OP_NOTIFYDS 60
-#define NFS4_OP_PNFS_CREATE 61
-#define NFS4_OP_PNFS_WRITE 62
-#define NFS4_OP_PNFS_READ 63
+#define NFS4_OP_SET_SSV 54
+#define NFS4_OP_TEST_STATEID 55
+#define NFS4_OP_WANT_DELEGATION 56
+#define NFS4_OP_DESTROY_CLIENTID 57
+#define NFS4_OP_RECLAIM_COMPLETE 58
#define NFS4_OP_ILLEGAL 10044
More information about the pNFS
mailing list