Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\vsprintf.c Create Date:2022-07-28 06:12:11
Last Modify:2022-05-21 09:47:42 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:ip4_string

Proto:static __attribute__((__noinline__)) char *ip4_string(char *p, const u8 *addr, const char *fmt)

Type:char

Parameter:

TypeParameterName
char *p
const u8 *addr
const char *fmt
1282  leading_zeros = fmt[0] == 'i'
1287  Case fmt[2] == 'h'
1292  index = 3
1293  step = -1
1295  Break
1296  Case fmt[2] == 'l'
1297  index = 3
1298  step = -1
1299  Break
1300  Case fmt[2] == 'n'
1301  Case fmt[2] == 'b'
1302  Default
1303  index = 0
1304  step = 1
1305  Break
1307  When i < 4 cycle
1308  char temp[4] gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-aligned-function-attribute* gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Type-Attributes.html#index-aligned-type-attribute* gcc: https://gcc(2)
1309  digits = This will print a single '0' even if r == 0, since we would* immediately jump to out_r where two 0s would be written but only* one of them accounted for in buf. This is needed by ip4_string* below. All other callers pass a non-zero value of r. - temp
1310  If leading_zeros Then
1311  If digits < 3 Then p++ = '0'
1313  If digits < 2 Then p++ = '0'
1317  When digits-- cycle
1318  p++ = temp[digits]
1319  If i < 3 Then p++ = '.'
1321  index += step
1323  p = '\0'
1325  Return p
Caller
NameDescribe
ip6_compressed_string
ip4_addr_string
ip4_addr_string_sa