]> git.droids-corp.org - dpdk.git/commit
app/acl: support different formats for IPv6 address
authorKonstantin Ananyev <konstantin.v.ananyev@yandex.ru>
Sun, 15 May 2022 20:03:19 +0000 (21:03 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 30 May 2022 21:31:37 +0000 (23:31 +0200)
commit60018ef4d33d5d3e1e9995945ec33a07e75784a4
tree567a191d8ccd751d46ea32ae0b859d9fa066a372
parent451098159c2209bc5c395a30d2dae325af93e8c2
app/acl: support different formats for IPv6 address

Within ACL rule IPv6 address can be represented in different ways:
either as 4x4B fields, or as 2x8B fields.
Till now, only first format was supported.
Extend test-acl to support both formats, mainly for testing and
demonstrating purposes.
To control desired behavior '--ipv6' command-line option is extended
to accept an optional argument:
To be more precise:
'--ipv6'    - use 4x4B fields format (default behavior)
'--ipv6=4B' - use 4x4B fields format (default behavior)
'--ipv6=8B' - use 2x8B fields format

Also replaced home brewed IPv4/IPv6 address parsing with inet_pton() calls.

Signed-off-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
app/test-acl/main.c
app/test-acl/test-acl.sh