Implement handling of unstable data in WRITE/COMMIT nfs procedures.
[bluesky.git] / nfs3 / nfs3_prot.h
index 1a442ba..ab1125d 100644 (file)
@@ -22,6 +22,8 @@ typedef int int32;
 #define NFS3_CREATEVERFSIZE 8
 #define NFS3_WRITEVERFSIZE 8
 
+extern char nfsd_instance_verf_cookie[NFS3_WRITEVERFSIZE];
+
 typedef char *filename3;
 
 typedef char *nfspath3;
@@ -657,6 +659,16 @@ typedef struct {
     /* Mutex protecting send operations on the socket (to ensure that replies
      * are not accidentally interleaved). */
     GMutex *send_lock;
+
+    /* Is this a UDP connection? */
+    gboolean udp_transport;
+
+    /* For UDP connections only, the address of the sender. */
+    struct sockaddr_in peer;
+
+    /* For UDP only, a buffer for accumulating the full contents of a message
+     * before it is sent */
+    GString *sendbuf;
 } RPCConnection;
 
 /* Linked list of cleanup functions to call when a request is completed. */
@@ -834,6 +846,8 @@ extern  bool_t xdr_commit3args (XDR *, commit3args*);
 extern  bool_t xdr_commit3resok (XDR *, commit3resok*);
 extern  bool_t xdr_commit3res (XDR *, commit3res*);
 
+extern void xdr_string_create(XDR *xdrs, GString *string, enum xdr_op op);
+
 #ifdef __cplusplus
 }
 #endif