X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fmeshlink.h;h=385c12cec44b17f5a5609e62d5ad42b6607ba507;hb=b5aaabe0fcb104ef7801a68f4f9e6b77732dbb28;hp=e0f1bae7b09d6413d9b809ef514cbe5f75143348;hpb=be83b0af60449c7b35d17d97f2e6dc12f611e831;p=meshlink diff --git a/src/meshlink.h b/src/meshlink.h index e0f1bae7..385c12ce 100644 --- a/src/meshlink.h +++ b/src/meshlink.h @@ -173,7 +173,7 @@ extern void meshlink_open_params_free(meshlink_open_params_t *params); * @param params A pointer to a meshlink_open_params_t which must have been created earlier with meshlink_open_params_init(). * @param netns A filedescriptor that must point to a valid network namespace, or -1 to have MeshLink use the same namespace as the calling thread. * - * @return This function will return true if the open parameters have been succesfully updated, false otherwise. + * @return This function will return true if the open parameters have been successfully updated, false otherwise. */ extern bool meshlink_open_params_set_netns(meshlink_open_params_t *params, int netns) __attribute__((__warn_unused_result__)); @@ -184,7 +184,7 @@ extern bool meshlink_open_params_set_netns(meshlink_open_params_t *params, int n * @param key A pointer to a key, or NULL in case no encryption should be used. * @param keylen The length of the given key, or 0 in case no encryption should be used. * - * @return This function will return true if the open parameters have been succesfully updated, false otherwise. + * @return This function will return true if the open parameters have been successfully updated, false otherwise. */ extern bool meshlink_open_params_set_storage_key(meshlink_open_params_t *params, const void *key, size_t keylen) __attribute__((__warn_unused_result__)); @@ -514,7 +514,7 @@ extern void meshlink_set_log_cb(struct meshlink_handle *mesh, meshlink_log_level /// A callback for receiving error conditions encountered by the MeshLink thread. /** @param mesh A handle which represents an instance of MeshLink, or NULL. - * @param errno The error code describing what kind of error occured. + * @param errno The error code describing what kind of error occurred. */ typedef void (*meshlink_error_cb_t)(struct meshlink_handle *mesh, meshlink_errno_t meshlink_errno); @@ -1551,6 +1551,17 @@ extern void meshlink_set_dev_class_timeouts(struct meshlink_handle *mesh, dev_cl */ extern void meshlink_set_dev_class_fast_retry_period(struct meshlink_handle *mesh, dev_class_t devclass, int fast_retry_period); +/// Set which order invitations are committed +/** This determines in which order configuration files are written to disk during an invitation. + * By default, the invitee saves the configuration to disk first, then the inviter. + * By calling this function with @a inviter_commits_first set to true, the order is reversed. + * + * \memberof meshlink_handle + * @param mesh A handle which represents an instance of MeshLink. + * @param inviter_commits_first If true, then the node that invited a peer will commit data to disk first. + */ +extern void meshlink_set_inviter_commits_first(struct meshlink_handle *mesh, bool inviter_commits_first); + #ifdef __cplusplus } #endif