examples/ipsec-secgw: support configuration file
authorFan Zhang <roy.fan.zhang@intel.com>
Wed, 21 Sep 2016 12:05:18 +0000 (13:05 +0100)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Tue, 4 Oct 2016 18:41:09 +0000 (20:41 +0200)
commit0d547ed0371780b41f46d300be5bc3812101be51
tree1ab95732df6be1de3fdd84c40b289d077613193a
parent77debbbfdf18e314ce9c0286fe10e3998f27b1d9
examples/ipsec-secgw: support configuration file

This patch adds the configuration file support to ipsec_secgw
sample application. Instead of hard-coded rules, the users can
specify their own SP, SA, and routing rules in the configuration
file. A command line option "-f" is added to pass the
configuration file location to the application.

Configuration item formats:

SP rule format:
sp <ip_ver> <dir> esp <action> <priority> <src_ip> <dst_ip> \
<proto> <sport> <dport>

SA rule format:
sa <dir> <spi> <cipher_algo> <cipher_key> <auth_algo> <auth_key> \
<mode> <src_ip> <dst_ip>

Routing rule format:
rt <ip_ver> <src_ip> <dst_ip> <port>

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
doc/guides/rel_notes/release_16_11.rst
doc/guides/sample_app_ug/ipsec_secgw.rst
examples/ipsec-secgw/Makefile
examples/ipsec-secgw/ipsec-secgw.c
examples/ipsec-secgw/ipsec.h
examples/ipsec-secgw/parser.c [new file with mode: 0644]
examples/ipsec-secgw/parser.h [new file with mode: 0644]
examples/ipsec-secgw/rt.c
examples/ipsec-secgw/sa.c
examples/ipsec-secgw/sp4.c
examples/ipsec-secgw/sp6.c