void (*full_meshlink_set_storage_policy)(struct meshlink_handle *mesh, meshlink_storage_policy_t policy);
full_devtool_set_inviter_commits_first_t *full_devtool_set_inviter_commits_first;
+void (*full_devtool_reset_node_counters)(struct meshlink_handle *mesh, meshlink_node_t *node, struct devtool_node_status *);
void init_full(void) {
void *handle = dlopen("libmeshlink.so", RTLD_LAZY | RTLD_LOCAL | RTLD_DEEPBIND);
assert(handle);
- full_meshlink_errno = dlsym(handle, "meshlink_errno");
- full_meshlink_strerror = dlsym(handle, "meshlink_strerror");
- full_meshlink_open_params_init = dlsym(handle, "meshlink_open_params_init");
- full_meshlink_open_params_free = dlsym(handle, "meshlink_open_params_free");
- full_meshlink_open_params_set_netns = dlsym(handle, "meshlink_open_params_set_netns");
- full_meshlink_open_params_set_storage_key = dlsym(handle, "meshlink_open_params_set_storage_key");
- full_meshlink_open_params_set_storage_policy = dlsym(handle, "meshlink_open_params_set_storage_policy");
- full_meshlink_open_params_set_lock_filename = dlsym(handle, "meshlink_open_params_set_lock_filename");
- full_meshlink_open_ex = dlsym(handle, "meshlink_open_ex");
- full_meshlink_open = dlsym(handle, "meshlink_open");
- full_meshlink_open_encrypted = dlsym(handle, "meshlink_open_encrypted");
- full_meshlink_open_ephemeral = dlsym(handle, "meshlink_open_ephemeral");
- full_meshlink_submesh_open = dlsym(handle, "meshlink_submesh_open");
- full_meshlink_start = dlsym(handle, "meshlink_start");
- full_meshlink_stop = dlsym(handle, "meshlink_stop");
- full_meshlink_close = dlsym(handle, "meshlink_close");
- full_meshlink_destroy = dlsym(handle, "meshlink_destroy");
- full_meshlink_destroy_ex = dlsym(handle, "meshlink_destroy_ex");
- full_meshlink_set_receive_cb = dlsym(handle, "meshlink_set_receive_cb");
- full_meshlink_set_connection_try_cb = dlsym(handle, "meshlink_set_connection_try_cb");
- full_meshlink_set_node_status_cb = dlsym(handle, "meshlink_set_node_status_cb");
- full_meshlink_set_node_pmtu_cb = dlsym(handle, "meshlink_set_node_pmtu_cb");
- full_meshlink_set_node_duplicate_cb = dlsym(handle, "meshlink_set_node_duplicate_cb");
- full_meshlink_set_log_cb = dlsym(handle, "meshlink_set_log_cb");
- full_meshlink_set_error_cb = dlsym(handle, "meshlink_set_error_cb");
- full_meshlink_set_blacklisted_cb = dlsym(handle, "meshlink_set_blacklisted_cb");
- full_meshlink_send = dlsym(handle, "meshlink_send");
- full_meshlink_get_pmtu = dlsym(handle, "meshlink_get_pmtu");
- full_meshlink_get_self = dlsym(handle, "meshlink_get_self");
- full_meshlink_get_node = dlsym(handle, "meshlink_get_node");
- full_meshlink_get_submesh = dlsym(handle, "meshlink_get_submesh");
- full_meshlink_get_fingerprint = dlsym(handle, "meshlink_get_fingerprint");
- full_meshlink_get_all_nodes = dlsym(handle, "meshlink_get_all_nodes");
- full_meshlink_sign = dlsym(handle, "meshlink_sign");
- full_meshlink_get_all_nodes_by_dev_class = dlsym(handle, "meshlink_get_all_nodes_by_dev_class");
- full_meshlink_get_all_nodes_by_submesh = dlsym(handle, "meshlink_get_all_nodes_by_submesh");
- full_meshlink_get_all_nodes_by_last_reachable = dlsym(handle, "meshlink_get_all_nodes_by_last_reachable");
- full_meshlink_get_all_nodes_by_blacklisted = dlsym(handle, "meshlink_get_all_nodes_by_blacklisted");
- full_meshlink_get_node_dev_class = dlsym(handle, "meshlink_get_node_dev_class");
- full_meshlink_get_node_blacklisted = dlsym(handle, "meshlink_get_node_blacklisted");
- full_meshlink_get_node_submesh = dlsym(handle, "meshlink_get_node_submesh");
- full_meshlink_get_node_reachability = dlsym(handle, "meshlink_get_node_reachability");
- full_meshlink_verify = dlsym(handle, "meshlink_verify");
- full_meshlink_set_canonical_address = dlsym(handle, "meshlink_set_canonical_address");
- full_meshlink_clear_canonical_address = dlsym(handle, "meshlink_clear_canonical_address");
- full_meshlink_add_invitation_address = dlsym(handle, "meshlink_add_invitation_address");
- full_meshlink_clear_invitation_addresses = dlsym(handle, "meshlink_clear_invitation_addresses");
- full_meshlink_get_external_address = dlsym(handle, "meshlink_get_external_address");
- full_meshlink_get_external_address_for_family = dlsym(handle, "meshlink_get_external_address_for_family");
- full_meshlink_get_local_address_for_family = dlsym(handle, "meshlink_get_local_address_for_family");
- full_meshlink_add_external_address = dlsym(handle, "meshlink_add_external_address");
- full_meshlink_get_port = dlsym(handle, "meshlink_get_port");
- full_meshlink_set_port = dlsym(handle, "meshlink_set_port");
- full_meshlink_set_invitation_timeout = dlsym(handle, "meshlink_set_invitation_timeout");
- full_meshlink_invite_ex = dlsym(handle, "meshlink_invite_ex");
- full_meshlink_invite = dlsym(handle, "meshlink_invite");
- full_meshlink_join = dlsym(handle, "meshlink_join");
- full_meshlink_export = dlsym(handle, "meshlink_export");
- full_meshlink_import = dlsym(handle, "meshlink_import");
- full_meshlink_forget_node = dlsym(handle, "meshlink_forget_node");
- full_meshlink_blacklist = dlsym(handle, "meshlink_blacklist");
- full_meshlink_blacklist_by_name = dlsym(handle, "meshlink_blacklist_by_name");
- full_meshlink_whitelist = dlsym(handle, "meshlink_whitelist");
- full_meshlink_whitelist_by_name = dlsym(handle, "meshlink_whitelist_by_name");
- full_meshlink_set_default_blacklist = dlsym(handle, "meshlink_set_default_blacklist");
- full_meshlink_set_channel_listen_cb = dlsym(handle, "meshlink_set_channel_listen_cb");
- full_meshlink_set_channel_accept_cb = dlsym(handle, "meshlink_set_channel_accept_cb");
- full_meshlink_set_channel_receive_cb = dlsym(handle, "meshlink_set_channel_receive_cb");
- full_meshlink_set_channel_poll_cb = dlsym(handle, "meshlink_set_channel_poll_cb");
- full_meshlink_set_channel_sndbuf = dlsym(handle, "meshlink_set_channel_sndbuf");
- full_meshlink_set_channel_rcvbuf = dlsym(handle, "meshlink_set_channel_rcvbuf");
- full_meshlink_set_channel_sndbuf_storage = dlsym(handle, "meshlink_set_channel_sndbuf_storage");
- full_meshlink_set_channel_rcvbuf_storage = dlsym(handle, "meshlink_set_channel_rcvbuf_storage");
- full_meshlink_set_channel_flags = dlsym(handle, "meshlink_set_channel_flags");
- full_meshlink_channel_open_ex = dlsym(handle, "meshlink_channel_open_ex");
- full_meshlink_channel_open = dlsym(handle, "meshlink_channel_open");
- full_meshlink_channel_shutdown = dlsym(handle, "meshlink_channel_shutdown");
- full_meshlink_channel_close = dlsym(handle, "meshlink_channel_close");
- full_meshlink_channel_abort = dlsym(handle, "meshlink_channel_abort");
- full_meshlink_channel_send = dlsym(handle, "meshlink_channel_send");
- full_meshlink_channel_aio_send = dlsym(handle, "meshlink_channel_aio_send");
- full_meshlink_channel_aio_fd_send = dlsym(handle, "meshlink_channel_aio_fd_send");
- full_meshlink_channel_aio_receive = dlsym(handle, "meshlink_channel_aio_receive");
- full_meshlink_channel_aio_fd_receive = dlsym(handle, "meshlink_channel_aio_fd_receive");
- full_meshlink_channel_get_flags = dlsym(handle, "meshlink_channel_get_flags");
- full_meshlink_channel_get_sendq = dlsym(handle, "meshlink_channel_get_sendq");
- full_meshlink_channel_get_recvq = dlsym(handle, "meshlink_channel_get_recvq");
- full_meshlink_channel_get_mss = dlsym(handle, "meshlink_channel_get_mss");
- full_meshlink_set_node_channel_timeout = dlsym(handle, "meshlink_set_node_channel_timeout");
- full_meshlink_hint_address = dlsym(handle, "meshlink_hint_address");
- full_meshlink_enable_discovery = dlsym(handle, "meshlink_enable_discovery");
- full_meshlink_hint_network_change = dlsym(handle, "meshlink_hint_network_change");
- full_meshlink_encrypted_key_rotate = dlsym(handle, "meshlink_encrypted_key_rotate");
- full_meshlink_set_dev_class_timeouts = dlsym(handle, "meshlink_set_dev_class_timeouts");
- full_meshlink_set_dev_class_fast_retry_period = dlsym(handle, "meshlink_set_dev_class_fast_retry_period");
- full_meshlink_set_dev_class_maxtimeout = dlsym(handle, "meshlink_set_dev_class_maxtimeout");
- full_meshlink_reset_timers = dlsym(handle, "meshlink_reset_timers");
- full_meshlink_set_inviter_commits_first = dlsym(handle, "meshlink_set_inviter_commits_first");
- full_meshlink_set_external_address_discovery_url = dlsym(handle, "meshlink_set_external_address_discovery_url");
- full_meshlink_set_scheduling_granularity = dlsym(handle, "meshlink_set_scheduling_granularity");
- full_meshlink_set_storage_policy = dlsym(handle, "meshlink_set_storage_policy");
+ assert(full_meshlink_errno = dlsym(handle, "meshlink_errno"));
+ assert(full_meshlink_strerror = dlsym(handle, "meshlink_strerror"));
+ assert(full_meshlink_open_params_init = dlsym(handle, "meshlink_open_params_init"));
+ assert(full_meshlink_open_params_free = dlsym(handle, "meshlink_open_params_free"));
+ assert(full_meshlink_open_params_set_netns = dlsym(handle, "meshlink_open_params_set_netns"));
+ assert(full_meshlink_open_params_set_storage_key = dlsym(handle, "meshlink_open_params_set_storage_key"));
+ assert(full_meshlink_open_params_set_storage_policy = dlsym(handle, "meshlink_open_params_set_storage_policy"));
+ assert(full_meshlink_open_params_set_lock_filename = dlsym(handle, "meshlink_open_params_set_lock_filename"));
+ assert(full_meshlink_open_ex = dlsym(handle, "meshlink_open_ex"));
+ assert(full_meshlink_open = dlsym(handle, "meshlink_open"));
+ assert(full_meshlink_open_encrypted = dlsym(handle, "meshlink_open_encrypted"));
+ assert(full_meshlink_open_ephemeral = dlsym(handle, "meshlink_open_ephemeral"));
+ assert(full_meshlink_submesh_open = dlsym(handle, "meshlink_submesh_open"));
+ assert(full_meshlink_start = dlsym(handle, "meshlink_start"));
+ assert(full_meshlink_stop = dlsym(handle, "meshlink_stop"));
+ assert(full_meshlink_close = dlsym(handle, "meshlink_close"));
+ assert(full_meshlink_destroy = dlsym(handle, "meshlink_destroy"));
+ assert(full_meshlink_destroy_ex = dlsym(handle, "meshlink_destroy_ex"));
+ assert(full_meshlink_set_receive_cb = dlsym(handle, "meshlink_set_receive_cb"));
+ assert(full_meshlink_set_connection_try_cb = dlsym(handle, "meshlink_set_connection_try_cb"));
+ assert(full_meshlink_set_node_status_cb = dlsym(handle, "meshlink_set_node_status_cb"));
+ assert(full_meshlink_set_node_pmtu_cb = dlsym(handle, "meshlink_set_node_pmtu_cb"));
+ assert(full_meshlink_set_node_duplicate_cb = dlsym(handle, "meshlink_set_node_duplicate_cb"));
+ assert(full_meshlink_set_log_cb = dlsym(handle, "meshlink_set_log_cb"));
+ assert(full_meshlink_set_error_cb = dlsym(handle, "meshlink_set_error_cb"));
+ assert(full_meshlink_set_blacklisted_cb = dlsym(handle, "meshlink_set_blacklisted_cb"));
+ assert(full_meshlink_send = dlsym(handle, "meshlink_send"));
+ assert(full_meshlink_get_pmtu = dlsym(handle, "meshlink_get_pmtu"));
+ assert(full_meshlink_get_self = dlsym(handle, "meshlink_get_self"));
+ assert(full_meshlink_get_node = dlsym(handle, "meshlink_get_node"));
+ assert(full_meshlink_get_submesh = dlsym(handle, "meshlink_get_submesh"));
+ assert(full_meshlink_get_fingerprint = dlsym(handle, "meshlink_get_fingerprint"));
+ assert(full_meshlink_get_all_nodes = dlsym(handle, "meshlink_get_all_nodes"));
+ assert(full_meshlink_sign = dlsym(handle, "meshlink_sign"));
+ assert(full_meshlink_get_all_nodes_by_dev_class = dlsym(handle, "meshlink_get_all_nodes_by_dev_class"));
+ assert(full_meshlink_get_all_nodes_by_submesh = dlsym(handle, "meshlink_get_all_nodes_by_submesh"));
+ assert(full_meshlink_get_all_nodes_by_last_reachable = dlsym(handle, "meshlink_get_all_nodes_by_last_reachable"));
+ assert(full_meshlink_get_all_nodes_by_blacklisted = dlsym(handle, "meshlink_get_all_nodes_by_blacklisted"));
+ assert(full_meshlink_get_node_dev_class = dlsym(handle, "meshlink_get_node_dev_class"));
+ assert(full_meshlink_get_node_blacklisted = dlsym(handle, "meshlink_get_node_blacklisted"));
+ assert(full_meshlink_get_node_submesh = dlsym(handle, "meshlink_get_node_submesh"));
+ assert(full_meshlink_get_node_reachability = dlsym(handle, "meshlink_get_node_reachability"));
+ assert(full_meshlink_verify = dlsym(handle, "meshlink_verify"));
+ assert(full_meshlink_set_canonical_address = dlsym(handle, "meshlink_set_canonical_address"));
+ assert(full_meshlink_clear_canonical_address = dlsym(handle, "meshlink_clear_canonical_address"));
+ assert(full_meshlink_add_invitation_address = dlsym(handle, "meshlink_add_invitation_address"));
+ assert(full_meshlink_clear_invitation_addresses = dlsym(handle, "meshlink_clear_invitation_addresses"));
+ assert(full_meshlink_get_external_address = dlsym(handle, "meshlink_get_external_address"));
+ assert(full_meshlink_get_external_address_for_family = dlsym(handle, "meshlink_get_external_address_for_family"));
+ assert(full_meshlink_get_local_address_for_family = dlsym(handle, "meshlink_get_local_address_for_family"));
+ assert(full_meshlink_add_external_address = dlsym(handle, "meshlink_add_external_address"));
+ assert(full_meshlink_get_port = dlsym(handle, "meshlink_get_port"));
+ assert(full_meshlink_set_port = dlsym(handle, "meshlink_set_port"));
+ assert(full_meshlink_set_invitation_timeout = dlsym(handle, "meshlink_set_invitation_timeout"));
+ assert(full_meshlink_invite_ex = dlsym(handle, "meshlink_invite_ex"));
+ assert(full_meshlink_invite = dlsym(handle, "meshlink_invite"));
+ assert(full_meshlink_join = dlsym(handle, "meshlink_join"));
+ assert(full_meshlink_export = dlsym(handle, "meshlink_export"));
+ assert(full_meshlink_import = dlsym(handle, "meshlink_import"));
+ assert(full_meshlink_forget_node = dlsym(handle, "meshlink_forget_node"));
+ assert(full_meshlink_blacklist = dlsym(handle, "meshlink_blacklist"));
+ assert(full_meshlink_blacklist_by_name = dlsym(handle, "meshlink_blacklist_by_name"));
+ assert(full_meshlink_whitelist = dlsym(handle, "meshlink_whitelist"));
+ assert(full_meshlink_whitelist_by_name = dlsym(handle, "meshlink_whitelist_by_name"));
+ assert(full_meshlink_set_default_blacklist = dlsym(handle, "meshlink_set_default_blacklist"));
+ assert(full_meshlink_set_channel_listen_cb = dlsym(handle, "meshlink_set_channel_listen_cb"));
+ assert(full_meshlink_set_channel_accept_cb = dlsym(handle, "meshlink_set_channel_accept_cb"));
+ assert(full_meshlink_set_channel_receive_cb = dlsym(handle, "meshlink_set_channel_receive_cb"));
+ assert(full_meshlink_set_channel_poll_cb = dlsym(handle, "meshlink_set_channel_poll_cb"));
+ assert(full_meshlink_set_channel_sndbuf = dlsym(handle, "meshlink_set_channel_sndbuf"));
+ assert(full_meshlink_set_channel_rcvbuf = dlsym(handle, "meshlink_set_channel_rcvbuf"));
+ assert(full_meshlink_set_channel_sndbuf_storage = dlsym(handle, "meshlink_set_channel_sndbuf_storage"));
+ assert(full_meshlink_set_channel_rcvbuf_storage = dlsym(handle, "meshlink_set_channel_rcvbuf_storage"));
+ assert(full_meshlink_set_channel_flags = dlsym(handle, "meshlink_set_channel_flags"));
+ assert(full_meshlink_channel_open_ex = dlsym(handle, "meshlink_channel_open_ex"));
+ assert(full_meshlink_channel_open = dlsym(handle, "meshlink_channel_open"));
+ assert(full_meshlink_channel_shutdown = dlsym(handle, "meshlink_channel_shutdown"));
+ assert(full_meshlink_channel_close = dlsym(handle, "meshlink_channel_close"));
+ assert(full_meshlink_channel_abort = dlsym(handle, "meshlink_channel_abort"));
+ assert(full_meshlink_channel_send = dlsym(handle, "meshlink_channel_send"));
+ assert(full_meshlink_channel_aio_send = dlsym(handle, "meshlink_channel_aio_send"));
+ assert(full_meshlink_channel_aio_fd_send = dlsym(handle, "meshlink_channel_aio_fd_send"));
+ assert(full_meshlink_channel_aio_receive = dlsym(handle, "meshlink_channel_aio_receive"));
+ assert(full_meshlink_channel_aio_fd_receive = dlsym(handle, "meshlink_channel_aio_fd_receive"));
+ assert(full_meshlink_channel_get_flags = dlsym(handle, "meshlink_channel_get_flags"));
+ assert(full_meshlink_channel_get_sendq = dlsym(handle, "meshlink_channel_get_sendq"));
+ assert(full_meshlink_channel_get_recvq = dlsym(handle, "meshlink_channel_get_recvq"));
+ assert(full_meshlink_channel_get_mss = dlsym(handle, "meshlink_channel_get_mss"));
+ assert(full_meshlink_set_node_channel_timeout = dlsym(handle, "meshlink_set_node_channel_timeout"));
+ assert(full_meshlink_hint_address = dlsym(handle, "meshlink_hint_address"));
+ assert(full_meshlink_enable_discovery = dlsym(handle, "meshlink_enable_discovery"));
+ assert(full_meshlink_hint_network_change = dlsym(handle, "meshlink_hint_network_change"));
+ assert(full_meshlink_encrypted_key_rotate = dlsym(handle, "meshlink_encrypted_key_rotate"));
+ assert(full_meshlink_set_dev_class_timeouts = dlsym(handle, "meshlink_set_dev_class_timeouts"));
+ assert(full_meshlink_set_dev_class_fast_retry_period = dlsym(handle, "meshlink_set_dev_class_fast_retry_period"));
+ assert(full_meshlink_set_dev_class_maxtimeout = dlsym(handle, "meshlink_set_dev_class_maxtimeout"));
+ assert(full_meshlink_reset_timers = dlsym(handle, "meshlink_reset_timers"));
+ assert(full_meshlink_set_inviter_commits_first = dlsym(handle, "meshlink_set_inviter_commits_first"));
+ assert(full_meshlink_set_external_address_discovery_url = dlsym(handle, "meshlink_set_external_address_discovery_url"));
+ assert(full_meshlink_set_scheduling_granularity = dlsym(handle, "meshlink_set_scheduling_granularity"));
+ assert(full_meshlink_set_storage_policy = dlsym(handle, "meshlink_set_storage_policy"));
- full_devtool_set_inviter_commits_first = dlsym(handle, "devtool_set_inviter_commits_first");
+ assert(full_devtool_set_inviter_commits_first = dlsym(handle, "devtool_set_inviter_commits_first"));
+ assert(full_devtool_reset_node_counters = dlsym(handle, "devtool_reset_node_counters"));
}