86 #include "gnunet_signatures.h"
155 unsigned int keywordCount;
164 n = keywordCount + 1;
165 for (i = 0; i < keywordCount; i++)
167 keyword = keywords[i];
168 n += strlen (keyword) - 1;
169 if (NULL != strstr (&keyword[1],
" "))
171 if (keyword[0] ==
'+')
176 for (i = 0; i < keywordCount; i++)
178 keyword = keywords[i];
179 if (NULL != strstr (&keyword[1],
" "))
182 if (keyword[0] ==
'+')
183 strcat (
ret, keyword);
185 strcat (
ret, &keyword[1]);
190 if (keyword[0] ==
'+')
191 strcat (
ret, keyword);
193 strcat (
ret, &keyword[1]);
223 while (out[rpos] !=
'\0')
225 if (out[rpos] ==
'%')
227 if (1 != sscanf (&out[rpos + 1],
"%2X", &hx))
232 "Malformed KSK URI (`%' must be followed by HEX number)"));
238 out[wpos++] = (char) hx;
242 out[wpos++] = out[rpos++];
262 #define GNUNET_FS_URI_KSK_PREFIX GNUNET_FS_URI_PREFIX GNUNET_FS_URI_KSK_INFIX
288 if ((s[slen - 1] ==
'+') || (s[pos] ==
'+'))
291 GNUNET_strdup (
_ (
"Malformed KSK URI (must not begin or end with `+')"));
296 for (i = pos; i < slen; i++)
298 if ((s[i] ==
'%') && (&s[i] == strstr (&s[i],
"%22")))
300 saw_quote = (saw_quote + 1) % 2;
304 if ((s[i] ==
'+') && (saw_quote == 0))
309 *emsg =
GNUNET_strdup (
_ (
"Malformed KSK URI (`++' not allowed)"));
316 *emsg =
GNUNET_strdup (
_ (
"Malformed KSK URI (quotes not balanced)"));
322 for (i = slen - 1; i >= (
int) pos; i--)
324 if ((s[i] ==
'%') && (&s[i] == strstr (&s[i],
"%22")))
326 saw_quote = (saw_quote + 1) % 2;
329 if ((dup[i] ==
'+') && (saw_quote == 0))
344 ret->data.ksk.keywordCount = iret;
348 for (i = 0; i <
max; i++)
356 #define GNUNET_FS_URI_SKS_PREFIX GNUNET_FS_URI_PREFIX GNUNET_FS_URI_SKS_INFIX
376 end = strchr (&s[pos],
'/');
389 ret->data.sks.ns =
ns;
395 #define GNUNET_FS_URI_CHK_PREFIX GNUNET_FS_URI_PREFIX GNUNET_FS_URI_CHK_INFIX
411 unsigned long long flen;
441 *emsg =
GNUNET_strdup (
_ (
"Malformed CHK URI (failed to decode CHK)"));
483 #define GNUNET_FS_URI_LOC_PREFIX GNUNET_FS_URI_PREFIX GNUNET_FS_URI_LOC_INFIX
485 #define SIGNATURE_ASCII_LENGTH 103
503 unsigned long long exptime;
504 unsigned long long flen;
541 while ((s[npos] !=
'\0') && (s[npos] !=
'.'))
553 GNUNET_strdup (
_ (
"LOC URI malformed (wrong syntax for public key)"));
562 GNUNET_strdup (
_ (
"LOC URI malformed (could not decode public key)"));
566 if (s[npos++] !=
'.')
568 *emsg =
GNUNET_strdup (
_ (
"LOC URI malformed (could not find signature)"));
575 GNUNET_strdup (
_ (
"LOC URI malformed (wrong syntax for signature)"));
586 GNUNET_strdup (
_ (
"LOC URI malformed (could not decode signature)"));
590 if (s[npos++] !=
'.')
593 _ (
"LOC URI malformed (wrong syntax for expiration time)"));
596 if (1 != sscanf (&s[npos],
"%llu", &exptime))
599 GNUNET_strdup (
_ (
"LOC URI malformed (could not parse expiration time)"));
613 GNUNET_strdup (
_ (
"LOC URI malformed (signature failed validation)"));
684 for (i = 0; i <
uri->
data.
ksk.keywordCount; i++)
731 for (i = 0; i <
uri->
data.
ksk.keywordCount; i++)
761 for (i = 0; i <
uri->
data.
ksk.keywordCount; i++)
764 if (0 == strcmp (&old[1], keyword))
787 for (i = 0; i <
uri->
data.
ksk.keywordCount; i++)
790 if (0 == strcmp (&old[1], keyword))
942 if ((u1 == NULL) && (u2 == NULL))
953 kc = u1->
data.
ksk.keywordCount;
955 for (i = 0; i < u1->
data.
ksk.keywordCount; i++)
957 for (i = 0; i < u2->
data.
ksk.keywordCount; i++)
961 for (j = 0; j < u1->
data.
ksk.keywordCount; j++)
962 if (0 == strcmp (kp + 1, kl[j] + 1))
974 ret->data.ksk.keywordCount = kc;
975 ret->data.ksk.keywords = kl;
999 if (
ret->data.ksk.keywordCount >=
1006 if (
ret->data.ksk.keywordCount > 0)
1008 ret->data.ksk.keywords =
1010 for (i = 0; i <
ret->data.ksk.keywordCount; i++)
1014 ret->data.ksk.keywords = NULL;
1052 unsigned int num_Words;
1070 while (
'\0' != *pos)
1072 if ((saw_quote == 0) && (isspace ((
unsigned char) *pos)))
1076 else if (0 == inWord)
1082 saw_quote = (saw_quote + 1) % 2;
1094 *emsg =
GNUNET_strdup (
_ (
"Number of double-quotes not balanced!\n"));
1101 while (
'\0' != *pos)
1103 if ((saw_quote == 0) && (isspace ((
unsigned char) *pos)))
1108 else if (0 == inWord)
1110 keywordarr[num_Words] = pos;
1115 saw_quote = (saw_quote + 1) % 2;
1148 const char *keyword;
1160 (0 == strncmp (argv[0],
1170 for (i = 0; i < argc; i++)
1173 if (keyword[0] ==
'+')
1221 if ((0 == memcmp (&u1->
data.
sks.ns,
1224 (0 == strcmp (u1->
data.
sks.identifier, u2->
data.
sks.identifier)))
1232 for (i = 0; i < u1->
data.
ksk.keywordCount; i++)
1235 for (j = 0; j < u2->
data.
ksk.keywordCount; j++)
1237 if (0 == strcmp (u1->
data.
ksk.keywords[i], u2->
data.
ksk.keywords[j]))
1254 +
sizeof(
unsigned short) +
sizeof(
unsigned short)) != 0)
1331 for (i = 0; i <
uri->
data.
ksk.keywordCount; i++)
1407 array[index] = nkword;
1425 for (j = array_length - 1; j >= 0; j--)
1426 if (0 == strcmp (&array[j][1], s))
1440 uint8_t *free_str = NULL;
1441 uint8_t *str_to_normalize = (uint8_t *)
data;
1442 uint8_t *normalized;
1445 if (str_to_normalize == NULL)
1448 if (format == EXTRACTOR_METAFORMAT_UTF8)
1450 free_str = (uint8_t *) u8_check ((
const uint8_t *)
data, data_len);
1451 if (free_str == NULL)
1454 format = EXTRACTOR_METAFORMAT_C_STRING;
1456 if (format == EXTRACTOR_METAFORMAT_C_STRING)
1458 free_str = u8_strconv_from_encoding (
data,
1460 iconveh_escape_sequence);
1461 if (free_str == NULL)
1465 normalized = u8_tolower (str_to_normalize,
1466 strlen ((
char *) str_to_normalize),
1472 if (free_str != NULL)
1474 if (normalized != NULL)
1479 free_str[r_len] =
'\0';
1481 normalized = free_str;
1483 return (
char *) normalized;
1500 for (count = 0; s != NULL; count++)
1501 s = u8_next (&c, s);
1534 open_paren = ss - 1;
1535 while (NULL != (open_paren = strpbrk (open_paren + 1,
"[{(")))
1539 close_paren = strpbrk (open_paren + 1,
"]})");
1540 if (NULL == close_paren)
1542 switch (open_paren[0])
1545 if (
']' == close_paren[0])
1550 if (
'}' == close_paren[0])
1555 if (
')' == close_paren[0])
1562 if (match && (close_paren - open_paren > 1))
1564 tmp = close_paren[0];
1565 close_paren[0] =
'\0';
1567 if (
u8_strcount ((
const uint8_t *) &open_paren[1]) <= 2)
1569 close_paren[0] = tmp;
1576 (
const char **) array,
1586 close_paren - &open_paren[1]);
1587 if (normalized != NULL)
1590 (
const char **) array,
1603 close_paren[0] = tmp;
1614 #define TOKENS "_. /-!?#&+@\"\'\\;:,()[]{}$<>|"
1653 if (normalized != NULL)
1656 (
const char **) array,
1698 enum EXTRACTOR_MetaType
type,
1699 enum EXTRACTOR_MetaFormat format,
1700 const char *data_mime_type,
1705 char *normalized_data;
1708 if ((format != EXTRACTOR_METAFORMAT_UTF8) &&
1709 (format != EXTRACTOR_METAFORMAT_C_STRING))
1717 if ((EXTRACTOR_METATYPE_MIMETYPE ==
type) &&
1718 (NULL != (sep = memchr (
data,
'/', data_len))) && (sep !=
data))
1745 if (NULL != normalized_data)
1776 char *full_name = NULL;
1779 int tok_keywords = 0;
1780 int paren_keywords = 0;
1793 if (NULL != full_name)
1803 ret->data.ksk.keywords =
1807 if (tok_keywords > 0)
1808 ret->data.ksk.keywordCount +=
1810 ret->data.ksk.keywords,
1811 ret->data.ksk.keywordCount);
1812 if (paren_keywords > 0)
1813 ret->data.ksk.keywordCount +=
1815 ret->data.ksk.keywords,
1816 ret->data.ksk.keywordCount);
1830 return(! ((isalnum ((
unsigned char) c)) || (c ==
'-') || (c ==
'_') ||
1831 (c ==
'.') || (c ==
'~')));
1852 const char *keyword;
1863 slen = strlen (keyword);
1865 for (j = 0; j < slen; j++)
1867 if ((j == 0) && (keyword[j] ==
' '))
1879 wpos = strlen (
ret);
1883 slen = strlen (keyword);
1884 for (j = 0; j < slen; j++)
1886 if ((j == 0) && (keyword[j] ==
' '))
1890 sprintf (&
ret[wpos],
"%%%02X", (
unsigned char) keyword[j]);
1895 ret[wpos++] = keyword[j];
1960 (
const char *) &keyhash,
1961 (
const char *) &queryhash,
1993 "%s%s%s.%s.%llu.%s.%s.%llu",
1996 (
const char *) &keyhash,
1997 (
const char *) &queryhash,
2002 (
unsigned long long)
struct GNUNET_MessageHeader * msg
#define GNUNET_SIGNATURE_PURPOSE_PEER_PLACEMENT
Signature by which a peer affirms that it is providing a certain bit of content for use in LOCation U...
shared definitions for the FS library
@ GNUNET_FS_URI_LOC
Location (chk with identity of hosting peer).
@ GNUNET_FS_URI_CHK
Content-hash-key (simple file).
@ GNUNET_FS_URI_SKS
Signed key space (file in namespace).
@ GNUNET_FS_URI_KSK
Keyword search key (query with keywords).
#define GNUNET_FS_URI_LOC_PREFIX
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 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'.
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 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.
static int needs_percent(char c)
In URI-encoding, does the given character need to be encoded using %-encoding?
static char * normalize_metadata(enum EXTRACTOR_MetaFormat format, const char *data, size_t data_len)
FIXME: comment.
static struct GNUNET_FS_Uri * uri_chk_parse(const char *s, char **emsg)
Parse a CHK URI.
static char * uri_sks_to_string(const struct GNUNET_FS_Uri *uri)
Convert SKS URI to a string.
static char * uri_ksk_to_string(const struct GNUNET_FS_Uri *uri)
Convert a KSK URI to a string.
#define GNUNET_FS_URI_SKS_PREFIX
static int get_keywords_from_parens(const char *s, char **array, int index)
Break the filename up by matching [], () and {} pairs to make keywords.
#define TOKENS
Where to break up keywords.
#define SIGNATURE_ASCII_LENGTH
static char * uri_chk_to_string(const struct GNUNET_FS_Uri *uri)
Convert a CHK URI to a string.
static struct GNUNET_FS_Uri * uri_loc_parse(const char *s, char **emsg)
Parse a LOC URI.
#define GNUNET_FS_URI_KSK_PREFIX
static int get_keywords_from_tokens(const char *s, char **array, int index)
Break the filename up by TOKENS to make keywords.
#define GNUNET_FS_URI_CHK_PREFIX
static struct GNUNET_FS_Uri * uri_ksk_parse(const char *s, char **emsg)
Parse a KSK URI.
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 ...
static char * uri_loc_to_string(const struct GNUNET_FS_Uri *uri)
Convert a LOC URI to a string.
static int ret
Return value of the commandline.
static struct GNUNET_NAMESTORE_Handle * ns
Handle to the namestore.
static int end
Set if we are to shutdown all services (including ARM).
static char * peer_id
Option –peer.
struct GNUNET_HashCode key
The key used in the DHT.
uint32_t data
The data value.
static struct GNUNET_FS_Uri * uri
Value of URI provided on command-line (when not publishing a file but just creating UBlocks to refer ...
static char * pseudonym
Command-line option identifying the pseudonym to use for the publication.
static char * plugin_name
Name of our plugin.
static struct GNUNET_OS_Process * p
Helper process we started.
API for file sharing via GNUnet.
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.
#define GNUNET_CRYPTO_eddsa_sign(priv, ps, sig)
EdDSA sign a given block.
#define GNUNET_CRYPTO_eddsa_verify(purp, ps, sig, pub)
Verify EdDSA signature.
#define EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME
char * GNUNET_FS_uri_ksk_to_string_fancy(const struct GNUNET_FS_Uri *uri)
Convert keyword URI to a human readable format (i.e.
struct GNUNET_TIME_Absolute GNUNET_FS_uri_loc_get_expiration(const struct GNUNET_FS_Uri *uri)
Obtain the expiration of the LOC URI.
char * GNUNET_FS_uri_sks_get_content_id(const struct GNUNET_FS_Uri *uri)
Get the content identifier of an SKS URI.
int(* GNUNET_FS_KeywordIterator)(void *cls, const char *keyword, int is_mandatory)
Iterator over keywords.
struct GNUNET_FS_Uri * GNUNET_FS_uri_parse(const char *uri, char **emsg)
Convert a UTF-8 String to a URI.
#define GNUNET_FS_URI_SKS_INFIX
#define GNUNET_FS_URI_CHK_INFIX
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_KSK_INFIX
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?
int GNUNET_FS_uri_test_ksk(const struct GNUNET_FS_Uri *uri)
Is this a keyword URI?
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).
int GNUNET_FS_uri_test_equal(const struct GNUNET_FS_Uri *u1, const struct GNUNET_FS_Uri *u2)
Test if two URIs are equal.
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.
int GNUNET_FS_uri_test_loc(const struct GNUNET_FS_Uri *uri)
Is this a location URI?
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.
char * GNUNET_FS_uri_to_string(const struct GNUNET_FS_Uri *uri)
Convert a URI to a UTF-8 String.
#define GNUNET_FS_URI_PREFIX
#define GNUNET_FS_URI_LOC_INFIX
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.
void GNUNET_FS_uri_destroy(struct GNUNET_FS_Uri *uri)
Free URI.
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.
int GNUNET_FS_uri_test_sks(const struct GNUNET_FS_Uri *uri)
Is this a namespace URI?
struct GNUNET_FS_Uri * GNUNET_FS_uri_dup(const struct GNUNET_FS_Uri *uri)
Duplicate URI.
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.
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.
int GNUNET_FS_uri_test_chk(const struct GNUNET_FS_Uri *uri)
Is this a file (or directory) URI?
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?
struct GNUNET_FS_Uri * GNUNET_FS_uri_ksk_create_from_meta_data(const struct GNUNET_FS_MetaData *md)
Construct a keyword-URI from meta-data (take all entries in the meta-data and construct one large key...
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_loc_get_peer_identity(const struct GNUNET_FS_Uri *uri, struct GNUNET_PeerIdentity *peer)
Obtain the identity of the peer offering the data.
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.
void GNUNET_CRYPTO_hash(const void *block, size_t size, struct GNUNET_HashCode *ret)
Compute hash of a given block.
void GNUNET_CRYPTO_hash_to_enc(const struct GNUNET_HashCode *block, struct GNUNET_CRYPTO_HashAsciiEncoded *result)
Convert hash to ASCII encoding.
#define GNUNET_CRYPTO_hash_from_string(enc, result)
Convert ASCII encoding back to struct GNUNET_HashCode
static int iterator(void *cls, const struct GNUNET_PeerIdentity *key, void *value)
Iterator over hash map entries.
#define GNUNET_NETWORK_STRUCT_BEGIN
Define as empty, GNUNET_PACKED should suffice, but this won't work on W32.
#define GNUNET_CRYPTO_PKEY_ASCII_LENGTH
How many characters (without 0-terminator) are our ASCII-encoded public keys (ECDSA/EDDSA/ECDHE).
uint64_t GNUNET_ntohll(uint64_t n)
Convert unsigned 64-bit integer to host byte order.
char * GNUNET_CRYPTO_eddsa_public_key_to_string(const struct GNUNET_CRYPTO_EddsaPublicKey *pub)
Convert a public key to a string.
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.
#define GNUNET_NETWORK_STRUCT_END
Define as empty, GNUNET_PACKED should suffice, but this won't work on W32;.
uint64_t GNUNET_htonll(uint64_t n)
Convert unsigned 64-bit integer to network byte order.
#define GNUNET_memcpy(dst, src, n)
Call memcpy() but check for n being 0 first.
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur.
int int GNUNET_asprintf(char **buf, const char *format,...) __attribute__((format(printf
Like asprintf, just portable.
#define GNUNET_strdup(a)
Wrapper around GNUNET_xstrdup_.
#define GNUNET_MAX_MALLOC_CHECKED
Maximum allocation with GNUNET_malloc macro.
#define GNUNET_array_grow(arr, size, tsize)
Grow a well-typed (!) array.
#define GNUNET_new(type)
Allocate a struct or union of the given type.
#define GNUNET_malloc(size)
Wrapper around malloc.
#define GNUNET_new_array(n, type)
Allocate a size n array with structs or unions of the given type.
#define GNUNET_array_append(arr, len, element)
Append an element to an array (growing the array by one).
#define GNUNET_free(ptr)
Wrapper around free.
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.
enum GNUNET_GenericReturnValue GNUNET_STRINGS_string_to_data(const char *enc, size_t enclen, void *out, size_t out_size)
Convert CrockfordBase32 encoding back to data.
struct GNUNET_TIME_AbsoluteNBO GNUNET_TIME_absolute_hton(struct GNUNET_TIME_Absolute a)
Convert absolute time to network byte order.
struct GNUNET_HashCode key
Hash of the original content, used for encryption.
struct GNUNET_HashCode query
Hash of the encrypted content, used for querying.
complete information needed to download a file.
struct ContentHashKey chk
Query and key of the top GNUNET_EC_IBlock.
uint64_t file_length
Total size of the file in bytes.
header of what an ECC signature signs this must be followed by "size - 8" bytes of the actual signed ...
uint32_t size
How many bytes does this signature sign? (including this purpose header); in network byte order (!...
uint32_t purpose
What does this signature vouch for? This must contain a GNUNET_SIGNATURE_PURPOSE_XXX constant (from g...
Public ECC key (always for Curve25519) encoded in a format suitable for network transmission and ECDS...
Private ECC key encoded for transmission.
Public ECC key (always for curve Ed25519) encoded in a format suitable for network transmission and E...
an ECC signature using EdDSA.
0-terminated ASCII encoding of a struct GNUNET_HashCode.
A Universal Resource Identifier (URI), opaque.
struct GNUNET_FS_Uri::@13::@14 ksk
union GNUNET_FS_Uri::@13 data
struct GNUNET_FS_Uri::@13::@15 sks
char ** keywords
Keywords start with a '+' if they are mandatory (in which case the '+' is NOT part of the keyword) an...
enum GNUNET_FS_UriType type
Type of the URI.
struct Location loc
Information needed to retrieve a file including signed location (identity of a peer) of the content.
unsigned int keywordCount
Size of the keywords array.
struct FileIdentifier chk
Information needed to retrieve a file (content-hash-key plus file size).
The identity of the host (wraps the signing key of the peer).
struct GNUNET_CRYPTO_EddsaPublicKey public_key
Time for absolute time used by GNUnet, in microseconds and in network byte order.
Time for absolute times used by GNUnet, in microseconds.
uint64_t abs_value_us
The actual value.
Structure that defines how the contents of a location URI must be assembled in memory to create or ve...
struct GNUNET_TIME_AbsoluteNBO exptime
Expiration time of the offer.
struct GNUNET_PeerIdentity peer
Peer offering the file.
struct FileIdentifier fi
File being offered.
struct GNUNET_CRYPTO_EccSignaturePurpose purpose
What is being signed (rest of this struct).
struct GNUNET_TIME_Absolute expirationTime
Time when this location URI expires.
struct GNUNET_CRYPTO_EddsaSignature contentSignature
Signature over the GNUNET_EC_FileIdentifier, peer identity and expiration time.
struct FileIdentifier fi
Information about the shared file.
struct GNUNET_PeerIdentity peer
Identity of the peer sharing the file.
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model
struct GNUNET_TESTBED_Peer * peer
The peer associated with this model.