Revision f4a60a9b proto/pipe/config.Y

View differences:

proto/pipe/config.Y
16 16

  
17 17
CF_DECLS
18 18

  
19
CF_KEYWORDS(PIPE, PEER, TABLE, MODE, OPAQUE, TRANSPARENT)
19
CF_KEYWORDS(PIPE, PEER, TABLE)
20 20

  
21 21
CF_GRAMMAR
22 22

  
23
CF_ADDTO(proto, pipe_proto '}')
23
CF_ADDTO(proto, pipe_proto '}' { this_channel = NULL; } )
24 24

  
25
pipe_proto_start: proto_start PIPE {
26
     this_proto = proto_config_new(&proto_pipe, $1);
27
     PIPE_CFG->mode = PIPE_TRANSPARENT;
28
  }
29
 ;
25
pipe_proto_start: proto_start PIPE
26
{
27
  this_proto = proto_config_new(&proto_pipe, $1);
28
  this_channel = channel_config_new(NULL, 0, this_proto);
29
  this_channel->in_filter = FILTER_ACCEPT;
30
  this_channel->out_filter = FILTER_ACCEPT;
31
};
30 32

  
31 33
pipe_proto:
32 34
   pipe_proto_start proto_name '{'
33 35
 | pipe_proto proto_item ';'
34
 | pipe_proto PEER TABLE SYM ';' {
35
     if ($4->class != SYM_TABLE)
36
       cf_error("Routing table name expected");
37
     PIPE_CFG->peer = $4->def;
38
   }
39
 | pipe_proto MODE OPAQUE ';' { PIPE_CFG->mode = PIPE_OPAQUE; }
40
 | pipe_proto MODE TRANSPARENT ';' { PIPE_CFG->mode = PIPE_TRANSPARENT; }
36
 | pipe_proto channel_item ';'
37
 | pipe_proto PEER TABLE rtable ';' { PIPE_CFG->peer = $4; }
41 38
 ;
42 39

  
43 40
CF_CODE

Also available in: Unified diff