netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
checksum.c File Reference
#include <stdio.h>
#include <stdbool.h>
#include <arpa/inet.h>
#include <netinet/ip.h>
#include <netinet/ip6.h>
#include <netinet/tcp.h>
#include <libnetfilter_queue/libnetfilter_queue.h>
#include "internal.h"
Include dependency graph for checksum.c:

Functions

uint16_t nfq_checksum (uint32_t sum, uint16_t *buf, int size)
 
uint16_t nfq_checksum_tcpudp_ipv4 (struct iphdr *iph)
 
uint16_t nfq_checksum_tcpudp_ipv6 (struct ip6_hdr *ip6h, void *transport_hdr)
 

Function Documentation

uint16_t nfq_checksum ( uint32_t  sum,
uint16_t *  buf,
int  size 
)

Referenced by nfq_checksum_tcpudp_ipv4(), nfq_checksum_tcpudp_ipv6(), and nfq_ip_set_checksum().

Here is the caller graph for this function:

uint16_t nfq_checksum_tcpudp_ipv4 ( struct iphdr *  iph)

References len, nfq_checksum(), and payload.

Referenced by nfq_tcp_compute_checksum_ipv4(), and nfq_udp_compute_checksum_ipv4().

Here is the call graph for this function:

Here is the caller graph for this function:

uint16_t nfq_checksum_tcpudp_ipv6 ( struct ip6_hdr *  ip6h,
void *  transport_hdr 
)

References len, nfq_checksum(), and payload.

Referenced by nfq_tcp_compute_checksum_ipv6(), and nfq_udp_compute_checksum_ipv6().

Here is the call graph for this function:

Here is the caller graph for this function: