* @return The number of known nodes, or -1 in case of an error.
* This can be larger than nmemb, in which case not all nodes were stored in the nodes array.
*/
- ssize_t get_all_nodes(node **nodes, size_t nmemb) {
- return meshlink_get_all_nodes(this, (meshlink_node_t **)nodes, nmemb);
+ node **get_all_nodes(node **nodes, size_t *nmemb) {
+ return (node **)meshlink_get_all_nodes(this, (meshlink_node_t **)nodes, nmemb);
}
/// Sign data using the local node's MeshLink key.
*
* @param confbase The directory in which MeshLink will store its configuration files.
* @param name The name which this instance of the application will use in the mesh.
+ * @param appname The application name which will be used in the mesh.
*
* @return This function will return a pointer to a meshlink::mesh if MeshLink has succesfully set up its configuration files, NULL otherwise.
*/
- static mesh *open(const char *confbase, const char *name) {
- return (mesh *)meshlink_open(confbase, name);
+ static mesh *open(const char *confbase, const char *name, const char* appname) {
+ return (mesh *)meshlink_open(confbase, name, appname);
}
/// Close the MeshLink handle.