libcoap 4.3.5-develop-783b531
Loading...
Searching...
No Matches
coap_uri_internal.h
Go to the documentation of this file.
1/*
2 * coap_uri_internal.h -- URI functions for libcoap
3 *
4 * Copyright (C) 2019--2026 Olaf Bergmann <bergmann@tzi.org> and others
5 *
6 * SPDX-License-Identifier: BSD-2-Clause
7 *
8 * This file is part of the CoAP library libcoap. Please see README for terms
9 * of use.
10 */
11
17#ifndef COAP_URI_INTERNAL_H_
18#define COAP_URI_INTERNAL_H_
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
31typedef struct {
32 const char *name;
33 uint16_t port;
34 uint16_t proxy_only;
37
44
48
56
65const char *coap_map_abbrev_uri_path(coap_upa_chain_t *chain, uint32_t value);
66
67/*
68 * See if the specifiec path with length is on the UPA chain.
69 *
70 * @param chain The UPA chain to check against.
71 * @param path The URI path to match (without the leading /).
72 * @param length The length of the URI path.
73 * @param value The resoultant match value.
74 *
75 * @return 1 if a match, else 0.
76 */
77int coap_map_uri_path_abbrev(coap_upa_chain_t *chain, const char *path, size_t length,
78 uint32_t *value);
79
86
89#ifdef __cplusplus
90}
91#endif
92
93#endif /* COAP_URI_INTERNAL_H_ */
coap_uri_scheme_t
The scheme specifiers.
Definition coap_uri.h:30
@ COAP_URI_SCHEME_LAST
Definition coap_uri.h:39
int coap_map_uri_path_abbrev(coap_upa_chain_t *chain, const char *path, size_t length, uint32_t *value)
Definition coap_uri.c:1167
void coap_delete_upa_chain(coap_upa_chain_t *chain)
Clean up a UPA chain.
Definition coap_uri.c:1271
coap_uri_info_t coap_uri_scheme[COAP_URI_SCHEME_LAST]
Definition coap_uri.c:59
coap_upa_chain_t * coap_upa_server_mapping_chain
Definition coap_uri.c:33
const char * coap_map_abbrev_uri_path(coap_upa_chain_t *chain, uint32_t value)
Determine the expanded Uri-Path-Abbrev option value.
Definition coap_uri.c:1154
void coap_replace_percents(coap_optlist_t *optlist)
replace any % hex definitions with the actual character.
Definition coap_uri.c:825
coap_upa_chain_t * coap_upa_client_fallback_chain
Definition coap_uri.c:32
Representation of chained list of CoAP options to install.
uint32_t upa_value
The Uri-Path-Abbrev option value.
struct coap_upa_chain_t * next
Next entry in the chain.
char * upa_path
The Uri-Path-Abbrev option path representation (withouot the leading '/')
uint16_t proxy_only
set if proxy support only
const char * name
scheme name
coap_uri_scheme_t scheme
scheme
uint16_t port
default scheme port