diff options
author | Matias Elo <matias.elo@nokia.com> | 2021-07-08 09:07:13 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-08 09:07:13 +0300 |
commit | 6c7ac017886e2f1f63a27871254326d7cd1b48d1 (patch) | |
tree | a89fd543bacd9483642ebc27517ff59577ba55ad /example/ipsec_api/odp_ipsec_api_run_esp_tun_in.sh | |
parent | 3a7a24023021f5959dd2f00fe83cf2635bf25c2d (diff) | |
parent | 75b2e7ed219c2f087b7068c4e8b708d475c9026a (diff) |
Merge ODP v1.30.0.0v1.30.0.0_DPDK_19.11
Merge ODP linux-generic v1.30.0.0 into ODP-DPDK.
Diffstat (limited to 'example/ipsec_api/odp_ipsec_api_run_esp_tun_in.sh')
-rwxr-xr-x | example/ipsec_api/odp_ipsec_api_run_esp_tun_in.sh | 42 |
1 files changed, 34 insertions, 8 deletions
diff --git a/example/ipsec_api/odp_ipsec_api_run_esp_tun_in.sh b/example/ipsec_api/odp_ipsec_api_run_esp_tun_in.sh index 42be4559f..3b4f91e41 100755 --- a/example/ipsec_api/odp_ipsec_api_run_esp_tun_in.sh +++ b/example/ipsec_api/odp_ipsec_api_run_esp_tun_in.sh @@ -4,11 +4,37 @@ # - 2 loop interfaces # - 10 packets # - Specify API mode on command line -./odp_ipsec_api -i loop1,loop2 \ --r 192.168.111.2/32,loop1,08:00:27:76:B5:E0 \ --p 192.168.222.0/24,192.168.111.0/24,in,esp \ --e 192.168.222.2,192.168.111.2,\ -3des,301,c966199f24d095f3990a320d749056401e82b26570320292 \ --t 192.168.222.2,192.168.111.2,10.0.222.2,10.0.111.2 \ --s 192.168.222.2,192.168.111.2,loop2,loop1,10,100 \ --c 2 "$@" + +# IPSEC_APP_MODE: 0 - STANDALONE, 1 - LIVE, 2 - ROUTER +IPSEC_APP_MODE=0 + +if [ -f ./pktio_env ]; then + . ./pktio_env +else + echo "BUG: unable to find pktio_env!" + echo "pktio_env has to be in current directory" + exit 1 +fi + +setup_interfaces + +./odp_ipsec_api -i $IF_LIST \ + -r 192.168.111.2/32,$ROUTE_IF_INB,08:00:27:76:B5:E0 \ + -p 192.168.222.0/24,192.168.111.0/24,in,esp \ + -e 192.168.222.2,192.168.111.2,3des,301,c966199f24d095f3990a320d749056401e82b26570320292 \ + -t 192.168.222.2,192.168.111.2,10.0.222.2,10.0.111.2 \ + -s 192.168.222.2,192.168.111.2,$OUT_IF,$IN_IF,10,100 \ + -c 2 "$@" + +STATUS=$? + +if [ ${STATUS} -ne 0 ]; then + echo "Error: status ${STATUS}" + exit 1 +fi + +validate_result + +cleanup_interfaces + +exit 0 |