libcoap 4.3.5-develop-aef27f2
Loading...
Searching...
No Matches
coap_proxy.h File Reference

Helper functions for proxy handling. More...

+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  coap_proxy_server_t
 
struct  coap_proxy_server_list_t
 

Macros

#define COAP_PROXY_OLD_MASK   0x07
 Space used in coap_proxy_t for old types.
 
#define COAP_PROXY_NEW_MASK   0x38
 Space used in coap_proxy_t for new types.
 

Typedefs

typedef struct coap_proxy_server_t coap_proxy_server_t
 
typedef struct coap_proxy_server_list_t coap_proxy_server_list_t
 
typedef coap_pdu_t *(* coap_proxy_response_handler_t) (coap_session_t *session, const coap_pdu_t *sent, coap_pdu_t *received, coap_cache_key_t *cache_key)
 Proxy response handler that is used as callback held in coap_context_t.
 

Enumerations

enum  coap_proxy_t {
  COAP_PROXY_REVERSE , COAP_PROXY_REVERSE_STRIP , COAP_PROXY_FORWARD , COAP_PROXY_FORWARD_STRIP ,
  COAP_PROXY_DIRECT , COAP_PROXY_DIRECT_STRIP , COAP_PROXY_FORWARD_DYNAMIC = COAP_PROXY_DIRECT , COAP_PROXY_FORWARD_DYNAMIC_STRIP = COAP_PROXY_DIRECT_STRIP ,
  COAP_PROXY_REV = (1 << 3) , COAP_PROXY_FWD_STATIC = (2 << 3) , COAP_PROXY_FWD_DYNAMIC = (3 << 3) , COAP_PROXY_BIT_STRIP = (1 << 6) ,
  COAP_PROXY_BIT_MCAST = (1 << 7)
}
 coap_proxy_t Proxy definitions. More...
 

Functions

void coap_register_proxy_response_handler (coap_context_t *context, coap_proxy_response_handler_t handler)
 Registers a new message handler that is called whenever a response is received by the proxy logic.
 
int coap_verify_proxy_scheme_supported (coap_uri_scheme_t scheme)
 Verify that the CoAP Scheme is supported for an ongoing proxy connection.
 
COAP_API int 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.
 
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.
 
COAP_API coap_session_tcoap_new_client_session_proxy (coap_context_t *context, coap_proxy_server_list_t *server_list)
 Creates a new client session to use the proxy logic going to the defined upstream server.
 

Detailed Description

Helper functions for proxy handling.

Definition in file coap_proxy.h.