Soletta™ Framework
|
#include "sol-lwm2m-bs-server.h"
#include "sol-mainloop.h"
#include "sol-vector.h"
#include "sol-util.h"
#include <stdio.h>
#include <stdbool.h>
#include <errno.h>
#include <unistd.h>
Variables | |
static struct sol_blob | binding |
const char * | known_clients [] = { "cli1", "cli2", NULL } |
static struct sol_blob | psk_id_0 |
static struct sol_blob | psk_key_0 |
static struct sol_blob | server_one_addr |
#define ACCESS_CONTROL_OBJ_ACL_RES_ID (2) |
#define ACCESS_CONTROL_OBJ_ID (2) |
#define ACCESS_CONTROL_OBJ_INSTANCE_RES_ID (1) |
#define ACCESS_CONTROL_OBJ_OBJECT_RES_ID (0) |
#define ACCESS_CONTROL_OBJ_OWNER_RES_ID (3) |
#define BS_SERVER_PRIVATE_KEY ("9b7dfec20e49fe2cacf23fb21d06a8dc496530c695ec24cdf6c002ce44afa5fb") |
Referenced by main().
#define BS_SERVER_PUBLIC_KEY |
Referenced by main().
#define CLIENT_BS_PSK_ID ("cli1-bs") |
Referenced by main().
#define CLIENT_BS_PSK_KEY ("FEDCBA9876543210") |
Referenced by main().
#define CLIENT_PUBLIC_KEY |
Referenced by main().
#define CLIENT_SERVER_PSK_ID ("cli1") |
#define CLIENT_SERVER_PSK_KEY ("0123456789ABCDEF") |
#define LIFETIME (60) |
Referenced by write_sec_one_cb(), write_server_one_cb(), and write_servers_cb().
#define PSK_KEY_LEN 16 |
Referenced by main().
#define RPK_PRIVATE_KEY_LEN 32 |
Referenced by main().
#define RPK_PUBLIC_KEY_LEN (2 * RPK_PRIVATE_KEY_LEN) |
Referenced by main().
#define SECURITY_BOOTSTRAP_SERVER_ACCOUNT_TIMEOUT_RES_ID (12) |
#define SECURITY_CLIENT_HOLD_OFF_TIME_RES_ID (11) |
#define SECURITY_IS_BOOTSTRAP_RES_ID (1) |
Referenced by delete_all_cb().
#define SECURITY_OBJ_ID (0) |
#define SECURITY_PUBLIC_KEY_OR_IDENTITY_RES_ID (3) |
Referenced by delete_all_cb().
#define SECURITY_SECRET_KEY_RES_ID (5) |
Referenced by delete_all_cb().
#define SECURITY_SECURITY_MODE_RES_ID (2) |
Referenced by delete_all_cb().
#define SECURITY_SERVER_ID_RES_ID (10) |
Referenced by delete_all_cb().
#define SECURITY_SERVER_PUBLIC_KEY_RES_ID (4) |
#define SECURITY_SERVER_URI_RES_ID (0) |
Referenced by delete_all_cb().
#define SERVER_OBJ_BINDING_RES_ID (7) |
Referenced by write_sec_one_cb(), and write_server_one_cb().
#define SERVER_OBJ_ID (1) |
#define SERVER_OBJ_LIFETIME_RES_ID (1) |
Referenced by write_sec_one_cb(), write_server_one_cb(), and write_servers_cb().
#define SERVER_OBJ_REGISTRATION_UPDATE_RES_ID (8) |
#define SERVER_OBJ_SHORT_RES_ID (0) |
Referenced by write_sec_one_cb(), and write_server_one_cb().
|
static |
References delete_all_cb(), sol_lwm2m_bootstrap_client_info_get_name(), and sol_lwm2m_bootstrap_server_delete_object_instance().
Referenced by main().
|
static |
References SECURITY_IS_BOOTSTRAP_RES_ID, SECURITY_PUBLIC_KEY_OR_IDENTITY_RES_ID, SECURITY_SECRET_KEY_RES_ID, SECURITY_SECURITY_MODE_RES_ID, SECURITY_SERVER_ID_RES_ID, SECURITY_SERVER_URI_RES_ID, SOL_COAP_RESPONSE_CODE_DELETED, sol_lwm2m_bootstrap_client_info_get_name(), sol_lwm2m_bootstrap_server_write(), sol_lwm2m_resource_clear(), SOL_LWM2M_RESOURCE_DATA_TYPE_BOOL, SOL_LWM2M_RESOURCE_DATA_TYPE_STRING, SOL_LWM2M_RESOURCE_SINGLE_INIT, SOL_LWM2M_RESOURCE_SINGLE_INT_INIT, SOL_LWM2M_SECURITY_MODE_PRE_SHARED_KEY, sol_util_array_size, and write_sec_one_cb().
Referenced by bootstrap_cb().
int main | ( | int | argc, |
char * | argv[] | ||
) |
References bootstrap_cb(), BS_SERVER_PRIVATE_KEY, BS_SERVER_PUBLIC_KEY, CLIENT_BS_PSK_ID, CLIENT_BS_PSK_KEY, CLIENT_PUBLIC_KEY, sol_lwm2m_security_psk::id, key, sol_lwm2m_security_psk::key, known_clients, port, sol_lwm2m_security_rpk::private_key, PSK_KEY_LEN, sol_lwm2m_security_rpk::public_key, RPK_PRIVATE_KEY_LEN, RPK_PUBLIC_KEY_LEN, server, sol_blob_new_dup(), sol_blob_unref(), SOL_DECODE_BOTH, sol_init(), sol_lwm2m_bootstrap_server_add_request_monitor(), sol_lwm2m_bootstrap_server_del(), sol_lwm2m_bootstrap_server_new(), SOL_LWM2M_SECURITY_MODE_CERTIFICATE, SOL_LWM2M_SECURITY_MODE_PRE_SHARED_KEY, SOL_LWM2M_SECURITY_MODE_RAW_PUBLIC_KEY, sol_run(), sol_shutdown(), sol_str_slice_from_str(), sol_util_base16_decode(), and usage().
|
static |
References SOL_COAP_RESPONSE_CODE_CHANGED, sol_lwm2m_bootstrap_client_info_get_name(), and sol_lwm2m_bootstrap_server_send_finish().
Referenced by write_servers_cb().
|
static |
References LIFETIME, SERVER_OBJ_BINDING_RES_ID, SERVER_OBJ_LIFETIME_RES_ID, SERVER_OBJ_SHORT_RES_ID, SOL_COAP_RESPONSE_CODE_CHANGED, sol_lwm2m_bootstrap_client_info_get_name(), sol_lwm2m_bootstrap_server_write(), sol_lwm2m_resource_clear(), SOL_LWM2M_RESOURCE_DATA_TYPE_STRING, SOL_LWM2M_RESOURCE_SINGLE_INIT, SOL_LWM2M_RESOURCE_SINGLE_INT_INIT, sol_util_array_size, and write_server_one_cb().
Referenced by delete_all_cb().
|
static |
References LIFETIME, SERVER_OBJ_BINDING_RES_ID, SERVER_OBJ_LIFETIME_RES_ID, SERVER_OBJ_SHORT_RES_ID, SOL_COAP_RESPONSE_CODE_CHANGED, sol_lwm2m_bootstrap_client_info_get_name(), sol_lwm2m_bootstrap_server_write_object(), sol_lwm2m_resource_clear(), SOL_LWM2M_RESOURCE_DATA_TYPE_STRING, SOL_LWM2M_RESOURCE_SINGLE_INIT, SOL_LWM2M_RESOURCE_SINGLE_INT_INIT, sol_util_array_size, and write_servers_cb().
Referenced by write_sec_one_cb().
|
static |
References LIFETIME, SERVER_OBJ_LIFETIME_RES_ID, SOL_COAP_RESPONSE_CODE_CHANGED, sol_lwm2m_bootstrap_client_info_get_name(), sol_lwm2m_bootstrap_server_write(), sol_lwm2m_resource_clear(), SOL_LWM2M_RESOURCE_SINGLE_INT_INIT, and write_resource_cb().
Referenced by write_server_one_cb().
|
static |
const char* known_clients[] = { "cli1", "cli2", NULL } |
Referenced by main().
|
static |
|
static |
|
static |