repositories
/
deb_libnfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove all [s]size_t / off_t and replace with [u]int64_t making libnfs 64-bit pure
[deb_libnfs.git]
/
include
/
libnfs-private.h
diff --git
a/include/libnfs-private.h
b/include/libnfs-private.h
index 4c8594c72452a2c7903cd4070b7863af12801dc7..b1fe13480dac57570d5c39c17f62706a0926cf45 100644
(file)
--- a/
include/libnfs-private.h
+++ b/
include/libnfs-private.h
@@
-17,6
+17,12
@@
#include <rpc/xdr.h>
#include <rpc/auth.h>
#include <rpc/xdr.h>
#include <rpc/auth.h>
+struct rpc_fragment {
+ struct rpc_fragment *next;
+ uint64_t size;
+ char *data;
+};
+
struct rpc_context {
int fd;
int is_connected;
struct rpc_context {
int fd;
int is_connected;
@@
-45,6
+51,13
@@
struct rpc_context {
int is_udp;
struct sockaddr *udp_dest;
int is_broadcast;
int is_udp;
struct sockaddr *udp_dest;
int is_broadcast;
+
+ /* track the address we connect to so we can auto-reconnect on session failure */
+ struct sockaddr_storage s;
+ int auto_reconnect;
+
+ /* fragment reassembly */
+ struct rpc_fragment *fragments;
};
struct rpc_pdu {
};
struct rpc_pdu {
@@
-85,3
+98,9
@@
int rpc_set_udp_destination(struct rpc_context *rpc, char *addr, int port, int i
struct rpc_context *rpc_init_udp_context(void);
struct sockaddr *rpc_get_recv_sockaddr(struct rpc_context *rpc);
struct rpc_context *rpc_init_udp_context(void);
struct sockaddr *rpc_get_recv_sockaddr(struct rpc_context *rpc);
+void rpc_set_autoreconnect(struct rpc_context *rpc);
+void rpc_unset_autoreconnect(struct rpc_context *rpc);
+
+int rpc_add_fragment(struct rpc_context *rpc, char *data, uint64_t size);
+void rpc_free_all_fragments(struct rpc_context *rpc);
+