mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
lib: Add ipv6 helper functions.
ipv6_addr_is_set is going to be used by next patches. [cascardo: compare with in6addr_any in ipv6_addr_is_set] [cascardo: keep only ipv6_addr_is_* functions] Signed-off-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
@@ -871,6 +871,14 @@ static inline bool ipv6_is_all_hosts(const struct in6_addr *addr) {
|
||||
return ipv6_addr_equals(addr, &in6addr_all_hosts);
|
||||
}
|
||||
|
||||
static inline bool ipv6_addr_is_set(const struct in6_addr *addr) {
|
||||
return !ipv6_addr_equals(addr, &in6addr_any);
|
||||
}
|
||||
|
||||
static inline bool ipv6_addr_is_multicast(const struct in6_addr *ip) {
|
||||
return ip->s6_addr[0] == 0xff;
|
||||
}
|
||||
|
||||
static inline void
|
||||
in6_addr_set_mapped_ipv4(struct in6_addr *addr, ovs_be32 ip4)
|
||||
{
|
||||
|
Reference in New Issue
Block a user