Modified signature of get_size

- Added error reporting
- Changed name
Made message size union public
Added cmd_req packing