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.

85 lines
3.0 KiB

  1. /***************************************************************************
  2. Name : PROTOCOL.H
  3. Comment : Data structure definitionc for protocol DLL
  4. Copyright (c) 1993 Microsoft Corp.
  5. Revision Log
  6. Date Name Description
  7. -------- ----- ---------------------------------------------------------
  8. ***************************************************************************/
  9. #include <fr.h>
  10. #define fsFreePtr(pTG, npfs) ((npfs)->b + (npfs)->uFreeSpaceOff)
  11. #define fsFreeSpace(pTG, npfs) (sizeof((npfs)->b) - (npfs)->uFreeSpaceOff)
  12. #define fsSize(pTG, npfs) (sizeof((npfs)->b))
  13. #define BAUD_MASK 0xF // 4 bits wide
  14. #define WIDTH_SHIFT 4 // next item must be 2^this
  15. #define WIDTH_MASK 0xF3 // top 4 and bottom 3
  16. #define LENGTH_MASK 0x3
  17. #define MINSCAN_SUPER_HALF 8
  18. #define MINSCAN_MASK 0xF // actually 4 bits wide too
  19. #define ZeroRFS(pTG, lp) _fmemset(lp, 0, sizeof(RFS))
  20. /****************** begin prototypes from sendfr.c *****************/
  21. VOID BCtoNSFCSIDIS(PThrdGlbl pTG, NPRFS npfs, NPBC npbc, NPLLPARAMS npll);
  22. void CreateIDFrame(PThrdGlbl pTG, IFR ifr, NPRFS npfs, LPSTR);
  23. void CreateDISorDTC(PThrdGlbl pTG, IFR ifr, NPRFS npfs, NPBCFAX npbcFax, NPLLPARAMS npll);
  24. VOID CreateNSSTSIDCS(PThrdGlbl pTG, NPPROT npProt, NPRFS npfs);
  25. void CreateDCS(PThrdGlbl pTG, NPRFS, NPBCFAX npbcFax, NPLLPARAMS npll);
  26. /***************** end of prototypes from sendfr.c *****************/
  27. /****************** begin prototypes from recvfr.c *****************/
  28. BOOL AwaitSendParamsAndDoNegot(PThrdGlbl pTG);
  29. void GotRecvCaps(PThrdGlbl pTG);
  30. void GotRecvParams(PThrdGlbl pTG);
  31. /***************** end of prototypes from recvfr.c *****************/
  32. /****************** begin prototypes from dis.c *****************/
  33. USHORT SetupDISorDCSorDTC(PThrdGlbl pTG, NPDIS npdis, NPBCFAX npbcFax, NPLLPARAMS npll);
  34. void ParseDISorDCSorDTC(PThrdGlbl pTG, NPDIS npDIS, NPBCFAX npbcFax, NPLLPARAMS npll, BOOL fParams);
  35. void NegotiateLowLevelParams(PThrdGlbl pTG, NPLLPARAMS npllRecv, NPLLPARAMS npllSend, DWORD AwRes, USHORT uEnc, NPLLPARAMS npllNegot);
  36. USHORT GetReversedFIFs
  37. (
  38. IN PThrdGlbl pTG,
  39. IN LPCSTR lpstrSource,
  40. OUT LPSTR lpstrDest,
  41. IN UINT cch
  42. );
  43. void CreateStupidReversedFIFs(PThrdGlbl pTG, LPSTR lpstr1, LPSTR lpstr2);
  44. BOOL DropSendSpeed(PThrdGlbl pTG);
  45. USHORT CopyFrame(PThrdGlbl pTG, LPBYTE lpbDst, LPFR lpfr, USHORT uSize);
  46. void CopyRevIDFrame
  47. (
  48. IN PThrdGlbl pTG,
  49. OUT LPBYTE lpbDst,
  50. IN LPFR lpfr,
  51. IN UINT cb
  52. );
  53. void EnforceMaxSpeed(PThrdGlbl pTG);
  54. BOOL AreDCSParametersOKforDIS(LPDIS sendDIS, LPDIS recvdDCS);
  55. /***************** end of prototypes from dis.c *****************/
  56. /**--------------------------- Debugging ------------------------**/
  57. extern void D_PrintBC(LPSTR lpsz, LPLLPARAMS lpll);
  58. #define FILEID_SENDFR 34
  59. #define FILEID_WHATNEXT 35