Permalink
Browse files

Merge branch 'zdr'

Manually fixyp some merge conflicts in :
	lib/init.c
	lib/pdu.c
	lib/socket.c
	nfs/Makefile.am
	nfs/nfs.x
	nlm/Makefile.am
  • Loading branch information...
2 parents dedc467 + aab6538 commit f816bf4c7641071d83ed2c796c93ce0ddba9b3b4 @sahlberg committed Nov 28, 2012
@@ -35,6 +35,7 @@
#include <stdint.h>
#include <sys/types.h>
#include <unistd.h>
+#include "libnfs-zdr.h"
#include "libnfs.h"
#include "libnfs-raw.h"
#include "libnfs-raw-mount.h"
@@ -30,8 +30,10 @@
#include <sys/time.h>
#include <net/if.h>
#include <netdb.h>
+#include "libnfs-zdr.h"
#include "libnfs.h"
#include "libnfs-raw.h"
+#include "libnfs-private.h"
#include "libnfs-raw-mount.h"
#include "libnfs-raw-portmap.h"
@@ -20,6 +20,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include "libnfs-zdr.h"
#include "libnfs.h"
@@ -30,6 +30,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <netinet/in.h>
+#include "libnfs-zdr.h"
#include "libnfs.h"
#include "libnfs-raw.h"
#include "libnfs-raw-mount.h"
@@ -45,6 +45,7 @@ WSADATA wsaData;
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
+#include "libnfs-zdr.h"
#include "libnfs.h"
#include <rpc/rpc.h> /* for authunix_create() */
#include <popt.h>
@@ -14,8 +14,9 @@
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#include <rpc/xdr.h>
-#include <rpc/auth.h>
+#include <sys/socket.h> /* struct sockaddr_storage */
+
+#include "libnfs-zdr.h"
struct rpc_fragment {
struct rpc_fragment *next;
@@ -35,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 */
@@ -46,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,21 +68,21 @@ struct rpc_pdu {
struct rpc_pdu *next;
unsigned long xid;
- XDR xdr;
+ ZDR zdr;
- int written;
+ uint32_t written;
struct rpc_data outdata;
rpc_cb cb;
void *private_data;
- /* function to decode the xdr reply data and buffer to decode into */
- xdrproc_t xdr_decode_fn;
- caddr_t xdr_decode_buf;
- int xdr_decode_bufsize;
+ /* function to decode the zdr reply data and buffer to decode into */
+ zdrproc_t zdr_decode_fn;
+ caddr_t zdr_decode_buf;
+ 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, xdrproc_t xdr_decode_fn, int xdr_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);
void rpc_free_pdu(struct rpc_context *rpc, struct rpc_pdu *pdu);
int rpc_queue_pdu(struct rpc_context *rpc, struct rpc_pdu *pdu);
int rpc_get_pdu_size(char *buf);
@@ -20,8 +20,6 @@
* protocol as well as the XDR encoded/decoded structures.
*/
#include <stdint.h>
-#include <rpc/rpc.h>
-#include <rpc/auth.h>
struct rpc_data {
int size;
@@ -32,7 +30,7 @@ struct rpc_context;
struct rpc_context *rpc_init_context(void);
void rpc_destroy_context(struct rpc_context *rpc);
-void rpc_set_auth(struct rpc_context *rpc, AUTH *auth);
+void rpc_set_auth(struct rpc_context *rpc, struct AUTH *auth);
int rpc_get_fd(struct rpc_context *rpc);
int rpc_which_events(struct rpc_context *rpc);
@@ -160,7 +158,7 @@ int rpc_pmap_unset_async(struct rpc_context *rpc, int program, int version, int
* RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
* data is NULL.
*/
-int rpc_pmap_callit_async(struct rpc_context *rpc, int program, int version, int procedure, const char *data, int datalen, rpc_cb cb, void *private_data);
+int rpc_pmap_callit_async(struct rpc_context *rpc, int program, int version, int procedure, char *data, int datalen, rpc_cb cb, void *private_data);
/*
* MOUNT FUNCTIONS
Oops, something went wrong.

0 comments on commit f816bf4

Please sign in to comment.