summaryrefslogtreecommitdiff
path: root/doc/src/examples/nl_cb_set.c
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/examples/nl_cb_set.c')
-rw-r--r--doc/src/examples/nl_cb_set.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/doc/src/examples/nl_cb_set.c b/doc/src/examples/nl_cb_set.c
deleted file mode 100644
index 4fbaefc..0000000
--- a/doc/src/examples/nl_cb_set.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include <netlink/handlers.h>
-
-/* Allocate a callback set and initialize it to the verbose default set */
-struct nl_cb *cb = nl_cb_alloc(NL_CB_VERBOSE);
-
-/* Modify the set to call my_func() for all valid messages */
-nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, my_func, NULL);
-
-/*
- * Set the error message handler to the verbose default implementation
- * and direct it to print all errors to the given file descriptor.
- */
-FILE *file = fopen(...);
-nl_cb_err(cb, NL_CB_VERBOSE, NULL, file);