2020-11-21 20:21:18 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
#include <stddef.h>
|
|
|
|
|
|
2021-06-23 14:22:18 +02:00
|
|
|
struct client_string {
|
2020-11-21 20:21:18 +01:00
|
|
|
uint16_t len;
|
2021-06-23 14:22:18 +02:00
|
|
|
/* char str[static len]; */
|
2020-11-21 20:21:18 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct client_data {
|
2021-06-23 14:22:18 +02:00
|
|
|
bool hold:1;
|
|
|
|
|
bool no_wait:1;
|
2021-10-28 17:51:44 -07:00
|
|
|
bool xdga_token:1;
|
|
|
|
|
uint8_t reserved:5;
|
2020-11-21 20:21:18 +01:00
|
|
|
|
2021-10-28 17:51:44 -07:00
|
|
|
uint8_t token_len;
|
2020-11-21 20:21:18 +01:00
|
|
|
uint16_t cwd_len;
|
2021-06-23 14:22:18 +02:00
|
|
|
uint16_t override_count;
|
2020-11-21 20:21:18 +01:00
|
|
|
uint16_t argc;
|
2022-04-11 12:19:40 +02:00
|
|
|
uint16_t env_count;
|
2020-11-21 20:21:18 +01:00
|
|
|
|
2020-11-21 20:48:31 +01:00
|
|
|
/* char cwd[static cwd_len]; */
|
2021-10-28 17:51:44 -07:00
|
|
|
/* char token[static token_len]; */
|
2021-06-23 14:22:18 +02:00
|
|
|
/* struct client_string overrides[static override_count]; */
|
|
|
|
|
/* struct client_string argv[static argc]; */
|
2022-04-11 12:19:40 +02:00
|
|
|
/* struct client_string envp[static env_count]; */
|
2021-06-23 14:22:18 +02:00
|
|
|
} __attribute__((packed));
|
2020-11-21 20:21:18 +01:00
|
|
|
|
2022-04-11 12:19:40 +02:00
|
|
|
_Static_assert(sizeof(struct client_data) == 10, "protocol struct size error");
|