diff options
author | 2019-05-28 20:58:44 +0300 | |
---|---|---|
committer | 2019-05-28 20:58:44 +0300 | |
commit | 2b2eb7556424c2b85668f44c49602370bb6014ec (patch) | |
tree | 9b247114b4185ba463d4d3e9fbbdc8ac9be2616e /src/common | |
parent | afef44b519153463838ed54327f1b7fca184d97d (diff) | |
download | usurpation-2b2eb7556424c2b85668f44c49602370bb6014ec.tar.gz usurpation-2b2eb7556424c2b85668f44c49602370bb6014ec.tar.bz2 usurpation-2b2eb7556424c2b85668f44c49602370bb6014ec.zip |
Protocol: renamed functions to fit the "namespace".
Signed-off-by: Ramūnas Mažeikis <ramunasnezinomas@gmail.com>
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/protocol.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/common/protocol.c b/src/common/protocol.c index edaf491..3f7bd24 100644 --- a/src/common/protocol.c +++ b/src/common/protocol.c @@ -32,7 +32,8 @@ #include "net.h" #include "utils.h" -int push_tlv(struct tlv_packet *packet, enum tlv_type type, char *data) +#if 0 +int tlv_push(struct tlv_packet *packet, enum tlv_type type, char *data) { int ret = 0; size_t size; @@ -64,7 +65,9 @@ int push_tlv(struct tlv_packet *packet, enum tlv_type type, char *data) return ret; } -void clear_data(struct tlv_packet *packet) +#endif + +void tlv_clear_data(struct tlv_packet *packet) { packet->offset = 0; packet->type = 0; @@ -98,7 +101,7 @@ static int push_tlv_header(struct tlv_packet *packet, enum tlv_type type, size_t return ret; } -int get_tlv(struct tlv_parser *parser, struct tlv *ret) +int tlv_get(struct tlv_parser *parser, struct tlv *ret) { int ret = 0; @@ -157,9 +160,9 @@ int tlv_push(struct tlv *t, const char *data, size_t size) return ret; } -void tlv_init(struct tlv *t) +void tlv_init(struct tlv *t, enum tlv_type type) { - t->type = TEXT; + t->type = type; t->length = 0; t->data = NULL; }
\ No newline at end of file |