diff options
author | Duncan Roe <duncan_roe@optusnet.com.au> | 2019-10-08 11:49:44 +1100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2019-10-08 12:01:28 +0200 |
commit | ae497107eb8b44e2ad8429a0ffa971ded1fe801c (patch) | |
tree | dda1f42c60a16d5802595c40d269d912d84972a2 /src/extra/ipv4.c | |
parent | a0b7cc0d20429ca1b62f551a4bd528ef7a0ea09b (diff) | |
download | libnetfilter_queue-ae497107eb8b44e2ad8429a0ffa971ded1fe801c.tar.gz |
src: doc: Miscellaneous updates
(These updates only cover functions used in a recent project)
src/extra/ipv4.c: - nfq_ip_set_transport_header(): Add explanatory notes
- nfq_ip_mangle()
- Advise that there is a return code
- Note that IPv4 length is updated as well as checksum
src/extra/pktbuff.c: - pktb_alloc(): Minor rewording (English usage)
- pktb_mangle(): Document
src/extra/udp.c: - nfq_udp_get_hdr(): Fix params
- nfq_udp_get_payload(): Fix params
- nfq_udp_get_payload_len(): Fix params
- nfq_udp_mangle_ipv4(): Rewrite documentation
src/nlmsg.c: - nfq_nlmsg_verdict_put(): Document
- nfq_nlmsg_cfg_put_cmd():
- Change name (was: nfq_nlmsg_cfg_build_request)
- Fix params
- Delete function return documentation (void fn)
- nfq_nlmsg_cfg_put_params(); Document (params only)
- nfq_nlmsg_cfg_put_qmaxlen(): Document (params only)
- nfq_nlmsg_parse:
- Change name (was: nfq_pkt_parse)
- Fix params
Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/extra/ipv4.c')
-rw-r--r-- | src/extra/ipv4.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/extra/ipv4.c b/src/extra/ipv4.c index a93d113..20f3c12 100644 --- a/src/extra/ipv4.c +++ b/src/extra/ipv4.c @@ -59,6 +59,10 @@ EXPORT_SYMBOL(nfq_ip_get_hdr); * nfq_ip_set_transport_header - set transport header * \param pktb: pointer to network packet buffer * \param iph: pointer to the IPv4 header + * + * Sets the \b transport_header field in \b pktb + * + * Level 4 helper functions need this to be set. */ int nfq_ip_set_transport_header(struct pkt_buff *pktb, struct iphdr *iph) { @@ -97,8 +101,9 @@ EXPORT_SYMBOL(nfq_ip_set_checksum); * \param match_len: length of the existing content you want to mangle * \param rep_buffer: pointer to data you want to use to replace current content * \param rep_len: length of data you want to use to replace current content - * - * \note This function recalculates the IPv4 checksum (if needed). + * \returns 1 for success and 0 for failure. See pktb_mangle() for failure case + * \note This function updates the IPv4 length and recalculates the IPv4 + * checksum (if necessary) */ int nfq_ip_mangle(struct pkt_buff *pkt, unsigned int dataoff, unsigned int match_offset, unsigned int match_len, |