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.

61 lines
2.4 KiB

  1. #include <time.h>
  2. DWORD WINAPI IpAddressFromAbcdWsz (IN const WCHAR* wszIpAddress);
  3. VOID WINAPI AbcdWszFromIpAddress (IN DWORD IpAddress, OUT WCHAR* wszIpAddress, IN const DWORD dwBufSize);
  4. VOID GetIPAddressOctets (PCWSTR pszIpAddress, DWORD ardw[4]);
  5. BOOL IsValidIPAddressSubnetMaskPair (PCWSTR szIp, PCWSTR szSubnet);
  6. BOOL IsValidMulticastIPAddress (PCWSTR szIp);
  7. BOOL IsContiguousSubnetMask (PCWSTR pszSubnet);
  8. //
  9. // Arguments: PWSTR ip - Input dotted decimal IP address string
  10. // PWSTR sub - Output dotted decimal subnet mask for input IP address
  11. // const DWORD dwMaskBufSize - Size of sub output buffer in characters
  12. //
  13. BOOL ParamsGenerateSubnetMask (PWSTR ip, PWSTR sub, IN const DWORD dwMaskBufSize);
  14. void ParamsGenerateMAC (const WCHAR * szClusterIP,
  15. OUT WCHAR * szClusterMAC,
  16. IN const DWORD dwMACBufSize,
  17. OUT WCHAR * szMulticastIP,
  18. IN const DWORD dwIPBufSize,
  19. BOOL fConvertMAC,
  20. BOOL fMulticast,
  21. BOOL fIGMP,
  22. BOOL fUseClusterIP);
  23. #define ASIZECCH(_array) (sizeof(_array)/sizeof((_array)[0]))
  24. #define ASIZECB(_array) (sizeof(_array))
  25. VOID
  26. InitUserLocale();
  27. VOID
  28. FormatTheTime(IN SYSTEMTIME *pSysTime, OUT WCHAR *TimeStr, IN int TimeStrLen);
  29. VOID
  30. ConvertTimeToSystemTime(IN time_t Ttime, OUT WCHAR *TimeStr, IN int TimeStrLen);
  31. //+----------------------------------------------------------------------------
  32. //
  33. // Function: ConvertTimeToTimeAndDateStrings
  34. //
  35. // Description: Uses the specified locale to build strings for time-of-day and
  36. // date (short format)
  37. //
  38. // Arguments: time_t Ttime - IN time to be converted
  39. // WCHAR *TimeOfDayStr - OUT buffer for the time-of-day string
  40. // int TimeOfDayStrLen - IN size of time-of-day buffer in characters
  41. // WCHAR *DateStr - OUT buffer for the date string
  42. // int DateStrLen - IN size of date buffer in characters
  43. //
  44. // Returns: VOID
  45. //
  46. //+----------------------------------------------------------------------------
  47. VOID
  48. ConvertTimeToTimeAndDateStrings(IN time_t Ttime, OUT WCHAR *TimeOfDayStr, IN int TimeOfDayStrLen, OUT WCHAR *DateStr, IN int DateStrLen);