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.

101 lines
2.5 KiB

  1. // Copyright (c) 2000-2002, Microsoft Corporation, all rights reserved
  2. //
  3. // globals.c
  4. //
  5. // IEEE1394 mini-port/call-manager driver
  6. //
  7. //
  8. // Loads and unload the ARP module when the
  9. // bridge is activated
  10. //
  11. // Created by Adube
  12. //
  13. #include <precomp.h>
  14. NIC1394_CHARACTERISTICS Nic1394Characteristics =
  15. {
  16. 5,
  17. 1,
  18. 0,
  19. NicRegisterEnum1394,
  20. NicDeregisterEnum1394,
  21. nicAddRemoteNode,
  22. nicRemoveRemoteNode
  23. };
  24. ENUM1394_REGISTER_DRIVER_HANDLER NdisEnum1394RegisterDriver = NULL;
  25. ENUM1394_DEREGISTER_DRIVER_HANDLER NdisEnum1394DeregisterDriver = NULL;
  26. ENUM1394_REGISTER_ADAPTER_HANDLER NdisEnum1394RegisterAdapter = NULL;
  27. ENUM1394_DEREGISTER_ADAPTER_HANDLER NdisEnum1394DeregisterAdapter = NULL;
  28. PCALLBACK_OBJECT Nic1394CallbackObject = NULL;
  29. PVOID Nic1394CallbackRegisterationHandle = NULL;
  30. ULONG g_IsochTag = ISOCH_TAG;
  31. ULONGLONG g_ullOne = 1;
  32. LONG g_ulMedium ;
  33. UINT NumRecvFifos = NUM_RECV_FIFO_FIRST_PHASE ;
  34. UINT NicSends;
  35. UINT BusSends;
  36. UINT NicSendCompletes;
  37. UINT BusSendCompletes;
  38. const PUCHAR pnic1394DriverDescription = "NET IP/1394 Miniport";
  39. const USHORT nic1394DriverGeneration = 0;
  40. BOOLEAN g_ulNicDumpPacket = FALSE;
  41. ULONG g_ulDumpEthPacket = 0;
  42. // Debug counts of client oddities that should not be happening.
  43. //
  44. ULONG g_ulUnexpectedInCallCompletes = 0;
  45. ULONG g_ulCallsNotClosable = 0;
  46. BOOLEAN g_AdapterFreed = FALSE;
  47. ULONG AdapterNum = 0;
  48. const unsigned char Net1394ConfigRom[48] = {
  49. 0x00, 0x04, 0xad, 0xeb, 0x12, 0x00, 0x00, 0x5e,
  50. 0x13, 0x00, 0x00, 0x01, 0x17, 0x7b, 0xb0, 0xcf,
  51. 0x81, 0x00, 0x00, 0x01, 0x00, 0x06, 0x38, 0x91,
  52. 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x09,
  53. 0x4e, 0x00, 0x49, 0x00, 0x43, 0x00, 0x31, 0x00,
  54. 0x33, 0x00, 0x39, 0x00, 0x34, 0x00, 0x00, 0x00
  55. };
  56. //
  57. // Histograms to collect data
  58. //
  59. STAT_BUCKET SendStats;
  60. STAT_BUCKET RcvStats;
  61. // Stats
  62. ULONG nicMaxRcv;
  63. ULONG nicMaxSend;
  64. ULONG BusFailure;
  65. ULONG MallocFailure;
  66. ULONG IsochOverwrite;
  67. ULONG RcvTimerCount; // Number of times timer has fired.
  68. ULONG SendTimerCount; // Number of times timer has fired.
  69. ULONG TotSends;
  70. ULONG TotRecvs;
  71. ULONG MaxIndicatedFifos;
  72. ULONG MdlsAllocated[NoMoreCodePaths];
  73. ULONG MdlsFreed[NoMoreCodePaths];
  74. ULONG NdisBufferAllocated[NoMoreCodePaths];
  75. ULONG NdisBufferFreed[NoMoreCodePaths];