1 /******************************************************************************
2 Author: Samuel Jero <sj323707@ohio.edu>
6 Description: IPv4 and IPv6 Checksum code
7 ******************************************************************************/
12 #include <sys/types.h>
14 #define IP4_ADDR_LEN 4
15 #define IP6_ADDR_LEN 16
17 u_int16_t ipv6_pseudohdr_chksum(unsigned char* buff, int len, unsigned char* dest, unsigned char* src, int type);
18 u_int16_t ipv4_pseudohdr_chksum(unsigned char* buff, int len, unsigned char* dest, unsigned char* src, int type);
19 u_int16_t ipv4_chksum(unsigned char* buff, int len);