OpenHIP 0.9svn1
|
#include <sys/socket.h>
Go to the source code of this file.
Classes | |
struct | ip_esp_hdr |
struct | ip_esp_padinfo |
struct | eth_hdr |
struct | arp_hdr |
struct | arp_req_data |
Defines | |
#define | RETNULL NULL; |
#define | CONFIG_HIP |
#define | HIP_TAP_INTERFACE_MTU 1400 |
#define | DNS_PORT 53 |
#define | HIP_DNS_SUFFIX ".hip" |
#define | IS_LSI32(a) ((a & htonl(0xFF000000)) == htonl(0x01000000)) |
#define | NIPQUAD(addr) |
#define | NIP6(addr) |
#define | TRUE 1 |
#define | FALSE 0 |
#define | ARPOP_REQUEST 1 |
#define | ARPOP_REPLY 2 |
Functions | |
void * | hip_esp_output (void *arg) |
void * | hip_esp_input (void *arg) |
void * | tunreader (void *arg) |
void * | hip_dns (void *arg) |
void * | hipd_main (void *arg) |
void * | hip_netlink (void *arg) |
void * | hip_status (void *arg) |
void * | hip_mobile_router (void *arg) |
int | init_esp_input (int family, int type, int proto, int port, char *msg) |
int | main_loop (int argc, char **argv) |
int | str_to_addr (unsigned char *data, struct sockaddr *addr) |
struct eth_hdr | __attribute__ ((packed)) |
Variables | |
__u64 | g_tap_mac |
int | g_state |
__u8 | dst [6] |
__u8 | src [6] |
__u16 | type |
__u16 | ar_hrd |
__u16 | ar_pro |
__u8 | ar_hln |
__u8 | ar_pln |
__u16 | ar_op |
__u8 | src_mac [6] |
__u32 | src_ip |
__u8 | dst_mac [6] |
__u32 | dst_ip |
#define ARPOP_REPLY 2 |
Referenced by handle_arp().
#define ARPOP_REQUEST 1 |
Referenced by handle_arp().
#define CONFIG_HIP |
#define DNS_PORT 53 |
#define FALSE 0 |
#define HIP_DNS_SUFFIX ".hip" |
#define HIP_TAP_INTERFACE_MTU 1400 |
Referenced by post_init_tap().
#define IS_LSI32 | ( | a | ) | ((a & htonl(0xFF000000)) == htonl(0x01000000)) |
#define NIP6 | ( | addr | ) |
ntohs((addr).s6_addr16[0]), \ ntohs((addr).s6_addr16[1]), \ ntohs((addr).s6_addr16[2]), \ ntohs((addr).s6_addr16[3]), \ ntohs((addr).s6_addr16[4]), \ ntohs((addr).s6_addr16[5]), \ ntohs((addr).s6_addr16[6]), \ ntohs((addr).s6_addr16[7])
#define NIPQUAD | ( | addr | ) |
((unsigned char *)&addr)[0], \ ((unsigned char *)&addr)[1], \ ((unsigned char *)&addr)[2], \ ((unsigned char *)&addr)[3]
#define RETNULL NULL; |
#define TRUE 1 |
struct eth_hdr __attribute__ | ( | (packed) | ) |
void* hip_dns | ( | void * | arg | ) |
References dnsfd, g_state, handle_dns_request(), HIP_DNS_SUFFIX, init_dns_socket(), and RETNULL.
void* hip_esp_input | ( | void * | arg | ) |
References BUFF_LEN, _hip_sadb_entry::dropped, endbox_ipv4_multicast_write(), endbox_periodic_heartbeat(), esp_receive_udp_hip_packet(), g_read_usec, g_state, g_tap_lsi, get_preferred_lsi(), hip_esp_decrypt(), hip_remove_expired_lsi_entries(), hip_remove_expired_sel_entries(), hip_sadb_expire(), hip_sadb_lookup_spi(), HIP_UDP_PORT, IS_EINTR_ERROR, LSI4, maxof(), _hip_sadb_entry::rw_lock, s_esp, s_esp6, s_esp_udp, s_esp_udp_dg, ip_esp_hdr::spi, and tapfd.
void* hip_esp_output | ( | void * | arg | ) |
References add_ipv4_header(), _sockaddr_list::addr, BUFF_LEN, buffer_packet(), _hip_sadb_entry::bytes, check_esp_seqno_overflow, do_bcast(), _hip_sadb_entry::dropped, _hip_sadb_entry::dst_addrs, endbox_arp_packet_check(), endbox_check_cert(), endbox_check_hello_time(), endbox_hello_check(), endbox_ipv4_packet_check(), endbox_periodic_heartbeat(), esp_start_base_exchange(), esp_start_expire(), FALSE, flags, g_read_usec, g_state, g_tap_lsi, get_preferred_lsi(), handle_arp(), handle_nsol(), HCNF, hip_esp_encrypt(), hip_esp_input(), hip_sadb_get_next(), hip_sadb_inc_bytes(), hip_sadb_lookup_addr(), init_readsp(), ip6_hdr::ip6_dst, ip::ip_dst, ip::ip_v, IPVERSION, IS_EINTR_ERROR, IS_HIT, logaddr(), LSI4, _hip_sadb_entry::mode, _sockaddr_list::next, readsp, _hip_sadb_entry::rw_lock, s_esp, s_esp6, s_esp_udp, SA, SA2IP, SAIPLEN, SALEN, _hip_sadb_entry::spi, _hip_sadb_entry::src_addrs, tapfd, TRUE, tunreader_shutdown(), and _hip_sadb_entry::usetime.
void * hip_mobile_router | ( | void * | arg | ) |
References BUFSIZE, check_esp_packet(), check_hip_packet(), external_interfaces, FALSE, g_state, H_PROTO_HIP, hip_mobile_router_add_remove_rules(), hip_mr_client_mutex, ip6_hdr::ip6_dst, ip::ip_dst, ip::ip_len, ip::ip_p, MR_TIMEOUT_US, neifs, netfilter_get_packet(), netfilter_queue_init(), netfilter_queue_set_verdict(), SA, SA2IP, SAIPLEN, SALEN, and TRUE.
Referenced by init_hip().
void* hip_netlink | ( | void * | arg | ) |
References checkIpAddrTableChanges(), g_state, netlsp, readIpAddrTable(), RTM_GETADDR, and sendIpAddrTable().
void* hip_status | ( | void * | arg | ) |
References g_state, handle_status_request(), STATBUFSIZE, status_tlv::tlv_type, and WIN_STATUS_PORT.
void* hipd_main | ( | void * | arg | ) |
References g_state, and main_loop().
int init_esp_input | ( | int | family, |
int | type, | ||
int | proto, | ||
int | port, | ||
char * | msg | ||
) |
Referenced by init_hip().
int main_loop | ( | int | argc, |
char ** | argv | ||
) |
References hip_opt::allow_any, append_hi_node(), hip_conf::conf_filename, hip_conf::cookie_difficulty, hip_conf::cookie_lifetime, D_DEFAULT, D_QUIET, D_VERBOSE, hip_opt::daemon, hip_opt::debug, hip_opt::debug_R1, DEFAULT_DH_GROUP_ID, hip_conf::dh_group, hip_conf::dh_lifetime, hip_conf::disable_dns_lookups, hip_conf::disable_dns_thread, hip_conf::disable_notify, hip_conf::disable_udp, hip_conf::enable_bcast, endbox_init(), ERR, hip_conf::esp_transforms, espsp, expire_old_dh_entries(), hip_conf::failure_timeout, FALSE, fflush_log(), flags, g_state, get_my_addresses(), get_preferred_hi(), H_PROTO_HIP, HCNF, hip_assoc_table, HIP_CONF_FILENAME, hip_dht_update_my_entries(), hip_exit(), hip_handle_esp(), hip_handle_multihoming_timeouts(), hip_handle_netlink(), hip_handle_packet(), hip_handle_registrations(), hip_handle_state_timeouts(), hip_handle_status_request(), HIP_KNOWNID_FILENAME, HIP_LOCK_FILENAME, hip_mr_set_external_ifs(), HIP_MYID_FILENAME, hip_netlink_open(), hip_retransmit_waiting_packets(), hip_status_open(), hip_conf::hip_transforms, hip_trigger(), HIP_VERSION, hip_writelock(), hipcfg_getMyHostId(), hipcfg_init(), init_all_R1_caches(), init_dh_cache(), init_log(), hip_conf::known_hi_filename, length, hip_conf::loc_lifetime, locate_config_file(), log_(), hip_conf::log_filename, log_hipopts(), hip_conf::max_reg_lifetime, MAX_REGISTRATION_TYPES, hip_conf::max_retries, maxof(), hip_opt::mh, hip_conf::min_reg_lifetime, hip_opt::mr, hip_conf::msl, hip_conf::my_hi_filename, my_hi_head, hip_opt::no_retransmit, NORM, NORMT, hip_conf::num_reg_types, hip_opt::opportunistic, OPT, hip_conf::outbound_ifaces, hip_conf::packet_timeout, hip_conf::peer_certificate_required, peer_hi_head, hip_opt::permissive, post_init_tap(), hip_conf::preferred_hi, hip_conf::preferred_iface, print_usage(), QOUT, hip_conf::r1_lifetime, read_conf_file(), read_identities_file(), hip_conf::reg_types, REGTYPE_MR, REGTYPE_RVS, replace_next_R1(), hip_opt::rvs, s6_hip, s_hip, s_net, s_stat, SA, hip_conf::sa_lifetime, hip_conf::save_known_identities, hip_conf::save_my_identities, select_preferred_address(), hip_conf::send_hi_name, src, str_to_addr(), SUITE_ID_MAX, hip_opt::trigger, TRUE, hip_conf::ual, and WARN.
Referenced by hipd_main().
int str_to_addr | ( | unsigned char * | data, |
struct sockaddr * | addr | ||
) |
void* tunreader | ( | void * | arg | ) |
References BUFF_LEN, endbox_send_hello(), g_state, HCNF, init_readsp(), last_hello_time, and tapfd.
Referenced by check_esp_packet(), check_hip_packet(), do_outbound_esp_packet(), endbox_ipv4_packet_check(), handle_arp(), handle_nsol(), hip_check_next_rvs(), hip_handle_packet(), hip_mr_retransmit(), hip_retransmit_waiting_packets(), hip_send_close(), hip_send_I1(), hip_send_I2(), hip_send_notify(), hip_send_proxy_update(), hip_send_R2(), hip_send_update(), hip_send_update_locators(), hip_send_update_proxy_ticket(), hip_send_update_relay(), is_valid_packet(), mr_process_I1(), and send_updates().
Referenced by endbox_send_hello(), and hip_esp_decrypt().
int g_state |
Referenced by check_hip_packet(), handle_arp(), handle_nsol(), hip_check_next_rvs(), hip_handle_packet(), hip_mr_retransmit(), hip_retransmit_waiting_packets(), hip_send_close(), hip_send_I1(), hip_send_I2(), hip_send_notify(), hip_send_proxy_update(), hip_send_R2(), hip_send_update(), hip_send_update_locators(), hip_send_update_proxy_ticket(), hip_send_update_relay(), hip_trigger(), is_valid_packet(), main_loop(), receive_udp_hip_packet(), and start_base_exchange().