|
Wireshark 4.7.0
The Wireshark network protocol analyzer
|
#include <epan/ftypes/ftypes.h>#include <epan/prefs.h>#include <epan/wmem_scopes.h>#include "ws_symbol_export.h"Go to the source code of this file.
Classes | |
| struct | _oid_bit_t |
| struct | _oid_bits_info_t |
| struct | _oid_value_type_t |
| struct | _oid_key_t |
| struct | _oid_info_t |
Macros | |
| #define | BER_TAG_ANY -1 |
| #define | subid_t uint32_t |
| #define | add_oid_debug_subtree(a, b) ((void)0) |
Typedefs | |
| typedef struct _oid_bits_info_t | oid_bits_info_t |
| typedef enum _oid_key_type_t | oid_key_type_t |
| typedef struct _oid_value_type_t | oid_value_type_t |
| typedef enum _oid_kind_t | oid_kind_t |
| typedef struct _oid_key_t | oid_key_t |
| typedef struct _oid_info_t | oid_info_t |
Functions | |
| WS_DLL_PUBLIC void | oids_init (const char *app_env_var_prefix) |
| Initialize OID resolution and register related preferences. | |
| void | oid_pref_init (module_t *nameres) |
| WS_DLL_PUBLIC void | oids_cleanup (void) |
| Clean up OID-related resources. | |
| WS_DLL_PUBLIC unsigned | oid_subid2encoded (wmem_allocator_t *scope, unsigned len, uint32_t *subids, uint8_t **encoded_p) |
| WS_DLL_PUBLIC unsigned | oid_string2encoded (wmem_allocator_t *scope, const char *oid_str, uint8_t **encoded_p) |
| WS_DLL_PUBLIC unsigned | oid_encoded2subid (wmem_allocator_t *scope, const uint8_t *oid, int len, uint32_t **subids_p) |
| WS_DLL_PUBLIC unsigned | oid_encoded2subid_sub (wmem_allocator_t *scope, const uint8_t *oid_bytes, int oid_len, uint32_t **subids_pi, bool is_first) |
| WS_DLL_PUBLIC unsigned | oid_string2subid (wmem_allocator_t *scope, const char *oid_str, uint32_t **subids_p) |
| WS_DLL_PUBLIC char * | oid_encoded2string (wmem_allocator_t *scope, const uint8_t *encoded, unsigned len) |
| WS_DLL_PUBLIC char * | rel_oid_encoded2string (wmem_allocator_t *scope, const uint8_t *encoded, unsigned len) |
| WS_DLL_PUBLIC char * | oid_subid2string (wmem_allocator_t *scope, uint32_t *subids, unsigned len) |
| Convert a sequence of OID sub-identifiers to a human-readable string. | |
| WS_DLL_PUBLIC char * | rel_oid_subid2string (wmem_allocator_t *scope, uint32_t *subids, unsigned len, bool is_absolute) |
| Convert a sequence of OID subidentifiers to a human-readable string. | |
| WS_DLL_PUBLIC char * | oid_resolved (wmem_allocator_t *scope, unsigned len, uint32_t *subids) |
| Resolve an OID to its human-readable name. | |
| WS_DLL_PUBLIC char * | oid_resolved_from_encoded (wmem_allocator_t *scope, const uint8_t *oid, int len) |
| WS_DLL_PUBLIC char * | rel_oid_resolved_from_encoded (wmem_allocator_t *scope, const uint8_t *oid, int len) |
| Resolve an OID from its encoded form. | |
| WS_DLL_PUBLIC char * | oid_resolved_from_string (wmem_allocator_t *scope, const char *oid_str) |
| Resolves an OID string to its resolved form. | |
| WS_DLL_PUBLIC void | oid_both (wmem_allocator_t *scope, unsigned oid_len, uint32_t *subids, char **resolved_p, char **numeric_p) |
| Resolve and convert an OID to both resolved and numeric representations. | |
| WS_DLL_PUBLIC void | oid_both_from_encoded (wmem_allocator_t *scope, const uint8_t *oid, int oid_len, char **resolved_p, char **numeric_p) |
| Resolve and convert an OID from its encoded form to both resolved and numeric representations. | |
| WS_DLL_PUBLIC void | oid_both_from_string (wmem_allocator_t *scope, const char *oid_str, char **resolved_p, char **numeric_p) |
| Resolve and convert an OID from its string representation to both resolved and numeric forms. | |
| WS_DLL_PUBLIC oid_info_t * | oid_get (unsigned oid_len, uint32_t *subids, unsigned *matched_p, unsigned *left_p) |
| WS_DLL_PUBLIC oid_info_t * | oid_get_from_encoded (wmem_allocator_t *scope, const uint8_t *oid, int oid_len, uint32_t **subids, unsigned *matched, unsigned *left) |
| Retrieves an OID information structure from its encoded form. | |
| WS_DLL_PUBLIC oid_info_t * | oid_get_from_string (wmem_allocator_t *scope, const char *oid_str, uint32_t **subids, unsigned *matched, unsigned *left) |
| Retrieves an OID information structure from a string representation. | |
| WS_DLL_PUBLIC void | oid_add (const char *name, unsigned oid_len, uint32_t *subids) |
| WS_DLL_PUBLIC void | oid_add_from_encoded (const char *name, const uint8_t *oid, int oid_len) |
| WS_DLL_PUBLIC void | oid_add_from_string (const char *name, const char *oid_str) |
| WS_DLL_PUBLIC char * | oid_get_default_mib_path (const char *app_env_var_prefix) |
| Fetch the default MIB/PIB path. | |
| WS_DLL_PUBLIC void oid_both | ( | wmem_allocator_t * | scope, |
| unsigned | oid_len, | ||
| uint32_t * | subids, | ||
| char ** | resolved_p, | ||
| char ** | numeric_p | ||
| ) |
Resolve and convert an OID to both resolved and numeric representations.
| scope | Memory allocator for allocating memory. |
| oid_len | Length of the OID subids array. |
| subids | Array of OID subidentifiers. |
| resolved_p | Pointer to store the resolved OID string. |
| numeric_p | Pointer to store the numeric OID representation. |
| WS_DLL_PUBLIC void oid_both_from_encoded | ( | wmem_allocator_t * | scope, |
| const uint8_t * | oid, | ||
| int | oid_len, | ||
| char ** | resolved_p, | ||
| char ** | numeric_p | ||
| ) |
Resolve and convert an OID from its encoded form to both resolved and numeric representations.
| scope | Memory allocator for allocating memory. |
| oid | Encoded OID data. |
| oid_len | Length of the encoded OID data. |
| resolved_p | Pointer to store the resolved OID string. |
| numeric_p | Pointer to store the numeric OID representation. |
| WS_DLL_PUBLIC void oid_both_from_string | ( | wmem_allocator_t * | scope, |
| const char * | oid_str, | ||
| char ** | resolved_p, | ||
| char ** | numeric_p | ||
| ) |
Resolve and convert an OID from its string representation to both resolved and numeric forms.
| scope | Memory allocator for allocating memory. |
| oid_str | The OID string to resolve and convert. |
| resolved_p | Pointer to store the resolved OID string. |
| numeric_p | Pointer to store the numeric OID representation. |
| WS_DLL_PUBLIC char * oid_get_default_mib_path | ( | const char * | app_env_var_prefix | ) |
Fetch the default MIB/PIB path.
| app_env_var_prefix | The prefix for environment variables related to OID resolution. |
| WS_DLL_PUBLIC oid_info_t * oid_get_from_encoded | ( | wmem_allocator_t * | scope, |
| const uint8_t * | oid, | ||
| int | oid_len, | ||
| uint32_t ** | subids, | ||
| unsigned * | matched, | ||
| unsigned * | left | ||
| ) |
Retrieves an OID information structure from its encoded form.
| scope | Memory allocator scope for allocating the returned object. |
| oid | Encoded OID data. |
| oid_len | Length of the encoded OID data. |
| subids | Pointer to store the decoded sub-identifiers. |
| matched | Pointer to store the number of matched sub-identifiers. |
| left | Pointer to store the number of remaining sub-identifiers. |
| WS_DLL_PUBLIC oid_info_t * oid_get_from_string | ( | wmem_allocator_t * | scope, |
| const char * | oid_str, | ||
| uint32_t ** | subids, | ||
| unsigned * | matched, | ||
| unsigned * | left | ||
| ) |
Retrieves an OID information structure from a string representation.
| scope | Memory allocator scope for the returned oid_info_t structure. |
| oid_str | String representation of the OID to retrieve. |
| subids | Pointer to store the resulting sub-identifier array. |
| matched | Pointer to store the number of matched sub-identifiers. |
| left | Pointer to store the number of remaining sub-identifiers. |
| WS_DLL_PUBLIC char * oid_resolved | ( | wmem_allocator_t * | scope, |
| unsigned | len, | ||
| uint32_t * | subids | ||
| ) |
Resolve an OID to its human-readable name.
| scope | Memory allocator for the returned string. |
| len | Length of the OID sub-identifier array. |
| subids | Array of OID sub-identifiers. |
| WS_DLL_PUBLIC char * oid_resolved_from_string | ( | wmem_allocator_t * | scope, |
| const char * | oid_str | ||
| ) |
Resolves an OID string to its resolved form.
| scope | Memory allocator scope for allocating memory. |
| oid_str | The OID string to resolve. |
| WS_DLL_PUBLIC char * oid_subid2string | ( | wmem_allocator_t * | scope, |
| uint32_t * | subids, | ||
| unsigned | len | ||
| ) |
Convert a sequence of OID sub-identifiers to a human-readable string.
| scope | Memory allocator for the returned string. |
| subids | Array of OID sub-identifiers. |
| len | Number of sub-identifiers in the array. |
| WS_DLL_PUBLIC void oids_cleanup | ( | void | ) |
Clean up OID-related resources.
init function called from epan.h
| WS_DLL_PUBLIC void oids_init | ( | const char * | app_env_var_prefix | ) |
Initialize OID resolution and register related preferences.
init function called from prefs.c
| app_env_var_prefix | The prefix for environment variables related to OID resolution. |
| WS_DLL_PUBLIC char * rel_oid_resolved_from_encoded | ( | wmem_allocator_t * | scope, |
| const uint8_t * | oid, | ||
| int | len | ||
| ) |
Resolve an OID from its encoded form.
| scope | Memory allocator for allocated memory. |
| oid | Encoded OID data. |
| len | Length of the encoded OID data. |
| WS_DLL_PUBLIC char * rel_oid_subid2string | ( | wmem_allocator_t * | scope, |
| uint32_t * | subids, | ||
| unsigned | len, | ||
| bool | is_absolute | ||
| ) |
Convert a sequence of OID subidentifiers to a human-readable string.
| scope | Memory allocator for the returned string. |
| subids | Array of OID subidentifiers. |
| len | Number of subidentifiers in the array. |
| is_absolute | Flag indicating if the OID is absolute (starts with a dot). |