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.

112 lines
2.4 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. acdapi.h
  5. Abstract:
  6. Exported routines from the Implicit Connection
  7. Driver (rasacd.sys) for use by transports to allow a
  8. user space process to dynamically create a network
  9. connection upon a network unreachable error.
  10. Author:
  11. Anthony Discolo (adiscolo) 17-Apr-1995
  12. Environment:
  13. Kernel Mode
  14. Revision History:
  15. --*/
  16. #ifndef _ACDAPI_
  17. #define _ACDAPI_
  18. //
  19. // A callback from the automatic connection
  20. // driver to the transport to continue the
  21. // connection process.
  22. //
  23. typedef VOID (*ACD_CONNECT_CALLBACK)(
  24. IN BOOLEAN,
  25. IN PVOID *);
  26. typedef VOID
  27. (*ACD_NEWCONNECTION)(
  28. IN PACD_ADDR pszAddr,
  29. IN PACD_ADAPTER pAdapter
  30. );
  31. typedef BOOLEAN
  32. (*ACD_STARTCONNECTION)(
  33. IN ULONG ulDriverId,
  34. IN PACD_ADDR pszAddr,
  35. IN ULONG ulFlags,
  36. IN ACD_CONNECT_CALLBACK pProc,
  37. IN USHORT nArgs,
  38. IN PVOID *pArgs
  39. );
  40. //
  41. // A callback to allow the caller
  42. // to rummage around in the parameters
  43. // to find the right request to cancel.
  44. // To cancel the connection, the
  45. // ACD_CANCEL_CALLBACK routine returns
  46. // TRUE.
  47. //
  48. typedef BOOLEAN (*ACD_CANCEL_CALLBACK)(
  49. IN PVOID pArg,
  50. IN ULONG ulFlags,
  51. IN ACD_CONNECT_CALLBACK pProc,
  52. IN USHORT nArgs,
  53. IN PVOID *pArgs
  54. );
  55. typedef BOOLEAN
  56. (*ACD_CANCELCONNECTION)(
  57. IN ULONG ulDriverId,
  58. IN PACD_ADDR pszAddr,
  59. IN ACD_CANCEL_CALLBACK pProc,
  60. IN PVOID pArg
  61. );
  62. //
  63. // The structure a transport client receives
  64. // when it binds (IOCTL_INTERNAL_ACD_BIND) with the driver.
  65. //
  66. typedef struct {
  67. LIST_ENTRY ListEntry;
  68. //
  69. // Provided by the transport.
  70. //
  71. KSPIN_LOCK SpinLock;
  72. ULONG ulDriverId;
  73. //
  74. // Filled in by rasacd.sys.
  75. //
  76. BOOLEAN fEnabled;
  77. ACD_NEWCONNECTION lpfnNewConnection;
  78. ACD_STARTCONNECTION lpfnStartConnection;
  79. ACD_CANCELCONNECTION lpfnCancelConnection;
  80. } ACD_DRIVER, *PACD_DRIVER;
  81. //
  82. // Internal IOCTL definitions
  83. //
  84. #define IOCTL_INTERNAL_ACD_BIND \
  85. _ACD_CTL_CODE(0x1234, METHOD_BUFFERED, FILE_ANY_ACCESS)
  86. #define IOCTL_INTERNAL_ACD_UNBIND \
  87. _ACD_CTL_CODE(0x1235, METHOD_BUFFERED, FILE_ANY_ACCESS)
  88. #define IOCTL_INTERNAL_ACD_QUERY_STATE \
  89. _ACD_CTL_CODE(0x1236, METHOD_BUFFERED, FILE_ANY_ACCESS)
  90. #endif // ifndef _ACDAPI_