anjay
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
core.h
Go to the documentation of this file.
1/*
2 * Copyright 2017-2025 AVSystem <avsystem@avsystem.com>
3 * AVSystem Anjay LwM2M SDK
4 * All rights reserved.
5 *
6 * Licensed under AVSystem Anjay LwM2M Client SDK - Non-Commercial License.
7 * See the attached LICENSE file for details.
8 */
9
10#ifndef ANJAY_INCLUDE_ANJAY_CORE_H
11#define ANJAY_INCLUDE_ANJAY_CORE_H
12
13#include <stdint.h>
14
15#include <avsystem/coap/udp.h>
16
17#include <avsystem/commons/avs_list.h>
18#include <avsystem/commons/avs_net.h>
19#include <avsystem/commons/avs_prng.h>
20#include <avsystem/commons/avs_sched.h>
21#include <avsystem/commons/avs_stream.h>
22#include <avsystem/commons/avs_time.h>
23
24#include <anjay/anjay_config.h>
25
26#ifdef ANJAY_WITH_LWM2M_GATEWAY
27# define ANJAY_GATEWAY_MAX_PREFIX_LEN sizeof("dev65535")
28#endif // ANJAY_WITH_LWM2M_GATEWAY
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
35typedef uint16_t anjay_ssid_t;
36
40#define ANJAY_SSID_ANY 0
41
46#define ANJAY_SSID_BOOTSTRAP UINT16_MAX
47
49typedef struct anjay_struct anjay_t;
50
51#ifdef ANJAY_WITH_SMS
54#endif // ANJAY_WITH_SMS
55
56#ifdef ANJAY_WITH_NIDD
59#endif // ANJAY_WITH_NIDD
60
64// clang-format off
65#define ANJAY_COAP_DEFAULT_UDP_TX_PARAMS \
66 { \
67 /* .ack_timeout = */ { 2, 0 }, \
68 /* .ack_random_factor = */ 1.5, \
69 /* .max_retransmit = */ 4, \
70 /* .nstart = */ 1 \
71 }
72// clang-format on
73
79// clang-format off
80#define ANJAY_DTLS_DEFAULT_UDP_HS_TX_PARAMS \
81 { \
82 /* .min = */ { 1, 0 }, \
83 /* .max = */ { 60, 0 } \
84 }
85// clang-format on
86
87#ifdef ANJAY_WITH_SMS
94// clang-format off
95#define ANJAY_COAP_DEFAULT_SMS_TX_PARAMS \
96 { \
97 /* .ack_timeout = */ { 62, 0 }, \
98 /* .ack_random_factor = */ 1.5, \
99 /* .max_retransmit = */ 0, \
100 /* .nstart = */ 1 \
101 }
102// clang-format on
103#endif // ANJAY_WITH_SMS
104
105#ifdef ANJAY_WITH_NIDD
115// clang-format off
116#define ANJAY_COAP_DEFAULT_NIDD_TX_PARAMS \
117 { \
118 /* .ack_timeout = */ { 60, 0 }, \
119 /* .ack_random_factor = */ 1.5, \
120 /* .max_retransmit = */ 0, \
121 /* .nstart = */ 1 \
122 }
123// clang-format on
124#endif // ANJAY_WITH_NIDD
125
126#ifdef ANJAY_WITH_LWM2M11
141
154#endif // ANJAY_WITH_LWM2M11
155
156#ifdef ANJAY_WITH_EST
157typedef struct {
162 bool enable;
163
192
219 avs_time_duration_t max_margin;
221
222# ifdef ANJAY_WITH_LWM2M11
261# endif // ANJAY_WITH_LWM2M11
262
263# ifdef ANJAY_WITH_EST_ENGINE_SUPPORT
294 void *arg, const void *x509_der_data, size_t x509_der_data_size);
295# endif // ANJAY_WITH_EST_ENGINE_SUPPORT
296#endif // ANJAY_WITH_EST
297
298// NOTE: A lot of code depends on numerical values of these constants.
299// Please be careful when refactoring.
307
325typedef struct {
327
328#ifdef ANJAY_WITH_LWM2M_GATEWAY
329 // NULL-terminated string
331#endif // ANJAY_WITH_LWM2M_GATEWAY
333
378 anjay_t *anjay,
379 anjay_ssid_t ssid,
380 const anjay_uri_path_t *observation_paths,
381 const size_t paths_count,
382 avs_error_t err);
383
384#ifdef ANJAY_WITH_CONN_STATUS_API
479
497typedef void
499 anjay_t *anjay,
500 anjay_ssid_t ssid,
502
520#endif // ANJAY_WITH_CONN_STATUS_API
521
522typedef struct anjay_configuration {
530 const char *endpoint_name;
531
538
542 avs_net_ssl_version_t dtls_version;
543
550
559
569
577 avs_net_socket_configuration_t socket_config;
578
589 const avs_coap_udp_tx_params_t *udp_tx_params;
590
625 const avs_net_dtls_handshake_timeouts_t *udp_dtls_hs_tx_params;
626
632
649
665
676
682
697
706
718
729 avs_net_socket_tls_ciphersuites_t default_tls_ciphersuites;
730
741 avs_crypto_prng_ctx_t *prng_ctx;
742
748 avs_ssl_additional_configuration_clb_t *additional_tls_config_clb;
749
750#if defined(WITH_AVS_COAP_TCP) \
751 && (defined(ANJAY_WITH_LWM2M11) || defined(ANJAY_WITH_COAP_DOWNLOAD))
759
767 avs_time_duration_t coap_tcp_request_timeout;
768#endif // defined(WITH_AVS_COAP_TCP) && (defined(ANJAY_WITH_LWM2M11) ||
769 // defined(ANJAY_WITH_COAP_DOWNLOAD))
770
771#ifdef ANJAY_WITH_SMS
782 const avs_coap_udp_tx_params_t *sms_tx_params;
783#endif // ANJAY_WITH_SMS
784
785#ifdef ANJAY_WITH_NIDD
796 const avs_coap_udp_tx_params_t *nidd_tx_params;
797#endif // ANJAY_WITH_NIDD
798
799#ifdef ANJAY_WITH_SMS
805#endif // ANJAY_WITH_SMS
806
807#ifdef ANJAY_WITH_NIDD
813#endif // ANJAY_WITH_NIDD
814
815#ifdef ANJAY_WITH_SMS
829 const char *local_msisdn;
830
841#endif // ANJAY_WITH_SMS
842
843#ifdef ANJAY_WITH_LWM2M11
863
883
898 avs_crypto_certificate_chain_info_t trust_store_certs;
899
914 avs_crypto_cert_revocation_list_info_t trust_store_crls;
915
928#endif // ANJAY_WITH_LWM2M11
929
930#ifdef ANJAY_WITH_EST
943
944# ifdef ANJAY_WITH_LWM2M11
950# endif // ANJAY_WITH_LWM2M11
951
952# ifdef ANJAY_WITH_EST_ENGINE_SUPPORT
960
968
977
986# endif // ANJAY_WITH_EST_ENGINE_SUPPORT
987#endif // ANJAY_WITH_EST
988
998
999#ifdef ANJAY_WITH_CONN_STATUS_API
1008
1019#endif // ANJAY_WITH_CONN_STATUS_API
1020#ifdef ANJAY_WITH_COAP_DOWNLOAD
1049
1058 avs_time_duration_t coap_downloader_retry_delay;
1059#endif // ANJAY_WITH_COAP_DOWNLOAD
1061
1065const char *anjay_get_version(void);
1066
1076
1092
1093#ifdef ANJAY_WITH_CORE_PERSISTENCE
1137 avs_stream_t *in_stream);
1138
1166 avs_stream_t *out_stream);
1167
1168#endif // ANJAY_WITH_CORE_PERSISTENCE
1169
1216AVS_LIST(avs_net_socket_t *const) anjay_get_sockets(anjay_t *anjay);
1217
1225
1272
1300
1320int anjay_serve(anjay_t *anjay, avs_net_socket_t *ready_socket);
1321
1323typedef uint16_t anjay_oid_t;
1324
1326typedef uint16_t anjay_iid_t;
1327
1329typedef uint16_t anjay_rid_t;
1330
1332typedef uint16_t anjay_riid_t;
1333
1338#define ANJAY_ID_INVALID UINT16_MAX
1339
1342#define ANJAY_COAP_STATUS(Maj, Min) ((uint8_t) ((Maj << 5) | (Min & 0x1F)))
1343
1349#define ANJAY_ERR_BAD_REQUEST (-(int) ANJAY_COAP_STATUS(4, 0))
1354#define ANJAY_ERR_UNAUTHORIZED (-(int) ANJAY_COAP_STATUS(4, 1))
1359#define ANJAY_ERR_BAD_OPTION (-(int) ANJAY_COAP_STATUS(4, 2))
1360#define ANJAY_ERR_FORBIDDEN (-(int) ANJAY_COAP_STATUS(4, 3))
1362#define ANJAY_ERR_NOT_FOUND (-(int) ANJAY_COAP_STATUS(4, 4))
1367#define ANJAY_ERR_METHOD_NOT_ALLOWED (-(int) ANJAY_COAP_STATUS(4, 5))
1372#define ANJAY_ERR_NOT_ACCEPTABLE (-(int) ANJAY_COAP_STATUS(4, 6))
1377#define ANJAY_ERR_REQUEST_ENTITY_INCOMPLETE (-(int) ANJAY_COAP_STATUS(4, 8))
1382#define ANJAY_ERR_UNSUPPORTED_CONTENT_FORMAT (-(int) ANJAY_COAP_STATUS(4, 15))
1384#define ANJAY_ERR_INTERNAL (-(int) ANJAY_COAP_STATUS(5, 0))
1386#define ANJAY_ERR_NOT_IMPLEMENTED (-(int) ANJAY_COAP_STATUS(5, 1))
1391#define ANJAY_ERR_SERVICE_UNAVAILABLE (-(int) ANJAY_COAP_STATUS(5, 3))
1409avs_sched_t *anjay_get_scheduler(anjay_t *anjay);
1410
1422int anjay_sched_time_to_next(anjay_t *anjay, avs_time_duration_t *out_delay);
1423
1437int anjay_sched_time_to_next_ms(anjay_t *anjay, int *out_delay_ms);
1438
1455
1463
1464#ifdef ANJAY_WITH_EVENT_LOOP
1526int anjay_event_loop_run(anjay_t *anjay, avs_time_duration_t max_wait_time);
1527
1549 avs_time_duration_t max_wait_time);
1550
1586
1616int anjay_serve_any(anjay_t *anjay, avs_time_duration_t max_wait_time);
1617#endif // ANJAY_WITH_EVENT_LOOP
1618
1651
1671
1672#ifdef ANJAY_WITH_LWM2M11
1686#endif // ANJAY_WITH_LWM2M11
1687
1720
1755 anjay_ssid_t ssid,
1756 avs_time_duration_t timeout);
1757
1769
1790
1797typedef struct {
1798 bool udp : 1;
1799 bool tcp : 1;
1800#ifdef ANJAY_WITH_SMS
1801 bool sms : 1;
1802#endif // ANJAY_WITH_SMS
1803#ifdef ANJAY_WITH_NIDD
1804 bool nidd : 1;
1805#endif // ANJAY_WITH_NIDD
1807
1812
1821
1827
1833
1834#ifdef ANJAY_WITH_SMS
1840#endif // ANJAY_WITH_SMS
1841
1842#ifdef ANJAY_WITH_NIDD
1848#endif // ANJAY_WITH_NIDD
1849
1860 anjay_transport_set_t transport_set);
1861
1889 anjay_transport_set_t transport_set);
1890
1910 anjay_transport_set_t transport_set);
1911
1927 anjay_transport_set_t transport_set);
1928
1951 anjay_transport_set_t transport_set);
1952
1970
1971#ifdef ANJAY_WITH_LWM2M11
2009
2046#endif // ANJAY_WITH_LWM2M11
2047
2048typedef struct {
2052 avs_net_security_info_t security_info;
2053
2058 const avs_net_socket_dane_tlsa_record_t *dane_tlsa_record;
2059
2067 avs_net_socket_tls_ciphersuites_t tls_ciphersuites;
2068
2069 /*
2070 * Server Name Indicator to use for authenticating with the peer during
2071 * secure TLS connection. The value is passed to the underlying TLS library
2072 * that need to take this variable into account for it make any effect. This
2073 * field is optional and can be left zero-initialized. If not set the
2074 * integration layer should use the Server URI instead.
2075 */
2078
2119 anjay_security_config_t *out_config,
2120 const char *uri);
2121
2147
2148#if defined(ANJAY_WITH_EST) && defined(AVS_COMMONS_WITH_AVS_PERSISTENCE)
2161avs_error_t anjay_est_state_persist(anjay_t *anjay, avs_stream_t *out_stream);
2162
2181avs_error_t anjay_est_state_restore(anjay_t *anjay, avs_stream_t *out_stream);
2182
2191#endif // defined(ANJAY_WITH_EST) && defined(AVS_COMMONS_WITH_AVS_PERSISTENCE)
2192
2199
2218
2247 anjay_t *anjay,
2248 anjay_ssid_t ssid,
2250
2278static inline avs_time_real_t
2282
2321 anjay_ssid_t ssid);
2322
2357 anjay_t *anjay, anjay_transport_set_t transport_set);
2358
2400 anjay_ssid_t ssid);
2401
2432 anjay_ssid_t ssid);
2433
2459 anjay_t *anjay, anjay_transport_set_t transport_set);
2460
2486 anjay_t *anjay, anjay_transport_set_t transport_set);
2487
2511
2537 anjay_t *anjay, anjay_transport_set_t transport_set);
2538
2552avs_error_t
2554 anjay_transport_set_t transport_set,
2555 const avs_coap_udp_tx_params_t *tx_params);
2556
2570avs_error_t
2572 anjay_transport_set_t transport_set,
2573 avs_time_duration_t exchange_timeout);
2574
2585 anjay_t *anjay,
2586 avs_net_dtls_handshake_timeouts_t dtls_handshake_timeouts);
2587
2588#ifdef ANJAY_WITH_COMMUNICATION_TIMESTAMP_API
2610 anjay_ssid_t ssid,
2611 avs_time_real_t *out_time);
2612
2643 anjay_ssid_t ssid,
2644 avs_time_real_t *out_time);
2666 anjay_ssid_t ssid,
2667 avs_time_real_t *out_time);
2668#endif // ANJAY_WITH_COMMUNICATION_TIMESTAMP_API
2669
2670#ifdef ANJAY_WITH_SMS
2671# ifdef ANJAY_WITH_LWM2M11
2686 anjay_ssid_t ssid,
2687 bool *out_sms_trigger);
2688# endif // ANJAY_WITH_LWM2M11
2689
2703 const char *server_msisdn,
2704 anjay_ssid_t *out_ssid);
2705#endif // ANJAY_WITH_SMS
2706
2707#ifdef __cplusplus
2708} /* extern "C" */
2709#endif
2710
2711#endif /*ANJAY_INCLUDE_ANJAY_CORE_H*/
anjay_registration_expiration_status_t
Definition core.h:2200
@ ANJAY_REGISTRATION_EXPIRATION_STATUS_VALID
Definition core.h:2206
@ ANJAY_REGISTRATION_EXPIRATION_STATUS_INFINITE_LIFETIME
Definition core.h:2216
@ ANJAY_REGISTRATION_EXPIRATION_STATUS_EXPIRED
Definition core.h:2211
static avs_time_real_t anjay_registration_expiration_time(anjay_t *anjay, anjay_ssid_t ssid)
Definition core.h:2279
bool anjay_est_state_is_ready_for_persistence(anjay_t *anjay)
const anjay_transport_set_t ANJAY_TRANSPORT_SET_NIDD
anjay_t * anjay_new(const anjay_configuration_t *config)
int anjay_set_queue_mode_preference(anjay_t *anjay, anjay_queue_mode_preference_t preference)
avs_error_t anjay_update_coap_exchange_timeout(anjay_t *anjay, anjay_transport_set_t transport_set, avs_time_duration_t exchange_timeout)
const anjay_transport_set_t ANJAY_TRANSPORT_SET_SMS
anjay_est_cacerts_policy_t
Definition core.h:223
@ ANJAY_EST_CACERTS_FOR_EST_SECURITY_AND_BOOTSTRAP
Definition core.h:230
@ ANJAY_EST_CACERTS_IF_EST_CONFIGURED
Definition core.h:247
@ ANJAY_EST_CACERTS_DISABLED
Definition core.h:259
@ ANJAY_EST_CACERTS_ALWAYS
Definition core.h:254
@ ANJAY_EST_CACERTS_FOR_EST_SECURITY
Definition core.h:240
enum anjay_server_conn_status anjay_server_conn_status_t
avs_time_real_t anjay_transport_next_planned_pmax_notify_trigger(anjay_t *anjay, anjay_transport_set_t transport_set)
int anjay_delete_with_core_persistence(anjay_t *anjay, avs_stream_t *out_stream)
avs_time_real_t anjay_next_planned_lifecycle_operation(anjay_t *anjay, anjay_ssid_t ssid)
void anjay_delete(anjay_t *anjay)
avs_time_real_t anjay_next_planned_pmax_notify_trigger(anjay_t *anjay, anjay_ssid_t ssid)
int anjay_get_sms_trigger(anjay_t *anjay, anjay_ssid_t ssid, bool *out_sms_trigger)
anjay_socket_transport_t
Definition core.h:1218
@ ANJAY_SOCKET_TRANSPORT_NIDD
Definition core.h:1223
@ ANJAY_SOCKET_TRANSPORT_INVALID
Definition core.h:1219
@ ANJAY_SOCKET_TRANSPORT_UDP
Definition core.h:1220
@ ANJAY_SOCKET_TRANSPORT_TCP
Definition core.h:1221
@ ANJAY_SOCKET_TRANSPORT_SMS
Definition core.h:1222
int anjay_sched_time_to_next_ms(anjay_t *anjay, int *out_delay_ms)
const anjay_transport_set_t ANJAY_TRANSPORT_SET_TCP
uint16_t anjay_oid_t
Definition core.h:1323
uint16_t anjay_rid_t
Definition core.h:1329
int anjay_event_loop_interrupt(anjay_t *anjay)
bool anjay_all_connections_failed(anjay_t *anjay)
uint16_t anjay_iid_t
Definition core.h:1326
bool anjay_ongoing_registration_exists(anjay_t *anjay)
bool anjay_transport_has_unsent_notifications(anjay_t *anjay, anjay_transport_set_t transport_set)
int anjay_transport_enter_offline(anjay_t *anjay, anjay_transport_set_t transport_set)
anjay_security_config_t anjay_security_config_pkix(anjay_t *anjay)
avs_error_t anjay_update_dtls_handshake_timeouts(anjay_t *anjay, avs_net_dtls_handshake_timeouts_t dtls_handshake_timeouts)
bool anjay_has_unsent_notifications(anjay_t *anjay, anjay_ssid_t ssid)
anjay_server_conn_status_t anjay_get_server_connection_status(anjay_t *anjay, anjay_ssid_t ssid)
int anjay_transport_set_online(anjay_t *anjay, anjay_transport_set_t transport_set)
int anjay_server_schedule_reconnect(anjay_t *anjay, anjay_ssid_t ssid)
struct anjay_struct anjay_t
Definition core.h:49
anjay_queue_mode_preference_t
Definition core.h:1972
@ ANJAY_FORCE_ONLINE_MODE
Definition core.h:2007
@ ANJAY_PREFER_QUEUE_MODE
Definition core.h:1988
@ ANJAY_FORCE_QUEUE_MODE
Definition core.h:1981
@ ANJAY_PREFER_ONLINE_MODE
Definition core.h:1997
anjay_t * anjay_new_from_core_persistence(const anjay_configuration_t *config, avs_stream_t *in_stream)
int anjay_transport_exit_offline(anjay_t *anjay, anjay_transport_set_t transport_set)
avs_time_real_t anjay_transport_next_planned_notify_trigger(anjay_t *anjay, anjay_transport_set_t transport_set)
uint16_t anjay_ssid_t
Definition core.h:35
avs_time_real_t anjay_next_planned_notify_trigger(anjay_t *anjay, anjay_ssid_t ssid)
#define ANJAY_GATEWAY_MAX_PREFIX_LEN
Definition core.h:27
int anjay_event_loop_run(anjay_t *anjay, avs_time_duration_t max_wait_time)
avs_error_t anjay_update_transport_tx_params(anjay_t *anjay, anjay_transport_set_t transport_set, const avs_coap_udp_tx_params_t *tx_params)
const anjay_transport_set_t ANJAY_TRANSPORT_SET_UDP
const anjay_transport_set_t ANJAY_TRANSPORT_SET_IP
avs_error_t anjay_get_server_last_registration_time(anjay_t *anjay, anjay_ssid_t ssid, avs_time_real_t *out_time)
avs_error_t anjay_get_server_last_communication_time(anjay_t *anjay, anjay_ssid_t ssid, avs_time_real_t *out_time)
int anjay_disable_server(anjay_t *anjay, anjay_ssid_t ssid)
const char * anjay_est_engine_cacert_address_gen_t(void *arg, const void *x509_der_data, size_t x509_der_data_size)
Definition core.h:293
AVS_LIST[avs_net_socket_t *const ] anjay_get_sockets(anjay_t *anjay)
avs_time_real_t anjay_transport_next_planned_lifecycle_operation(anjay_t *anjay, anjay_transport_set_t transport_set)
void anjay_server_connection_status_cb_t(void *arg, anjay_t *anjay, anjay_ssid_t ssid, anjay_server_conn_status_t status)
Definition core.h:498
int anjay_schedule_registration_update(anjay_t *anjay, anjay_ssid_t ssid)
int anjay_serve(anjay_t *anjay, avs_net_socket_t *ready_socket)
void anjay_sched_run(anjay_t *anjay)
int anjay_schedule_register(anjay_t *anjay, anjay_ssid_t ssid)
AVS_LIST[const anjay_socket_entry_t] anjay_get_socket_entries(anjay_t *anjay)
bool anjay_transport_is_offline(anjay_t *anjay, anjay_transport_set_t transport_set)
int anjay_get_server_ssid_by_msisdn(anjay_t *anjay, const char *server_msisdn, anjay_ssid_t *out_ssid)
int anjay_schedule_bootstrap_request(anjay_t *anjay)
anjay_server_conn_status
Definition core.h:391
@ ANJAY_SERV_CONN_STATUS_INITIAL
Definition core.h:410
@ ANJAY_SERV_CONN_STATUS_REGISTERING
Definition core.h:431
@ ANJAY_SERV_CONN_STATUS_BOOTSTRAPPING
Definition core.h:421
@ ANJAY_SERV_CONN_STATUS_DEREGISTERING
Definition core.h:447
@ ANJAY_SERV_CONN_STATUS_INVALID
Definition core.h:396
@ ANJAY_SERV_CONN_STATUS_REREGISTERING
Definition core.h:472
@ ANJAY_SERV_CONN_STATUS_ERROR
Definition core.h:403
@ ANJAY_SERV_CONN_STATUS_UPDATING
Definition core.h:477
@ ANJAY_SERV_CONN_STATUS_REGISTERED
Definition core.h:436
@ ANJAY_SERV_CONN_STATUS_REG_FAILURE
Definition core.h:442
@ ANJAY_SERV_CONN_STATUS_SUSPENDING
Definition core.h:461
@ ANJAY_SERV_CONN_STATUS_DEREGISTERED
Definition core.h:455
@ ANJAY_SERV_CONN_STATUS_SUSPENDED
Definition core.h:466
@ ANJAY_SERV_CONN_STATUS_CONNECTING
Definition core.h:416
@ ANJAY_SERV_CONN_STATUS_BOOTSTRAPPED
Definition core.h:426
avs_sched_t * anjay_get_scheduler(anjay_t *anjay)
int anjay_enable_server(anjay_t *anjay, anjay_ssid_t ssid)
avs_error_t anjay_get_server_next_update_time(anjay_t *anjay, anjay_ssid_t ssid, avs_time_real_t *out_time)
int anjay_serve_any(anjay_t *anjay, avs_time_duration_t max_wait_time)
void anjay_confirmable_notification_status_cb_t(anjay_t *anjay, anjay_ssid_t ssid, const anjay_uri_path_t *observation_paths, const size_t paths_count, avs_error_t err)
Definition core.h:377
int anjay_security_config_from_dm(anjay_t *anjay, anjay_security_config_t *out_config, const char *uri)
int anjay_disable_server_with_timeout(anjay_t *anjay, anjay_ssid_t ssid, avs_time_duration_t timeout)
avs_time_real_t anjay_registration_expiration_time_with_status(anjay_t *anjay, anjay_ssid_t ssid, anjay_registration_expiration_status_t *out_status)
int anjay_sched_time_to_next(anjay_t *anjay, avs_time_duration_t *out_delay)
int anjay_transport_schedule_reconnect(anjay_t *anjay, anjay_transport_set_t transport_set)
int anjay_event_loop_run_with_error_handling(anjay_t *anjay, avs_time_duration_t max_wait_time)
anjay_lwm2m_version_t
Definition core.h:127
@ ANJAY_LWM2M_VERSION_1_1
Definition core.h:139
@ ANJAY_LWM2M_VERSION_1_0
Definition core.h:132
const char * anjay_get_version(void)
struct anjay_configuration anjay_configuration_t
avs_error_t anjay_est_state_restore(anjay_t *anjay, avs_stream_t *out_stream)
int anjay_sched_calculate_wait_time_ms(anjay_t *anjay, int limit_ms)
avs_error_t anjay_est_state_persist(anjay_t *anjay, avs_stream_t *out_stream)
anjay_id_type_t
Definition core.h:300
@ ANJAY_ID_RIID
Definition core.h:304
@ _ANJAY_URI_PATH_MAX_LENGTH
Definition core.h:305
@ ANJAY_ID_IID
Definition core.h:302
@ ANJAY_ID_OID
Definition core.h:301
@ ANJAY_ID_RID
Definition core.h:303
const anjay_transport_set_t ANJAY_TRANSPORT_SET_ALL
uint16_t anjay_riid_t
Definition core.h:1332
Definition core.h:522
bool use_connection_id
Definition core.h:681
bool enable_self_notify
Definition core.h:705
size_t in_buffer_size
Definition core.h:549
avs_net_socket_configuration_t socket_config
Definition core.h:577
bool prefer_multipart_sms
Definition core.h:840
size_t coap_downloader_retry_count
Definition core.h:1048
size_t msg_cache_size
Definition core.h:568
avs_time_duration_t coap_tcp_request_timeout
Definition core.h:767
avs_time_duration_t coap_downloader_retry_delay
Definition core.h:1058
size_t out_buffer_size
Definition core.h:558
void * server_connection_status_cb_arg
Definition core.h:1018
const anjay_lwm2m_version_config_t * lwm2m_version_config
Definition core.h:862
void * est_engine_cacerts_address_gen_cb_arg
Definition core.h:985
anjay_nidd_driver_t * nidd_driver
Definition core.h:812
anjay_confirmable_notification_status_cb_t * confirmable_notification_status_cb
Definition core.h:997
avs_crypto_certificate_chain_info_t trust_store_certs
Definition core.h:898
bool use_system_trust_store
Definition core.h:882
bool confirmable_notifications
Definition core.h:631
avs_crypto_prng_ctx_t * prng_ctx
Definition core.h:741
const avs_coap_udp_tx_params_t * udp_tx_params
Definition core.h:589
bool prefer_hierarchical_formats
Definition core.h:675
avs_crypto_cert_revocation_list_info_t trust_store_crls
Definition core.h:914
bool update_immediately_on_dm_change
Definition core.h:696
bool disable_legacy_server_initiated_bootstrap
Definition core.h:648
anjay_est_cacerts_policy_t est_cacerts_policy
Definition core.h:949
size_t coap_tcp_max_options_size
Definition core.h:758
const char * endpoint_name
Definition core.h:530
avs_net_ssl_version_t dtls_version
Definition core.h:542
avs_net_socket_tls_ciphersuites_t default_tls_ciphersuites
Definition core.h:729
const avs_coap_udp_tx_params_t * sms_tx_params
Definition core.h:782
const char * local_msisdn
Definition core.h:829
const avs_net_dtls_handshake_timeouts_t * udp_dtls_hs_tx_params
Definition core.h:625
const char * est_engine_key_address
Definition core.h:959
anjay_est_engine_cacert_address_gen_t * est_engine_cacerts_address_gen_cb
Definition core.h:976
bool rebuild_client_cert_chain
Definition core.h:927
anjay_server_connection_status_cb_t * server_connection_status_cb
Definition core.h:1007
uint16_t udp_listen_port
Definition core.h:537
bool connection_error_is_registration_failure
Definition core.h:717
const char * est_engine_cert_address
Definition core.h:967
const avs_coap_udp_tx_params_t * nidd_tx_params
Definition core.h:796
const anjay_est_reenroll_config_t * est_reenroll_config
Definition core.h:942
avs_ssl_additional_configuration_clb_t * additional_tls_config_clb
Definition core.h:748
size_t stored_notification_limit
Definition core.h:664
anjay_smsdrv_t * sms_driver
Definition core.h:804
Definition core.h:157
double nominal_usage
Definition core.h:191
avs_time_duration_t max_margin
Definition core.h:219
bool enable
Definition core.h:162
Definition core.h:142
anjay_lwm2m_version_t minimum_version
Definition core.h:146
anjay_lwm2m_version_t maximum_version
Definition core.h:152
Definition nidd.h:169
Definition core.h:2048
avs_net_security_info_t security_info
Definition core.h:2052
const char * server_name_indication
Definition core.h:2076
avs_net_socket_tls_ciphersuites_t tls_ciphersuites
Definition core.h:2067
const avs_net_socket_dane_tlsa_record_t * dane_tlsa_record
Definition core.h:2058
Definition sms.h:134
Definition core.h:1230
bool queue_mode
Definition core.h:1270
anjay_ssid_t ssid
Definition core.h:1256
anjay_socket_transport_t transport
Definition core.h:1244
avs_net_socket_t * socket
Definition core.h:1236
Definition core.h:1797
bool sms
Definition core.h:1801
bool tcp
Definition core.h:1799
bool udp
Definition core.h:1798
bool nidd
Definition core.h:1804
Definition core.h:325