summaryrefslogtreecommitdiff
path: root/doc/src/examples/my_parse.c
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2010-11-27 10:18:07 +0100
committerThomas Graf <tgraf@suug.ch>2010-11-27 10:18:07 +0100
commit5644578190c3364300128799967d4e7b5e920242 (patch)
tree9972036e0000c249cf776cb55e8340875c54cd5f /doc/src/examples/my_parse.c
parent7105aea116208422812a3803ef1e58f08b45c75e (diff)
downloadlibnl-5644578190c3364300128799967d4e7b5e920242.tar.gz
Tons of documentation
Diffstat (limited to 'doc/src/examples/my_parse.c')
-rw-r--r--doc/src/examples/my_parse.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/src/examples/my_parse.c b/doc/src/examples/my_parse.c
new file mode 100644
index 0000000..c1ff637
--- /dev/null
+++ b/doc/src/examples/my_parse.c
@@ -0,0 +1,11 @@
+#include <netlink/msg.h>
+
+void my_parse(void *stream, int length)
+{
+ struct nlmsghdr *hdr = stream;
+
+ while (nlmsg_ok(hdr, length)) {
+ // Parse message here
+ hdr = nlmsg_next(hdr, &length);
+ }
+}