aboutsummaryrefslogtreecommitdiff
path: root/kms/kms_shared.h
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2023-11-12 10:55:02 +0100
committerdec05eba <dec05eba@protonmail.com>2023-11-12 10:55:02 +0100
commit290db495ff81d2af965198a8892c8f49b9d6daf7 (patch)
treebc6e26e299d920fe23cb5655e53ca8a331a394a4 /kms/kms_shared.h
parent1ac862d155e10f050e6f6cca5381f9f5a3528d98 (diff)
kms client/server: replace unix domain socket file with socketpair after connecting (fixes issue of .gsr-kms-socket files remaining in $HOME)
Diffstat (limited to 'kms/kms_shared.h')
-rw-r--r--kms/kms_shared.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/kms/kms_shared.h b/kms/kms_shared.h
index 7e326dc..b72d75d 100644
--- a/kms/kms_shared.h
+++ b/kms/kms_shared.h
@@ -4,9 +4,11 @@
#include <stdint.h>
#include <stdbool.h>
+#define GSR_KMS_PROTOCOL_VERSION 1
#define GSR_KMS_MAX_PLANES 32
typedef enum {
+ KMS_REQUEST_TYPE_REPLACE_CONNECTION,
KMS_REQUEST_TYPE_GET_KMS
} gsr_kms_request_type;
@@ -19,7 +21,9 @@ typedef enum {
} gsr_kms_result;
typedef struct {
- int type; /* gsr_kms_request_type */
+ uint32_t version; /* GSR_KMS_PROTOCOL_VERSION */
+ int type; /* gsr_kms_request_type */
+ int new_connection_fd;
} gsr_kms_request;
typedef struct {
@@ -40,7 +44,8 @@ typedef struct {
} gsr_kms_response_fd;
typedef struct {
- int result; /* gsr_kms_result */
+ uint32_t version; /* GSR_KMS_PROTOCOL_VERSION */
+ int result; /* gsr_kms_result */
char err_msg[128];
gsr_kms_response_fd fds[GSR_KMS_MAX_PLANES];
int num_fds;