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.

65 lines
1.0 KiB

  1. /*++
  2. Copyright (c) 2002 Microsoft Corporation
  3. Module Name:
  4. validate.c
  5. Abstract:
  6. This module contains all of the code to perform data
  7. validation for IPSec user mode componets
  8. Authors:
  9. RaymondS
  10. Environment
  11. User Level: Win32
  12. Revision History:
  13. 21 APR 2002: Added ValidateFilterAction
  14. --*/
  15. #include <precomp.h>
  16. DWORD
  17. ValidateFilterAction(
  18. FILTER_ACTION FilterAction
  19. )
  20. {
  21. DWORD dwError = ERROR_SUCCESS;
  22. if (FilterAction == 0 ||
  23. FilterAction >= FILTER_ACTION_MAX)
  24. {
  25. dwError = ERROR_INVALID_PARAMETER;
  26. BAIL_ON_WIN32_ERROR(dwError);
  27. }
  28. error:
  29. return (dwError);
  30. }
  31. DWORD
  32. ValidateInterfaceType(
  33. IF_TYPE InterfaceType
  34. )
  35. {
  36. DWORD dwError = ERROR_SUCCESS;
  37. if (InterfaceType == 0 ||
  38. InterfaceType >= INTERFACE_TYPE_MAX)
  39. {
  40. dwError = ERROR_INVALID_PARAMETER;
  41. BAIL_ON_WIN32_ERROR(dwError);
  42. }
  43. error:
  44. return (dwError);
  45. }