aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/printk-formats.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/printk-formats.txt')
-rw-r--r--Documentation/printk-formats.txt32
1 files changed, 32 insertions, 0 deletions
diff --git a/Documentation/printk-formats.txt b/Documentation/printk-formats.txt
index 3af5ae6c9c11..3e8cb73ac43c 100644
--- a/Documentation/printk-formats.txt
+++ b/Documentation/printk-formats.txt
@@ -121,6 +121,38 @@ IPv6 addresses:
121 print a compressed IPv6 address as described by 121 print a compressed IPv6 address as described by
122 http://tools.ietf.org/html/rfc5952 122 http://tools.ietf.org/html/rfc5952
123 123
124IPv4/IPv6 addresses (generic, with port, flowinfo, scope):
125
126 %pIS 1.2.3.4 or 0001:0002:0003:0004:0005:0006:0007:0008
127 %piS 001.002.003.004 or 00010002000300040005000600070008
128 %pISc 1.2.3.4 or 1:2:3:4:5:6:7:8
129 %pISpc 1.2.3.4:12345 or [1:2:3:4:5:6:7:8]:12345
130 %p[Ii]S[pfschnbl]
131
132 For printing an IP address without the need to distinguish whether it's
133 of type AF_INET or AF_INET6, a pointer to a valid 'struct sockaddr',
134 specified through 'IS' or 'iS', can be passed to this format specifier.
135
136 The additional 'p', 'f', and 's' specifiers are used to specify port
137 (IPv4, IPv6), flowinfo (IPv6) and scope (IPv6). Ports have a ':' prefix,
138 flowinfo a '/' and scope a '%', each followed by the actual value.
139
140 In case of an IPv6 address the compressed IPv6 address as described by
141 http://tools.ietf.org/html/rfc5952 is being used if the additional
142 specifier 'c' is given. The IPv6 address is surrounded by '[', ']' in
143 case of additional specifiers 'p', 'f' or 's' as suggested by
144 https://tools.ietf.org/html/draft-ietf-6man-text-addr-representation-07
145
146 In case of IPv4 addresses, the additional 'h', 'n', 'b', and 'l'
147 specifiers can be used as well and are ignored in case of an IPv6
148 address.
149
150 Further examples:
151
152 %pISfc 1.2.3.4 or [1:2:3:4:5:6:7:8]/123456789
153 %pISsc 1.2.3.4 or [1:2:3:4:5:6:7:8]%1234567890
154 %pISpfc 1.2.3.4:12345 or [1:2:3:4:5:6:7:8]:12345/123456789
155
124UUID/GUID addresses: 156UUID/GUID addresses:
125 157
126 %pUb 00010203-0405-0607-0809-0a0b0c0d0e0f 158 %pUb 00010203-0405-0607-0809-0a0b0c0d0e0f