diff options
-rw-r--r-- | src/common/protocol.c | 22 | ||||
-rw-r--r-- | src/common/protocol_private.h | 16 |
2 files changed, 18 insertions, 20 deletions
diff --git a/src/common/protocol.c b/src/common/protocol.c index 58a70f6..a7cb84f 100644 --- a/src/common/protocol.c +++ b/src/common/protocol.c @@ -55,37 +55,32 @@ int push_data(enum tlv_type type) return ret; } -static int push_string(const char *str) +static int push_string(struct tlv_packet *packet, const char *str) { return 0; } -static int push_fpi1(const char *num) +static int push_fpi1(struct tlv_packet *packet, const char *num) { return 0; } -static int push_timestamp(const char *data) +static int push_timestamp(struct tlv_packet *packet, const char *data) { return 0; } -static int push_request(const char *data) +static int push_request(struct tlv_packet *packet, const char *data) { return 0; } -static int push_reply(const char *data) +static int push_reply(struct tlv_packet *packet, const char *data) { return 0; } -static int push_uuid(const char *data) -{ - return 0; -} - -size_t tlv_count(const struct packet_data * const packet) +static int push_uuid(struct tlv_packet *packet, const char *data) { return 0; } @@ -95,18 +90,17 @@ size_t parse_tlv(const char *data, size_t cursor, struct tlv *t) return 0; } - int clear_data() { return 0; } -static int push_bytes(const char *data, size_t size) +static int push_bytes(struct tlv_packet *packet, size_t size) { return 0; } -static int push_tlv_header(enum tlv_type type, size_t size) +static int push_tlv_header(struct tlv_packet *packet, enum tlv_type type, size_t size) { return 0; } diff --git a/src/common/protocol_private.h b/src/common/protocol_private.h index 5228afd..a31103a 100644 --- a/src/common/protocol_private.h +++ b/src/common/protocol_private.h @@ -1,11 +1,15 @@ #ifndef PROTOCOL_PRIVATE_H #define PROTOCOL_PRIVATE_H -static int push_string(const char *str); -static int push_fpi1(const char *num); -static int push_timestamp(const char *data); -static int push_request(const char *data); -static int push_reply(const char *data); -static int push_uuid(const char *data); +#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); #endif /* PROTOCOL_PRIVATE_H */
\ No newline at end of file |