13 #ifndef __PROTOBUF_LANG_TREE_H__
14 #define __PROTOBUF_LANG_TREE_H__
16 #include <wireshark.h>
25 #define PBL_DEFAULT_PACKAGE_NAME ""
27 typedef void(*pbl_report_error_cb_t)(
const char *msg_format, ...);
48 pbl_report_error_cb_t error_cb;
50 GHashTable* proto_files;
51 GQueue* proto_files_to_be_parsed;
59 const char* package_name;
60 int package_name_lineno;
66 pbl_node_type_t nodetype;
71 GHashTable* children_by_name;
80 gboolean in_is_stream;
82 gboolean out_is_stream;
89 GHashTable* fields_by_number;
105 gboolean is_repeated;
106 gboolean is_required;
107 gboolean has_default_value;
108 gchar* orig_default_value;
109 int string_or_bytes_default_value_length;
127 GHashTable* values_by_number;
147 GSList* lex_string_tokens;
148 GSList* lex_struct_tokens;
151 gboolean grammar_error;
161 parser_state->lex_string_tokens = g_slist_prepend(parser_state->lex_string_tokens, dupstr);
170 parser_state->lex_struct_tokens = g_slist_prepend(parser_state->lex_struct_tokens, newtoken);
176 pbl_printf(
const char* fmt, ...)
225 pbl_message_descriptor_pool_FindMessageTypeByName(
const pbl_descriptor_pool_t* pool,
const char* name);
277 pbl_field_descriptor_TypeName(
int field_type);
378 pbl_create_node(
pbl_file_descriptor_t* file,
int lineno, pbl_node_type_t nodetype,
const char* name);
382 pbl_set_node_name(
pbl_node_t* node,
int lineno,
const char* newname);
385 static inline const char*
409 pbl_create_field_node(
pbl_file_descriptor_t* file,
int lineno,
const char* label,
const char* type_name,
const char* name,
int number,
pbl_node_t* options);
417 pbl_create_method_node(
pbl_file_descriptor_t* file,
int lineno,
const char* name,
const char* in_msg_type, gboolean in_is_stream,
const char* out_msg_type, gboolean out_is_stream);
421 pbl_create_option_node(
pbl_file_descriptor_t* file,
int lineno,
const char* name,
const char* value);
425 pbl_free_node(gpointer anode);
void pbl_reinit_descriptor_pool(pbl_descriptor_pool_t **ppool, const char **directories, pbl_report_error_cb_t error_cb)
Definition: protobuf_lang_tree.c:107
Definition: protobuf_lang_tree.h:144
Definition: protobuf_lang_tree.h:138
Definition: protobuf_lang_tree.h:46
Definition: protobuf_lang_tree.h:124
Definition: protobuf_lang_tree.h:93
Definition: protobuf_lang_tree.h:99
Definition: protobuf_lang_tree.h:56
Definition: protobuf_lang_tree.h:86
Definition: protobuf_lang_tree.h:77
Definition: protobuf_lang_tree.h:65
Definition: protobuf_lang_tree.h:132