More marshalling simplification
[invirt/third/libt4.git] / rpc / rpc_protocol.h
index 2ef9ab2..8107f04 100644 (file)
@@ -17,6 +17,8 @@ struct request_header {
     MEMBERS(xid, proc, clt_nonce, srv_nonce, xid_rep)
 };
 
+ENDIAN_SWAPPABLE(request_header)
+
 struct reply_header {
     int xid;
     int ret;
@@ -24,6 +26,8 @@ struct reply_header {
     MEMBERS(xid, ret)
 };
 
+ENDIAN_SWAPPABLE(reply_header)
+
 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
 const size_t MAX_PDU = 10<<20; //maximum PDF is 10M