summaryrefslogtreecommitdiff
path: root/src/messenger/messenger_api_util.h
diff options
context:
space:
mode:
authorTheJackiMonster <thejackimonster@gmail.com>2021-05-24 01:30:17 +0200
committerTheJackiMonster <thejackimonster@gmail.com>2021-06-11 13:47:57 +0200
commitd0eec6097f79c7fb3ea8b5d8bb0dcca1da1f85a6 (patch)
treec0cc57a0f066bc1d3c528323c33903038747eca8 /src/messenger/messenger_api_util.h
parent2549225b825f34b0dfbe9f4a13f134963f3ba58d (diff)
-moved messenger service out of experimentaldev/thejackimonster/messenger
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com> -moved out of experimental, included protocol versions into ports and fixed byte-order of 32bit integers in messages Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
Diffstat (limited to 'src/messenger/messenger_api_util.h')
-rw-r--r--src/messenger/messenger_api_util.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/messenger/messenger_api_util.h b/src/messenger/messenger_api_util.h
index c70a3601f..af562a1e8 100644
--- a/src/messenger/messenger_api_util.h
+++ b/src/messenger/messenger_api_util.h
@@ -32,6 +32,7 @@
#include "gnunet_crypto_lib.h"
#include "gnunet_disk_lib.h"
#include "gnunet_identity_service.h"
+#include "gnunet_messenger_service.h"
/**
* Starts an urgent task to close a CADET channel asynchronously.
@@ -61,4 +62,17 @@ generate_free_member_id (struct GNUNET_ShortHashCode *id, const struct GNUNET_CO
const struct GNUNET_IDENTITY_PublicKey*
get_anonymous_public_key ();
+/**
+ * Converts a Messenger service key of a room to the specific port which
+ * gets used for the CADET channels.
+ *
+ * The port includes upper bits of the #GNUNET_MESSENGER_VERSION to
+ * reduce the chance of incompatible connections.
+ *
+ * @param[in] key Messenger service room key
+ * @param[out] port CADET service port
+ */
+void
+convert_messenger_key_to_port(const struct GNUNET_HashCode *key, struct GNUNET_HashCode *port);
+
#endif //GNUNET_SERVICE_MESSENGER_UTIL_H