2020-11-09 05:23:58 +01:00
|
|
|
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
2013-11-18 16:58:43 +01:00
|
|
|
#pragma once
|
2011-05-09 14:57:15 +02:00
|
|
|
|
2015-06-12 16:31:33 +02:00
|
|
|
#include "sd-netlink.h"
|
2015-11-18 22:46:33 +01:00
|
|
|
|
2014-07-10 21:15:26 +02:00
|
|
|
#include "in-addr-util.h"
|
2014-07-10 19:55:53 +02:00
|
|
|
|
2014-07-10 21:01:25 +02:00
|
|
|
struct local_address {
|
2014-07-18 16:09:30 +02:00
|
|
|
int family, ifindex;
|
|
|
|
unsigned char scope;
|
2014-12-03 21:42:58 +01:00
|
|
|
uint32_t metric;
|
2014-07-10 19:55:53 +02:00
|
|
|
union in_addr_union address;
|
2011-05-09 14:57:15 +02:00
|
|
|
};
|
|
|
|
|
2015-06-12 16:31:33 +02:00
|
|
|
int local_addresses(sd_netlink *rtnl, int ifindex, int af, struct local_address **ret);
|
2014-12-03 21:42:58 +01:00
|
|
|
|
2015-06-12 16:31:33 +02:00
|
|
|
int local_gateways(sd_netlink *rtnl, int ifindex, int af, struct local_address **ret);
|