summaryrefslogtreecommitdiffstats
path: root/src/extra/ipv4.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2012-08-20 19:48:05 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2012-08-20 19:48:05 +0200
commit1eab5bedb6f024e5512d485ffd81d18d978ef3e3 (patch)
treeb29a78b7bd4593ca5441ba7a4889056e164ae2c8 /src/extra/ipv4.c
parent3c42a36f3f170860b28d47ef028301276b78378b (diff)
src: update doxygen documentation for new API for libmnl
This patch updates the doxygen documentation for the new API. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/extra/ipv4.c')
-rw-r--r--src/extra/ipv4.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/extra/ipv4.c b/src/extra/ipv4.c
index ce101ef..d7f1f69 100644
--- a/src/extra/ipv4.c
+++ b/src/extra/ipv4.c
@@ -56,9 +56,9 @@ struct iphdr *nfq_ip_get_hdr(struct pkt_buff *pktb)
EXPORT_SYMBOL(nfq_ip_get_hdr);
/**
- * nfq_ip_get_payload - get the IPv4 packet payload
+ * nfq_ip_set_transport_header - set transport header
* \param pktb: pointer to network packet buffer
- * \param iph: the pointer to the IPv4 header
+ * \param iph: pointer to the IPv4 header
*/
int nfq_ip_set_transport_header(struct pkt_buff *pktb, struct iphdr *iph)
{
@@ -77,8 +77,6 @@ EXPORT_SYMBOL(nfq_ip_set_transport_header);
* nfq_ip_set_checksum - set IPv4 checksum
* \param iph: pointer to the IPv4 header
*
- * \returns the checksum of the ip packet.
- *
* \note Call to this function if you modified the IPv4 header to update the
* checksum.
*/
@@ -91,6 +89,17 @@ void nfq_ip_set_checksum(struct iphdr *iph)
}
EXPORT_SYMBOL(nfq_ip_set_checksum);
+/**
+ * nfq_ip_mangle - mangle IPv4 packet buffer
+ * \param pktb: pointer to network packet buffer
+ * \param dataoff: offset to layer 4 header
+ * \param match_offset: offset to content that you want to mangle
+ * \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).
+ */
int nfq_ip_mangle(struct pkt_buff *pkt, unsigned int dataoff,
unsigned int match_offset, unsigned int match_len,
const char *rep_buffer, unsigned int rep_len)