diff options
author | Aakash Sasidharan <asasidharan@marvell.com> | 2021-01-06 02:44:46 +0000 |
---|---|---|
committer | Petri Savolainen <petri.savolainen@nokia.com> | 2021-02-04 14:54:44 +0200 |
commit | afd39af41057246799275caa90d92f3a564670e8 (patch) | |
tree | 93bff734d3a7bca9288ec2e8daca0caccbcb1547 /example/ipsec_crypto | |
parent | 2010f8f62a58d032c3f1ec3987200e5101284eb1 (diff) |
example: ipsec: use comma as separator in args
As part of -i option, interface name could be in PCI Domain Bus
Device Function (DBDF) format to represent the device. Application
will throw error during argument parsing as DBDF format itself
contains colon(:). So updating parsing logic to use comma(,) as a
separator instead of colon(:).
Also updating MAC address representation to use colons as colon
is no longer reserved for field separation.
Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
Diffstat (limited to 'example/ipsec_crypto')
20 files changed, 80 insertions, 80 deletions
diff --git a/example/ipsec_crypto/README b/example/ipsec_crypto/README index 9a3fdc4b9..8e66372b5 100644 --- a/example/ipsec_crypto/README +++ b/example/ipsec_crypto/README @@ -78,14 +78,14 @@ VM1 has the following interface configurations: The application is launched on VM1 with the following command: sudo ./odp_ipsec_crypto -i p7p1,p8p1 \ - -r 192.168.111.2/32:p7p1:08.00.27.76.B5.E0 \ - -r 192.168.222.2/32:p8p1:08.00.27.F5.8B.DB \ - -p 192.168.111.0/24:192.168.222.0/24:out:both \ - -e 192.168.111.2:192.168.222.2:3des:201:656c8523255ccc23a66c1917aa0cf30991fce83532a4b224 \ - -a 192.168.111.2:192.168.222.2:md5:200:a731649644c5dee92cbd9c2e7e188ee6 \ - -p 192.168.222.0/24:192.168.111.0/24:in:both \ - -e 192.168.222.2:192.168.111.2:3des:301:c966199f24d095f3990a320d749056401e82b26570320292 \ - -a 192.168.222.2:192.168.111.2:md5:300:27f6d123d7077b361662fc6e451f65d8 \ + -r 192.168.111.2/32,p7p1,08:00:27:76:B5:E0 \ + -r 192.168.222.2/32,p8p1,08:00:27:F5:8B:DB \ + -p 192.168.111.0/24,192.168.222.0/24,out,both \ + -e 192.168.111.2,192.168.222.2,3des,201,656c8523255ccc23a66c1917aa0cf30991fce83532a4b224 \ + -a 192.168.111.2,192.168.222.2,md5,200,a731649644c5dee92cbd9c2e7e188ee6 \ + -p 192.168.222.0/24,192.168.111.0/24,in,both \ + -e 192.168.222.2,192.168.111.2,3des,301,c966199f24d095f3990a320d749056401e82b26570320292 \ + -a 192.168.222.2,192.168.111.2,md5,300,27f6d123d7077b361662fc6e451f65d8 \ -c 2 -m 0 4.3 VM2 configuration diff --git a/example/ipsec_crypto/odp_ipsec.c b/example/ipsec_crypto/odp_ipsec.c index c4f34cbfa..bc70f643c 100644 --- a/example/ipsec_crypto/odp_ipsec.c +++ b/example/ipsec_crypto/odp_ipsec.c @@ -1627,26 +1627,26 @@ static void usage(char *progname) " Default: 0: SYNC api mode\n" "\n" "Routing / IPSec OPTIONS:\n" - " -r, --route SubNet:Intf:NextHopMAC\n" - " -p, --policy SrcSubNet:DstSubNet:(in|out):(ah|esp|both)\n" - " -e, --esp SrcIP:DstIP:(3des|null):SPI:Key192\n" - " -a, --ah SrcIP:DstIP:(sha256|md5|null):SPI:Key(256|128)\n" + " -r, --route SubNet,Intf,NextHopMAC\n" + " -p, --policy SrcSubNet,DstSubNet,(in|out),(ah|esp|both)\n" + " -e, --esp SrcIP,DstIP,(3des|null),SPI,Key192\n" + " -a, --ah SrcIP,DstIP,(sha256|md5|null),SPI,Key(256|128)\n" "\n" - " Where: NextHopMAC is raw hex/dot notation, i.e. 03.BA.44.9A.CE.02\n" + " Where: NextHopMAC is raw hex/colon notation, i.e. 03:BA;44:9A:CE:02\n" " IP is decimal/dot notation, i.e. 192.168.1.1\n" " SubNet is decimal/dot/slash notation, i.e 192.168.0.0/16\n" " SPI is raw hex, 32 bits\n" " KeyXXX is raw hex, XXX bits long\n" "\n" " Examples:\n" - " -r 192.168.222.0/24:p8p1:08.00.27.F5.8B.DB\n" - " -p 192.168.111.0/24:192.168.222.0/24:out:esp\n" - " -e 192.168.111.2:192.168.222.2:3des:201:656c8523255ccc23a66c1917aa0cf30991fce83532a4b224\n" - " -a 192.168.111.2:192.168.222.2:md5:201:a731649644c5dee92cbd9c2e7e188ee6\n" + " -r 192.168.222.0/24,p8p1,08:00:27:F5:8B:DB\n" + " -p 192.168.111.0/24,192.168.222.0/24,out,esp\n" + " -e 192.168.111.2,192.168.222.2,3des,201,656c8523255ccc23a66c1917aa0cf30991fce83532a4b224\n" + " -a 192.168.111.2,192.168.222.2,md5,201,a731649644c5dee92cbd9c2e7e188ee6\n" "\n" "Optional OPTIONS\n" " -c, --count <number> CPU count, 0=all available, default=1\n" - " -s, --stream SrcIP:DstIP:InIntf:OutIntf:Count:Length\n" + " -s, --stream SrcIP,DstIP,InIntf,OutIntf,Count,Length\n" " -h, --help Display help and exit.\n" " environment variables: ODP_IPSEC_USE_POLL_QUEUES\n" " to enable use of poll queues instead of scheduled (default)\n" diff --git a/example/ipsec_crypto/odp_ipsec_crypto_run_ah_in.sh b/example/ipsec_crypto/odp_ipsec_crypto_run_ah_in.sh index 18045c7e9..b64fd7d2d 100755 --- a/example/ipsec_crypto/odp_ipsec_crypto_run_ah_in.sh +++ b/example/ipsec_crypto/odp_ipsec_crypto_run_ah_in.sh @@ -5,8 +5,8 @@ # - 10 packets # - Specify API mode on command line ./odp_ipsec_crypto -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:ah \ --a 192.168.222.2:192.168.111.2:md5:300:27f6d123d7077b361662fc6e451f65d8 \ --s 192.168.222.2:192.168.111.2:loop2:loop1:10:100 \ +-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,ah \ +-a 192.168.222.2,192.168.111.2,md5,300,27f6d123d7077b361662fc6e451f65d8 \ +-s 192.168.222.2,192.168.111.2,loop2,loop1,10,100 \ -c 2 -m $1 diff --git a/example/ipsec_crypto/odp_ipsec_crypto_run_ah_out.sh b/example/ipsec_crypto/odp_ipsec_crypto_run_ah_out.sh index 8ddfd203d..0ff42289c 100755 --- a/example/ipsec_crypto/odp_ipsec_crypto_run_ah_out.sh +++ b/example/ipsec_crypto/odp_ipsec_crypto_run_ah_out.sh @@ -5,8 +5,8 @@ # - 10 packets # - Specify API mode on command line ./odp_ipsec_crypto -i loop1,loop2 \ --r 192.168.222.2/32:loop2:08.00.27.F5.8B.DB \ --p 192.168.111.0/24:192.168.222.0/24:out:ah \ --a 192.168.111.2:192.168.222.2:md5:200:a731649644c5dee92cbd9c2e7e188ee6 \ --s 192.168.111.2:192.168.222.2:loop1:loop2:10:100 \ +-r 192.168.222.2/32,loop2,08:00:27:F5:8B:DB \ +-p 192.168.111.0/24,192.168.222.0/24,out,ah \ +-a 192.168.111.2,192.168.222.2,md5,200,a731649644c5dee92cbd9c2e7e188ee6 \ +-s 192.168.111.2,192.168.222.2,loop1,loop2,10,100 \ -c 2 -m $1 diff --git a/example/ipsec_crypto/odp_ipsec_crypto_run_both_in.sh b/example/ipsec_crypto/odp_ipsec_crypto_run_both_in.sh index 4ad08a784..a986b713e 100755 --- a/example/ipsec_crypto/odp_ipsec_crypto_run_both_in.sh +++ b/example/ipsec_crypto/odp_ipsec_crypto_run_both_in.sh @@ -5,10 +5,10 @@ # - 10 packets # - Specify API mode on command line ./odp_ipsec_crypto -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:both \ --a 192.168.222.2:192.168.111.2:md5:300:27f6d123d7077b361662fc6e451f65d8 \ --e 192.168.222.2:192.168.111.2:\ -3des:301:c966199f24d095f3990a320d749056401e82b26570320292 \ --s 192.168.222.2:192.168.111.2:loop2:loop1:10:100 \ +-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,both \ +-a 192.168.222.2,192.168.111.2,md5,300,27f6d123d7077b361662fc6e451f65d8 \ +-e 192.168.222.2,192.168.111.2,\ +3des,301,c966199f24d095f3990a320d749056401e82b26570320292 \ +-s 192.168.222.2,192.168.111.2,loop2,loop1,10,100 \ -c 2 -m $1 diff --git a/example/ipsec_crypto/odp_ipsec_crypto_run_both_out.sh b/example/ipsec_crypto/odp_ipsec_crypto_run_both_out.sh index a9e3ac8af..ebbcde071 100755 --- a/example/ipsec_crypto/odp_ipsec_crypto_run_both_out.sh +++ b/example/ipsec_crypto/odp_ipsec_crypto_run_both_out.sh @@ -5,10 +5,10 @@ # - 10 packets # - Specify API mode on command line ./odp_ipsec_crypto -i loop1,loop2 \ --r 192.168.222.2/32:loop2:08.00.27.F5.8B.DB \ --p 192.168.111.0/24:192.168.222.0/24:out:both \ --e 192.168.111.2:192.168.222.2:\ -3des:201:656c8523255ccc23a66c1917aa0cf30991fce83532a4b224 \ --a 192.168.111.2:192.168.222.2:md5:200:a731649644c5dee92cbd9c2e7e188ee6 \ --s 192.168.111.2:192.168.222.2:loop1:loop2:10:100 \ +-r 192.168.222.2/32,loop2,08:00:27:F5:8B:DB \ +-p 192.168.111.0/24,192.168.222.0/24,out,both \ +-e 192.168.111.2,192.168.222.2,\ +3des,201,656c8523255ccc23a66c1917aa0cf30991fce83532a4b224 \ +-a 192.168.111.2,192.168.222.2,md5,200,a731649644c5dee92cbd9c2e7e188ee6 \ +-s 192.168.111.2,192.168.222.2,loop1,loop2,10,100 \ -c 2 -m $1 diff --git a/example/ipsec_crypto/odp_ipsec_crypto_run_esp_in.sh b/example/ipsec_crypto/odp_ipsec_crypto_run_esp_in.sh index 62f73cf7d..cdf84c517 100755 --- a/example/ipsec_crypto/odp_ipsec_crypto_run_esp_in.sh +++ b/example/ipsec_crypto/odp_ipsec_crypto_run_esp_in.sh @@ -5,9 +5,9 @@ # - 10 packets # - Specify API mode on command line ./odp_ipsec_crypto -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 \ --s 192.168.222.2:192.168.111.2:loop2:loop1:10:100 \ +-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 \ +-s 192.168.222.2,192.168.111.2,loop2,loop1,10,100 \ -c 2 -m $1 diff --git a/example/ipsec_crypto/odp_ipsec_crypto_run_esp_out.sh b/example/ipsec_crypto/odp_ipsec_crypto_run_esp_out.sh index cd9db1e2a..ae257be4f 100755 --- a/example/ipsec_crypto/odp_ipsec_crypto_run_esp_out.sh +++ b/example/ipsec_crypto/odp_ipsec_crypto_run_esp_out.sh @@ -10,9 +10,9 @@ IPSEC_EXAMPLE_PATH=. fi ${IPSEC_EXAMPLE_PATH}/odp_ipsec_crypto -i loop1,loop2 \ --r 192.168.222.2/32:loop2:08.00.27.F5.8B.DB \ --p 192.168.111.0/24:192.168.222.0/24:out:esp \ --e 192.168.111.2:192.168.222.2:\ -3des:201:656c8523255ccc23a66c1917aa0cf30991fce83532a4b224 \ --s 192.168.111.2:192.168.222.2:loop1:loop2:10:100 \ +-r 192.168.222.2/32,loop2,08:00:27:F5:8B:DB \ +-p 192.168.111.0/24,192.168.222.0/24,out,esp \ +-e 192.168.111.2,192.168.222.2,\ +3des,201,656c8523255ccc23a66c1917aa0cf30991fce83532a4b224 \ +-s 192.168.111.2,192.168.222.2,loop1,loop2,10,100 \ -c 2 "$@" diff --git a/example/ipsec_crypto/odp_ipsec_crypto_run_live.sh b/example/ipsec_crypto/odp_ipsec_crypto_run_live.sh index e893674bc..c212097e0 100755 --- a/example/ipsec_crypto/odp_ipsec_crypto_run_live.sh +++ b/example/ipsec_crypto/odp_ipsec_crypto_run_live.sh @@ -4,14 +4,14 @@ # - 2 interfaces interfaces # - Specify API mode on command line sudo ./odp_ipsec_crypto -i p7p1,p8p1 \ --r 192.168.111.2/32:p7p1:08.00.27.76.B5.E0 \ --r 192.168.222.2/32:p8p1:08.00.27.F5.8B.DB \ --p 192.168.111.0/24:192.168.222.0/24:out:both \ --e 192.168.111.2:192.168.222.2:\ -3des:201:656c8523255ccc23a66c1917aa0cf30991fce83532a4b224 \ --a 192.168.111.2:192.168.222.2:md5:200:a731649644c5dee92cbd9c2e7e188ee6 \ --p 192.168.222.0/24:192.168.111.0/24:in:both \ --e 192.168.222.2:192.168.111.2:\ -3des:301:c966199f24d095f3990a320d749056401e82b26570320292 \ --a 192.168.222.2:192.168.111.2:md5:300:27f6d123d7077b361662fc6e451f65d8 \ +-r 192.168.111.2/32,p7p1,08:00:27:76:B5:E0 \ +-r 192.168.222.2/32,p8p1,08:00:27:F5:8B:DB \ +-p 192.168.111.0/24,192.168.222.0/24,out,both \ +-e 192.168.111.2,192.168.222.2,\ +3des,201,656c8523255ccc23a66c1917aa0cf30991fce83532a4b224 \ +-a 192.168.111.2,192.168.222.2,md5,200,a731649644c5dee92cbd9c2e7e188ee6 \ +-p 192.168.222.0/24,192.168.111.0/24,in,both \ +-e 192.168.222.2,192.168.111.2,\ +3des,301,c966199f24d095f3990a320d749056401e82b26570320292 \ +-a 192.168.222.2,192.168.111.2,md5,300,27f6d123d7077b361662fc6e451f65d8 \ -c 2 -m $1 diff --git a/example/ipsec_crypto/odp_ipsec_crypto_run_router.sh b/example/ipsec_crypto/odp_ipsec_crypto_run_router.sh index 920f28e0d..d08490946 100755 --- a/example/ipsec_crypto/odp_ipsec_crypto_run_router.sh +++ b/example/ipsec_crypto/odp_ipsec_crypto_run_router.sh @@ -4,6 +4,6 @@ # - 2 interfaces interfaces # - Specify API mode on command line sudo ./odp_ipsec_crypto -i p7p1,p8p1 \ --r 192.168.111.2/32:p7p1:08.00.27.76.B5.E0 \ --r 192.168.222.2/32:p8p1:08.00.27.F5.8B.DB \ +-r 192.168.111.2/32,p7p1,08:00:27:76:B5:E0 \ +-r 192.168.222.2/32,p8p1,08:00:27:F5:8B:DB \ -c 1 -m $1 diff --git a/example/ipsec_crypto/odp_ipsec_crypto_run_simple.sh b/example/ipsec_crypto/odp_ipsec_crypto_run_simple.sh index 3613fe5fd..5d3abcd51 100755 --- a/example/ipsec_crypto/odp_ipsec_crypto_run_simple.sh +++ b/example/ipsec_crypto/odp_ipsec_crypto_run_simple.sh @@ -10,6 +10,6 @@ IPSEC_EXAMPLE_PATH=. fi ${IPSEC_EXAMPLE_PATH}/odp_ipsec_crypto -i loop1,loop2 \ --r 192.168.222.2/32:loop2:08.00.27.F5.8B.DB \ --s 192.168.111.2:192.168.222.2:loop1:loop2:10:100 \ +-r 192.168.222.2/32,loop2,08:00:27:F5:8B:DB \ +-s 192.168.111.2,192.168.222.2,loop1,loop2,10,100 \ -c 2 "$@" diff --git a/example/ipsec_crypto/odp_ipsec_fwd_db.c b/example/ipsec_crypto/odp_ipsec_fwd_db.c index ca0abf6c1..9bd399ca9 100644 --- a/example/ipsec_crypto/odp_ipsec_fwd_db.c +++ b/example/ipsec_crypto/odp_ipsec_fwd_db.c @@ -66,8 +66,8 @@ int create_fwd_db_entry(char *input, char **if_names, int if_count) str = local; save = NULL; - /* Parse tokens separated by ':' */ - while (NULL != (token = strtok_r(str, ":", &save))) { + /* Parse tokens separated by ',' */ + while (NULL != (token = strtok_r(str, ",", &save))) { str = NULL; /* reset str for subsequent strtok_r calls */ /* Parse token based on its position */ diff --git a/example/ipsec_crypto/odp_ipsec_fwd_db.h b/example/ipsec_crypto/odp_ipsec_fwd_db.h index 278259729..46fda2b87 100644 --- a/example/ipsec_crypto/odp_ipsec_fwd_db.h +++ b/example/ipsec_crypto/odp_ipsec_fwd_db.h @@ -47,7 +47,7 @@ void init_fwd_db(void); /** * Create a forwarding database entry * - * String is of the format "SubNet:Intf:NextHopMAC" + * String is of the format "SubNet,Intf,NextHopMAC" * * @param input Pointer to string describing route * diff --git a/example/ipsec_crypto/odp_ipsec_misc.h b/example/ipsec_crypto/odp_ipsec_misc.h index 71d8f63c4..0ff3fc0c7 100644 --- a/example/ipsec_crypto/odp_ipsec_misc.h +++ b/example/ipsec_crypto/odp_ipsec_misc.h @@ -233,7 +233,7 @@ char *ipv4_subnet_str(char *b, ip_addr_range_t *range) static inline char *mac_addr_str(char *b, uint8_t *mac) { - sprintf(b, "%02X.%02X.%02X.%02X.%02X.%02X", + sprintf(b, "%02X:%02X:%02X:%02X:%02X:%02X", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); return b; } @@ -241,7 +241,7 @@ char *mac_addr_str(char *b, uint8_t *mac) /** * Parse text string representing a MAC address into byte araray * - * String is of the format "XX.XX.XX.XX.XX.XX" where XX is hexadecimal + * String is of the format "XX:XX:XX:XX:XX:XX" where XX is hexadecimal * * @param macaddress Pointer to MAC address string to convert * @param mac Pointer to MAC address byte array to populate @@ -255,7 +255,7 @@ int parse_mac_string(char *macaddress, uint8_t *mac) int converted; converted = sscanf(macaddress, - "%x.%x.%x.%x.%x.%x", + "%x:%x:%x:%x:%x:%x", &macwords[0], &macwords[1], &macwords[2], &macwords[3], &macwords[4], &macwords[5]); if (6 != converted) diff --git a/example/ipsec_crypto/odp_ipsec_sa_db.c b/example/ipsec_crypto/odp_ipsec_sa_db.c index 9a7c593b3..ff9d7e3c7 100644 --- a/example/ipsec_crypto/odp_ipsec_sa_db.c +++ b/example/ipsec_crypto/odp_ipsec_sa_db.c @@ -95,8 +95,8 @@ int create_sa_db_entry(char *input, odp_bool_t cipher) str = local; save = NULL; - /* Parse tokens separated by ':' */ - while (NULL != (token = strtok_r(str, ":", &save))) { + /* Parse tokens separated by ',' */ + while (NULL != (token = strtok_r(str, ",", &save))) { str = NULL; /* reset str for subsequent strtok_r calls */ /* Parse token based on its position */ @@ -191,8 +191,8 @@ int create_tun_db_entry(char *input) str = local; save = NULL; - /* Parse tokens separated by ':' */ - while (NULL != (token = strtok_r(str, ":", &save))) { + /* Parse tokens separated by ',' */ + while (NULL != (token = strtok_r(str, ",", &save))) { str = NULL; /* reset str for subsequent strtok_r calls */ /* Parse token based on its position */ diff --git a/example/ipsec_crypto/odp_ipsec_sa_db.h b/example/ipsec_crypto/odp_ipsec_sa_db.h index 729d98d56..97f9249db 100644 --- a/example/ipsec_crypto/odp_ipsec_sa_db.h +++ b/example/ipsec_crypto/odp_ipsec_sa_db.h @@ -48,7 +48,7 @@ void init_sa_db(void); /** * Create an SA DB entry * - * String is of the format "SrcIP:DstIP:Alg:SPI:Key" + * String is of the format "SrcIP,DstIP,Alg,SPI,Key" * * @param input Pointer to string describing SA * @param cipher TRUE if cipher else FALSE for auth @@ -100,7 +100,7 @@ void init_tun_db(void); /** * Create an tunnel DB entry * - * String is of the format "SrcIP:DstIP:TunSrcIp:TunDstIp" + * String is of the format "SrcIP,DstIP,TunSrcIp,TunDstIp" * * @param input Pointer to string describing tun * diff --git a/example/ipsec_crypto/odp_ipsec_sp_db.c b/example/ipsec_crypto/odp_ipsec_sp_db.c index 1e5820b47..3ead3b0a3 100644 --- a/example/ipsec_crypto/odp_ipsec_sp_db.c +++ b/example/ipsec_crypto/odp_ipsec_sp_db.c @@ -66,8 +66,8 @@ int create_sp_db_entry(char *input, odp_bool_t both_supported) str = local; save = NULL; - /* Parse tokens separated by ':' */ - while (NULL != (token = strtok_r(str, ":", &save))) { + /* Parse tokens separated by ',' */ + while (NULL != (token = strtok_r(str, ",", &save))) { str = NULL; /* reset str for subsequent strtok_r calls */ /* Parse token based on its position */ diff --git a/example/ipsec_crypto/odp_ipsec_sp_db.h b/example/ipsec_crypto/odp_ipsec_sp_db.h index 878f3a7c4..b71ea9377 100644 --- a/example/ipsec_crypto/odp_ipsec_sp_db.h +++ b/example/ipsec_crypto/odp_ipsec_sp_db.h @@ -43,7 +43,7 @@ void init_sp_db(void); /** * Create an SP DB entry * - * String is of the format "SrcSubNet:DstSubNet:(in|out):(ah|esp|[both])" + * String is of the format "SrcSubNet,DstSubNet,(in|out),(ah|esp|[both])" * * @param input Pointer to a string describing SP * @param both_supported Enabling both AH and ESP is supported diff --git a/example/ipsec_crypto/odp_ipsec_stream.c b/example/ipsec_crypto/odp_ipsec_stream.c index d689c6198..db4130fe7 100644 --- a/example/ipsec_crypto/odp_ipsec_stream.c +++ b/example/ipsec_crypto/odp_ipsec_stream.c @@ -83,8 +83,8 @@ int create_stream_db_entry(char *input) str = local; save = NULL; - /* Parse tokens separated by ':' */ - while (NULL != (token = strtok_r(str, ":", &save))) { + /* Parse tokens separated by ',' */ + while (NULL != (token = strtok_r(str, ",", &save))) { str = NULL; /* reset str for subsequent strtok_r calls */ /* Parse token based on its position */ diff --git a/example/ipsec_crypto/odp_ipsec_stream.h b/example/ipsec_crypto/odp_ipsec_stream.h index b32f1d7cb..685b4ee86 100644 --- a/example/ipsec_crypto/odp_ipsec_stream.h +++ b/example/ipsec_crypto/odp_ipsec_stream.h @@ -58,7 +58,7 @@ void init_stream_db(void); /** * Create an stream DB entry * - * String is of the format "SrcIP:DstIP:InInt:OutIntf:Count:Length" + * String is of the format "SrcIP,DstIP,InInt,OutIntf,Count,Length" * * @param input Pointer to string describing stream * |