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.

90 lines
1.9 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corporation, 1997 - 1999 **/
  4. /**********************************************************************/
  5. /*
  6. spdutil.h
  7. FILE HISTORY:
  8. */
  9. #ifndef _HEADER_SPDUTILS_H
  10. #define _HEADER_SPDUTILS_H
  11. struct ProtocolStringMap
  12. {
  13. DWORD dwProtocol;
  14. UINT nStringID;
  15. };
  16. extern const DWORD IPSM_PROTOCOL_TCP;
  17. extern const DWORD IPSM_PROTOCOL_UDP;
  18. extern const ProtocolStringMap c_ProtocolStringMap[];
  19. extern const int c_nProtocols;
  20. extern const TCHAR c_szSingleAddressMask[];
  21. void IpToString(
  22. ULONG ulIp,
  23. CString *pst
  24. );
  25. void BoolToString(
  26. BOOL bl,
  27. CString * pst
  28. );
  29. void ProtocolToString(
  30. BYTE protocol,
  31. CString * pst
  32. );
  33. /*
  34. void DirectionToString
  35. (
  36. DWORD dwDir,
  37. CString * pst
  38. );
  39. */
  40. void NumToString
  41. (
  42. DWORD number,
  43. CString * pst
  44. );
  45. void FileTimeToString
  46. (
  47. FILETIME logDataTime,
  48. CString * pst
  49. );
  50. VOID SSIDToString(NDIS_802_11_SSID Ssid, CString &SsidStr);
  51. VOID GuidToString (LPWSTR guid, CString &guidStr) ;
  52. VOID MacToString (NDIS_802_11_MAC_ADDRESS macAddress, CString &macAddrStr);
  53. DWORD CategoryToString(DWORD dwCategory, CString &csCategory);
  54. DWORD ComponentIDToString(DWORD dwCompID, CString &csComponent);
  55. DWORD CopyAndStripNULL(LPTSTR lptstrDest, LPTSTR lptstrSrc, DWORD dwLen);
  56. DWORD RateToString(NDIS_802_11_RATES Rates, CString *pcs);
  57. DWORD PrivacyToString(ULONG ulPrivacy, CString *pcs);
  58. DWORD ChannelToString(NDIS_802_11_CONFIGURATION *pConfig, CString *pcs);
  59. DWORD InfraToString(NDIS_802_11_NETWORK_INFRASTRUCTURE InfraMode,
  60. CString *pcs);
  61. //Some global operators
  62. BOOL operator==(const FILETIME& ftLHS, const FILETIME& ftRHS);
  63. BOOL operator!=(const FILETIME& ftLHS, const FILETIME& ftRHS);
  64. #endif