2021-11-30 13:01:36 +00:00
|
|
|
/** @file
|
|
|
|
*
|
2014-06-29 21:37:21 +00:00
|
|
|
* Handle command-line arguments common to various programs
|
2004-09-10 22:47:02 +00:00
|
|
|
*
|
2006-05-21 05:12:17 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
2004-09-10 22:47:02 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
2018-02-07 11:26:45 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
2004-09-10 22:47:02 +00:00
|
|
|
*/
|
|
|
|
|
2019-01-01 00:55:23 +00:00
|
|
|
#ifndef __UI_CLOPTS_COMMON_H__
|
|
|
|
#define __UI_CLOPTS_COMMON_H__
|
2004-09-10 22:47:02 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
2019-12-15 13:15:34 +00:00
|
|
|
/*
|
|
|
|
* Long options.
|
|
|
|
* For long options with no corresponding short options, we define values
|
|
|
|
* outside the range of ASCII graphic characters, make that the last
|
|
|
|
* component of the entry for the long option, and have a case for that
|
|
|
|
* option in the switch statement.
|
|
|
|
*/
|
|
|
|
// Base value for capture related long options
|
|
|
|
#define LONGOPT_BASE_CAPTURE 1000
|
|
|
|
// Base value for dissector related long options
|
|
|
|
#define LONGOPT_BASE_DISSECTOR 2000
|
|
|
|
// Base value for application specific long options
|
|
|
|
#define LONGOPT_BASE_APPLICATION 3000
|
|
|
|
// Base value for GUI specific long options
|
|
|
|
#define LONGOPT_BASE_GUI 4000
|
|
|
|
|
2019-01-01 00:55:23 +00:00
|
|
|
extern int
|
2014-06-29 21:37:21 +00:00
|
|
|
get_natural_int(const char *string, const char *name);
|
2005-02-27 21:15:30 +00:00
|
|
|
|
2019-01-01 00:55:23 +00:00
|
|
|
extern int
|
2014-06-29 21:37:21 +00:00
|
|
|
get_positive_int(const char *string, const char *name);
|
2011-04-11 00:01:08 +00:00
|
|
|
|
2019-01-01 00:55:23 +00:00
|
|
|
extern guint32
|
2016-09-08 18:26:45 +00:00
|
|
|
get_guint32(const char *string, const char *name);
|
|
|
|
|
2019-01-01 00:55:23 +00:00
|
|
|
extern guint32
|
2016-09-08 18:26:45 +00:00
|
|
|
get_nonzero_guint32(const char *string, const char *name);
|
|
|
|
|
2019-01-01 00:55:23 +00:00
|
|
|
extern double
|
2018-10-31 10:34:35 +00:00
|
|
|
get_positive_double(const char *string, const char *name);
|
|
|
|
|
2004-09-10 22:47:02 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
2019-01-01 00:55:23 +00:00
|
|
|
#endif /* __UI_CLOPTS_COMMON_H__ */
|