/* A Bison parser, made by GNU Bison 3.8.2.  */

/* Bison interface for Yacc-like parsers in C

   Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
   Inc.

   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation, either version 3 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */

/* As a special exception, you may create a larger work that contains
   part or all of the Bison parser skeleton and distribute that work
   under terms of your choice, so long as that work isn't itself a
   parser generator using the skeleton or a modified version thereof
   as a parser skeleton.  Alternatively, if you modify or redistribute
   the parser skeleton itself, you may (at your option) remove this
   special exception, which will cause the skeleton and the resulting
   Bison output files to be licensed under the GNU General Public
   License without this special exception.

   This special exception was added by the Free Software Foundation in
   version 2.2 of Bison.  */

/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
   especially those whose name start with YY_ or yy_.  They are
   private implementation details that can be changed or removed.  */

#ifndef YY_FASTD_CONFIG_SRC_CONFIG_YY_H_INCLUDED
# define YY_FASTD_CONFIG_SRC_CONFIG_YY_H_INCLUDED
/* Debug traces.  */
#ifndef FASTD_CONFIG_DEBUG
# if defined YYDEBUG
#if YYDEBUG
#   define FASTD_CONFIG_DEBUG 1
#  else
#   define FASTD_CONFIG_DEBUG 0
#  endif
# else /* ! defined YYDEBUG */
#  define FASTD_CONFIG_DEBUG 0
# endif /* ! defined YYDEBUG */
#endif  /* ! defined FASTD_CONFIG_DEBUG */
#if FASTD_CONFIG_DEBUG
extern int fastd_config_debug;
#endif
/* "%code requires" blocks.  */
#line 14 "../fastd-23/src/config.y"

	#include "fastd.h"
	#include <arpa/inet.h>

#line 62 "src/config.yy.h"

/* Token kinds.  */
#ifndef FASTD_CONFIG_TOKENTYPE
# define FASTD_CONFIG_TOKENTYPE
  enum fastd_config_tokentype
  {
    FASTD_CONFIG_EMPTY = -2,
    FASTD_CONFIG_EOF = 0,          /* "end of file"  */
    FASTD_CONFIG_error = 256,      /* error  */
    FASTD_CONFIG_UNDEF = 257,      /* "invalid token"  */
    START_CONFIG = 258,            /* START_CONFIG  */
    START_PEER_GROUP_CONFIG = 259, /* START_PEER_GROUP_CONFIG  */
    START_PEER_CONFIG = 260,       /* START_PEER_CONFIG  */
    TOK_UINT = 261,                /* TOK_UINT  */
    TOK_STRING = 262,              /* TOK_STRING  */
    TOK_ADDR4 = 263,               /* TOK_ADDR4  */
    TOK_ADDR6 = 264,               /* TOK_ADDR6  */
    TOK_ADDR6_SCOPED = 265,        /* TOK_ADDR6_SCOPED  */
    TOK_ADDRESSES = 266,           /* TOK_ADDRESSES  */
    TOK_ANY = 267,                 /* TOK_ANY  */
    TOK_AS = 268,                  /* TOK_AS  */
    TOK_ASYNC = 269,               /* TOK_ASYNC  */
    TOK_AUTO = 270,                /* TOK_AUTO  */
    TOK_BIND = 271,                /* TOK_BIND  */
    TOK_CAPABILITIES = 272,        /* TOK_CAPABILITIES  */
    TOK_CIPHER = 273,              /* TOK_CIPHER  */
    TOK_CONNECT = 274,             /* TOK_CONNECT  */
    TOK_DEBUG = 275,               /* TOK_DEBUG  */
    TOK_DEBUG2 = 276,              /* TOK_DEBUG2  */
    TOK_DEFAULT = 277,             /* TOK_DEFAULT  */
    TOK_DISESTABLISH = 278,        /* TOK_DISESTABLISH  */
    TOK_DOWN = 279,                /* TOK_DOWN  */
    TOK_DROP = 280,                /* TOK_DROP  */
    TOK_EARLY = 281,               /* TOK_EARLY  */
    TOK_ERROR = 282,               /* TOK_ERROR  */
    TOK_ESTABLISH = 283,           /* TOK_ESTABLISH  */
    TOK_FATAL = 284,               /* TOK_FATAL  */
    TOK_FLOAT = 285,               /* TOK_FLOAT  */
    TOK_FORCE = 286,               /* TOK_FORCE  */
    TOK_FORWARD = 287,             /* TOK_FORWARD  */
    TOK_FROM = 288,                /* TOK_FROM  */
    TOK_GROUP = 289,               /* TOK_GROUP  */
    TOK_HANDSHAKES = 290,          /* TOK_HANDSHAKES  */
    TOK_HIDE = 291,                /* TOK_HIDE  */
    TOK_INCLUDE = 292,             /* TOK_INCLUDE  */
    TOK_INFO = 293,                /* TOK_INFO  */
    TOK_INTERFACE = 294,           /* TOK_INTERFACE  */
    TOK_IP = 295,                  /* TOK_IP  */
    TOK_IPV4 = 296,                /* TOK_IPV4  */
    TOK_IPV6 = 297,                /* TOK_IPV6  */
    TOK_KEY = 298,                 /* TOK_KEY  */
    TOK_L2TP = 299,                /* TOK_L2TP  */
    TOK_LEVEL = 300,               /* TOK_LEVEL  */
    TOK_LIMIT = 301,               /* TOK_LIMIT  */
    TOK_LOG = 302,                 /* TOK_LOG  */
    TOK_MAC = 303,                 /* TOK_MAC  */
    TOK_MARK = 304,                /* TOK_MARK  */
    TOK_METHOD = 305,              /* TOK_METHOD  */
    TOK_MODE = 306,                /* TOK_MODE  */
    TOK_MTU = 307,                 /* TOK_MTU  */
    TOK_MULTITAP = 308,            /* TOK_MULTITAP  */
    TOK_NO = 309,                  /* TOK_NO  */
    TOK_OFFLOAD = 310,             /* TOK_OFFLOAD  */
    TOK_ON = 311,                  /* TOK_ON  */
    TOK_PACKET = 312,              /* TOK_PACKET  */
    TOK_PEER = 313,                /* TOK_PEER  */
    TOK_PEERS = 314,               /* TOK_PEERS  */
    TOK_PERSIST = 315,             /* TOK_PERSIST  */
    TOK_PMTU = 316,                /* TOK_PMTU  */
    TOK_PORT = 317,                /* TOK_PORT  */
    TOK_POST_DOWN = 318,           /* TOK_POST_DOWN  */
    TOK_PRE_UP = 319,              /* TOK_PRE_UP  */
    TOK_PROTOCOL = 320,            /* TOK_PROTOCOL  */
    TOK_REMOTE = 321,              /* TOK_REMOTE  */
    TOK_SECRET = 322,              /* TOK_SECRET  */
    TOK_SECURE = 323,              /* TOK_SECURE  */
    TOK_SOCKET = 324,              /* TOK_SOCKET  */
    TOK_STATUS = 325,              /* TOK_STATUS  */
    TOK_STDERR = 326,              /* TOK_STDERR  */
    TOK_SYNC = 327,                /* TOK_SYNC  */
    TOK_SYSLOG = 328,              /* TOK_SYSLOG  */
    TOK_TAP = 329,                 /* TOK_TAP  */
    TOK_TO = 330,                  /* TOK_TO  */
    TOK_TUN = 331,                 /* TOK_TUN  */
    TOK_UP = 332,                  /* TOK_UP  */
    TOK_USE = 333,                 /* TOK_USE  */
    TOK_USER = 334,                /* TOK_USER  */
    TOK_VERBOSE = 335,             /* TOK_VERBOSE  */
    TOK_VERIFY = 336,              /* TOK_VERIFY  */
    TOK_WARN = 337,                /* TOK_WARN  */
    TOK_YES = 338                  /* TOK_YES  */
  };
  typedef enum fastd_config_tokentype fastd_config_token_kind_t;
#endif

/* Value type.  */
#if ! defined FASTD_CONFIG_STYPE && ! defined FASTD_CONFIG_STYPE_IS_DECLARED
union FASTD_CONFIG_STYPE
{
#line 19 "../fastd-23/src/config.y"

	uint64_t uint64;
	int64_t int64;
	fastd_string_stack_t *str;
	bool boolean;
	fastd_tristate_t tristate;
	struct in_addr addr4;
	struct in6_addr addr6;
	fastd_peer_address_t addr;
	struct {
		struct in6_addr addr;
		char ifname[IFNAMSIZ];
	} addr6_scoped;

	const char *error;

#line 179 "src/config.yy.h"

};
typedef union FASTD_CONFIG_STYPE FASTD_CONFIG_STYPE;
# define FASTD_CONFIG_STYPE_IS_TRIVIAL 1
# define FASTD_CONFIG_STYPE_IS_DECLARED 1
#endif

/* Location type.  */
#if ! defined FASTD_CONFIG_LTYPE && ! defined FASTD_CONFIG_LTYPE_IS_DECLARED
typedef struct FASTD_CONFIG_LTYPE FASTD_CONFIG_LTYPE;
struct FASTD_CONFIG_LTYPE
{
  int first_line;
  int first_column;
  int last_line;
  int last_column;
};
# define FASTD_CONFIG_LTYPE_IS_DECLARED 1
# define FASTD_CONFIG_LTYPE_IS_TRIVIAL 1
#endif




#ifndef YYPUSH_MORE_DEFINED
# define YYPUSH_MORE_DEFINED
enum { YYPUSH_MORE = 4 };
#endif

typedef struct fastd_config_pstate fastd_config_pstate;


int fastd_config_push_parse (fastd_config_pstate *ps,
                  int pushed_char, FASTD_CONFIG_STYPE const *pushed_val, FASTD_CONFIG_LTYPE *pushed_loc, fastd_parser_state_t *state);

fastd_config_pstate *fastd_config_pstate_new (void);
void fastd_config_pstate_delete (fastd_config_pstate *ps);


#endif /* !YY_FASTD_CONFIG_SRC_CONFIG_YY_H_INCLUDED  */
