Click here to Skip to main content
15,896,063 members
Articles / Desktop Programming / MFC

Controlling IP traffic from Internet to DMZ or Intranet

Rate me:
Please Sign up or sign in to vote.
4.67/5 (5 votes)
5 Dec 2011CPOL3 min read 24.1K   955   27  
Controlling IP traffic from Internet to DMZ or Intranet
#if !defined(__THREADPROCESS__)

#define __THREADPROCESS__

//
class CMsgProcess
{
	HWND m_hParent;

public:
	// Database
	CString m_dbServer,m_dbUser,m_dbUserPassword,m_sConnectString;
    CString m_strRouterPassword,m_strRouterSecret;// router access passwords
	//router
	CString m_strIProuter;	//router name(FQDN or IP address)
	CDatabase m_dbSQLonCIT;
	int *m_pbRun;
	CStringList m_RouterTelnetList;	// list of the records (I am to send by email!
	CString m_sError;//the Last error
public:
	BOOL telnetRouter(void);
	CMsgProcess(int *m_bRun,HWND hParent,LPCSTR pszIProuter,LPCSTR pszDSN,LPCSTR pszServer,LPCSTR pszUser,LPCSTR pszPassword,LPCSTR pstrRouterPassword,LPCSTR pstrRouterSecret);

	~CMsgProcess();

	bool sqlExec();
	void Log(LPCSTR pszText); //write to the log file from the thread!!!
	BOOL Run();
private:
	//bool sendEmail(CSMPost *pSMPost);
};


UINT myWorkingThreadProgram(LPVOID pParam);


#endif

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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Systems Engineer
Russian Federation Russian Federation
Last 6 years worked as a system administrator SAP systems.
My duties are to install, copy, backup/restore SAP in Unix, Linux system, create users, assign roles, and etc... .I wrote this program to make easer my work, and it is interesting for me to join C++.C# and SAP ABAP subsystems.

Comments and Discussions