summaryrefslogtreecommitdiffstats
path: root/examples/rtnl-link-set.c
Commit message (Collapse)AuthorAgeFilesLines
* examples: put examples files into specific directoriesPablo Neira Ayuso2010-09-081-88/+0
| | | | | | | 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>
* examples: fix rtnl-set-linkPablo Neira Ayuso2010-07-101-9/+12
| | | | | | | This patch fixes the example that allows to set up/down the network interface. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* add licensing terms of example filesPablo Neira Ayuso2010-05-031-0/+6
| | | | Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* fix lots of compilation warnings in example filesPablo Neira Ayuso2010-04-221-2/+4
| | | | | | They have been spotted by -Wall -Wextra Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* add mnl_nlmsg_fprintf() function for debugging purposesPablo Neira Ayuso2010-04-191-1/+1
| | | | | | This function is still quite preliminary, comments welcome! Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* remove mnl_nlmsg_get_len() functionPablo Neira Ayuso2010-04-121-1/+1
| | | | | | | | | Remove mnl_nlmsg_get_len() since it returns a field of a structure that is public (struct nlmsghdr). We can directly access the header fields and they are not likely to change in the future (at least for this version of Netlink I think). Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* check source of the netlink message and fix sequence tracking logicPablo Neira Ayuso2010-04-041-2/+3
| | | | | | | | | | | | This patch changes the callback handlers to include netlink portID checking. Thus, we avoid that any malicious process can spoof messages. If portid, sequence number of the message is != 0, we check if the message is what we expect. This allows to use the same netlink channel for dumps (portid, seq != 0) and event-based notifications (portid, seq == 0). Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* initial libmnl importPablo Neira Ayuso2010-03-191-0/+76