summaryrefslogtreecommitdiff
path: root/src/shared/local-addresses.h
blob: 38a17d233e61eb7d5847d510e781b5944e32b9ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once

#include "sd-netlink.h"

#include "in-addr-util.h"

struct local_address {
        int family, ifindex;
        unsigned char scope;
        uint32_t metric;
        union in_addr_union address;
};

int local_addresses(sd_netlink *rtnl, int ifindex, int af, struct local_address **ret);

int local_gateways(sd_netlink *rtnl, int ifindex, int af, struct local_address **ret);

int local_outbounds(sd_netlink *rtnl, int ifindex, int af, struct local_address **ret);