|
// TCPTable.h: interface for the CTCPTable class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_TCPTABLE_H__79B29239_E26B_11D6_B451_0030052162DB__INCLUDED_)
#define AFX_TCPTABLE_H__79B29239_E26B_11D6_B451_0030052162DB__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "StdAfx.h"
class CTCPTable
{
public:
CTCPTable();
virtual ~CTCPTable();
private:
//vars
static MIB_TCPTABLE* m_pTcpTable;
static MIB_TCPTABLE_EX* m_pTcpTableEx;
static BYTE* m_pBuff;
static BYTE* m_pBuffEx;
TCPTABLE m_tcpTab;
private:
//methods
bool GetMatchingConn(u_long ulRemAdr, u_short usLocPort, u_long* ulLocAdr, u_short* usRemPort);
CString Convert2State(DWORD dwState);
void Conn2Console(DWORD dwPid, \
CString strProcName, \
CString strLocAddress, \
u_short usLocalPort, \
CString strRemAddress, \
u_short usRemotePort);
public:
//methods
DWORD PrintTable(void);
DWORD PrintTableEx(void);
u_int GetRecordsNumber(void);
TCPTABLE GetTableAtIndex(int nIndex);
bool KillConnection(u_long ulRemIP, u_short usLocalPort);
bool m_bEstb;
};
#endif // !defined(AFX_TCPTABLE_H__79B29239_E26B_11D6_B451_0030052162DB__INCLUDED_)
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.