Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Related Pages

ip-util.c File Reference

#include "config.h"
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include "dnet.h"

Go to the source code of this file.

Functions

ssize_t ip_add_option (void *buf, size_t len, int proto, const void *optbuf, size_t optlen)
void ip_checksum (void *buf, size_t len)
int ip_cksum_add (const void *buf, size_t len, int cksum)


Function Documentation

ssize_t ip_add_option void *  buf,
size_t  len,
int  proto,
const void *  optbuf,
size_t  optlen
 

Definition at line 18 of file ip-util.c.

References errno, IP_HDR_LEN_MAX, ip_hdr::ip_hl, ip_hdr::ip_len, IP_OPT_NOP, IP_OPT_TYPEONLY, IP_PROTO_IP, IP_PROTO_TCP, memmove, memset, NULL, and tcp_hdr::th_off.

void ip_checksum void *  buf,
size_t  len
 

Definition at line 79 of file ip-util.c.

References icmp_hdr::icmp_cksum, ICMP_HDR_LEN, ip_cksum_add(), ip_cksum_carry, IP_HDR_LEN, ip_hdr::ip_hl, IP_MF, IP_OFFMASK, IP_PROTO_ICMP, IP_PROTO_IGMP, IP_PROTO_TCP, IP_PROTO_UDP, ip_hdr::ip_sum, TCP_HDR_LEN, tcp_hdr::th_sum, UDP_HDR_LEN, and udp_hdr::uh_sum.

Referenced by __pyx_f_4dnet_ip_checksum(), ip_main(), and ip_send().

int ip_cksum_add const void *  buf,
size_t  len,
int  cksum
 

Definition at line 134 of file ip-util.c.

Referenced by __pyx_f_4dnet_ip_cksum_add(), ip6_checksum(), and ip_checksum().


Generated on Sun May 14 14:51:22 2006 by  doxygen 1.4.2