client.h 742 B

12345678910111213141516171819202122
  1. #include "main.h"
  2. #define CLIENT_STATE_INITIAL 1
  3. #define CLIENT_STATE_SENTREQUEST 2
  4. #define CLIENT_STATE_REQUEST_ACCEPTED 3
  5. #define CLIENT_STATE_PING_SENT 4
  6. #define CLIENT_STATE_CONNECTED 5
  7. #define CLIENT_STATE_PONG_RECEIVED 6
  8. #define CLIENT_STATE_SEND_PING 7
  9. #define CLIENT_STATE_REQUEST_TUNNEL 8
  10. #define CLIENT_STATE_WAIT_FOR_ACKTUNNEL 9
  11. #define CLIENT_STATE_FORWARDING 10
  12. #define CLIENT_STATE_SHUTDOWN 11
  13. #define CLIENT_STATE_BIND_PORT 12
  14. #define CLIENT_STATE_SETUP_PIPE 13
  15. int handle_pong_frame(protocol_frame *rcvd_frame);
  16. int handle_acktunnel_frame(protocol_frame *rcvd_frame);
  17. int handle_server_tcp_frame(protocol_frame *rcvd_frame);
  18. int handle_server_tcp_fin_frame(protocol_frame *rcvd_frame);
  19. int do_client_loop(char *tox_id_str);