]> git.meshlink.io Git - meshlink/blobdiff - src/meshlink.h
object-oriented interface 1st durchstich, incl. chat program adopted. :-)
[meshlink] / src / meshlink.h
index 6672b67d459bbc2e41d28dafde00b91e1933328d..603dbbd2e42a6004dbdb958b930ba812bfd9f11d 100644 (file)
@@ -117,6 +117,9 @@ extern const char *meshlink_strerror(meshlink_errno_t err);
  */
 extern meshlink_handle_t *meshlink_open(const char *confbase, const char *name);
 
+/// is used by the C++ wrapper to allocate more memory behind the handle
+extern meshlink_handle_t *meshlink_open_with_size(const char *confbase, const char *name, size_t size);
+
 /// Start MeshLink.
 /** This function causes MeshLink to open network sockets, make outgoing connections, and
  *  create a new thread, which will handle all network I/O.
@@ -277,6 +280,18 @@ extern ssize_t meshlink_get_pmtu(meshlink_handle_t *mesh, meshlink_node_t *desti
  */
 extern meshlink_node_t *meshlink_get_node(meshlink_handle_t *mesh, const char *name);
 
+/// Get the fingerprint of a node's public key.
+/** This function returns a fingerprint of the node's public key.
+ *  It should be treated as an opaque blob.
+ *
+ *  @param mesh         A handle which represents an instance of MeshLink.
+ *  @param node         A pointer to a meshlink_node_t describing the node.
+ *
+ *  @return            A nul-terminated C string containing the fingerprint of the node's public key in a printable ASCII format.
+ *                      The application should call free() after it is done using this string.
+ */
+extern char *meshlink_get_fingerprint(meshlink_handle_t *mesh, meshlink_node_t *node);
+
 /// Get a list of all nodes.
 /** This function returns a list with handles for all known nodes.
  *