1 /* packet-nfs.h (c) 1999 Uwe Girlich */
2 /* $Id: packet-nfs.h,v 1.12 2002/12/02 23:43:28 guy Exp $ */
4 #ifndef __PACKET_NFS_H__
5 #define __PACKET_NFS_H__
7 #include "packet-rpc.h"
9 #define NFS_PROGRAM 100003
14 #define NFS3_COOKIEVERFSIZE 8
15 #define NFS3_CREATEVERFSIZE 8
16 #define NFS3_WRITEVERFSIZE 8
28 * NFSv4 error codes used in code, as opposed to UI
31 #define NFS4ERR_DENIED 10010
32 #define NFS4ERR_CLID_INUSE 10017
45 #define NF4NAMEDATTR 9
48 * Since NFSv4 "operations" are handled differently than previous NFS
49 * versions, these tokens are necessary.
51 #define NFS4_OP_ACCESS 3
52 #define NFS4_OP_CLOSE 4
53 #define NFS4_OP_COMMIT 5
54 #define NFS4_OP_CREATE 6
55 #define NFS4_OP_DELEGPURGE 7
56 #define NFS4_OP_DELEGRETURN 8
57 #define NFS4_OP_GETATTR 9
58 #define NFS4_OP_GETFH 10
59 #define NFS4_OP_LINK 11
60 #define NFS4_OP_LOCK 12
61 #define NFS4_OP_LOCKT 13
62 #define NFS4_OP_LOCKU 14
63 #define NFS4_OP_LOOKUP 15
64 #define NFS4_OP_LOOKUPP 16
65 #define NFS4_OP_NVERIFY 17
66 #define NFS4_OP_OPEN 18
67 #define NFS4_OP_OPENATTR 19
68 #define NFS4_OP_OPEN_CONFIRM 20
69 #define NFS4_OP_OPEN_DOWNGRADE 21
70 #define NFS4_OP_PUTFH 22
71 #define NFS4_OP_PUTPUBFH 23
72 #define NFS4_OP_PUTROOTFH 24
73 #define NFS4_OP_READ 25
74 #define NFS4_OP_READDIR 26
75 #define NFS4_OP_READLINK 27
76 #define NFS4_OP_REMOVE 28
77 #define NFS4_OP_RENAME 29
78 #define NFS4_OP_RENEW 30
79 #define NFS4_OP_RESTOREFH 31
80 #define NFS4_OP_SAVEFH 32
81 #define NFS4_OP_SECINFO 33
82 #define NFS4_OP_SETATTR 34
83 #define NFS4_OP_SETCLIENTID 35
84 #define NFS4_OP_SETCLIENTID_CONFIRM 36
85 #define NFS4_OP_VERIFY 37
86 #define NFS4_OP_WRITE 38
98 extern gboolean nfs_file_name_snooping;
100 /* the RPC mount protocol needs both function to decode a MNT reply */
101 int dissect_fhandle(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
103 int dissect_nfs_fh3(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
106 void nfs_name_snoop_add_name(int xid, tvbuff_t *tvb, int name_offset, int name_len, int parent_offset, int parent_len, unsigned char *name);
109 extern gboolean nfs_fhandle_reqrep_matching;
110 extern GHashTable *nfs_fhandle_frame_table;
111 typedef struct nfs_fhandle_data {
113 const unsigned char *fh;
115 } nfs_fhandle_data_t;
116 void dissect_fhandle_hidden(packet_info *pinfo, proto_tree *tree, nfs_fhandle_data_t *nfd);
118 #endif /* packet-nfs.h */