Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:sel_netnode_find - Search for a node record*@addr: IP address*@family: address family* Description:* Search the network node table and return the record matching @addr. If an* entry can not be found in the table return NULL.

Proto:static struct sel_netnode *sel_netnode_find(const void *addr, u16 family)

Type:struct sel_netnode

Parameter:

TypeParameterName
const void *addr
u16family
110  Case family == PF_INET
111  idx = sel_netnode_hashfn_ipv4 - IPv4 hashing function for the node table*@addr: IPv4 address* Description:* This is the IPv4 hashing function for the node interface table, it returns* the bucket number for the given IP address.
112  Break
113  Case family == PF_INET6
114  idx = sel_netnode_hashfn_ipv6 - IPv6 hashing function for the node table*@addr: IPv6 address* Description:* This is the IPv6 hashing function for the node interface table, it returns* the bucket number for the given IP address.
115  Break
116  Default
117  BUG()
118  Return NULL
121  list_for_each_entry_rcu - iterate over rcu list of given type*@pos: the type * to use as a loop cursor.*@head: the head for your list.*@member: the name of the list_head within the struct.(node, & list, list)
122  If address family == family Then switch family
124  Case family == PF_INET
125  If IPv4 node address == addr Then Return node
127  Break
128  Case family == PF_INET6
129  If ipv6_addr_equal( & IPv6 node address , addr) Then Return node
132  Break
135  Return NULL
Caller
NameDescribe
sel_netnode_sid_slowsel_netnode_sid_slow - Lookup the SID of a network address using the policy*@addr: the IP address*@family: the address family*@sid: node SID* Description:* This function determines the SID of a network address by quering the* security policy
sel_netnode_sidsel_netnode_sid - Lookup the SID of a network address*@addr: the IP address*@family: the address family*@sid: node SID* Description:* This function determines the SID of a network address using the fastest* method possible