attr_alloc
a = attr_alloc(flags, type, data, len, h);
static struct attr *attr_alloc(uint8_t, uint8_t, void *, uint16_t, uint64_t);