change HELLO files to never expire More...
Go to the source code of this file.
Data Structures | |
struct | AddContext |
Closure for add_to_buf(). More... | |
Functions | |
static int | add_to_buf (void *cls, const struct GNUNET_HELLO_Address *address, struct GNUNET_TIME_Absolute expiration) |
Add the given address with infinite expiration to the buffer. More... | |
static ssize_t | add_from_hello (void *cls, size_t max, void *buf) |
Add addresses from the address list to the HELLO. More... | |
int | main (int argc, char *argv[]) |
Variables | |
static int | address_count |
change HELLO files to never expire
Definition in file gnunet-hello.c.
|
static |
Add the given address with infinite expiration to the buffer.
cls | closure |
address | address to add |
expiration | old expiration |
Definition at line 62 of file gnunet-hello.c.
References ac, address, address_count, GNUNET_HELLO_add_address(), GNUNET_OK, GNUNET_TIME_UNIT_FOREVER_ABS, and ret.
Referenced by add_from_hello().
|
static |
Add addresses from the address list to the HELLO.
cls | the HELLO with the addresses to add |
max | maximum space available |
buf | where to add the addresses |
Definition at line 90 of file gnunet-hello.c.
References ac, add_to_buf(), buf, GNUNET_assert, GNUNET_HELLO_iterate_addresses(), GNUNET_NO, GNUNET_SYSERR, and max.
Referenced by main().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 109 of file gnunet-hello.c.
References _, add_from_hello(), address_count, buf, fh, GNUNET_ALIGN, GNUNET_assert, GNUNET_CRYPTO_eddsa_public_key_to_string(), GNUNET_DISK_file_close(), GNUNET_DISK_file_open(), GNUNET_DISK_file_read(), GNUNET_DISK_file_size(), GNUNET_DISK_file_write(), GNUNET_DISK_OPEN_READ, GNUNET_DISK_OPEN_TRUNCATE, GNUNET_DISK_OPEN_WRITE, GNUNET_DISK_PERM_USER_READ, GNUNET_DISK_PERM_USER_WRITE, GNUNET_free, GNUNET_HELLO_create(), GNUNET_HELLO_get_id(), GNUNET_HELLO_is_friend_only(), GNUNET_HELLO_size(), GNUNET_log_setup(), GNUNET_OK, GNUNET_YES, pid, GNUNET_PeerIdentity::public_key, and result.
|
static |
Definition at line 50 of file gnunet-hello.c.
Referenced by add_to_buf(), and main().