aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mate/mate_grammar.lemon
diff options
context:
space:
mode:
authorLuis Ontanon <luis.ontanon@gmail.com>2005-05-22 00:44:34 +0000
committerLuis Ontanon <luis.ontanon@gmail.com>2005-05-22 00:44:34 +0000
commitdbe55501fc1e8e98157921fb625b2b9ede6f6d4b (patch)
tree786d0bca1ebdfb68b1e60b52f63317734d727af0 /plugins/mate/mate_grammar.lemon
parent86a30241db54118a909b4f5d3b491adadf53f567 (diff)
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
Diffstat (limited to 'plugins/mate/mate_grammar.lemon')
-rw-r--r--plugins/mate/mate_grammar.lemon11
1 files changed, 10 insertions, 1 deletions
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) {