Em Thu, Dec 18, 2014 at 08:10:43AM -0700, David Ahern escreveu:
Adds helper for 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 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.
Can't we try as much as possible use that code directly? Something like