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.

101 lines
3.9 KiB

  1. #include "precomp.h"
  2. DWORD
  3. printPS(PWIRELESS_PS_DATA pWirelessPSData)
  4. {
  5. DWORD dwError = 0;
  6. DWORD i = 0;
  7. if (!pWirelessPSData) {
  8. dwError = ERROR_OUTOFMEMORY;
  9. BAIL_ON_WIN32_ERROR(dwError);
  10. }
  11. _WirelessDbg(TRC_TRACK, "SSID: %S",pWirelessPSData->pszWirelessSSID);
  12. _WirelessDbg(TRC_TRACK, "SSIDLen: %d",pWirelessPSData->dwWirelessSSIDLen);
  13. _WirelessDbg(TRC_TRACK, "WepEnabled: %d",pWirelessPSData->dwWepEnabled);
  14. _WirelessDbg(TRC_TRACK, "Id: %d",pWirelessPSData->dwId);
  15. _WirelessDbg(TRC_TRACK, "Network Type: %d",pWirelessPSData->dwNetworkType);
  16. _WirelessDbg(TRC_TRACK, "NetworkAuthentication: %d",pWirelessPSData->dwNetworkAuthentication);
  17. _WirelessDbg(TRC_TRACK, "Automatic Key Provision: %d",pWirelessPSData->dwAutomaticKeyProvision);
  18. _WirelessDbg(TRC_TRACK, "Enable8021x: %d",pWirelessPSData->dwEnable8021x);
  19. _WirelessDbg(TRC_TRACK, "Enable8021xMode: %d",pWirelessPSData->dw8021xMode);
  20. _WirelessDbg(TRC_TRACK, "Eap Type: %d",pWirelessPSData->dwEapType);
  21. _WirelessDbg(TRC_TRACK, "EAP Data Len: %d",pWirelessPSData->dwEAPDataLen);
  22. if (pWirelessPSData->dwEAPDataLen) {
  23. _WirelessDbg(TRC_TRACK, "EAP Data is: ");
  24. WLPOLICY_DUMPB(pWirelessPSData->pbEAPData,pWirelessPSData->dwEAPDataLen);
  25. }
  26. _WirelessDbg(TRC_TRACK, "Machine Authentication: %d",pWirelessPSData->dwMachineAuthentication);
  27. _WirelessDbg(TRC_TRACK, "MachineAuthenticationType: %d",pWirelessPSData->dwMachineAuthenticationType);
  28. _WirelessDbg(TRC_TRACK, "GuestAuthentication: %d",pWirelessPSData->dwGuestAuthentication);
  29. _WirelessDbg(TRC_TRACK, "IEEE 8021x MaxStart: %d",pWirelessPSData->dwIEEE8021xMaxStart);
  30. _WirelessDbg(TRC_TRACK, "IEEE 8021x Start Period: %d",pWirelessPSData->dwIEEE8021xStartPeriod);
  31. _WirelessDbg(TRC_TRACK, "IEEE 8021x Auth Period: %d",pWirelessPSData->dwIEEE8021xAuthPeriod);
  32. _WirelessDbg(TRC_TRACK, "IEEE 8021x Held Period: %d",pWirelessPSData->dwIEEE8021xHeldPeriod);
  33. _WirelessDbg(TRC_TRACK, "IEEE Preferrerd Setting Description: ");
  34. if (pWirelessPSData->pszDescription) {
  35. _WirelessDbg(TRC_TRACK, "%S",pWirelessPSData->pszDescription);
  36. }
  37. _WirelessDbg(TRC_TRACK, "Description Len: %d",pWirelessPSData->dwDescriptionLen);
  38. _WirelessDbg(TRC_TRACK, "TotalSize: %d",pWirelessPSData->dwPSLen);
  39. error:
  40. return(dwError);
  41. }
  42. DWORD
  43. printPolicy(PWIRELESS_POLICY_DATA pWirelessPolicyData)
  44. {
  45. DWORD dwError = 0;
  46. DWORD i = 0;
  47. DWORD dwNumPreferredSettings = 0;
  48. PWIRELESS_PS_DATA *ppWirelessPSDatas = NULL;
  49. LPWSTR pszStringUuid = NULL;
  50. _WirelessDbg(TRC_TRACK, " Policy is ");
  51. if (!pWirelessPolicyData) {
  52. dwError = ERROR_OUTOFMEMORY;
  53. BAIL_ON_WIN32_ERROR(dwError);
  54. }
  55. dwError = UuidToString(
  56. &pWirelessPolicyData->PolicyIdentifier,
  57. &pszStringUuid
  58. );
  59. _WirelessDbg(TRC_TRACK, "Policy ID: %S ",pszStringUuid);
  60. _WirelessDbg(TRC_TRACK, "Policy Name: %S",pWirelessPolicyData->pszWirelessName);
  61. _WirelessDbg(TRC_TRACK, "Policy Description: %S",pWirelessPolicyData->pszDescription);
  62. _WirelessDbg(TRC_TRACK, "Disable Zero Conf: %d",pWirelessPolicyData->dwDisableZeroConf);
  63. _WirelessDbg(TRC_TRACK, "Network To Access: %d",pWirelessPolicyData->dwNetworkToAccess);
  64. _WirelessDbg(TRC_TRACK, "Polling Interval: %d",pWirelessPolicyData->dwPollingInterval);
  65. _WirelessDbg(TRC_TRACK, "Connect To Non Preferred networks: %d",pWirelessPolicyData->dwConnectToNonPreferredNtwks);
  66. _WirelessDbg(TRC_TRACK, "Num Preferred Settings: %d",pWirelessPolicyData->dwNumPreferredSettings);
  67. _WirelessDbg(TRC_TRACK, "Num AP Networks: %d",pWirelessPolicyData->dwNumAPNetworks);
  68. dwNumPreferredSettings = pWirelessPolicyData->dwNumPreferredSettings;
  69. ppWirelessPSDatas = pWirelessPolicyData->ppWirelessPSData;
  70. for(i=0;i< pWirelessPolicyData->dwNumPreferredSettings;++i) {
  71. _WirelessDbg(TRC_TRACK, "Printing PS %d ",i);
  72. printPS(*(ppWirelessPSDatas+i));
  73. }
  74. return (0);
  75. error:
  76. return(dwError);
  77. }