aboutsummaryrefslogtreecommitdiff
path: root/src/tun
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-12-20 15:26:03 +0000
committerChristian Grothoff <christian@grothoff.org>2013-12-20 15:26:03 +0000
commitd544e81283a24082e6423c8f4377939f6fefa780 (patch)
treeab8aaf264cdd6d27853ff15a2f7542c801acf721 /src/tun
parenta0a09022f0d0df917465b8e71753a69f066058d3 (diff)
downloadgnunet-d544e81283a24082e6423c8f4377939f6fefa780.tar.gz
gnunet-d544e81283a24082e6423c8f4377939f6fefa780.zip
-use the same hash function to map service name to hash, not once strlen and then strlen+1
Diffstat (limited to 'src/tun')
-rw-r--r--src/tun/regex.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/tun/regex.c b/src/tun/regex.c
index 056062e5f..f37c35122 100644
--- a/src/tun/regex.c
+++ b/src/tun/regex.c
@@ -460,4 +460,22 @@ GNUNET_TUN_ipv6policy2regex (const char *policy)
460} 460}
461 461
462 462
463/**
464 * Hash the service name of a hosted service to the
465 * hash code that is used to identify the service on
466 * the network.
467 *
468 * @param service_name a string
469 * @param hc corresponding hash
470 */
471void
472GNUNET_TUN_service_name_to_hash (const char *service_name,
473 struct GNUNET_HashCode *hc)
474{
475 GNUNET_CRYPTO_hash (service_name,
476 strlen (service_name),
477 hc);
478}
479
480
463/* end of regex.c */ 481/* end of regex.c */