X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fsptps.h;h=5d567116a87e14a6a37cea2011b5c9c9127f5851;hb=refs%2Fheads%2Ffeature%2Fmmsg;hp=c91d3882b428d09ea5c4d4f9154941a83a0727ed;hpb=f75cd07acd98c80464a0f4a9db1eac853ea0a32b;p=meshlink diff --git a/src/sptps.h b/src/sptps.h index c91d3882..5d567116 100644 --- a/src/sptps.h +++ b/src/sptps.h @@ -53,7 +53,7 @@ typedef struct sptps { // Main member variables char *inbuf; - size_t buflen; + size_t inbuflen; chacha_poly1305_ctx_t *incipher; uint32_t replaywin; @@ -61,6 +61,9 @@ typedef struct sptps { uint32_t received; uint16_t reclen; + char *outbuf; + size_t outbuflen; + chacha_poly1305_ctx_t *outcipher; uint32_t outseqno; @@ -96,5 +99,6 @@ extern bool sptps_send_record(sptps_t *s, uint8_t type, const void *data, uint16 extern bool sptps_receive_data(sptps_t *s, const void *data, size_t len) __attribute__((__warn_unused_result__)); extern bool sptps_force_kex(sptps_t *s) __attribute__((__warn_unused_result__)); extern bool sptps_verify_datagram(sptps_t *s, const void *data, size_t len) __attribute__((__warn_unused_result__)); +extern void sptps_set_send_buffer(sptps_t *s, void *data, size_t len); #endif