Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This function allows you to parse the payload of the Netlink message.
Thus, you can skip the headers and go down to the part of the message
you want to parse.
This patch has updated the LIBVERSION and it also bumps the version
to 1.0.3, in case that someone wants to package some snapshot, not to
mess with the new symbol we have added.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
When using mnl_nlmsg_put_extra_header() it pads out the addtional
header but only zeros the original size not the padded value. Which
cause valgrind to complain about sendto() with uninitialized byte.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
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>
|
|
CC socket.lo
CC callback.lo
CC nlmsg.lo
CC attr.lo
CCLD libmnl.la
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
|
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
|
|
|
|
Only ignore these paths if they are a directory.
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
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>
|
|
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
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>
|
|
The usage text already specified [family] as optional, now implement it :-)
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
|
|
Running `genl-family-get VFS_DQUOT` forgets to print a newline.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
|
|
|
|
Calculating AC_CANONICAL_TARGET is superfluous, because libmnl
is not a code generator.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
|
|
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
|
|
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>
|
|
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
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>
|
|
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
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>
|
|
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|