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.

133 lines
3.4 KiB

  1. /*++
  2. Copyright (c) 1999 Microsoft Corporation
  3. Module Name:
  4. install.c
  5. Abstract:
  6. auto install code for clusnet
  7. Author:
  8. Charlie Wickham (charlwi) 14-Sep-1999
  9. Revision History:
  10. --*/
  11. #include "precomp.h"
  12. #pragma hdrstop
  13. #include <stdio.h>
  14. PPF_PARSERDLLINFO WINAPI
  15. ParserAutoInstallInfo(
  16. VOID
  17. )
  18. /*++
  19. Routine Description:
  20. routine called by netmon to auto-install this parser
  21. Arguments:
  22. None
  23. Return Value:
  24. pointer to data block
  25. --*/
  26. {
  27. PPF_PARSERDLLINFO parserDLLInfo;
  28. PPF_PARSERINFO parserInfo;
  29. PPF_HANDOFFSET cnpHandoffSet;
  30. PPF_FOLLOWSET cdpFollowSet;
  31. // Allocate memory for parser info:
  32. parserDLLInfo = (PPF_PARSERDLLINFO)LocalAlloc(LMEM_FIXED | LMEM_ZEROINIT,
  33. sizeof(PF_PARSERDLLINFO) +
  34. 4 * sizeof(PF_PARSERINFO));
  35. cnpHandoffSet = (PPF_HANDOFFSET)LocalAlloc(LMEM_FIXED | LMEM_ZEROINIT,
  36. sizeof(PF_HANDOFFSET) + sizeof(PF_HANDOFFENTRY));
  37. cdpFollowSet = (PPF_FOLLOWSET)LocalAlloc(LMEM_FIXED | LMEM_ZEROINIT,
  38. sizeof(PF_FOLLOWSET) + sizeof(PF_FOLLOWENTRY));
  39. if (parserDLLInfo == NULL || cnpHandoffSet == NULL || cdpFollowSet == NULL)
  40. {
  41. #ifdef DEBUG
  42. dprintf("Mem alloc failed..");
  43. #endif
  44. return NULL;
  45. }
  46. parserDLLInfo->nParsers = 4;
  47. parserInfo = &parserDLLInfo->ParserInfo[0];
  48. //
  49. // set CNP data. indicate that UDP hands off to CNP on port 3343.
  50. //
  51. strncpy( parserInfo->szProtocolName, "CNP", sizeof(parserInfo->szProtocolName));
  52. strncpy( parserInfo->szComment, "Cluster Network Protocol", sizeof(parserInfo->szComment));
  53. cnpHandoffSet->nEntries = 1;
  54. strncpy(cnpHandoffSet->Entry->szIniFile,
  55. "tcpip.ini",
  56. sizeof(cnpHandoffSet->Entry->szIniFile));
  57. strncpy(cnpHandoffSet->Entry->szIniSection,
  58. "UDP_HandoffSet",
  59. sizeof( cnpHandoffSet->Entry->szIniSection ));
  60. strncpy(cnpHandoffSet->Entry->szProtocol,
  61. "CNP",
  62. sizeof(cnpHandoffSet->Entry->szProtocol));
  63. cnpHandoffSet->Entry->dwHandOffValue = 3343;
  64. cnpHandoffSet->Entry->ValueFormatBase = HANDOFF_VALUE_FORMAT_BASE_DECIMAL;
  65. parserInfo->pWhoHandsOffToMe = cnpHandoffSet;
  66. //
  67. // set CDP data. indicate that MSRPC is a followset of CDP
  68. //
  69. ++parserInfo;
  70. strncpy( parserInfo->szProtocolName, "CDP", sizeof( parserInfo->szProtocolName ));
  71. strncpy( parserInfo->szComment, "Cluster Datagram Protocol", sizeof( parserInfo->szComment ));
  72. parserInfo->szHelpFile[0] = 0;
  73. cdpFollowSet->nEntries = 1;
  74. strncpy(cdpFollowSet->Entry->szProtocol,
  75. "MSRPC",
  76. sizeof(cdpFollowSet->Entry->szProtocol));
  77. parserInfo->pWhoCanFollowMe = cdpFollowSet;
  78. //
  79. // set CCMP data
  80. //
  81. ++parserInfo;
  82. strncpy( parserInfo->szProtocolName, "CCMP", sizeof( parserInfo->szProtocolName ));
  83. strncpy( parserInfo->szComment, "Cluster Control Message Protocol", sizeof(parserInfo->szComment));
  84. parserInfo->szHelpFile[0] = 0;
  85. //
  86. // set RGP data
  87. //
  88. ++parserInfo;
  89. strncpy( parserInfo->szProtocolName, "RGP", sizeof( parserInfo->szProtocolName ));
  90. strncpy( parserInfo->szComment, "Cluster Regroup Protocol", sizeof( parserInfo->szComment ));
  91. parserInfo->szHelpFile[0] = 0;
  92. return parserDLLInfo;
  93. }
  94. /* end install.c */