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.

68 lines
1.6 KiB

  1. extern ULONG StartedCommonInitialization, CompletedCommonInitialization ;
  2. extern HANDLE g_hModule;
  3. extern MIB_SERVER_HANDLE g_hMibServer;
  4. typedef
  5. DWORD
  6. (GET_OPT_FN)(
  7. IN LPCWSTR *ppwcArguments,
  8. IN DWORD dwCurrentIndex,
  9. IN DWORD dwArgCount,
  10. OUT PDWORD pdwIndices,
  11. OUT PDWORD pdwNumParsed
  12. );
  13. typedef GET_OPT_FN *PGET_OPT_FN;
  14. typedef struct _MIB_OBJECT_PARSER
  15. {
  16. PWCHAR pwszMIBObj;
  17. DWORD dwMinOptArg;
  18. DWORD dwNumArgs;
  19. PGET_OPT_FN pfnMIBObjParser;
  20. // DWORD dwShortCmdHelpToken;
  21. // DWORD dwCmdHelpToken;
  22. } MIB_OBJECT_PARSER,*PMIB_OBJECT_PARSER;
  23. #define CREATE_MIB_ENTRY(t,m,f) {TOKEN_##t, HLP_##t, HLP_##t##_EX, m,f}
  24. BOOL
  25. IsProtocolInstalled(
  26. DWORD dwProtoId,
  27. WCHAR *pwszName
  28. );
  29. DWORD
  30. GetMIBIfIndex(
  31. IN PTCHAR *pptcArguments,
  32. IN DWORD dwCurrentIndex,
  33. OUT PDWORD pdwIndices,
  34. OUT PDWORD pdwNumParsed
  35. );
  36. typedef DWORD IPV4_ADDRESS;
  37. extern VALUE_STRING CommonBooleanStringArray[];
  38. extern VALUE_TOKEN CommonBooleanTokenArray[];
  39. #define COMMON_BOOLEAN_SIZE 2
  40. extern VALUE_STRING CommonLoggingStringArray[];
  41. extern VALUE_TOKEN CommonLoggingTokenArray[];
  42. #define COMMON_LOGGING_SIZE 4
  43. #define VERIFY_INSTALLED(x,y) \
  44. if (!IsProtocolInstalled(x,y)) \
  45. { \
  46. return NO_ERROR; \
  47. }
  48. #define \
  49. IP_TO_TSTR(str,addr) \
  50. swprintf( \
  51. (str), \
  52. TEXT("%d.%d.%d.%d"), \
  53. ((PUCHAR)addr)[0], \
  54. ((PUCHAR)addr)[1], \
  55. ((PUCHAR)addr)[2], \
  56. ((PUCHAR)addr)[3] \
  57. )