From 2b2eb7556424c2b85668f44c49602370bb6014ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ram=C5=ABnas=20Ma=C5=BEeikis?= Date: Tue, 28 May 2019 20:58:44 +0300 Subject: Protocol: renamed functions to fit the "namespace". MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ramūnas Mažeikis --- include/protocol.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'include/protocol.h') diff --git a/include/protocol.h b/include/protocol.h index 6d8bbd9..e15ef6a 100644 --- a/include/protocol.h +++ b/include/protocol.h @@ -113,14 +113,13 @@ struct tlv_parser { size_t size; }; - /** * Fills tlv structure to represent the next tlv in the packet. * * Returns END_OF_PACKET if all tlv's were read of E_TLV_OVERFLOW, if the last * tlv, according to its declared size should not fit in a packet. */ -int get_tlv(struct tlv_parser *parser, struct tlv *ret); +int tlv_get(struct tlv_parser *parser, struct tlv *ret); /** * Appends data to the next packet to be sent. Type of data is determined by @@ -133,17 +132,17 @@ int get_tlv(struct tlv_parser *parser, struct tlv *ret); * Overflow can be detected after forming tlv header. This means that the * packet may have changes. * */ -int push_data(struct tlv_packet *packet, enum tlv_type type, char *data); +int tlv_push_data(struct tlv_packet *packet, enum tlv_type type, char *data); /** * Resets offset to 0 and set entire buffer to 0. */ -void clear_data(struct tlv_packet *packet); +void tlv_clear_data(struct tlv_packet *packet); /** * Initialises tlv to sane values. */ -void tlv_init(struct tlv *t); +void tlv_init(struct tlv *t, enum tlv_type type); /** * Frees data held in the tlv structure. The structure itself shall be freed as -- cgit v1.2.3