summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* build: doc: Fix doxygen obsolete option warningHEADmasterDuncan Roe2023-03-151-1/+0
| | | | | | | doxygen 1.9.5 complains about DOT_TRANSPARENT, removed. Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Florian Westphal <fw@strlen.de>
* Makefile: Create LZMA-compressed dist-filesPhil Sutter2022-12-091-1/+1
| | | | | | | | Use a more modern alternative to bzip2. Suggested-by: Jan Engelhardt <jengelh@inai.de> Suggested-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Phil Sutter <phil@nwl.cc>
* build: doc: Update build_man.sh to find bash in PATHDuncan Roe2022-09-211-1/+2
| | | | | | | | | | | The use of /bin/bash has been reported as a problem during a cross build of libmnl with a build system running macOS or BSD. build_man.sh is intended to be usable in a build, so don't start with #!/bin/bash. Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Florian Westphal <fw@strlen.de>
* examples: fix compiler warningDuncan Roe2022-03-271-1/+1
| | | | | | Fixes: c3bada27b1db ("examples: print hwaddr attribute if present") Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Florian Westphal <fw@strlen.de>
* build: doc: Update build_man.sh for doxygen 1.9.2Duncan Roe2022-01-091-1/+1
| | | | | | | | | | | | Function del_def_at_lines() removes lines of the form: Definition at line <nnn> of file ... At doxygen 1.9.2, <nnn> is displayed in bold, so upgrade the regex to match an optional bold / normal pair around <nnn> Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Florian Westphal <fw@strlen.de>
* examples: print hwaddr attribute if presentFlorian Westphal2022-01-031-0/+18
| | | | | | | | | | | | | There was a bug in 5.15 where HWADDR was included even if mac_header start was same as network header. In that case, userspace would get network header re-interpreted as a mac address, i.e. hw->hw_addr[] set to network_header + 6 in ethernet case. Dump hwaddr if present. Signed-off-by: Florian Westphal <fw@strlen.de>
* build: doc: Warn user if html docs will be missing diagramsDuncan Roe2021-12-161-0/+4
| | | | | | | | | | | | | | | libnetfilter_queue is unique among the netfilter libraries in having a module hierarchy. If 'dot' is available, Doxygen will make an interactive diagram for a module with a child or a parent, allowing users to conveniently move up and down the hierarchy. Update configure to output a warning if 'dot' is not installed and html was requested. Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: doc: Allow to specify whether to produce man pages, html, neither or bothDuncan Roe2021-10-273-16/+44
| | | | | | | | | | | | | | | | | | | | | | | | New default action is: run doxygen (if installed) to produce man pages only. This adds 124 KB to the build tree (and to the install tree, after `make install`). For finer control of built documentation, the old --with-doxygen configure option is removed. Instead there are 2 new options: --enable-html-doc # +1160 KB --disable-man-pages # -124 KB If doxygen is not installed, configure outputs a warning that man pages will not be built. configure --disable-man-pages avoids this warning. After --enable-html-doc - `make install` installs built pages in htmldir instead of just leaving them in the build tree. - If the 'dot' program is not installed, configure outputs a warning that interactive diagrams will be missing and to install graphviz to get them. (There is an interactive diagram at the head of some modules, e.g. User-space network packet buffer). [ a few configure.ac edits to keep it in sync with libnetfilter_log --pablo] Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: doc: Ensure clean `git status` after in_tree buildDuncan Roe2021-10-271-1/+4
| | | | | | | doxygen.cfg moves to doxygen/; add generated files Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: build: Stop build_man.sh from deleting short Detailed DescriptionsDuncan Roe2021-09-201-1/+5
| | | | | | | | An empty Detailed Description is 3 lines long but a short (1-para) DD is also 3 lines. Check that the 3rd line really is empty. Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Florian Westphal <fw@strlen.de>
* libnetfilter_queue: src/nlmsg.c: SECCTX can be of any lengthTopi Miettinen2021-09-201-1/+1
| | | | | | | | | | Typically security contexts are not 'u32' sized but strings, for example 'system_u:object_r:my_http_client_packet_t:s0'. Fix length validation check to allow any context sizes. Signed-off-by: Topi Miettinen <toiwoton@gmail.com> Signed-off-by: Florian Westphal <fw@strlen.de>
* build: doc: Fix rendering of verbatim '\n"' in man pagesDuncan Roe2021-09-061-0/+4
| | | | | | | Without this patch, '\n"' rendered as '0' in e.g. man nfq_create_queue Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: doc: Be sure to rerun doxygen after ./configureDuncan Roe2021-08-301-1/+1
| | | | | | | | doxygen/Makefile was erroneously depending on Makefile.am when it should have depended on itself. Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: doc: Eliminate warning from ./autogen.shDuncan Roe2021-08-301-1/+9
| | | | | | | Replace shell function call with a list of sources Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: doc: fix `make distcleancheck`Duncan Roe2021-08-281-1/+1
| | | | | | | `make distcleancheck` was not passing before this patchset. Now fixed. Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: doc: Avoid having to special-case `make distcheck`Duncan Roe2021-08-283-15/+4
| | | | | | | | | | - Move doxygen.cfg.in to doxygen/ - Tell doxygen.cfg.in where the sources are - Let doxygen.cfg.in default its output to CWD - In Makefile, `doxygen doxygen.cfg` "just works" Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: doc: Add a man page post-processor to build_man.shDuncan Roe2021-08-281-5/+195
| | | | | | | | | | | | | | - If there is a "Modules" section, delete it - If "Detailed Description" is empty, delete "Detailed Description" line - Reposition SYNOPSIS (with headers that we inserted) to start of page, integrating with defined functions to look like other man pages - Delete all "Definition at line nnn" lines - Delete lines that make older versions of man o/p an unwanted blank line For better readability, shell function definitions are separated by blank lines, and there is a bit of annotation. Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: doc: Split off man pages script from Makefile.amDuncan Roe2021-08-282-31/+32
| | | | | | | | | | | | | | | Split off shell script from within doxygen/Makefile.am into doxygen/build_man.sh. This patch by itself doesn't fix anything. The patch is only for traceability, because diff patch format is not very good at catching code updates and moving code together. Therefore the script is exactly as it was; it still looks a bit different because of having to un-double doubled-up $ signs, remove trailing ";/" and so on. 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-08-158-9/+176
| | | | | | | | | | | | In order to work with the post-processing logic in doxygen/Makefile.am, SYNOPSIS sections must be inserted at the end of the module description (text after \defgroup or \addtogroup) (becomes Detailed Description in the man page). Also a few minor updates including rename module uselessfns to do_not_use. Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* include: deprecate libnetfilter_queue/linux_nfnetlink_queue.hPablo Neira Ayuso2021-08-118-0/+9
| | | | | | Emit a warning to notify users that this file is deprecated. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: If doxygen is not available, be sure to report "doxygen: no" to ↵Duncan Roe2021-08-101-2/+5
| | | | | | | | | ./configure Also fix bogus "Doxygen not found ..." warning if --without-doxygen given Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: doc: get rid of the need for manual updating of MakefileDuncan Roe2021-08-012-61/+32
| | | | | | | | | | | | | | | | | There used to be 3 things in doxygen/Makefile.am that developers had to update: 1. The dependency list (i.e. all C sources) 2. The setgroup lines, which renamed each module man page to be the page for the first described function. setgroup also set the target for: 3. The add2group lines, which symlinked pages for other documented functions in the group. The new system eliminates all of the above. Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* include: refer to nfnetlink_conntrack.h, not nf_conntrack_netlink.hDuncan Roe2021-07-072-4/+4
| | | | | | | nf_conntrack_netlink.h does not exist, refer to nfnetlink_conntrack.h instead. Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: Correctly identify item for which header is neededDuncan Roe2021-07-071-1/+1
| | | | | | | | Clarify that NFQA_CT requires the CTA_* attribute definitions in nfnetlink_conntrack.h Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* pktbuff: add __pktb_setup()Pablo Neira Ayuso2021-05-271-22/+33
| | | | | | Add private helper function to set up the pkt_buff object. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: doc: `make distcheck` passes with doxygen enabledDuncan Roe2021-05-024-72/+82
| | | | | | | | | | | The main fix is to move fixmanpages.sh to inside doxygen/Makefile.am. This means that in future, developers need to update doxygen/Makefile.am when they add new functions and source files, since fixmanpages.sh is deleted. Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Acked-by: Jan Engelhardt <jengelh@inai.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* doc: Fix man page name for new pkt_buff function for ICMPDuncan Roe2021-03-172-0/+2
| | | | | Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: fix IPv6 header handlingEtan Kissling2021-02-191-2/+13
| | | | | | | | This corrects issues in IPv6 header handling that sometimes resulted in an endless loop. Signed-off-by: Etan Kissling <etan_kissling@apple.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: add pkt_buff function for ICMPEtan Kissling2021-02-094-0/+58
| | | | | | | | Add support for processing ICMP packets using pkt_buff, similar to existing library support for TCP and UDP. Signed-off-by: Etan Kissling <etan_kissling@apple.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* Update .gitignoreJan Engelhardt2020-12-081-0/+4
| | | | | Signed-off-by: Jan Engelhardt <jengelh@inai.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: choose right automake variablesJan Engelhardt2020-12-082-3/+3
| | | | | | | -l is a library selection, needs to go into _LDADD/_LIBADD. Signed-off-by: Jan Engelhardt <jengelh@inai.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: doc: Fix doxygen warningDuncan Roe2020-09-301-4/+0
| | | | | | | | | src/extra/checksum.c had a stray group close sequence at the end. (Spotted after sending doxygen o/p to /dev/null) Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* doc: build: Reduce size of doxygen.cfg and doxygen build o/pDuncan Roe2020-09-302-161/+3
| | | | | | | | | | | | | doxygen.cfg only needs to contain non-default options. Removing other options shaves 4KB (off a 5KB file). Also remove options that are obsolete at the latest doxygen release: PERL_PATH, MSCGEN_PATH and PAPER_TYPE=a4wide (defaults to a4). While being about it, send doxygen stdout to /dev/null to make (future) warnings easier to see. Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: check whether dot is available when configuring doxygen.Jeremy Sowden2020-09-082-1/+5
| | | | | | Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Tested-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* configure: prepare for 1.0.5 releaselibnetfilter_queue-1.0.5Florian Westphal2020-06-121-1/+1
| | | | Signed-off-by: Florian Westphal <fw@strlen.de>
* configure: Make --help show doxygen is off by defaultDuncan Roe2020-06-091-1/+1
| | | | | Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: dist: Add fixmanpages.sh to distribution treeDuncan Roe2020-06-081-0/+1
| | | | | | | Otherwise make distcheck does not include this script. Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* configure: disable doxygen by defaultPablo Neira Ayuso2020-06-081-7/+6
| | | | | | | | doxygen documentation was not enabled in previous releases, let's recover this default behaviour. This is implicitly fixing up `make distcheck' to build the tarballs. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* configure: add --with/without-doxygen switchFlorian Westphal2020-06-071-5/+10
| | | | | | | | | Allows to turn off doxygen even if its installed, via --without-doxygen. Default is to probe for doxygen presence (--with-doxygen). Signed-off-by: Florian Westphal <fw@strlen.de>
* configure: prepare for 1.0.4 releaselibnetfilter_queue-1.0.4Florian Westphal2020-06-052-2/+2
| | | | | | | Also bump libtool version, we added new interfaces, but nothing was removed. Signed-off-by: Florian Westphal <fw@strlen.de>
* configure: fix doxygen checkFlorian Westphal2020-06-041-2/+2
| | | | | | | | AC_OUTPUT must be done after HAVE_DOXYGEN variable has been set, else the varable substitution in doxygen/Makefile.in doesn't work and the Makefile always contains the supposedly conditional section. Signed-off-by: Florian Westphal <fw@strlen.de>
* src: add nfq_get_skbinfo()Florian Westphal2020-02-253-2/+36
| | | | | | | | Silly, since its easy to fetch this via libmnl. Unfortunately there is a large number of software that uses the old API, so add a helper to return the attribute. Signed-off-by: Florian Westphal <fw@strlen.de>
* src: expose nfq_nlmsg_putDuncan Roe2020-02-244-22/+31
| | | | | | | | Move static nfq_hdr_put from examples/nf-queue.c into the library since everyone is going to want it. Also rename nfq_hdr_put to nfq_nlmsg_put. Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: doc: "make" builds & installs a full set of man pagesDuncan Roe2020-02-244-1/+96
| | | | | | | | | | | | | | | | | This enables one to enter "man <any nfq function>" and get the appropriate group man page created by doxygen. - New makefile in doxygen directory. Rebuilds documentation if any sources change that contain doxygen comments, or if fixmanpages.sh changes - New shell script fixmanpages.sh which - Renames each group man page to the first function listed therein - Creates symlinks for subsequently listed functions (if any) - Deletes _* temp files - Update top-level makefile to visit new subdir doxygen - Update top-level configure to only build documentation if doxygen installed Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Florian Westphal <fw@strlen.de>
* Simplify struct pkt_buff: remove tailDuncan Roe2020-01-296-18/+17
| | | | | | | | | | In struct pkt_buff, we only ever needed any 2 of len, data and tail. This has caused bugs in the past, e.g. commit 8a4316f31. Delete tail, and where the value of pktb->tail was required, use new pktb_tail() function. Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: Simplify struct pkt_buff: remove headDuncan Roe2020-01-182-4/+2
| | | | | | | | head and data always had the same value. head was in the minority, so replace with data where it was used. Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: Fix indenting weirdness is pktbuff.c w/out changing indentDuncan Roe2020-01-161-4/+3
| | | | | | | | | In pktb_alloc, declare struct ethhdr *ethhdr at function start, thus avoiding cute braces on case AF_BRIDGE. This costs nothing and generates less code. Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: Fix value returned by nfq_tcp_get_payload_len()Duncan Roe2020-01-101-1/+1
| | | | | | | Remember to subtract the TCP header length. Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: doc: Final polish for current roundDuncan Roe2020-01-104-36/+86
| | | | | | | | | | | | | | | | - Ensure all functions that return something have a \returns - Demote more checksum functions to their own groups (reduces number of functions on main pages) - Clarify wording where appropriate - Add \sa (see also) where appropriate - Fix documented function name for nfq_tcp_get_hdr (no other mismatches noticed, but there may be some) - Add warnings regarding changing length of tcp packet - Make group names unique within libnetfilter_queue (else man pages would be overwritten) Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: Always use pktb as formal arg of type struct pkt_buffDuncan Roe2020-01-037-17/+17
| | | | | | | | | | | All remaining instances of pkt refer to something other than a pkt_buff. In the prototype for nfq_nlmsg_parse, pkt is changed to attr. Inconsistent whitespace in headers has been left for another day. Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au> Signed-off-by: Florian Westphal <fw@strlen.de>