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.

170 lines
5.5 KiB

  1. /*
  2. (C) Copyright 1999
  3. All rights reserved.
  4. Portions of this software are:
  5. (C) Copyright 1995 TriplePoint, Inc. -- http://www.TriplePoint.com
  6. License to use this software is granted under the same terms
  7. outlined in the Microsoft Windows Device Driver Development Kit.
  8. (C) Copyright 1992 Microsoft Corp. -- http://www.Microsoft.com
  9. License to use this software is granted under the terms outlined in
  10. the Microsoft Windows Device Driver Development Kit.
  11. @doc INTERNAL DChannel DChannel_h
  12. @module DChannel.h |
  13. This module defines the interface to the <t DCHANNEL_OBJECT>.
  14. @head3 Contents |
  15. @index class,mfunc,func,msg,mdata,struct,enum | DChannel_h
  16. @end
  17. */
  18. /* @doc EXTERNAL INTERNAL
  19. @topic 4.3 DChannel Overview |
  20. This section describes the interfaces defined in <f DChannel\.h>.
  21. This module isolates most the vendor specific Call Control interfaces.
  22. It will require some changes to accomodate your hardware device's call
  23. control mechanism.
  24. The driver is written to assume a single logical <t DCHANNEL_OBJECT> for
  25. each adapter. If your card supports more than one ISDN line, you will
  26. need to use the given BChannel object to identify which <t PORT_OBJECT>
  27. the real DChannel is located on. You can then manage the physical call
  28. control using that interface, and the logicial call control using the
  29. DChannel interface.
  30. */
  31. #ifndef _DCHANNEL_H
  32. #define _DCHANNEL_H
  33. #define DCHANNEL_OBJECT_TYPE ((ULONG)'D')+\
  34. ((ULONG)'C'<<8)+\
  35. ((ULONG)'H'<<16)+\
  36. ((ULONG)'N'<<24)
  37. /* @doc INTERNAL DChannel DChannel_h DCHANNEL_OBJECT
  38. @struct DCHANNEL_OBJECT |
  39. This structure contains the data associated with an ISDN DChannel. Here,
  40. DChannel is defined as an interface by which to setup and teardown a
  41. BChannel connection between two end-points. This channel is responsible
  42. for establishing a point-to-point connection over one of the available
  43. BChannels.
  44. @comm
  45. This logical DChannel does not necessarily map to a physical DChannel
  46. on the NIC. The NIC may in fact have multiple DChannels depending on
  47. how many ports and whether it is BRI, PRI, T-1, or E-1. The NIC may in
  48. fact not have DChannels at all, as may be the case with channelized T-1.
  49. The DChannel is just a convenient abstraction for announcing and
  50. answering incoming calls, and for placing outgoing calls.
  51. There will be one DChannel created for each NIC. The number of physical
  52. D-channels depends on how many ports the NIC has, and how the ports are
  53. provisioned and configured. The provisioning can be configured at install
  54. time or changed using the control panel. The driver does not allow the
  55. configuration to change at run-time, so the computer or the adapter must
  56. be restarted to enable the configuration changes.
  57. */
  58. typedef struct DCHANNEL_OBJECT
  59. {
  60. ULONG ObjectType; // @field
  61. // Four characters used to identify this type of object 'DCHN'.
  62. ULONG ObjectID; // @field
  63. // Instance number used to identify a specific object instance.
  64. PMINIPORT_ADAPTER_OBJECT pAdapter; // @field
  65. // A pointer to the <t MINIPORT_ADAPTER_OBJECT> instance.
  66. UINT IsOpen; // @field
  67. // Set non-zero if this DChannel is open, otherwise set zero.
  68. ULONG TotalMakeCalls; // @field
  69. // Total number of <f DChannelMakeCall> requests.
  70. ULONG TotalAnswers; // @field
  71. // Total number of <f DChannelAnswerCall> requests.
  72. ULONG TODO; // @field
  73. // Add your data members here.
  74. } DCHANNEL_OBJECT;
  75. #define GET_ADAPTER_FROM_DCHANNEL(pDChannel) (pDChannel->pAdapter)
  76. /*
  77. Function prototypes.
  78. */
  79. NDIS_STATUS DChannelCreate(
  80. OUT PDCHANNEL_OBJECT * ppDChannel,
  81. IN PMINIPORT_ADAPTER_OBJECT pAdapter
  82. );
  83. void DChannelDestroy(
  84. IN PDCHANNEL_OBJECT pDChannel
  85. );
  86. void DChannelInitialize(
  87. IN PDCHANNEL_OBJECT pDChannel
  88. );
  89. NDIS_STATUS DChannelOpen(
  90. IN PDCHANNEL_OBJECT pDChannel
  91. );
  92. void DChannelClose(
  93. IN PDCHANNEL_OBJECT pDChannel
  94. );
  95. NDIS_STATUS DChannelMakeCall(
  96. IN PDCHANNEL_OBJECT pDChannel,
  97. IN PBCHANNEL_OBJECT pBChannel,
  98. IN PUCHAR DialString,
  99. IN USHORT DialStringLength,
  100. IN PLINE_CALL_PARAMS pLineCallParams
  101. );
  102. NDIS_STATUS DChannelAnswerCall(
  103. IN PDCHANNEL_OBJECT pDChannel,
  104. IN PBCHANNEL_OBJECT pBChannel
  105. );
  106. NDIS_STATUS DChannelCloseCall(
  107. IN PDCHANNEL_OBJECT pDChannel,
  108. IN PBCHANNEL_OBJECT pBChannel
  109. );
  110. VOID DChannelRejectCall(
  111. IN PDCHANNEL_OBJECT pDChannel,
  112. IN PBCHANNEL_OBJECT pBChannel
  113. );
  114. #endif // _DCHANNEL_H