/home/tomh/openhip/hip-0.5/src/usermode/hip_sadb.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/errno.h>
#include <sys/time.h>
#include <netinet/ip.h>
#include <netinet/ip6.h>
#include <netinet/tcp.h>
#include <netinet/udp.h>
#include <hip/hip_service.h>
#include <hip/hip_types.h>
#include <hip/hip_sadb.h>
#include <hip/hip_funcs.h>
#include <win32/pfkeyv2.h>

Functions

hip_lsi_entrycreate_lsi_entry (struct sockaddr *lsi)
void free_addr_list (sockaddr_list *a)
int hip_sadb_delete_entry (hip_sadb_entry *entry)
hip_lsi_entryhip_lookup_lsi_by_addr (struct sockaddr *addr)
hip_lsi_entryhip_lookup_lsi (struct sockaddr *lsi)
int hip_sadb_add_dst_entry (struct sockaddr *addr, hip_sadb_entry *entry)
int hip_sadb_delete_dst_entry (struct sockaddr *addr)
hip_proto_sel_entryhip_lookup_sel_entry (__u32 lsi, __u8 proto, __u8 *header, int dir)
__u32 hip_proto_header_to_selector (__u32 lsi, __u8 proto, __u8 *header, int dir)
hip_proto_sel_entryhip_remove_proto_sel_entry (hip_proto_sel_entry *prev, hip_proto_sel_entry *entry)
int sadb_hashfn (__u32 spi)
int sadb_dst_hashfn (struct sockaddr *dst)
void hip_sadb_init ()
int hip_sadb_add (__u32 type, __u32 mode, struct sockaddr *inner_src, struct sockaddr *inner_dst, struct sockaddr *src, struct sockaddr *dst, __u16 port, __u32 spi, __u8 *e_key, __u32 e_type, __u32 e_keylen, __u8 *a_key, __u32 a_type, __u32 a_keylen, __u32 lifetime, __u16 hitmagic)
int hip_sadb_delete (__u32 type, struct sockaddr *src, struct sockaddr *dst, __u32 spi)
void hip_remove_expired_lsi_entries ()
void hip_add_lsi (struct sockaddr *addr, struct sockaddr *lsi4, struct sockaddr *lsi6)
int buffer_packet (struct sockaddr *lsi, __u8 *data, int len)
void unbuffer_packets (hip_lsi_entry *entry)
hip_sadb_entryhip_sadb_lookup_spi (__u32 spi)
hip_sadb_entryhip_sadb_lookup_addr (struct sockaddr *addr)
hip_sadb_entryhip_sadb_get_next (hip_sadb_entry *placemark)
int hip_select_family_by_proto (__u32 lsi, __u8 proto, __u8 *header, struct timeval *now)
int hip_add_proto_sel_entry (__u32 lsi, __u8 proto, __u8 *header, int family, int dir, struct timeval *now)
void hip_remove_expired_sel_entries ()

Variables

int readsp [2]
long g_read_usec
hip_sadb_entry hip_sadb [SADB_SIZE]
hip_sadb_dst_entry hip_sadb_dst [SADB_SIZE]
hip_lsi_entrylsi_temp = NULL
hip_proto_sel_entry hip_proto_sel [PROTO_SEL_SIZE]

Function Documentation

int buffer_packet ( struct sockaddr *  lsi,
__u8 data,
int  len 
)

hip_lsi_entry * create_lsi_entry ( struct sockaddr *  lsi  ) 

void free_addr_list ( sockaddr_list a  ) 

void hip_add_lsi ( struct sockaddr *  addr,
struct sockaddr *  lsi4,
struct sockaddr *  lsi6 
)

int hip_add_proto_sel_entry ( __u32  lsi,
__u8  proto,
__u8 header,
int  family,
int  dir,
struct timeval *  now 
)

hip_lsi_entry* hip_lookup_lsi ( struct sockaddr *  lsi  ) 

hip_lsi_entry * hip_lookup_lsi_by_addr ( struct sockaddr *  addr  ) 

hip_proto_sel_entry * hip_lookup_sel_entry ( __u32  lsi,
__u8  proto,
__u8 header,
int  dir 
)

__u32 hip_proto_header_to_selector ( __u32  lsi,
__u8  proto,
__u8 header,
int  dir 
)

void hip_remove_expired_lsi_entries (  ) 

void hip_remove_expired_sel_entries (  ) 

hip_proto_sel_entry * hip_remove_proto_sel_entry ( hip_proto_sel_entry prev,
hip_proto_sel_entry entry 
)

int hip_sadb_add ( __u32  type,
__u32  mode,
struct sockaddr *  inner_src,
struct sockaddr *  inner_dst,
struct sockaddr *  src,
struct sockaddr *  dst,
__u16  port,
__u32  spi,
__u8 e_key,
__u32  e_type,
__u32  e_keylen,
__u8 a_key,
__u32  a_type,
__u32  a_keylen,
__u32  lifetime,
__u16  hitmagic 
)

int hip_sadb_add_dst_entry ( struct sockaddr *  addr,
hip_sadb_entry entry 
)

int hip_sadb_delete ( __u32  type,
struct sockaddr *  src,
struct sockaddr *  dst,
__u32  spi 
)

int hip_sadb_delete_dst_entry ( struct sockaddr *  addr  ) 

int hip_sadb_delete_entry ( hip_sadb_entry entry  ) 

hip_sadb_entry* hip_sadb_get_next ( hip_sadb_entry placemark  ) 

void hip_sadb_init (  ) 

hip_sadb_entry* hip_sadb_lookup_addr ( struct sockaddr *  addr  ) 

hip_sadb_entry* hip_sadb_lookup_spi ( __u32  spi  ) 

int hip_select_family_by_proto ( __u32  lsi,
__u8  proto,
__u8 header,
struct timeval *  now 
)

int sadb_dst_hashfn ( struct sockaddr *  dst  ) 

int sadb_hashfn ( __u32  spi  ) 

void unbuffer_packets ( hip_lsi_entry entry  ) 


Variable Documentation

long g_read_usec

hip_proto_sel_entry hip_proto_sel[PROTO_SEL_SIZE]

hip_sadb_entry hip_sadb[SADB_SIZE]

hip_sadb_dst_entry hip_sadb_dst[SADB_SIZE]

hip_lsi_entry* lsi_temp = NULL

int readsp[2]


Generated on Mon Oct 22 11:43:44 2007 for OpenHIP by  doxygen 1.5.1