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.

107 lines
3.2 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 Port Port_h
  12. @module Port.h |
  13. This module defines the interface to the <t PORT_OBJECT>.
  14. @head3 Contents |
  15. @index class,mfunc,func,msg,mdata,struct,enum | Port_h
  16. @end
  17. */
  18. #ifndef _PORT_H
  19. #define _PORT_H
  20. #define PORT_OBJECT_TYPE ((ULONG)'P')+\
  21. ((ULONG)'O'<<8)+\
  22. ((ULONG)'R'<<16)+\
  23. ((ULONG)'T'<<24)
  24. #define MAX_PORTS 10
  25. // The most I've ever seen is 4 - If you have more than 10, the code will
  26. // have to change to handle more than a single digit "PortX" parameter.
  27. /* @doc INTERNAL Port Port_h PORT_OBJECT
  28. @struct PORT_OBJECT |
  29. This structure contains the data associated with an ISDN port. Here,
  30. a port is defined as a single BRI, PRI, T-1, or E-1 physical interface.
  31. */
  32. typedef struct PORT_OBJECT
  33. {
  34. ULONG ObjectType; // @field
  35. // Four characters used to identify this type of object 'PORT'.
  36. ULONG ObjectID; // @field
  37. // Instance number used to identify a specific object instance.
  38. PCARD_OBJECT pCard; // @field
  39. // Pointer to the <t CARD_OBJECT> owning this port.
  40. BOOLEAN IsOpen; // @field
  41. // Set TRUE if this BChannel is open, otherwise set FALSE.
  42. ULONG NumChannels; // @field
  43. // Number of communications channels configured on this port.
  44. ULONG PortIndex; // @field
  45. // Port Index (0 .. MAX_PORTS-1).
  46. ULONG SwitchType; // @field
  47. // ISDN switch type.
  48. ULONG TODO; // @field
  49. // Add your data members here.
  50. } PORT_OBJECT, *PPORT_OBJECT;
  51. #define GET_ADAPTER_FROM_PORT(pPort) (pPort->pCard->pAdapter)
  52. /*
  53. Function prototypes.
  54. */
  55. NDIS_STATUS PortCreate(
  56. OUT PPORT_OBJECT * ppPort,
  57. IN PCARD_OBJECT pCard
  58. );
  59. void PortInitialize(
  60. PPORT_OBJECT pPort
  61. );
  62. void PortDestroy(
  63. PPORT_OBJECT pPort
  64. );
  65. #endif // _PORT_H