libcoap 4.3.5-develop-4c7ce99
Loading...
Searching...
No Matches
coap_proxy.h
Go to the documentation of this file.
1/*
2 * coap_proxy.h -- helper functions for proxy handling
3 *
4 * Copyright (C) 2024-2025 Jon Shallow <supjps-libcoap@jpshallow.com>
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_PROXY_H_
18#define COAP_PROXY_H_
19
46
53
65
74
99 const coap_pdu_t *request,
100 coap_pdu_t *response,
101 coap_resource_t *resource,
102 coap_cache_key_t *cache_key,
103 coap_proxy_server_list_t *server_list);
104
118 const coap_pdu_t *received,
119 coap_cache_key_t **cache_key);
120
123#endif /* COAP_PROXY_H_ */
#define COAP_API
coap_uri_scheme_t
The scheme specifiers.
Definition coap_uri.h:28
coap_response_t
Definition coap_net.h:48
coap_proxy_t
Definition coap_proxy.h:27
int coap_verify_proxy_scheme_supported(coap_uri_scheme_t scheme)
Verify that the CoAP Scheme is supported for an ongoing proxy connection.
Definition coap_proxy.c:946
coap_response_t COAP_API coap_proxy_forward_response(coap_session_t *rsp_session, const coap_pdu_t *received, coap_cache_key_t **cache_key)
Forward the returning response back to the appropriate client.
Definition coap_proxy.c:936
int COAP_API coap_proxy_forward_request(coap_session_t *req_session, const coap_pdu_t *request, coap_pdu_t *response, coap_resource_t *resource, coap_cache_key_t *cache_key, coap_proxy_server_list_t *server_list)
Forward incoming request upstream to the next proxy/server.
Definition coap_proxy.c:920
@ COAP_PROXY_DIRECT_STRIP
Definition coap_proxy.h:44
@ COAP_PROXY_REVERSE_STRIP
Act as a reverse proxy, strip out proxy options.
Definition coap_proxy.h:29
@ COAP_PROXY_FORWARD_DYNAMIC
Act as a forward-dynamic proxy using the request's Proxy-Uri or Proxy-Scheme options to determine ser...
Definition coap_proxy.h:34
@ COAP_PROXY_REVERSE
Act as a reverse proxy.
Definition coap_proxy.h:28
@ COAP_PROXY_FORWARD_STATIC
Act as a forward-static proxy.
Definition coap_proxy.h:31
@ COAP_PROXY_DIRECT
Definition coap_proxy.h:43
@ COAP_PROXY_FORWARD_DYNAMIC_STRIP
Act as a forward-dynamic proxy, strip out proxy options.
Definition coap_proxy.h:38
@ COAP_PROXY_FORWARD_STRIP
Definition coap_proxy.h:42
@ COAP_PROXY_FORWARD_STATIC_STRIP
Act as a forward-static proxy, strip out proxy options.
Definition coap_proxy.h:32
@ COAP_PROXY_FORWARD
Definition coap_proxy.h:41
The structure used for defining the Client PSK setup data to be used.
Definition coap_dtls.h:410
The structure used for defining the PKI setup data to be used.
Definition coap_dtls.h:312
The structure used to hold the OSCORE configuration information.
structure for CoAP PDUs
int track_client_session
If 1, track individual connections to upstream server, else 0 for all clients to share the same ongoi...
Definition coap_proxy.h:59
coap_proxy_server_t * entry
Set of servers to connect to.
Definition coap_proxy.h:55
coap_proxy_t type
The proxy type.
Definition coap_proxy.h:58
unsigned int idle_timeout_secs
Proxy upstream session idle timeout (0 is no timeout)
Definition coap_proxy.h:62
size_t next_entry
Next server to use (% entry_count)
Definition coap_proxy.h:57
size_t entry_count
The number of servers in entry list.
Definition coap_proxy.h:56
coap_dtls_pki_t * dtls_pki
PKI configuration to use if not NULL.
Definition coap_proxy.h:49
coap_oscore_conf_t * oscore_conf
OSCORE configuration if not NULL.
Definition coap_proxy.h:51
coap_uri_t uri
host and port define the server, scheme method
Definition coap_proxy.h:48
coap_dtls_cpsk_t * dtls_cpsk
PSK configuration to use if not NULL.
Definition coap_proxy.h:50
Abstraction of resource that can be attached to coap_context_t.
Abstraction of virtual session that can be attached to coap_context_t (client) or coap_endpoint_t (se...
Representation of parsed URI.
Definition coap_uri.h:68