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.

156 lines
5.0 KiB

  1. /*
  2. (C) Copyright 1998
  3. All rights reserved.
  4. Portions of this software are:
  5. (C) Copyright 1995, 1999 TriplePoint, Inc. -- http://www.TriplePoint.com
  6. License to use this software is granted under the terms outlined in
  7. the TriplePoint Software Services Agreement.
  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. #ifndef _DCHANNEL_H
  19. #define _DCHANNEL_H
  20. #define DCHANNEL_OBJECT_TYPE ((ULONG)'D')+\
  21. ((ULONG)'C'<<8)+\
  22. ((ULONG)'H'<<16)+\
  23. ((ULONG)'N'<<24)
  24. /* @doc INTERNAL DChannel DChannel_h DCHANNEL_OBJECT
  25. @struct DCHANNEL_OBJECT |
  26. This structure contains the data associated with an ISDN DChannel. Here,
  27. DChannel is defined as an interface by which to setup and teardown a
  28. BChannel connection between two end-points. This channel is responsible
  29. for establishing a point-to-point connection over one of the available
  30. BChannels.
  31. @comm
  32. This logical DChannel does not necessarily map to a physical DChannel
  33. on the NIC. The NIC may in fact have multiple DChannels depending on
  34. how many ports and whether it is BRI, PRI, T-1, or E-1. The NIC may in
  35. fact not have DChannels at all, as may be the case with channelized T-1.
  36. The DChannel is just a convenient abstraction for announcing and
  37. answering incoming calls, and for placing outgoing calls.
  38. There will be one DChannel created for each NIC. The number of physical
  39. D-channels depends on how many ports the NIC has, and how the ports are
  40. provisioned and configured. The provisioning can be configured at install
  41. time or changed using the control panel. The driver does not allow the
  42. configuration to change at run-time, so the computer or the adapter must
  43. be restarted to enable the configuration changes.
  44. */
  45. typedef struct DCHANNEL_OBJECT
  46. {
  47. ULONG ObjectType; // @field
  48. // Four characters used to identify this type of object 'DCHN'.
  49. ULONG ObjectID; // @field
  50. // Instance number used to identify a specific object instance.
  51. PMINIPORT_ADAPTER_OBJECT pAdapter; // @field
  52. // A pointer to the <t MINIPORT_ADAPTER_OBJECT> instance.
  53. BOOLEAN IsOpen; // @field
  54. // Set TRUE if this DChannel is open, otherwise set FALSE.
  55. ULONG TotalMakeCalls; // @field
  56. // Total number of <f DChannelMakeCall> requests.
  57. ULONG TotalAnswers; // @field
  58. // Total number of <f DChannelAnswer> requests.
  59. ULONG TODO; // @field
  60. // Add your data members here.
  61. } DCHANNEL_OBJECT;
  62. #define GET_ADAPTER_FROM_DCHANNEL(pDChannel) (pDChannel->pAdapter)
  63. /*
  64. Function prototypes.
  65. */
  66. NDIS_STATUS DChannelCreate(
  67. OUT PDCHANNEL_OBJECT * ppDChannel,
  68. IN PMINIPORT_ADAPTER_OBJECT pAdapter
  69. );
  70. void DChannelDestroy(
  71. IN PDCHANNEL_OBJECT pDChannel
  72. );
  73. void DChannelInitialize(
  74. IN PDCHANNEL_OBJECT pDChannel
  75. );
  76. NDIS_STATUS DChannelOpen(
  77. IN PDCHANNEL_OBJECT pDChannel
  78. );
  79. void DChannelClose(
  80. IN PDCHANNEL_OBJECT pDChannel
  81. );
  82. NDIS_STATUS DChannelMakeCall(
  83. IN PDCHANNEL_OBJECT pDChannel,
  84. IN PBCHANNEL_OBJECT pBChannel,
  85. IN PUCHAR DialString,
  86. IN USHORT DialStringLength,
  87. IN PLINE_CALL_PARAMS pLineCallParams
  88. );
  89. NDIS_STATUS DChannelAnswer(
  90. IN PDCHANNEL_OBJECT pDChannel,
  91. IN PBCHANNEL_OBJECT pBChannel
  92. );
  93. NDIS_STATUS DChannelDropCall(
  94. IN PDCHANNEL_OBJECT pDChannel,
  95. IN PBCHANNEL_OBJECT pBChannel
  96. );
  97. NDIS_STATUS DChannelCloseCall(
  98. IN PDCHANNEL_OBJECT pDChannel,
  99. IN PBCHANNEL_OBJECT pBChannel
  100. );
  101. VOID DChannelRejectCall(
  102. IN PDCHANNEL_OBJECT pDChannel,
  103. IN PBCHANNEL_OBJECT pBChannel
  104. );
  105. #endif // _DCHANNEL_H