/net-tools-2.7.6/libcoap/tests/ |
D | test_uri.c | 21 coap_uri_t uri; in t_parse_uri1() local 23 result = coap_split_uri((unsigned char *)teststr, strlen(teststr), &uri); in t_parse_uri1() 25 CU_ASSERT(uri.host.length == 3); in t_parse_uri1() 26 CU_ASSERT_NSTRING_EQUAL(uri.host.s, "::1", 3); in t_parse_uri1() 28 CU_ASSERT(uri.port == COAP_DEFAULT_PORT); in t_parse_uri1() 30 CU_ASSERT(uri.path.length == 16); in t_parse_uri1() 31 CU_ASSERT_NSTRING_EQUAL(uri.path.s, ".well-known/core", 16); in t_parse_uri1() 33 CU_ASSERT(uri.query.length == 0); in t_parse_uri1() 34 CU_ASSERT(uri.query.s == NULL); in t_parse_uri1() 44 coap_uri_t uri; in t_parse_uri2() local [all …]
|
/net-tools-2.7.6/libcoap/src/ |
D | uri.c | 45 coap_split_uri(unsigned char *str_var, size_t len, coap_uri_t *uri) { in coap_split_uri() argument 49 if (!str_var || !uri) in coap_split_uri() 52 memset(uri, 0, sizeof(coap_uri_t)); in coap_split_uri() 53 uri->port = COAP_DEFAULT_PORT; in coap_split_uri() 103 COAP_SET_STR(&uri->host, q - p, p); in coap_split_uri() 117 COAP_SET_STR(&uri->host, q - p, p); in coap_split_uri() 142 uri->port = uri_port; in coap_split_uri() 161 COAP_SET_STR(&uri->path, q - p, p); in coap_split_uri() 170 COAP_SET_STR(&uri->query, len, p); in coap_split_uri() 412 coap_new_uri(const unsigned char *uri, unsigned int length) { in coap_new_uri() argument [all …]
|
D | resource.c | 239 if (!match(&r->uri, &query_pattern, (flags & MATCH_PREFIX) != 0, (flags & MATCH_SUBSTRING) != 0)) 288 coap_resource_init(const unsigned char *uri, size_t len, int flags) { argument 300 r->uri.s = (unsigned char *)uri; 301 r->uri.length = len; 303 coap_hash_path(r->uri.s, r->uri.length, r->key); 414 coap_free(resource->uri.s); 490 resource->uri.s, resource->uri.length, *len);
|
/net-tools-2.7.6/libcoap/examples/contiki/ |
D | coap-observer.c | 115 coap_uri_t uri; in PROCESS_THREAD() local 138 coap_split_uri((unsigned char *)resource, strlen(resource), &uri); in PROCESS_THREAD() 140 if (uri.port != COAP_DEFAULT_PORT) { in PROCESS_THREAD() 143 coap_encode_var_bytes(portbuf, uri.port), portbuf); in PROCESS_THREAD() 146 if (uri.path.length) { in PROCESS_THREAD() 155 res = coap_split_path(uri.path.s, uri.path.length, buf, &buflen); in PROCESS_THREAD()
|
D | Makefile.common | 11 …et.o debug.o option.o resource.o hashkey.o pdu.o encode.o subscribe.o coap_io.o block.o uri.o mem.o
|
/net-tools-2.7.6/libcoap/examples/ |
D | etsi_iot_01.c | 100 coap_dynamic_uri_t *uri) { in coap_add_payload() argument 106 if (uri) { in coap_add_payload() 107 memcpy(uri->resource_key, key, sizeof(coap_key_t)); in coap_add_payload() 108 HASH_ADD(hh, test_dynamic_uris, resource_key, sizeof(coap_key_t), uri); in coap_add_payload() 115 coap_dynamic_uri_t *uri; in coap_delete_payload() local 117 payload->resource_key, sizeof(coap_key_t), uri); in coap_delete_payload() 118 if (uri) { in coap_delete_payload() 119 HASH_DELETE(hh, test_dynamic_uris, uri); in coap_delete_payload() 120 coap_free(uri); in coap_delete_payload() 247 coap_dynamic_uri_t *uri; in hnd_post_test() local [all …]
|
D | client.c | 39 static coap_uri_t uri; variable 689 coap_split_uri((unsigned char *)arg, strlen(arg), &uri ); in cmdline_uri() 691 if (uri.port != COAP_DEFAULT_PORT) { in cmdline_uri() 694 coap_encode_var_bytes(portbuf, uri.port), in cmdline_uri() 698 if (uri.path.length) { in cmdline_uri() 700 res = coap_split_path(uri.path.s, uri.path.length, buf, &buflen); in cmdline_uri() 712 if (uri.query.length) { in cmdline_uri() 715 res = coap_split_query(uri.query.s, uri.query.length, buf, &buflen); in cmdline_uri() 1128 server = uri.host; in main() 1129 port = uri.port; in main() [all …]
|
/net-tools-2.7.6/libcoap/include/coap/ |
D | uri.h | 38 coap_uri_t *coap_new_uri(const unsigned char *uri, unsigned int length); 44 coap_uri_t *coap_clone_uri(const coap_uri_t *uri); 81 int coap_split_uri(unsigned char *str_var, size_t len, coap_uri_t *uri);
|
D | resource.h | 94 str uri; member 109 coap_resource_t *coap_resource_init(const unsigned char *uri,
|
D | coap.h.in | 51 #include "uri.h"
|
/net-tools-2.7.6/libcoap/ |
D | Makefile.libcoap | 1 libcoap_src = pdu.c net.c debug.c encode.c uri.c subscribe.c resource.c hashkey.c str.c option.c as…
|
D | Makefile.am | 66 src/uri.c 93 include/coap/uri.h \
|
D | TODO | 45 include/coap/uri.h 54 include/coap/uri.h
|
D | ChangeLog | 14 * src/uri.c (coap_split_path): Fixed URI parser bug and 150 * uri.c (make_decoded_option): use coap_opt_setlength() instead of 155 * uri.c (make_decoded_option): use coap_opt_encode() instead of writing
|
/net-tools-2.7.6/ |
D | coap-client.c | 670 coap_uri_t uri; in parse_uri() local 678 coap_split_uri((unsigned char *)arg, strlen(arg), &uri ); in parse_uri() 680 if (uri.path.length) { in parse_uri() 682 res = coap_split_path(uri.path.s, uri.path.length, in parse_uri() 695 if (uri.query.length) { in parse_uri() 698 res = coap_split_query(uri.query.s, uri.query.length, in parse_uri() 729 static char *create_uri(char *uri, int len, const char *target, in create_uri() argument 732 snprintf(uri, len, "coap://%s%s%s/%s", in create_uri() 739 print_data(uri, data[user_data->index].len); in create_uri() 741 return uri; in create_uri() [all …]
|