Logo Search packages:      
Sourcecode: ike version File versions  Download package

Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | Friends

_IKED Class Reference

Collaboration diagram for _IKED:
Collaboration graph

List of all members.

Public Member Functions

long halt ()
long init (long setlevel)
void loop ()

Public Attributes

LOG log

Private Member Functions

bool asn1_text (BDATA &asn1, BDATA &text)
bool bdata_2_cert (X509 **x509, BDATA &cert)
bool cert_2_bdata (BDATA &cert, X509 *x509)
bool cert_desc (BDATA &cert, BDATA &text)
long cert_load (BDATA &cert, char *fpath, bool ca, BDATA &pass)
bool cert_load_p12 (BDATA &cert, FILE *fp, bool ca, BDATA &pass)
bool cert_load_pem (BDATA &cert, FILE *fp, bool ca, BDATA &pass)
long cert_save (BDATA &cert, char *fpath)
bool cert_subj (BDATA &cert, BDATA &subj)
bool cert_verify (IDB_LIST_CERT &certs, BDATA &ca, BDATA &cert)
bool client_cleanup (VNET_ADAPTER *adapter, IDB_TUNNEL *tunnel)
bool client_setup (VNET_ADAPTER *adapter, IDB_TUNNEL *tunnel)
bool cmp_ph1id (IKE_PH1ID &idt, IKE_PH1ID &ids, bool natt)
bool cmp_ph2id (IKE_PH2ID &idt, IKE_PH2ID &ids, bool exact)
bool conf_load (const char *path, bool trace=false)
long config_chk_hash (IDB_PH1 *ph1, IDB_CFG *cfg, unsigned long msgid)
bool config_client_xauth_recv (IDB_CFG *cfg, IDB_PH1 *ph1)
bool config_client_xauth_send (IDB_CFG *cfg, IDB_PH1 *ph1)
bool config_client_xconf_pull_recv (IDB_CFG *cfg, IDB_PH1 *ph1)
bool config_client_xconf_pull_send (IDB_CFG *cfg, IDB_PH1 *ph1)
bool config_client_xconf_push_recv (IDB_CFG *cfg, IDB_PH1 *ph1)
bool config_client_xconf_push_send (IDB_CFG *cfg, IDB_PH1 *ph1)
long config_message_send (IDB_PH1 *ph1, IDB_CFG *cfg)
bool config_server_xauth_recv (IDB_CFG *cfg, IDB_PH1 *ph1)
bool config_server_xauth_send (IDB_CFG *cfg, IDB_PH1 *ph1)
bool config_server_xconf_pull_recv (IDB_CFG *cfg, IDB_PH1 *ph1)
bool config_server_xconf_pull_send (IDB_CFG *cfg, IDB_PH1 *ph1)
bool config_server_xconf_push_recv (IDB_CFG *cfg, IDB_PH1 *ph1)
bool config_server_xconf_push_send (IDB_CFG *cfg, IDB_PH1 *ph1)
long config_xconf_get (IDB_CFG *cfg, long &getmask, long readmask, VENDOPTS vendopts)
long config_xconf_set (IDB_CFG *cfg, long &setmask, long nullmask, VENDOPTS vendopts)
const char * find_name (long type, long id)
bool gen_ph1id_l (IDB_PH1 *ph1, IKE_PH1ID &ph1id)
bool gen_ph1id_r (IDB_PH1 *ph1, IKE_PH1ID &ph1id)
long header (PACKET_IP &packet, ETH_HEADER &ethhdr)
long inform_chk_delete (IDB_PH1 *ph1, IKE_NOTIFY *notify, bool secure)
long inform_chk_hash (IDB_PH1 *ph1, IDB_XCH *inform)
long inform_chk_notify (IDB_PH1 *ph1, IKE_NOTIFY *notify, bool secure)
long inform_gen_hash (IDB_PH1 *ph1, IDB_XCH *inform)
long inform_gen_iv (IDB_PH1 *ph1, unsigned long msgid, BDATA &iv)
long inform_get_spi (char *text, IDB_PH1 *ph1, IKE_NOTIFY *notify)
long inform_new_delete (IDB_PH1 *ph1, IDB_PH2 *ph2)
long inform_new_notify (IDB_PH1 *ph1, IDB_PH2 *ph2, unsigned short code, BDATA *data=NULL)
long loop_ike_nwork ()
long loop_ike_pfkey ()
long loop_ipc_client (IKEI *ikei)
long loop_ipc_server ()
void loop_ref_dec (const char *name)
void loop_ref_inc (const char *name)
long packet_ike_decrypt (IDB_PH1 *ph1, PACKET_IKE &packet, BDATA *iv)
long packet_ike_encap (PACKET_IKE &packet_ike, PACKET_IP &packet_ip, IKE_SADDR &src, IKE_SADDR &dst, long natt)
long packet_ike_encrypt (IDB_PH1 *ph1, PACKET_IKE &packet, BDATA *iv)
long packet_ike_send (IDB_PH1 *ph1, IDB_XCH *xch, PACKET_IKE &packet, bool retry)
long packet_ike_xmit (IDB_PH1 *ph1, IDB_XCH *xch, PACKET_IKE &packet, bool retry)
bool paddr_ph2id (PFKI_ADDR &paddr, IKE_PH2ID &ph2id)
long payload_add_attr (PACKET_IKE &packet, IKE_ATTR &attrib)
long payload_add_cert (PACKET_IKE &packet, uint8_t type, BDATA &cert, uint8_t next)
long payload_add_cfglist (PACKET_IKE &packet, IDB_CFG *cfg, uint8_t next)
long payload_add_creq (PACKET_IKE &packet, uint8_t type, uint8_t next)
long payload_add_delete (PACKET_IKE &packet, IKE_NOTIFY *notify, uint8_t next)
long payload_add_frag (PACKET_IKE &packet, unsigned char &index, unsigned char *data, size_t &size, size_t max)
long payload_add_hash (PACKET_IKE &packet, BDATA &hash, uint8_t next)
long payload_add_kex (PACKET_IKE &packet, BDATA &gx, uint8_t next)
long payload_add_natd (PACKET_IKE &packet, BDATA &natd, uint8_t next)
long payload_add_nonce (PACKET_IKE &packet, BDATA &nonce, uint8_t next)
long payload_add_notify (PACKET_IKE &packet, IKE_NOTIFY *notify, uint8_t next)
long payload_add_ph1id (PACKET_IKE &packet, IKE_PH1ID &ph1id, uint8_t next)
long payload_add_ph2id (PACKET_IKE &packet, IKE_PH2ID &ph2id, uint8_t next)
long payload_add_sa (PACKET_IKE &packet, IDB_LIST_PROPOSAL &plist, uint8_t next)
long payload_add_sign (PACKET_IKE &packet, BDATA &sign, uint8_t next)
long payload_add_vend (PACKET_IKE &packet, BDATA &vend, uint8_t next)
long payload_add_xform (PACKET_IKE &packet, IKE_PROPOSAL *proposal, uint8_t next)
long payload_get_attr (PACKET_IKE &packet, IKE_ATTR &attrib)
long payload_get_cert (PACKET_IKE &packet, uint8_t &type, BDATA &cert)
long payload_get_cfglist (PACKET_IKE &packet, IDB_CFG *cfg)
long payload_get_creq (PACKET_IKE &packet, uint8_t &type, BDATA &dn)
long payload_get_delete (PACKET_IKE &packet, IKE_NOTIFY *notify)
long payload_get_frag (PACKET_IKE &packet, IDB_PH1 *ph1, bool &complete)
long payload_get_hash (PACKET_IKE &packet, BDATA &hash, long size)
long payload_get_kex (PACKET_IKE &packet, BDATA &gx)
long payload_get_natd (PACKET_IKE &packet, BDATA &natd, long size)
long payload_get_nonce (PACKET_IKE &packet, BDATA &nonce)
long payload_get_notify (PACKET_IKE &packet, IKE_NOTIFY *notify)
long payload_get_ph1id (PACKET_IKE &packet, IKE_PH1ID &ph1id)
long payload_get_ph2id (PACKET_IKE &packet, IKE_PH2ID &ph2id)
long payload_get_sa (PACKET_IKE &packet, IDB_LIST_PROPOSAL &plist)
long payload_get_sign (PACKET_IKE &packet, BDATA &sign)
long payload_get_vend (PACKET_IKE &packet, BDATA &vend)
long payload_get_xform (PACKET_IKE &packet, IKE_PROPOSAL *proposal)
long pfkey_init_phase2 (bool nail, u_int16_t plcytype, u_int32_t plcyid, u_int32_t seq)
long pfkey_recv_acquire (PFKI_MSG &msg)
long pfkey_recv_flush (PFKI_MSG &msg)
long pfkey_recv_getspi (PFKI_MSG &msg)
long pfkey_recv_spadd (PFKI_MSG &msg)
long pfkey_recv_spdel (PFKI_MSG &msg)
long pfkey_recv_spflush (PFKI_MSG &msg)
long pfkey_recv_spnew (PFKI_MSG &msg)
long pfkey_send_delete (IDB_PH2 *ph2)
long pfkey_send_getspi (IDB_POLICY *policy, IDB_PH2 *ph2)
long pfkey_send_spadd (PFKI_SPINFO *spinfo)
long pfkey_send_spdel (PFKI_SPINFO *spinfo)
long pfkey_send_update (IDB_PH2 *ph2, IKE_PROPOSAL *proposal, BDATA &ekey, BDATA &akey, long dir)
bool ph2id_paddr (IKE_PH2ID &ph2id, PFKI_ADDR &paddr)
bool phase1_add_natd (IDB_PH1 *ph1, PACKET_IKE &packet, uint8_t next)
long phase1_add_vend (IDB_PH1 *ph1, PACKET_IKE &packet, uint8_t next)
long phase1_chk_hash (IDB_PH1 *ph1)
long phase1_chk_idr (IDB_PH1 *ph1)
bool phase1_chk_natd (IDB_PH1 *ph1)
bool phase1_chk_port (IDB_PH1 *ph1, IKE_SADDR *saddr_r, IKE_SADDR *saddr_l)
long phase1_chk_sign (IDB_PH1 *ph1)
long phase1_chk_vend (IDB_PH1 *ph1, BDATA &vend)
bool phase1_cmp_prop (IKE_PROPOSAL *proposal1, IKE_PROPOSAL *proposal2, bool initiator, long life_check)
long phase1_gen_hash_i (IDB_PH1 *ph1, BDATA &hash)
long phase1_gen_hash_r (IDB_PH1 *ph1, BDATA &hash)
long phase1_gen_keys (IDB_PH1 *ph1)
long phase1_gen_natd (IDB_PH1 *ph1)
long phase1_gen_prop (IDB_PH1 *ph1)
long phase1_sel_prop (IDB_PH1 *ph1)
long phase2_chk_hash_i (IDB_PH1 *ph1, IDB_PH2 *ph2)
long phase2_chk_hash_p (IDB_PH1 *ph1, IDB_PH2 *ph2)
long phase2_chk_hash_r (IDB_PH1 *ph1, IDB_PH2 *ph2)
long phase2_chk_params (IDB_PH1 *ph1, IDB_PH2 *ph2, PACKET_IKE &packet)
bool phase2_cmp_prop (IKE_PROPOSAL *proposal1, IKE_PROPOSAL *proposal2, bool initiator, long life_check)
long phase2_gen_hash_i (IDB_PH1 *ph1, IDB_PH2 *ph2, BDATA &hash)
long phase2_gen_hash_p (IDB_PH1 *ph1, IDB_PH2 *ph2, BDATA &hash)
long phase2_gen_hash_r (IDB_PH1 *ph1, IDB_PH2 *ph2, BDATA &hash)
long phase2_gen_keys (IDB_PH1 *ph1, IDB_PH2 *ph2)
long phase2_gen_keys (IDB_PH1 *ph1, IDB_PH2 *ph2, long dir, IKE_PROPOSAL *proposal, BDATA &shared)
long phase2_gen_prop (IDB_PH2 *ph2, IDB_POLICY *policy)
long phase2_sel_prop (IDB_PH2 *ph2)
bool policy_cmp_prots (PFKI_SPINFO *spinfo1, PFKI_SPINFO *spinfo2)
bool policy_create (IDB_TUNNEL *tunnel, u_int16_t type, u_int8_t level, IKE_PH2ID &id1, IKE_PH2ID &id2, bool route)
bool policy_dhcp_create (IDB_TUNNEL *tunnel)
bool policy_dhcp_remove (IDB_TUNNEL *tunnel)
bool policy_get_addrs (PFKI_SPINFO *spinfo, IKE_SADDR &src, IKE_SADDR &dst)
bool policy_list_create (IDB_TUNNEL *tunnel, bool initiator)
bool policy_list_remove (IDB_TUNNEL *tunnel, bool initiator)
bool policy_remove (IDB_TUNNEL *tunnel, u_int16_t type, u_int8_t level, IKE_PH2ID &id1, IKE_PH2ID &id2, bool route)
long process_config_recv (IDB_PH1 *ph1, PACKET_IKE &packet, unsigned char payload)
long process_config_send (IDB_PH1 *ph1, IDB_CFG *cfg)
long process_dhcp_recv (IDB_TUNNEL *tunnel)
long process_dhcp_send (IDB_TUNNEL *tunnel)
long process_ike_recv (PACKET_IKE &packet, IKE_SADDR &saddr_src, IKE_SADDR &saddr_dst)
long process_ike_send ()
long process_inform_recv (IDB_PH1 *ph1, PACKET_IKE &packet, unsigned char payload)
long process_inform_send (IDB_PH1 *ph1, IDB_XCH *inform)
long process_phase1_recv (IDB_PH1 *ph1, PACKET_IKE &packet, unsigned char payload)
long process_phase1_send (IDB_PH1 *ph1)
long process_phase2_recv (IDB_PH1 *ph1, PACKET_IKE &packet, unsigned char payload)
long process_phase2_send (IDB_PH1 *ph1, IDB_PH2 *ph2)
bool prvkey_rsa_encrypt (EVP_PKEY *evp_pkey, BDATA &hash, BDATA &sign)
long prvkey_rsa_load (EVP_PKEY **evp_pkey, char *fpath, BDATA &pass)
bool prvkey_rsa_load_p12 (EVP_PKEY **evp_pkey, FILE *fp, BDATA &pass)
bool prvkey_rsa_load_pem (EVP_PKEY **evp_pkey, FILE *fp, BDATA &pass)
bool pubkey_rsa_decrypt (EVP_PKEY *evp_pkey, BDATA &sign, BDATA &hash)
bool pubkey_rsa_read (BDATA &cert, EVP_PKEY **evp_pkey)
bool rand_bytes (void *buff, long size)
long recv_ip (PACKET_IP &packet, ETH_HEADER *ethhdr=NULL)
long send_ip (PACKET_IP &packet, ETH_HEADER *ethhdr=NULL)
long socket_create (IKE_SADDR &saddr, bool natt)
long socket_dhcp_create (IDB_TUNNEL *tunnel)
long socket_dhcp_recv (IDB_TUNNEL *tunnel, PACKET &packet)
long socket_dhcp_remove (IDB_TUNNEL *tunnel)
long socket_dhcp_send (IDB_TUNNEL *tunnel, PACKET &packet)
void socket_done ()
long socket_init ()
long socket_lookup_addr (IKE_SADDR &saddr_l, IKE_SADDR &saddr_r)
long socket_lookup_port (IKE_SADDR &saddr_l, bool natt)
long socket_select (unsigned long timeout)
void text_addr (char *text, PFKI_ADDR *paddr, bool port, bool netmask)
void text_addr (char *text, sockaddr *saddr, bool port)
void text_addr (char *text, IKE_SADDR *iaddr, bool port)
void text_addr (char *text, in_addr &addr)
bool text_asn1 (BDATA &text, BDATA &asn1)
void text_mask (char *text, in_addr &addr)
void text_ph1id (char *text, IKE_PH1ID *ph1id)
void text_ph2id (char *text, IKE_PH2ID *ph2id)
void text_port (char *text, int port)
void text_prot (char *text, int prot)
bool vnet_get (VNET_ADAPTER **adapter)
bool vnet_init ()
bool vnet_rel (VNET_ADAPTER *adapter)

Private Attributes

ITH_COND cond_idb
ITH_COND cond_run
bool conf_fail
uint8_t dhcp_seed [6]
long dnsgrpid
long dump_decrypt
long dump_encrypt
IDB_LIST_CFG idb_list_cfg
IDB_LIST idb_list_netgrp
IDB_LIST_PEER idb_list_peer
IDB_LIST_PH1 idb_list_ph1
IDB_LIST_PH2 idb_list_ph2
IDB_LIST_POLICY idb_list_policy
IDB_LIST_TUNNEL idb_list_tunnel
short ident
IKES ikes
IPFRAG ipfrag
IPROUTE iproute
ITH_IKEC ith_ikec
ITH_IKES ith_ikes
ITH_NWORK ith_nwork
ITH_PFKEY ith_pfkey
ITH_TIMER ith_timer
long level
IDB_LIST list_socket
ITH_LOCK lock_idb
ITH_LOCK lock_net
ITH_LOCK lock_run
long logflags
long loopcount
char path_decrypt [MAX_PATH]
char path_dhcp [MAX_PATH]
char path_encrypt [MAX_PATH]
char path_ins [MAX_PATH]
char path_log [MAX_PATH]
PCAP_DUMP pcap_decrypt
PCAP_DUMP pcap_encrypt
long peercount
PFKI pfki
short policyid
long retry_count
long retry_delay
long sock_ike_open
long sock_natt_open
long state
long tunnelid
BDATA unity_fwtype
BDATA vend_chkpt
BDATA vend_dpd1
BDATA vend_frag
BDATA vend_hbeat
BDATA vend_kame
BDATA vend_natt_rfc
BDATA vend_natt_v00
BDATA vend_natt_v01
BDATA vend_natt_v02
BDATA vend_natt_v03
BDATA vend_netsc
BDATA vend_ssoft
BDATA vend_swind
BDATA vend_unity
BDATA vend_xauth
BDATA vend_zwall
_IKED_XAUTH_LOCAL xauth_local
_IKED_XCONF_LOCAL xconf_local


class _IDB_CFG
class _IDB_INF
class _IDB_LIST_PH1
class _IDB_LIST_PH2
class _IDB_PEER
class _IDB_PH1
class _IDB_PH2
class _IDB_XCH
class _ITH_IKEC
class _ITH_IKES
class _ITH_NWORK
class _ITH_PFKEY

Detailed Description

Definition at line 338 of file iked.h.

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index