Chapter 2. API Reference
• [in] pc: Pointer to the protocomm instance
• [in] ep_name: Endpoint identifier(name) string
esp_err_t protocomm_set_version(protocomm_t *pc, const char *ep_name, const char *version)
Set endpoint for version verification.
This API can be used for setting an application specific protocol version which can be verified by clients through
the endpoint.
Note
• An endpoint must be bound to a valid protocomm instance, created using protocomm_new().
Return
• ESP_OK : Success
• ESP_FAIL : Error adding endpoint / Endpoint with this name already exists
• ESP_ERR_INVALID_STATE : Version endpoint already set
• ESP_ERR_NO_MEM : Error allocating endpoint resource
• ESP_ERR_INVALID_ARG : Null instance/name/handler arguments
Parameters
• [in] pc: Pointer to the protocomm instance
• [in] ep_name: Endpoint identifier(name) string
• [in] version: Version identifier(name) string
esp_err_t protocomm_unset_version(protocomm_t *pc, const char *ep_name)
Remove version verification endpoint from a protocomm instance.
This API will remove a registered version endpoint identified by an endpoint name.
Return
• ESP_OK : Success
• ESP_ERR_NOT_FOUND : Endpoint with specified name doesn’t exist
• ESP_ERR_INVALID_ARG : Null instance/name arguments
Parameters
• [in] pc: Pointer to the protocomm instance
• [in] ep_name: Endpoint identifier(name) string
Type Definitions
typedef esp_err_t (*protocomm_req_handler_t)(uint32_t session_id, const uint8_t *inbuf,
ssize_t inlen, uint8_t **outbuf, ssize_t *outlen,
void *priv_data)
Function prototype for protocomm endpoint handler.
typedef struct protocomm protocomm_t
This structure corresponds to a unique instance of protocomm returned when the API protocomm_new()
is called. The remaining Protocomm APIs require this object as the first parameter.
Note Structure of the protocomm object is kept private
Header File
• components/protocomm/include/security/protocomm_security.h
Structures
struct protocomm_security_pop
Proof Of Possession for authenticating a secure session.
Public Members
const uint8_t *data
Pointer to buffer containing the proof of possession data
Espressif Systems 670
Submit Document Feedback
Release v4.4