- introduced autotools
- first working version
- make dist should work
- things to do:
- UML testing!
- more cleanups
This commit is contained in:
@@ -1,193 +0,0 @@
|
||||
# ipsec starter Makefile
|
||||
# Copyright (C) 2001 Mathieu Lafon - Arkoon Network Security
|
||||
#
|
||||
# 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 2 of the License, or (at your
|
||||
# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# RCSID $Id: Makefile,v 1.14 2006/02/17 19:34:02 as Exp $
|
||||
|
||||
FREESWANSRCDIR?=$(shell cd ../..; pwd)
|
||||
include ${FREESWANSRCDIR}/Makefile.inc
|
||||
|
||||
LD=$(CC)
|
||||
RM=rm
|
||||
LEX=flex
|
||||
BISON=bison
|
||||
GPERF=gperf
|
||||
|
||||
FREESWANDIR=../..
|
||||
FREESWANLIB=$(FREESWANDIR)/lib/libfreeswan/libfreeswan.a
|
||||
PLUTODIR=../pluto
|
||||
OPENACDIR=../openac
|
||||
|
||||
DEFINES+= -DVIRTUAL_IP -DDEBUG
|
||||
|
||||
# This compile option activates the leak detective
|
||||
ifeq ($(USE_LEAK_DETECTIVE),true)
|
||||
DEFINES+= -DLEAK_DETECTIVE
|
||||
endif
|
||||
|
||||
INCLUDES=-I${FREESWANDIR}/linux/include
|
||||
CFLAGS=$(DEFINES) $(INCLUDES) -Wall
|
||||
CFLAGS+=-DIPSEC_EXECDIR=\"${FINALLIBEXECDIR}\" -DIPSEC_CONFDDIR=\"${FINALCONFDDIR}\"
|
||||
CFLAGS+=-DIPSEC_CONFDIR=\"${FINALCONFDIR}\"
|
||||
LDFLAGS=
|
||||
|
||||
PLUTO_OBJS=defs.o
|
||||
|
||||
OBJS=starter.o parser.tab.o lex.yy.o keywords.o args.o invokepluto.o \
|
||||
starterwhack.o netkey.o interfaces.o exec.o cmp.o confread.o \
|
||||
loglite.o ${PLUTO_OBJS}
|
||||
|
||||
# Build charon-only objs
|
||||
OBJS+= invokecharon.o starterstroke.o
|
||||
|
||||
DISTSRC=$(OBJS:.o=.c)
|
||||
DISTSRC+=cmp.h confread.h confwrite.h exec.h files.h interfaces.h netkey.h
|
||||
DISTSRC+=parser.h args.h invokepluto.h starterwhack.h keywords.h keywords.txt
|
||||
|
||||
LIBS=$(FREESWANLIB)
|
||||
|
||||
PROGRAM=starter
|
||||
|
||||
include ../Makefile.program
|
||||
|
||||
all: starter
|
||||
|
||||
starter: $(OBJS) $(FREESWANLIB)
|
||||
$(LD) $(LDFLAGS) -o starter $(OBJS) $(LIBS)
|
||||
|
||||
lex.yy.c: parser.tab.c parser.l parser.y parser.h
|
||||
$(LEX) parser.l
|
||||
|
||||
parser.tab.c: parser.l parser.y parser.h
|
||||
$(BISON) -v -d parser.y
|
||||
|
||||
keywords.c: keywords.txt keywords.h
|
||||
$(GPERF) -C -G -t < keywords.txt > keywords.c
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) -c $<
|
||||
|
||||
loglite.o : $(OPENACDIR)/loglite.c $(PLUTODIR)/log.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
# pluto library
|
||||
|
||||
defs.o : $(PLUTODIR)/defs.c $(PLUTODIR)/defs.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
clean::
|
||||
$(RM) -f starter $(OBJS) parser.tab.* lex.yy.*
|
||||
|
||||
# Stolen from pluto/Makefile
|
||||
|
||||
gatherdeps:
|
||||
@ls | grep '\.c$$' | sed -e 's/\(.*\)\.c$$/\1.o: \1.c/'
|
||||
@echo
|
||||
@ls | grep '\.c$$' | xargs grep '^#[ ]*include[ ]*"' | \
|
||||
sed -e 's/\.c:#[ ]*include[ ]*"/.o: /' -e 's/".*//'
|
||||
|
||||
# Dependencies generated by "make gatherdeps":
|
||||
|
||||
aargs.o: args.c
|
||||
cmp.o: cmp.c
|
||||
confread.o: confread.c
|
||||
exec.o: exec.c
|
||||
interfaces.o: interfaces.c
|
||||
invokecharon.o: invokecharon.c
|
||||
invokepluto.o: invokepluto.c
|
||||
keywords.o: keywords.c
|
||||
lex.yy.o: lex.yy.c
|
||||
netkey.o: netkey.c
|
||||
parser.tab.o: parser.tab.c
|
||||
starter.o: starter.c
|
||||
starterstroke.o: starterstroke.c
|
||||
starterwhack.o: starterwhack.c
|
||||
|
||||
args.o: ../pluto/constants.h
|
||||
args.o: ../pluto/defs.h
|
||||
args.o: ../pluto/log.h
|
||||
args.o: keywords.h
|
||||
args.o: parser.h
|
||||
args.o: confread.h
|
||||
args.o: args.h
|
||||
cmp.o: ../pluto/constants.h
|
||||
cmp.o: ../pluto/defs.h
|
||||
cmp.o: confread.h
|
||||
cmp.o: args.h
|
||||
cmp.o: interfaces.h
|
||||
cmp.o: cmp.h
|
||||
confread.o: ../pluto/constants.h
|
||||
confread.o: ../pluto/defs.h
|
||||
confread.o: ../pluto/log.h
|
||||
confread.o: keywords.h
|
||||
confread.o: parser.h
|
||||
confread.o: confread.h
|
||||
confread.o: args.h
|
||||
confread.o: interfaces.h
|
||||
exec.o: ../pluto/constants.h
|
||||
exec.o: ../pluto/defs.h
|
||||
exec.o: ../pluto/log.h
|
||||
exec.o: exec.h
|
||||
interfaces.o: ../pluto/constants.h
|
||||
interfaces.o: ../pluto/defs.h
|
||||
interfaces.o: ../pluto/log.h
|
||||
interfaces.o: interfaces.h
|
||||
interfaces.o: exec.h
|
||||
interfaces.o: files.h
|
||||
invokecharon.o: ../pluto/constants.h
|
||||
invokecharon.o: ../pluto/defs.h
|
||||
invokecharon.o: ../pluto/log.h
|
||||
invokecharon.o: confread.h
|
||||
invokecharon.o: invokecharon.h
|
||||
invokecharon.o: files.h
|
||||
invokepluto.o: ../pluto/constants.h
|
||||
invokepluto.o: ../pluto/defs.h
|
||||
invokepluto.o: ../pluto/log.h
|
||||
invokepluto.o: confread.h
|
||||
invokepluto.o: invokepluto.h
|
||||
invokepluto.o: files.h
|
||||
invokepluto.o: starterwhack.h
|
||||
keywords.o: keywords.h
|
||||
lex.yy.o: parser.tab.h
|
||||
netkey.o: ../pluto/constants.h
|
||||
netkey.o: ../pluto/defs.h
|
||||
netkey.o: ../pluto/log.h
|
||||
netkey.o: files.h
|
||||
parser.tab.o: ../pluto/constants.h
|
||||
parser.tab.o: ../pluto/defs.h
|
||||
parser.tab.o: ../pluto/log.h
|
||||
parser.tab.o: parser.h
|
||||
starter.o: ../pluto/constants.h
|
||||
starter.o: ../pluto/defs.h
|
||||
starter.o: ../pluto/log.h
|
||||
starter.o: confread.h
|
||||
starter.o: files.h
|
||||
starter.o: starterwhack.h
|
||||
starter.o: invokepluto.h
|
||||
starter.o: invokecharon.h
|
||||
starter.o: netkey.h
|
||||
starter.o: cmp.h
|
||||
starter.o: interfaces.h
|
||||
starterstroke.o: ../pluto/constants.h
|
||||
starterstroke.o: ../pluto/defs.h
|
||||
starterstroke.o: ../pluto/log.h
|
||||
starterstroke.o: ../charon/stroke/stroke.h
|
||||
starterstroke.o: starterstroke.h
|
||||
starterstroke.o: confread.h
|
||||
starterstroke.o: files.h
|
||||
starterwhack.o: ../pluto/constants.h
|
||||
starterwhack.o: ../pluto/defs.h
|
||||
starterwhack.o: ../pluto/log.h
|
||||
starterwhack.o: ../pluto/whack.h
|
||||
starterwhack.o: starterwhack.h
|
||||
starterwhack.o: confread.h
|
||||
starterwhack.o: files.h
|
||||
@@ -0,0 +1,32 @@
|
||||
ipsec_PROGRAMS = starter
|
||||
starter_SOURCES = y.tab.c netkey.c y.tab.h parser.h args.h netkey.h \
|
||||
starterwhack.c starterwhack.h starterstroke.c invokepluto.c confread.c \
|
||||
starterstroke.h interfaces.c invokepluto.h confread.h interfaces.h args.c \
|
||||
keywords.c files.h keywords.h cmp.c starter.c cmp.h exec.c invokecharon.c \
|
||||
exec.h invokecharon.h lex.yy.c
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/src/libfreeswan -I$(top_srcdir)/src/pluto -I$(top_srcdir)/src/whack -I$(top_srcdir)/src/stroke
|
||||
AM_CFLAGS = -DIPSEC_DIR=\"${ipsecdir}\" -DIPSEC_CONFDIR=\"${confdir}\" -DIPSEC_PIDDIR=\"${piddir}\" -DDEBUG
|
||||
starter_LDADD = loglite.o defs.o $(top_srcdir)/src/libfreeswan/libfreeswan.a
|
||||
EXTRA_DIST = parser.l parser.y keywords.txt
|
||||
|
||||
PLUTODIR=$(top_srcdir)/src/pluto
|
||||
OPENACDIR=$(top_srcdir)/src/openac
|
||||
|
||||
# TODO: get gperf from ./configure
|
||||
GPERF=gperf
|
||||
|
||||
lex.yy.c: y.tab.c parser.l parser.y parser.h
|
||||
$(LEX) parser.l
|
||||
|
||||
y.tab.c: parser.l parser.y parser.h
|
||||
$(YACC) -v -d parser.y
|
||||
|
||||
keywords.c: keywords.txt keywords.h
|
||||
$(GPERF) -C -G -t < keywords.txt > keywords.c
|
||||
|
||||
loglite.o: $(OPENACDIR)/loglite.c $(PLUTODIR)/log.h
|
||||
$(CC) $(AM_CFLAGS) $(INCLUDES) -c -o $@ $<
|
||||
|
||||
defs.o: $(PLUTODIR)/defs.c $(PLUTODIR)/defs.h
|
||||
$(CC) $(AM_CFLAGS) $(INCLUDES) -c -o $@ $<
|
||||
@@ -71,9 +71,7 @@ struct starter_end {
|
||||
char *updown;
|
||||
u_int16_t port;
|
||||
u_int8_t protocol;
|
||||
#ifdef VIRTUAL_IP
|
||||
char *virt;
|
||||
#endif
|
||||
};
|
||||
|
||||
typedef struct also also_t;
|
||||
|
||||
+13
-23
@@ -17,36 +17,26 @@
|
||||
#ifndef _STARTER_FILES_H_
|
||||
#define _STARTER_FILES_H_
|
||||
|
||||
#ifndef DEFAULT_CTLBASE
|
||||
#define DEFAULT_CTLBASE "/var/run/pluto"
|
||||
#endif
|
||||
#define CTL_SUFFIX ".ctl"
|
||||
#define PID_SUFFIX ".pid"
|
||||
|
||||
#define MY_PID_FILE "/var/run/starter.pid"
|
||||
#define STARTER_PID_FILE IPSEC_PIDDIR "/starter.pid"
|
||||
|
||||
#define DEV_RANDOM "/dev/random"
|
||||
#define DEV_URANDOM "/dev/urandom"
|
||||
#define PROC_NETKEY "/proc/net/pfkey"
|
||||
#define PROC_MODULES "/proc/modules"
|
||||
|
||||
#define PROC_NETKEY "/proc/net/pfkey"
|
||||
#define PROC_IPSECVERSION "/proc/net/ipsec_version"
|
||||
#define PROC_SYSFLAGS "/proc/sys/net/ipsec"
|
||||
#define PROC_MODULES "/proc/modules"
|
||||
#define CONFIG_FILE IPSEC_CONFDIR "/ipsec.conf"
|
||||
#define SECRETS_FILE IPSEC_CONFDIR "/ipsec.secrets"
|
||||
|
||||
#define CONFIG_FILE IPSEC_CONFDIR"/ipsec.conf"
|
||||
#define SECRETS_FILE IPSEC_CONFDIR"/ipsec.secrets"
|
||||
#define PLUTO_CMD IPSEC_DIR "/pluto"
|
||||
#define PLUTO_CTL_FILE IPSEC_PIDDIR "/pluto.ctl"
|
||||
#define PLUTO_PID_FILE IPSEC_PIDDIR "/pluto.pid"
|
||||
|
||||
#define PLUTO_CMD IPSEC_EXECDIR"/pluto"
|
||||
#define PLUTO_CTL_FILE DEFAULT_CTLBASE CTL_SUFFIX
|
||||
#define PLUTO_PID_FILE DEFAULT_CTLBASE PID_SUFFIX
|
||||
#define CHARON_CMD IPSEC_DIR "/charon"
|
||||
#define CHARON_CTL_FILE IPSEC_PIDDIR "/charon.ctl"
|
||||
#define CHARON_PID_FILE IPSEC_PIDDIR "/charon.pid"
|
||||
|
||||
#define CHARON_CMD IPSEC_EXECDIR"/charon"
|
||||
#define CHARON_BASE "/var/run/charon"
|
||||
#define CHARON_CTL_FILE CHARON_BASE CTL_SUFFIX
|
||||
#define CHARON_PID_FILE CHARON_BASE PID_SUFFIX
|
||||
|
||||
#define DYNIP_DIR "/var/run/dynip"
|
||||
#define INFO_FILE "/var/run/ipsec.info"
|
||||
#define DYNIP_DIR IPSEC_PIDDIR "/dynip"
|
||||
#define INFO_FILE IPSEC_PIDDIR "/ipsec.info"
|
||||
|
||||
#endif /* _STARTER_FILES_H_ */
|
||||
|
||||
|
||||
@@ -23,11 +23,11 @@
|
||||
#include <errno.h>
|
||||
|
||||
#include <freeswan.h>
|
||||
#include <freeswan/ipsec_tunnel.h>
|
||||
#include <ipsec_tunnel.h>
|
||||
|
||||
#include "../pluto/constants.h"
|
||||
#include "../pluto/defs.h"
|
||||
#include "../pluto/log.h"
|
||||
#include <constants.h>
|
||||
#include <defs.h>
|
||||
#include <log.h>
|
||||
|
||||
#include "interfaces.h"
|
||||
#include "exec.h"
|
||||
|
||||
@@ -504,7 +504,7 @@ char *yytext;
|
||||
#include <stdlib.h>
|
||||
#include <glob.h>
|
||||
|
||||
#include "parser.tab.h"
|
||||
#include "y.tab.h"
|
||||
|
||||
#define MAX_INCLUDE_DEPTH 20
|
||||
|
||||
@@ -928,7 +928,7 @@ return INCLUDE;
|
||||
case 10:
|
||||
YY_RULE_SETUP
|
||||
#line 169 "parser.l"
|
||||
return VERSION;
|
||||
return FILE_VERSION;
|
||||
YY_BREAK
|
||||
case 11:
|
||||
YY_RULE_SETUP
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <glob.h>
|
||||
|
||||
#include "parser.tab.h"
|
||||
#include "y.tab.h"
|
||||
|
||||
#define MAX_INCLUDE_DEPTH 20
|
||||
|
||||
@@ -166,7 +166,7 @@ setup return SETUP;
|
||||
conn return CONN;
|
||||
ca return CA;
|
||||
include return INCLUDE;
|
||||
version return VERSION;
|
||||
version return FILE_VERSION;
|
||||
|
||||
[^\"= \t\n]+ {
|
||||
yylval.s = strdup(yytext);
|
||||
|
||||
@@ -54,7 +54,7 @@ extern kw_entry_t *in_word_set (char *str, unsigned int len);
|
||||
%}
|
||||
|
||||
%union { char *s; };
|
||||
%token EQUAL FIRST_SPACES EOL CONFIG SETUP CONN CA INCLUDE VERSION
|
||||
%token EQUAL FIRST_SPACES EOL CONFIG SETUP CONN CA INCLUDE FILE_VERSION
|
||||
%token <s> STRING
|
||||
|
||||
%%
|
||||
@@ -69,7 +69,7 @@ config_file:
|
||||
;
|
||||
|
||||
section_or_include:
|
||||
VERSION STRING EOL
|
||||
FILE_VERSION STRING EOL
|
||||
{
|
||||
free($2);
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ int main (int argc, char **argv)
|
||||
signal(SIGALRM, fsig);
|
||||
signal(SIGUSR1, fsig);
|
||||
|
||||
plog("Starting strongSwan IPsec %s [starter]...", ipsec_version_code());
|
||||
plog("Starting strongSwan %s IPsec [starter]...", ipsec_version_code());
|
||||
|
||||
/* verify that we can start */
|
||||
if (getuid() != 0)
|
||||
@@ -253,9 +253,9 @@ int main (int argc, char **argv)
|
||||
|
||||
last_reload = time(NULL);
|
||||
|
||||
if (stat(MY_PID_FILE, &stb) == 0)
|
||||
if (stat(STARTER_PID_FILE, &stb) == 0)
|
||||
{
|
||||
plog("starter is already running (%s exists) -- no fork done", MY_PID_FILE);
|
||||
plog("starter is already running (%s exists) -- no fork done", STARTER_PID_FILE);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@@ -289,7 +289,7 @@ int main (int argc, char **argv)
|
||||
|
||||
/* save pid file in /var/run/starter.pid */
|
||||
{
|
||||
FILE *fd = fopen(MY_PID_FILE, "w");
|
||||
FILE *fd = fopen(STARTER_PID_FILE, "w");
|
||||
|
||||
if (fd)
|
||||
{
|
||||
@@ -311,7 +311,7 @@ int main (int argc, char **argv)
|
||||
starter_stop_charon();
|
||||
starter_netkey_cleanup();
|
||||
confread_free(cfg);
|
||||
unlink(MY_PID_FILE);
|
||||
unlink(STARTER_PID_FILE);
|
||||
unlink(INFO_FILE);
|
||||
#ifdef LEAK_DETECTIVE
|
||||
report_leaks();
|
||||
|
||||
@@ -26,11 +26,11 @@
|
||||
|
||||
#include <freeswan.h>
|
||||
|
||||
#include "../pluto/constants.h"
|
||||
#include "../pluto/defs.h"
|
||||
#include "../pluto/log.h"
|
||||
#include <constants.h>
|
||||
#include <defs.h>
|
||||
#include <log.h>
|
||||
|
||||
#include "../charon/stroke/stroke.h"
|
||||
#include <stroke.h>
|
||||
|
||||
#include "starterstroke.h"
|
||||
#include "confread.h"
|
||||
@@ -92,7 +92,7 @@ send_stroke_msg (stroke_msg_t *msg)
|
||||
}
|
||||
if (byte_count < 0)
|
||||
{
|
||||
plog(stderr, "read() failed: %s", strerror(errno));
|
||||
plog("read() failed: %s", strerror(errno));
|
||||
}
|
||||
|
||||
close(sock);
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
|
||||
#include <freeswan.h>
|
||||
|
||||
#include "../pluto/constants.h"
|
||||
#include "../pluto/defs.h"
|
||||
#include "../pluto/log.h"
|
||||
#include "../pluto/whack.h"
|
||||
#include <constants.h>
|
||||
#include <defs.h>
|
||||
#include <log.h>
|
||||
#include <whack.h>
|
||||
|
||||
#include "starterwhack.h"
|
||||
#include "confread.h"
|
||||
@@ -69,17 +69,13 @@ send_whack_msg (whack_message_t *msg)
|
||||
|| !pack_str(&msg->left.ca, &str_next, &str_roof)
|
||||
|| !pack_str(&msg->left.groups, &str_next, &str_roof)
|
||||
|| !pack_str(&msg->left.updown, &str_next, &str_roof)
|
||||
#ifdef VIRTUAL_IP
|
||||
|| !pack_str(&msg->left.virt, &str_next, &str_roof)
|
||||
#endif
|
||||
|| !pack_str(&msg->right.id, &str_next, &str_roof)
|
||||
|| !pack_str(&msg->right.cert, &str_next, &str_roof)
|
||||
|| !pack_str(&msg->right.ca, &str_next, &str_roof)
|
||||
|| !pack_str(&msg->right.groups, &str_next, &str_roof)
|
||||
|| !pack_str(&msg->right.updown, &str_next, &str_roof)
|
||||
#ifdef VIRTUAL_IP
|
||||
|| !pack_str(&msg->right.virt, &str_next, &str_roof)
|
||||
#endif
|
||||
|| !pack_str(&msg->keyid, &str_next, &str_roof)
|
||||
|| !pack_str(&msg->myid, &str_next, &str_roof)
|
||||
|| !pack_str(&msg->cacert, &str_next, &str_roof)
|
||||
|
||||
@@ -5,7 +5,7 @@ Grammar
|
||||
1 config_file: config_file section_or_include
|
||||
2 | /* empty */
|
||||
|
||||
3 section_or_include: VERSION STRING EOL
|
||||
3 section_or_include: FILE_VERSION STRING EOL
|
||||
|
||||
4 @1: /* empty */
|
||||
|
||||
@@ -44,7 +44,7 @@ SETUP (262) 5
|
||||
CONN (263) 7
|
||||
CA (264) 9
|
||||
INCLUDE (265) 11
|
||||
VERSION (266) 3
|
||||
FILE_VERSION (266) 3
|
||||
STRING (267) 3 7 9 11 15 16
|
||||
|
||||
|
||||
@@ -84,13 +84,13 @@ state 1
|
||||
0 $accept: config_file . $end
|
||||
1 config_file: config_file . section_or_include
|
||||
|
||||
$end shift, and go to state 2
|
||||
EOL shift, and go to state 3
|
||||
CONFIG shift, and go to state 4
|
||||
CONN shift, and go to state 5
|
||||
CA shift, and go to state 6
|
||||
INCLUDE shift, and go to state 7
|
||||
VERSION shift, and go to state 8
|
||||
$end shift, and go to state 2
|
||||
EOL shift, and go to state 3
|
||||
CONFIG shift, and go to state 4
|
||||
CONN shift, and go to state 5
|
||||
CA shift, and go to state 6
|
||||
INCLUDE shift, and go to state 7
|
||||
FILE_VERSION shift, and go to state 8
|
||||
|
||||
section_or_include go to state 9
|
||||
|
||||
@@ -139,7 +139,7 @@ state 7
|
||||
|
||||
state 8
|
||||
|
||||
3 section_or_include: VERSION . STRING EOL
|
||||
3 section_or_include: FILE_VERSION . STRING EOL
|
||||
|
||||
STRING shift, and go to state 14
|
||||
|
||||
@@ -183,7 +183,7 @@ state 13
|
||||
|
||||
state 14
|
||||
|
||||
3 section_or_include: VERSION STRING . EOL
|
||||
3 section_or_include: FILE_VERSION STRING . EOL
|
||||
|
||||
EOL shift, and go to state 19
|
||||
|
||||
@@ -224,7 +224,7 @@ state 18
|
||||
|
||||
state 19
|
||||
|
||||
3 section_or_include: VERSION STRING EOL .
|
||||
3 section_or_include: FILE_VERSION STRING EOL .
|
||||
|
||||
$default reduce using rule 3 (section_or_include)
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
CONN = 263,
|
||||
CA = 264,
|
||||
INCLUDE = 265,
|
||||
VERSION = 266,
|
||||
FILE_VERSION = 266,
|
||||
STRING = 267
|
||||
};
|
||||
#endif
|
||||
@@ -77,7 +77,7 @@
|
||||
#define CONN 263
|
||||
#define CA 264
|
||||
#define INCLUDE 265
|
||||
#define VERSION 266
|
||||
#define FILE_VERSION 266
|
||||
#define STRING 267
|
||||
|
||||
|
||||
@@ -162,7 +162,7 @@ extern kw_entry_t *in_word_set (char *str, unsigned int len);
|
||||
#line 56 "parser.y"
|
||||
typedef union YYSTYPE { char *s; } YYSTYPE;
|
||||
/* Line 196 of yacc.c. */
|
||||
#line 166 "parser.tab.c"
|
||||
#line 166 "y.tab.c"
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
@@ -174,7 +174,7 @@ typedef union YYSTYPE { char *s; } YYSTYPE;
|
||||
|
||||
|
||||
/* Line 219 of yacc.c. */
|
||||
#line 178 "parser.tab.c"
|
||||
#line 178 "y.tab.c"
|
||||
|
||||
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
|
||||
# define YYSIZE_T __SIZE_TYPE__
|
||||
@@ -409,7 +409,7 @@ static const unsigned char yyrline[] =
|
||||
static const char *const yytname[] =
|
||||
{
|
||||
"$end", "error", "$undefined", "EQUAL", "FIRST_SPACES", "EOL", "CONFIG",
|
||||
"SETUP", "CONN", "CA", "INCLUDE", "VERSION", "STRING", "$accept",
|
||||
"SETUP", "CONN", "CA", "INCLUDE", "FILE_VERSION", "STRING", "$accept",
|
||||
"config_file", "section_or_include", "@1", "@2", "@3", "@4",
|
||||
"kw_section", "statement_kw", 0
|
||||
};
|
||||
@@ -1172,7 +1172,7 @@ yyreduce:
|
||||
#line 73 "parser.y"
|
||||
{
|
||||
free((yyvsp[-1].s));
|
||||
;}
|
||||
}
|
||||
break;
|
||||
|
||||
case 5:
|
||||
@@ -1180,7 +1180,7 @@ yyreduce:
|
||||
{
|
||||
_parser_kw = &(_parser_cfg->config_setup);
|
||||
_parser_kw_last = NULL;
|
||||
;}
|
||||
}
|
||||
break;
|
||||
|
||||
case 7:
|
||||
@@ -1200,7 +1200,7 @@ yyreduce:
|
||||
_parser_cfg->conn_last = section;
|
||||
_parser_kw_last = NULL;
|
||||
free((yyvsp[-1].s));
|
||||
;}
|
||||
}
|
||||
break;
|
||||
|
||||
case 9:
|
||||
@@ -1219,7 +1219,7 @@ yyreduce:
|
||||
_parser_cfg->ca_last = section;
|
||||
_parser_kw_last = NULL;
|
||||
free((yyvsp[-1].s));
|
||||
;}
|
||||
}
|
||||
break;
|
||||
|
||||
case 11:
|
||||
@@ -1228,7 +1228,7 @@ yyreduce:
|
||||
extern void _parser_y_include (const char *f);
|
||||
_parser_y_include((yyvsp[0].s));
|
||||
free((yyvsp[0].s));
|
||||
;}
|
||||
}
|
||||
break;
|
||||
|
||||
case 16:
|
||||
@@ -1256,14 +1256,14 @@ yyreduce:
|
||||
}
|
||||
free((yyvsp[-2].s));
|
||||
free((yyvsp[0].s));
|
||||
;}
|
||||
}
|
||||
break;
|
||||
|
||||
case 17:
|
||||
#line 155 "parser.y"
|
||||
{
|
||||
free((yyvsp[-1].s));
|
||||
;}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -1271,7 +1271,7 @@ yyreduce:
|
||||
}
|
||||
|
||||
/* Line 1126 of yacc.c. */
|
||||
#line 1275 "parser.tab.c"
|
||||
#line 1275 "y.tab.c"
|
||||
|
||||
yyvsp -= yylen;
|
||||
yyssp -= yylen;
|
||||
@@ -37,7 +37,7 @@
|
||||
CONN = 263,
|
||||
CA = 264,
|
||||
INCLUDE = 265,
|
||||
VERSION = 266,
|
||||
FILE_VERSION = 266,
|
||||
STRING = 267
|
||||
};
|
||||
#endif
|
||||
@@ -50,7 +50,7 @@
|
||||
#define CONN 263
|
||||
#define CA 264
|
||||
#define INCLUDE 265
|
||||
#define VERSION 266
|
||||
#define FILE_VERSION 266
|
||||
#define STRING 267
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
#line 56 "parser.y"
|
||||
typedef union YYSTYPE { char *s; } YYSTYPE;
|
||||
/* Line 1447 of yacc.c. */
|
||||
#line 64 "parser.tab.h"
|
||||
#line 64 "y.tab.h"
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
Reference in New Issue
Block a user