Go to the source code of this file.
Functions | |
errorcode | helper_fsm_hello (connlist_t *list, connlist_item_t *item) |
the state to deal with a hello message | |
errorcode | helper_fsm_conn2 (connlist_t *list, connlist_item_t *item) |
handles the second connection state | |
errorcode | helper_fsm_buddy_alloc (connlist_t *list, connlist_item_t *item) |
handles sending a message with buddy info to peers | |
errorcode | helper_fsm_buddy_port (connlist_t *list, connlist_item_t *peer, connlist_item_t *buddy) |
handles sending a message with buddy port to peers, or determing port through birthday paradox | |
errorcode | helper_fsm_start_direct_conn (connlist_t *list, connlist_item_t *peer, connlist_item_t *buddy) |
handles starting direct connection | |
errorcode | helper_fsm_goodbye (connlist_t *list, connlist_item_t *peer, connlist_item_t *buddy) |
final state to recieve the peer's goodbye message | |
errorcode | helper_fsm_start_peer_bday (connlist_t *list, connlist_item_t *peer, connlist_item_t *buddy) |
optional state that handles starting birthday paradox when the peer is the random one. | |
errorcode | helper_fsm_end_peer_bday (connlist_t *list, connlist_item_t *peer, connlist_item_t *buddy) |
optional state that handles ending birthday paradox when the peer is the random one. | |
errorcode | helper_fsm_start_buddy_bday (connlist_t *list, connlist_item_t *peer, connlist_item_t *buddy) |
optional state that handles starting birthday paradox when the buddy is the random one. | |
errorcode | helper_fsm_end_buddy_bday (connlist_t *list, connlist_item_t *peer, connlist_item_t *buddy) |
optional state that handles ending birthday paradox when the buddy is the random one. |
Definition in file helperfsm_private.h.
|
handles sending a message with buddy info to peers
Definition at line 224 of file helperfsm.c. References comm_msg_buddy_alloc::buddy_port_alloc, CHECK_FAILED, CHECK_NOT_NULL, COMM_MSG_BUDDY_ALLOC, comm_msg_buddy_alloc_t, COMM_MSG_WAITING_FOR_BUDDY_ALLOC, connlist_forget(), connlist_item_match(), connlist_item_t, connlist_t, DBG_BUDDY, DBG_LIST, DBG_PROTOCOL, DBG_VERBOSE, DEBUG, ERROR_3, ERROR_NETWORK_READ, ERROR_NULL_ARG_1, ERROR_NULL_ARG_2, errorcode, FAILED, get_buddy(), helper_fsm_buddy_port(), connlist_item::info, port_alloc::method, helper_sock_desc::peer, helper_conn_info::port_alloc, readMsg(), sendMsg(), helper_conn_info::socks, comm_msg_buddy_alloc::support, and wait_for_buddy_port_alloc(). Referenced by helper_fsm_conn2(). |
|
|
handles the second connection state
Definition at line 149 of file helperfsm.c. References CHECK_FAILED, CHECK_NOT_NULL, COMM_MSG_CONNECTED_AGAIN, COMM_MSG_PORT_PRED, comm_msg_pred_port_t, COMM_PORT_ALLOC_SEQ, connlist_forget(), connlist_item_match(), connlist_item_t, connlist_t, DBG_LIST, DBG_PORT_PRED, DBG_PROTOCOL, DEBUG, ERROR_1, ERROR_CALLED_FUNCTION, ERROR_NETWORK_READ, ERROR_NETWORK_SEND, ERROR_NULL_ARG_1, ERROR_NULL_ARG_2, errorcode, port_alloc::ext_port, port_alloc::ext_port_set, FAILED, find_conn2(), helper_fsm_buddy_alloc(), connlist_item::info, port_alloc::method, port_alloc::method_set, connlist_item::obs_data, observed_data_t, helper_sock_desc::peer, observed_data::port, PORT_ADD, helper_conn_info::port_alloc, comm_msg_pred_port::port_alloc, readMsg(), sendMsg(), and helper_conn_info::socks. Referenced by helper_fsm_hello(). |
|
optional state that handles ending birthday paradox when the buddy is the random one.
Definition at line 550 of file helperfsm.c. References comm_msg_buddy_info::bday, helper_conn_info::bday, CHECK_FAILED, CHECK_NOT_NULL, COMM_MSG_BUDDY_PORT, comm_msg_buddy_port_t, COMM_MSG_SYN_ACK_FLOOD_DONE, connlist_item_t, connlist_t, DBG_PROTOCOL, DEBUG, ERROR_1, ERROR_CALLED_FUNCTION, ERROR_NETWORK_READ, ERROR_NETWORK_SEND, ERROR_NULL_ARG_1, ERROR_NULL_ARG_2, ERROR_NULL_ARG_3, errorcode, comm_msg_buddy_info::ext_port, helper_fsm_start_direct_conn(), connlist_item::info, helper_sock_desc::peer, bday_helper::port, readMsg(), sendMsg(), helper_conn_info::socks, and wait_for_buddy_bday_port(). Referenced by helper_fsm_start_buddy_bday(). |
|
|
final state to recieve the peer's goodbye message
Definition at line 406 of file helperfsm.c. References CHECK_FAILED, CHECK_NOT_NULL, COMM_MSG_GOODBYE, comm_msg_goodbye_t, connlist_item_t, connlist_t, DBG_PROTOCOL, DBG_VERBOSE, DEBUG, ERROR_NETWORK_READ, ERROR_NULL_ARG_1, ERROR_NULL_ARG_2, errorcode, FLAG_FAILED, connlist_item::info, helper_sock_desc::peer, readMsg(), and helper_conn_info::socks. Referenced by helper_fsm_start_direct_conn(). |
|
the state to deal with a hello message
Definition at line 99 of file helperfsm.c. References helper_conn_info::buddy, CHECK_FAILED, CHECK_NOT_NULL, COMM_MSG_CONNECT_AGAIN, COMM_MSG_HELLO, comm_msg_hello_t, connlist_item_t, connlist_t, DBG_IP, DBG_PORT, DBG_PROTOCOL, DBG_VERBOSE, DEBUG, ERROR_CALLED_FUNCTION, ERROR_NETWORK_READ, ERROR_NETWORK_SEND, ERROR_NULL_ARG_1, ERROR_NULL_ARG_2, errorcode, buddy_info::ext_ip, helper_fsm_conn2(), buddy_info::identifier, connlist_item::info, buddy_info::int_ip, buddy_info::int_port, peer_info::ip, helper_conn_info::peer, helper_sock_desc::peer, peer_info::port, readMsg(), sendMsg(), peer_info::set, and helper_conn_info::socks. Referenced by helper_fsm_start(). |
|
optional state that handles starting birthday paradox when the buddy is the random one.
Definition at line 514 of file helperfsm.c. References helper_conn_info::bday, CHECK_FAILED, CHECK_NOT_NULL, COMM_MSG_SYN_ACK_FLOOD_SEQ_NUM, comm_msg_syn_ack_flood_seq_num_t, COMM_MSG_WAITING_TO_SYN_ACK_FLOOD, connlist_item_t, connlist_t, DBG_PROTOCOL, DEBUG, ERROR_1, ERROR_CALLED_FUNCTION, ERROR_NETWORK_READ, ERROR_NETWORK_SEND, ERROR_NULL_ARG_1, ERROR_NULL_ARG_2, ERROR_NULL_ARG_3, errorcode, helper_fsm_end_buddy_bday(), connlist_item::info, helper_sock_desc::peer, readMsg(), sendMsg(), bday_helper::seq_num, comm_msg_syn_ack_flood_seq_num::seq_num, helper_conn_info::socks, and wait_for_buddy_syn_flood(). Referenced by helper_fsm_buddy_port(). |
|
handles starting direct connection
Definition at line 364 of file helperfsm.c. References helper_conn_info::buddy_syn, CHECK_FAILED, CHECK_NOT_NULL, COMM_MSG_BUDDY_SYN_SEQ, comm_msg_buddy_syn_seq_t, COMM_MSG_PEER_SYN_SEQ, comm_msg_peer_syn_seq_t, connlist_item_t, connlist_t, DBG_PROTOCOL, DBG_SEQ_NUM, DBG_VERBOSE, DEBUG, ERROR_1, ERROR_CALLED_FUNCTION, ERROR_NETWORK_READ, ERROR_NETWORK_SEND, ERROR_NULL_ARG_1, ERROR_NULL_ARG_2, ERROR_NULL_ARG_3, errorcode, helper_fsm_goodbye(), connlist_item::info, helper_sock_desc::peer, readMsg(), sendMsg(), comm_msg_peer_syn_seq::seq_num, buddy_syn_seq_num::seq_num, buddy_syn_seq_num::seq_num_set, helper_conn_info::socks, and wait_for_buddy_syn_seq_num(). Referenced by helper_fsm_buddy_port(), helper_fsm_end_buddy_bday(), and helper_fsm_end_peer_bday(). |
|
optional state that handles starting birthday paradox when the peer is the random one.
Definition at line 431 of file helperfsm.c. References helper_conn_info::bday, CHECK_FAILED, CHECK_NOT_NULL, COMM_MSG_BUDDY_SYN_ACK_FLOODED, COMM_MSG_SYN_FLOODED, comm_msg_syn_flooded_t, connlist_item_t, connlist_t, DBG_PROTOCOL, DEBUG, ERROR_CALLED_FUNCTION, ERROR_NETWORK_READ, ERROR_NETWORK_SEND, ERROR_NULL_ARG_1, ERROR_NULL_ARG_2, ERROR_NULL_ARG_3, errorcode, helper_fsm_end_peer_bday(), connlist_item::info, helper_sock_desc::peer, readMsg(), sendMsg(), bday_helper::seq_num, bday_helper::seq_num_set, and helper_conn_info::socks. Referenced by helper_fsm_buddy_port(). |