summaryrefslogtreecommitdiff
path: root/examples/rtnl
AgeCommit message (Collapse)Author
2013-12-07examples: set attr tableKen-ichirou MATSUZAWA
Florian adviced rtnl-route-event.c has same problem Signed-off-by: Ken-ichirou MATSUZAWA <chamas@h4.dion.ne.jp> Signed-off-by: Florian Westphal <fw@strlen.de>
2013-05-28examples: add rtnl-addr-dumpPablo Neira Ayuso
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2013-05-27examples: rtnl-link-dump: display HW addressPablo Neira Ayuso
2013-05-02examples: rtnl-route-dump: display also metric/priorityPablo Neira Ayuso
If present in the route message, otherwise simply skip it. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2013-05-02examples: rtnl-route-add: fix typo in IPv6 supportPablo Neira Ayuso
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2013-04-24examples: rtnl-route-event: update Makefile.amPablo Neira Ayuso
So you can compile rtnl-route-event via `make check' Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2013-04-24examples: rtnl-route-event: add example to listen to IPv4/IPv6 routesPablo Neira Ayuso
Derived from rtnl-route-dump.c Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2013-04-24examples: rtnl-route-add improvements (including IPv6 support)Pablo Neira Ayuso
Now, both IPv4 and IPv6 are supported simultaneously in one single file. While at it: * I moved the declarations to the beginning of the main function. * Renamed mask by prefix, which seems more appropriate to me. * Use RTPROTO_STATIC, as the route has been added by the administrator. * Set NLM_F_ACK, so we get a report from the kernel about our query and treat reply from the kernel. * Stricter argc checking. * Use perror instead of printf for error reporting. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2012-08-09examples: rtnl-route-dump: add IPv6 supportPhilip Prindeville
[ Pablo has modified the original patch modified to fix some compilation warnings with gcc-4.7 and select the protocol family as argument from the command line. ] Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2012-01-02example: release them in the public domainPablo Neira Ayuso
I have decided to release the examples in this library in the public domain. Jan Engelhardt, who has been the sole contributor so far, has agreed with this re-licensing by communication via e-mail. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2010-11-07nlmsg: rework mnl_nlmsg_fprintfPablo Neira Ayuso
This patch reworks mnl_nlmsg_fprintf. It breaks backward compatibility of this function, there was no way to improve it without doing so (and we are still in time to break thing, BTW). Signed-off-bu: Pablo Neira Ayuso <pablo@netfilter.org>
2010-10-30examples: remove redundant castsJan Engelhardt
2010-10-22src: avoid using deprecated unspecified argument listsJan Engelhardt
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
2010-10-21src: define MNL_SOCKET_BUFFER_SIZE to 8192ULPablo Neira Ayuso
Davem spotted during the Netfilter Workshop that user-space applications should use 8KB buffers for recv(). I accidentally found that NFLOG is not following this approach (in this case we're using 131072 bytes messages), we have to document this. Anyway, according to linux/netlink.h (and to complete this log message): "skb should fit one page. This choice is good for headerless malloc. But we should limit to 8K so that userspace does not have to use enormous buffer sizes on recvmsg() calls just to avoid MSG_TRUNC when PAGE_SIZE is very large." Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2010-10-19Add .gitignore filesJan Engelhardt
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
2010-10-19build: remove unneeded -dynamic -ldl -nostartfiles flagsJan Engelhardt
Besides that -ldl should be in _LDADD (not _LDFLAGS), I do not see any dlopen calls at all that would make the library a requirement. I also see no reason to use -Wc,-nostartfiles. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
2010-09-08examples: put examples files into specific directoriesPablo Neira Ayuso
put examples files into specific directories according to the Netlink bus they work with. And minor update in the readme file Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>