Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\tomoyo\network.c Create Date:2022-07-28 19:44:43
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:moyo_parse_ipaddr_union - Parse an IP address.*@param: Pointer to "struct tomoyo_acl_param".*@ptr: Pointer to "struct tomoyo_ipaddr_union".* Returns true on success, false otherwise.

Proto:bool tomoyo_parse_ipaddr_union(struct tomoyo_acl_param *param, struct tomoyo_ipaddr_union *ptr)

Type:bool

Parameter:

TypeParameterName
struct tomoyo_acl_param *param
struct tomoyo_ipaddr_union *ptr
53  min = u6_addr8
54  max = u6_addr8
55  address = tomoyo_read_token(param)
58  If Not strchr - Find the first occurrence of the character c in the string s.*@s: the string to be searched*@c: the character to search for && in4_pton(address, - 1, min, '-', & end) > 0 Then
60  Valid only if @group == NULL. = false
61  If Not end Then s6_addr32[0] = s6_addr32[0]
63  Else if end++ != '-' || in4_pton(end, - 1, max, '\0', & end) <= 0 || end Then Return false
66  Return true
68  If in6_pton(address, - 1, min, '-', & end) > 0 Then
69  Valid only if @group == NULL. = true
70  If Not end Then memmove(max, min, sizeof(u16) * 8)
72  Else if end++ != '-' || in6_pton(end, - 1, max, '\0', & end) <= 0 || end Then Return false
75  Return true
77  Return false
Caller
NameDescribe
tomoyo_write_inet_networkmoyo_write_inet_network - Write "struct tomoyo_inet_acl" list.*@param: Pointer to "struct tomoyo_acl_param".* Returns 0 on success, negative value otherwise.* Caller holds tomoyo_read_lock().