8 #define PB_SOCKET_PATH "/tmp/petitboot.ui"
10 #define PB_PROTOCOL_MAX_PAYLOAD_SIZE 4096
12 enum pb_protocol_action {
13 PB_PROTOCOL_ACTION_ADD = 0x1,
14 PB_PROTOCOL_ACTION_REMOVE = 0x2,
17 struct pb_protocol_message {
29 struct list boot_options;
37 char *boot_image_file;
41 struct list_item list;
44 int pb_protocol_device_len(struct device *dev);
46 int pb_protocol_serialise_string(char *pos, const char *str);
47 char *pb_protocol_deserialise_string(void *ctx,
48 struct pb_protocol_message *message);
50 int pb_protocol_serialise_device(struct device *dev, char *buf, int buf_len);
52 int pb_protocol_write_message(int fd, struct pb_protocol_message *message);
54 struct pb_protocol_message *pb_protocol_create_message(void *ctx,
55 enum pb_protocol_action action, int payload_len);
57 struct pb_protocol_message *pb_protocol_read_message(void *ctx, int fd);
59 struct device *pb_protocol_deserialise_device(void *ctx,
60 struct pb_protocol_message *message);
62 #endif /* _PB_PROTOCOL_H */