资源简介
本程序是用agnt++写的代理端程序,包括get,set请求,和trap发送过程。

代码片段和文件信息
// Agent.cpp : Defines the class behaviors for the application.
//
#include “stdafx.h“
#include “Agent.h“
#include “MainFrm.h“
#include “pcap.h“
#include “SNMPAgent.h“
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CAgentApp
BEGIN_MESSAGE_MAP(CAgentApp CWinApp)
//{{AFX_MSG_MAP(CAgentApp)
ON_COMMAND(ID_APP_ABOUT OnAppAbout)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CAgentApp construction
CAgentApp::CAgentApp()
{
// TODO: add construction code here
// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CAgentApp object
//全局变量及原型说明
CRITICAL_SECTION g_lock; //同步资源锁
pcap_t * g_fp = NULL;
CSNMPAgent *g_agent = new CSNMPAgent;
UINT StartCapture(LPVOID pParam);
void packet_handler(u_char *pParamconst struct pcap_pkthdr *header
const u_char *pkt_data);
//UINT Analyse(UINT data_length const UCHAR *packet_data);
int AnalysePackage(UINT len const UCHAR *package);
CAgentApp theApp;
int GetConfig();
/////////////////////////////////////////////////////////////////////////////
// CAgentApp initialization
BOOL CAgentApp::InitInstance()
{
AfxEnableControlContainer();
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable you should remove from the following
// the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
// Change the registry key under which our settings are stored.
// TODO: You should modify this string to be something appropriate
// such as the name of your company or organization.
SetRegistryKey(_T(“Local AppWizard-Generated Applications“));
// To create the main window this code creates a new frame window
// object and then sets it as the application‘s main window object.
CMainframe* pframe = new CMainframe;
m_pMainWnd = pframe;
// create and load the frame with its resources
pframe->Loadframe(IDR_MAINframe
WS_OVERLAPPEDWINDOW | FWS_ADDTOtitle NULL
NULL);
// The one and only window has been initialized so show and update it.
//pframe->ShowWindow(SW_SHOW);
pframe->ShowWindow(SW_MINIMIZE);
pframe->UpdateWindow();
//启动监听
LoadAdapter();
GetConfig();
InitializeCriticalSection(&g_lock);
return TRUE;
}
int CAgentApp::ExitInstance()
{
// TODO: Add your specialized code here and/or call the base class
DeleteCritic
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2006-04-02 11:47 Agent\Debug
文件 4012 2005-11-30 14:43 Agent\include\winpcap\bittypes.h
文件 2133 2005-11-30 14:43 Agent\include\winpcap\bucket_lookup.h
文件 2113 2005-11-30 14:43 Agent\include\winpcap\count_packets.h
文件 3963 2005-11-30 14:43 Agent\include\winpcap\Devioctl.h
文件 833 2005-11-30 14:43 Agent\include\winpcap\Gnuc.h
文件 5752 2005-11-30 14:43 Agent\include\winpcap\ip6_misc.h
文件 4140 2005-11-30 14:43 Agent\include\winpcap\memory_t.h
文件 2185 2005-11-30 14:43 Agent\include\winpcap\normal_lookup.h
文件 48556 2005-11-30 14:43 Agent\include\winpcap\Ntddndis.h
文件 1292 2005-11-30 14:43 Agent\include\winpcap\Ntddpack.h
文件 21642 2005-11-30 14:43 Agent\include\winpcap\Packet32.h
文件 22732 2005-11-30 14:43 Agent\include\winpcap\pcap-bpf.h
文件 13101 2005-11-30 14:43 Agent\include\winpcap\pcap-int.h
文件 2292 2005-11-30 14:43 Agent\include\winpcap\pcap-stdinc.h
文件 11559 2005-11-30 14:43 Agent\include\winpcap\pcap.h
文件 35625 2005-11-30 14:43 Agent\include\winpcap\pthread.h
文件 13813 2005-11-30 14:43 Agent\include\winpcap\remote-ext.h
文件 4726 2005-11-30 14:43 Agent\include\winpcap\sched.h
文件 4265 2005-11-30 14:43 Agent\include\winpcap\semaphore.h
文件 2969 2005-11-30 14:43 Agent\include\winpcap\tcp_session.h
文件 10659 2005-11-30 14:43 Agent\include\winpcap\time_calls.h
文件 6060 2005-11-30 14:43 Agent\include\winpcap\tme.h
文件 3364 2005-11-30 14:43 Agent\include\winpcap\Win32-Extensions.h
..AD... 0 2006-04-02 11:47 Agent\include\winpcap
文件 20084 2005-11-30 14:43 Agent\include\snmp_pp\address.h
文件 17835 2005-11-30 14:43 Agent\include\snmp_pp\asn1.h
文件 20460 2005-11-30 14:43 Agent\include\snmp_pp\auth_priv.h
文件 3580 2005-11-30 14:43 Agent\include\snmp_pp\collect.h
文件 7438 2005-11-30 14:43 Agent\include\snmp_pp\collect1.h
............此处省略121个文件信息
- 上一篇:ESP8266 调试工具
- 下一篇:数字密码锁设计原理图文
相关资源
- 用VC 编写的基于SNMP的路由器拓扑程序
- 易语言 TCP使用HTTP、SOCKES5代理IP。
- checkpoint的snmp及syslog配置.doc
- 金蝶在线会计平台用SaaS技术扫代理记
- dellmib库snmp获取dell服务器信息的
- SNMP安装包(全+使用文档)
- 基于PCE代理模型的失效相关可靠性分
- snmpc7.0中文版网管软件
- WPE软件黄金三件套
- 虎赢优先查-新企采集拓客软件_v2.6版
- Termite最新版1.8.4.zip
- 网络跳板工具SKSERVER
- 中国移动BOSS系统接口规范代理接入
- Kriging代理模型EGO算法.zip
- net-snmp-5.6.1.1-1.x86.exe
- 超级好用代理工具
- 媒体关注在公司治理中的事前约束作
- surge1.2.6稳定的版本可免越狱安装
- 最新老虎淘宝客4.39+最新代理系统2.
- Linux安装SNMP服务所需要rpm包
- Windows 10 1903 SNMP离线安装文件.rar
- 多代理系统理论、方法与应用
- SNMP测试工具
- frp_0.29.0_windows_amd64
- snmp++-3.3.11a 库相关文件及编译笔记
- nginx服务器插件之net-snmp-5.6.1.1.tar.gz
- 基于SNMP/MIB的网络数据获取系统设计
- net-snmp-5.5.0-2.x64.EXE
- 非常好的snmp测试工具 实现了snmp的获
- 微擎首页模版,首页PC应用模块官网代
评论
共有 条评论