11 #ifndef _gcs_act_proto_h_
12 #define _gcs_act_proto_h_
16 #include <galerautils.h>
18 typedef uint8_t gcs_proto_t;
21 #define GCS_ACT_PROTO_MAX 0
30 unsigned long frag_no;
31 gcs_act_type_t act_type;
39 gcs_act_proto_write (
gcs_act_frag_t* frag,
void* buf,
size_t buf_len);
44 gcs_act_proto_read (
gcs_act_frag_t* frag,
const void* buf,
size_t buf_len);
51 gcs_act_proto_inc (
void* buf)
53 uint32_t frag_no = gtohl(((uint32_t*)buf)[3]) + 1;
54 #ifdef GCS_DEBUG_PROTO
55 if (!frag_no)
return -EOVERFLOW;
57 ((uint32_t*)buf)[3] = htogl(frag_no);
63 gcs_act_proto_hdr_size (
long version);
67 gcs_act_proto_ver (
void* buf)
69 return *((uint8_t*)buf);
Definition: gcs_act_proto.h:24