summaryrefslogtreecommitdiff
path: root/proto/pipe/config.Y
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2009-06-01 12:10:10 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2009-06-01 12:10:10 +0200
commit2d45e09f58c4ce857e10c241cf0e89b51b9ec49c (patch)
tree3355b3a745990f7c60be7ef5c37c3c222f87b054 /proto/pipe/config.Y
parent23ac9e9a9eefe13918ee7f21a1d0f271a44d9efd (diff)
Adds opaque/transparent pipe mode selection.
Diffstat (limited to 'proto/pipe/config.Y')
-rw-r--r--proto/pipe/config.Y11
1 files changed, 9 insertions, 2 deletions
diff --git a/proto/pipe/config.Y b/proto/pipe/config.Y
index 52f70dce..4e6c80cd 100644
--- a/proto/pipe/config.Y
+++ b/proto/pipe/config.Y
@@ -10,9 +10,13 @@ CF_HDR
#include "proto/pipe/pipe.h"
+CF_DEFINES
+
+#define PIPE_CFG ((struct pipe_config *) this_proto)
+
CF_DECLS
-CF_KEYWORDS(PIPE, PEER, TABLE)
+CF_KEYWORDS(PIPE, PEER, TABLE, MODE, OPAQUE, TRANSPARENT)
CF_GRAMMAR
@@ -21,6 +25,7 @@ CF_ADDTO(proto, pipe_proto '}')
pipe_proto_start: proto_start PIPE {
this_proto = proto_config_new(&proto_pipe, sizeof(struct pipe_config));
this_proto->preference = DEF_PREF_PIPE;
+ PIPE_CFG->mode = PIPE_OPAQUE;
}
;
@@ -30,8 +35,10 @@ pipe_proto:
| pipe_proto PEER TABLE SYM ';' {
if ($4->class != SYM_TABLE)
cf_error("Routing table name expected");
- ((struct pipe_config *) this_proto)->peer = $4->def;
+ PIPE_CFG->peer = $4->def;
}
+ | pipe_proto MODE OPAQUE ';' { PIPE_CFG->mode = PIPE_OPAQUE; }
+ | pipe_proto MODE TRANSPARENT ';' { PIPE_CFG->mode = PIPE_TRANSPARENT; }
;
CF_CODE