Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Public Attributes | List of all members
_tvbparse_wanted_t Struct Reference

Describes a parsing rule or expectation for a tvbuff parser. More...

#include <tvbparse.h>

Public Attributes

int id
 
tvbparse_condition_t condition
 
union { 
 
   const char *   str 
 
   struct _tvbparse_wanted_t **   handle 
 
   struct { 
 
      union { 
 
         int64_t   i 
 
         uint64_t   u 
 
         double   f 
 
      }   value 
 
   }   number 
 
   enum ftenum   ftenum 
 
   struct { 
 
      until_mode_t   mode 
 
      const tvbparse_wanted_t *   subelem 
 
   }   until 
 
   struct { 
 
      wmem_map_t *   table 
 
      struct _tvbparse_wanted_t *   key 
 
      struct _tvbparse_wanted_t *   other 
 
   }   hash 
 
   GPtrArray *   elems 
 
   const tvbparse_wanted_t *   subelem 
 
   void *   p 
 
control 
 Control parameters for the parsing rule.
 
int len
 
unsigned min
 
unsigned max
 
const void * data
 
tvbparse_action_t before
 
tvbparse_action_t after
 

Detailed Description

Describes a parsing rule or expectation for a tvbuff parser.

This structure defines a unit of parsing logic used by the tvbparse engine. It specifies conditions, control parameters, length constraints, and optional pre/post actions to guide how data is extracted from a tvbuff.

Member Data Documentation

◆ after

tvbparse_action_t _tvbparse_wanted_t::after

Action to perform after parsing this element.

◆ before

tvbparse_action_t _tvbparse_wanted_t::before

Action to perform before parsing this element.

◆ condition

tvbparse_condition_t _tvbparse_wanted_t::condition

Condition that determines when this rule applies.

◆ [union]

union { ... } _tvbparse_wanted_t::control

Control parameters for the parsing rule.

The active member depends on the parsing strategy. This union supports string matching, numeric values, nested rules, hash-based dispatch, and other advanced parsing constructs.

◆ data

const void* _tvbparse_wanted_t::data

Optional user-defined data associated with the rule.

◆ elems

GPtrArray* _tvbparse_wanted_t::elems

Array of sub-elements to parse.

◆ f

double _tvbparse_wanted_t::f

Floating-point value.

◆ ftenum

enum ftenum _tvbparse_wanted_t::ftenum

Field type enum for typed parsing.

◆ handle

struct _tvbparse_wanted_t** _tvbparse_wanted_t::handle

Pointer to a rule handle array.

◆ i

int64_t _tvbparse_wanted_t::i

Signed integer value.

◆ id

int _tvbparse_wanted_t::id

Unique identifier for the parsing rule.

◆ key

struct _tvbparse_wanted_t* _tvbparse_wanted_t::key

Key to use for lookup.

◆ len

int _tvbparse_wanted_t::len

Expected length of the parsed element (if fixed).

◆ max

unsigned _tvbparse_wanted_t::max

Maximum length constraint.

◆ min

unsigned _tvbparse_wanted_t::min

Minimum length constraint.

◆ mode

until_mode_t _tvbparse_wanted_t::mode

Mode for "until" parsing (e.g., until match or delimiter).

◆ [struct]

struct { ... } _tvbparse_wanted_t::number

Numeric value to match.

◆ other

struct _tvbparse_wanted_t* _tvbparse_wanted_t::other

Fallback rule if key not found.

◆ p

void* _tvbparse_wanted_t::p

Generic pointer for custom control data.

◆ str

const char* _tvbparse_wanted_t::str

String to match.

◆ subelem

const tvbparse_wanted_t* _tvbparse_wanted_t::subelem

Sub-element to parse until.

Single sub-element reference.

◆ table

wmem_map_t* _tvbparse_wanted_t::table

Lookup table for dispatching based on key.

◆ u

uint64_t _tvbparse_wanted_t::u

Unsigned integer value.


The documentation for this struct was generated from the following file: