1
0
mirror of https://github.com/systemd/systemd.git synced 2025-08-25 13:49:55 +03:00

ndisc-option: introduce ndisc_option_remove()

This commit is contained in:
Yu Watanabe
2024-03-17 13:27:08 +09:00
parent 697c3693b3
commit 24578ce63a

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,