Add ifndef's to protect libnfs-raw.h from being included multiple times
[deb_libnfs.git] / include / libnfs-private.h
index faa261c37168d881ee33c91e05d0edcf0a5bd43b..d3cd3ec0b647c862460848c38fa57d4f56494e11 100644 (file)
@@ -24,7 +24,10 @@ struct rpc_fragment {
        char *data;
 };
 
+#define RPC_CONTEXT_MAGIC 0xc6e46435
+
 struct rpc_context {
+        uint32_t magic;
        int fd;
        int is_connected;
 
@@ -33,7 +36,7 @@ struct rpc_context {
        rpc_cb connect_cb;
        void *connect_data;
 
-       AUTH *auth;
+       struct AUTH *auth;
        unsigned long xid;
 
        /* buffer used for encoding RPC PDU */
@@ -44,8 +47,8 @@ struct rpc_context {
        struct sockaddr_storage udp_src;
        struct rpc_pdu *waitpdu;
 
-       int inpos;
-       int insize;
+       uint32_t inpos;
+       uint32_t insize;
        char *inbuf;
 
        /* special fields for UDP, which can sometimes be BROADCASTed */
@@ -67,7 +70,7 @@ struct rpc_pdu {
        unsigned long xid;
        ZDR zdr;
 
-       int written;
+       uint32_t written;
        struct rpc_data outdata;
 
        rpc_cb cb;
@@ -76,7 +79,7 @@ struct rpc_pdu {
        /* function to decode the zdr reply data and buffer to decode into */
        zdrproc_t zdr_decode_fn;
        caddr_t zdr_decode_buf;
-       int zdr_decode_bufsize;
+       uint32_t zdr_decode_bufsize;
 };
 
 struct rpc_pdu *rpc_allocate_pdu(struct rpc_context *rpc, int program, int version, int procedure, rpc_cb cb, void *private_data, zdrproc_t zdr_decode_fn, int zdr_bufsize);