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.

47 lines
1.5 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. // CPendingProxyConnection
  4. //
  5. // PendingProxyConnection.cpp : Implementation of CPendingProxyConnection
  6. #include "PreComp.h"
  7. #include "AlgController.h"
  8. #include "PendingProxyConnection.h"
  9. STDMETHODIMP
  10. CPendingProxyConnection::Cancel()
  11. {
  12. MYTRACE_ENTER("CPendingProxyConnection::Cancel()");
  13. MYTRACE("Protocol %s", m_eProtocol==1? "TCP" : "UDP");
  14. MYTRACE("Destination %s:%d", MYTRACE_IP(m_ulDestinationAddress), ntohs(m_usDestinationPort));
  15. MYTRACE("Source %s:%d", MYTRACE_IP(m_ulSourceAddress), ntohs(m_usSourcePort));
  16. MYTRACE("Destination %s:%d", MYTRACE_IP(m_ulDestinationAddress), ntohs(m_usDestinationPort));
  17. MYTRACE("NewSource %s:%d", MYTRACE_IP(m_ulNewSourceAddress), ntohs(m_usNewSourcePort));
  18. HRESULT hr = g_pAlgController->GetNat()->CancelRedirect(
  19. (UCHAR)m_eProtocol,
  20. m_ulDestinationAddress,
  21. m_usDestinationPort,
  22. m_ulSourceAddress,
  23. m_usSourcePort,
  24. m_ulDestinationAddress,
  25. m_usDestinationPort,
  26. m_ulNewSourceAddress,
  27. m_usNewSourcePort
  28. );
  29. if ( FAILED(hr) )
  30. {
  31. MYTRACE_ERROR("CancelRedirect", hr);
  32. }
  33. return hr;
  34. }