diff options
author | David Timber <mieabby@gmail.com> | 2020-08-20 12:23:35 +0930 |
---|---|---|
committer | David Timber <mieabby@gmail.com> | 2020-08-20 15:15:57 +0930 |
commit | 76d4d6b2bafada7b790e817b7324d53f3d3a0c7f (patch) | |
tree | d8b3669fa7b167fc3bf764e971fc6e70bd8d9b49 /src/pack.h | |
parent | 7bd3eb3b1ad4209ac4cf4b46f849213d46bc33aa (diff) |
Progress ...
* Move DVault out of executable. Dynamically load it on startup
* Improved testing scheme
* Tidy up prne_*assert* macro series
* Protocol: store host credentials in base64 string. No mask
* Use the lock shm as a shared_global so the stats can persist
* mmap() the executable read-only for later use
Diffstat (limited to 'src/pack.h')
-rw-r--r-- | src/pack.h | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -40,6 +40,17 @@ struct prne_pack_ret { int err; }; +struct prne_stdin_base64_rf_ctx; +typedef struct prne_stdin_base64_rf_ctx prne_stdin_base64_rf_ctx_t; + +struct prne_stdin_base64_rf_ctx { + size_t line_len; + size_t out_len; + char line_buf[78]; + uint8_t out_buf[58]; +}; + + typedef prne_pack_ret_t(*prne_bin_archive_read_ft)(void *ctx, const size_t req, uint8_t *out, size_t *out_len); @@ -53,3 +64,7 @@ ssize_t prne_do_unpack (prne_unpack_ctx_pt ctx, uint8_t *out, const size_t out_l // WARN: uses stdio func char *prne_pack_ret_tostr (const prne_pack_ret_t pr); + +void prne_init_stdin_base64_rf_ctx (prne_stdin_base64_rf_ctx_t *ctx); +void prne_free_stdin_base64_rf_ctx (prne_stdin_base64_rf_ctx_t *ctx); +prne_pack_ret_t prne_stdin_base64_rf (void *ctx, const size_t req, uint8_t *out, size_t *out_len); |