ndisc-option: introduce ndisc_option_remove()

This commit is contained in:
Yu Watanabe
2024-03-26 03:30:41 +09:00
parent 697c3693b3
commit 24578ce63a
+7
View File
@@ -117,6 +117,13 @@ static inline sd_ndisc_option* ndisc_option_get_by_type(Set *options, uint8_t ty
}
int ndisc_option_get_mac(Set *options, uint8_t type, struct ether_addr *ret);
static inline void ndisc_option_remove(Set *options, const sd_ndisc_option *p) {
ndisc_option_free(set_remove(options, ASSERT_PTR(p)));
}
static inline void ndisc_option_remove_by_type(Set *options, uint8_t type) {
ndisc_option_remove(options, &(const sd_ndisc_option) { .type = type });
}
int ndisc_option_add_raw(
Set **options,
size_t offset,