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.

111 lines
6.2 KiB

  1. #ifndef _VoiceParser_H_
  2. #define _VoiceParser_H_
  3. #include "DPlay8Parser.hpp"
  4. // DESCRIPTION: Creates and fills-in a properties database for the protocol.
  5. // Network Monitor uses this database to determine which properties the protocol supports.
  6. //
  7. // ARGUMENTS: i_hVoiceProtocol - The handle of the protocol provided by the Network Monitor.
  8. //
  9. // RETURNS: NOTHING
  10. //
  11. DPLAYPARSER_API VOID BHAPI VoiceRegister( HPROTOCOL i_hVoiceProtocol );
  12. // DESCRIPTION: Frees the resources used to create the protocol property database.
  13. //
  14. // ARGUMENTS: i_hVoiceProtocol - The handle of the protocol provided by the Network Monitor.
  15. //
  16. // RETURNS: NOTHING
  17. //
  18. DPLAYPARSER_API VOID WINAPI VoiceDeregister( HPROTOCOL i_hProtocol );
  19. // DESCRIPTION: Indicates whether a piece of data is recognized as the protocol that the parser detects.
  20. //
  21. // ARGUMENTS: i_hFrame - The handle to the frame that contains the data.
  22. // i_pbMacFrame - The pointer to the first byte of the frame; the pointer provides a way to view
  23. // the data that the other parsers recognize.
  24. // i_pbVoiceFrame - Pointer to the start of the unclaimed data. Typically, the unclaimed data is located
  25. // in the middle of a frame because a previous parser has claimed data before this parser.
  26. // i_dwMacType - MAC value of the first protocol in a frame. Typically, the i_dwMacType value is used
  27. // when the parser must identify the first protocol in the frame. Can be one of the following:
  28. // MAC_TYPE_ETHERNET = 802.3, MAC_TYPE_TOKENRING = 802.5, MAC_TYPE_FDDI ANSI = X3T9.5.
  29. // i_dwBytesLeft - The remaining number of bytes from a location in the frame to the end of the frame.
  30. // i_hPrevProtocol - Handle of the previous protocol.
  31. // i_dwPrevProtOffset - Offset of the previous protocol (from the beginning of the frame).
  32. // o_pdwProtocolStatus - Protocol status indicator. Must be one of the following: PROTOCOL_STATUS_RECOGNIZED,
  33. // PROTOCOL_STATUS_NOT_RECOGNIZED, PROTOCOL_STATUS_CLAIMED, PROTOCOL_STATUS_NEXT_PROTOCOL.
  34. // o_phNextProtocol - Placeholder for the handle of the next protocol. This parameter is set when the parser identifies
  35. // the protocol that follows its own protocol.
  36. // io_pdwptrInstData - On input, a pointer to the instance data from the previous protocol.
  37. // On output, a pointer to the instance data for the current protocol.
  38. //
  39. // RETURNS: If the function is successful, the return value is a pointer to the first byte after the recognized parser data.
  40. // If the parser claims all the remaining data, the return value is NULL. If the function is unsuccessful, the return
  41. // value is the initial value of the i_pbVoiceFrame parameter.
  42. //
  43. DPLAYPARSER_API LPBYTE BHAPI VoiceRecognizeFrame( HFRAME i_hFrame,
  44. ULPBYTE i_upbMacFrame,
  45. ULPBYTE i_upbVoiceFrame,
  46. DWORD i_dwMacType,
  47. DWORD i_dwBytesLeft,
  48. HPROTOCOL i_hPrevProtocol,
  49. DWORD i_dwPrevProtOffset,
  50. LPDWORD o_pdwProtocolStatus,
  51. LPHPROTOCOL o_hNextProtocol,
  52. PDWORD_PTR io_pdwptrInstData );
  53. // DESCRIPTION: Maps the properties that exist in a piece of recognized data to Voiceecific locations.
  54. //
  55. // ARGUMENTS: i_hFrame - Handle of the frame that is being parsed.
  56. // i_pbMacFram - Pointer to the first byte in the frame.
  57. // i_pbVoiceFrame - Pointer to the start of the recognized data.
  58. // i_dwMacType - MAC value of the first protocol in a frame. Typically, the i_dwMacType value is used
  59. // when the parser must identify the first protocol in the frame. Can be one of the following:
  60. // MAC_TYPE_ETHERNET = 802.3, MAC_TYPE_TOKENRING = 802.5, MAC_TYPE_FDDI ANSI = X3T9.5.
  61. // i_dwBytesLeft - The remaining number of bytes in a frame (starting from the beginning of the recognized data).
  62. // i_hPrevProtocol - Handle of the previous protocol.
  63. // i_dwPrevProtOffset - Offset of the previous protocol (starting from the beginning of the frame).
  64. // i_dwptrInstData - Pointer to the instance data that the previous protocol provides.
  65. //
  66. // RETURNS: If the function is successful, the return value is a pointer to the first byte after the recognized data in a frame,
  67. // or NULL if the recognized data is the last piece of data in a frame. If the function is unsuccessful, the return value
  68. // is the initial value of i_pbVoiceFrame.
  69. //
  70. DPLAYPARSER_API LPBYTE BHAPI VoiceAttachProperties( HFRAME i_hFrame,
  71. ULPBYTE i_upbMacFrame,
  72. ULPBYTE i_upbVoiceFrame,
  73. DWORD i_dwMacType,
  74. DWORD i_dwBytesLeft,
  75. HPROTOCOL i_hPrevProtocol,
  76. DWORD i_dwPrevProtOffset,
  77. DWORD_PTR i_dwptrInstData );
  78. // DESCRIPTION: Formats the data that is diVoicelayed in the details pane of the Network Monitor UI.
  79. //
  80. // ARGUMENTS: i_hFrame - Handle of the frame that is being parsed.
  81. // i_pbMacFrame - Pointer to the first byte of a frame.
  82. // i_pbCoreFrame - Pointer to the beginning of the protocol data in a frame.
  83. // i_dwPropertyInsts - Number of PROPERTYINST structures provided by lpPropInst.
  84. // i_pPropInst - Pointer to an array of PROPERTYINST structures.
  85. //
  86. // RETURNS: If the function is successful, the return value is a pointer to the first byte after the recognized data in a frame,
  87. // or NULL if the recognized data is the last piece of data in a frame. If the function is unsuccessful, the return value
  88. // is the initial value of i_pbVoiceFrame.
  89. //
  90. DPLAYPARSER_API DWORD BHAPI VoiceFormatProperties( HFRAME i_hFrame,
  91. ULPBYTE i_upbMacFrame,
  92. ULPBYTE i_upbVoiceFrame,
  93. DWORD i_dwPropertyInsts,
  94. LPPROPERTYINST i_pPropInst );
  95. bool CreateVoiceProtocol( void );
  96. void DestroyVoiceProtocol( void );
  97. #endif // _VoiceParser_H_