blob: 7eee4a6528d8d5f604c96f37e0b9ffe4e951ba1c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
/*
* BIRD -- Wireguard Protocol Configuration
*
* (c) 1999 Martin Mares <mj@ucw.cz>
*
* Can be freely distributed and used under the terms of the GNU GPL.
*/
CF_HDR
#include "proto/wireguard/wireguard.h"
CF_DEFINES
#define WG_CFG ((struct wg_config *) this_proto)
CF_DECLS
CF_KEYWORDS(WIREGUARD)
CF_GRAMMAR
proto: wireguard_proto '}' ;
wireguard_proto_start: proto_start WIREGUARD {
this_proto = proto_config_new(&proto_wireguard, $1);
}
;
wireguard_proto:
wireguard_proto_start proto_name '{'
| wireguard_proto proto_channel ';' { this_proto->net_type = $2->net_type; }
| wireguard_proto proto_item ';'
| wireguard_proto INTERFACE TEXT ';' { WG_CFG->ifname = $3; }
;
CF_CODE
CF_END
|