summaryrefslogtreecommitdiffstats
path: root/src/common/protocol_private.h
diff options
context:
space:
mode:
authorGravatar Ramūnas Mažeikis <ramunasnezinomas@gmail.com> 2019-05-22 21:35:46 +0300
committerGravatar Ramūnas Mažeikis <ramunasnezinomas@gmail.com> 2019-05-22 21:35:46 +0300
commit446157d793c30386f994743f5a8e6ab64e66507f (patch)
treef3c2e47ee76088306911deeaf0efc847615f07fa /src/common/protocol_private.h
parent323292cb8a1191e1c74c7d42c6e54f589d8023d1 (diff)
downloadusurpation-446157d793c30386f994743f5a8e6ab64e66507f.tar.gz
usurpation-446157d793c30386f994743f5a8e6ab64e66507f.tar.bz2
usurpation-446157d793c30386f994743f5a8e6ab64e66507f.zip
Protocol: updated docs for functions that survived redesign.
Signed-off-by: Ramūnas Mažeikis <ramunasnezinomas@gmail.com>
Diffstat (limited to 'src/common/protocol_private.h')
-rw-r--r--src/common/protocol_private.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/common/protocol_private.h b/src/common/protocol_private.h
index de086cd..fe28aa0 100644
--- a/src/common/protocol_private.h
+++ b/src/common/protocol_private.h
@@ -3,7 +3,20 @@
#include "protocol_private.h"
+/**
+ * Convenience function that pushes bytes to the end of a packet and reports
+ * potential overflow.
+ *
+ * In case of detected overflow nothing is done to the packet.
+ */
int push_bytes(struct tlv_packet *packet, char *data, size_t size);
+
+/**
+ * Convenience function that forms a tlv header at the end of a packet. Reports
+ * potential overflow.
+ *
+ * In case of detected overflow nothing is done to the packet.
+ */
int push_tlv_header(struct tlv_packet *packet, enum tlv_type type, size_t size);
#endif /* PROTOCOL_PRIVATE_H */ \ No newline at end of file