OpenHIP 0.9svn1
|
#include <asm/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <sys/types.h>
#include <openssl/bn.h>
#include <openssl/hmac.h>
#include <openssl/rsa.h>
#include <time.h>
#include <hip/hip_proto.h>
Go to the source code of this file.
#define ACCEPTABLE_R1_COUNT_RANGE 2 |
#define DBG | ( | x | ) | x |
#define DSA_PRIV 20 |
#define FALSE 0 |
#define H_PROTO_UDP 17 |
#define HIP_ALIGN 4 |
#define HIP_CONF_FILENAME "hip.conf" |
Referenced by main(), main_loop(), and print_hitgen_usage().
#define HIP_DSA_SIG_SIZE 41 |
Referenced by build_tlv_signature(), and validate_signature().
#define HIP_KEEPALIVE_TIMEOUT 20 |
#define HIP_KEY_SIZE 24 |
Referenced by build_rekey(), and draw_keys().
#define HIP_KNOWNID_FILENAME "known_host_identities.xml" |
Referenced by hipCfg::getEndboxMapsFromLocalFile(), hip_handle_I1(), main_loop(), and publish_hits().
#define HIP_LOCK_FILENAME "hip.pid" |
Referenced by hip_exit(), hip_writelock(), and main_loop().
#define HIP_LOG_FILENAME "hip.log" |
Referenced by init_log().
#define HIP_MYID_FILENAME "my_host_identities.xml" |
Referenced by hipCfgMap::getHITFromLocalFile(), main(), main_loop(), print_hitgen_usage(), and publish_hits().
#define HIP_PUB_PREFIX "" |
Referenced by main().
#define HIP_PUB_SUFFIX "_host_identities.pub.xml" |
Referenced by main().
#define HIP_REG_FILENAME "registered_host_identities.xml" |
#define HIP_RES_SHIM6_BITS 0x01 |
#define HIP_UPDATE_BIND_CHECKS 5 |
Referenced by hip_send_update(), hip_send_update_locators(), and hip_send_update_proxy_ticket().
#define HIPA_DST | ( | h | ) | ((struct sockaddr*)&h->peer_hi->addrs.addr) |
Referenced by complete_base_exchange(), find_hip_association(), find_hip_association3(), handle_reg_request(), handle_update_readdress(), hip_check_next_rvs(), hip_handle_I1(), hip_handle_I2(), hip_handle_notify(), hip_handle_R1(), hip_handle_R2(), hip_handle_update(), hip_parse_I2(), hip_send_close(), hip_send_I1(), hip_send_I2(), hip_send_notify(), hip_send_R2(), hip_send_update(), hip_send_update_locators(), hip_send_update_proxy_ticket(), hip_send_update_relay(), hip_trigger(), hip_trigger_rvs(), log_hipa_fromto(), log_sa_info(), readdress_association(), readdress_association_x2(), rebuild_sa(), and start_base_exchange().
#define HIPA_DST_LSI | ( | h | ) | ((struct sockaddr*)&h->peer_hi->lsi) |
Referenced by complete_base_exchange(), rebuild_sa(), and rebuild_sa_x2().
#define HIPA_SRC | ( | h | ) | ((struct sockaddr*)&h->hi->addrs.addr) |
Referenced by association_add_address(), complete_base_exchange(), find_hip_association(), find_hip_association3(), handle_update_readdress(), hip_check_next_rvs(), hip_handle_notify(), hip_parse_I2(), hip_send_close(), hip_send_I1(), hip_send_I2(), hip_send_notify(), hip_send_R2(), hip_send_update(), hip_send_update_locators(), hip_send_update_proxy_ticket(), hip_send_update_relay(), hip_trigger(), hip_trigger_rvs(), log_hipa_fromto(), log_sa_info(), readdress_association(), readdress_association_x2(), rebuild_sa(), and start_base_exchange().
#define HIPA_SRC_LSI | ( | h | ) | ((struct sockaddr*)&h->hi->lsi) |
Referenced by complete_base_exchange(), rebuild_sa(), and rebuild_sa_x2().
#define HIT2LSI | ( | a | ) |
#define HIT_PREFIX_SHA1_32BITS 0x20010010 |
Referenced by hi_to_hit(), and hipCfg::hi_to_hit().
#define HIT_SIZE 16 |
#define KEYMAT_SIZE (4 * NUMKEYS * HIP_KEY_SIZE) |
Referenced by build_rekey(), compute_keymat(), draw_keys(), draw_mr_key(), hip_parse_R1(), and replace_hip_assoc().
#define LOCATOR_PREFERRED 0x01 |
#define LOCATOR_TRAFFIC_TYPE_BOTH 0x00 |
#define LOCATOR_TRAFFIC_TYPE_DATA 0x02 |
#define LOCATOR_TRAFFIC_TYPE_SIGNALING 0x01 |
#define LOCATOR_TYPE_IPV6 0x00 |
#define LOCATOR_TYPE_SPI_IPV6 0x01 |
#define MAX_CERT_LEN 128 |
Referenced by calculate_r1_length(), and handle_cert().
#define MAX_CONNECTIONS MAX_HITS |
Referenced by free_hip_assoc(), and init_hip_assoc().
#define MAX_HI_BITS 2048 |
Referenced by hip_send_I2(), hip_send_notify(), hip_send_R2(), and key_data_to_hi().
#define MAX_HI_NAMESIZE 255 |
#define MAX_HITS 255 |
#define MAX_LOCATORS 8 |
Referenced by build_tlv_locators(), hip_parse_update(), hip_send_update(), and hip_send_update_locators().
#define MAX_MR_CLIENTS MAX_CONNECTIONS |
#define MAX_OPAQUE_SIZE 255 |
Referenced by hip_parse_close(), hip_parse_R1(), hip_parse_update(), hip_send_close(), hip_send_I2(), and hip_send_update().
#define MAX_REGISTRATION_TYPES 8 |
Referenced by build_tlv_reg_info(), hip_send_I2(), and main_loop().
#define MAX_REGISTRATIONS 1024 |
#define MAX_SIG_SIZE 512 |
#define NUMKEYS 8 |
Referenced by draw_keys(), and replace_hip_assoc().
#define R1_CACHE_SIZE 8 |
Referenced by compute_R1_cache_index(), init_R1_cache(), and replace_next_R1().
#define SA | ( | x | ) | ((struct sockaddr*)x) |
Referenced by add_address_to_iface(), add_other_addresses_to_hi(), association_del_address(), build_tlv_locators(), check_and_set_tun_address(), check_esp_packet(), check_hip_packet(), complete_base_exchange(), do_inbound_esp_packet(), do_outbound_esp_packet(), generate_HI(), get_hip_dns_server(), hipCfgMap::getHITFromCert(), hipCfgMap::getHITFromLocalFile(), handle_dns_request(), handle_notify_loss(), handle_update_readdress(), hi_to_xml(), hip_check_next_rvs(), hip_convert_lsi_to_peer(), hip_dht_resolve_hi(), hip_dht_update_my_entries(), hip_esp_decrypt(), hip_esp_encrypt(), hip_esp_output(), hip_exit(), hip_handle_esp(), hip_handle_I1(), hip_handle_locator_state_timeouts(), hip_handle_multihoming_timeouts(), hip_handle_update(), hip_mobile_router(), hip_mr_handle_address_change(), hip_mr_retransmit(), hip_mr_set_external_ifs(), hip_parse_R1(), hip_parse_update(), hip_retransmit_waiting_packets(), hip_sadb_add(), hip_sadb_delete(), hip_send_I1(), hip_send_update(), hip_xmlrpc_getput(), hip_xmlrpc_rm(), hit_to_str(), hipCfg::hitstr2lsistr(), init_dns_socket(), init_esp_input(), init_hip_mr_client(), init_tap(), log_hipa_fromto(), main_loop(), hipCfg::mkHIfromPkey(), mr_process_CLOSE(), mr_process_I1(), mr_process_I2_or_R2(), mr_process_R1(), mr_process_update(), multihoming_update(), netfilter_get_packet(), netfilter_queue_init(), netfilter_queue_sendmsg(), post_init_tap(), print_hi_to_buff(), publish_my_hits_thread(), rebuild_sa(), rebuild_sa_x2(), receive_udp_hip_packet(), select_preferred_address(), send_updates(), start_base_exchange(), start_loss_multihoming(), and update_peer_list().
#define SA2IP | ( | x | ) |
(((struct sockaddr*)x)->sa_family == AF_INET) ? \ (__u8*)&((struct sockaddr_in*)x)->sin_addr : \ (__u8*)&((struct sockaddr_in6*)x)->sin6_addr
Referenced by add_address_to_iface(), hipCfg::add_address_to_list(), add_address_to_list(), add_from_via(), add_ipv6_header(), add_ipv6_pseudo_header(), addr_match_payload(), addr_to_str(), hipCfg::addr_to_str(), association_del_address(), build_hdrr(), build_spi_locator(), check_hip_packet(), delete_address_from_list(), do_outbound_esp_packet(), endbox_check_cert(), esp_signal_loss(), find_hip_association(), find_hip_association3(), finish_address_check(), generate_HI(), get_my_addresses(), get_other_addr_from_list(), get_preferred_lsi(), handle_locators(), handle_notify_loss(), handle_nsol(), hi_to_xml(), hip_check_next_rvs(), hip_convert_lsi_to_peer(), hip_dht_lookup_address(), hip_esp_decrypt(), hip_esp_output(), hip_handle_I1(), hip_handle_multihoming_timeouts(), hip_handle_netlink(), hip_handle_packet(), hip_handle_update(), hip_lookup_lsi(), hip_mobile_router(), hip_mr_handle_address_change(), hip_mr_retransmit(), hip_mr_set_external_ifs(), hip_parse_R1(), hip_parse_update(), hip_sadb_add(), hip_sadb_add_dst_entry(), hip_sadb_delete_dst_entry(), hip_sadb_inc_loss(), hip_sadb_lookup_addr(), hip_sadb_reset_loss(), hip_send_proxy_update(), hip_send_update(), hipCfg::hit2hitstr(), hit_lookup(), hit_to_sockaddr(), hipCfg::hitstr2hit(), init_tap(), is_my_address(), is_valid_packet(), lsi_lookup(), hipCfg::mkHIfromPkey(), mr_process_I1(), mr_process_R1(), mr_process_update(), multihoming_update(), parse_xml_hostid(), read_identities_file(), rewrite_addrs(), select_preferred_address(), set_preferred_address_in_list(), str_to_addr(), hipCfg::str_to_addr(), and update_peer_list().
#define SA2PORT | ( | x | ) |
(((struct sockaddr*)x)->sa_family == AF_INET) ? \ ((struct sockaddr_in*)x)->sin_port : \ ((struct sockaddr_in6*)x)->sin6_port
#define SAIPLEN | ( | x | ) | (((struct sockaddr*)x)->sa_family == AF_INET) ? 4 : 16 |
Referenced by add_address_to_iface(), hipCfg::add_address_to_list(), add_address_to_list(), add_from_via(), addr_match_payload(), association_del_address(), build_hdrr(), build_spi_locator(), check_hip_packet(), delete_address_from_list(), do_outbound_esp_packet(), esp_signal_loss(), find_hip_association(), find_hip_association3(), finish_address_check(), get_other_addr_from_list(), handle_locators(), handle_notify_loss(), hip_check_next_rvs(), hip_convert_lsi_to_peer(), hip_dht_lookup_address(), hip_esp_decrypt(), hip_esp_output(), hip_handle_I1(), hip_handle_multihoming_timeouts(), hip_handle_packet(), hip_handle_update(), hip_lookup_lsi(), hip_mobile_router(), hip_mr_handle_address_change(), hip_mr_retransmit(), hip_mr_set_external_ifs(), hip_parse_R1(), hip_parse_update(), hip_sadb_add_dst_entry(), hip_sadb_delete_dst_entry(), hip_sadb_inc_loss(), hip_sadb_lookup_addr(), hip_sadb_reset_loss(), hip_send_proxy_update(), hip_send_update(), hipCfg::hit2hitstr(), hit_lookup(), is_my_address(), lsi_lookup(), mr_process_I1(), mr_process_R1(), mr_process_update(), multihoming_update(), rewrite_addrs(), select_preferred_address(), and set_preferred_address_in_list().
#define SALEN | ( | x | ) |
(((struct sockaddr*)x)->sa_family == AF_INET) ? \ sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6)
Referenced by hipCfg::add_address_to_list(), add_address_to_list(), add_addresses_from_dns(), add_peer_hit(), addr_to_str(), hipCfg::addr_to_str(), association_add_address(), copy_for_retrans(), create_lsi_entry(), do_outbound_esp_packet(), forward_dns_request(), get_addr_from_list(), get_other_addr_from_list(), get_request_info(), handle_update_readdress(), hip_check_bind(), hip_check_next_rvs(), hip_convert_lsi_to_peer(), hip_dht_resolve_hi(), hip_dht_select_server(), hip_esp_output(), hip_handle_R1(), hip_handle_status_request(), hip_mobile_router(), hip_mr_retransmit(), hip_parse_I2(), hip_retransmit(), hip_sadb_add(), hip_sadb_add_dst_entry(), hip_send(), hip_trigger(), hip_trigger_rvs(), hip_xmlrpc_getput(), hipCfg::hit2hitstr(), init_esp_input(), init_hip_assoc(), init_hip_mr_client(), mr_process_I2_or_R2(), multihoming_update(), parse_xml_hostid(), queue_request_info(), readdress_association(), readdress_association_x2(), send_dns_response(), send_hip_dns_lookup(), send_updates(), start_base_exchange(), str_to_addr(), hipCfg::str_to_addr(), and update_peer_list().
#define SPI_RESERVED 255 |
#define TDIFF | ( | a, | |
b | |||
) | ((a).tv_sec - (b).tv_sec) |
#define TRUE 1 |
#define yesno | ( | x | ) | x ? "yes" : "no" |
Referenced by generate_HI(), hi_to_xml(), and log_hipopts().
#define YLIFE | ( | x | ) | ((float)x - (float)64) / (float)8 |
Referenced by build_tlv_reg_req(), build_tlv_reg_resp(), check_reg_info(), and hip_handle_registrations().
typedef struct _dh_cache_entry dh_cache_entry |
typedef struct _hip_assoc hip_assoc |
typedef pthread_cond_t hip_cond_t |
typedef pthread_mutex_t hip_mutex_t |
typedef struct _hipcookie hipcookie |
typedef struct _pseudo_header pseudo_header |
typedef struct _pseudo_header6 pseudo_header6 |
typedef struct _r1_cache_entry r1_cache_entry |
typedef struct _sockaddr_list sockaddr_list |
typedef struct _thread_arg thread_arg |
typedef struct _tlv_auth_ticket tlv_auth_ticket |
typedef struct _tlv_encrypted tlv_encrypted |
typedef struct _tlv_esp_info tlv_esp_info |
typedef struct _tlv_esp_transform tlv_esp_transform |
typedef struct _tlv_hip_sig tlv_hip_sig |
typedef struct _tlv_hip_transform tlv_hip_transform |
typedef struct _tlv_host_id tlv_host_id |
typedef struct _tlv_locator tlv_locator |
typedef struct _tlv_notify tlv_notify |
typedef struct _tlv_proxy_ticket tlv_proxy_ticket |
typedef struct _tlv_puzzle tlv_puzzle |
typedef struct _tlv_r1_counter tlv_r1_counter |
typedef struct _tlv_reg_failed tlv_reg_failed |
typedef struct _tlv_reg_info tlv_reg_info |
typedef struct _tlv_reg_request tlv_reg_request |
typedef struct _tlv_reg_response tlv_reg_response |
typedef struct _tlv_solution tlv_solution |
typedef struct _tlv_via_rvs tlv_via_rvs |
enum DEBUG_MODES |
enum ESP_MESSAGES |
enum LOG_LEVELS |
enum REG_STATES |
enum REQ_FAILURE_CODES |
struct _tlv_diffie_hellman __attribute__ | ( | (packed) | ) |
Referenced by build_tlv_dh(), and new_dh_cache_entry().
Referenced by checksum_packet(), checksum_udp_packet(), handle_acks(), handle_hi(), handle_reg_failed(), handle_reg_info(), handle_reg_request(), handle_reg_response(), hip_dht_lookup_address(), hip_parse_close(), hip_parse_I1(), hip_parse_I2(), hip_parse_notify(), hip_parse_R1(), hip_parse_R2(), hip_parse_update(), main(), main_loop(), mr_process_I2_or_R2(), mr_process_R1(), mr_process_update(), and validate_signature().
Referenced by handle_dh(), IfmapClient::publishCurrentState(), and IfmapClient::publishUnderlayIp().
Referenced by add_reg_info(), handle_dns_request(), hip_dht_lookup_address(), hip_handle_status_request(), hip_parse_close(), hip_parse_I1(), hip_parse_I2(), hip_parse_notify(), hip_parse_R1(), hip_parse_R2(), hip_parse_update(), mr_process_I2_or_R2(), mr_process_R1(), mr_process_update(), netfilter_queue_command_hdr(), and select_preferred_address().