summaryrefslogtreecommitdiffstats
path: root/examples/rtnl/rtnl-route-dump.c
Commit message (Collapse)AuthorAgeFilesLines
* include: add MNL_SOCKET_DUMP_SIZE definitionHEADmasterPablo Neira Ayuso2019-10-141-2/+2
| | | | | | | | | | | | | | | | | Add definition to recommend a new buffer size for netlink dumps. Details are available here: commit d35c99ff77ecb2eb239731b799386f3b3637a31e Author: Eric Dumazet <edumazet@google.com> Date: Thu Oct 6 04:13:18 2016 +0900 netlink: do not enter direct reclaim from netlink_dump() iproute2 is using 32 KBytes buffer in netlink dumps to speed up netlink dumps for a while. Let's recommend this buffer size through this new definition. Update examples too. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* examples: made sub functions the sameKen-ichirou MATSUZAWA2013-12-071-3/+7
| | | | | | | show entry in oneline and RTA_PRIORITY Signed-off-by: Ken-ichirou MATSUZAWA <chamas@h4.dion.ne.jp> Signed-off-by: Florian Westphal <fw@strlen.de>
* examples: fix trivial error messageKen-ichirou MATSUZAWA2013-12-071-2/+2
| | | | | Signed-off-by: Ken-ichirou MATSUZAWA <chamas@h4.dion.ne.jp> Signed-off-by: Florian Westphal <fw@strlen.de>
* examples: set attr tableKen-ichirou MATSUZAWA2013-12-071-0/+4
| | | | | | | 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>
* examples: rtnl-route-dump: display also metric/priorityPablo Neira Ayuso2013-05-021-0/+3
| | | | | | If present in the route message, otherwise simply skip it. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* examples: rtnl-route-dump: add IPv6 supportPhilip Prindeville2012-08-091-5/+108
| | | | | | | | | [ 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>
* example: release them in the public domainPablo Neira Ayuso2012-01-021-6/+1
| | | | | | | | 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>
* examples: remove redundant castsJan Engelhardt2010-10-301-1/+1
|
* src: avoid using deprecated unspecified argument listsJan Engelhardt2010-10-221-1/+1
| | | | Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* src: define MNL_SOCKET_BUFFER_SIZE to 8192ULPablo Neira Ayuso2010-10-211-1/+1
| | | | | | | | | | | | | | | | 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>
* examples: put examples files into specific directoriesPablo Neira Ayuso2010-09-081-0/+247
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>