OpenHIP 0.9svn1
Classes | Defines | Typedefs | Functions
/home/tomh/svn/openhip/hip/trunk/src/util/checksum_test.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <asm/types.h>

Classes

struct  _pseudo_header
struct  _hiphdr

Defines

#define HIP_OVER_UDP   0
#define IPV6   1
#define IPPROTO_NONE   59
#define H_PROTO_HIP   139
#define HIP_I1   1
#define HIP_VERSION   1
#define IPV4_PSEUDO_SIZE   12
#define IPV6_PSEUDO_SIZE   40
#define HIT_SIZE   16
#define HIT_SNDR   "0x20010010000000000000000000000001"
#define HIT_RCVR   "0x20010010000000000000000000000002"
#define IPV4_SRC   "0xc0a80001"
#define IPV4_DST   "0xc0a80002"

Typedefs

typedef struct _pseudo_header pseudo_header
typedef unsigned char hip_hit [16]
typedef struct _hiphdr hiphdr

Functions

static __u16 checksum_packet (char *, __u32, __u32)
static int hex_to_bin (char *, char *, int)
int main (int argc, char *argv[])

Define Documentation

#define H_PROTO_HIP   139

Referenced by checksum_packet().

#define HIP_I1   1

Referenced by main().

#define HIP_OVER_UDP   0
#define HIP_VERSION   1

Referenced by main().

#define HIT_RCVR   "0x20010010000000000000000000000002"

Referenced by main().

#define HIT_SIZE   16

Referenced by main().

#define HIT_SNDR   "0x20010010000000000000000000000001"

Referenced by main().

#define IPPROTO_NONE   59
#define IPV4_DST   "0xc0a80002"

Referenced by main().

#define IPV4_PSEUDO_SIZE   12

Referenced by checksum_packet(), and main().

#define IPV4_SRC   "0xc0a80001"

Referenced by main().

#define IPV6   1
#define IPV6_PSEUDO_SIZE   40

Referenced by checksum_packet(), and main().


Typedef Documentation

typedef unsigned char hip_hit[16]
typedef struct _hiphdr hiphdr
typedef struct _pseudo_header pseudo_header

Function Documentation

static __u16 checksum_packet ( char *  data,
__u32  src,
__u32  dst 
) [static]
static int hex_to_bin ( char *  src,
char *  dst,
int  dst_len 
) [static]
int main ( int  argc,
char *  argv[] 
)