summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* m4: resolve autoconf-2.68 warningsJan Engelhardt2011-12-171-2/+2
| | | | | | | | | | Newer autoconf desires proper full quoting and use of AC_LANG_SOURCE. Import new m4 file from git://dev.medozas.de/m4_jengelh. m4/gcc4_visibility.m4:4: CHECK_GCC_FVISIBILITY is expanded from... configure.ac:15: the top level configure.ac:15: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
* build: use AC_CONFIG_AUX_DIR and stash away toolsJan Engelhardt2011-12-172-5/+2
|
* Update .gitignoreJan Engelhardt2011-12-171-3/+3
| | | | Only ignore these paths if they are a directory.
* build: abort autogen on subcommand failureJan Engelhardt2011-08-091-1/+1
| | | | | | | | Needed to stop an automated build process when automake requirements are not fulfilled. Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* COPYING: update file (FSF address was outdated)Pablo Neira Ayuso2011-06-021-22/+63
| | | | | | | | | Prabin reported that the FSF address was outdated, I downloaded the current version of LGPL 2.1 from the website and put it in the tree. Reported-by: Prabin Kumar Datta <prabindatta@fedoraproject.org> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* doc: fix wrong comment describing mnl_nlmsg_batch_stop()Sean Robinson2011-03-171-3/+3
| | | | | | | | | | | Sean says: "I did find a discrepancy in the comments versus practice in one function and I have attached a patch fixing those comments to this message." Sligtly mangled by myself. Signed-off-by: Sean Robinson <seankrobinson@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* include: use sanitized header from headers_installJan Engelhardt2011-03-171-127/+1
| | | | | Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: use limits.h headerJan Engelhardt2011-03-051-2/+1
| | | | | | | | values.h is not present on other systems, and the glibc copy reads right away: Old compatibility names for <limits.h> and <float.h> constants. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* doxygen: exclude EXPORT_SYMBOL and skip .git filesPablo Neira Ayuso2011-02-081-2/+2
| | | | Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* doc: don't show up EXPORT_SYMBOL in doxygenPablo Neira Ayuso2011-02-036-87/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | Patrick reports that the doxygen output shows up EXPORT_SYMBOL and tells how to fix this: > I just noticed the EXPORT_SYMBOLs in libmnl showing up in > the doxygen output. Just in case you want to avoid this, > what I'm doing in libdect is (besides the appopriate linker > flags): > > #define __visible __attribute__((visibility("default"))) > > #define EXPORT_SYMBOL(x) typeof(x) (x) __visible > > > This allows to use EXPORT_SYMBOL as in the kernel, IOW > after the function definition. This patch also removes -Wredundant-decls to avoid a warning in every single use of this new approach. Now, this looks more like the Linux kernel way of exporting symbols. Reported-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* examples/genl: support dumping the genl familiesJan Engelhardt2011-01-081-2/+6
| | | | | | The usage text already specified [family] as optional, now implement it :-) Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* examples/genl: fix newline imbalanceJan Engelhardt2011-01-081-2/+3
| | | | | | Running `genl-family-get VFS_DQUOT` forgets to print a newline. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* Merge branch 'master' of git://dev.medozas.de/libmnlPablo Neira Ayuso2011-01-062-5/+6
|\
| * build: use only AC_CANONICAL_HOSTJan Engelhardt2010-12-311-2/+2
| | | | | | | | | | | | | | Calculating AC_CANONICAL_TARGET is superfluous, because libmnl is not a code generator. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
| * build: use AM_CPPFLAGSJan Engelhardt2010-12-312-3/+4
| | | | | | | | Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* | header: fix invalid use of type void * in arithmetic of mnl_for_each_nest(...)Pablo Neira Ayuso2010-12-301-2/+2
|/ | | | | | | | | | | | | This patch fixes the following warnings: netlink.c:121: warning: pointer of type ‘void *’ used in arithmetic netlink.c:121: warning: pointer of type ‘void *’ used in subtraction We cannot use type void * for pointer arithmetic operations. This was introduced in 478dc5f4ab8d0a639d1bafe3bd53ff3309727836 Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: libmnl 1.0.1 releaselibmnl-1.0.1Pablo Neira Ayuso2010-12-262-2/+2
| | | | Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* header: fix signess issues in MNL_SOCKET_BUFFER_SIZEPablo Neira Ayuso2010-12-251-1/+1
| | | | | | | | | This patch fixes the following compilation warning: warning: comparison between signed and unsigned integer expressions warning: signed and unsigned type in conditional expression Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* headers: add local copy of linux/netlink.h to libmnlPablo Neira Ayuso2010-12-224-2/+277
| | | | | | | Davem suggested to add a copy of linux/netlink.h to avoid compilation problems in all cases scenarios. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* include: add missing unistd.hJan Engelhardt2010-12-201-0/+1
| | | | | | | | | | | | When a project uses MNL_SOCKET_BUFFER_SIZE without having included unistd.h, it gets: mystuff.c:36:2: warning: implicit declaration of function "getpagesize" It is libmnl's job to include this, since mystuff.c did not use getpagesize anywhere. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* doc: add new website at netfilter.org to doxygenPablo Neira Ayuso2010-12-171-2/+2
| | | | Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* examples: fix wrong group mask number in nfct-eventPablo Neira Ayuso2010-12-171-3/+3
| | | | | | | This patch replaces event group numbers NFNLGRP_CONNTRACK_* by the event group mask NF_NETLINK_CONNTRACK_* Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: 1.0.0 releaselibmnl-1.0.0Pablo Neira Ayuso2010-12-171-1/+1
| | | | Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* nlmsg: add new message batching infrastructurePablo Neira Ayuso2010-12-175-1/+401
| | | | | | | | | This patch adds the new message batching infrastructure that allows to store several messages into one single datagram. This patch includes an example for ctnetlink. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* header: missing parenthesis in MNL_SOCKET_BUFFER_SIZE definitionPablo Neira Ayuso2010-12-171-1/+1
| | | | Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* header: use getpagesize() for MNL_SOCKET_BUFFER_SIZEPablo Neira Ayuso2010-12-171-1/+1
| | | | | | | | This system call returns PAGE_SIZE which depends on the architecture. See linux/netlink.h for more information on the appropriate datagram size for netlink. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* attr: add put function that allows to check buffer sizePablo Neira Ayuso2010-12-173-0/+192
| | | | | | | | | | This patch adds a set of function that allows to check the size of the buffer. This is useful for attribute batching. This is strongly based on a patch from Jozsef. Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* callback: use of inline in mnl_cb_run*() functionPablo Neira Ayuso2010-12-121-35/+44
| | | | | | | | | This patch defines a new function __mnl_cb_run() which is inlined in mnl_cb_run() and mnl_cb_run2(). This patch increases the size of the library in ~1KB. IIRC, Davem suggested this during the Netfilter Workshop. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* header: add MNL_ARRAY_SIZE(x)Pablo Neira Ayuso2010-12-091-0/+4
| | | | | | | This patch adds MNL_ARRAY_SIZE(x) which likely to defined over and over again if you use mnl_cb_run2(...). Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* attr: add mnl_attr_nest_cancel()Pablo Neira Ayuso2010-11-223-0/+15
| | | | | | | This patch adds mnl_attr_nest_cancel() that allows to cancel the current nest that we are building. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* add libmnl.map file to src/Makefile.amPablo Neira Ayuso2010-11-191-1/+1
| | | | | | | This fixes `make distcheck'. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* nlmsg: remove unused function mnl_nlmsg_aligned_size()Jan Engelhardt2010-11-191-12/+0
| | | | | | | | | | | | | With the new CFLAGS, a notification pops up: nlmsg.c:64:8: warning: no previous prototype for "mnl_nlmsg_aligned_size" Marking it thus as static reveals it can be removed. nlmsg.c:64:15: warning: "mnl_nlmsg_aligned_size" defined but not used Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* ld: add some more precautionary CFLAGSJan Engelhardt2010-11-192-1/+6
| | | | | Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: tag function headers rather than decls as exportedJan Engelhardt2010-11-1911-171/+169
| | | | Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* nlmsg: remove unexisting mnl_nlmsg_total_sizePablo Neira Ayuso2010-11-192-2/+0
| | | | | | | Remove function whose implementation does not exist. It seems to me like a leftover from the early days of the library. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* license: change licensing terms from GPLv2+ to LGPLv2.1+Pablo Neira Ayuso2010-11-195-275/+400
| | | | | | | | | | Existing contributors ACK'ed the license change via email: * Jozsef Kadlecsik * Jan Engelhardt * Cristian Rodríguez Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* Update .gitignoreJan Engelhardt2010-11-161-0/+1
| | | | Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* socket: propagate sendto/recvmsg's return typesJan Engelhardt2010-11-162-5/+7
| | | | | | | sendto/recvfrom return ssize_t, so libmnl should not truncate the result range. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* attr: avoid multiple definition of hidden variableJan Engelhardt2010-11-162-25/+16
| | | | | | | | | | When nesting two mnl_attr_for_each loops, the __len__ variable will be declared twice, eliciting a warning when -Wshadow is turned on. There can also be warnings in pre-C99 because declarations and code are mixed. Do without any temporaries that are not explicitly specified as macro parameters. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* include: use C++ headers in C++ modeJan Engelhardt2010-11-151-5/+8
| | | | | Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: implement both GCC visibility support and export scriptCristian Rodríguez2010-11-156-53/+170
| | | | | | | | | Read "How to write shared libraries" from Ulrich Drepper for more information on this patch. Specifically section 2.2: Export control and section 3: Maintaining APIs and ABIs. Signed-off-by: Cristian Rodríguez <cristian.rodriguez@opensuse.org> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* attr: remove redundant check for NULLJan Engelhardt2010-11-111-2/+2
| | | | | | | | Calling mnl_attr_parse with cb==NULL is pointless, because the function will do nothing else. Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* nlmsg: use bool for mnl_nlmsg_ok()Jan Engelhardt2010-11-113-4/+4
| | | | | Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* socket: constify a struct sockaddr_nlJan Engelhardt2010-11-111-1/+1
| | | | | Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* Merge branch 'master' of git://dev.medozas.de/libmnlPablo Neira Ayuso2010-11-073-6/+1
|\
| * build: remove statements without obvious effectJan Engelhardt2010-11-052-5/+0
| |
| * build: remove -fPIC flagJan Engelhardt2010-10-311-1/+1
| | | | | | | | | | | | libtool automatically adds PIC flags as needed. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* | nlmsg: rework mnl_nlmsg_fprintfPablo Neira Ayuso2010-11-073-27/+136
| | | | | | | | | | | | | | | | 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>
* | examples: add nflog examplePablo Neira Ayuso2010-11-072-0/+233
|/ | | | Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* examples: remove redundant castsJan Engelhardt2010-10-306-11/+11
|