diff options
author | Thomas Graf <tgraf@suug.ch> | 2010-11-27 10:18:07 +0100 |
---|---|---|
committer | Thomas Graf <tgraf@suug.ch> | 2010-11-27 10:18:07 +0100 |
commit | 5644578190c3364300128799967d4e7b5e920242 (patch) | |
tree | 9972036e0000c249cf776cb55e8340875c54cd5f /doc/src/examples/my_parse.c | |
parent | 7105aea116208422812a3803ef1e58f08b45c75e (diff) | |
download | libnl-5644578190c3364300128799967d4e7b5e920242.tar.gz |
Tons of documentation
Diffstat (limited to 'doc/src/examples/my_parse.c')
-rw-r--r-- | doc/src/examples/my_parse.c | 11 |
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); + } +} |