#include void generate_gnunet_conf (FILE * f) { fprintf(f, "%s\n","# This is the USER configuration for your GNUnet node. Copy this file to"); fprintf(f, "%s\n","# \"~/.gnunet/gnunet.conf\"."); fprintf(f, "%s\n","# For any other location, you must tell every GNUnet application "); fprintf(f, "%s\n","# that you start where this file is. (option -c FILENAME)."); fprintf(f, "%s\n","#"); fprintf(f, "%s\n","#"); fprintf(f, "%s\n","#################################################"); fprintf(f, "%s\n","#"); fprintf(f, "%s\n","# This line gives the directory where GNUnet is putting"); fprintf(f, "%s\n","# user-specific files (such as pseudonyms). Typically,"); fprintf(f, "%s\n","# GNUnet should not put more than a few of MB there."); fprintf(f, "%s\n","#"); fprintf(f, "%s\n","# Default is GNUNET_HOME = ~/.gnunet"); fprintf(f, "%s\n","GNUNET_HOME = ~/.gnunet"); fprintf(f, "%s\n",""); fprintf(f, "%s\n",""); fprintf(f, "%s\n","###############################################"); fprintf(f, "%s\n","# General client options..."); fprintf(f, "%s\n","###############################################"); fprintf(f, "%s\n","[GNUNET]"); fprintf(f, "%s\n","# Loglevel. What kinds of (debug) output should be printed? You can "); fprintf(f, "%s\n","# use NOTHING, FATAL, ERROR, FAILURE, WARNING, MESSAGE, INFO, DEBUG, "); fprintf(f, "%s\n","# CRON or EVERYTHING (which print more and more messages in this order). "); fprintf(f, "%s\n","# Default is WARNING which is usually enough to let you know if there"); fprintf(f, "%s\n","# is any problems."); fprintf(f, "%s\n","LOGLEVEL = WARNING"); fprintf(f, "%s\n",""); fprintf(f, "%s\n","# Where to write the messages? Leave the entry unspecified (as"); fprintf(f, "%s\n","# default) to make the clients print their messages to stderr."); fprintf(f, "%s\n","# Default is unspecified (stderr)."); fprintf(f, "%s\n","#LOGFILE = $GNUNET_HOME/logs"); fprintf(f, "%s\n",""); fprintf(f, "%s\n",""); fprintf(f, "%s\n","###############################################"); fprintf(f, "%s\n","# Network options for the clients..."); fprintf(f, "%s\n","###############################################"); fprintf(f, "%s\n","[NETWORK]"); fprintf(f, "%s\n","# Port to use to talk to gnunetd, default is 2087"); fprintf(f, "%s\n","PORT = 2087"); fprintf(f, "%s\n",""); fprintf(f, "%s\n","# On which machine runs gnunetd (for clients) This is equivalent to"); fprintf(f, "%s\n","# the -H option. Default is localhost."); fprintf(f, "%s\n","HOST = localhost"); fprintf(f, "%s\n",""); fprintf(f, "%s\n",""); fprintf(f, "%s\n",""); fprintf(f, "%s\n",""); fprintf(f, "%s\n","################################################"); fprintf(f, "%s\n","# Options for anonymous filesharing (AFS)."); fprintf(f, "%s\n","################################################"); fprintf(f, "%s\n","[AFS]"); fprintf(f, "%s\n",""); fprintf(f, "%s\n","# How long should gnunet-search try to get an answer to a query before"); fprintf(f, "%s\n","# timing out (in seconds). Default is \"3000\", which should be enough"); fprintf(f, "%s\n","# for pretty much anything. Use 0 for no timeout."); fprintf(f, "%s\n","SEARCHTIMEOUT = 3000"); fprintf(f, "%s\n",""); fprintf(f, "%s\n","# Specify which additional extractor libraries should be used."); fprintf(f, "%s\n","# gnunet-insert uses libextractor to extract keywords from files."); fprintf(f, "%s\n","# libextractor can be dynamically extended to handle additional file"); fprintf(f, "%s\n","# formats. If you want to use more than the default set of extractors,"); fprintf(f, "%s\n","# specify additional extractor libraries here. The format is"); fprintf(f, "%s\n","# [[-]LIBRARYNAME[:[-]LIBRARYNAME]*] The default is to use filenames"); fprintf(f, "%s\n","# and to break larger words at spaces (and underscores, etc.). This"); fprintf(f, "%s\n","# should be just fine for most people. The - before a library name"); fprintf(f, "%s\n","# indicates that this should be executed last and makes only sense for"); fprintf(f, "%s\n","# the split-library."); fprintf(f, "%s\n","# Default is libextractor_filename:-libextractor_split:-libextractor_lower"); fprintf(f, "%s\n","EXTRACTORS = libextractor_filename:-libextractor_split:-libextractor_lower"); fprintf(f, "%s\n",""); fprintf(f, "%s\n","# Where to download files to (by default)?"); fprintf(f, "%s\n","# Default is /tmp/gnunet-downloads/"); fprintf(f, "%s\n","DOWNLOADDIR = /tmp/gnunet-downloads/"); fprintf(f, "%s\n",""); fprintf(f, "%s\n","# This option allows enabling/disabling of the code that collects"); fprintf(f, "%s\n","# file-identifiers for building directories. Note that you can"); fprintf(f, "%s\n","# build directories of files that you insert without collecting"); fprintf(f, "%s\n","# file-identifiers by using the option \"-b\" of gnunet-insert."); fprintf(f, "%s\n","# You cannot add entries from namespaces to directories without"); fprintf(f, "%s\n","# at least temporarily collecting file-identifiers."); fprintf(f, "%s\n","# Default is NO"); fprintf(f, "%s\n","COLLECT-FILE-IDENTIFIERS = NO"); fprintf(f, "%s\n",""); fprintf(f, "%s\n",""); fprintf(f, "%s\n","#################################################"); fprintf(f, "%s\n","# Default options for the gnunet-insert tool"); fprintf(f, "%s\n","#################################################"); fprintf(f, "%s\n","[GNUNET-INSERT]"); fprintf(f, "%s\n",""); fprintf(f, "%s\n","# What is the initial priority of content that is locally inserted? "); fprintf(f, "%s\n","# Default is 65535 which is \"very high\"."); fprintf(f, "%s\n","CONTENT-PRIORITY = 65535"); fprintf(f, "%s\n",""); fprintf(f, "%s\n",""); fprintf(f, "%s\n","#################################################"); fprintf(f, "%s\n","# Default options for gnunet-gtk"); fprintf(f, "%s\n","#################################################"); fprintf(f, "%s\n","[GNUNET-GTK]"); fprintf(f, "%s\n",""); fprintf(f, "%s\n","# Path to the gnunet.conf file for gnunetd (for"); fprintf(f, "%s\n","# forking gnunetd by gnunet-gtk)"); fprintf(f, "%s\n","GNUNETD-CONFIG = /etc/gnunet.conf"); fprintf(f, "%s\n",""); fprintf(f, "%s\n",""); fprintf(f, "%s\n",""); fprintf(f, "%s\n","##########################################"); fprintf(f, "%s\n","# Defaults for gnunet-chat"); fprintf(f, "%s\n","##########################################"); fprintf(f, "%s\n","[GNUNET-CHAT]"); fprintf(f, "%s\n",""); fprintf(f, "%s\n","# You can specify your nickname here and thus avoid having to pass it"); fprintf(f, "%s\n","# with -n NICK at the command-line. The default is empty."); fprintf(f, "%s\n","#"); fprintf(f, "%s\n","# NICK = \"my nickname\""); fprintf(f, "%s\n",""); fprintf(f, "%s\n","##########################################"); fprintf(f, "%s\n","# Defaults for gnunet-tracekit"); fprintf(f, "%s\n","##########################################"); fprintf(f, "%s\n","[GNUNET-TRACEKIT]"); fprintf(f, "%s\n",""); fprintf(f, "%s\n","# How long to wait for replies (in seconds)? (default: 30)"); fprintf(f, "%s\n","WAIT = 30"); fprintf(f, "%s\n",""); fprintf(f, "%s\n","# How many hops should the trace go? (default: 5)"); fprintf(f, "%s\n","HOPS = 5"); fprintf(f, "%s\n",""); fprintf(f, "%s\n","# How important is the trace message? (default: 1000)"); fprintf(f, "%s\n","PRIORITY = 1000"); fprintf(f, "%s\n",""); fprintf(f, "%s\n","# Output format, 0 is human readable, 1 is dot,"); fprintf(f, "%s\n","# 2 is vcg (default: 2)"); fprintf(f, "%s\n","FORMAT = 2"); fprintf(f, "%s\n",""); fprintf(f, "%s\n",""); fprintf(f, "%s\n","[GNUNET-TESTBED]"); fprintf(f, "%s\n",""); fprintf(f, "%s\n","# Port used internally by gnunet-testbed"); fprintf(f, "%s\n","# (for the IPC in the gnunet-testbed shell)."); fprintf(f, "%s\n","# The default is 2089."); fprintf(f, "%s\n","PORT = 2089"); fprintf(f, "%s\n",""); fprintf(f, "%s\n","# At which URL does the registration software"); fprintf(f, "%s\n","# run?"); fprintf(f, "%s\n","# Default is http://ovmj.org/GNUnet/testbed/"); fprintf(f, "%s\n","REGISTERURL = \"http://ovmj.org/GNUnet/testbed/\""); }