[PATCH 16/16] rpc: add helpers for XDR type serialization

Michal Prívozník mprivozn at redhat.com
Thu Mar 9 15:11:53 UTC 2023


On 3/8/23 17:39, Daniel P. Berrangé wrote:
> As preparation for eliminating the use of the XDR library,
> introduce helpers for (de)serializing XDR types from/to
> the virNetMessage object.
> 
> In contrast to the XDR APIs, when encoding data our helpers
> can dynamically resize the virNetMessage buffer. Our decode
> helpers also exhibit delayed error reporting, so that callers
> can deserialize a bunch of data and check for errors once at
> the end.
> 
> Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
> ---
>  src/rpc/virnetmessage.c | 704 ++++++++++++++++++++++++++++++++++++++++
>  src/rpc/virnetmessage.h |  88 +++++
>  2 files changed, 792 insertions(+)

These new symbols should be listed in src/libvirt_remote.syms.
But apparently, you have some more cleanups pending, because none of
these functions you are introducing are used. You can count with my ACK,
but I'd rather not merge it for now, because it's effectively a dead code.

Michal



More information about the libvir-list mailing list