summaryrefslogtreecommitdiffstats
path: root/src/dect-cluster-list.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dect-cluster-list.c')
-rw-r--r--src/dect-cluster-list.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/dect-cluster-list.c b/src/dect-cluster-list.c
new file mode 100644
index 0000000..edff5fe
--- /dev/null
+++ b/src/dect-cluster-list.c
@@ -0,0 +1,20 @@
+#include "netlink/cli/utils.h"
+
+int main(int argc, char *argv[])
+{
+ struct nl_sock *sock;
+ struct nl_cache *cluster_cache;
+ struct nl_dump_params params = {
+ .dp_type = NL_DUMP_LINE,
+ .dp_fd = stdout,
+ };
+
+ sock = nl_cli_alloc_socket();
+ nl_cli_connect(sock, NETLINK_DECT);
+ if (nl_dect_cluster_alloc_cache(sock, &cluster_cache))
+ exit(1);
+
+ nl_cache_dump(cluster_cache, &params);
+ return 0;
+}
+