mirror of
https://github.com/systemd/systemd.git
synced 2024-11-02 10:51:20 +03:00
sd-bus: move packet header definition to bus-protocol.h
This commit is contained in:
parent
46bcf49291
commit
22d097a6bb
@ -52,20 +52,6 @@ struct bus_container {
|
|||||||
char *peeked_signature;
|
char *peeked_signature;
|
||||||
};
|
};
|
||||||
|
|
||||||
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_;
|
|
||||||
|
|
||||||
struct bus_body_part {
|
struct bus_body_part {
|
||||||
struct bus_body_part *next;
|
struct bus_body_part *next;
|
||||||
void *data;
|
void *data;
|
||||||
|
@ -23,6 +23,22 @@
|
|||||||
|
|
||||||
#include <endian.h>
|
#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 */
|
/* Endianness */
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
Loading…
Reference in New Issue
Block a user