Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\net\xfrm.h Create Date:2022-07-28 19:13:33
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:addr_match

Proto:static inline bool addr_match(const void *token1, const void *token2, unsigned int prefixlen)

Type:bool

Parameter:

TypeParameterName
const void *token1
const void *token2
unsigned intprefixlen
810  a1 = token1
811  a2 = token2
815  pdw = prefixlen >> 5
816  pbi = prefixlen & 0x1f
818  If pdw Then If memcmp(a1, a2, pdw << 2) Then
820  Return false
822  If pbi Then
825  mask = htonl((0xffffffff) << (32 - pbi))
827  If (a1[pdw] ^ a2[pdw]) & mask Then Return false
831  Return true