You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef _TCP_H
  2. #define _TCP_H
  3. #define TCP_INITIAL_TIMEOUT (3*TICKS_PER_SEC)
  4. #define TCP_MAX_TIMEOUT (60*TICKS_PER_SEC)
  5. #define TCP_MIN_TIMEOUT (TICKS_PER_SEC)
  6. #define TCP_MAX_RETRY 10
  7. #define TCP_MAX_HEADER ((int)sizeof(struct iphdr)+64)
  8. #define TCP_MIN_WINDOW (1500-TCP_MAX_HEADER)
  9. #define TCP_MAX_WINDOW (65535-TCP_MAX_HEADER)
  10. #define MAX_URL 80
  11. #define FIN 1
  12. #define SYN 2
  13. #define RST 4
  14. #define PSH 8
  15. #define ACK 16
  16. #define URG 32
  17. struct tcphdr {
  18. uint16_t src;
  19. uint16_t dst;
  20. int32_t seq;
  21. int32_t ack;
  22. uint16_t ctrl;
  23. uint16_t window;
  24. uint16_t chksum;
  25. uint16_t urgent;
  26. };
  27. #endif /* _TCP_H */