diff --git a/src/common/protocol.h b/src/common/protocol.h --- a/src/common/protocol.h +++ b/src/common/protocol.h @@ -94,6 +94,7 @@ database */ struct distren_request { uint32_t magic; + /* the length of the data associated with the packet excluding the header */ uint32_t len; /** treat type as an enum distren_request_type using casting */ uint32_t /* enum distren_request_type */ type; @@ -120,6 +121,8 @@ int distren_request_send(struct remoteio /** * initializes and allocates request based on raw input data * which includes the headers of the request. + * + * @return 0 on success, 1 on failure */ int distren_request_new_fromdata(struct distren_request **req, void *data, size_t len);