update it

This commit is contained in:
Sukchan Lee 2017-03-11 17:36:48 +09:00
parent 9dae88ec0d
commit 4d91be1790
3 changed files with 13 additions and 13 deletions

View File

@ -57,7 +57,7 @@ CORE_DECLARE(status_t) tlv_final(void);
/* tlv_t encoding functions */
CORE_DECLARE(tlv_t*) tlv_add(
tlv_t *headTlv, c_uint32_t type, c_uint32_t length, c_uint8_t *value);
CORE_DECLARE(tlv_t*) tlv_create_buff_enabled_tlv(
CORE_DECLARE(tlv_t*) tlv_copy(
c_uint8_t *buff, c_uint32_t buff_len,
c_uint32_t type, c_uint32_t length, c_uint8_t *value);
CORE_DECLARE(tlv_t*) tlv_embed(
@ -66,9 +66,9 @@ CORE_DECLARE(c_uint32_t) tlv_render(
tlv_t *rootTlv, c_uint8_t *blk, c_uint32_t length, c_uint8_t mode);
/* tlv_t parsing functions */
CORE_DECLARE(tlv_t*) tlv_parse_tlv_block(c_uint32_t length,
c_uint8_t *blk, c_uint8_t mode);
CORE_DECLARE(tlv_t*) tlv_parse_embedded_tlv_block(tlv_t* pTlv, c_uint8_t mode);
CORE_DECLARE(tlv_t*) tlv_parse_block(
c_uint32_t length, c_uint8_t *blk, c_uint8_t mode);
CORE_DECLARE(tlv_t*) tlv_parse_embedded_block(tlv_t* pTlv, c_uint8_t mode);
/* tlv operation-related function */
CORE_DECLARE(tlv_t*) tlv_find(tlv_t* pTlv, c_uint32_t type);

View File

@ -332,7 +332,7 @@ tlv_t *tlv_add(
return new_tlv;
}
tlv_t *tlv_create_buff_enabled_tlv(
tlv_t *tlv_copy(
c_uint8_t *buff, c_uint32_t buff_len,
c_uint32_t type, c_uint32_t length, c_uint8_t *value)
{
@ -439,7 +439,7 @@ c_uint32_t tlv_render(
}
/* tlv_t parsing functions */
tlv_t *tlv_parse_tlv_block(c_uint32_t length, c_uint8_t *blk, c_uint8_t mode)
tlv_t *tlv_parse_block(c_uint32_t length, c_uint8_t *blk, c_uint8_t mode)
{
c_uint8_t* pos = blk;
@ -478,9 +478,9 @@ tlv_t *tlv_parse_tlv_block(c_uint32_t length, c_uint8_t *blk, c_uint8_t mode)
return root_tlv;
}
tlv_t *tlv_parse_embedded_tlv_block(tlv_t* p_tlv, c_uint8_t mode)
tlv_t *tlv_parse_embedded_block(tlv_t* p_tlv, c_uint8_t mode)
{
p_tlv->embedded = tlv_parse_tlv_block(p_tlv->length, p_tlv->value, mode);
p_tlv->embedded = tlv_parse_block(p_tlv->length, p_tlv->value, mode);
return p_tlv->embedded;
}

View File

@ -165,7 +165,7 @@ void tlv_test_check_embed_tlv_test(abts_case *tc, tlv_t *root_tlv, int mode)
}
}
parsed_tlv = tlv_parse_tlv_block(parent_block_len,
parsed_tlv = tlv_parse_block(parent_block_len,
parent_block, mode);
ABTS_PTR_NOTNULL(tc, parsed_tlv);
@ -204,7 +204,7 @@ void tlv_test_check_embed_tlv_test(abts_case *tc, tlv_t *root_tlv, int mode)
parent_tlv = tlv_find(parsed_tlv,20);
ABTS_PTR_NOTNULL(tc, parent_tlv);
tlv_parse_embedded_tlv_block(parent_tlv, mode);
tlv_parse_embedded_block(parent_tlv, mode);
embed_tlv = parent_tlv->embedded;
ABTS_PTR_NOTNULL(tc, embed_tlv);
@ -317,7 +317,7 @@ static void tlv_test_1(abts_case *tc, void *data)
}
parsed_tlv = tlv_parse_tlv_block(parent_block_len,parent_block, mode);
parsed_tlv = tlv_parse_block(parent_block_len,parent_block, mode);
ABTS_PTR_NOTNULL(tc, parsed_tlv);
pTlv = parsed_tlv;
@ -440,7 +440,7 @@ static void tlv_test_4(abts_case *tc, void *data)
tlv_test_set_tlv_value();
root_tlv = tlv_create_buff_enabled_tlv(tlv_buff, sizeof(tlv_buff),
root_tlv = tlv_copy(tlv_buff, sizeof(tlv_buff),
tlv_eliment[0].type,tlv_eliment[0].length, tlv_eliment[0].value);
parent_tlv = tlv_add(root_tlv, 20, 0, NULL);
tlv_add(root_tlv,tlv_eliment[4].type,
@ -534,7 +534,7 @@ static void tlv_test_5(abts_case *tc, void *data)
break;
}
p_tlv = parsed_tlv = tlv_parse_tlv_block(parent_block_len,parent_block,
p_tlv = parsed_tlv = tlv_parse_block(parent_block_len,parent_block,
mode);
ABTS_INT_EQUAL(tc, tlv_value_16(p_tlv), 0x1122);
p_tlv = parsed_tlv->next;