Leaked source code of windows server 2003
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.

61 lines
1.3 KiB

  1. // TCP control bits
  2. #ifndef _TCPIP_
  3. #define _TCPIP_
  4. #define TH_SYN 0x02 // Synchronize sequence numbers
  5. #define TH_FIN 0x01 // Sender has reached end of his stream
  6. #define TH_RST 0x04 // Reset the connection
  7. #define TH_PUSH 0x08 // Push data to above level
  8. #define TH_ACK 0x10 // Acknowledgement field is valid
  9. #define TH_URG 0x20 // Urgent pointer is valid
  10. struct tcphdr {
  11. USHORT th_sport;
  12. USHORT th_dport;
  13. ULONG th_seq;
  14. ULONG th_ack;
  15. UCHAR th_off;
  16. UCHAR th_flags;
  17. USHORT th_win;
  18. UCHAR th_sumhi;
  19. UCHAR th_sumlo;
  20. USHORT th_urp;
  21. UCHAR th_data[1];
  22. };
  23. #define IP_ALEN 4
  24. typedef struct IPaddr {
  25. ULONG s_addr;
  26. } IPaddr;
  27. #define IPPROTO_TCP 6
  28. struct ip_v4 {
  29. UCHAR ip_hl;
  30. UCHAR ip_tos;
  31. USHORT ip_len;
  32. USHORT ip_id;
  33. USHORT ip_off;
  34. UCHAR ip_ttl;
  35. UCHAR ip_p;
  36. USHORT ip_sum;
  37. IPaddr ip_src;
  38. IPaddr ip_dst;
  39. UCHAR ip_data[1];
  40. };
  41. typedef struct ip_v4 IPV4Header, *PIPV4Header;
  42. typedef struct _PPTP_HEADER {
  43. USHORT Length;
  44. USHORT PacketType;
  45. ULONG Cookie;
  46. USHORT MessageType;
  47. USHORT Reserved1;
  48. } PPTP_HEADER, *PPPTP_HEADER;
  49. #endif // _TCPIP_