From 2c001e655002ee713457342197a7005217cd16b4 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 26 Jun 2019 14:40:30 +0200 Subject: Add a 16-bit XDR variant --- include/object/xdr16input.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 include/object/xdr16input.h (limited to 'include/object/xdr16input.h') diff --git a/include/object/xdr16input.h b/include/object/xdr16input.h new file mode 100644 index 0000000..66b2c56 --- /dev/null +++ b/include/object/xdr16input.h @@ -0,0 +1,27 @@ +#ifndef XDRINPUT_H +#define XDRINPUT_H + +#include + +class XDRInput { + private: + XDRInput(const XDRInput& copy); + char *data; + uint32_t pos; + + public: + XDRInput(char *d) : pos(0) { data = d; } + uint16_t get_uint16(); + int16_t get_int16(); + uint32_t get_uint32(); + int32_t get_int32(); + uint64_t get_uint64(); + int64_t get_int64(); + float get_float(); + double get_double(); + uint16_t get_opaque_length(); + char* get_opaque(uint16_t length); + void get_string(char *target); +}; + +#endif -- cgit v1.2.3