114 strlen (uri->
data.
sks.identifier),
119 if (uri->
data.
ksk.keywordCount > 0)
122 strlen (uri->
data.
ksk.keywords[0]),
162 unsigned int keywordCount;
169 keywords = uri->
data.
ksk.keywords;
170 keywordCount = uri->
data.
ksk.keywordCount;
171 n = keywordCount + 1;
172 for (i = 0; i < keywordCount; i++)
174 keyword = keywords[i];
175 n += strlen (keyword) - 1;
176 if (NULL != strstr (&keyword[1],
" "))
178 if (keyword[0] ==
'+')
183 for (i = 0; i < keywordCount; i++)
185 keyword = keywords[i];
186 if (NULL != strstr (&keyword[1],
" "))
189 if (keyword[0] ==
'+')
190 strcat (ret, keyword);
192 strcat (ret, &keyword[1]);
197 if (keyword[0] ==
'+')
198 strcat (ret, keyword);
200 strcat (ret, &keyword[1]);
230 while (out[rpos] !=
'\0')
232 if (out[rpos] ==
'%')
234 if (1 != sscanf (&out[rpos + 1],
"%2X", &hx))
239 "Malformed KSK URI (`%' must be followed by HEX number)"));
245 out[wpos++] = (char) hx;
249 out[wpos++] = out[rpos++];
269 #define GNUNET_FS_URI_KSK_PREFIX GNUNET_FS_URI_PREFIX GNUNET_FS_URI_KSK_INFIX 295 if ((s[slen - 1] ==
'+') || (s[pos] ==
'+'))
298 GNUNET_strdup (
_ (
"Malformed KSK URI (must not begin or end with `+')"));
303 for (i = pos; i < slen; i++)
305 if ((s[i] ==
'%') && (&s[i] == strstr (&s[i],
"%22")))
307 saw_quote = (saw_quote + 1) % 2;
311 if ((s[i] ==
'+') && (saw_quote == 0))
316 *emsg =
GNUNET_strdup (
_ (
"Malformed KSK URI (`++' not allowed)"));
323 *emsg =
GNUNET_strdup (
_ (
"Malformed KSK URI (quotes not balanced)"));
329 for (i = slen - 1; i >= (int) pos; i--)
331 if ((s[i] ==
'%') && (&s[i] == strstr (&s[i],
"%22")))
333 saw_quote = (saw_quote + 1) % 2;
336 if ((dup[i] ==
'+') && (saw_quote == 0))
339 if (NULL == keywords[max])
345 if (NULL == keywords[max])
351 ret->
data.
ksk.keywordCount = iret;
355 for (i = 0; i < max; i++)
363 #define GNUNET_FS_URI_SKS_PREFIX GNUNET_FS_URI_PREFIX GNUNET_FS_URI_SKS_INFIX 383 end = strchr (&s[pos],
'/');
402 #define GNUNET_FS_URI_CHK_PREFIX GNUNET_FS_URI_PREFIX GNUNET_FS_URI_CHK_INFIX 418 unsigned long long flen;
448 *emsg =
GNUNET_strdup (
_ (
"Malformed CHK URI (failed to decode CHK)"));
490 #define GNUNET_FS_URI_LOC_PREFIX GNUNET_FS_URI_PREFIX GNUNET_FS_URI_LOC_INFIX 492 #define SIGNATURE_ASCII_LENGTH 103 511 unsigned long long flen;
548 while ((s[npos] !=
'\0') && (s[npos] !=
'.'))
560 GNUNET_strdup (
_ (
"LOC URI malformed (wrong syntax for public key)"));
569 GNUNET_strdup (
_ (
"LOC URI malformed (could not decode public key)"));
573 if (s[npos++] !=
'.')
575 *emsg =
GNUNET_strdup (
_ (
"LOC URI malformed (could not find signature)"));
582 GNUNET_strdup (
_ (
"LOC URI malformed (wrong syntax for signature)"));
593 GNUNET_strdup (
_ (
"LOC URI malformed (could not decode signature)"));
597 if (s[npos++] !=
'.')
600 _ (
"LOC URI malformed (wrong syntax for expiration time)"));
603 if (1 != sscanf (&s[npos],
"%llu", &exptime))
606 GNUNET_strdup (
_ (
"LOC URI malformed (could not parse expiration time)"));
620 GNUNET_strdup (
_ (
"LOC URI malformed (signature failed validation)"));
685 for (i = 0; i < uri->
data.
ksk.keywordCount; i++)
716 return uri->
data.
ksk.keywordCount;
739 if (NULL == iterator)
740 return uri->
data.
ksk.keywordCount;
741 for (i = 0; i < uri->
data.
ksk.keywordCount; i++)
743 keyword = uri->
data.
ksk.keywords[i];
746 if (
GNUNET_OK != iterator (iterator_cls, &keyword[1],(keyword[0] ==
'+') ))
771 for (i = 0; i < uri->
data.
ksk.keywordCount; i++)
773 old = uri->
data.
ksk.keywords[i];
774 if (0 == strcmp (&old[1], keyword))
797 for (i = 0; i < uri->
data.
ksk.keywordCount; i++)
799 old = uri->
data.
ksk.keywords[i];
800 if (0 == strcmp (&old[1], keyword))
806 uri->
data.
ksk.keywordCount - 1);
952 if ((u1 == NULL) && (u2 == NULL))
963 kc = u1->
data.
ksk.keywordCount;
965 for (i = 0; i < u1->
data.
ksk.keywordCount; i++)
967 for (i = 0; i < u2->
data.
ksk.keywordCount; i++)
971 for (j = 0; j < u1->
data.
ksk.keywordCount; j++)
972 if (0 == strcmp (kp + 1, kl[j] + 1))
984 ret->
data.
ksk.keywordCount = kc;
1009 if (ret->
data.
ksk.keywordCount >=
1016 if (ret->
data.
ksk.keywordCount > 0)
1020 for (i = 0; i < ret->
data.
ksk.keywordCount; i++)
1024 ret->
data.
ksk.keywords = NULL;
1062 unsigned int num_Words;
1069 if (keywords == NULL)
1080 while (
'\0' != *pos)
1082 if ((saw_quote == 0) && (isspace ((
unsigned char) *pos)))
1086 else if (0 == inWord)
1092 saw_quote = (saw_quote + 1) % 2;
1104 *emsg =
GNUNET_strdup (
_ (
"Number of double-quotes not balanced!\n"));
1111 while (
'\0' != *pos)
1113 if ((saw_quote == 0) && (isspace ((
unsigned char) *pos)))
1118 else if (0 == inWord)
1120 keywordarr[num_Words] = pos;
1125 saw_quote = (saw_quote + 1) % 2;
1158 const char *keyword;
1170 (0 == strncmp (argv[0],
1178 uri->
data.
ksk.keywordCount = argc;
1180 for (i = 0; i < argc; i++)
1183 if (keyword[0] ==
'+')
1197 uri->
data.
ksk.keywords[i] = val;
1231 if ((0 == memcmp (&u1->
data.
sks.ns,
1234 (0 == strcmp (u1->
data.
sks.identifier, u2->
data.
sks.identifier)))
1242 for (i = 0; i < u1->
data.
ksk.keywordCount; i++)
1245 for (j = 0; j < u2->
data.
ksk.keywordCount; j++)
1247 if (0 == strcmp (u1->
data.
ksk.keywords[i], u2->
data.
ksk.keywords[j]))
1264 +
sizeof(
unsigned short) +
sizeof(
unsigned short)) != 0)
1304 *pseudonym = uri->
data.
sks.ns;
1341 for (i = 0; i < uri->
data.
ksk.keywordCount; i++)
1417 array[index] = nkword;
1435 for (j = array_length - 1; j >= 0; j--)
1436 if (0 == strcmp (&array[j][1], s))
1450 uint8_t *free_str = NULL;
1451 uint8_t *str_to_normalize = (uint8_t *) data;
1452 uint8_t *normalized;
1455 if (str_to_normalize == NULL)
1460 free_str = (uint8_t *) u8_check ((
const uint8_t *)
data, data_len);
1461 if (free_str == NULL)
1468 free_str = u8_strconv_from_encoding (data,
1470 iconveh_escape_sequence);
1471 if (free_str == NULL)
1475 normalized = u8_tolower (str_to_normalize,
1476 strlen ((
char *) str_to_normalize),
1482 if (free_str != NULL)
1484 if (normalized != NULL)
1489 free_str[r_len] =
'\0';
1491 normalized = free_str;
1493 return (
char *) normalized;
1510 for (count = 0; s != NULL; count++)
1511 s = u8_next (&c, s);
1544 open_paren = ss - 1;
1545 while (NULL != (open_paren = strpbrk (open_paren + 1,
"[{(")))
1549 close_paren = strpbrk (open_paren + 1,
"]})");
1550 if (NULL == close_paren)
1552 switch (open_paren[0])
1555 if (
']' == close_paren[0])
1560 if (
'}' == close_paren[0])
1565 if (
')' == close_paren[0])
1572 if (match && (close_paren - open_paren > 1))
1574 tmp = close_paren[0];
1575 close_paren[0] =
'\0';
1577 if (
u8_strcount ((
const uint8_t *) &open_paren[1]) <= 2)
1579 close_paren[0] = tmp;
1586 (
const char **) array,
1596 close_paren - &open_paren[1]);
1597 if (normalized != NULL)
1600 (
const char **) array,
1613 close_paren[0] = tmp;
1624 #define TOKENS "_. /-!?#&+@\"\'\\;:,()[]{}$<>|" 1648 for (p = strtok (ss,
TOKENS); p != NULL; p = strtok (NULL,
TOKENS))
1663 if (normalized != NULL)
1666 (
const char **) array,
1710 const char *data_mime_type,
1715 char *normalized_data;
1728 (NULL != (sep = memchr (data,
'/', data_len))) && (sep != data))
1734 (
const char **) uri->
data.
ksk.keywords,
1747 (
const char **) uri->
data.
ksk.keywords,
1755 if (NULL != normalized_data)
1758 (
const char **) uri->
data.
ksk.keywords,
1786 char *full_name = NULL;
1789 int tok_keywords = 0;
1790 int paren_keywords = 0;
1803 if (NULL != full_name)
1805 filename = full_name;
1817 if (tok_keywords > 0)
1822 if (paren_keywords > 0)
1840 return(! ((isalnum ((
unsigned char) c)) || (c ==
'-') || (c ==
'_') ||
1841 (c ==
'.') || (c ==
'~')));
1862 const char *keyword;
1866 keywords = uri->
data.
ksk.keywords;
1867 keywordCount = uri->
data.
ksk.keywordCount;
1872 keyword = keywords[i];
1873 slen = strlen (keyword);
1875 for (j = 0; j < slen; j++)
1877 if ((j == 0) && (keyword[j] ==
' '))
1889 wpos = strlen (ret);
1892 keyword = keywords[i];
1893 slen = strlen (keyword);
1894 for (j = 0; j < slen; j++)
1896 if ((j == 0) && (keyword[j] ==
' '))
1900 sprintf (&ret[wpos],
"%%%02X", (
unsigned char) keyword[j]);
1905 ret[wpos++] = keyword[j];
1908 if (i != keywordCount - 1)
1970 (
const char *) &keyhash,
1971 (
const char *) &queryhash,
2003 "%s%s%s.%s.%llu.%s.%s.%llu",
2006 (
const char *) &keyhash,
2007 (
const char *) &queryhash,
2012 (
unsigned long long)
int GNUNET_FS_uri_loc_get_peer_identity(const struct GNUNET_FS_Uri *uri, struct GNUNET_PeerIdentity *peer)
Obtain the identity of the peer offering the data.
static int iterator(void *cls, const struct GNUNET_PeerIdentity *key, void *value)
Iterator over hash map entries.
#define GNUNET_FS_URI_KSK_PREFIX
#define GNUNET_FS_URI_SKS_INFIX
int GNUNET_FS_uri_test_ksk(const struct GNUNET_FS_Uri *uri)
Is this a keyword URI?
struct ContentHashKey chk
Query and key of the top GNUNET_EC_IBlock.
EXTRACTOR_MetaFormat
Format in which the extracted meta data is presented.
struct GNUNET_MessageHeader * msg
struct GNUNET_PeerIdentity peer
Peer offering the file.
struct FileIdentifier chk
Information needed to retrieve a file (content-hash-key plus file size).
struct GNUNET_TIME_Absolute GNUNET_FS_uri_loc_get_expiration(const struct GNUNET_FS_Uri *uri)
Obtain the expiration of the LOC URI.
#define GNUNET_array_append(arr, len, element)
Append an element to an array (growing the array by one).
#define GNUNET_CRYPTO_eddsa_sign(priv, ps, sig)
EdDSA sign a given block.
static int end
Set if we are to shutdown all services (including ARM).
struct GNUNET_FS_Uri * GNUNET_FS_uri_ksk_create_from_args(unsigned int argc, const char **argv)
Create an FS URI from a user-supplied command line of keywords.
struct GNUNET_FS_Uri * GNUNET_FS_uri_loc_create(const struct GNUNET_FS_Uri *base_uri, const struct GNUNET_CRYPTO_EddsaPrivateKey *sign_key, struct GNUNET_TIME_Absolute expiration_time)
Construct a location URI (this peer will be used for the location).
void GNUNET_FS_uri_ksk_add_keyword(struct GNUNET_FS_Uri *uri, const char *keyword, int is_mandatory)
Add the given keyword to the set of keywords represented by the URI.
static char * uri_chk_to_string(const struct GNUNET_FS_Uri *uri)
Convert a CHK URI to a string.
uint32_t purpose
What does this signature vouch for? This must contain a GNUNET_SIGNATURE_PURPOSE_XXX constant (from g...
struct GNUNET_FS_Uri::@13::@15 sks
struct GNUNET_FS_Uri * GNUNET_FS_uri_parse(const char *uri, char **emsg)
Convert a UTF-8 String to a URI.
static struct GNUNET_FS_Uri * uri_loc_parse(const char *s, char **emsg)
Parse a LOC URI.
static size_t u8_strcount(const uint8_t *s)
Counts the number of UTF-8 characters (not bytes) in the string, returns that count.
static void insert_non_mandatory_keyword(const char *s, char **array, int index)
Add a keyword as non-mandatory (with ' '-prefix) to the given keyword list at offset 'index'...
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
struct GNUNET_TIME_AbsoluteNBO exptime
Expiration time of the offer.
int(* GNUNET_FS_KeywordIterator)(void *cls, const char *keyword, int is_mandatory)
Iterator over keywords.
static char * uri_ksk_to_string(const struct GNUNET_FS_Uri *uri)
Convert a KSK URI to a string.
static struct GNUNET_FS_Uri * uri_ksk_parse(const char *s, char **emsg)
Parse a KSK URI.
Keyword search key (query with keywords).
#define GNUNET_memcpy(dst, src, n)
Call memcpy() but check for n being 0 first.
static int ret
Return value of the commandline.
static char * percent_decode_keyword(const char *in, char **emsg)
Given a keyword with %-encoding (and possibly quotes to protect spaces), return a copy of the keyword...
static char * peer_id
Option –peer.
0-terminated, UTF-8 encoded string.
static int get_keywords_from_tokens(const char *s, char **array, int index)
Break the filename up by TOKENS to make keywords.
char * GNUNET_FS_uri_ksk_to_string_fancy(const struct GNUNET_FS_Uri *uri)
Convert keyword URI to a human readable format (i.e.
int GNUNET_FS_uri_test_equal(const struct GNUNET_FS_Uri *u1, const struct GNUNET_FS_Uri *u2)
Test if two URIs are equal.
#define GNUNET_new(type)
Allocate a struct or union of the given type.
static char * uri_sks_to_string(const struct GNUNET_FS_Uri *uri)
Convert SKS URI to a string.
struct GNUNET_PeerIdentity peer
Identity of the peer sharing the file.
int GNUNET_FS_uri_test_sks(const struct GNUNET_FS_Uri *uri)
Is this a namespace URI?
EXTRACTOR_MetaType
Enumeration defining various sources of keywords.
#define GNUNET_CRYPTO_eddsa_verify(purp, ps, sig, pub)
Verify EdDSA signature.
int GNUNET_FS_uri_sks_get_namespace(const struct GNUNET_FS_Uri *uri, struct GNUNET_CRYPTO_EcdsaPublicKey *pseudonym)
Get the ID of a namespace from the given namespace URI.
#define GNUNET_strdup(a)
Wrapper around GNUNET_xstrdup_.
Time for absolute time used by GNUnet, in microseconds and in network byte order. ...
struct GNUNET_FS_Uri * GNUNET_FS_uri_sks_create(const struct GNUNET_CRYPTO_EcdsaPublicKey *ns, const char *id)
Create an SKS URI from a namespace ID and an identifier.
uint64_t abs_value_us
The actual value.
struct GNUNET_FS_Uri * GNUNET_FS_uri_dup(const struct GNUNET_FS_Uri *uri)
Duplicate URI.
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur...
#define GNUNET_NETWORK_STRUCT_BEGIN
Define as empty, GNUNET_PACKED should suffice, but this won't work on W32.
int GNUNET_FS_uri_to_key(const struct GNUNET_FS_Uri *uri, struct GNUNET_HashCode *key)
Get a unique key from a URI.
int GNUNET_FS_uri_test_loc(const struct GNUNET_FS_Uri *uri)
Is this a location URI?
char * GNUNET_FS_uri_to_string(const struct GNUNET_FS_Uri *uri)
Convert a URI to a UTF-8 String.
static struct GNUNET_FS_Uri * uri_sks_parse(const char *s, char **emsg)
Parse an SKS URI.
static int find_duplicate(const char *s, const char **array, int array_length)
Test if the given keyword s is already present in the given array, ignoring the '+'-mandatory prefix ...
header of what an ECC signature signs this must be followed by "size - 8" bytes of the actual signed ...
#define GNUNET_CRYPTO_PKEY_ASCII_LENGTH
How many characters (without 0-terminator) are our ASCII-encoded public keys (ECDSA/EDDSA/ECDHE).
static struct GNUNET_FS_Uri * uri
Value of URI provided on command-line (when not publishing a file but just creating UBlocks to refer ...
int GNUNET_FS_uri_ksk_get_keywords(const struct GNUNET_FS_Uri *uri, GNUNET_FS_KeywordIterator iterator, void *iterator_cls)
Iterate over all keywords in this keyword URI.
#define GNUNET_SIGNATURE_PURPOSE_PEER_PLACEMENT
Signature by which a peer affirms that it is providing a certain bit of content (used in LOCation URI...
char ** keywords
Keywords start with a '+' if they are mandatory (in which case the '+' is NOT part of the keyword) an...
struct GNUNET_CRYPTO_EccSignaturePurpose purpose
What is being signed (rest of this struct).
#define GNUNET_array_grow(arr, size, tsize)
Grow a well-typed (!) array.
static struct GNUNET_OS_Process * p
Helper process we started.
void GNUNET_CRYPTO_hash(const void *block, size_t size, struct GNUNET_HashCode *ret)
Compute hash of a given block.
char * GNUNET_CRYPTO_eddsa_public_key_to_string(const struct GNUNET_CRYPTO_EddsaPublicKey *pub)
Convert a public key to a string.
static int gather_uri_data(void *cls, const char *plugin_name, enum EXTRACTOR_MetaType type, enum EXTRACTOR_MetaFormat format, const char *data_mime_type, const char *data, size_t data_len)
Function called on each value in the meta data.
struct GNUNET_HashCode query
Hash of the encrypted content, used for querying.
enum GNUNET_GenericReturnValue GNUNET_CRYPTO_eddsa_public_key_from_string(const char *enc, size_t enclen, struct GNUNET_CRYPTO_EddsaPublicKey *pub)
Convert a string representing a public key to a public key.
static struct GNUNET_NAMESTORE_Handle * ns
Handle to the namestore.
#define GNUNET_FS_URI_CHK_INFIX
#define GNUNET_new_array(n, type)
Allocate a size n array with structs or unions of the given type.
complete information needed to download a file.
uint32_t size
How many bytes does this signature sign? (including this purpose header); in network byte order (!)...
static int get_keywords_from_parens(const char *s, char **array, int index)
Break the filename up by matching [], () and {} pairs to make keywords.
void GNUNET_FS_uri_destroy(struct GNUNET_FS_Uri *uri)
Free URI.
unsigned int keywordCount
Size of the keywords array.
int GNUNET_FS_uri_test_chk(const struct GNUNET_FS_Uri *uri)
Is this a file (or directory) URI?
#define TOKENS
Where to break up keywords.
int int GNUNET_asprintf(char **buf, const char *format,...) __attribute__((format(printf
Like asprintf, just portable.
uint64_t GNUNET_htonll(uint64_t n)
Convert unsigned 64-bit integer to network byte order.
Content-hash-key (simple file).
struct FileIdentifier fi
File being offered.
struct GNUNET_HashCode key
The key used in the DHT.
void GNUNET_CRYPTO_hash_to_enc(const struct GNUNET_HashCode *block, struct GNUNET_CRYPTO_HashAsciiEncoded *result)
Convert hash to ASCII encoding.
static struct GNUNET_FS_Uri * uri_chk_parse(const char *s, char **emsg)
Parse a CHK URI.
#define GNUNET_FS_URI_SKS_PREFIX
struct GNUNET_TIME_Absolute expirationTime
Time when this location URI expires.
enum GNUNET_FS_UriType type
Type of the URI.
#define GNUNET_FS_URI_KSK_INFIX
#define GNUNET_MAX_MALLOC_CHECKED
Maximum allocation with GNUNET_malloc macro.
an ECC signature using EdDSA.
void GNUNET_CRYPTO_eddsa_key_get_public(const struct GNUNET_CRYPTO_EddsaPrivateKey *priv, struct GNUNET_CRYPTO_EddsaPublicKey *pub)
Extract the public key for the given private key.
union GNUNET_FS_Uri::@13 data
struct GNUNET_FS_Uri * GNUNET_FS_uri_ksk_create(const char *keywords, char **emsg)
Create an FS URI from a single user-supplied string of keywords.
0-terminated ASCII encoding of a struct GNUNET_HashCode.
Signed key space (file in namespace).
struct GNUNET_HashCode key
Hash of the original content, used for encryption.
#define GNUNET_NETWORK_STRUCT_END
Define as empty, GNUNET_PACKED should suffice, but this won't work on W32;.
struct GNUNET_FS_Uri * GNUNET_FS_uri_ksk_create_from_meta_data(const struct GNUNET_CONTAINER_MetaData *md)
Construct a keyword-URI from meta-data (take all entries in the meta-data and construct one large key...
Private ECC key encoded for transmission.
The identity of the host (wraps the signing key of the peer).
uint64_t GNUNET_FS_uri_chk_get_file_size(const struct GNUNET_FS_Uri *uri)
What is the size of the file that this URI refers to?
shared definitions for the FS library
A Universal Resource Identifier (URI), opaque.
#define GNUNET_FS_URI_PREFIX
uint64_t file_length
Total size of the file in bytes.
Public ECC key (always for Curve25519) encoded in a format suitable for network transmission and ECDS...
struct GNUNET_CRYPTO_EddsaSignature contentSignature
Signature over the GNUNET_EC_FileIdentifier, peer identity and expiration time.
struct GNUNET_FS_Uri::@13::@14 ksk
struct FileIdentifier fi
Information about the shared file.
struct GNUNET_FS_Uri * GNUNET_FS_uri_loc_get_uri(const struct GNUNET_FS_Uri *uri)
Obtain the URI of the content itself.
unsigned int GNUNET_FS_uri_ksk_get_keyword_count(const struct GNUNET_FS_Uri *uri)
How many keywords are ANDed in this keyword URI?
Location (chk with identity of hosting peer).
struct Location loc
Information needed to retrieve a file including signed location (identity of a peer) of the content...
struct GNUNET_FS_Uri * GNUNET_FS_uri_ksk_merge(const struct GNUNET_FS_Uri *u1, const struct GNUNET_FS_Uri *u2)
Merge the sets of keywords from two KSK URIs.
static int needs_percent(char c)
In URI-encoding, does the given character need to be encoded using %-encoding?
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model
Time for absolute times used by GNUnet, in microseconds.
char * GNUNET_FS_uri_sks_get_content_id(const struct GNUNET_FS_Uri *uri)
Get the content identifier of an SKS URI.
static char * normalize_metadata(enum EXTRACTOR_MetaFormat format, const char *data, size_t data_len)
FIXME: comment.
#define SIGNATURE_ASCII_LENGTH
void GNUNET_FS_uri_ksk_remove_keyword(struct GNUNET_FS_Uri *uri, const char *keyword)
Remove the given keyword from the set of keywords represented by the URI.
#define GNUNET_FS_URI_LOC_PREFIX
#define GNUNET_FS_URI_LOC_INFIX
#define GNUNET_FS_URI_CHK_PREFIX
uint32_t data
The data value.
static char * uri_loc_to_string(const struct GNUNET_FS_Uri *uri)
Convert a LOC URI to a string.
struct GNUNET_TIME_AbsoluteNBO GNUNET_TIME_absolute_hton(struct GNUNET_TIME_Absolute a)
Convert absolute time to network byte order.
#define GNUNET_CRYPTO_hash_from_string(enc, result)
Convert ASCII encoding back to struct GNUNET_HashCode
static char * plugin_name
Name of our plugin.
#define GNUNET_malloc(size)
Wrapper around malloc.
int GNUNET_STRINGS_string_to_data(const char *enc, size_t enclen, void *out, size_t out_size)
Convert CrockfordBase32 encoding back to data.
char * GNUNET_STRINGS_data_to_string(const void *data, size_t size, char *out, size_t out_size)
Convert binary data to ASCII encoding using CrockfordBase32.
Structure that defines how the contents of a location URI must be assembled in memory to create or ve...
uint64_t GNUNET_ntohll(uint64_t n)
Convert unsigned 64-bit integer to host byte order.
static char * pseudonym
Command-line option identifying the pseudonym to use for the publication.
#define GNUNET_free(ptr)
Wrapper around free.
struct GNUNET_CRYPTO_EddsaPublicKey public_key
Public ECC key (always for curve Ed25519) encoded in a format suitable for network transmission and E...