This file is part of GNUnet.
Copyright (C) 2001-2013 GNUnet e.V.
- GNUnet is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published
- by the Free Software Foundation; either version 3, or (at your
- option) any later version.
+ GNUnet is free software: you can redistribute it and/or modify it
+ under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License,
+ or (at your option) any later version.
GNUnet is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
+ Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
- You should have received a copy of the GNU General Public License
- along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
+ SPDX-License-Identifier: AGPL3.0-or-later
*/
/**
*/
struct GNUNET_GETOPT_CommandLineOption
GNUNET_GETOPT_option_base32_fixed_size (char shortName,
- const char *name,
- const char *argumentHelp,
- const char *description,
- void *val,
- size_t val_size);
+ const char *name,
+ const char *argumentHelp,
+ const char *description,
+ void *val,
+ size_t val_size);
/**
*/
struct GNUNET_GETOPT_CommandLineOption
GNUNET_GETOPT_option_flag (char shortName,
- const char *name,
- const char *description,
- int *val);
+ const char *name,
+ const char *description,
+ int *val);
/**
*/
struct GNUNET_GETOPT_CommandLineOption
GNUNET_GETOPT_option_uint (char shortName,
- const char *name,
- const char *argumentHelp,
- const char *description,
- unsigned int *val);
+ const char *name,
+ const char *argumentHelp,
+ const char *description,
+ unsigned int *val);
+
+
+/**
+ * Allow user to specify an uint16_t.
+ *
+ * @param shortName short name of the option
+ * @param name long name of the option
+ * @param argumentHelp help text for the option argument
+ * @param description long help text for the option
+ * @param[out] val set to the value specified at the command line
+ */
+struct GNUNET_GETOPT_CommandLineOption
+GNUNET_GETOPT_option_uint16 (char shortName,
+ const char *name,
+ const char *argumentHelp,
+ const char *description,
+ uint16_t *val);
/**
*/
struct GNUNET_GETOPT_CommandLineOption
GNUNET_GETOPT_option_ulong (char shortName,
- const char *name,
- const char *argumentHelp,
- const char *description,
- unsigned long long *val);
+ const char *name,
+ const char *argumentHelp,
+ const char *description,
+ unsigned long long *val);
/**
*/
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);
+ const char *name,
+ const char *argumentHelp,
+ const char *description,
+ struct GNUNET_TIME_Relative *val);
/**
*/
struct GNUNET_GETOPT_CommandLineOption
GNUNET_GETOPT_option_absolute_time (char shortName,
- const char *name,
- const char *argumentHelp,
- const char *description,
- struct GNUNET_TIME_Absolute *val);
+ const char *name,
+ const char *argumentHelp,
+ const char *description,
+ struct GNUNET_TIME_Absolute *val);
/**
*/
struct GNUNET_GETOPT_CommandLineOption
GNUNET_GETOPT_option_increment_uint (char shortName,
- const char *name,
- const char *description,
- unsigned int *val);
+ const char *name,
+ const char *description,
+ unsigned int *val);
/**