|
Wireshark 4.7.0
The Wireshark network protocol analyzer
|
Go to the source code of this file.
Classes | |
| struct | _asn1_par_def_t |
| Static definition of a single ASN.1 parameterized type parameter (name + kind). More... | |
| struct | _asn1_par_t |
| Runtime instance of a resolved ASN.1 parameterized type argument. More... | |
| struct | _asn1_stack_frame_t |
| Single frame on the ASN.1 parameterized type resolution stack. More... | |
| struct | _asn1_ctx_t |
| Central context object threaded through all ASN.1 dissection calls. More... | |
| struct | _rose_ctx_t |
| Context object carrying per-association state for ROSE (Remote Operations Service Element) dissection. More... | |
Macros | |
| #define | ASN1_CTX_SIGNATURE 0x41435458 |
| Magic signature value used to validate an asn1_ctx_t pointer ("ACTX"). | |
| #define | ROSE_CTX_SIGNATURE 0x524F5345 |
| Magic signature value used to validate a rose_ctx_t pointer ("ROSE"). | |
| #define | ASN1_EXT_ROOT 0x01 |
| #define | ASN1_EXT_EXT 0x02 |
| #define | ASN1_OPT 0x04 |
| #define | ASN1_DFLT 0x08 |
| #define | ASN1_HAS_EXT(f) ((f)&(ASN1_EXT_ROOT|ASN1_EXT_EXT)) |
Typedefs | |
| typedef struct _asn1_par_def_t | asn1_par_def_t |
| Static definition of a single ASN.1 parameterized type parameter (name + kind). | |
| typedef struct _asn1_par_t | asn1_par_t |
| Runtime instance of a resolved ASN.1 parameterized type argument. | |
| typedef struct _asn1_stack_frame_t | asn1_stack_frame_t |
| Single frame on the ASN.1 parameterized type resolution stack. | |
| typedef struct _asn1_ctx_t | asn1_ctx_t |
| Central context object threaded through all ASN.1 dissection calls. | |
| typedef struct _rose_ctx_t | rose_ctx_t |
| Context object carrying per-association state for ROSE (Remote Operations Service Element) dissection. | |
Enumerations | |
| enum | asn1_enc_e { ASN1_ENC_BER , ASN1_ENC_PER , ASN1_ENC_ECN , ASN1_ENC_XER , ASN1_ENC_OER } |
| Identifies the ASN.1 transfer syntax encoding used for a PDU. More... | |
| enum | asn1_cb_variant { CB_ASN1_ENC , CB_NEW_DISSECTOR , CB_DISSECTOR_HANDLE } |
| Identifies the variant of an ASN.1 callback registered for a type. More... | |
| enum | asn1_par_type { ASN1_PAR_IRR , ASN1_PAR_BOOLEAN , ASN1_PAR_INTEGER , ASN1_PAR_TYPE } |
| Identifies the kind of an ASN.1 parameterized type argument. More... | |
Functions | |
| WS_DLL_PUBLIC void | asn1_ctx_init (asn1_ctx_t *actx, asn1_enc_e encoding, bool aligned, packet_info *pinfo) |
| Initialize an ASN.1 context. | |
| WS_DLL_PUBLIC bool | asn1_ctx_check_signature (asn1_ctx_t *actx) |
| Check the signature of an ASN.1 context. | |
| WS_DLL_PUBLIC void | asn1_ctx_clean_external (asn1_ctx_t *actx) |
| Clean the external data of an ASN.1 context. | |
| void | asn1_ctx_clean_epdv (asn1_ctx_t *actx) |
| Clean the EPDV data of an ASN.1 context. | |
| WS_DLL_PUBLIC void | asn1_stack_frame_push (asn1_ctx_t *actx, const char *name) |
| Push a stack frame onto the ASN.1 context. | |
| WS_DLL_PUBLIC void | asn1_stack_frame_pop (asn1_ctx_t *actx, const char *name) |
| Pop a stack frame from the ASN.1 context. | |
| WS_DLL_PUBLIC void | asn1_stack_frame_check (asn1_ctx_t *actx, const char *name, const asn1_par_def_t *par_def) |
| Check that the current stack frame matches the expected name and parameter definitions. | |
| WS_DLL_PUBLIC void | asn1_param_push_boolean (asn1_ctx_t *actx, bool value) |
| Push a boolean parameter onto the ASN.1 context parameter stack. | |
| WS_DLL_PUBLIC void | asn1_param_push_integer (asn1_ctx_t *actx, int32_t value) |
| Push an integer parameter onto the ASN.1 context parameter stack. | |
| bool | asn1_param_get_boolean (asn1_ctx_t *actx, const char *name) |
| Get a named boolean parameter from the ASN.1 context. | |
| WS_DLL_PUBLIC int32_t | asn1_param_get_integer (asn1_ctx_t *actx, const char *name) |
| Get a named integer parameter from the ASN.1 context. | |
| WS_DLL_PUBLIC void | rose_ctx_init (rose_ctx_t *rctx) |
| Initialize a ROSE context. | |
| bool | rose_ctx_check_signature (rose_ctx_t *rctx) |
| Check the signature of a ROSE context. | |
| WS_DLL_PUBLIC void | rose_ctx_clean_data (rose_ctx_t *rctx) |
| Clean the data of a ROSE context. | |
| WS_DLL_PUBLIC asn1_ctx_t * | get_asn1_ctx (void *ptr) |
| Retrieve the ASN.1 context from an opaque pointer. | |
| WS_DLL_PUBLIC rose_ctx_t * | get_rose_ctx (void *ptr) |
| Retrieve the ROSE context from an opaque pointer. | |
| WS_DLL_PUBLIC double | asn1_get_real (const uint8_t *real_ptr, int len, int *err) |
| Convert an ASN.1 encoded real value to a double. | |
Common data for ASN.1 2007 Anders Broman
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
| typedef struct _asn1_ctx_t asn1_ctx_t |
Central context object threaded through all ASN.1 dissection calls.
Carries encoding parameters, packet metadata, the type-resolution stack, and per-PDU working state for EXTERNAL and EMBEDDED PDV types.
| typedef struct _rose_ctx_t rose_ctx_t |
Context object carrying per-association state for ROSE (Remote Operations Service Element) dissection.
Holds per-direction dissector tables for argument, result, and error PDUs, plus transient per-APDU working state accumulated as each ROSE operation is decoded.
| enum asn1_cb_variant |
| enum asn1_enc_e |
Identifies the ASN.1 transfer syntax encoding used for a PDU.
| enum asn1_par_type |
| WS_DLL_PUBLIC bool asn1_ctx_check_signature | ( | asn1_ctx_t * | actx | ) |
Check the signature of an ASN.1 context.
| actx | The ASN.1 context. |
|
extern |
Clean the EPDV data of an ASN.1 context.
| actx | The ASN.1 context. |
| WS_DLL_PUBLIC void asn1_ctx_clean_external | ( | asn1_ctx_t * | actx | ) |
Clean the external data of an ASN.1 context.
| actx | The ASN.1 context. |
| WS_DLL_PUBLIC void asn1_ctx_init | ( | asn1_ctx_t * | actx, |
| asn1_enc_e | encoding, | ||
| bool | aligned, | ||
| packet_info * | pinfo | ||
| ) |
Initialize an ASN.1 context.
| actx | The ASN.1 context to initialize. |
| encoding | The ASN.1 encoding type. |
| aligned | Whether the encoding is aligned. |
| pinfo | The packet info. |
| WS_DLL_PUBLIC double asn1_get_real | ( | const uint8_t * | real_ptr, |
| int | len, | ||
| int * | err | ||
| ) |
Convert an ASN.1 encoded real value to a double.
Sets err to EINVAL for an invalid encoding (returning 0) to ERANGE if overflow or underflow occurs (rounding, possibly to +/-HUGE_VAL, +/-0.0), and 0 if conversion is successful.
| real_ptr | Pointer to the encoded real value. |
| len | The length of the encoded buffer. |
| err | Output error code. |
|
extern |
Get a named boolean parameter from the ASN.1 context.
| actx | The ASN.1 context. |
| name | The name of the parameter. |
| WS_DLL_PUBLIC int32_t asn1_param_get_integer | ( | asn1_ctx_t * | actx, |
| const char * | name | ||
| ) |
Get a named integer parameter from the ASN.1 context.
| actx | The ASN.1 context. |
| name | The name of the parameter. |
| WS_DLL_PUBLIC void asn1_param_push_boolean | ( | asn1_ctx_t * | actx, |
| bool | value | ||
| ) |
Push a boolean parameter onto the ASN.1 context parameter stack.
| actx | The ASN.1 context. |
| value | The boolean value to push. |
| WS_DLL_PUBLIC void asn1_param_push_integer | ( | asn1_ctx_t * | actx, |
| int32_t | value | ||
| ) |
Push an integer parameter onto the ASN.1 context parameter stack.
| actx | The ASN.1 context. |
| value | The integer value to push. |
| WS_DLL_PUBLIC void asn1_stack_frame_check | ( | asn1_ctx_t * | actx, |
| const char * | name, | ||
| const asn1_par_def_t * | par_def | ||
| ) |
Check that the current stack frame matches the expected name and parameter definitions.
| actx | The ASN.1 context. |
| name | The expected name of the stack frame. |
| par_def | The expected parameter definitions. |
| WS_DLL_PUBLIC void asn1_stack_frame_pop | ( | asn1_ctx_t * | actx, |
| const char * | name | ||
| ) |
Pop a stack frame from the ASN.1 context.
| actx | The ASN.1 context. |
| name | The name of the stack frame. |
| WS_DLL_PUBLIC void asn1_stack_frame_push | ( | asn1_ctx_t * | actx, |
| const char * | name | ||
| ) |
Push a stack frame onto the ASN.1 context.
| actx | The ASN.1 context. |
| name | The name of the stack frame. |
| WS_DLL_PUBLIC asn1_ctx_t * get_asn1_ctx | ( | void * | ptr | ) |
Retrieve the ASN.1 context from an opaque pointer.
| ptr | Opaque pointer to a structure containing an ASN.1 context. |
| WS_DLL_PUBLIC rose_ctx_t * get_rose_ctx | ( | void * | ptr | ) |
Retrieve the ROSE context from an opaque pointer.
| ptr | Opaque pointer to a structure containing a ROSE context. |
|
extern |
Check the signature of a ROSE context.
| rctx | The ROSE context. |
| WS_DLL_PUBLIC void rose_ctx_clean_data | ( | rose_ctx_t * | rctx | ) |
Clean the data of a ROSE context.
| rctx | The ROSE context. |
| WS_DLL_PUBLIC void rose_ctx_init | ( | rose_ctx_t * | rctx | ) |
Initialize a ROSE context.
| rctx | The ROSE context to initialize. |