RPC: constrain the 'type buf' to be a Cstruct.t

Signed-off-by: David Scott <dave.scott@citrix.com>