in-addr-util: introduce in6_addr_hash_ops_free

This commit is contained in:
Yu Watanabe
2021-10-07 01:03:06 +09:00
parent 0943b3b7a4
commit f1cb8933c3
2 changed files with 7 additions and 0 deletions
+6
View File
@@ -846,3 +846,9 @@ int in6_addr_compare_func(const struct in6_addr *a, const struct in6_addr *b) {
}
DEFINE_HASH_OPS(in6_addr_hash_ops, struct in6_addr, in6_addr_hash_func, in6_addr_compare_func);
DEFINE_HASH_OPS_WITH_KEY_DESTRUCTOR(
in6_addr_hash_ops_free,
struct in6_addr,
in6_addr_hash_func,
in6_addr_compare_func,
free);
+1
View File
@@ -119,6 +119,7 @@ int in6_addr_compare_func(const struct in6_addr *a, const struct in6_addr *b);
extern const struct hash_ops in_addr_data_hash_ops;
extern const struct hash_ops in6_addr_hash_ops;
extern const struct hash_ops in6_addr_hash_ops_free;
#define IPV4_ADDRESS_FMT_STR "%u.%u.%u.%u"
#define IPV4_ADDRESS_FMT_VAL(address) \