#define marshall_h
#include "types.h"
+#include "rpc_protocol.h"
// for structs or classes containing a MEMBERS declaration
class marshall;
#define MARSHALL_RAW_NETWORK_ORDER(_c_) MARSHALL_RAW_NETWORK_ORDER_AS(_c_, _c_)
-using proc_t = uint32_t;
-using status_t = int32_t;
-
-struct request_header {
- int xid;
- proc_t proc;
- unsigned int clt_nonce;
- unsigned int srv_nonce;
- int xid_rep;
-
- MEMBERS(xid, proc, clt_nonce, srv_nonce, xid_rep)
-};
-
FORWARD_MARSHALLABLE(request_header)
ENDIAN_SWAPPABLE(request_header)
-struct reply_header {
- int xid;
- int ret;
-
- MEMBERS(xid, ret)
-};
-
FORWARD_MARSHALLABLE(reply_header)
ENDIAN_SWAPPABLE(reply_header)
-typedef int rpc_sz_t;
-
-const size_t RPC_HEADER_SZ = max(sizeof(request_header), sizeof(reply_header)) + sizeof(rpc_sz_t);
-const size_t DEFAULT_RPC_SZ = 1024; // size of initial buffer allocation
-
// Template parameter pack expansion is not allowed in certain contexts, but
// brace initializers (for instance, calls to constructors of empty structs)
// are fair game.