You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ SPDX-License-Identifier: AGPL3.0-or-later
*/
/**
/* NG API */
#include "gnunet_nt_lib.h"
-/**
- * Key used for storing HELLOs in the peerstore
- */
-#define GNUNET_HELLO_PEERSTORE_KEY "hello"
/**
* Build address record by signing raw information with private key.
*/
void
GNUNET_HELLO_sign_address (const char *address,
- enum GNUNET_NetworkType nt,
- struct GNUNET_TIME_Absolute expiration,
- const struct GNUNET_CRYPTO_EddsaPrivateKey *private_key,
- void **result,
- size_t *result_size);
+ enum GNUNET_NetworkType nt,
+ struct GNUNET_TIME_Absolute expiration,
+ const struct GNUNET_CRYPTO_EddsaPrivateKey *private_key,
+ void **result,
+ size_t *result_size);
/**
*/
char *
GNUNET_HELLO_extract_address (const void *raw,
- size_t raw_size,
- const struct GNUNET_PeerIdentity *pid,
- enum GNUNET_NetworkType *nt,
- struct GNUNET_TIME_Absolute *expiration);
+ size_t raw_size,
+ const struct GNUNET_PeerIdentity *pid,
+ enum GNUNET_NetworkType *nt,
+ struct GNUNET_TIME_Absolute *expiration);
+
+/**
+ * Given an address as a string, extract the prefix that identifies
+ * the communicator offering transmissions to that address.
+ *
+ * @param address a peer's address
+ * @return NULL if the address is mal-formed, otherwise the prefix
+ */
+char *
+GNUNET_HELLO_address_to_prefix (const char *address);
#if 0 /* keep Emacsens' auto-indent happy */