aboutsummaryrefslogtreecommitdiff
path: root/src/regex/regex_block_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-06-26 12:16:12 +0000
committerChristian Grothoff <christian@grothoff.org>2013-06-26 12:16:12 +0000
commit248fc3245a98731cf6fbb1bf460cd4e2e2d56de8 (patch)
treec0606c24a1c74d5f507d267b03d267a5cfaf4009 /src/regex/regex_block_lib.h
parentc0101989bb0864a3688f57370e712c91c14ab1cd (diff)
downloadgnunet-248fc3245a98731cf6fbb1bf460cd4e2e2d56de8.tar.gz
gnunet-248fc3245a98731cf6fbb1bf460cd4e2e2d56de8.zip
-moving REGEX_INTERNAL_check_proof to libgnunetregexblock, integrating proof check into block plugin
Diffstat (limited to 'src/regex/regex_block_lib.h')
-rw-r--r--src/regex/regex_block_lib.h25
1 files changed, 20 insertions, 5 deletions
diff --git a/src/regex/regex_block_lib.h b/src/regex/regex_block_lib.h
index 79bd20a1e..fb1c91353 100644
--- a/src/regex/regex_block_lib.h
+++ b/src/regex/regex_block_lib.h
@@ -58,6 +58,21 @@ struct REGEX_BLOCK_Edge
58 58
59 59
60/** 60/**
61 * Check if the given 'proof' matches the given 'key'.
62 *
63 * @param proof partial regex of a state
64 * @param proof_len number of bytes in 'proof'
65 * @param key hash of a state.
66 *
67 * @return GNUNET_OK if the proof is valid for the given key.
68 */
69int
70REGEX_INTERNAL_check_proof (const char *proof,
71 size_t proof_len,
72 const struct GNUNET_HashCode *key);
73
74
75/**
61 * Check if the regex block is well formed, including all edges. 76 * Check if the regex block is well formed, including all edges.
62 * 77 *
63 * @param block The start of the block. 78 * @param block The start of the block.
@@ -71,8 +86,8 @@ struct REGEX_BLOCK_Edge
71 */ 86 */
72int 87int
73REGEX_BLOCK_check (const struct RegexBlock *block, 88REGEX_BLOCK_check (const struct RegexBlock *block,
74 size_t size, 89 size_t size,
75 const char *xquery); 90 const char *xquery);
76 91
77 92
78/* FIXME: might want to use 'struct REGEX_BLOCK_Edge' here instead of 3 arguments! */ 93/* FIXME: might want to use 'struct REGEX_BLOCK_Edge' here instead of 3 arguments! */
@@ -88,9 +103,9 @@ REGEX_BLOCK_check (const struct RegexBlock *block,
88 * @return GNUNET_YES if should keep iterating, GNUNET_NO otherwise. 103 * @return GNUNET_YES if should keep iterating, GNUNET_NO otherwise.
89 */ 104 */
90typedef int (*REGEX_INTERNAL_EgdeIterator)(void *cls, 105typedef int (*REGEX_INTERNAL_EgdeIterator)(void *cls,
91 const char *token, 106 const char *token,
92 size_t len, 107 size_t len,
93 const struct GNUNET_HashCode *key); 108 const struct GNUNET_HashCode *key);
94 109
95 110
96/** 111/**