Statistics
| Branch: | Revision:

iof-bird / bird-2.0.1 / proto / pipe / config.Y @ 6b3f1a54

History | View | Annotate | Download (817 Bytes)

1
/*
2
 *	BIRD -- Table-to-Table Protocol Configuration
3
 *
4
 *	(c) 1999 Martin Mares <mj@ucw.cz>
5
 *
6
 *	Can be freely distributed and used under the terms of the GNU GPL.
7
 */
8

    
9
CF_HDR
10

    
11
#include "proto/pipe/pipe.h"
12

    
13
CF_DEFINES
14

    
15
#define PIPE_CFG ((struct pipe_config *) this_proto)
16

    
17
CF_DECLS
18

    
19
CF_KEYWORDS(PIPE, PEER, TABLE)
20

    
21
CF_GRAMMAR
22

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

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

    
33
pipe_proto:
34
   pipe_proto_start proto_name '{'
35
 | pipe_proto proto_item ';'
36
 | pipe_proto channel_item ';'
37
 | pipe_proto PEER TABLE rtable ';' { PIPE_CFG->peer = $4; }
38
 ;
39

    
40
CF_CODE
41

    
42
CF_END