OpenHIP 0.9svn1
|
#include <stdio.h>
#include <unistd.h>
#include <pthread.h>
#include <sys/uio.h>
#include <string.h>
#include <errno.h>
#include <hip/hip_service.h>
#include <hip/hip_types.h>
#include <hip/hip_sadb.h>
#include <hip/hip_status.h>
#include <hip/hip_funcs.h>
Defines | |
#define | STATBUFSIZE 4096 |
Functions | |
void | handle_status_request (int type, char *buff, int *len) |
void | dump_sadb (char *buff, int *tlv_len, __u32 spi) |
void | dump_dst_entries (char *buff, int *tlv_len) |
void | dump_lsi_entries (char *buff, int *tlv_len) |
void | dump_all_spi (char *buff, int *tlv_len) |
int | sadb_hashfn (__u32 spi) |
void * | hip_status (void *arg) |
int | sockaddr_list_length (sockaddr_list *l) |
Variables | |
hip_sadb_entry * | hip_sadb [SADB_SIZE] |
hip_mutex_t | hip_sadb_locks [SADB_SIZE] |
hip_sadb_dst_entry * | hip_sadb_dst [SADB_SIZE] |
hip_mutex_t | hip_sadb_dst_locks [SADB_SIZE] |
hip_lsi_entry * | lsi_temp |
#define STATBUFSIZE 4096 |
Referenced by dump_sadb(), and hip_status().
void dump_all_spi | ( | char * | buff, |
int * | tlv_len | ||
) |
References ADD_ITEM, HIP_STATUS_REPLY_ALL_SPI, _hip_sadb_entry::next, SADB_SIZE, _hip_sadb_entry::spi, status_tlv::tlv_len, and status_tlv::tlv_type.
Referenced by handle_status_request().
void dump_dst_entries | ( | char * | buff, |
int * | tlv_len | ||
) |
void dump_lsi_entries | ( | char * | buff, |
int * | tlv_len | ||
) |
References ADD_ITEM, _hip_lsi_entry::addr, _hip_lsi_entry::creation_time, HIP_STATUS_REPLY_LSI_ENTRY, _hip_lsi_entry::lsi4, _hip_lsi_entry::lsi6, _hip_lsi_entry::next, _hip_lsi_entry::next_packet, _hip_lsi_entry::num_packets, _hip_lsi_entry::send_packets, status_tlv::tlv_len, and status_tlv::tlv_type.
Referenced by handle_status_request().
void dump_sadb | ( | char * | buff, |
int * | tlv_len, | ||
__u32 | spi | ||
) |
References _hip_sadb_entry::a_keylen, _hip_sadb_entry::a_type, ADD_ITEM, _sockaddr_list::addr, _hip_sadb_entry::bytes, _hip_sadb_entry::direction, _hip_sadb_entry::dst_addrs, _hip_sadb_entry::e_keylen, _hip_sadb_entry::e_type, HIP_STATUS_REPLY_ADDR, HIP_STATUS_REPLY_SADB, _hip_sadb_entry::hit_magic, _hip_sadb_entry::lifetime, _hip_sadb_entry::lsi, _hip_sadb_entry::mode, _sockaddr_list::next, _hip_sadb_entry::next, _hip_sadb_entry::rw_lock, sadb_hashfn(), SADB_SIZE, _hip_sadb_entry::sequence, sockaddr_list_length(), _hip_sadb_entry::spi, _hip_sadb_entry::src_addrs, STATBUFSIZE, status_tlv::tlv_len, and status_tlv::tlv_type.
Referenced by handle_status_request().
void handle_status_request | ( | int | type, |
char * | buff, | ||
int * | len | ||
) |
References dump_all_spi(), dump_dst_entries(), dump_lsi_entries(), dump_sadb(), HIP_STATUS_REPLY_DONE, HIP_STATUS_REPLY_ERROR, HIP_STATUS_REPLY_STRING, STAT_ALL_SPI, STAT_DST, STAT_LSI, STAT_MAX, STAT_MIN, STAT_SADB, STAT_THREADS, status_tlv::tlv_len, and status_tlv::tlv_type.
Referenced by hip_status().
void* hip_status | ( | void * | arg | ) |
References g_state, handle_status_request(), STATBUFSIZE, status_tlv::tlv_type, and WIN_STATUS_PORT.
Referenced by init_hip().
int sadb_hashfn | ( | __u32 | spi | ) |
References SADB_SIZE.
Referenced by dump_sadb(), hip_sadb_add(), hip_sadb_add_del_addr(), hip_sadb_delete_entry(), and hip_sadb_lookup_spi().
int sockaddr_list_length | ( | sockaddr_list * | l | ) |
References _sockaddr_list::next.
Referenced by dump_sadb().
hip_sadb_entry* hip_sadb[SADB_SIZE] |
hip_sadb_dst_entry* hip_sadb_dst[SADB_SIZE] |
hip_mutex_t hip_sadb_dst_locks[SADB_SIZE] |
Referenced by hip_sadb_add_dst_entry(), hip_sadb_deinit(), hip_sadb_delete_dst_entry(), hip_sadb_init(), and hip_sadb_lookup_addr().
hip_mutex_t hip_sadb_locks[SADB_SIZE] |
Referenced by hip_remove_expired_lsi_entries(), and hip_sadb_deinit().