diff options
| author | Abhishek N R <abnr@vmware.com> | 2022-12-13 22:34:25 -0800 | 
|---|---|---|
| committer | Abhishek N R <abnr@vmware.com> | 2023-04-03 04:05:17 -0700 | 
| commit | bd2c824a21db78353125b4d2a4026b7a63071883 (patch) | |
| tree | 98feb0e2c5485d12866c19f0ecd896e7597e64f8 /lib/prefix.h | |
| parent | bdf62ec61b343adc007a93a66081d26d1483950a (diff) | |
pim6d: Impelmenting "ipv6 mld join"
Fixes: #12014
Signed-off-by: Abhishek N R <abnr@vmware.com>
Diffstat (limited to 'lib/prefix.h')
| -rw-r--r-- | lib/prefix.h | 8 | 
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/prefix.h b/lib/prefix.h index 88a228b55c..90b792b33c 100644 --- a/lib/prefix.h +++ b/lib/prefix.h @@ -598,6 +598,14 @@ static inline bool ipv6_mcast_ssm(const struct in6_addr *addr)  	return (bits & 0xfff0ffff) == 0xff300000;  } +static inline bool ipv6_mcast_reserved(const struct in6_addr *addr) +{ +	uint32_t bits = ntohl(addr->s6_addr32[0]); + +	/* ffx2::/16 */ +	return (bits & 0xff0fffff) == 0xff020000; +} +  static inline uint8_t ipv4_mcast_scope(const struct in_addr *addr)  {  	uint32_t bits = ntohl(addr->s_addr);  | 
