summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* src: doc: revise doxygen for all other modulesDuncan Roe2021-09-281-29/+71
| | | | | | | | | | | | | | I.e. all modules except "Netlink message helper functions" - different cross-reference for man page and html - remove duplicate description for nflog_fd - try to differentiate between "rare" and "common" errors - gh is a Netfilter log *group* handle (cf h) - minor native English corrections - update Linux source reference - document actual return values Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* utils: nfulnl_test: Print meaningful error messagesDuncan Roe2021-09-201-6/+6
| | | | | | | e.g. "Operation not supported" when run as non-root Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: doc: revise doxygen for module "Netlink message helper functions"Duncan Roe2021-09-203-36/+34
| | | | | | | | | | Adjust style to work better in a man page. Document actual return values. Replace qnum with gnum (and in .h and utils/). Show possible copy modes (rather than refer users to header file) Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: consistently use `gh` in code, code snippets and examplesDuncan Roe2021-09-062-14/+14
| | | | | | | i.e. rather than `qh` sometimes, since this refers to the group handler. Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: doc: Eliminate doxygen warningsDuncan Roe2021-09-061-8/+20
| | | | | | | | | | Most of these are functions that return a requested datum in an arg now, but when the documentation was written they returned the datum directly. Now these functions return 0 for success otherwise -1, so insert the new arg and fix the \return Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: doc: remove trailing whitespace from doxygen.cfg.inDuncan Roe2021-09-061-2/+2
| | | | | Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: doc: reduce doxygen.cfg.in to non-default entries onlyDuncan Roe2021-09-061-165/+5
| | | | | | | | | | | | | | Also add EXCLUDE_SYMBOLS for structs that are undocumented (otherwise doxygen makes html pages for them but warns they and their members are not documented). This formerly 5KB file is reduced almost down to 1/8th original size. In the interests of a clean diff, the new file still has lines with trailing spaces. Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: whitespace: Remove trailing whitespace and inconsistent indentsDuncan Roe2021-09-066-25/+25
| | | | | | | | All .c and .h files now have no lines with trailing whitespace. All .c and .h files now indent with tabs followed by <8 spaces. Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: add LIBVERSION variable for ipulogJeremy Sowden2021-08-301-5/+6
| | | | | | | Replace hard-coded version-info in LDFLAGS. Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* libipulog: fill in missing packet fields.Jeremy Sowden2021-08-302-7/+23
| | | | | | | | Retrieval of time-stamp, input- and output-device fields had not been implemented in `ipulog_get_packet`. Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* libipulog: use correct index to find attribute in packet.Jeremy Sowden2021-08-301-1/+1
| | | | | | | The time-stamp is at `NFULA_TIMESTAMP-1` not `NFULA_TIMESTAMP`. Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: use calloc instead of malloc + memset.Jeremy Sowden2021-08-302-6/+3
| | | | | Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* doc: fix typo's in example.Jeremy Sowden2021-08-301-3/+3
| | | | | | | Use the right group number in nflog_bind_group example. Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: remove references to non-existent man-pages.Jeremy Sowden2021-08-301-3/+1
| | | | | Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* Add doxygen directory to .gitignore.Jeremy Sowden2021-08-301-0/+1
| | | | | Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: remove broken code from autogen.sh.Jeremy Sowden2021-08-281-35/+0
| | | | | | | | | | The `include` function, which is intended to include a copy of the kernel's nfnetlink_log.h into the source distribution, has been broken since 2012 when the header file was moved from where the function expects to find it. The header is manually sync'ed when necessary. Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: missing internal.h in Makefile.amPablo Neira Ayuso2020-12-081-0/+1
| | | | | | This is breaking `make distcheck'. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: choose right automake variablesJan Engelhardt2020-12-081-3/+3
| | | | | | | | | -D is a preprocessor flag, needs to go into _CPPFLAGS; -l is a library selection, needs to go into _LDADD/_LIBADD. NETFILTER_CONNTRACK_CFLAGS was missing, too. Signed-off-by: Jan Engelhardt <jengelh@inai.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: link libnetfilter_log_libipulog.so explicitly to libnfnetlink.so.Jeremy Sowden2020-11-301-1/+1
| | | | | | | | | It uses symbols from libnfnetlink.so, but doesn't link to it, relying on an implicit transitive linkage through libnetfilter_log.so. Add `$(LIBNFNETLINK_LIBS)` to `$(libnetfilter_log_libipulog_la_LIBADD)`. Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Florian Westphal <fw@strlen.de>
* build: remove duplicate `-lnfnetlink` from LDFLAGS.Jeremy Sowden2020-11-301-1/+1
| | | | | | | | `$(libnetfilter_log_la_LIBADD)` includes `$(LIBNFNETLINK_LIBS)`, so there's no need to include `-lnfnetlink` in `$(libnetfilter_log_la_LDFLAGS)`. Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Florian Westphal <fw@strlen.de>
* include: Add extern "C" declarations to header-files.Jeremy Sowden2019-07-032-0/+15
| | | | | | | | Declare functions with extern "C" for inclusion in C++. Reported-by: Stefan Laufmann <stefan.laufmann@emlix.com> Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* utils: nf-log: attaching a conntrack informationKen-ichirou MATSUZAWA2016-11-243-2/+110
| | | | | | | | This patch enables nf-log in utils directory to show conntrack information if libnetfilter_conntrack exists. Signed-off-by: Ken-ichirou MATSUZAWA <chamas@h4.dion.ne.jp> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* nlmsg: Add NFULA_CT and NFULA_CT_INFO attributes supportKen-ichirou MATSUZAWA2015-10-121-1/+2
| | | | | | | This patch validate NFULA_CT and NFULA_CT_INFO attributes, Signed-off-by: Ken-ichirou MATSUZAWA <chamas@h4.dion.ne.jp> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* include: Sync with kernel headersKen-ichirou MATSUZAWA2015-10-121-5/+4
| | | | | Signed-off-by: Ken-ichirou MATSUZAWA <chamas@h4.dion.ne.jp> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* nlmsg: add printf function in conjunction with libmnlKen-ichirou MATSUZAWA2015-08-245-5/+78
| | | | | | | | | | | To printf nflog netlink message in XML, nflog_snprintf_xml can be used after converting nflog nlattrs to nflog_data, but we should not have any code that mixes both new and old, which handles nflog_data, APIs. The idea is to deprecate libnfnetlink and any client of that library at some point, that will take quite time though since we'll have to mark those old interfaces as deprecated. Signed-off-by: Ken-ichirou MATSUZAWA <chamas@h4.dion.ne.jp>
* utils: take a example from libmnl and use new functionsKen-ichirou MATSUZAWA2015-08-243-1/+137
| | | | Signed-off-by: Ken-ichirou MATSUZAWA <chamas@h4.dion.ne.jp>
* src: introduce new functions independent from libnfnetlinkKen-ichirou MATSUZAWA2015-08-245-3/+172
| | | | | | | | | | | The libnetfilter_log.c file contains the old API, its use is discouraged since it depends on libnfnetlink. The idea is to provide a set of helper functions that we can use in conjunction with libmnl, similar to what we have in libnetfilter_queue/nlmsg.c Signed-off-by: Ken-ichirou MATSUZAWA <chamas@h4.dion.ne.jp>
* build: fix typoKen-ichirou MATSUZAWA2015-08-181-1/+1
| | | | | Signed-off-by: Ken-ichirou MATSUZAWA <chamas@h4.dion.ne.jp> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: Use stdint types everywhereFelix Janda2015-05-275-75/+77
| | | | | Signed-off-by: Felix Janda <felix.janda@posteo.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* include: Sync with current kernel headersFelix Janda2015-05-271-26/+25
| | | | | Signed-off-by: Felix Janda <felix.janda@posteo.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* configure: Make it possible to build libipulogFelix Janda2015-05-201-3/+2
| | | | | | | | commit a1b392b4156db984ab2b695a4a70d113f70cb9b8 had unintentionally disabled building of libipulog unconditionally Signed-off-by: Felix Janda <felix.janda@posteo.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* include: Add include needed for integer type definition.Natanael Copa2015-05-151-0/+1
| | | | | | | The sys/types.h is needed for u_int*_t types. Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* configure: add --without-ipulog option to disable libipulog buildMatthieu Crapet2014-02-124-4/+19
| | | | | | | | This is a compat library used for netfilter ULOG target. ULOG only works with IPv4. NFLOG has replaced ULOG. Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* configure: uclinux is also linuxGustavo Zacarias2013-09-171-1/+1
| | | | | Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* Add include needed for integer type definition.Eric Leblond2012-11-041-0/+1
|
* build: resolve automake-1.12 warningsJan Engelhardt2012-10-081-0/+1
| | | | | | | | am/ltlibrary.am: warning: 'libnetfilter_log.la': linking libtool libraries using a non-POSIX archiver requires 'AM_PROG_AR' in 'configure.ac' Signed-off-by: Jan Engelhardt <jengelh@inai.de>
* build: remove unused lines in Makefile.amJan Engelhardt2012-06-241-2/+0
| | | | Signed-off-by: Jan Engelhardt <jengelh@inai.de>
* build: remove unnecessary pkgconfig->config.status dependencyJan Engelhardt2012-06-241-2/+2
| | | | | | The flags obtained from pkgconfig are in essence preprocessor ones. Signed-off-by: Jan Engelhardt <jengelh@inai.de>
* build: bump version to 1.0.1libnetfilter_log-1.0.1Pablo Neira Ayuso2012-01-021-1/+1
| | | | Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: disable implicit .tar.gz archive generation and use POSIX modeJan Engelhardt2011-12-171-1/+2
|
* build: use AC_CONFIG_AUX_DIR and stash away toolsJan Engelhardt2011-12-172-6/+2
|
* Update .gitignoreJan Engelhardt2011-12-171-3/+3
| | | | Only ignore these paths if they are a directory.
* build: fix error with automake-1.9Jan Engelhardt2011-08-012-0/+2
| | | | | | | src/Makefile.am: C objects in subdir but "AM_PROG_CC_C_O" not in "configure.ac" Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* build: Linux kernel-style for compilation messagesPablo Neira Ayuso2011-03-151-0/+3
| | | | Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: fix `make distcheck'Pablo Neira Ayuso2011-01-061-1/+1
| | | | Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* utils: resolve compiler warningsJan Engelhardt2010-12-302-4/+4
| | | | | | | | | | | | | | | | | | | | make nfulnl_test ulog_test make[1]: Entering directory `/home/jengelh/code/libnetfilter_log/utils' CC nfulnl_test.o nfulnl_test.c: In function "cb": nfulnl_test.c:47:1: warning: no return statement in function returning non-void nfulnl_test.c: In function "main": nfulnl_test.c:102:20: warning: unused variable "nlh" CCLD nfulnl_test CC ulog_test.o ulog_test.c: In function "handle_packet": ulog_test.c:27:9: warning: format "%d" expects type ‘int’, but argument 4 has type ‘size_t’ ulog_test.c: In function "main": ulog_test.c:79:3: warning: suggest parentheses around assignment used as truth value CCLD ulog_test make[1]: Leaving directory `/home/jengelh/code/libnetfilter_log/utils' Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* build: use -Wall across the entire sourceJan Engelhardt2010-12-302-2/+1
| | | | Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* build: create a Make_global.am fileJan Engelhardt2010-12-303-2/+4
| | | | | | Just like the other Netfilter libraries. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* build: remove unused LIBTOOL_DEPSJan Engelhardt2010-12-301-2/+0
| | | | Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* src: declare non-modified data as constJan Engelhardt2010-12-212-4/+4
| | | | Signed-off-by: Jan Engelhardt <jengelh@medozas.de>