[PATCH v5] ss: Enclose IPv6 address in brackets

2017-08-04 Thread Florian Lehner
This updated patch adds support for RFC2732 IPv6 address format with brackets for the tool ss. Now checking the complete IPv6 address if it is IN6ADDR_ANY. Signed-off-by: Lehner Florian --- misc/ss.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-)

[PATCH v4] ss: Enclose IPv6 address in brackets

2017-08-01 Thread Florian Lehner
This updated patch adds support for RFC2732 IPv6 address format with brackets for the tool ss. Following the advice by David Laight I used strchr(). Also, IN6ADDR_ANY and INADDR_ANY will return "*". Signed-off-by: Lehner Florian --- misc/ss.c | 28

Re: [PATCH v3] ss: Enclose IPv6 address in brackets

2017-08-01 Thread Florian Lehner
On 08/01/2017 04:11 PM, Phil Sutter wrote: > On Tue, Aug 01, 2017 at 12:05:13PM +0200, Florian Lehner wrote: > [...] >> @@ -114,9 +114,13 @@ int addr64_n2a(__u64 addr, char *buff, size_t len); >> int af_bit_len(int af); >> int af_byte_len(int af); >> >> -c

[PATCH v3] ss: Enclose IPv6 address in brackets

2017-08-01 Thread Florian Lehner
This updated patch adds support for RFC2732 IPv6 address format with brackets for the tool ss. It implements the suggestion by Phil Sutter to use a further value, whether an address was resolved to a hostname. Signed-off-by: Lehner Florian --- include/utils.h | 10 +++---

[PATCH v2] ss: Enclose IPv6 address in brackets

2017-07-31 Thread Florian Lehner
This updated patch adds support for RFC2732 IPv6 address format with brackets for the tool ss. Resolved hostnames will not be enclosed in brackets, therefore the global variable resolve_hosts is initialized and checked. Signed-off-by: Lehner Florian --- misc/ss.c | 8 ++--

Re: [PATCH] ss: Enclose IPv6 address in brackets

2017-07-31 Thread Florian Lehner
On 07/31/2017 12:30 PM, Phil Sutter wrote: > On Sat, Jul 29, 2017 at 02:29:10PM +0200, Florian Lehner wrote: >> This patch adds support for RFC2732 IPv6 address format with brackets >> for the tool ss. So output for ss changes from >> 2a00:1450:400a:804::200e:443 to [2a00:145

[PATCH] ss: Enclose IPv6 address in brackets

2017-07-29 Thread Florian Lehner
This patch adds support for RFC2732 IPv6 address format with brackets for the tool ss. So output for ss changes from 2a00:1450:400a:804::200e:443 to [2a00:1450:400a:804::200e]:443 for IPv6 addresses with attached port number. Signed-off-by: Lehner Florian --- misc/ss.c | 6