| 1 |
/* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| 2 |
#pragma once |
| 3 |
|
| 4 |
#include "shared-forward.h" |
| 5 |
#include "in-addr-util.h" |
| 6 |
|
| 7 |
struct local_address { |
| 8 |
int ifindex; |
| 9 |
unsigned char scope; |
| 10 |
uint32_t priority; |
| 11 |
uint32_t weight; |
| 12 |
int family; |
| 13 |
union in_addr_union address; |
| 14 |
union in_addr_union prefsrc; |
| 15 |
}; |
| 16 |
|
| 17 |
bool has_local_address(const struct local_address *addresses, size_t n_addresses, const struct local_address *needle); |
| 18 |
|
| 19 |
int add_local_address(struct local_address **list, size_t *n_list, int ifindex, unsigned char scope, int family, const union in_addr_union *address); |
| 20 |
|
| 21 |
int local_addresses(sd_netlink *context, int ifindex, int af, struct local_address **ret); |
| 22 |
|
| 23 |
int local_gateways(sd_netlink *context, int ifindex, int af, struct local_address **ret); |
| 24 |
|
| 25 |
int local_outbounds(sd_netlink *context, int ifindex, int af, struct local_address **ret); |