GNUnet  0.11.x
Functions | Variables
gnunet-search.c File Reference

searching for files on GNUnet More...

#include "platform.h"
#include "gnunet_fs_service.h"
Include dependency graph for gnunet-search.c:

Go to the source code of this file.

Functions

static int item_printer (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_size)
 Type of a function that libextractor calls for each meta data item found. More...
 
static void clean_task (void *cls)
 
static void * progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
 Called by FS client to give information about the progress of an operation. More...
 
static void shutdown_task (void *cls)
 
static void timeout_task (void *cls)
 
static void run (void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *c)
 Main function that will be run by the scheduler. More...
 
int main (int argc, char *const *argv)
 The main function to search GNUnet. More...
 

Variables

static int ret
 
static const struct GNUNET_CONFIGURATION_Handlecfg
 
static struct GNUNET_FS_Handlectx
 
static struct GNUNET_FS_SearchContextsc
 
static char * output_filename
 
static struct GNUNET_FS_DirectoryBuilderdb
 
static unsigned int anonymity = 1
 
static struct GNUNET_TIME_Relative timeout
 Timeout for the search, 0 means to wait for CTRL-C. More...
 
static unsigned int results_limit
 
static unsigned int results
 
static unsigned int verbose
 
static int local_only
 
static struct GNUNET_SCHEDULER_Tasktt
 

Detailed Description

searching for files on GNUnet

Author
Christian Grothoff
Krista Bennett
James Blackwell
Igor Wronsky

Definition in file gnunet-search.c.

Function Documentation

◆ item_printer()

static int item_printer ( 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_size 
)
static

Type of a function that libextractor calls for each meta data item found.

Parameters
clsclosure (user-defined, unused)
plugin_namename of the plugin that produced this value; special values can be used (e.g. '<zlib>' for zlib being used in the main libextractor library and yielding meta data).
typelibextractor-type describing the meta data
formatbasic format information about data
data_mime_typemime-type of data (not of the original file); can be NULL (if mime-type is not known)
dataactual meta-data found
data_sizenumber of bytes in data
Returns
0 to continue extracting, 1 to abort

Definition at line 79 of file gnunet-search.c.

86 {
87  if ((format != EXTRACTOR_METAFORMAT_UTF8) &&
89  return 0;
91  return 0;
92 #if HAVE_LIBEXTRACTOR
93  printf ("\t%20s: %s\n",
95  EXTRACTOR_metatype_to_string (type)),
96  data);
97 #else
98  printf ("\t%20d: %s\n", type, data);
99 #endif
100  return 0;
101 }
#define dgettext(Domainname, Msgid)
Definition: gettext.h:46
uint32_t data
The data value.
@ EXTRACTOR_METAFORMAT_C_STRING
0-terminated string.
@ EXTRACTOR_METAFORMAT_UTF8
0-terminated, UTF-8 encoded string.
@ EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME
#define LIBEXTRACTOR_GETTEXT_DOMAIN
Definition: platform.h:178
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model

References data, dgettext, EXTRACTOR_METAFORMAT_C_STRING, EXTRACTOR_METAFORMAT_UTF8, EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME, LIBEXTRACTOR_GETTEXT_DOMAIN, and type.

Referenced by progress_cb().

Here is the caller graph for this function:

◆ clean_task()

static void clean_task ( void *  cls)
static

Definition at line 105 of file gnunet-search.c.

106 {
107  size_t dsize;
108  void *ddata;
109 
111  ctx = NULL;
112  if (output_filename == NULL)
113  return;
114  if (GNUNET_OK !=
115  GNUNET_FS_directory_builder_finish (db, &dsize, &ddata))
116  {
117  GNUNET_break (0);
119  return;
120  }
122  if (GNUNET_OK !=
124  ddata,
125  dsize,
128  {
129  fprintf (stderr,
130  _ ("Failed to write directory with search results to `%s'\n"),
132  }
133  GNUNET_free (ddata);
135 }
static char * output_filename
Definition: gnunet-search.c:39
static struct GNUNET_FS_Handle * ctx
Definition: gnunet-search.c:35
static struct GNUNET_FS_DirectoryBuilder * db
Definition: gnunet-search.c:41
@ GNUNET_OK
Definition: gnunet_common.h:95
enum GNUNET_GenericReturnValue GNUNET_DISK_fn_write(const char *fn, const void *buf, size_t buf_size, enum GNUNET_DISK_AccessPermissions mode)
Write a buffer to a file atomically.
Definition: disk.c:725
enum GNUNET_GenericReturnValue GNUNET_DISK_directory_remove(const char *filename)
Remove all files in a directory (rm -rf).
Definition: disk.c:1085
@ GNUNET_DISK_PERM_USER_READ
Owner can read.
@ GNUNET_DISK_PERM_USER_WRITE
Owner can write.
int GNUNET_FS_directory_builder_finish(struct GNUNET_FS_DirectoryBuilder *bld, size_t *rsize, void **rdata)
Finish building the directory.
Definition: fs_directory.c:577
void GNUNET_FS_stop(struct GNUNET_FS_Handle *h)
Close our connection with the file-sharing service.
Definition: fs_api.c:3338
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur.
#define GNUNET_free(ptr)
Wrapper around free.
#define _(String)
GNU gettext support macro.
Definition: platform.h:177

References _, ctx, db, GNUNET_break, GNUNET_DISK_directory_remove(), GNUNET_DISK_fn_write(), GNUNET_DISK_PERM_USER_READ, GNUNET_DISK_PERM_USER_WRITE, GNUNET_free, GNUNET_FS_directory_builder_finish(), GNUNET_FS_stop(), GNUNET_OK, and output_filename.

Referenced by progress_cb().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ progress_cb()

static void* progress_cb ( void *  cls,
const struct GNUNET_FS_ProgressInfo info 
)
static

Called by FS client to give information about the progress of an operation.

Parameters
clsclosure
infodetails about the event, specifying the event type and various bits about the event
Returns
client-context (for the next progress call for this operation; should be set to NULL for SUSPEND and STOPPED events). The value returned will be passed to future callbacks in the respective field in the GNUNET_FS_ProgressInfo struct.

Definition at line 152 of file gnunet-search.c.

153 {
154  static unsigned int cnt;
155  int is_directory;
156  char *uri;
157  char *filename;
158 
159  switch (info->status)
160  {
162  break;
163 
165  if (db != NULL)
167  info->value.search.specifics.result.uri,
168  info->value.search.specifics.result.meta,
169  NULL);
170  uri = GNUNET_FS_uri_to_string (info->value.search.specifics.result.uri);
171  printf ("#%u:\n", ++cnt);
173  info->value.search.specifics.result.meta,
176  info->value.search.specifics.result.meta);
177  if (NULL != filename)
178  {
179  while ((filename[0] != '\0') && ('/' == filename[strlen (filename) - 1]))
180  filename[strlen (filename) - 1] = '\0';
182  if (GNUNET_YES == is_directory)
183  printf ("gnunet-download -o \"%s%s\" -R %s\n",
184  filename,
186  uri);
187  else
188  printf ("gnunet-download -o \"%s\" %s\n", filename, uri);
189  }
190  else if (GNUNET_YES == is_directory)
191  printf ("gnunet-download -o \"collection%s\" -R %s\n",
193  uri);
194  else
195  printf ("gnunet-download %s\n", uri);
196  if (verbose)
197  GNUNET_CONTAINER_meta_data_iterate (info->value.search.specifics.result
198  .meta,
199  &item_printer,
200  NULL);
201  printf ("\n");
202  fflush (stdout);
204  GNUNET_free (uri);
205  results++;
206  if ((results_limit > 0) && (results >= results_limit))
208  break;
209 
211  break;
212 
214  /* ignore */
215  break;
216 
218  fprintf (stderr,
219  _ ("Error searching: %s.\n"),
220  info->value.search.specifics.error.message);
222  break;
223 
226  break;
227 
228  default:
229  fprintf (stderr, _ ("Unexpected status: %d\n"), info->status);
230  break;
231  }
232  return NULL;
233 }
static char * filename
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 unsigned int verbose
Definition: gnunet-search.c:54
static unsigned int results
Definition: gnunet-search.c:52
static unsigned int results_limit
Definition: gnunet-search.c:50
static void clean_task(void *cls)
static int item_printer(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_size)
Type of a function that libextractor calls for each meta data item found.
Definition: gnunet-search.c:79
@ GNUNET_YES
Definition: gnunet_common.h:97
void GNUNET_DISK_filename_canonicalize(char *fn)
Removes special characters as ':' from a filename.
Definition: disk.c:1189
int GNUNET_FS_meta_data_test_for_directory(const struct GNUNET_CONTAINER_MetaData *md)
Does the meta-data claim that this is a directory? Checks if the mime-type is that of a GNUnet direct...
Definition: fs_directory.c:54
void GNUNET_FS_directory_builder_add(struct GNUNET_FS_DirectoryBuilder *bld, const struct GNUNET_FS_Uri *uri, const struct GNUNET_CONTAINER_MetaData *md, const void *data)
Add an entry to a directory.
Definition: fs_directory.c:391
char * GNUNET_FS_uri_to_string(const struct GNUNET_FS_Uri *uri)
Convert a URI to a UTF-8 String.
Definition: fs_uri.c:2027
#define GNUNET_FS_DIRECTORY_EXT
@ GNUNET_FS_STATUS_SEARCH_UPDATE
We have additional data about the quality or availability of a search result.
@ GNUNET_FS_STATUS_SEARCH_ERROR
Signals a problem with this search.
@ GNUNET_FS_STATUS_SEARCH_RESULT_STOPPED
Event generated for each search result when the respective search is stopped.
@ GNUNET_FS_STATUS_SEARCH_RESULT
This search has yielded a result.
@ GNUNET_FS_STATUS_SEARCH_START
First event generated when a client requests a search to begin or when a namespace result automatical...
@ GNUNET_FS_STATUS_SEARCH_STOPPED
Last message from a search; this signals that there will be no further events associated with this se...
char * GNUNET_CONTAINER_meta_data_get_by_type(const struct GNUNET_CONTAINER_MetaData *md, enum EXTRACTOR_MetaType type)
Get the first MD entry of the given type.
int GNUNET_CONTAINER_meta_data_iterate(const struct GNUNET_CONTAINER_MetaData *md, EXTRACTOR_MetaDataProcessor iter, void *iter_cls)
Iterate over MD entries.
void GNUNET_SCHEDULER_shutdown(void)
Request the shutdown of a scheduler.
Definition: scheduler.c:531
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_now(GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run as soon as possible.
Definition: scheduler.c:1296
union GNUNET_FS_ProgressInfo::@25 value
Values that depend on the event type.
struct GNUNET_FS_ProgressInfo::@25::GNUNET_FS_SearchStatusEvent search
enum GNUNET_FS_Status status
Specific status code (determines the event type).

References _, clean_task(), db, EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME, filename, GNUNET_CONTAINER_meta_data_get_by_type(), GNUNET_CONTAINER_meta_data_iterate(), GNUNET_DISK_filename_canonicalize(), GNUNET_free, GNUNET_FS_directory_builder_add(), GNUNET_FS_DIRECTORY_EXT, GNUNET_FS_meta_data_test_for_directory(), GNUNET_FS_STATUS_SEARCH_ERROR, GNUNET_FS_STATUS_SEARCH_RESULT, GNUNET_FS_STATUS_SEARCH_RESULT_STOPPED, GNUNET_FS_STATUS_SEARCH_START, GNUNET_FS_STATUS_SEARCH_STOPPED, GNUNET_FS_STATUS_SEARCH_UPDATE, GNUNET_FS_uri_to_string(), GNUNET_SCHEDULER_add_now(), GNUNET_SCHEDULER_shutdown(), GNUNET_YES, item_printer(), results, results_limit, GNUNET_FS_ProgressInfo::search, GNUNET_FS_ProgressInfo::status, uri, GNUNET_FS_ProgressInfo::value, and verbose.

Referenced by run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shutdown_task()

static void shutdown_task ( void *  cls)
static

Definition at line 237 of file gnunet-search.c.

238 {
239  if (sc != NULL)
240  {
242  sc = NULL;
243  }
244 }
static struct GNUNET_FS_SearchContext * sc
Definition: gnunet-search.c:37
void GNUNET_FS_search_stop(struct GNUNET_FS_SearchContext *sc)
Stop search for content.
Definition: fs_search.c:1778

References GNUNET_FS_search_stop(), and sc.

Referenced by run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ timeout_task()

static void timeout_task ( void *  cls)
static

Definition at line 248 of file gnunet-search.c.

249 {
250  tt = NULL;
252 }
static struct GNUNET_SCHEDULER_Task * tt
Definition: gnunet-search.c:58

References GNUNET_SCHEDULER_shutdown(), and tt.

Referenced by run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ run()

static void run ( void *  cls,
char *const *  args,
const char *  cfgfile,
const struct GNUNET_CONFIGURATION_Handle c 
)
static

Main function that will be run by the scheduler.

Parameters
clsclosure
argsremaining command-line arguments
cfgfilename of the configuration file used (for saving, can be NULL!)
cconfiguration

Definition at line 264 of file gnunet-search.c.

268 {
269  struct GNUNET_FS_Uri *uri;
270  unsigned int argc;
272 
273  argc = 0;
274  while (NULL != args[argc])
275  argc++;
276  uri = GNUNET_FS_uri_ksk_create_from_args (argc, (const char **) args);
277  if (NULL == uri)
278  {
279  fprintf (stderr,
280  "%s",
281  _ ("Could not create keyword URI from arguments.\n"));
282  ret = 1;
283  return;
284  }
285  cfg = c;
287  "gnunet-search",
288  &progress_cb,
289  NULL,
292  if (NULL == ctx)
293  {
294  fprintf (stderr, _ ("Could not initialize `%s' subsystem.\n"), "FS");
296  ret = 1;
297  return;
298  }
299  if (output_filename != NULL)
302  if (local_only)
306  if (NULL == sc)
307  {
308  fprintf (stderr, "%s", _ ("Could not start searching.\n"));
310  ret = 1;
311  return;
312  }
313  if (0 != timeout.rel_value_us)
316 }
struct GNUNET_GETOPT_CommandLineOption options[]
Definition: 002.c:5
static unsigned int anonymity
Definition: gnunet-search.c:43
static void timeout_task(void *cls)
static const struct GNUNET_CONFIGURATION_Handle * cfg
Definition: gnunet-search.c:33
static void shutdown_task(void *cls)
static int ret
Definition: gnunet-search.c:31
static struct GNUNET_TIME_Relative timeout
Timeout for the search, 0 means to wait for CTRL-C.
Definition: gnunet-search.c:48
static void * progress_cb(void *cls, const struct GNUNET_FS_ProgressInfo *info)
Called by FS client to give information about the progress of an operation.
static int local_only
Definition: gnunet-search.c:56
GNUNET_FS_SearchOptions
Options for searching.
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.
Definition: fs_uri.c:1154
void GNUNET_FS_uri_destroy(struct GNUNET_FS_Uri *uri)
Free URI.
Definition: fs_uri.c:678
struct GNUNET_FS_DirectoryBuilder * GNUNET_FS_directory_builder_create(const struct GNUNET_CONTAINER_MetaData *mdir)
Create a directory builder.
Definition: fs_directory.c:365
struct GNUNET_FS_Handle * GNUNET_FS_start(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *client_name, GNUNET_FS_ProgressCallback upcb, void *upcb_cls, enum GNUNET_FS_Flags flags,...)
Setup a connection to the file-sharing service.
Definition: fs_api.c:3263
struct GNUNET_FS_SearchContext * GNUNET_FS_search_start(struct GNUNET_FS_Handle *h, const struct GNUNET_FS_Uri *uri, uint32_t anonymity, enum GNUNET_FS_SearchOptions options, void *cctx)
Start search for content.
Definition: fs_search.c:1619
@ GNUNET_FS_FLAGS_NONE
No special flags set.
@ GNUNET_FS_SEARCH_OPTION_LOOPBACK_ONLY
Only search the local host, do not search remote systems (no P2P)
@ GNUNET_FS_SEARCH_OPTION_NONE
No options (use defaults for everything).
@ GNUNET_FS_OPTIONS_END
Last option in the VARARG list.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_shutdown(GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run on shutdown, that is when a CTRL-C signal is received,...
Definition: scheduler.c:1331
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_delayed(struct GNUNET_TIME_Relative delay, GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run with a specified delay.
Definition: scheduler.c:1269
A Universal Resource Identifier (URI), opaque.
Definition: fs_api.h:166
uint64_t rel_value_us
The actual value.

References _, anonymity, consensus-simulation::args, cfg, ctx, db, GNUNET_FS_directory_builder_create(), GNUNET_FS_FLAGS_NONE, GNUNET_FS_OPTIONS_END, GNUNET_FS_SEARCH_OPTION_LOOPBACK_ONLY, GNUNET_FS_SEARCH_OPTION_NONE, GNUNET_FS_search_start(), GNUNET_FS_start(), GNUNET_FS_stop(), GNUNET_FS_uri_destroy(), GNUNET_FS_uri_ksk_create_from_args(), GNUNET_SCHEDULER_add_delayed(), GNUNET_SCHEDULER_add_shutdown(), local_only, options, output_filename, progress_cb(), GNUNET_TIME_Relative::rel_value_us, ret, sc, shutdown_task(), timeout, timeout_task(), tt, and uri.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char *const *  argv 
)

The main function to search GNUnet.

Parameters
argcnumber of arguments from the command line
argvcommand line arguments
Returns
0 ok, 1 on error

Definition at line 327 of file gnunet-search.c.

328 {
331  "anonymity",
332  "LEVEL",
333  gettext_noop (
334  "set the desired LEVEL of receiver-anonymity"),
335  &anonymity),
337  'n',
338  "no-network",
339  gettext_noop ("only search the local peer (no P2P network search)"),
340  &local_only),
342  'o',
343  "output",
344  "PREFIX",
345  gettext_noop ("write search results to file starting with PREFIX"),
346  &output_filename),
348  't',
349  "timeout",
350  "DELAY",
351  gettext_noop ("automatically terminate search after DELAY"),
352  &timeout),
355  "results",
356  "VALUE",
357  gettext_noop ("automatically terminate search "
358  "after VALUE results are found"),
359  &results_limit),
361 
362  if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
363  return 2;
364 
365  ret =
366  (GNUNET_OK ==
367  GNUNET_PROGRAM_run (argc,
368  argv,
369  "gnunet-search [OPTIONS] KEYWORD",
370  gettext_noop (
371  "Search GNUnet for files that were published on GNUnet"),
372  options,
373  &run,
374  NULL))
375  ? ret
376  : 1;
377  GNUNET_free_nz ((void *) argv);
378  return ret;
379 }
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_OPTION_END
Definition: 002.c:13
#define gettext_noop(String)
Definition: gettext.h:69
static void run(void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *c)
Main function that will be run by the scheduler.
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_uint(char shortName, const char *name, const char *argumentHelp, const char *description, unsigned int *val)
Allow user to specify an unsigned int.
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_relative_time(char shortName, const char *name, const char *argumentHelp, const char *description, struct GNUNET_TIME_Relative *val)
Allow user to specify a struct GNUNET_TIME_Relative (using human-readable "fancy" time).
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_verbose(unsigned int *level)
Define the '-V' verbosity option.
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_flag(char shortName, const char *name, const char *description, int *val)
Allow user to specify a flag (which internally means setting an integer to 1/GNUNET_YES/GNUNET_OK.
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_string(char shortName, const char *name, const char *argumentHelp, const char *description, char **str)
Allow user to specify a string.
#define GNUNET_free_nz(ptr)
Wrapper around free.
enum GNUNET_GenericReturnValue GNUNET_PROGRAM_run(int argc, char *const *argv, const char *binaryName, const char *binaryHelp, const struct GNUNET_GETOPT_CommandLineOption *options, GNUNET_PROGRAM_Main task, void *task_cls)
Run a standard GNUnet command startup sequence (initialize loggers and configuration,...
Definition: program.c:364
enum GNUNET_GenericReturnValue GNUNET_STRINGS_get_utf8_args(int argc, char *const *argv, int *u8argc, char *const **u8argv)
Returns utf-8 encoded arguments.
Definition: strings.c:1209
Definition of a command line option.

References anonymity, gettext_noop, GNUNET_free_nz, GNUNET_GETOPT_OPTION_END, GNUNET_GETOPT_option_flag(), GNUNET_GETOPT_option_relative_time(), GNUNET_GETOPT_option_string(), GNUNET_GETOPT_option_uint(), GNUNET_GETOPT_option_verbose(), GNUNET_OK, GNUNET_PROGRAM_run(), GNUNET_STRINGS_get_utf8_args(), local_only, options, output_filename, results_limit, ret, run(), timeout, and verbose.

Here is the call graph for this function:

Variable Documentation

◆ ret

int ret
static

Definition at line 31 of file gnunet-search.c.

Referenced by main(), and run().

◆ cfg

const struct GNUNET_CONFIGURATION_Handle* cfg
static

Definition at line 33 of file gnunet-search.c.

Referenced by run().

◆ ctx

struct GNUNET_FS_Handle* ctx
static

Definition at line 35 of file gnunet-search.c.

Referenced by clean_task(), and run().

◆ sc

struct GNUNET_FS_SearchContext* sc
static

Definition at line 37 of file gnunet-search.c.

Referenced by call_completion_task(), connect_cb(), continue_writing(), database_setup(), datacache_get_successors_iterator(), decrypt_block_with_keyword(), deserialize_search(), deserialize_search_file(), deserialize_search_result(), disconnect_cb(), do_reconnect(), extract_box_cb(), find_opc(), find_sender_by_address(), free_search_context(), GDS_DATACACHE_get_successors(), GNUNET_FS_search_continue(), GNUNET_FS_search_make_status_(), GNUNET_FS_search_pause(), GNUNET_FS_search_signal_suspend_(), GNUNET_FS_search_start_searching_(), GNUNET_FS_search_stop(), GNUNET_FS_search_sync_(), GNUNET_HELLO_extract_address(), GNUNET_PEERSTORE_disconnect(), GNUNET_PEERSTORE_store(), GNUNET_PEERSTORE_store_cancel(), GNUNET_TESTBED_get_statistics(), GNUNET_TESTING_service_run(), GNUNET_TRANSPORT_TESTING_large_send(), GNUNET_TRANSPORT_TESTING_simple_send(), handle_client_start_search(), handle_datastore_reply(), handle_request(), handle_result(), iteration_completion_cb(), iterator_cb(), locate_by_id(), notify_client_chk_result(), notify_client_chk_update(), op_done_task(), opc_search_iterator(), oprelease_get_stats(), opstart_get_stats(), process_kblock(), process_ksk_result(), process_sblock(), process_sks_result(), reconnect(), refresh_timeout_task(), run(), schedule_transmit_search_request(), search_iterator(), search_mq_error_handler(), search_rcop(), search_result_stop(), search_result_suspend(), search_start(), select_best_pending_from_link(), server_access_cb(), server_disconnect_cb(), server_lookup_connection(), server_send_callback(), service_run_main(), setup_sender(), shutdown_task(), signal_result_resume(), signal_search_resume(), signal_socks_failure(), store_request_sent(), timeout_cadet_task(), transmit_on_queue(), try_reconnect(), and update_sre_result_maps().

◆ output_filename

char* output_filename
static

Definition at line 39 of file gnunet-search.c.

Referenced by clean_task(), main(), and run().

◆ db

struct GNUNET_FS_DirectoryBuilder* db
static

◆ anonymity

unsigned int anonymity = 1
static

Definition at line 43 of file gnunet-search.c.

Referenced by main(), and run().

◆ timeout

struct GNUNET_TIME_Relative timeout
static

Timeout for the search, 0 means to wait for CTRL-C.

Definition at line 43 of file gnunet-search.c.

Referenced by main(), and run().

◆ results_limit

unsigned int results_limit
static

Definition at line 50 of file gnunet-search.c.

Referenced by main(), and progress_cb().

◆ results

unsigned int results
static

◆ verbose

unsigned int verbose
static

Definition at line 54 of file gnunet-search.c.

Referenced by main(), and progress_cb().

◆ local_only

int local_only
static

Definition at line 56 of file gnunet-search.c.

Referenced by main(), and run().

◆ tt

struct GNUNET_SCHEDULER_Task* tt
static

Definition at line 58 of file gnunet-search.c.

Referenced by run(), and timeout_task().