Wireshark
4.3.0
The Wireshark network protocol analyzer
|
Go to the source code of this file.
Macros | |
#define | FORMAT_LABEL_REPLACE_SPACE (0x1 << 0) |
Functions | |
const guchar * | find_line_end (const guchar *data, const guchar *dataend, const guchar **eol) |
WS_DLL_PUBLIC int | get_token_len (const guchar *linep, const guchar *lineend, const guchar **next_token) |
WS_DLL_PUBLIC gboolean | hex_str_to_bytes (const char *hex_str, GByteArray *bytes, gboolean force_separators) |
WS_DLL_PUBLIC gboolean | hex_str_to_bytes_encoding (const char *hex_str, GByteArray *bytes, const char **endptr, const guint encoding, const gboolean fail_if_partial) |
WS_DLL_PUBLIC gboolean | uri_to_bytes (const char *uri_str, GByteArray *bytes, size_t len) |
WS_DLL_PUBLIC gboolean | uri_str_to_bytes (const char *uri_str, GByteArray *bytes) |
WS_DLL_PUBLIC gboolean | rel_oid_str_to_bytes (const char *oid_str, GByteArray *bytes, gboolean is_absolute) |
WS_DLL_PUBLIC gboolean | oid_str_to_bytes (const char *oid_str, GByteArray *bytes) |
WS_DLL_PUBLIC GByteArray * | byte_array_dup (const GByteArray *ba) |
WS_DLL_PUBLIC gboolean | byte_array_equal (GByteArray *ba1, GByteArray *ba2) |
WS_DLL_PUBLIC gchar * | xml_escape (const gchar *unescaped) |
WS_DLL_PUBLIC guint8 * | convert_string_to_hex (const char *string, size_t *nbytes) |
WS_DLL_PUBLIC char * | convert_string_case (const char *string, gboolean case_insensitive) |
WS_DLL_PUBLIC void | IA5_7BIT_decode (unsigned char *dest, const unsigned char *src, int len) |
WS_DLL_PUBLIC size_t | ws_label_strcpy (char *label_str, size_t bufsize, gsize pos, const uint8_t *str, int flags) |
WS_DLL_PUBLIC size_t | ws_label_strcat (char *label_str, size_t bufsize, const uint8_t *str, int flags) |
WS_DLL_LOCAL guchar | module_check_valid_name (const char *name, gboolean lower_only) |
String handling and conversion utilities.
WS_DLL_PUBLIC GByteArray* byte_array_dup | ( | const GByteArray * | ba | ) |
Create a copy of a GByteArray
ba | The byte array to be copied. |
Create a copy of a GByteArray
ba | The byte array to be copied. |
WS_DLL_PUBLIC gboolean byte_array_equal | ( | GByteArray * | ba1, |
GByteArray * | ba2 | ||
) |
Compare the contents of two GByteArrays
ba1 | A byte array |
ba2 | A byte array |
Compare the contents of two GByteArrays
ba1 | A byte array |
ba2 | A byte array |
XXX - Should this be in strutil.c?
WS_DLL_PUBLIC char* convert_string_case | ( | const char * | string, |
gboolean | case_insensitive | ||
) |
Prep a string for case-sensitive vs case-insensitive searching.
string | The search string |
case_insensitive | TRUE if case-insensitive, FALSE if not |
WS_DLL_PUBLIC guint8* convert_string_to_hex | ( | const char * | string, |
size_t * | nbytes | ||
) |
Scan a string to make sure it's valid hex.
string | The string to validate |
nbytes | The length of the return buffer |
const guchar* find_line_end | ( | const guchar * | data, |
const guchar * | dataend, | ||
const guchar ** | eol | ||
) |
Given a pointer into a data buffer, and to the end of the buffer, find the end of the (putative) line at that position in the data buffer.
data | A pointer to the beginning of the data |
dataend | A pointer to the end of the data |
eol | A pointer that will receive the EOL location |
WS_DLL_PUBLIC int get_token_len | ( | const guchar * | linep, |
const guchar * | lineend, | ||
const guchar ** | next_token | ||
) |
Get the length of the next token in a line, and the beginning of the next token after that (if any).
linep | A pointer to the beginning of the line |
lineend | A pointer to the end of the line |
next_token | Receives the location of the next token |
WS_DLL_PUBLIC gboolean hex_str_to_bytes | ( | const char * | hex_str, |
GByteArray * | bytes, | ||
gboolean | force_separators | ||
) |
Turn a string of hex digits with optional separators (defined by is_byte_sep() into a byte array.
hex_str | The string of hex digits. |
bytes | The GByteArray that will receive the bytes. This must be initialized by the caller. |
force_separators | If set to TRUE, separators MUST exist between bytes. |
WS_DLL_PUBLIC gboolean oid_str_to_bytes | ( | const char * | oid_str, |
GByteArray * | bytes | ||
) |
Turn a OID string representation (dot notation) into a byte array.
oid_str | The OID string (dot notaion). |
bytes | The GByteArray that will receive the bytes. This must be initialized by the caller. |
WS_DLL_PUBLIC gboolean rel_oid_str_to_bytes | ( | const char * | oid_str, |
GByteArray * | bytes, | ||
gboolean | is_absolute | ||
) |
Turn a OID string representation (dot notation) into a byte array.
oid_str | The OID string (dot notaion). |
bytes | The GByteArray that will receive the bytes. This must be initialized by the caller. |
is_absolute | True if this is an absolute OID; false for relative OID. |
WS_DLL_PUBLIC gboolean uri_str_to_bytes | ( | const char * | uri_str, |
GByteArray * | bytes | ||
) |
Turn an RFC 3986 percent-encoded string into a byte array.
uri_str | The string of hex digits. |
bytes | The GByteArray that will receive the bytes. This must be initialized by the caller. |
WS_DLL_PUBLIC gboolean uri_to_bytes | ( | const char * | uri_str, |
GByteArray * | bytes, | ||
size_t | len | ||
) |
Turn an RFC 3986 percent-encoded array of characters, not necessarily null-terminated, into a byte array.
uri_str | The string of hex digits. |
bytes | The GByteArray that will receive the bytes. This must be initialized by the caller. |
WS_DLL_PUBLIC gchar* xml_escape | ( | const gchar * | unescaped | ) |
Return a XML escaped representation of the unescaped string. The returned string must be freed when no longer in use.
unescaped | The unescaped string |