X-Git-Url: http://xvm.mit.edu/gitweb/invirt/third/libt4.git/blobdiff_plain/ebd5aef6dc92accb509b1cc67eaf72159f35cdfa..26ade07ab0e62b98b452fbbd18edba0450035e35:/rpc/rpc_protocol.h diff --git a/rpc/rpc_protocol.h b/rpc/rpc_protocol.h index b2fc346..80089ff 100644 --- a/rpc/rpc_protocol.h +++ b/rpc/rpc_protocol.h @@ -44,7 +44,8 @@ namespace rpc_protocol { proc_id_t id; }; - const size_t RPC_HEADER_SZ = max(sizeof(request_header), sizeof(reply_header)) + sizeof(rpc_sz_t); + union header_t { request_header req; reply_header rep; }; + const size_t RPC_HEADER_SZ = sizeof(header_t) + 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 @@ -55,7 +56,4 @@ namespace rpc_protocol { REMOTE_PROCEDURE(1, bind, (nonce_t &)); // handler number reserved for bind } -ENDIAN_SWAPPABLE(rpc_protocol::request_header) -ENDIAN_SWAPPABLE(rpc_protocol::reply_header) - #endif