mirror of
https://github.com/systemd/systemd.git
synced 2025-03-31 14:50:15 +03:00
network: radv introduce sd_radv_prefix_get_prefix
This commit is contained in:
parent
5ead535224
commit
34332af2bc
@ -829,6 +829,18 @@ _public_ int sd_radv_prefix_set_prefix(sd_radv_prefix *p, const struct in6_addr
|
||||
return 0;
|
||||
}
|
||||
|
||||
_public_ int sd_radv_prefix_get_prefix(sd_radv_prefix *p, struct in6_addr *ret_in6_addr,
|
||||
unsigned char *ret_prefixlen) {
|
||||
assert_return(p, -EINVAL);
|
||||
assert_return(ret_in6_addr, -EINVAL);
|
||||
assert_return(ret_prefixlen, -EINVAL);
|
||||
|
||||
*ret_in6_addr = p->opt.in6_addr;
|
||||
*ret_prefixlen = p->opt.prefixlen;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
_public_ int sd_radv_prefix_set_onlink(sd_radv_prefix *p, int onlink) {
|
||||
assert_return(p, -EINVAL);
|
||||
|
||||
|
@ -74,6 +74,8 @@ sd_radv_prefix *sd_radv_prefix_unref(sd_radv_prefix *ra);
|
||||
|
||||
int sd_radv_prefix_set_prefix(sd_radv_prefix *p, const struct in6_addr *in6_addr,
|
||||
unsigned char prefixlen);
|
||||
int sd_radv_prefix_get_prefix(sd_radv_prefix *p, struct in6_addr *ret_in6_addr,
|
||||
unsigned char *ret_prefixlen);
|
||||
int sd_radv_prefix_set_onlink(sd_radv_prefix *p, int onlink);
|
||||
int sd_radv_prefix_set_address_autoconfiguration(sd_radv_prefix *p,
|
||||
int address_autoconfiguration);
|
||||
|
Loading…
x
Reference in New Issue
Block a user