chiark / gitweb /
sd-bus: move packet header definition to bus-protocol.h
[elogind.git] / src / libsystemd / sd-bus / bus-protocol.h
index 75c6ded7285b7efaa14119310c093e8188d84b79..6431dfbff847aea1232de15ca20203e2281f3a07 100644 (file)
 
 #include <endian.h>
 
+/* Packet header */
+
+struct bus_header {
+        uint8_t endian;
+        uint8_t type;
+        uint8_t flags;
+        uint8_t version;
+        uint32_t body_size;
+
+        /* Note that what the bus spec calls "serial" we'll call
+        "cookie" instead, because we don't want to imply that the
+        cookie was in any way monotonically increasing. */
+        uint32_t serial;
+        uint32_t fields_size;
+} _packed_;
+
 /* Endianness */
 
 enum {