{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_SET_ONE ('e',
+ GNUNET_GETOPT_option_flag ('e',
"end",
gettext_noop ("stop all GNUnet services"),
&end),
- GNUNET_GETOPT_OPTION_STRING ('i',
+ GNUNET_GETOPT_option_string ('i',
"init",
"SERVICE",
gettext_noop ("start a particular service"),
&init),
- GNUNET_GETOPT_OPTION_STRING ('k',
+ GNUNET_GETOPT_option_string ('k',
"kill",
"SERVICE",
gettext_noop ("stop a particular service"),
&term),
- GNUNET_GETOPT_OPTION_SET_ONE ('s',
+ GNUNET_GETOPT_option_flag ('s',
"start",
gettext_noop ("start all GNUnet default services"),
&start),
- GNUNET_GETOPT_OPTION_SET_ONE ('r',
+ GNUNET_GETOPT_option_flag ('r',
"restart",
gettext_noop ("stop and start all GNUnet default services"),
&restart),
- GNUNET_GETOPT_OPTION_SET_ONE ('d',
+ GNUNET_GETOPT_option_flag ('d',
"delete",
gettext_noop ("delete config file and directory on exit"),
&delete),
- GNUNET_GETOPT_OPTION_SET_ONE ('m',
+ GNUNET_GETOPT_option_flag ('m',
"monitor",
gettext_noop ("monitor ARM activities"),
&monitor),
- GNUNET_GETOPT_OPTION_SET_ONE ('q',
+ GNUNET_GETOPT_option_flag ('q',
"quiet",
gettext_noop ("don't print status messages"),
&quiet),
- GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('T',
+ GNUNET_GETOPT_option_relative_time ('T',
"timeout",
"DELAY",
gettext_noop ("exit with error status if operation does not finish after DELAY"),
&timeout),
- GNUNET_GETOPT_OPTION_SET_ONE ('I',
+ GNUNET_GETOPT_option_flag ('I',
"info",
gettext_noop ("list currently running services"),
&list),
- GNUNET_GETOPT_OPTION_SET_ONE ('O',
+ GNUNET_GETOPT_option_flag ('O',
"no-stdout",
gettext_noop ("don't let gnunet-service-arm inherit standard output"),
&no_stdout),
- GNUNET_GETOPT_OPTION_SET_ONE ('E',
+ GNUNET_GETOPT_option_flag ('E',
"no-stderr",
gettext_noop ("don't let gnunet-service-arm inherit standard error"),
&no_stderr),
struct GNUNET_GETOPT_CommandLineOption options[] =
{
- GNUNET_GETOPT_OPTION_STRING ('s',
+ GNUNET_GETOPT_option_string ('s',
"solver",
NULL,
gettext_noop ("solver to use"),
&opt_solver),
- GNUNET_GETOPT_OPTION_STRING ('e',
+ GNUNET_GETOPT_option_string ('e',
"experiment",
NULL,
gettext_noop ("experiment to use"),
&opt_exp_file),
- GNUNET_GETOPT_OPTION_SET_ONE ('e',
+ GNUNET_GETOPT_option_flag ('e',
"experiment",
gettext_noop ("experiment to use"),
&opt_verbose),
opt_type_str = NULL;
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_SET_ONE ('u',
+ GNUNET_GETOPT_option_flag ('u',
"used",
gettext_noop ("get list of active addresses currently used"),
&opt_list_used),
- GNUNET_GETOPT_OPTION_SET_ONE ('a',
+ GNUNET_GETOPT_option_flag ('a',
"all",
gettext_noop ("get list of all active addresses"),
&opt_list_all),
- GNUNET_GETOPT_OPTION_STRING ('C',
+ GNUNET_GETOPT_option_string ('C',
"connect",
NULL,
gettext_noop ("connect to PEER"),
&cpid_str),
- GNUNET_GETOPT_OPTION_SET_ONE ('n',
+ GNUNET_GETOPT_option_flag ('n',
"numeric",
gettext_noop ("do not resolve IP addresses to hostnames"),
&opt_resolve_addresses_numeric),
- GNUNET_GETOPT_OPTION_SET_ONE ('m',
+ GNUNET_GETOPT_option_flag ('m',
"monitor",
gettext_noop ("monitor mode"),
&opt_monitor),
- GNUNET_GETOPT_OPTION_SET_ONE ('p',
+ GNUNET_GETOPT_option_flag ('p',
"preference",
gettext_noop ("set preference for the given peer"),
&opt_set_pref),
- GNUNET_GETOPT_OPTION_SET_ONE ('q',
+ GNUNET_GETOPT_option_flag ('q',
"quotas",
gettext_noop ("print all configured quotas"),
&opt_print_quotas),
- GNUNET_GETOPT_OPTION_STRING ('i',
+ GNUNET_GETOPT_option_string ('i',
"id",
"TYPE",
gettext_noop ("peer id"),
&opt_pid_str),
- GNUNET_GETOPT_OPTION_STRING ('t',
+ GNUNET_GETOPT_option_string ('t',
"type",
"TYPE",
gettext_noop ("preference type to set: latency | bandwidth"),
&opt_type_str),
- GNUNET_GETOPT_OPTION_SET_UINT ('k',
+ GNUNET_GETOPT_option_uint ('k',
"value",
"VALUE",
gettext_noop ("preference value"),
&opt_pref_value),
- GNUNET_GETOPT_OPTION_SET_ONE ('V',
+ GNUNET_GETOPT_option_flag ('V',
"verbose",
gettext_noop ("verbose output (include ATS address properties)"),
&opt_verbose),
static struct GNUNET_GETOPT_CommandLineOption options[] =
{
- GNUNET_GETOPT_OPTION_STRING ('s',
+ GNUNET_GETOPT_option_string ('s',
"solver",
gettext_noop ("solver to use"),
&opt_solver),
- GNUNET_GETOPT_OPTION_STRING ('e',
+ GNUNET_GETOPT_option_string ('e',
"experiment"
gettext_noop ("experiment to use"),
&opt_exp_file),
- GNUNET_GETOPT_OPTION_VERBOSE (&opt_verbose),
+ GNUNET_GETOPT_option_verbose (&opt_verbose),
- GNUNET_GETOPT_OPTION_SET_ONE ('p',
+ GNUNET_GETOPT_option_flag ('p',
"print",
gettext_noop ("print logging"),
&opt_print),
- GNUNET_GETOPT_OPTION_SET_ONE ('f',
+ GNUNET_GETOPT_option_flag ('f',
"file",
gettext_noop ("save logging to disk"),
&opt_save),
- GNUNET_GETOPT_OPTION_SET_ONE ('d',
+ GNUNET_GETOPT_option_flag ('d',
"dn",
gettext_noop ("disable normalization"),
&opt_disable_normalization),
static struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_SET_UINT ('a',
+ GNUNET_GETOPT_option_uint ('a',
"addresses",
gettext_noop ("addresses to use"),
&ph.N_address),
- GNUNET_GETOPT_OPTION_SET_UINT ('s',
+ GNUNET_GETOPT_option_uint ('s',
"start",
gettext_noop ("start with peer"),
&ph.N_peers_start),
- GNUNET_GETOPT_OPTION_SET_UINT ('e',
+ GNUNET_GETOPT_option_uint ('e',
"end",
gettext_noop ("end with peer"),
&ph.N_peers_end),
- GNUNET_GETOPT_OPTION_SET_UINT ('i',
+ GNUNET_GETOPT_option_uint ('i',
"iterations",
gettext_noop ("number of iterations used for averaging (default: 1)"),
&ph.total_iterations),
- GNUNET_GETOPT_OPTION_SET_UINT ('p',
+ GNUNET_GETOPT_option_uint ('p',
"percentage",
gettext_noop ("update a fix percentage of addresses"),
&ph.opt_update_percent),
- GNUNET_GETOPT_OPTION_SET_ONE ('d',
+ GNUNET_GETOPT_option_flag ('d',
"data",
gettext_noop ("create data file"),
&ph.create_datafile),
- GNUNET_GETOPT_OPTION_SET_ONE ('u',
+ GNUNET_GETOPT_option_flag ('u',
"update",
gettext_noop ("measure updates"),
&ph.measure_updates),
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_FILENAME ('d',
+ GNUNET_GETOPT_option_filename ('d',
"description",
"FILE",
gettext_noop ("description of the item to be sold"),
&fndesc),
- GNUNET_GETOPT_OPTION_FILENAME ('p',
+ GNUNET_GETOPT_option_filename ('p',
"pricemap",
"FILE",
gettext_noop ("mapping of possible prices"),
&fnprices),
- GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('r',
+ GNUNET_GETOPT_option_relative_time ('r',
"roundtime",
"DURATION",
gettext_noop ("max duration per round"),
&dround),
- GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('s',
+ GNUNET_GETOPT_option_relative_time ('s',
"regtime",
"DURATION",
gettext_noop ("duration until auction starts"),
&dstart),
- GNUNET_GETOPT_OPTION_SET_UINT ('m',
+ GNUNET_GETOPT_option_uint ('m',
"m",
"NUMBER",
gettext_noop ("number of items to sell\n"
">0 for vickrey/M+1st price auction"),
&m),
- GNUNET_GETOPT_OPTION_SET_ONE ('u',
+ GNUNET_GETOPT_option_flag ('u',
"public",
gettext_noop ("public auction outcome"),
&outcome),
- GNUNET_GETOPT_OPTION_SET_ONE ('i',
+ GNUNET_GETOPT_option_flag ('i',
"interactive",
gettext_noop ("keep running in foreground until auction completes"),
&interactive),
const char helpstr[] = "Create tunnels and retrieve info about CADET's status.";
struct GNUNET_GETOPT_CommandLineOption options[] = {
/* I would use the terminology 'circuit' here... --lynX */
- GNUNET_GETOPT_OPTION_STRING ('C',
+ GNUNET_GETOPT_option_string ('C',
"connection",
"CONNECTION_ID",
gettext_noop ("Provide information about a particular connection"),
&conn_id),
- GNUNET_GETOPT_OPTION_SET_ONE ('e',
+ GNUNET_GETOPT_option_flag ('e',
"echo",
gettext_noop ("Activate echo mode"),
&echo),
- GNUNET_GETOPT_OPTION_SET_ONE ('d',
+ GNUNET_GETOPT_option_flag ('d',
"dump",
gettext_noop ("Dump debug information to STDERR"),
&dump),
- GNUNET_GETOPT_OPTION_STRING ('o',
+ GNUNET_GETOPT_option_string ('o',
"open-port",
"SHARED_SECRET",
gettext_noop ("Listen for connections using a shared secret among sender and recipient"),
&listen_port),
- GNUNET_GETOPT_OPTION_STRING ('p',
+ GNUNET_GETOPT_option_string ('p',
"peer",
"PEER_ID",
gettext_noop ("Provide information about a patricular peer"),
&peer_id),
- GNUNET_GETOPT_OPTION_SET_ONE ('P',
+ GNUNET_GETOPT_option_flag ('P',
"peers",
gettext_noop ("Provide information about all peers"),
&request_peers),
- GNUNET_GETOPT_OPTION_STRING ('t',
+ GNUNET_GETOPT_option_string ('t',
"tunnel",
"TUNNEL_ID",
gettext_noop ("Provide information about a particular tunnel"),
&tunnel_id),
- GNUNET_GETOPT_OPTION_SET_ONE ('T',
+ GNUNET_GETOPT_option_flag ('T',
"tunnels",
gettext_noop ("Provide information about all tunnels"),
&request_tunnels),
const char *config_file;
char port_id[] = "test port";
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('t',
+ GNUNET_GETOPT_option_relative_time ('t',
"time",
"short_time",
gettext_noop ("set short timeout"),
&short_time),
- GNUNET_GETOPT_OPTION_SET_UINT ('m',
+ GNUNET_GETOPT_option_uint ('m',
"messages",
"NUM_MESSAGES",
gettext_noop ("set number of messages to send"),
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_SET_UINT ('n',
+ GNUNET_GETOPT_option_uint ('n',
"num-peers",
NULL,
gettext_noop ("number of peers in consensus"),
&num_peers),
- GNUNET_GETOPT_OPTION_SET_UINT ('k',
+ GNUNET_GETOPT_option_uint ('k',
"value-replication",
NULL,
gettext_noop ("how many peers (random selection without replacement) receive one value?"),
&replication),
- GNUNET_GETOPT_OPTION_SET_UINT ('x',
+ GNUNET_GETOPT_option_uint ('x',
"num-values",
NULL,
gettext_noop ("number of values"),
&num_values),
- GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('t',
+ GNUNET_GETOPT_option_relative_time ('t',
"timeout",
NULL,
gettext_noop ("consensus timeout"),
&conclude_timeout),
- GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('d',
+ GNUNET_GETOPT_option_relative_time ('d',
"delay",
NULL,
gettext_noop ("delay until consensus starts"),
&consensus_delay),
- GNUNET_GETOPT_OPTION_FILENAME ('s',
+ GNUNET_GETOPT_option_filename ('s',
"statistics",
"FILENAME",
gettext_noop ("write statistics to file"),
&statistics_filename),
- GNUNET_GETOPT_OPTION_SET_ONE ('S',
+ GNUNET_GETOPT_option_flag ('S',
"dist-static",
gettext_noop ("distribute elements to a static subset of good peers"),
&dist_static),
- GNUNET_GETOPT_OPTION_SET_ONE ('V',
+ GNUNET_GETOPT_option_flag ('V',
"verbose",
gettext_noop ("be more verbose (print received values)"),
&verbose),
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_STRING ('e',
+ GNUNET_GETOPT_option_string ('e',
"ego",
"NAME",
gettext_noop ("sets the NAME of the ego to use for the phone (and name resolution)"),
&ego_name),
- GNUNET_GETOPT_OPTION_STRING ('p',
+ GNUNET_GETOPT_option_string ('p',
"phone",
"LINE",
gettext_noop ("sets the LINE to use for the phone"),
{
int res;
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_SET_ONE ('m',
+ GNUNET_GETOPT_option_flag ('m',
"monitor",
gettext_noop ("provide information about all current connections (continuously)"),
&monitor_connections),
main (int argc, char *const *argv)
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_FILENAME ('s',
+ GNUNET_GETOPT_option_filename ('s',
"sourcecfg",
"FILENAME",
gettext_noop ("specifies the configuration to use to access an alternative datastore; will merge that datastore into our current datastore"),
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_STRING ('k',
+ GNUNET_GETOPT_option_string ('k',
"key",
"KEY",
gettext_noop ("the query key"),
&query_key),
- GNUNET_GETOPT_OPTION_SET_UINT ('r',
+ GNUNET_GETOPT_option_uint ('r',
"replication",
"LEVEL",
gettext_noop ("how many parallel requests (replicas) to create"),
&replication),
- GNUNET_GETOPT_OPTION_SET_UINT ('t',
+ GNUNET_GETOPT_option_uint ('t',
"type",
"TYPE",
gettext_noop ("the type of data to look for"),
&query_type),
- GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('T',
+ GNUNET_GETOPT_option_relative_time ('T',
"timeout",
"TIMEOUT",
gettext_noop ("how long to execute this query before giving up?"),
&timeout_request),
- GNUNET_GETOPT_OPTION_SET_ONE ('x',
+ GNUNET_GETOPT_option_flag ('x',
"demultiplex",
gettext_noop ("use DHT's demultiplex everywhere option"),
&demultixplex_everywhere),
- GNUNET_GETOPT_OPTION_VERBOSE (&verbose),
+ GNUNET_GETOPT_option_verbose (&verbose),
GNUNET_GETOPT_OPTION_END
};
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_STRING ('k',
+ GNUNET_GETOPT_option_string ('k',
"key",
"KEY",
gettext_noop ("the query key"),
&query_key),
- GNUNET_GETOPT_OPTION_SET_UINT ('t',
+ GNUNET_GETOPT_option_uint ('t',
"type",
"TYPE",
gettext_noop ("the type of data to look for"),
&block_type),
- GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('T',
+ GNUNET_GETOPT_option_relative_time ('T',
"timeout",
"TIMEOUT",
gettext_noop ("how long should the monitor command run"),
&timeout_request),
- GNUNET_GETOPT_OPTION_SET_ONE ('V',
+ GNUNET_GETOPT_option_flag ('V',
"verbose",
gettext_noop ("be verbose (print progress information)"),
&verbose),
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_STRING ('d',
+ GNUNET_GETOPT_option_string ('d',
"data",
"DATA",
gettext_noop ("the data to insert under the key"),
&data),
- GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('e',
+ GNUNET_GETOPT_option_relative_time ('e',
"expiration",
"EXPIRATION",
gettext_noop ("how long to store this entry in the dht (in seconds)"),
&expiration),
- GNUNET_GETOPT_OPTION_STRING ('k',
+ GNUNET_GETOPT_option_string ('k',
"key",
"KEY",
gettext_noop ("the query key"),
&query_key),
- GNUNET_GETOPT_OPTION_SET_ONE ('x',
+ GNUNET_GETOPT_option_flag ('x',
"demultiplex",
gettext_noop ("use DHT's demultiplex everywhere option"),
&demultixplex_everywhere),
- GNUNET_GETOPT_OPTION_SET_UINT ('r',
+ GNUNET_GETOPT_option_uint ('r',
"replication",
"LEVEL",
gettext_noop ("how many replicas to create"),
&replication),
- GNUNET_GETOPT_OPTION_SET_ONE ('R',
+ GNUNET_GETOPT_option_flag ('R',
"record",
gettext_noop ("use DHT's record route option"),
&record_route),
- GNUNET_GETOPT_OPTION_SET_UINT ('t',
+ GNUNET_GETOPT_option_uint ('t',
"type",
"TYPE",
gettext_noop ("the type to insert data as"),
&query_type),
- GNUNET_GETOPT_OPTION_VERBOSE (&verbose),
+ GNUNET_GETOPT_option_verbose (&verbose),
GNUNET_GETOPT_OPTION_END
};
int rc;
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_SET_UINT ('n',
+ GNUNET_GETOPT_option_uint ('n',
"peers",
"COUNT",
gettext_noop ("number of peers to start"),
&num_peers),
- GNUNET_GETOPT_OPTION_SET_UINT ('s',
+ GNUNET_GETOPT_option_uint ('s',
"searches",
"COUNT",
gettext_noop ("maximum number of times we try to search for successor circle formation (0 for R5N)"),
&max_searches),
- GNUNET_GETOPT_OPTION_STRING ('H',
+ GNUNET_GETOPT_option_string ('H',
"hosts",
"FILENAME",
gettext_noop ("name of the file with the login information for the testbed"),
&hosts_file),
- GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('D',
+ GNUNET_GETOPT_option_relative_time ('D',
"delay",
"DELAY",
gettext_noop ("delay between rounds for collecting statistics (default: 30 sec)"),
&delay_stats),
- GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('P',
+ GNUNET_GETOPT_option_relative_time ('P',
"PUT-delay",
"DELAY",
gettext_noop ("delay to start doing PUTs (default: 1 sec)"),
&delay_put),
- GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('G',
+ GNUNET_GETOPT_option_relative_time ('G',
"GET-delay",
"DELAY",
gettext_noop ("delay to start doing GETs (default: 5 min)"),
&delay_get),
- GNUNET_GETOPT_OPTION_SET_UINT ('r',
+ GNUNET_GETOPT_option_uint ('r',
"replication",
"DEGREE",
gettext_noop ("replication degree for DHT PUTs"),
&replication),
- GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('t',
+ GNUNET_GETOPT_option_relative_time ('t',
"timeout",
"TIMEOUT",
gettext_noop ("timeout for DHT PUT and GET requests (default: 1 min)"),
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_SET_ONE ('i',
+ GNUNET_GETOPT_option_flag ('i',
"inbound-only",
gettext_noop ("only monitor DNS queries"),
&inbound_only),
- GNUNET_GETOPT_OPTION_SET_ONE ('o',
+ GNUNET_GETOPT_option_flag ('o',
"outbound-only",
gettext_noop ("only monitor DNS queries"),
&outbound_only),
- GNUNET_GETOPT_OPTION_VERBOSE (&verbosity),
+ GNUNET_GETOPT_option_verbose (&verbosity),
GNUNET_GETOPT_OPTION_END
};
main (int argc, char *const *argv)
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_STRING ('4',
+ GNUNET_GETOPT_option_string ('4',
"ipv4",
"IPV4",
gettext_noop ("set A records"),
&n4),
- GNUNET_GETOPT_OPTION_STRING ('6',
+ GNUNET_GETOPT_option_string ('6',
"ipv4",
"IPV6",
gettext_noop ("set AAAA records"),
&n6),
- GNUNET_GETOPT_OPTION_VERBOSE (&verbosity),
+ GNUNET_GETOPT_option_verbose (&verbosity),
GNUNET_GETOPT_OPTION_END
};
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_VERBOSE (&verbose),
+ GNUNET_GETOPT_option_verbose (&verbose),
GNUNET_GETOPT_OPTION_END
};
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_SET_UINT ('a',
+ GNUNET_GETOPT_option_uint ('a',
"anonymity",
"LEVEL",
gettext_noop ("set the desired LEVEL of sender-anonymity"),
&anonymity_level),
- GNUNET_GETOPT_OPTION_SET_ONE ('d',
+ GNUNET_GETOPT_option_flag ('d',
"disable-creation-time",
gettext_noop ("disable adding the creation time to the metadata of the uploaded file"),
&do_disable_creation_time),
- GNUNET_GETOPT_OPTION_SET_ONE ('D',
+ GNUNET_GETOPT_option_flag ('D',
"disable-extractor",
gettext_noop ("do not use libextractor to add keywords or metadata"),
&disable_extractor),
- GNUNET_GETOPT_OPTION_SET_UINT ('p',
+ GNUNET_GETOPT_option_uint ('p',
"priority",
"PRIORITY",
gettext_noop ("specify the priority of the content"),
&content_priority),
- GNUNET_GETOPT_OPTION_SET_UINT ('r',
+ GNUNET_GETOPT_option_uint ('r',
"replication",
"LEVEL",
gettext_noop ("set the desired replication LEVEL"),
&replication_level),
- GNUNET_GETOPT_OPTION_VERBOSE (&verbose),
+ GNUNET_GETOPT_option_verbose (&verbose),
GNUNET_GETOPT_OPTION_END
};
main (int argc, char *const *argv)
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_SET_UINT ('a',
+ GNUNET_GETOPT_option_uint ('a',
"anonymity",
"LEVEL",
gettext_noop ("set the desired LEVEL of receiver-anonymity"),
&anonymity),
- GNUNET_GETOPT_OPTION_SET_ONE ('D',
+ GNUNET_GETOPT_option_flag ('D',
"delete-incomplete",
gettext_noop ("delete incomplete downloads (when aborted with CTRL-C)"),
&delete_incomplete),
- GNUNET_GETOPT_OPTION_SET_ONE ('n',
+ GNUNET_GETOPT_option_flag ('n',
"no-network",
gettext_noop ("only search the local peer (no P2P network search)"),
&local_only),
- GNUNET_GETOPT_OPTION_STRING ('o',
+ GNUNET_GETOPT_option_string ('o',
"output",
"FILENAME",
gettext_noop ("write the file to FILENAME"),
&filename),
- GNUNET_GETOPT_OPTION_SET_UINT ('p',
+ GNUNET_GETOPT_option_uint ('p',
"parallelism",
"DOWNLOADS",
gettext_noop ("set the maximum number of parallel downloads that is allowed"),
¶llelism),
- GNUNET_GETOPT_OPTION_SET_UINT ('r',
+ GNUNET_GETOPT_option_uint ('r',
"request-parallelism",
"REQUESTS",
gettext_noop ("set the maximum number of parallel requests for blocks that is allowed"),
&request_parallelism),
- GNUNET_GETOPT_OPTION_SET_ONE ('R',
+ GNUNET_GETOPT_option_flag ('R',
"recursive",
gettext_noop ("download a GNUnet directory recursively"),
&do_recursive),
- GNUNET_GETOPT_OPTION_INCREMENT_VALUE ('V',
+ GNUNET_GETOPT_option_increment_uint ('V',
"verbose",
gettext_noop ("be verbose (print progress information)"),
&verbose),
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_SET_UINT ('n',
+ GNUNET_GETOPT_option_uint ('n',
"num-peers",
"COUNT",
gettext_noop ("run the experiment with COUNT peers"),
&num_peers),
- GNUNET_GETOPT_OPTION_STRING ('H',
+ GNUNET_GETOPT_option_string ('H',
"hosts",
"HOSTFILE",
gettext_noop ("specifies name of a file with the HOSTS the testbed should use"),
&host_filename),
- GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('t',
+ GNUNET_GETOPT_option_relative_time ('t',
"timeout",
"DELAY",
gettext_noop ("automatically terminate experiment after DELAY"),
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_SET_ONE ('i',
+ GNUNET_GETOPT_option_flag ('i',
"list-indexed",
gettext_noop ("print a list of all indexed files"),
&list_indexed_files),
- GNUNET_GETOPT_OPTION_VERBOSE (&verbose),
+ GNUNET_GETOPT_option_verbose (&verbose),
GNUNET_GETOPT_OPTION_END
};
main (int argc, char *const *argv)
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_SET_UINT ('a',
+ GNUNET_GETOPT_option_uint ('a',
"anonymity",
"LEVEL",
gettext_noop ("set the desired LEVEL of sender-anonymity"),
&bo.anonymity_level),
- GNUNET_GETOPT_OPTION_SET_ONE ('d',
+ GNUNET_GETOPT_option_flag ('d',
"disable-creation-time",
gettext_noop ("disable adding the creation time to the "
"metadata of the uploaded file"),
&do_disable_creation_time),
- GNUNET_GETOPT_OPTION_SET_ONE ('D',
+ GNUNET_GETOPT_option_flag ('D',
"disable-extractor",
gettext_noop ("do not use libextractor to add keywords or metadata"),
&disable_extractor),
- GNUNET_GETOPT_OPTION_SET_ONE ('e',
+ GNUNET_GETOPT_option_flag ('e',
"extract",
gettext_noop ("print list of extracted keywords that would "
"be used, but do not perform upload"),
gettext_noop ("set the meta-data for the given TYPE to the given VALUE"),
&meta),
- GNUNET_GETOPT_OPTION_SET_ONE ('n',
+ GNUNET_GETOPT_option_flag ('n',
"noindex",
gettext_noop ("do not index, perform full insertion (stores "
"entire file in encrypted form in GNUnet database)"),
&do_insert),
- GNUNET_GETOPT_OPTION_STRING ('N',
+ GNUNET_GETOPT_option_string ('N',
"next",
"ID",
gettext_noop ("specify ID of an updated version to be "
"published in the future (for namespace insertions only)"),
&next_id),
- GNUNET_GETOPT_OPTION_SET_UINT ('p',
+ GNUNET_GETOPT_option_uint ('p',
"priority",
"PRIORITY",
gettext_noop ("specify the priority of the content"),
&bo.content_priority),
- GNUNET_GETOPT_OPTION_STRING ('P',
+ GNUNET_GETOPT_option_string ('P',
"pseudonym",
"NAME",
gettext_noop ("publish the files under the pseudonym "
"NAME (place file into namespace)"),
&pseudonym),
- GNUNET_GETOPT_OPTION_SET_UINT ('r',
+ GNUNET_GETOPT_option_uint ('r',
"replication",
"LEVEL",
gettext_noop ("set the desired replication LEVEL"),
&bo.replication_level),
- GNUNET_GETOPT_OPTION_SET_ONE ('s',
+ GNUNET_GETOPT_option_flag ('s',
"simulate-only",
gettext_noop ("only simulate the process but do not do "
"any actual publishing (useful to compute URIs)"),
&do_simulate),
- GNUNET_GETOPT_OPTION_STRING ('t',
+ GNUNET_GETOPT_option_string ('t',
"this",
"ID",
gettext_noop ("set the ID of this version of the publication "
"(for namespace insertions only)"),
&this_id),
- GNUNET_GETOPT_OPTION_STRING ('u',
+ GNUNET_GETOPT_option_string ('u',
"uri",
"URI",
gettext_noop ("URI to be published (can be used instead of passing a "
"file to add keywords to the file with the respective URI)"),
&uri_string),
- GNUNET_GETOPT_OPTION_VERBOSE (&verbose),
+ GNUNET_GETOPT_option_verbose (&verbose),
GNUNET_GETOPT_OPTION_END
};
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_SET_UINT ('a',
+ GNUNET_GETOPT_option_uint ('a',
"anonymity",
"LEVEL",
gettext_noop ("set the desired LEVEL of receiver-anonymity"),
&anonymity),
- GNUNET_GETOPT_OPTION_SET_ONE ('n',
+ GNUNET_GETOPT_option_flag ('n',
"no-network",
gettext_noop ("only search the local peer (no P2P network search)"),
&local_only),
- GNUNET_GETOPT_OPTION_STRING ('o',
+ GNUNET_GETOPT_option_string ('o',
"output",
"PREFIX",
gettext_noop ("write search results to file starting with PREFIX"),
&output_filename),
- GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('t',
+ GNUNET_GETOPT_option_relative_time ('t',
"timeout",
"DELAY",
gettext_noop ("automatically terminate search after DELAY"),
&timeout),
- GNUNET_GETOPT_OPTION_VERBOSE (&verbose),
+ GNUNET_GETOPT_option_verbose (&verbose),
- GNUNET_GETOPT_OPTION_SET_UINT ('N',
+ GNUNET_GETOPT_option_uint ('N',
"results",
"VALUE",
gettext_noop ("automatically terminate search "
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_VERBOSE (&verbose),
+ GNUNET_GETOPT_option_verbose (&verbose),
GNUNET_GETOPT_OPTION_END
};
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_SET_UINT ('p',
+ GNUNET_GETOPT_option_uint ('p',
"port",
"PORT",
gettext_noop ("Run HTTP serve on port PORT (default is 8888)"),
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_STRING ('d',
+ GNUNET_GETOPT_option_string ('d',
"dns",
"IP",
gettext_noop ("IP of recursive DNS resolver to use (required)"),
&dns_ip),
- GNUNET_GETOPT_OPTION_STRING ('f',
+ GNUNET_GETOPT_option_string ('f',
"fcfs",
"NAME",
gettext_noop ("Authoritative FCFS suffix to use (optional); default: fcfs.zkey.eu"),
&fcfs_suffix),
- GNUNET_GETOPT_OPTION_STRING ('s',
+ GNUNET_GETOPT_option_string ('s',
"suffix",
"SUFFIX",
gettext_noop ("Authoritative DNS suffix to use (optional); default: zkey.eu"),
&dns_suffix),
- GNUNET_GETOPT_OPTION_SET_UINT ('p',
+ GNUNET_GETOPT_option_uint ('p',
"port",
"UDPPORT",
gettext_noop ("UDP port to listen on for inbound DNS requests; default: 2853"),
&listen_port),
- GNUNET_GETOPT_OPTION_STRING ('z',
+ GNUNET_GETOPT_option_string ('z',
"zone",
"PUBLICKEY",
gettext_noop ("Public key of the GNS zone to use (overrides default)"),
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_SET_ULONG ('p',
+ GNUNET_GETOPT_option_ulong ('p',
"port",
NULL,
gettext_noop ("listen on specified port (default: 7777)"),
&port),
- GNUNET_GETOPT_OPTION_STRING ('a',
+ GNUNET_GETOPT_option_string ('a',
"authority",
NULL,
gettext_noop ("pem file to use as CA"),
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_STRING ('u',
+ GNUNET_GETOPT_option_string ('u',
"lookup",
"NAME",
gettext_noop ("Lookup a record for the given name"),
&lookup_name),
- GNUNET_GETOPT_OPTION_STRING ('t',
+ GNUNET_GETOPT_option_string ('t',
"type",
"TYPE",
gettext_noop ("Specify the type of the record to lookup"),
&lookup_type),
- GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('T',
+ GNUNET_GETOPT_option_relative_time ('T',
"timeout",
"DELAY",
gettext_noop ("Specify timeout for the lookup"),
&timeout),
- GNUNET_GETOPT_OPTION_SET_ONE ('r',
+ GNUNET_GETOPT_option_flag ('r',
"raw",
gettext_noop ("No unneeded output"),
&raw),
- GNUNET_GETOPT_OPTION_STRING ('p',
+ GNUNET_GETOPT_option_string ('p',
"public-key",
"PKEY",
gettext_noop ("Specify the public key of the zone to lookup the record in"),
&public_key),
- GNUNET_GETOPT_OPTION_STRING ('z',
+ GNUNET_GETOPT_option_string ('z',
"zone",
"NAME",
gettext_noop ("Specify the name of the ego of the zone to lookup the record in"),
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
#if HAVE_MHD
- GNUNET_GETOPT_OPTION_SET_ONE ('a',
+ GNUNET_GETOPT_option_flag ('a',
"advertise",
gettext_noop ("advertise our hostlist to other peers"),
&advertising),
#endif
- GNUNET_GETOPT_OPTION_SET_ONE ('b',
+ GNUNET_GETOPT_option_flag ('b',
"bootstrap",
gettext_noop ("bootstrap using hostlists (it is highly recommended that you always use this option)"),
&bootstrapping),
- GNUNET_GETOPT_OPTION_SET_ONE ('e',
+ GNUNET_GETOPT_option_flag ('e',
"enable-learning",
gettext_noop ("enable learning about hostlist servers from other peers"),
&learning),
#if HAVE_MHD
- GNUNET_GETOPT_OPTION_SET_ONE ('p',
+ GNUNET_GETOPT_option_flag ('p',
"provide-hostlist",
gettext_noop ("provide a hostlist server"),
&provide_hostlist),
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_STRING ('t',
+ GNUNET_GETOPT_option_string ('t',
"token",
NULL,
gettext_noop ("GNUid token"),
&token),
- GNUNET_GETOPT_OPTION_SET_ONE ('p',
+ GNUNET_GETOPT_option_flag ('p',
"print",
gettext_noop ("Print token contents"),
&print_token),
main (int argc, char *const *argv)
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_STRING ('C',
+ GNUNET_GETOPT_option_string ('C',
"create",
"NAME",
gettext_noop ("create ego NAME"),
&create_ego),
- GNUNET_GETOPT_OPTION_STRING ('D',
+ GNUNET_GETOPT_option_string ('D',
"delete",
"NAME",
gettext_noop ("delete ego NAME "),
&delete_ego),
- GNUNET_GETOPT_OPTION_SET_ONE ('d',
+ GNUNET_GETOPT_option_flag ('d',
"display",
gettext_noop ("display all egos"),
&list),
- GNUNET_GETOPT_OPTION_STRING ('e',
+ GNUNET_GETOPT_option_string ('e',
"ego",
"NAME",
gettext_noop ("set default identity to EGO for a subsystem SUBSYSTEM (use together with -s)"),
&set_ego),
- GNUNET_GETOPT_OPTION_SET_ONE ('m',
+ GNUNET_GETOPT_option_flag ('m',
"monitor",
gettext_noop ("run in monitor mode egos"),
&monitor),
- GNUNET_GETOPT_OPTION_STRING ('s',
+ GNUNET_GETOPT_option_string ('s',
"set",
"SUBSYSTEM",
gettext_noop ("set default identity to EGO for a subsystem SUBSYSTEM (use together with -e)"),
* @param about string with brief description of the application
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_HELP (const char *about);
+GNUNET_GETOPT_option_help (const char *about);
/**
* @param version string with the version number
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_VERSION (const char *version);
+GNUNET_GETOPT_option_version (const char *version);
* @param[out] logfn set to the name of the logfile
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_LOGFILE (char **logfn);
+GNUNET_GETOPT_option_logfile (char **logfn);
/**
* @param[out] str set to the string
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_STRING (char shortName,
+GNUNET_GETOPT_option_string (char shortName,
const char *name,
const char *argumentHelp,
const char *description,
* @param[out] str set to the string
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_FILENAME (char shortName,
+GNUNET_GETOPT_option_filename (char shortName,
const char *name,
const char *argumentHelp,
const char *description,
* @param val_size size of @a val in bytes
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_SET_BASE32_FIXED_SIZE (char shortName,
+GNUNET_GETOPT_option_base32_fixed_size (char shortName,
const char *name,
const char *argumentHelp,
const char *description,
* @param[out] val binary value decoded from Crockford Base32-encoded argument;
* size is determined by type (sizeof (*val)).
*/
-#define GNUNET_GETOPT_OPTION_SET_BASE32_AUTO(shortName,name,argumentHelp,description,val) \
- GNUNET_GETOPT_OPTION_SET_BASE32_FIXED_SIZE(shortName,name,argumentHelp,description,val,sizeof(*val))
+#define GNUNET_GETOPT_option_base32_auto(shortName,name,argumentHelp,description,val) \
+ GNUNET_GETOPT_option_base32_fixed_size(shortName,name,argumentHelp,description,val,sizeof(*val))
/**
* @param[out] val set to 1 if the option is present
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_SET_ONE (char shortName,
+GNUNET_GETOPT_option_flag (char shortName,
const char *name,
const char *description,
int *val);
* @param[out] val set to the value specified at the command line
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_SET_UINT (char shortName,
+GNUNET_GETOPT_option_uint (char shortName,
const char *name,
const char *argumentHelp,
const char *description,
* @param[out] val set to the value specified at the command line
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_SET_ULONG (char shortName,
+GNUNET_GETOPT_option_ulong (char shortName,
const char *name,
const char *argumentHelp,
const char *description,
* @param[out] val set to the time specified at the command line
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME (char shortName,
+GNUNET_GETOPT_option_relative_time (char shortName,
const char *name,
const char *argumentHelp,
const char *description,
* @param[out] val set to the time specified at the command line
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_SET_ABSOLUTE_TIME (char shortName,
+GNUNET_GETOPT_option_absolute_time (char shortName,
const char *name,
const char *argumentHelp,
const char *description,
* @param[out] val set to 1 if the option is present
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_INCREMENT_VALUE (char shortName,
+GNUNET_GETOPT_option_increment_uint (char shortName,
const char *name,
const char *description,
unsigned int *val);
* @param[out] level set to the log level
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_LOGLEVEL (char **level);
+GNUNET_GETOPT_option_loglevel (char **level);
/**
* @param[out] level set to the verbosity level
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_VERBOSE (unsigned int *level);
+GNUNET_GETOPT_option_verbose (unsigned int *level);
/**
* @param[out] logfn set to the name of the logfile
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_LOGFILE (char **logfn);
+GNUNET_GETOPT_option_logfile (char **logfn);
/**
* @param[out] fn set to the name of the configuration file
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_CFG_FILE (char **fn);
+GNUNET_GETOPT_option_cfgfile (char **fn);
/**
* @return @a opt with the mandatory flag set.
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_MANDATORY (struct GNUNET_GETOPT_CommandLineOption opt);
+GNUNET_GETOPT_option_mandatory (struct GNUNET_GETOPT_CommandLineOption opt);
/**
main (int argc, char *const *argv)
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_STRING ('n',
+ GNUNET_GETOPT_option_string ('n',
"name",
"NAME",
gettext_noop ("name of the record to add/delete/display"),
&name),
- GNUNET_GETOPT_OPTION_STRING ('z',
+ GNUNET_GETOPT_option_string ('z',
"zone",
"PKEY",
gettext_noop ("spezifies the public key of the zone to look in"),
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_SET_ONE ('a',
+ GNUNET_GETOPT_option_flag ('a',
"add",
gettext_noop ("add record"),
&add),
- GNUNET_GETOPT_OPTION_SET_ONE ('d',
+ GNUNET_GETOPT_option_flag ('d',
"delete",
gettext_noop ("delete record"),
&del),
- GNUNET_GETOPT_OPTION_SET_ONE ('D',
+ GNUNET_GETOPT_option_flag ('D',
"display",
gettext_noop ("display records"),
&list),
- GNUNET_GETOPT_OPTION_STRING ('e',
+ GNUNET_GETOPT_option_string ('e',
"expiration",
"TIME",
gettext_noop ("expiration time for record to use (for adding only), \"never\" is possible"),
&expirationstring),
- GNUNET_GETOPT_OPTION_STRING ('i',
+ GNUNET_GETOPT_option_string ('i',
"nick",
"NICKNAME",
gettext_noop ("set the desired nick name for the zone"),
&nickstring),
- GNUNET_GETOPT_OPTION_SET_ONE ('m',
+ GNUNET_GETOPT_option_flag ('m',
"monitor",
gettext_noop ("monitor changes in the namestore"),
&monitor),
- GNUNET_GETOPT_OPTION_STRING ('n',
+ GNUNET_GETOPT_option_string ('n',
"name",
"NAME",
gettext_noop ("name of the record to add/delete/display"),
&name),
- GNUNET_GETOPT_OPTION_STRING ('r',
+ GNUNET_GETOPT_option_string ('r',
"reverse",
"PKEY",
gettext_noop ("determine our name for the given PKEY"),
- GNUNET_GETOPT_OPTION_STRING ('t',
+ GNUNET_GETOPT_option_string ('t',
"type",
"TYPE",
gettext_noop ("type of the record to add/delete/display"),
&typestring),
- GNUNET_GETOPT_OPTION_STRING ('u',
+ GNUNET_GETOPT_option_string ('u',
"uri",
"URI",
gettext_noop ("URI to import into our zone"),
&uri),
- GNUNET_GETOPT_OPTION_STRING ('V',
+ GNUNET_GETOPT_option_string ('V',
"value",
"VALUE",
gettext_noop ("value of the record to add/delete"),
&value),
- GNUNET_GETOPT_OPTION_SET_ONE ('p',
+ GNUNET_GETOPT_option_flag ('p',
"public",
gettext_noop ("create or list public record"),
&is_public),
- GNUNET_GETOPT_OPTION_SET_ONE ('s',
+ GNUNET_GETOPT_option_flag ('s',
"shadow",
gettext_noop ("create shadow record (only valid if all other records of the same type have expired"),
&is_shadow),
- GNUNET_GETOPT_OPTION_STRING ('z',
+ GNUNET_GETOPT_option_string ('z',
"zone",
"EGO",
gettext_noop ("name of the ego controlling the zone"),
char *const argv[])
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_SET_ONE ('a',
+ GNUNET_GETOPT_option_flag ('a',
"auto",
gettext_noop ("run autoconfiguration"),
&do_auto),
- GNUNET_GETOPT_OPTION_STRING ('S',
+ GNUNET_GETOPT_option_string ('S',
"section",
"NAME",
gettext_noop ("section name providing the configuration for the adapter"),
§ion_name),
- GNUNET_GETOPT_OPTION_SET_ONE ('t',
+ GNUNET_GETOPT_option_flag ('t',
"tcp",
gettext_noop ("use TCP"),
&use_tcp),
- GNUNET_GETOPT_OPTION_SET_ONE ('u',
+ GNUNET_GETOPT_option_flag ('u',
"udp",
gettext_noop ("use UDP"),
&use_udp),
- GNUNET_GETOPT_OPTION_SET_ONE ('w',
+ GNUNET_GETOPT_option_flag ('w',
"write",
gettext_noop ("write configuration file (for autoconfiguration)"),
&write_cfg),
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_STRING ('i',
+ GNUNET_GETOPT_option_string ('i',
"in",
"ADDRESS",
gettext_noop ("which IP and port are we locally using to bind/listen to"),
&local_addr),
- GNUNET_GETOPT_OPTION_STRING ('r',
+ GNUNET_GETOPT_option_string ('r',
"remote",
"ADDRESS",
gettext_noop ("which remote IP and port should be asked for connection reversal"),
&remote_addr),
- GNUNET_GETOPT_OPTION_STRING ('S',
+ GNUNET_GETOPT_option_string ('S',
"section",
NULL,
gettext_noop ("name of configuration section to find additional options, such as manual host punching data"),
§ion_name),
- GNUNET_GETOPT_OPTION_SET_ONE ('s',
+ GNUNET_GETOPT_option_flag ('s',
"stun",
gettext_noop ("enable STUN processing"),
&do_stun),
- GNUNET_GETOPT_OPTION_SET_ONE ('t',
+ GNUNET_GETOPT_option_flag ('t',
"tcp",
gettext_noop ("use TCP"),
&use_tcp),
- GNUNET_GETOPT_OPTION_SET_ONE ('u',
+ GNUNET_GETOPT_option_flag ('u',
"udp",
gettext_noop ("use UDP"),
&use_udp),
- GNUNET_GETOPT_OPTION_SET_ONE ('W',
+ GNUNET_GETOPT_option_flag ('W',
"watch",
gettext_noop ("watch for connection reversal requests"),
&listen_reversal),
main (int argc, char *const *argv)
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_SET_UINT ('C',
+ GNUNET_GETOPT_option_uint ('C',
"connections",
"COUNT",
gettext_noop ("limit to the number of connections to NSE services, 0 for none"),
&connection_limit),
- GNUNET_GETOPT_OPTION_STRING ('d',
+ GNUNET_GETOPT_option_string ('d',
"details",
"FILENAME",
gettext_noop ("name of the file for writing connection information and statistics"),
&data_filename),
- GNUNET_GETOPT_OPTION_STRING ('H',
+ GNUNET_GETOPT_option_string ('H',
"hosts",
"FILENAME",
gettext_noop ("name of the file with the login information for the testbed"),
&hosts_file),
- GNUNET_GETOPT_OPTION_STRING ('o',
+ GNUNET_GETOPT_option_string ('o',
"output",
"FILENAME",
gettext_noop ("name of the file for writing the main results"),
&output_filename),
- GNUNET_GETOPT_OPTION_STRING ('p',
+ GNUNET_GETOPT_option_string ('p',
"peers",
"NETWORKSIZESPEC",
gettext_noop ("Number of peers to run in each round, separated by commas"),
&num_peer_spec),
- GNUNET_GETOPT_OPTION_INCREMENT_VALUE ('V',
+ GNUNET_GETOPT_option_increment_uint ('V',
"verbose",
gettext_noop ("be verbose (print progress information)"),
&verbose),
- GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('w',
+ GNUNET_GETOPT_option_relative_time ('w',
"wait",
"DELAY",
gettext_noop ("delay between rounds"),
main (int argc, char *const *argv)
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_SET_ONE ('n',
+ GNUNET_GETOPT_option_flag ('n',
"numeric",
gettext_noop ("don't resolve host names"),
&no_resolve),
- GNUNET_GETOPT_OPTION_SET_ONE ('q',
+ GNUNET_GETOPT_option_flag ('q',
"quiet",
gettext_noop ("output only the identity strings"),
&be_quiet),
- GNUNET_GETOPT_OPTION_SET_ONE ('f',
+ GNUNET_GETOPT_option_flag ('f',
"friends",
gettext_noop ("include friend-only information"),
&include_friend_only),
- GNUNET_GETOPT_OPTION_SET_ONE ('s',
+ GNUNET_GETOPT_option_flag ('s',
"self",
gettext_noop ("output our own identity only"),
&get_self),
- GNUNET_GETOPT_OPTION_SET_ONE ('i',
+ GNUNET_GETOPT_option_flag ('i',
"info",
gettext_noop ("list all known peers"),
&get_info),
- GNUNET_GETOPT_OPTION_STRING ('d',
+ GNUNET_GETOPT_option_string ('d',
"dump-hello",
NULL,
gettext_noop ("dump hello to file"),
&dump_hello),
- GNUNET_GETOPT_OPTION_SET_ONE ('g',
+ GNUNET_GETOPT_option_flag ('g',
"get-hello",
gettext_noop ("also output HELLO uri(s)"),
&get_uri),
- GNUNET_GETOPT_OPTION_STRING ('p',
+ GNUNET_GETOPT_option_string ('p',
"put-hello",
"HELLO",
gettext_noop ("add given HELLO uri to the database"),
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_FILENAME ('o',
+ GNUNET_GETOPT_option_filename ('o',
"output-file",
"FILENAME",
gettext_noop ("name of the file for writing statistics"),
&data_filename),
- GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('t',
+ GNUNET_GETOPT_option_relative_time ('t',
"matching-timeout",
"TIMEOUT",
gettext_noop ("wait TIMEOUT before ending the experiment"),
&search_timeout_time),
- GNUNET_GETOPT_OPTION_FILENAME ('p',
+ GNUNET_GETOPT_option_filename ('p',
"policy-dir",
"DIRECTORY",
gettext_noop ("directory with policy files"),
&policy_dir),
- GNUNET_GETOPT_OPTION_FILENAME ('s',
+ GNUNET_GETOPT_option_filename ('s',
"strings-file",
"FILENAME",
gettext_noop ("name of file with input strings"),
&strings_file),
- GNUNET_GETOPT_OPTION_FILENAME ('H',
+ GNUNET_GETOPT_option_filename ('H',
"hosts-file",
"FILENAME",
gettext_noop ("name of file with hosts' names"),
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_STRING ('t',
+ GNUNET_GETOPT_option_string ('t',
"table",
"TABLENAME",
gettext_noop ("name of the table to write DFAs"),
&table_name),
- GNUNET_GETOPT_OPTION_SET_UINT ('p',
+ GNUNET_GETOPT_option_uint ('p',
"max-path-compression",
"MAX_PATH_COMPRESSION",
gettext_noop ("maximum path compression length"),
main (int argc, char *const *argv)
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_SET_ULONG ('p',
+ GNUNET_GETOPT_option_ulong ('p',
"port",
"PORT",
gettext_noop ("listen on specified port (default: 7776)"),
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_STRING ('f',
+ GNUNET_GETOPT_option_string ('f',
"filename",
"NAME",
gettext_noop ("use NAME for the name of the revocation file"),
&filename),
- GNUNET_GETOPT_OPTION_STRING ('R',
+ GNUNET_GETOPT_option_string ('R',
"revoke",
"NAME",
gettext_noop ("revoke the private key associated for the the private key associated with the ego NAME "),
&revoke_ego),
- GNUNET_GETOPT_OPTION_SET_ONE ('p',
+ GNUNET_GETOPT_option_flag ('p',
"perform",
gettext_noop ("actually perform revocation, otherwise we just do the precomputation"),
&perform),
- GNUNET_GETOPT_OPTION_STRING ('t',
+ GNUNET_GETOPT_option_string ('t',
"test",
"KEY",
gettext_noop ("test if the public key KEY has been revoked"),
const char helpstr[] =
"Get random GNUnet peers. If none is specified a single is requested.";
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_SET_BASE32_AUTO ('s',
+ GNUNET_GETOPT_option_base32_auto ('s',
"seed",
"PEER_ID",
gettext_noop ("Seed a PeerID"),
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_STRING ('e',
+ GNUNET_GETOPT_option_string ('e',
"elements",
"\"key1,val1;key2,val2;...,keyn,valn;\"",
gettext_noop ("A comma separated list of elements to compare as vector with our remote peer."),
&input_elements),
- GNUNET_GETOPT_OPTION_STRING ('e',
+ GNUNET_GETOPT_option_string ('e',
"elements",
"\"key1,val1;key2,val2;...,keyn,valn;\"",
gettext_noop ("A comma separated list of elements to compare as vector with our remote peer."),
&input_elements),
- GNUNET_GETOPT_OPTION_STRING ('p',
+ GNUNET_GETOPT_option_string ('p',
"peer",
"PEERID",
gettext_noop ("[Optional] peer to calculate our scalarproduct with. If this parameter is not given, the service will wait for a remote peer to compute the request."),
&input_peer_id),
- GNUNET_GETOPT_OPTION_STRING ('k',
+ GNUNET_GETOPT_option_string ('k',
"key",
"TRANSACTION_ID",
gettext_noop ("Transaction ID shared with peer."),
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_SET_UINT ('n',
+ GNUNET_GETOPT_option_uint ('n',
"num-peers",
NULL,
gettext_noop ("number of peers in consensus"),
&num_peers),
- GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('D',
+ GNUNET_GETOPT_option_relative_time ('D',
"delay",
NULL,
gettext_noop ("dkg start delay"),
&delay),
- GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('t',
+ GNUNET_GETOPT_option_relative_time ('t',
"timeout",
NULL,
gettext_noop ("dkg timeout"),
&timeout),
- GNUNET_GETOPT_OPTION_SET_UINT ('k',
+ GNUNET_GETOPT_option_uint ('k',
"threshold",
NULL,
gettext_noop ("threshold"),
&threshold),
- GNUNET_GETOPT_OPTION_SET_ONE ('d',
+ GNUNET_GETOPT_option_flag ('d',
"descrypt",
gettext_noop ("also profile decryption"),
&decrypt),
- GNUNET_GETOPT_OPTION_VERBOSE (&verbose),
+ GNUNET_GETOPT_option_verbose (&verbose),
GNUNET_GETOPT_OPTION_END
};
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_SET_UINT ('A',
+ GNUNET_GETOPT_option_uint ('A',
"asize",
NULL,
gettext_noop ("number of element in set A-B"),
&asize),
- GNUNET_GETOPT_OPTION_SET_UINT ('B',
+ GNUNET_GETOPT_option_uint ('B',
"bsize",
NULL,
gettext_noop ("number of element in set B-A"),
&bsize),
- GNUNET_GETOPT_OPTION_SET_UINT ('C',
+ GNUNET_GETOPT_option_uint ('C',
"csize",
NULL,
gettext_noop ("number of common elements in A and B"),
&csize),
- GNUNET_GETOPT_OPTION_SET_UINT ('k',
+ GNUNET_GETOPT_option_uint ('k',
"hash-num",
NULL,
gettext_noop ("hash num"),
&hash_num),
- GNUNET_GETOPT_OPTION_SET_UINT ('s',
+ GNUNET_GETOPT_option_uint ('s',
"ibf-size",
NULL,
gettext_noop ("ibf size"),
main (int argc, char **argv)
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_SET_UINT ('A',
+ GNUNET_GETOPT_option_uint ('A',
"num-first",
NULL,
gettext_noop ("number of values"),
&num_a),
- GNUNET_GETOPT_OPTION_SET_UINT ('B',
+ GNUNET_GETOPT_option_uint ('B',
"num-second",
NULL,
gettext_noop ("number of values"),
&num_b),
- GNUNET_GETOPT_OPTION_SET_ONE ('b',
+ GNUNET_GETOPT_option_flag ('b',
"byzantine",
gettext_noop ("use byzantine mode"),
&byzantine),
- GNUNET_GETOPT_OPTION_SET_UINT ('f',
+ GNUNET_GETOPT_option_uint ('f',
"force-full",
NULL,
gettext_noop ("force sending full set"),
&force_full),
- GNUNET_GETOPT_OPTION_SET_UINT ('d',
+ GNUNET_GETOPT_option_uint ('d',
"force-delta",
NULL,
gettext_noop ("number delta operation"),
&force_delta),
- GNUNET_GETOPT_OPTION_SET_UINT ('C',
+ GNUNET_GETOPT_option_uint ('C',
"num-common",
NULL,
gettext_noop ("number of values"),
&num_c),
- GNUNET_GETOPT_OPTION_STRING ('x',
+ GNUNET_GETOPT_option_string ('x',
"operation",
NULL,
gettext_noop ("operation to execute"),
&op_str),
- GNUNET_GETOPT_OPTION_SET_UINT ('w',
+ GNUNET_GETOPT_option_uint ('w',
"element-size",
NULL,
gettext_noop ("element size"),
&element_size),
- GNUNET_GETOPT_OPTION_FILENAME ('s',
+ GNUNET_GETOPT_option_filename ('s',
"statistics",
"FILENAME",
gettext_noop ("write statistics to file"),
/* operations */
- GNUNET_GETOPT_OPTION_SET_ONE ('A',
+ GNUNET_GETOPT_option_flag ('A',
"host-assign",
gettext_noop ("assign --name in state to --data"),
&op_host_assign),
- GNUNET_GETOPT_OPTION_SET_ONE ('B',
+ GNUNET_GETOPT_option_flag ('B',
"guest-leave",
gettext_noop ("say good-bye and leave somebody else's place"),
&op_guest_leave),
- GNUNET_GETOPT_OPTION_SET_ONE ('C',
+ GNUNET_GETOPT_option_flag ('C',
"host-enter",
gettext_noop ("create a place"),
&op_host_enter),
- GNUNET_GETOPT_OPTION_SET_ONE ('C',
+ GNUNET_GETOPT_option_flag ('C',
"host-enter",
gettext_noop ("create a place"),
&op_host_enter),
- GNUNET_GETOPT_OPTION_SET_ONE ('D',
+ GNUNET_GETOPT_option_flag ('D',
"host-leave",
gettext_noop ("destroy a place we were hosting"),
&op_host_leave),
- GNUNET_GETOPT_OPTION_SET_ONE ('E',
+ GNUNET_GETOPT_option_flag ('E',
"guest-enter",
gettext_noop ("enter somebody else's place"),
&op_guest_enter),
- GNUNET_GETOPT_OPTION_SET_ONE ('F',
+ GNUNET_GETOPT_option_flag ('F',
"look-for",
gettext_noop ("find state matching name prefix"),
&op_look_for),
- GNUNET_GETOPT_OPTION_SET_ONE ('H',
+ GNUNET_GETOPT_option_flag ('H',
"replay-latest",
gettext_noop ("replay history of messages up to the given --limit"),
&op_replay_latest),
- GNUNET_GETOPT_OPTION_SET_ONE ('N',
+ GNUNET_GETOPT_option_flag ('N',
"host-reconnect",
gettext_noop ("reconnect to a previously created place"),
&op_host_reconnect),
- GNUNET_GETOPT_OPTION_SET_ONE ('P',
+ GNUNET_GETOPT_option_flag ('P',
"host-announce",
gettext_noop ("publish something to a place we are hosting"),
&op_host_announce),
- GNUNET_GETOPT_OPTION_SET_ONE ('R',
+ GNUNET_GETOPT_option_flag ('R',
"guest-reconnect",
gettext_noop ("reconnect to a previously entered place"),
&op_guest_reconnect),
- GNUNET_GETOPT_OPTION_SET_ONE ('S',
+ GNUNET_GETOPT_option_flag ('S',
"look-at",
gettext_noop ("search for state matching exact name"),
&op_look_at),
- GNUNET_GETOPT_OPTION_SET_ONE ('T',
+ GNUNET_GETOPT_option_flag ('T',
"guest-talk",
gettext_noop ("submit something to somebody's place"),
&op_guest_talk),
- GNUNET_GETOPT_OPTION_SET_ONE ('U',
+ GNUNET_GETOPT_option_flag ('U',
"status",
gettext_noop ("list of egos and subscribed places"),
&op_status),
- GNUNET_GETOPT_OPTION_SET_ONE ('X',
+ GNUNET_GETOPT_option_flag ('X',
"replay",
gettext_noop ("extract and replay history between message IDs --start and --until"),
&op_replay),
/* options */
- GNUNET_GETOPT_OPTION_STRING ('a',
+ GNUNET_GETOPT_option_string ('a',
"app",
"APPLICATION_ID",
gettext_noop ("application ID to use when connecting"),
&opt_app),
- GNUNET_GETOPT_OPTION_STRING ('d',
+ GNUNET_GETOPT_option_string ('d',
"data",
"DATA",
gettext_noop ("message body or state value"),
&opt_data),
- GNUNET_GETOPT_OPTION_STRING ('e',
+ GNUNET_GETOPT_option_string ('e',
"ego",
"NAME|PUBKEY",
gettext_noop ("name or public key of ego"),
&opt_ego),
- GNUNET_GETOPT_OPTION_SET_ONE ('f',
+ GNUNET_GETOPT_option_flag ('f',
"follow",
gettext_noop ("wait for incoming messages"),
&opt_follow),
- GNUNET_GETOPT_OPTION_STRING ('g',
+ GNUNET_GETOPT_option_string ('g',
"gns",
"GNS_NAME",
gettext_noop ("GNS name"),
&opt_gns),
- GNUNET_GETOPT_OPTION_STRING ('i',
+ GNUNET_GETOPT_option_string ('i',
"peer",
"PEER_ID",
gettext_noop ("peer ID for --guest-enter"),
&opt_peer),
- GNUNET_GETOPT_OPTION_STRING ('k',
+ GNUNET_GETOPT_option_string ('k',
"name",
"VAR_NAME",
gettext_noop ("name (key) to query from state"),
&opt_name),
- GNUNET_GETOPT_OPTION_STRING ('m',
+ GNUNET_GETOPT_option_string ('m',
"method",
"METHOD_NAME",
gettext_noop ("method name"),
&opt_method),
- GNUNET_GETOPT_OPTION_SET_ULONG ('n',
+ GNUNET_GETOPT_option_ulong ('n',
"limit",
NULL,
gettext_noop ("number of messages to replay from history"),
&opt_limit),
- GNUNET_GETOPT_OPTION_STRING ('p',
+ GNUNET_GETOPT_option_string ('p',
"place",
"PUBKEY",
gettext_noop ("key address of place"),
&opt_place),
- GNUNET_GETOPT_OPTION_SET_ULONG ('s',
+ GNUNET_GETOPT_option_ulong ('s',
"start",
NULL,
gettext_noop ("start message ID for history replay"),
&opt_start),
- GNUNET_GETOPT_OPTION_SET_ONE ('w',
+ GNUNET_GETOPT_option_flag ('w',
"welcome",
gettext_noop ("respond to entry requests by admitting all guests"),
&opt_welcome),
- GNUNET_GETOPT_OPTION_SET_ULONG ('u',
+ GNUNET_GETOPT_option_ulong ('u',
"until",
NULL,
gettext_noop ("end message ID for history replay"),
&opt_until),
- GNUNET_GETOPT_OPTION_SET_ONE ('y',
+ GNUNET_GETOPT_option_flag ('y',
"deny",
gettext_noop ("respond to entry requests by refusing all guests"),
&opt_deny),
main (int argc, char *const *argv)
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_STRING ('n',
+ GNUNET_GETOPT_option_string ('n',
"name",
"NAME",
gettext_noop ("limit output to statistics for the given NAME"),
&name),
- GNUNET_GETOPT_OPTION_SET_ONE ('p',
+ GNUNET_GETOPT_option_flag ('p',
"persistent",
gettext_noop ("make the value being set persistent"),
&persistent),
- GNUNET_GETOPT_OPTION_STRING ('s',
+ GNUNET_GETOPT_option_string ('s',
"subsystem",
"SUBSYSTEM",
gettext_noop ("limit output to the given SUBSYSTEM"),
&subsystem),
- GNUNET_GETOPT_OPTION_SET_ONE ('q',
+ GNUNET_GETOPT_option_flag ('q',
"quiet",
gettext_noop ("just print the statistics value"),
&quiet),
- GNUNET_GETOPT_OPTION_SET_ONE ('w',
+ GNUNET_GETOPT_option_flag ('w',
"watch",
gettext_noop ("watch value continuously"),
&watch),
- GNUNET_GETOPT_OPTION_STRING ('r',
+ GNUNET_GETOPT_option_string ('r',
"remote",
"REMOTE",
gettext_noop ("connect to remote host"),
&remote_host),
- GNUNET_GETOPT_OPTION_SET_ULONG ('o',
+ GNUNET_GETOPT_option_ulong ('o',
"port",
"PORT",
gettext_noop ("port for remote host"),
{
struct GNUNET_GETOPT_CommandLineOption option[] = {
- GNUNET_GETOPT_OPTION_SET_UINT ('p',
+ GNUNET_GETOPT_option_uint ('p',
"num-peers",
"COUNT",
gettext_noop ("create COUNT number of peers"),
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_SET_UINT ('p',
+ GNUNET_GETOPT_option_uint ('p',
"num-peers",
"COUNT",
gettext_noop ("create COUNT number of peers"),
&num_peers),
- GNUNET_GETOPT_OPTION_SET_UINT ('e',
+ GNUNET_GETOPT_option_uint ('e',
"num-errors",
"COUNT",
gettext_noop ("tolerate COUNT number of continious timeout failures"),
&num_cont_fails),
- GNUNET_GETOPT_OPTION_SET_ONE ('n',
+ GNUNET_GETOPT_option_flag ('n',
"non-interactive",
gettext_noop ("run profiler in non-interactive mode where upon "
"testbed setup the profiler does not wait for a "
&noninteractive),
#if !ENABLE_SUPERMUC
- GNUNET_GETOPT_OPTION_STRING ('H',
+ GNUNET_GETOPT_option_string ('H',
"hosts",
"FILENAME",
gettext_noop ("name of the file with the login information for the testbed"),
main (int argc, char *const *argv)
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_SET_ONE ('C',
+ GNUNET_GETOPT_option_flag ('C',
"cfg",
gettext_noop ("create unique configuration files"),
&create_cfg),
- GNUNET_GETOPT_OPTION_STRING ('k',
+ GNUNET_GETOPT_option_string ('k',
"key",
"FILENAME",
gettext_noop ("extract hostkey file from pre-computed hostkey list"),
&create_hostkey),
- GNUNET_GETOPT_OPTION_SET_UINT ('n',
+ GNUNET_GETOPT_option_uint ('n',
"number",
"NUMBER",
gettext_noop ("number of unique configuration files to create, or number of the hostkey to extract"),
&create_no),
- GNUNET_GETOPT_OPTION_STRING ('t',
+ GNUNET_GETOPT_option_string ('t',
"template",
"FILENAME",
gettext_noop ("configuration template"),
&create_cfg_template),
- GNUNET_GETOPT_OPTION_STRING ('r',
+ GNUNET_GETOPT_option_string ('r',
"run",
"SERVICE",
gettext_noop ("run the given service, wait on stdin for 'r' (restart) or 'q' (quit)"),
int main (int argc, char *argv[])
{
struct GNUNET_GETOPT_CommandLineOption option[] = {
- GNUNET_GETOPT_OPTION_SET_UINT ('n',
+ GNUNET_GETOPT_option_uint ('n',
"num-keys",
"COUNT",
gettext_noop ("list COUNT number of keys"),
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_SET_ONE ('s',
+ GNUNET_GETOPT_option_flag ('s',
"send",
gettext_noop ("send data to peer"),
&benchmark_send),
- GNUNET_GETOPT_OPTION_SET_ONE ('r',
+ GNUNET_GETOPT_option_flag ('r',
"receive",
gettext_noop ("receive data from peer"),
&benchmark_receive),
- GNUNET_GETOPT_OPTION_SET_UINT ('i',
+ GNUNET_GETOPT_option_uint ('i',
"iterations",
NULL,
gettext_noop ("iterations"),
&benchmark_iterations),
- GNUNET_GETOPT_OPTION_SET_UINT ('n',
+ GNUNET_GETOPT_option_uint ('n',
"number",
NULL,
gettext_noop ("number of messages to send"),
&benchmark_count),
- GNUNET_GETOPT_OPTION_SET_UINT ('m',
+ GNUNET_GETOPT_option_uint ('m',
"messagesize",
NULL,
gettext_noop ("message size to use"),
&benchmark_size),
- GNUNET_GETOPT_OPTION_STRING ('p',
+ GNUNET_GETOPT_option_string ('p',
"peer",
"PEER",
gettext_noop ("peer identity"),
&cpid),
- GNUNET_GETOPT_OPTION_VERBOSE (&verbosity),
+ GNUNET_GETOPT_option_verbose (&verbosity),
GNUNET_GETOPT_OPTION_END
};
{
int res;
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_SET_ONE ('a',
+ GNUNET_GETOPT_option_flag ('a',
"all",
gettext_noop ("print information for all peers (instead of only connected peers)"),
&iterate_all),
- GNUNET_GETOPT_OPTION_SET_ONE ('b',
+ GNUNET_GETOPT_option_flag ('b',
"benchmark",
gettext_noop ("measure how fast we are receiving data from all peers (until CTRL-C)"),
&benchmark_receive),
- GNUNET_GETOPT_OPTION_SET_ONE ('D',
+ GNUNET_GETOPT_option_flag ('D',
"disconnect",
gettext_noop ("disconnect from a peer"),
&do_disconnect),
- GNUNET_GETOPT_OPTION_SET_ONE ('i',
+ GNUNET_GETOPT_option_flag ('i',
"information",
gettext_noop ("provide information about all current connections (once)"),
&iterate_connections),
- GNUNET_GETOPT_OPTION_SET_ONE ('m',
+ GNUNET_GETOPT_option_flag ('m',
"monitor",
gettext_noop ("provide information about all current connections (continuously)"),
&monitor_connections),
- GNUNET_GETOPT_OPTION_SET_ONE ('e',
+ GNUNET_GETOPT_option_flag ('e',
"events",
gettext_noop ("provide information about all connects and disconnect events (continuously)"),
&monitor_connects),
- GNUNET_GETOPT_OPTION_SET_ONE ('n',
+ GNUNET_GETOPT_option_flag ('n',
"numeric",
gettext_noop ("do not resolve hostnames"),
&numeric),
- GNUNET_GETOPT_OPTION_SET_BASE32_AUTO ('p',
+ GNUNET_GETOPT_option_base32_auto ('p',
"peer",
"PEER",
gettext_noop ("peer identity"),
&pid),
- GNUNET_GETOPT_OPTION_SET_ONE ('P',
+ GNUNET_GETOPT_option_flag ('P',
"plugins",
gettext_noop ("monitor plugin sessions"),
&monitor_plugins),
- GNUNET_GETOPT_OPTION_SET_ONE ('s',
+ GNUNET_GETOPT_option_flag ('s',
"send",
gettext_noop
("send data for benchmarking to the other peer (until CTRL-C)"),
&benchmark_send),
- GNUNET_GETOPT_OPTION_VERBOSE (&verbosity),
+ GNUNET_GETOPT_option_verbose (&verbosity),
GNUNET_GETOPT_OPTION_END
};
const char *xdg;
struct GNUNET_GETOPT_CommandLineOption service_options[] = {
- GNUNET_GETOPT_OPTION_CFG_FILE (&opt_cfg_fn),
- GNUNET_GETOPT_OPTION_SET_ONE ('d',
+ GNUNET_GETOPT_option_cfgfile (&opt_cfg_fn),
+ GNUNET_GETOPT_option_flag ('d',
"daemonize",
gettext_noop ("do daemonize (detach from terminal)"),
&do_daemonize),
- GNUNET_GETOPT_OPTION_HELP (NULL),
- GNUNET_GETOPT_OPTION_LOGLEVEL (&loglev),
- GNUNET_GETOPT_OPTION_LOGFILE (&logfile),
- GNUNET_GETOPT_OPTION_VERSION (PACKAGE_VERSION " " VCS_VERSION),
+ GNUNET_GETOPT_option_help (NULL),
+ GNUNET_GETOPT_option_loglevel (&loglev),
+ GNUNET_GETOPT_option_logfile (&logfile),
+ GNUNET_GETOPT_option_version (PACKAGE_VERSION " " VCS_VERSION),
GNUNET_GETOPT_OPTION_END
};
err = 1;
* @param version string with the version number
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_VERSION (const char *version)
+GNUNET_GETOPT_option_version (const char *version)
{
struct GNUNET_GETOPT_CommandLineOption clo = {
.shortName = 'v',
* @param about string with brief description of the application
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_HELP (const char *about)
+GNUNET_GETOPT_option_help (const char *about)
{
struct GNUNET_GETOPT_CommandLineOption clo = {
.shortName = 'h',
* @param[out] val increment by 1 each time the option is present
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_INCREMENT_VALUE (char shortName,
+GNUNET_GETOPT_option_increment_uint (char shortName,
const char *name,
const char *description,
unsigned int *val)
* @param[out] level set to the verbosity level
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_VERBOSE (unsigned int *level)
+GNUNET_GETOPT_option_verbose (unsigned int *level)
{
struct GNUNET_GETOPT_CommandLineOption clo = {
.shortName = 'V',
* @param[out] val set to 1 if the option is present
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_SET_ONE (char shortName,
+GNUNET_GETOPT_option_flag (char shortName,
const char *name,
const char *description,
int *val)
* @param[out] str set to the string
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_STRING (char shortName,
+GNUNET_GETOPT_option_string (char shortName,
const char *name,
const char *argumentHelp,
const char *description,
* @param[out] level set to the log level
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_LOGLEVEL (char **level)
+GNUNET_GETOPT_option_loglevel (char **level)
{
struct GNUNET_GETOPT_CommandLineOption clo = {
.shortName = 'L',
* @param[out] str set to the string
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_FILENAME (char shortName,
+GNUNET_GETOPT_option_filename (char shortName,
const char *name,
const char *argumentHelp,
const char *description,
* @param[out] logfn set to the name of the logfile
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_LOGFILE (char **logfn)
+GNUNET_GETOPT_option_logfile (char **logfn)
{
struct GNUNET_GETOPT_CommandLineOption clo = {
.shortName = 'l',
* @param[out] fn set to the name of the configuration file
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_CFG_FILE (char **fn)
+GNUNET_GETOPT_option_cfgfile (char **fn)
{
struct GNUNET_GETOPT_CommandLineOption clo = {
.shortName = 'c',
* @param[out] val set to the value specified at the command line
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_SET_ULONG (char shortName,
+GNUNET_GETOPT_option_ulong (char shortName,
const char *name,
const char *argumentHelp,
const char *description,
* @param[out] val set to the time specified at the command line
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME (char shortName,
+GNUNET_GETOPT_option_relative_time (char shortName,
const char *name,
const char *argumentHelp,
const char *description,
* @param[out] val set to the time specified at the command line
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_SET_ABSOLUTE_TIME (char shortName,
+GNUNET_GETOPT_option_absolute_time (char shortName,
const char *name,
const char *argumentHelp,
const char *description,
* @param[out] val set to the value specified at the command line
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_SET_UINT (char shortName,
+GNUNET_GETOPT_option_uint (char shortName,
const char *name,
const char *argumentHelp,
const char *description,
/**
* Helper function to clean up after
- * #GNUNET_GETOPT_OPTION_SET_BASE32_FIXED_SIZE.
+ * #GNUNET_GETOPT_option_base32_fixed_size.
*
* @param cls value to GNUNET_free()
*/
* @param val_size size of @a val in bytes
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_SET_BASE32_FIXED_SIZE (char shortName,
+GNUNET_GETOPT_option_base32_fixed_size (char shortName,
const char *name,
const char *argumentHelp,
const char *description,
* @return @a opt with the mandatory flag set.
*/
struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_MANDATORY (struct GNUNET_GETOPT_CommandLineOption opt)
+GNUNET_GETOPT_option_mandatory (struct GNUNET_GETOPT_CommandLineOption opt)
{
opt.option_mandatory = 1;
return opt;
main (int argc, char *const *argv)
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_SET_ONE ('f',
+ GNUNET_GETOPT_option_flag ('f',
"filename",
gettext_noop ("obtain option of value as a filename (with $-expansion)"),
&is_filename),
- GNUNET_GETOPT_OPTION_STRING ('s',
+ GNUNET_GETOPT_option_string ('s',
"section",
"SECTION",
gettext_noop ("name of the section to access"),
§ion),
- GNUNET_GETOPT_OPTION_STRING ('o',
+ GNUNET_GETOPT_option_string ('o',
"option",
"OPTION",
gettext_noop ("name of the option to access"),
&option),
- GNUNET_GETOPT_OPTION_STRING ('V',
+ GNUNET_GETOPT_option_string ('V',
"value",
"VALUE",
gettext_noop ("value to set"),
&value),
- GNUNET_GETOPT_OPTION_SET_ONE ('S',
+ GNUNET_GETOPT_option_flag ('S',
"list-sections",
gettext_noop ("print available configuration sections"),
&list_sections),
- GNUNET_GETOPT_OPTION_SET_ONE ('w',
+ GNUNET_GETOPT_option_flag ('w',
"rewrite",
gettext_noop ("write configuration file that only contains delta to defaults"),
&rewrite),
{
list_keys_count = UINT32_MAX;
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_SET_ONE ('i',
+ GNUNET_GETOPT_option_flag ('i',
"iterate",
gettext_noop ("list keys included in a file (for testing)"),
&list_keys),
- GNUNET_GETOPT_OPTION_SET_UINT ('e',
+ GNUNET_GETOPT_option_uint ('e',
"end=",
"COUNT",
gettext_noop ("number of keys to list included in a file (for testing)"),
&list_keys_count),
- GNUNET_GETOPT_OPTION_SET_UINT ('g',
+ GNUNET_GETOPT_option_uint ('g',
"generate-keys",
"COUNT",
gettext_noop ("create COUNT public-private key pairs (for testing)"),
&make_keys),
- GNUNET_GETOPT_OPTION_SET_ONE ('p',
+ GNUNET_GETOPT_option_flag ('p',
"print-public-key",
gettext_noop ("print the public key in ASCII format"),
&print_public_key),
- GNUNET_GETOPT_OPTION_SET_ONE ('E',
+ GNUNET_GETOPT_option_flag ('E',
"examples",
gettext_noop ("print examples of ECC operations (used for compatibility testing)"),
&print_examples_flag),
main (int argc, char *const *argv)
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_SET_ONE ('r',
+ GNUNET_GETOPT_option_flag ('r',
"reverse",
gettext_noop ("perform a reverse lookup"),
&reverse),
char *const *argv)
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_SET_ULONG ('b',
+ GNUNET_GETOPT_option_ulong ('b',
"bits",
"BITS",
gettext_noop ("number of bits to require for the proof of work"),
&nse_work_required),
- GNUNET_GETOPT_OPTION_FILENAME ('k',
+ GNUNET_GETOPT_option_filename ('k',
"keyfile",
"FILE",
gettext_noop ("file with private key, otherwise default is used"),
&pkfn),
- GNUNET_GETOPT_OPTION_FILENAME ('o',
+ GNUNET_GETOPT_option_filename ('o',
"outfile",
"FILE",
gettext_noop ("file with proof of work, otherwise default is used"),
&pwfn),
- GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('t',
+ GNUNET_GETOPT_option_relative_time ('t',
"timeout",
"TIME",
gettext_noop ("time to wait between calculations"),
struct GNUNET_CONFIGURATION_Handle *cfg;
struct GNUNET_GETOPT_CommandLineOption defoptions[] = {
- GNUNET_GETOPT_OPTION_CFG_FILE (&cc.cfgfile),
- GNUNET_GETOPT_OPTION_HELP (binaryHelp),
- GNUNET_GETOPT_OPTION_LOGLEVEL (&loglev),
- GNUNET_GETOPT_OPTION_LOGFILE (&logfile),
- GNUNET_GETOPT_OPTION_VERSION (PACKAGE_VERSION " " VCS_VERSION)
+ GNUNET_GETOPT_option_cfgfile (&cc.cfgfile),
+ GNUNET_GETOPT_option_help (binaryHelp),
+ GNUNET_GETOPT_option_loglevel (&loglev),
+ GNUNET_GETOPT_option_logfile (&logfile),
+ GNUNET_GETOPT_option_version (PACKAGE_VERSION " " VCS_VERSION)
};
struct GNUNET_GETOPT_CommandLineOption *allopts;
const char *gargs;
int err;
struct GNUNET_GETOPT_CommandLineOption service_options[] = {
- GNUNET_GETOPT_OPTION_CFG_FILE (&opt_cfg_filename),
- GNUNET_GETOPT_OPTION_SET_ONE ('d',
+ GNUNET_GETOPT_option_cfgfile (&opt_cfg_filename),
+ GNUNET_GETOPT_option_flag ('d',
"daemonize",
gettext_noop ("do daemonize (detach from terminal)"),
&do_daemonize),
- GNUNET_GETOPT_OPTION_HELP (NULL),
- GNUNET_GETOPT_OPTION_LOGLEVEL (&loglev),
- GNUNET_GETOPT_OPTION_LOGFILE (&logfile),
- GNUNET_GETOPT_OPTION_VERSION (PACKAGE_VERSION " " VCS_VERSION),
+ GNUNET_GETOPT_option_help (NULL),
+ GNUNET_GETOPT_option_loglevel (&loglev),
+ GNUNET_GETOPT_option_logfile (&logfile),
+ GNUNET_GETOPT_option_version (PACKAGE_VERSION " " VCS_VERSION),
GNUNET_GETOPT_OPTION_END
};
unsigned int vflags = 0;
const struct GNUNET_GETOPT_CommandLineOption verboseoptionlist[] = {
- GNUNET_GETOPT_OPTION_VERBOSE (&vflags),
+ GNUNET_GETOPT_option_verbose (&vflags),
GNUNET_GETOPT_OPTION_END
};
NULL
};
const struct GNUNET_GETOPT_CommandLineOption versionoptionlist[] = {
- GNUNET_GETOPT_OPTION_VERSION (PACKAGE_VERSION " " VCS_VERSION),
+ GNUNET_GETOPT_option_version (PACKAGE_VERSION " " VCS_VERSION),
GNUNET_GETOPT_OPTION_END
};
NULL
};
const struct GNUNET_GETOPT_CommandLineOption aboutoptionlist[] = {
- GNUNET_GETOPT_OPTION_HELP ("Testing"),
+ GNUNET_GETOPT_option_help ("Testing"),
GNUNET_GETOPT_OPTION_END
};
char *fn = NULL;
const struct GNUNET_GETOPT_CommandLineOption logoptionlist[] = {
- GNUNET_GETOPT_OPTION_LOGFILE (&fn),
- GNUNET_GETOPT_OPTION_LOGLEVEL (&level),
+ GNUNET_GETOPT_option_logfile (&fn),
+ GNUNET_GETOPT_option_loglevel (&level),
GNUNET_GETOPT_OPTION_END
};
unsigned long long lnum = 0;
const struct GNUNET_GETOPT_CommandLineOption logoptionlist[] = {
- GNUNET_GETOPT_OPTION_SET_ONE ('f',
+ GNUNET_GETOPT_option_flag ('f',
"--flag",
"helptext",
&flag),
- GNUNET_GETOPT_OPTION_SET_UINT ('n',
+ GNUNET_GETOPT_option_uint ('n',
"--num",
"ARG",
"helptext",
&num),
- GNUNET_GETOPT_OPTION_SET_ULONG ('N',
+ GNUNET_GETOPT_option_ulong ('N',
"--lnum",
"ARG",
"helptext",
NULL
};
struct GNUNET_GETOPT_CommandLineOption options1[] = {
- GNUNET_GETOPT_OPTION_SET_ONE ('n',
+ GNUNET_GETOPT_option_flag ('n',
"name",
"description",
&setme1),
GNUNET_GETOPT_OPTION_END
};
struct GNUNET_GETOPT_CommandLineOption options2[] = {
- GNUNET_GETOPT_OPTION_SET_ONE ('n',
+ GNUNET_GETOPT_option_flag ('n',
"name",
"description",
&setme1),
- GNUNET_GETOPT_OPTION_SET_ONE ('N',
+ GNUNET_GETOPT_option_flag ('N',
"number",
"description",
&setme2),
GNUNET_GETOPT_OPTION_END
};
struct GNUNET_GETOPT_CommandLineOption options3[] = {
- GNUNET_GETOPT_OPTION_SET_ONE ('N',
+ GNUNET_GETOPT_option_flag ('N',
"number",
"description",
&setme1),
- GNUNET_GETOPT_OPTION_SET_ONE ('n',
+ GNUNET_GETOPT_option_flag ('n',
"name",
"description",
&setme2),
GNUNET_GETOPT_OPTION_END
};
struct GNUNET_GETOPT_CommandLineOption options4[] = {
- GNUNET_GETOPT_OPTION_SET_ONE ('n',
+ GNUNET_GETOPT_option_flag ('n',
"name",
"description",
&setme1),
- GNUNET_GETOPT_OPTION_SET_ONE ('n',
+ GNUNET_GETOPT_option_flag ('n',
"name",
"description",
&setme2),
main (int argc, char *const *argv)
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_SET_ONE ('4',
+ GNUNET_GETOPT_option_flag ('4',
"ipv4",
gettext_noop ("request that result should be an IPv4 address"),
&ipv4),
- GNUNET_GETOPT_OPTION_SET_ONE ('6',
+ GNUNET_GETOPT_option_flag ('6',
"ipv6",
gettext_noop ("request that result should be an IPv6 address"),
&ipv6),
- GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('d',
+ GNUNET_GETOPT_option_relative_time ('d',
"duration",
"TIME",
gettext_noop ("how long should the mapping be valid for new tunnels?"),
&duration),
- GNUNET_GETOPT_OPTION_STRING ('i',
+ GNUNET_GETOPT_option_string ('i',
"ip",
"IP",
gettext_noop ("destination IP for the tunnel"),
&target_ip),
- GNUNET_GETOPT_OPTION_STRING ('p',
+ GNUNET_GETOPT_option_string ('p',
"peer",
"PEERID",
gettext_noop ("peer offering the service we would like to access"),
&peer_id),
- GNUNET_GETOPT_OPTION_STRING ('s',
+ GNUNET_GETOPT_option_string ('s',
"service",
"NAME",
gettext_noop ("name of the service we would like to access"),
&service_name),
- GNUNET_GETOPT_OPTION_SET_ONE ('t',
+ GNUNET_GETOPT_option_flag ('t',
"tcp",
gettext_noop ("service is offered via TCP"),
&tcp),
- GNUNET_GETOPT_OPTION_SET_ONE ('u',
+ GNUNET_GETOPT_option_flag ('u',
"udp",
gettext_noop ("service is offered via UDP"),
&udp),
- GNUNET_GETOPT_OPTION_VERBOSE (&verbosity),
+ GNUNET_GETOPT_option_verbose (&verbosity),
GNUNET_GETOPT_OPTION_END
};