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.

83 lines
1.6 KiB

  1. /*
  2. File: context.h
  3. Mechanisms to process contexts relevant to
  4. rasmontr.
  5. 3/02/99
  6. */
  7. #include "precomp.h"
  8. // Includes for the sub contexts
  9. //
  10. #include "rasip.h"
  11. #include "rasipx.h"
  12. #include "rasnbf.h"
  13. #include "rasat.h"
  14. #include "rasaaaa.h"
  15. #include "rasdiag.h"
  16. NS_HELPER_ATTRIBUTES g_pSubContexts[] =
  17. {
  18. // Ip subcontext
  19. //
  20. {
  21. { RASIP_VERSION, 0 }, RASIP_GUID, RasIpStartHelper, NULL
  22. },
  23. // Ipx subcontext
  24. //
  25. {
  26. { RASIPX_VERSION, 0 }, RASIPX_GUID, RasIpxStartHelper, NULL
  27. },
  28. // Nbf subcontext
  29. //
  30. {
  31. { RASNBF_VERSION, 0 }, RASNBF_GUID, RasNbfStartHelper, NULL
  32. },
  33. // At (appletalk) subcontext
  34. //
  35. {
  36. { RASAT_VERSION, 0 }, RASAT_GUID, RasAtStartHelper, NULL
  37. },
  38. // Aaaa subcontext
  39. //
  40. {
  41. { RASAAAA_VERSION, 0 }, RASAAAA_GUID, RasAaaaStartHelper, NULL
  42. },
  43. // Diag subcontext
  44. //
  45. {
  46. { RASDIAG_VERSION, 0 }, RASDIAG_GUID, RasDiagStartHelper, NULL
  47. }
  48. };
  49. #define g_dwSubContextCount \
  50. (sizeof(g_pSubContexts) / sizeof(*g_pSubContexts))
  51. //
  52. // Installs all of the sub contexts provided
  53. // in this .dll (for example, "ras ip", "ras client", etc.)
  54. //
  55. DWORD
  56. RasContextInstallSubContexts()
  57. {
  58. DWORD dwErr = NO_ERROR, i;
  59. PNS_HELPER_ATTRIBUTES pCtx = NULL;
  60. for (i = 0, pCtx = g_pSubContexts; i < g_dwSubContextCount; i++, pCtx++)
  61. {
  62. // Initialize helper attributes
  63. //
  64. RegisterHelper( &g_RasmontrGuid, pCtx );
  65. }
  66. return dwErr;
  67. }