![]() |
CreateSniffer() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
| Private Function |
Declared in: TCPPortScannerStealth.h |
DeclarationBOOL CreateSniffer();
DescriptionCreate the sniffer socket
Function Body
try
{
//Try to create the sniffer socket
if (m_pSniffer)
{
delete m_pSniffer;
m_pSniffer=NULL;
}
//Create it
CSniffingSocket* pSocket;
pSocket=new CSniffingSocket(this);
//Protect it
std::auto_ptr<CSniffingSocket> pProtection(pSocket);
//Continue to create it
if (!pSocket->Create())
{
//Report it
ReportError("CreateSniffer","Failed to create sniffer");
//Exit
return FALSE;
}
//Try to bind it
if (!pSocket->Bind(m_aBindInterface,0))
{
//Report it
ReportError("CreateSniffer","Failed to bind sniffer");
//Exit
return FALSE;
}
//Release protection and save socket
m_pSniffer=pProtection.release();
//Done
return TRUE;
}
ERROR_HANDLER_RETURN("CreateSniffer",FALSE)
See Also
This web site was generated
using Surveyor V4.50.811.1. Click
here
for more information. |
Site content copyright © 2003 Komodia LTD.. See the About page for additional notices. This page last updated: 24 Feb 2003. |