From: David Ahern Date: Fri, 19 Dec 2014 02:11:11 +0000 (-0700) Subject: tools lib traceevent: Add support for IP address formats X-Git-Tag: omap-for-v4.1/prcm-dts-mfd-syscon-fix~164^2~10^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d199b5be53348bef84883013c484b414adf0a2e;p=pandora-kernel.git tools lib traceevent: Add support for IP address formats Add helpers for the following kernel formats: %pi4 print an IPv4 address with leading zeros %pI4 print an IPv4 address without leading zeros %pi6 print an IPv6 address without colons %pI6 print an IPv6 address with colons %pI6c print an IPv6 address in compressed form with colons %pISpc print an IP address from a sockaddr Allows these formats to be used in tracepoints. Quite a bit of this is adapted from code in lib/vsprintf.c. v4: - fixed pI6c description in git commit message per Valdis' comment v3: - use of 'c' and 'p' requires 'I' v2: - pass ptr+1 to print_ip_arg per Namhyung's comments - added field length checks to sockaddr function Signed-off-by: David Ahern Acked-by: Steven Rostedt Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/1418955071-36241-1-git-send-email-dsahern@gmail.com Signed-off-by: Arnaldo Carvalho de Melo --- Reading git-diff-tree failed