|
Wireshark 4.7.0
The Wireshark network protocol analyzer
|
#include <wireshark.h>Go to the source code of this file.
Functions | |
| WS_DLL_PUBLIC bool | get_natural_int (const char *string, const char *name, int32_t *number) |
| Parses a string as a natural (non-negative) 32-bit integer. | |
| WS_DLL_PUBLIC bool | get_positive_int (const char *string, const char *name, int32_t *number) |
| Parses a string as a strictly positive 32-bit integer. | |
| WS_DLL_PUBLIC bool | get_natural_int64 (const char *string, const char *name, int64_t *number) |
| Parses a string as a natural (non-negative) 64-bit integer. | |
| WS_DLL_PUBLIC bool | get_positive_int64 (const char *string, const char *name, int64_t *number) |
| Parses a string as a strictly positive 64-bit integer. | |
| WS_DLL_PUBLIC bool | get_uint32 (const char *string, const char *name, uint32_t *number) |
| Parses a string as an unsigned 32-bit integer. | |
| WS_DLL_PUBLIC bool | get_nonzero_uint32 (const char *string, const char *name, uint32_t *number) |
| Parses a string as a non-zero unsigned 32-bit integer. | |
| WS_DLL_PUBLIC bool | get_uint64 (const char *string, const char *name, uint64_t *number) |
| Parses a string as an unsigned 64-bit integer. | |
| WS_DLL_PUBLIC bool | get_nonzero_uint64 (const char *string, const char *name, uint64_t *number) |
| Parses a string as a non-zero unsigned 64-bit integer. | |
| WS_DLL_PUBLIC bool | get_positive_double (const char *string, const char *name, double *number) |
| Parses a string as a strictly positive double-precision floating-point number. | |
Handle command-line arguments common to various programs
Wireshark - Network traffic analyzer By Gerald Combs geral.nosp@m.d@wi.nosp@m.resha.nosp@m.rk.o.nosp@m.rg Copyright 1998 Gerald Combs
SPDX-License-Identifier: GPL-2.0-or-later
| WS_DLL_PUBLIC bool get_natural_int | ( | const char * | string, |
| const char * | name, | ||
| int32_t * | number | ||
| ) |
Parses a string as a natural (non-negative) 32-bit integer.
Attempts to convert the input string to an int32_t value ≥ 0. If successful, stores the result in number and returns true.
| string | The input string to parse. |
| name | Contextual name used for error reporting. |
| number | Pointer to receive the parsed value. |
| WS_DLL_PUBLIC bool get_natural_int64 | ( | const char * | string, |
| const char * | name, | ||
| int64_t * | number | ||
| ) |
Parses a string as a natural (non-negative) 64-bit integer.
Attempts to convert the input string to an int64_t value ≥ 0. If successful, stores the result in number and returns true.
| string | The input string to parse. |
| name | Contextual name used for error reporting. |
| number | Pointer to receive the parsed value. |
| WS_DLL_PUBLIC bool get_nonzero_uint32 | ( | const char * | string, |
| const char * | name, | ||
| uint32_t * | number | ||
| ) |
Parses a string as a non-zero unsigned 32-bit integer.
Attempts to convert the input string to a uint32_t value. If successful and the value is not zero, stores the result in number and returns true. Returns false if the string is invalid or the parsed value is zero.
| string | The input string to parse. |
| name | Contextual name used for error reporting. |
| number | Pointer to receive the parsed value. |
| WS_DLL_PUBLIC bool get_nonzero_uint64 | ( | const char * | string, |
| const char * | name, | ||
| uint64_t * | number | ||
| ) |
Parses a string as a non-zero unsigned 64-bit integer.
Attempts to convert the input string to a uint64_t value. If successful and the value is not zero, stores the result in number and returns true.
| string | The input string to parse. |
| name | Contextual name used for error reporting. |
| number | Pointer to receive the parsed value. |
| WS_DLL_PUBLIC bool get_positive_double | ( | const char * | string, |
| const char * | name, | ||
| double * | number | ||
| ) |
Parses a string as a strictly positive double-precision floating-point number.
Attempts to convert the input string to a double value. If successful and the value is greater than zero, stores the result in number and returns true.
| string | The input string to parse. |
| name | Contextual name used for error reporting. |
| number | Pointer to receive the parsed value. |
| WS_DLL_PUBLIC bool get_positive_int | ( | const char * | string, |
| const char * | name, | ||
| int32_t * | number | ||
| ) |
Parses a string as a strictly positive 32-bit integer.
Attempts to convert the input string to an int32_t value > 0. If successful, stores the result in number and returns true.
| string | The input string to parse. |
| name | Contextual name used for error reporting. |
| number | Pointer to receive the parsed value. |
| WS_DLL_PUBLIC bool get_positive_int64 | ( | const char * | string, |
| const char * | name, | ||
| int64_t * | number | ||
| ) |
Parses a string as a strictly positive 64-bit integer.
Attempts to convert the input string to an int64_t value > 0. If successful, stores the result in number and returns true.
| string | The input string to parse. |
| name | Contextual name used for error reporting. |
| number | Pointer to receive the parsed value. |
| WS_DLL_PUBLIC bool get_uint32 | ( | const char * | string, |
| const char * | name, | ||
| uint32_t * | number | ||
| ) |
Parses a string as an unsigned 32-bit integer.
Attempts to convert the input string to a uint32_t value. If successful, stores the result in number and returns true.
| string | The input string to parse. |
| name | Contextual name used for error reporting. |
| number | Pointer to receive the parsed value. |
| WS_DLL_PUBLIC bool get_uint64 | ( | const char * | string, |
| const char * | name, | ||
| uint64_t * | number | ||
| ) |
Parses a string as an unsigned 64-bit integer.
Attempts to convert the input string to a uint64_t value. If successful, stores the result in number and returns true.
| string | The input string to parse. |
| name | Contextual name used for error reporting. |
| number | Pointer to receive the parsed value. |