summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/protocol.c47
-rw-r--r--src/common/protocol_private.h6
2 files changed, 1 insertions, 52 deletions
diff --git a/src/common/protocol.c b/src/common/protocol.c
index 2b4e3bf..5498704 100644
--- a/src/common/protocol.c
+++ b/src/common/protocol.c
@@ -56,57 +56,12 @@ int push_data(enum tlv_type type)
return ret;
}
-static int push_string(struct tlv_packet *packet, const char *str)
-{
- size_t strsize = strlen(str);
- int ret = 0;
-
- if (strsize + packet->offset >= packet->size) {
- ret = E_TLV_OVERFLOW;
- } else {
- memcpy(packet->data, str, strsize);
- }
- return ret;
-}
-
-static int push_fpi1(struct tlv_packet *packet, const char *num)
-{
- int ret = 0;
-
- if (packet->offset + sizeof(fpi1_t) >= packet->size) {
- ret = E_TLV_OVERFLOW;
- } else {
- memcpy(packet->data, num, sizeof(fpi1_t));
- }
- return ret;
-}
-
-static int push_timestamp(struct tlv_packet *packet, const char *data)
-{
- return 0;
-}
-
-static int push_request(struct tlv_packet *packet, const char *data)
-{
- return 0;
-}
-
-static int push_reply(struct tlv_packet *packet, const char *data)
-{
- return 0;
-}
-
-static int push_uuid(struct tlv_packet *packet, const char *data)
-{
- return 0;
-}
-
size_t parse_tlv(const char *data, size_t cursor, struct tlv *t)
{
return 0;
}
-int clear_data()
+void clear_data(struct tlv_packet *packet)
{
return 0;
}
diff --git a/src/common/protocol_private.h b/src/common/protocol_private.h
index a31103a..206046f 100644
--- a/src/common/protocol_private.h
+++ b/src/common/protocol_private.h
@@ -3,12 +3,6 @@
#include "protocol_private.h"
-int push_string(struct tlv_packet *packet, const char *str);
-int push_fpi1(struct tlv_packet *packet, const char *num);
-int push_timestamp(struct tlv_packet *packet, const char *data);
-int push_request(struct tlv_packet *packet, const char *data);
-int push_reply(struct tlv_packet *packet, const char *data);
-int push_uuid(struct tlv_packet *packet, const char *data);
int push_bytes(struct tlv_packet *packet, size_t size);
int push_tlv_header(struct tlv_packet *packet, enum tlv_type type, size_t size);