forward_proxy.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2020 HAW Hamburg
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
25 #include <stdbool.h>
26 #include <errno.h>
27 
28 #include "net/coap.h"
29 #include "net/nanocoap.h"
30 #include "net/gcoap.h"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
43 #ifndef CONFIG_GCOAP_FORWARD_PROXY_EMPTY_ACK_MS
44 #define CONFIG_GCOAP_FORWARD_PROXY_EMPTY_ACK_MS ((CONFIG_COAP_ACK_TIMEOUT_MS / 4) * 3)
45 #endif
52 
66  const sock_udp_ep_t *client, const sock_udp_ep_t *local);
67 
78  coap_pkt_t *src_pdu,
79  const sock_udp_ep_t *remote);
80 
81 #ifdef __cplusplus
82 }
83 #endif
84 
gcoap definition
void gcoap_forward_proxy_find_req_memo(gcoap_request_memo_t **memo_ptr, coap_pkt_t *src_pdu, const sock_udp_ep_t *remote)
Finds the memo for an outstanding request within the _coap_state.open_reqs array.
int gcoap_forward_proxy_request_process(coap_pkt_t *pkt, const sock_udp_ep_t *client, const sock_udp_ep_t *local)
Handles proxied requests.
void gcoap_forward_proxy_init(void)
Registers a listener for forward proxy operation.
nanocoap API
Generic CoAP values as defined by RFC7252.
Common IP-based transport layer end point.
Definition: sock.h:211
CoAP PDU parsing context structure.
Definition: nanocoap.h:218
Memo to handle a response for a request.
Definition: gcoap.h:828