Loading...
Searching...
No Matches
forward_proxy_internal.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2024 ML!PA Consulting GmbH
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
22#ifndef FORWARD_PROXY_INTERNAL_H
23#define FORWARD_PROXY_INTERNAL_H
24
25#include <stdint.h>
26#include "net/coap.h"
27#include "net/gcoap.h"
28#include "net/sock/udp.h"
29#include "ztimer.h"
30#include "event.h"
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
39typedef struct {
44 uint16_t mid;
45 uint8_t flags;
46#if IS_USED(MODULE_NANOCOAP_CACHE)
47 uint8_t req_etag[COAP_ETAG_LENGTH_MAX];
48#endif
52
57#ifndef GCOAP_PROXY_STACK_SIZE
58#define GCOAP_PROXY_STACK_SIZE (THREAD_STACKSIZE_DEFAULT + DEBUG_EXTRA_STACKSIZE \
59 + sizeof(coap_pkt_t) + GCOAP_DTLS_EXTRA_STACKSIZE)
60#endif
61
65enum {
66 GCOAP_FORWARD_PROXY_MSG_SEND,
67};
68
73
83
84#ifdef __cplusplus
85}
86#endif
87
88#endif /* FORWARD_PROXY_INTERNAL_H */
gcoap definition
#define COAP_ETAG_LENGTH_MAX
maximum length of the ETag option
Definition coap.h:535
void gcoap_forward_proxy_thread_init(void)
Initialize the forward proxy thread.
int gcoap_forward_proxy_req_send(client_ep_t *cep)
Forward the CoAP request to the server The client endpoint is passed as an argument and freed if the ...
Generic CoAP values as defined by RFC7252.
UDP sock definitions.
Common IP-based transport layer end point.
Definition sock.h:215
client ep structure
sock_udp_ep_t proxy_ep
proxy endpoint
sock_udp_ep_t server_ep
forward Server endpoint
sock_udp_ep_t ep
client endpoint
coap_pkt_t pdu
forward CoAP PDU
uint16_t mid
message ID
ztimer_t empty_ack_timer
empty ACK timer
event_t event
client event
uint8_t flags
client flags
CoAP PDU parsing context structure.
Definition nanocoap.h:232
event structure
Definition event.h:148
ztimer structure
Definition ztimer.h:318
ztimer API