}
extern const struct datatype *
-set_keytype_alloc(const struct datatype *orig_dtype, unsigned int byteorder);
-extern void set_keytype_destroy(const struct datatype *dtype);
+set_datatype_alloc(const struct datatype *orig_dtype, unsigned int byteorder);
+extern void set_datatype_destroy(const struct datatype *dtype);
extern void time_print(uint64_t seconds);
extern struct error_record *time_parse(const struct location *loc,
dtype_free(dtype);
}
-const struct datatype *set_keytype_alloc(const struct datatype *orig_dtype,
- unsigned int byteorder)
+const struct datatype *set_datatype_alloc(const struct datatype *orig_dtype,
+ unsigned int byteorder)
{
struct datatype *dtype;
return dtype;
}
-void set_keytype_destroy(const struct datatype *dtype)
+void set_datatype_destroy(const struct datatype *dtype)
{
if (dtype->flags & DTYPE_F_CLONE)
dtype_free(dtype);
set = set_alloc(&expr->location);
set->flags = NFT_SET_ANONYMOUS | expr->set_flags;
set->handle.set = xstrdup(name),
- set->keytype = set_keytype_alloc(keytype, keybyteorder);
+ set->keytype = set_datatype_alloc(keytype, keybyteorder);
set->keylen = keylen;
set->init = expr;
set->handle.table = xstrdup(nftnl_set_get_str(nls, NFTNL_SET_TABLE));
set->handle.set = xstrdup(nftnl_set_get_str(nls, NFTNL_SET_NAME));
- set->keytype = set_keytype_alloc(keytype, byteorder);
+ set->keytype = set_datatype_alloc(keytype, byteorder);
set->keylen = nftnl_set_get_u32(nls, NFTNL_SET_KEY_LEN) * BITS_PER_BYTE;
set->flags = nftnl_set_get_u32(nls, NFTNL_SET_FLAGS);
if (set->init != NULL)
expr_free(set->init);
handle_free(&set->handle);
- set_keytype_destroy(set->keytype);
+ set_datatype_destroy(set->keytype);
xfree(set);
}