summaryrefslogtreecommitdiff
path: root/examples/rtnl-link-set.c
AgeCommit message (Collapse)Author
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>
2010-07-10examples: fix rtnl-set-linkPablo Neira Ayuso
This patch fixes the example that allows to set up/down the network interface. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2010-05-03add licensing terms of example filesPablo Neira Ayuso
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2010-04-22fix lots of compilation warnings in example filesPablo Neira Ayuso
They have been spotted by -Wall -Wextra Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2010-04-19add mnl_nlmsg_fprintf() function for debugging purposesPablo Neira Ayuso
This function is still quite preliminary, comments welcome! Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2010-04-12remove mnl_nlmsg_get_len() functionPablo Neira Ayuso
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>
2010-04-04check source of the netlink message and fix sequence tracking logicPablo Neira Ayuso
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>
2010-03-19initial libmnl importPablo Neira Ayuso