summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* doc: correct non-native solecismHEADmasterJeremy Sowden2022-04-101-1/+1
| | | | | | | The native usage is "... allows one to ...", not "... allows to ...". Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Florian Westphal <fw@strlen.de>
* build: fix `--disable-static`Jeremy Sowden2021-11-181-1/+1
| | | | | | | | The `LT_INIT` argument should be `disable-static`. Fix it. Fixes: a04ddc0b83a6 ("build: replace `AM_PROG_LIBTOOL` and `AC_DISABLE_STATIC` with `LT_INIT`") Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: bump version to 1.0.2libnetfilter_log-1.0.2Pablo Neira Ayuso2021-11-182-2/+2
| | | | | | New API: nflog_attr_*() and nflog_nlmsg_*(), update LIBVERSION. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: add conntrack ID to XML outputKen-ichirou MATSUZAWA2021-11-082-3/+50
| | | | | | | | This patch enables to add conntrack ID as `ctid' element to XML output. Users could identify conntrack entries by this ID from another conntrack output. Signed-off-by: Ken-ichirou MATSUZAWA <chamas@h4.dion.ne.jp> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: fix pkg-config syntax-errorsJeremy Sowden2021-11-022-2/+2
| | | | | | | | | | pkg-config config-files require back-slashes when definitions are folded across multiple lines. Fixes: 3c2229da2e7f ("build: add pkg-config configuration for libipulog") Fixes: f7da00cdc597 ("build: correct pkg-config dependency configuration") Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: doc: `make` generates requested documentationDuncan Roe2021-10-277-8/+329
| | | | | | | | | | | Generate man pages, HTML, neither or both according to ./configure. Based on the work done for libnetfilter_queue. [ This patch updates the default ./configure option to build the manpages in case that doxygen is available. ] Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* Add Emacs artefacts to .gitignoreJeremy Sowden2021-10-121-0/+3
| | | | | Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: replace `AC_HELP_STRING` with `AS_HELP_STRING`Jeremy Sowden2021-10-121-1/+1
| | | | | | | | `AC_HELP_STRING` is obsolete and has been superseded by `AS_HELP_STRING`. Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: replace `AM_PROG_LIBTOOL` and `AC_DISABLE_STATIC` with `LT_INIT`Jeremy Sowden2021-10-121-2/+1
| | | | | | | | `AM_PROG_LIBTOOL` is superseded by `LT_INIT`, which also accepts options to control the defaults for creating shared or static libraries. Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: remove `-dynamic` when linking check progsJeremy Sowden2021-10-121-3/+0
| | | | | | | The `-dynamic` flag is only meaningful for Darwin. Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: remove superfluous .la when linking ulog_testJeremy Sowden2021-10-121-1/+1
| | | | | | | Explicit linkage to libnetfilter_log is not required. Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: move dependency CFLAGS variables out of `AM_CPPFLAGS`Jeremy Sowden2021-10-123-14/+17
| | | | | | | | `${LIBNFNETLINK_CFLAGS}` and `${LIBMNL_CFLAGS}` are not required for all libraries and executables: include them only where necessary. Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: fix linker flags for nf-logJeremy Sowden2021-10-121-2/+2
| | | | | | | | Use pkg-config LIBS variable for libmnl, instead of literal `-lmnl`. Append `$(LIBNETFILTER_CONNTRACK_LIBS)` to nf_log_LDADD. Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: add pkg-config configuration for libipulogJeremy Sowden2021-10-123-4/+25
| | | | | | | | | | Put libnfnetlink and libnetfilter_log in `Requires.private`. They both use pkg-config (thus `Requires`, not `Libs`), and they are both required for static builds, but do not need to be exposed otherwise (thus `Requires.private`). Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: correct pkg-config dependency configurationJeremy Sowden2021-10-122-5/+8
| | | | | | | | | | Put libnfnetlink and libmnl in `Requires.private`. They both use pkg-config (thus `Requires`, not `Libs`), and they are both required for static builds, but do not need to be exposed otherwise (thus `Requires.private`). Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* utils: nfulnl_test: use nflog_get_packet_hw() and print hardware addressPablo Neira Ayuso2021-09-281-1/+15
| | | | | | Print hardware length and address. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* utils: nfulnl_test: call nflog_get_*() before printing fieldPablo Neira Ayuso2021-09-281-9/+12
| | | | | | Just a clean up to improve readability. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* utils: nfulnl_test: Agree with man pagesDuncan Roe2021-09-281-7/+7
| | | | | | | | | Use the same variable name as the man pages / html for functions in the Parsing module (e.g. nflog_get_msg_packet_hdr(nfad)). Rationale: make it easier for users to follow the code Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: doc: Document nflog_callback_register() and nflog_handle_packet()Duncan Roe2021-09-281-0/+32
| | | | | | | utils/nfulnl_test.c uses these functions Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: doc: Add \return for nflog_get_packet_hw()Duncan Roe2021-09-281-1/+5
| | | | | | | Also indicate that hw_addrlen has NBO in struct nfulnl_msg_packet_hw Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: doc: Insert SYNOPSIS sections for man pagesDuncan Roe2021-09-282-7/+37
| | | | | | | Also a few more minor native English corrections Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* 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>