Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:ip4_addr_string_sa

Proto:static __attribute__((__noinline__)) char *ip4_addr_string_sa(char *buf, char *end, const struct sockaddr_in *sa, struct printf_spec spec, const char *fmt)

Type:char

Parameter:

TypeParameterName
char *buf
char *end
const struct sockaddr_in *sa
struct printf_specspec
const char *fmt
1518  bool have_p = false
1520  pend = ip4_addr + size of ip4_addr
1521  const u8 * addr = (const u8 * ) & s_addr
1522  char fmt4[3] = {fmt[0], '4', 0}
1524  fmt++
1525  When isalpha( * ++fmt) cycle
1527  Case fmt == 'p'
1528  have_p = true
1529  Break
1530  Case fmt == 'h'
1531  Case fmt == 'l'
1532  Case fmt == 'n'
1533  Case fmt == 'b'
1534  fmt4[2] = fmt
1535  Break
1539  p = ip4_string(ip4_addr, addr, fmt4)
1540  If have_p Then
1541  p++ = ':'
1542  p = number(p, pend, ntohs( Port number ), spec)
1544  p = '\0'
1546  Return Handle string from a well known address.
Caller
NameDescribe
ip_addr_string