util-lib: add function to resolve "alternative" names

Calls to if_nametoindex() are expected to use resolve_ifname() instead.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2020-01-12 10:54:31 +01:00
parent 5c3fa98db6
commit fc2ea97ad0
3 changed files with 27 additions and 14 deletions
+4
View File
@@ -1,10 +1,14 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#pragma once
#include "sd-netlink.h"
#include "in-addr-util.h"
#include "macro.h"
#include "socket-util.h"
int resolve_ifname(sd_netlink **rtnl, const char *name);
int make_socket_fd(int log_level, const char* address, int type, int flags);
int socket_address_parse(SocketAddress *a, const char *s);