/* * BIRD -- Wireguard Protocol Configuration * * (c) 1999 Martin Mares * * 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 wg_proto_channel ';' | wireguard_proto proto_item ';' | wireguard_proto INTERFACE TEXT ';' { WG_CFG->ifname = $3; } ; wg_proto_channel: wg_channel_start channel_opt_list wg_channel_end; wg_channel_start: net_type { this_channel = channel_config_get(&channel_wg, net_label[$1], $1, this_proto); } wg_channel_end: { this_channel = NULL; } CF_CODE CF_END