Source code of Windows XP (NT5)
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.

93 lines
2.1 KiB

  1. /*++
  2. Copyright (c) 1998-1999 Microsoft Corporation
  3. Module Name:
  4. ccdefs.h
  5. Abstract:
  6. Header file for fake versions of various external calls (ndis, ip...).
  7. Used for debugging and component testing only.
  8. To enable, define ARPDBG_FAKE_APIS in ccdefs.h
  9. Author:
  10. Revision History:
  11. Who When What
  12. -------- -------- ----
  13. josephj 03-24-99 created
  14. --*/
  15. NDIS_STATUS
  16. arpDbgFakeNdisClMakeCall(
  17. IN NDIS_HANDLE NdisVcHandle,
  18. IN OUT PCO_CALL_PARAMETERS CallParameters,
  19. IN NDIS_HANDLE ProtocolPartyContext OPTIONAL,
  20. OUT PNDIS_HANDLE NdisPartyHandle, OPTIONAL
  21. IN PRM_OBJECT_HEADER pOwningObject,
  22. IN PVOID pClientContext,
  23. IN PRM_STACK_RECORD pSR
  24. );
  25. NDIS_STATUS
  26. arpDbgFakeNdisClCloseCall(
  27. IN NDIS_HANDLE NdisVcHandle,
  28. IN NDIS_HANDLE NdisPartyHandle OPTIONAL,
  29. IN PVOID Buffer OPTIONAL,
  30. IN UINT Size, OPTIONAL
  31. IN PRM_OBJECT_HEADER pOwningObject,
  32. IN PVOID pClientContext,
  33. IN PRM_STACK_RECORD pSR
  34. );
  35. VOID
  36. arpDbgFakeNdisCoSendPackets(
  37. IN NDIS_HANDLE NdisVcHandle,
  38. IN PPNDIS_PACKET PacketArray,
  39. IN UINT NumberOfPackets,
  40. IN PRM_OBJECT_HEADER pOwningObject,
  41. IN PVOID pClientContext
  42. );
  43. //
  44. // The following defines and prototypes are exposed here just so that they
  45. // are accessable to the component tests under .\tests.
  46. //
  47. #define RAN1X_MAX 2147483647
  48. // ran1x returns randum unsigned longs in the range 0..RAN1X_MAX exclusive
  49. // (i.e., 1..(RAN1X_MAX-1) inclusive).
  50. //
  51. unsigned long ran1x(
  52. void
  53. );
  54. // like "srand" -- sets the seed.
  55. //
  56. void
  57. sran1x(
  58. unsigned long seed
  59. );
  60. typedef struct
  61. {
  62. INT Outcome; // Value of this outcome
  63. UINT Weight; // Relative weight of this outcome
  64. } OUTCOME_PROBABILITY;
  65. INT
  66. arpGenRandomInt(
  67. OUTCOME_PROBABILITY *rgOPs,
  68. UINT cOutcomes
  69. );