Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:ipv6_prefix_equal

Proto:static inline bool ipv6_prefix_equal(const struct in6_addr *addr1, const struct in6_addr *addr2, unsigned int prefixlen)

Type:bool

Parameter:

TypeParameterName
const struct in6_addr *addr1
const struct in6_addr *addr2
unsigned intprefixlen
617  a1 = s6_addr32
618  a2 = s6_addr32
622  pdw = prefixlen >> 5
623  If pdw && memcmp(a1, a2, pdw << 2) Then Return false
627  pbi = prefixlen & 0x1f
628  If pbi && (a1[pdw] ^ a2[pdw]) & htonl((0xffffffff) << (32 - pbi)) Then Return false
631  Return true