GNUnet 0.22.1
tun.c File Reference
#include "platform.h"
#include "gnunet_util_lib.h"
Include dependency graph for tun.c:

Go to the source code of this file.

Macros

#define FRESH_TTL   64
 IP TTL we use for packets that we assemble (8 bit unsigned integer) More...
 

Functions

void GNUNET_TUN_initialize_ipv4_header (struct GNUNET_TUN_IPv4Header *ip, uint8_t protocol, uint16_t payload_length, const struct in_addr *src, const struct in_addr *dst)
 Initialize an IPv4 header. More...
 
void GNUNET_TUN_initialize_ipv6_header (struct GNUNET_TUN_IPv6Header *ip, uint8_t protocol, uint16_t payload_length, const struct in6_addr *src, const struct in6_addr *dst)
 Initialize an IPv6 header. More...
 
void GNUNET_TUN_calculate_tcp4_checksum (const struct GNUNET_TUN_IPv4Header *ip, struct GNUNET_TUN_TcpHeader *tcp, const void *payload, uint16_t payload_length)
 Calculate IPv4 TCP checksum. More...
 
void GNUNET_TUN_calculate_tcp6_checksum (const struct GNUNET_TUN_IPv6Header *ip, struct GNUNET_TUN_TcpHeader *tcp, const void *payload, uint16_t payload_length)
 Calculate IPv6 TCP checksum. More...
 
void GNUNET_TUN_calculate_udp4_checksum (const struct GNUNET_TUN_IPv4Header *ip, struct GNUNET_TUN_UdpHeader *udp, const void *payload, uint16_t payload_length)
 Calculate IPv4 UDP checksum. More...
 
void GNUNET_TUN_calculate_udp6_checksum (const struct GNUNET_TUN_IPv6Header *ip, struct GNUNET_TUN_UdpHeader *udp, const void *payload, uint16_t payload_length)
 Calculate IPv6 UDP checksum. More...
 
void GNUNET_TUN_calculate_icmp_checksum (struct GNUNET_TUN_IcmpHeader *icmp, const void *payload, uint16_t payload_length)
 Calculate ICMP checksum. More...
 
int GNUNET_TUN_sockaddr_cmp (const struct sockaddr *sa, const struct sockaddr *sb, int include_port)
 Check if two sockaddrs are equal. More...
 

Macro Definition Documentation

◆ FRESH_TTL

#define FRESH_TTL   64

IP TTL we use for packets that we assemble (8 bit unsigned integer)

Definition at line 34 of file tun.c.