util: introduce format_ifname()

This commit is contained in:
Yu Watanabe
2019-05-29 14:21:19 +09:00
parent 658e910640
commit 7f686722f7
3 changed files with 14 additions and 0 deletions
+3
View File
@@ -2,6 +2,7 @@
#pragma once
#include <inttypes.h>
#include <net/if.h>
#if SIZEOF_PID_T == 4
# define PID_PRI PRIi32
@@ -65,3 +66,5 @@
#else
# error Unknown ino_t size
#endif
char *format_ifname(int ifindex, char buf[static IF_NAMESIZE + 1]);