examples/ip_pipeline: rework firewall CLI
authorDaniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Wed, 8 Jun 2016 10:35:21 +0000 (12:35 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 8 Jun 2016 14:45:05 +0000 (16:45 +0200)
commit0c1f2c4a0b09d9690f43180d16effb7cc3d5821d
treebf0b4b8230180a105bfb2034bf38e39f7069308a
parent113f8d4a6c7a321ef90cb1e46b77ea6c11149d1e
examples/ip_pipeline: rework firewall CLI

Each command are merged into one: cmd_firewall_parsed.
ADD command format is changed:
p <pipeline ID> firewall add priority <priority> ipv4 <sipaddr>
<sipdepth> <dipaddr> <dipdepth> <sport0> <sport1> <dport0> <dport1>
<proto> <protomask> port <port ID>

and bulk command was modified:
1. firewall add bulk
File line format:
priority <priority> ipv4 <sipaddr> <sipdepth> <dipaddr> <dipdepth>
<sport0> <sport1> <dport0> <dport1> <proto> <protomask> port <port ID>
(protomask is a hex value)
File line example:
priority 0 ipv4 1.2.3.0 24 10.20.30.40 32 0 63 64 127 6 0xF port 3

2. firewall del bulk
File line format:
ipv4 <sipaddr> <sipdepth> <dipaddr> <dipdepth> <sport0> <sport1>
<dport0> <dport1> <proto> <protomask>
File line example:
ipv4 1.2.3.0 24 10.20.30.40 32 0 63 64 127 6 0xF

Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
examples/ip_pipeline/config/firewall.cfg [new file with mode: 0644]
examples/ip_pipeline/config/firewall.sh [new file with mode: 0644]
examples/ip_pipeline/config/firewall.txt [new file with mode: 0644]
examples/ip_pipeline/pipeline/pipeline_firewall.c
examples/ip_pipeline/pipeline/pipeline_firewall.h