rpc: Use predefined structures for parsing rpc headers

Signed-off-by: Pawel Dziepak <pdziepak@quarnos.org>