Statistics
| Branch: | Revision:

iof-bird-daemon / proto / pipe / config.Y @ c4ae5385

History | View | Annotate | Download (981 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, MODE, OPAQUE, TRANSPARENT)
20

    
21
CF_GRAMMAR
22

    
23
CF_ADDTO(proto, pipe_proto '}')
24

    
25
pipe_proto_start: proto_start PIPE {
26
     this_proto = proto_config_new(&proto_pipe, sizeof(struct pipe_config));
27
     this_proto->preference = DEF_PREF_PIPE;
28
     PIPE_CFG->mode = PIPE_TRANSPARENT;
29
  }
30
 ;
31

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

    
44
CF_CODE
45

    
46
CF_END