summaryrefslogtreecommitdiff
path: root/tests/headers/net_if.c
diff options
context:
space:
mode:
authorKacper <kacper@mail.openlinux.dev>2025-12-15 14:42:29 +0100
committerKacper <kacper@mail.openlinux.dev>2025-12-15 14:42:29 +0100
commit7cd3b7caee10d62f7be674afb86a136bf30485d6 (patch)
tree121a8c79114174b765713387187d930b102f760f /tests/headers/net_if.c
parent3b3325f761b09ebbfef04c44eed546cc4fdeb329 (diff)
Add mqueue rt api, add header tests
Diffstat (limited to 'tests/headers/net_if.c')
-rw-r--r--tests/headers/net_if.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/headers/net_if.c b/tests/headers/net_if.c
new file mode 100644
index 00000000..b2a5a29c
--- /dev/null
+++ b/tests/headers/net_if.c
@@ -0,0 +1,19 @@
+// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/net_if.h.html
+
+#include "core.h"
+
+#include <net/if.h>
+
+TEST(net_if_h)
+{
+ TYPE(struct if_nameindex);
+ STRUCT_MEMBER(struct if_nameindex, unsigned, if_index);
+ STRUCT_MEMBER(struct if_nameindex, char *, if_name);
+
+ MACRO(IF_NAMESIZE);
+
+ FUNCTION(if_freenameindex, FN(void, struct if_nameindex *));
+ FUNCTION(if_indextoname, FN(char *, unsigned, char *));
+ FUNCTION(if_nameindex, FN(struct if_nameindex *));
+ FUNCTION(if_nametoindex, FN(unsigned, const char *));
+}