starter: Add new bison/flex based parser for ipsec.conf
The parser simply returns key/value pairs of all sections, it already resolves also= and allows overriding options in all included sections (not only %default), options set in included section can also be cleared again (key=). It provides other improvements too, like quoted strings (with escape sequences), unlimited includes and better whitespace/comment handling.
This commit is contained in:
@@ -3,11 +3,12 @@ include $(CLEAR_VARS)
|
||||
|
||||
# copy-n-paste from Makefile.am (update for LEX/YACC)
|
||||
starter_SOURCES := \
|
||||
parser.c lexer.c ipsec-parser.h netkey.c args.h netkey.h \
|
||||
starterstroke.c confread.c \
|
||||
starterstroke.h confread.h args.c \
|
||||
keywords.c files.h keywords.h cmp.c starter.c cmp.h invokecharon.c \
|
||||
invokecharon.h klips.c klips.h
|
||||
starter.c files.h \
|
||||
parser/parser.c parser/lexer.c parser/conf_parser.c parser/conf_parser.h \
|
||||
parser.c lexer.c ipsec-parser.h args.c args.h \
|
||||
confread.c confread.h keywords.c keywords.h cmp.c cmp.h \
|
||||
invokecharon.c invokecharon.h starterstroke.c starterstroke.h \
|
||||
netkey.c netkey.h klips.c klips.h
|
||||
|
||||
LOCAL_SRC_FILES := $(filter %.c,$(starter_SOURCES))
|
||||
|
||||
@@ -16,6 +17,7 @@ LOCAL_SRC_FILES := $(filter %.c,$(starter_SOURCES))
|
||||
LOCAL_C_INCLUDES += \
|
||||
$(strongswan_PATH)/src/libhydra \
|
||||
$(strongswan_PATH)/src/libstrongswan \
|
||||
$(strongswan_PATH)/src/starter \
|
||||
$(strongswan_PATH)/src/stroke
|
||||
|
||||
LOCAL_CFLAGS := $(strongswan_CFLAGS) -DSTART_CHARON \
|
||||
|
||||
Reference in New Issue
Block a user