diff options
author | David Timber <mieabby@gmail.com> | 2020-09-03 11:38:09 +0930 |
---|---|---|
committer | David Timber <mieabby@gmail.com> | 2020-09-03 11:38:09 +0930 |
commit | e81c2636cee72af718e99fd98006fa9277de2a65 (patch) | |
tree | dffb8cb9b8d9f4eb55a55fedc5d63c8a0ef6c4a3 /src/protocol.h | |
parent | f4f959f7842cd9b28500fcd7f506493606376db5 (diff) |
* Impl: CNCP
* [htbt] Use randomly generated number for SOLICIT request
* Die on pth sync funcs only if debug build
* Fix wrong use of pth_mutex_acquire(): use with event can result in failure
* [htbt] Take "blackhole" fd as param
* Remove unused include to reduce compile time
* [htbt] Add const macro values for random msg_id gen
* [resolv] Make prne_resolv_prm_t reusable
* [resolv] Fix mem leak in proone-resolv
* [resolv] Sanity check before returning prm so
users don't have to worry about SEGFAULT
* Add txtrec-*.sh for CNCP
Diffstat (limited to 'src/protocol.h')
-rw-r--r-- | src/protocol.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/protocol.h b/src/protocol.h index ebb6b67..0f2beeb 100644 --- a/src/protocol.h +++ b/src/protocol.h @@ -258,10 +258,14 @@ typedef bool(*prne_htbt_eq_ft)(const void *a, const void *b); typedef prne_htbt_ser_rc_t(*prne_htbt_ser_ft)(uint8_t *mem, const size_t mem_len, size_t *actual, const void *in); typedef prne_htbt_ser_rc_t(*prne_htbt_dser_ft)(const uint8_t *data, const size_t len, size_t *actual, void *out); -#define PRNE_HTBT_PROTO_PORT (uint16_t)64420 -#define PRNE_HTBT_ARGS_MAX 255 // _POSIX_ARG_MAX equiv -#define PRNE_HTBT_ARG_MEM_MAX 1023 -#define PRNE_HTBT_STDIO_LEN_MAX 0x0FFF +#define PRNE_HTBT_MSG_ID_MIN 1 +#define PRNE_HTBT_MSG_ID_MAX INT16_MAX +#define PRNE_HTBT_MSG_ID_DELTA INT16_MAX +#define PRNE_HTBT_PROTO_PORT (uint16_t)64420 +// _POSIX_ARG_MAX equiv +#define PRNE_HTBT_ARGS_MAX 255 +#define PRNE_HTBT_ARG_MEM_MAX 1023 +#define PRNE_HTBT_STDIO_LEN_MAX 0x0FFF /* PRNE_HTBT_PROTO_MIN_BUF * |