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.

53 lines
1012 B

  1. #define RECV_OVERFLOW 10 // preamb + postamb + ?
  2. #define RESYNC_LEN 10 // size of rcv default buffer
  3. //*********** ASYNC PROTOCOL DEFINITIONS AND STRUCTURES *****************
  4. #define SOH_BCAST 0x01
  5. #define SOH_DEST 0x02
  6. // if a type field exists, OR in this bit (i.e. TCP/IP, IPX)
  7. #define SOH_TYPE 0x80
  8. // if the frame went through coherency, OR in this bit
  9. #define SOH_COMPRESS 0x40
  10. // if the frame has escape characters removed (ASCII 0-31) set this.
  11. #define SOH_ESCAPE 0x20
  12. #define SYN 0x16
  13. #define ETX 0x03
  14. //*********** FRAME STRUCTURES
  15. typedef struct preamble preamble;
  16. struct preamble {
  17. UCHAR syn;
  18. UCHAR soh;
  19. };
  20. typedef struct postamble postamble;
  21. struct postamble {
  22. UCHAR etx;
  23. UCHAR crclsb;
  24. UCHAR crcmsb;
  25. };
  26. //*** Frame parsing....
  27. #define ETHERNET_HEADER_SIZE 14
  28. //*** Ethernet type header
  29. typedef struct ether_addr ether_addr;
  30. struct ether_addr {
  31. UCHAR dst[6];
  32. UCHAR src[6];
  33. };