* GNUNET_OK otherwise
*/
static int
-test_result_present (void *cls, const GNUNET_HashCode * key, void *value)
+test_result_present (void *cls, const struct GNUNET_HashCode * key, void *value)
{
const struct GNUNET_FS_Uri *uri = cls;
struct GNUNET_FS_SearchResult *sr = value;
* @return GNUNET_OK
*/
static int
-get_result_present (void *cls, const GNUNET_HashCode * key, void *value)
+get_result_present (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct GetResultContext *grc = cls;
struct GNUNET_FS_SearchResult *sr = value;
const struct GNUNET_FS_Uri *uri,
const struct GNUNET_CONTAINER_MetaData *meta)
{
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
struct GNUNET_FS_SearchResult *sr;
struct GetResultContext grc;
int is_new;
const struct GNUNET_CONTAINER_MetaData *meta)
{
struct GNUNET_FS_Uri uu;
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
struct GNUNET_FS_SearchResult *sr;
/* check if new */
size_t edata_size,
char *data)
{
- GNUNET_HashCode q;
+ struct GNUNET_HashCode q;
struct GNUNET_CRYPTO_AesSessionKey skey;
struct GNUNET_CRYPTO_AesInitializationVector iv;
int i;
&q);
/* find key */
for (i = 0; i < sc->uri->data.ksk.keywordCount; i++)
- if (0 == memcmp (&q, &sc->requests[i].query, sizeof (GNUNET_HashCode)))
+ if (0 == memcmp (&q, &sc->requests[i].query, sizeof (struct GNUNET_HashCode)))
break;
if (i == sc->uri->data.ksk.keywordCount)
{
const char *uris;
size_t off;
char *emsg;
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
char *identifier;
/* decrypt */
/**
* Where to store the keys.
*/
- GNUNET_HashCode *xoff;
+ struct GNUNET_HashCode *xoff;
/**
* Search context we are iterating for.
* @return GNUNET_OK to continue iterating
*/
static int
-build_result_set (void *cls, const GNUNET_HashCode * key, void *value)
+build_result_set (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct MessageBuilderContext *mbc = cls;
struct GNUNET_FS_SearchResult *sr = value;
* @return GNUNET_OK to continue iterating
*/
static int
-find_result_set (void *cls, const GNUNET_HashCode * key, void *value)
+find_result_set (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct MessageBuilderContext *mbc = cls;
struct GNUNET_FS_SearchResult *sr = value;
size_t msize;
struct SearchMessage *sm;
const char *identifier;
- GNUNET_HashCode key;
- GNUNET_HashCode idh;
+ struct GNUNET_HashCode key;
+ struct GNUNET_HashCode idh;
unsigned int sqms;
uint32_t options;
mbc.skip_cnt = sc->search_request_map_offset;
sm = buf;
sm->header.type = htons (GNUNET_MESSAGE_TYPE_FS_START_SEARCH);
- mbc.xoff = (GNUNET_HashCode *) & sm[1];
+ mbc.xoff = (struct GNUNET_HashCode *) & sm[1];
options = SEARCH_MESSAGE_OPTION_NONE;
if (0 != (sc->options & GNUNET_FS_SEARCH_OPTION_LOOPBACK_ONLY))
options |= SEARCH_MESSAGE_OPTION_LOOPBACK_ONLY;
GNUNET_CONTAINER_multihashmap_iterate (sc->master_result_map,
&find_result_set, &mbc);
sqms = mbc.put_cnt;
- mbc.put_cnt = (size - msize) / sizeof (GNUNET_HashCode);
+ mbc.put_cnt = (size - msize) / sizeof (struct GNUNET_HashCode);
mbc.put_cnt = GNUNET_MIN (mbc.put_cnt, sqms - mbc.skip_cnt);
if (sc->search_request_map_offset < sqms)
GNUNET_assert (mbc.put_cnt > 0);
sm->header.size = htons (msize);
sm->type = htonl (GNUNET_BLOCK_TYPE_ANY);
sm->anonymity_level = htonl (sc->anonymity);
- memset (&sm->target, 0, sizeof (GNUNET_HashCode));
+ memset (&sm->target, 0, sizeof (struct GNUNET_HashCode));
sm->query = sc->requests[sc->keyword_offset].query;
- msize += sizeof (GNUNET_HashCode) * mbc.put_cnt;
+ msize += sizeof (struct GNUNET_HashCode) * mbc.put_cnt;
GNUNET_CONTAINER_multihashmap_iterate (sc->master_result_map,
&build_result_set, &mbc);
sm->header.size = htons (msize);
sm->target = sc->uri->data.sks.namespace;
identifier = sc->uri->data.sks.identifier;
GNUNET_CRYPTO_hash (identifier, strlen (identifier), &key);
- GNUNET_CRYPTO_hash (&key, sizeof (GNUNET_HashCode), &idh);
+ GNUNET_CRYPTO_hash (&key, sizeof (struct GNUNET_HashCode), &idh);
GNUNET_CRYPTO_hash_xor (&idh, &sm->target, &sm->query);
- mbc.put_cnt = (size - msize) / sizeof (GNUNET_HashCode);
+ mbc.put_cnt = (size - msize) / sizeof (struct GNUNET_HashCode);
sqms = GNUNET_CONTAINER_multihashmap_size (sc->master_result_map);
mbc.put_cnt = GNUNET_MIN (mbc.put_cnt, sqms - mbc.skip_cnt);
mbc.keyword_offset = 0;
if (sc->search_request_map_offset < sqms)
GNUNET_assert (mbc.put_cnt > 0);
- msize += sizeof (GNUNET_HashCode) * mbc.put_cnt;
+ msize += sizeof (struct GNUNET_HashCode) * mbc.put_cnt;
GNUNET_CONTAINER_multihashmap_iterate (sc->master_result_map,
&build_result_set, &mbc);
sm->header.size = htons (msize);
sqms =
GNUNET_CONTAINER_multihashmap_size (sc->master_result_map) -
sc->search_request_map_offset;
- fit = (GNUNET_SERVER_MAX_MESSAGE_SIZE - 1 - size) / sizeof (GNUNET_HashCode);
+ fit = (GNUNET_SERVER_MAX_MESSAGE_SIZE - 1 - size) / sizeof (struct GNUNET_HashCode);
fit = GNUNET_MIN (fit, sqms);
- size += sizeof (GNUNET_HashCode) * fit;
+ size += sizeof (struct GNUNET_HashCode) * fit;
GNUNET_CLIENT_notify_transmit_ready (sc->client, size,
GNUNET_CONSTANTS_SERVICE_TIMEOUT,
GNUNET_NO, &transmit_search_request, sc);
{
unsigned int i;
const char *keyword;
- GNUNET_HashCode hc;
+ struct GNUNET_HashCode hc;
struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pub;
struct GNUNET_CRYPTO_RsaPrivateKey *pk;
* @return GNUNET_OK
*/
static int
-search_result_freeze_probes (void *cls, const GNUNET_HashCode * key,
+search_result_freeze_probes (void *cls, const struct GNUNET_HashCode * key,
void *value)
{
struct GNUNET_FS_SearchResult *sr = value;
* @return GNUNET_OK
*/
static int
-search_result_resume_probes (void *cls, const GNUNET_HashCode * key,
+search_result_resume_probes (void *cls, const struct GNUNET_HashCode * key,
void *value)
{
struct GNUNET_FS_SearchResult *sr = value;
* @return GNUNET_OK
*/
static int
-search_result_suspend (void *cls, const GNUNET_HashCode * key, void *value)
+search_result_suspend (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct GNUNET_FS_SearchContext *sc = cls;
struct GNUNET_FS_SearchResult *sr = value;
* @return GNUNET_OK
*/
static int
-search_result_stop (void *cls, const GNUNET_HashCode * key, void *value)
+search_result_stop (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct GNUNET_FS_SearchContext *sc = cls;
struct GNUNET_FS_SearchResult *sr = value;
* @return GNUNET_OK
*/
static int
-search_result_free (void *cls, const GNUNET_HashCode * key, void *value)
+search_result_free (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct GNUNET_FS_SearchResult *sr = value;