Lines Matching refs:uri

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
420 memcpy(URI_DATA(result), uri, length); in coap_new_uri()
431 coap_clone_uri(const coap_uri_t *uri) { in coap_clone_uri() argument
434 if ( !uri ) in coap_clone_uri()
437 result = (coap_uri_t *)coap_malloc( uri->query.length + uri->host.length + in coap_clone_uri()
438 uri->path.length + sizeof(coap_uri_t) + 1); in coap_clone_uri()
445 result->port = uri->port; in coap_clone_uri()
447 if ( uri->host.length ) { in coap_clone_uri()
449 result->host.length = uri->host.length; in coap_clone_uri()
451 memcpy(result->host.s, uri->host.s, uri->host.length); in coap_clone_uri()
454 if ( uri->path.length ) { in coap_clone_uri()
455 result->path.s = URI_DATA(result) + uri->host.length; in coap_clone_uri()
456 result->path.length = uri->path.length; in coap_clone_uri()
458 memcpy(result->path.s, uri->path.s, uri->path.length); in coap_clone_uri()
461 if ( uri->query.length ) { in coap_clone_uri()
462 result->query.s = URI_DATA(result) + uri->host.length + uri->path.length; in coap_clone_uri()
463 result->query.length = uri->query.length; in coap_clone_uri()
465 memcpy(result->query.s, uri->query.s, uri->query.length); in coap_clone_uri()