From dbe55501fc1e8e98157921fb625b2b9ede6f6d4b Mon Sep 17 00:00:00 2001 From: Luis Ontanon Date: Sun, 22 May 2005 00:44:34 +0000 Subject: at this point mate should be working as it did before the grammar - pdu transports were upside down (ip/tcp vs tcp/ip) - the gop to gog index was not being populated - tell svn to ignore generated c files svn path=/trunk/; revision=14416 --- plugins/mate/mate_grammar.lemon | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'plugins/mate/mate_grammar.lemon') diff --git a/plugins/mate/mate_grammar.lemon b/plugins/mate/mate_grammar.lemon index 6b71a53fa6..837a66e3e9 100644 --- a/plugins/mate/mate_grammar.lemon +++ b/plugins/mate/mate_grammar.lemon @@ -357,6 +357,8 @@ action_mode(A) ::= INSERT_KW. { A = AVPL_INSERT; } pdu_decl ::= PDU_KW NAME(NAME) PROTO_KW field(FIELD) TRANSPORT_KW proto_stack(STACK) pdu_setup(SETUP) SEMICOLON. { mate_cfg_pdu* cfg = new_pducfg(NAME); extraction_t *extraction, *next_extraction; + GPtrArray* transport_stack = g_ptr_array_new(); + int i; if (! cfg ) configuration_error(mc,"could not create Pdu %s.",NAME); @@ -367,8 +369,15 @@ pdu_decl ::= PDU_KW NAME(NAME) PROTO_KW field(FIELD) TRANSPORT_KW proto_stack(ST cfg->drop_unassigned = (SETUP->flags) ? SETUP->flags->drop_unassigned : mc->defaults.pdu.drop_unassigned; g_string_sprintfa(mc->protos_filter,"||%s",FIELD->abbrev); + + /* flip the transport_stack */ + for (i = STACK->len - 1; STACK->len; i--) { + g_ptr_array_add(transport_stack,g_ptr_array_remove_index(STACK,i)); + } + + g_ptr_array_free(STACK,FALSE); - cfg->transport_ranges = STACK; + cfg->transport_ranges = transport_stack; cfg->payload_ranges = SETUP->payload; if (SETUP->criteria) { -- cgit v1.2.1