Go to the source code of this file.
Functions | |
errorcode | peer_fsm_hello (peer_conn_info_t *info) |
the hello state in the fsm | |
errorcode | peer_fsm_conn_again (peer_conn_info_t *info) |
handles a connect again message | |
errorcode | peer_fsm_check_port_pred (peer_conn_info_t *info) |
handles a port prediction message | |
errorcode | peer_fsm_buddy_alloc (peer_conn_info_t *info) |
handles a buddy alloc message | |
errorcode | peer_fsm_buddy_port (peer_conn_info_t *info) |
handles a buddy port message | |
errorcode | peer_fsm_start_direct_conn (peer_conn_info_t *info) |
handles starting the direct connection process | |
errorcode | peer_fsm_forge_syn_ack (peer_conn_info_t *info) |
handles forging a SYN/ACK and thus completing direct connection | |
errorcode | peer_fsm_start_bday (peer_conn_info_t *info) |
handles starting the bday process (when the peer is the random one) | |
errorcode | peer_fsm_end_bday (peer_conn_info_t *info) |
handles ending the bday process (when the peer is the random one) | |
errorcode | peer_fsm_reply_bday (peer_conn_info_t *info) |
handles starting the reply bday process (when peer is the seq one) | |
errorcode | peer_fsm_bday_synack_flood (peer_conn_info_t *info) |
handles sending the flood of synacks to the buddy |
Definition in file peerfsm_private.h.
|
handles sending the flood of synacks to the buddy
Definition at line 472 of file peerfsm.c. References CHECK_FAILED, CHECK_NOT_NULL, COMM_MSG_SYN_ACK_FLOOD_DONE, COMM_MSG_SYN_ACK_FLOOD_SEQ_NUM, comm_msg_syn_ack_flood_seq_num_t, DBG_PROTOCOL, DBG_TIME, DEBUG, ERROR_1, ERROR_CALLED_FUNCTION, ERROR_NETWORK_READ, ERROR_NETWORK_SEND, ERROR_NULL_ARG_1, errorcode, peer_sock_desc::helper, peer_conn_info_t, peer_fsm_buddy_port(), readMsg(), sendMsg(), peer_conn_info::socks, and synack_flood(). Referenced by peer_fsm_reply_bday(). |
|
handles a buddy alloc message
Definition at line 177 of file peerfsm.c. References CHECK_FAILED, CHECK_NOT_NULL, COMM_CONNECTION_SUPPORTED, COMM_MSG_BUDDY_ALLOC, comm_msg_buddy_alloc_t, COMM_MSG_WAITING_FOR_BUDDY_PORT, COMM_PORT_ALLOC_SEQ, DBG_PROTOCOL, DBG_TIME, DBG_VERBOSE, DEBUG, ERROR_CALLED_FUNCTION, ERROR_NETWORK_READ, ERROR_NETWORK_SEND, ERROR_NULL_ARG_1, errorcode, peer_sock_desc::helper, peer_conn_info_t, peer_fsm_buddy_port(), readMsg(), sendMsg(), and peer_conn_info::socks. Referenced by peer_fsm_check_port_pred(). |
|
handles a buddy port message
Definition at line 213 of file peerfsm.c. References peer_conn_info::buddy, CHECK_FAILED, CHECK_NOT_NULL, COMM_BDAY_NEEDED, COMM_MSG_BUDDY_PORT, comm_msg_buddy_port_t, DBG_PORT, DBG_PROTOCOL, DBG_TIME, DBG_VERBOSE, DEBUG, ERROR_CALLED_FUNCTION, ERROR_CALLED_FUNCTION_1, ERROR_NETWORK_READ, ERROR_NULL_ARG_1, errorcode, buddy_info::ext_port, peer_sock_desc::helper, port_alloc::method, peer_conn_info_t, peer_fsm_reply_bday(), peer_fsm_start_bday(), peer_fsm_start_direct_conn(), peer_conn_info::port_alloc, readMsg(), and peer_conn_info::socks. Referenced by peer_fsm_bday_synack_flood(), peer_fsm_buddy_alloc(), and peer_fsm_end_bday(). |
|
handles a port prediction message
Definition at line 141 of file peerfsm.c. References CHECK_FAILED, CHECK_NOT_NULL, COMM_MSG_PORT_PRED, comm_msg_pred_port_t, COMM_MSG_WAITING_FOR_BUDDY_ALLOC, COMM_PORT_ALLOC_SEQ, DBG_PROTOCOL, DBG_TIME, DBG_VERBOSE, DEBUG, ERROR_CALLED_FUNCTION, ERROR_NETWORK_READ, ERROR_NETWORK_SEND, ERROR_NULL_ARG_1, errorcode, peer_sock_desc::helper, port_alloc::method, peer_conn_info_t, peer_fsm_buddy_alloc(), comm_msg_pred_port::port_alloc, peer_conn_info::port_alloc, readMsg(), sendMsg(), and peer_conn_info::socks. Referenced by peer_fsm_conn_again(). |
|
handles a connect again message
Definition at line 99 of file peerfsm.c. References CHECK_FAILED, CHECK_NOT_NULL, COMM_MSG_CONNECT_AGAIN, COMM_MSG_CONNECTED_AGAIN, DBG_PROTOCOL, DBG_TIME, DEBUG, ERROR_NETWORK_READ, ERROR_NETWORK_SEND, ERROR_NULL_ARG_1, ERROR_TCP_CONNECT, errorcode, FAILED, peer_conn_info::helper, peer_sock_desc::helper, peer_sock_desc::helper_pred, helper_info::ip, peer_conn_info_t, peer_fsm_check_port_pred(), helper_info::port, readMsg(), sendMsg(), peer_conn_info::socks, and tcp_connect(). Referenced by peer_fsm_hello(). |
|
handles ending the bday process (when the peer is the random one)
Definition at line 403 of file peerfsm.c. References peer_conn_info::bday, CHECK_FAILED, COMM_MSG_BDAY_SUCCESS_PORT, comm_msg_bday_success_port_t, COMM_MSG_BUDDY_SYN_ACK_FLOODED, DBG_BDAY, DBG_PORT, DBG_PROTOCOL, DBG_TIME, DBG_VERBOSE, DEBUG, ERROR_1, ERROR_CALLED_FUNCTION, ERROR_NETWORK_READ, ERROR_NETWORK_SEND, ERROR_NULL_ARG_1, errorcode, peer_sock_desc::helper, peer_conn_info::peer, peer_conn_info_t, peer_fsm_buddy_port(), peer_info::port, bday_peer::port, comm_msg_bday_success_port::port, readMsg(), sendMsg(), peer_conn_info::socks, and wait_and_join_find_synack(). Referenced by peer_fsm_start_bday(). |
|
|
the hello state in the fsm
Definition at line 63 of file peerfsm.c. References peer_conn_info::buddy, comm_msg_hello::buddy_ext_ip, comm_msg_hello::buddy_int_ip, comm_msg_hello::buddy_int_port, CHECK_FAILED, CHECK_NOT_NULL, COMM_MSG_HELLO, comm_msg_hello_t, DBG_BDAY, DBG_PORT, DBG_PROTOCOL, DBG_TIME, DEBUG, ERROR_CALLED_FUNCTION, ERROR_NETWORK_SEND, ERROR_NULL_ARG_1, errorcode, buddy_info::ext_ip, peer_sock_desc::helper, buddy_info::int_ip, buddy_info::int_port, peer_info::ip, peer_conn_info::peer, peer_conn_info_t, peer_fsm_conn_again(), comm_msg_hello::peer_ip, comm_msg_hello::peer_port, peer_info::port, sendMsg(), and peer_conn_info::socks. Referenced by peer_fsm_start(). |
|
handles starting the reply bday process (when peer is the seq one)
Definition at line 450 of file peerfsm.c. References CHECK_FAILED, CHECK_NOT_NULL, COMM_MSG_WAITING_TO_SYN_ACK_FLOOD, DBG_PROTOCOL, DBG_TIME, DEBUG, ERROR_CALLED_FUNCTION, ERROR_NETWORK_SEND, ERROR_NULL_ARG_1, errorcode, peer_sock_desc::helper, peer_conn_info_t, peer_fsm_bday_synack_flood(), sendMsg(), and peer_conn_info::socks. Referenced by peer_fsm_buddy_port(). |
|
handles starting the bday process (when the peer is the random one)
Definition at line 355 of file peerfsm.c. References peer_conn_info::buddy, CHECK_FAILED, CHECK_NOT_NULL, COMM_MSG_SYN_FLOODED, comm_msg_syn_flooded_t, tcp_packet_info::d_addr, tcp_packet_info::d_port, DBG_BDAY, DBG_PORT, DBG_PROTOCOL, DBG_TIME, DEBUG, peer_conn_info::device, ERROR_1, ERROR_2, ERROR_CALLED_FUNCTION, ERROR_NETWORK_SEND, ERROR_NULL_ARG_1, errorcode, buddy_info::ext_ip, buddy_info::ext_port, flood_syns(), peer_sock_desc::helper, peer_info::ip, peer_conn_info::peer, peer_conn_info_t, peer_fsm_end_bday(), tcp_packet_info::s_addr, sendMsg(), comm_msg_syn_flooded::seq_num, tcp_packet_info::seq_num, peer_conn_info::socks, start_find_synack(), and tcp_packet_info_t. Referenced by peer_fsm_buddy_port(). |
|
handles starting the direct connection process
Definition at line 266 of file peerfsm.c. References peer_conn_info::buddy_syn, capture_peer_to_buddy_syn(), CHECK_FAILED, COMM_MSG_BUDDY_SYN_SEQ, comm_msg_buddy_syn_seq_t, DBG_BDAY, DBG_PROTOCOL, DBG_SEQ_NUM, DBG_TIME, DBG_VERBOSE, DEBUG, ERROR_CALLED_FUNCTION_1, ERROR_CALLED_FUNCTION_2, ERROR_CALLED_FUNCTION_3, ERROR_NETWORK_SEND, ERROR_NULL_ARG_1, errorcode, peer_sock_desc::helper, peer_conn_info_t, peer_fsm_forge_syn_ack(), sendMsg(), tcp_packet_info::seq_num, comm_msg_buddy_syn_seq::seq_num, peer_conn_info::socks, and start_direct_conn(). Referenced by peer_fsm_buddy_port(). |