forward_proxy.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2020 HAW Hamburg
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser General
5  * Public License v2.1. See the file LICENSE in the top level directory for
6  * more details.
7  */
8 
9 #pragma once
10 
28 #include <stdbool.h>
29 #include <errno.h>
30 
31 #include "net/coap.h"
32 #include "net/nanocoap.h"
33 #include "net/gcoap.h"
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
46 #ifndef CONFIG_GCOAP_FORWARD_PROXY_EMPTY_ACK_MS
47 #define CONFIG_GCOAP_FORWARD_PROXY_EMPTY_ACK_MS ((CONFIG_COAP_ACK_TIMEOUT_MS / 4) * 3)
48 #endif
55 
69  const sock_udp_ep_t *client, const sock_udp_ep_t *local);
70 
81  coap_pkt_t *src_pdu,
82  const sock_udp_ep_t *remote);
83 
84 #ifdef __cplusplus
85 }
86 #endif
87 
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:214
CoAP PDU parsing context structure.
Definition: nanocoap.h:221
Memo to handle a response for a request.
Definition: gcoap.h:831