資源簡介
基于MFC對話框和Winpcap實現的通過構造、發送和接收ARP數據幀獲取局域網內活動主機物理地址的程序

代碼片段和文件信息
//?arp.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“arp.h“
#include?“arpDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CArpApp
BEGIN_MESSAGE_MAP(CArpApp?CWinApp)
//{{AFX_MSG_MAP(CArpApp)
//?NOTE?-?the?ClassWizard?will?add?and?remove?mapping?macros?here.
//????DO?NOT?EDIT?what?you?see?in?these?blocks?of?generated?code!
//}}AFX_MSG
ON_COMMAND(ID_HELP?CWinApp::onhelp)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CArpApp?construction
CArpApp::CArpApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CArpApp?object
CArpApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CArpApp?initialization
BOOL?CArpApp::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
CArpDlg?dlg;
m_pMainWnd?=?&dlg;
int?nResponse?=?dlg.DoModal();
if?(nResponse?==?IDOK)
{
//?TODO:?Place?code?here?to?handle?when?the?dialog?is
//??dismissed?with?OK
}
else?if?(nResponse?==?IDCANCEL)
{
//?TODO:?Place?code?here?to?handle?when?the?dialog?is
//??dismissed?with?Cancel
}
//?Since?the?dialog?has?been?closed?return?FALSE?so?that?we?exit?the
//??application?rather?than?start?the?application‘s?message?pump.
return?FALSE;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????39472??2009-10-24?21:31??使用ARP協議獲取局域網內活動主機物理地址\arp\arp.aps
?????文件???????1480??2009-10-21?14:13??使用ARP協議獲取局域網內活動主機物理地址\arp\arp.clw
?????文件???????2021??2009-10-10?15:02??使用ARP協議獲取局域網內活動主機物理地址\arp\arp.cpp
?????文件???????4560??2009-10-15?22:31??使用ARP協議獲取局域網內活動主機物理地址\arp\arp.dsp
?????文件????????531??2009-10-10?15:51??使用ARP協議獲取局域網內活動主機物理地址\arp\arp.dsw
?????文件???????1291??2009-10-10?15:02??使用ARP協議獲取局域網內活動主機物理地址\arp\arp.h
?????文件???18025472??2009-10-24?22:22??使用ARP協議獲取局域網內活動主機物理地址\arp\arp.ncb
?????文件??????57856??2009-10-21?14:14??使用ARP協議獲取局域網內活動主機物理地址\arp\arp.opt
?????文件???????1485??2009-10-21?14:13??使用ARP協議獲取局域網內活動主機物理地址\arp\arp.plg
?????文件???????5995??2009-10-24?21:31??使用ARP協議獲取局域網內活動主機物理地址\arp\arp.rc
?????文件????????870??2009-10-24?21:32??使用ARP協議獲取局域網內活動主機物理地址\arp\arp.sln
????..A..H.?????16896??2009-10-24?22:22??使用ARP協議獲取局域網內活動主機物理地址\arp\arp.suo
?????文件???????7973??2009-10-24?21:32??使用ARP協議獲取局域網內活動主機物理地址\arp\arp.vcproj
?????文件???????1415??2009-10-24?22:22??使用ARP協議獲取局域網內活動主機物理地址\arp\arp.vcproj.李經緯-PC.李經緯.user
?????文件??????13596??2009-10-24?22:22??使用ARP協議獲取局域網內活動主機物理地址\arp\arpDlg.cpp
?????文件???????2170??2009-10-15?17:28??使用ARP協議獲取局域網內活動主機物理地址\arp\arpDlg.h
?????文件????????746??2009-10-14?09:54??使用ARP協議獲取局域網內活動主機物理地址\arp\ArpHead.h
?????文件????????668??2009-10-14?09:54??使用ARP協議獲取局域網內活動主機物理地址\arp\ArpPacket.h
?????文件????????585??2009-10-14?09:54??使用ARP協議獲取局域網內活動主機物理地址\arp\EthernetHead.h
?????文件???????3429??2009-10-24?19:18??使用ARP協議獲取局域網內活動主機物理地址\arp\Packet.cpp
?????文件????????877??2009-10-15?07:54??使用ARP協議獲取局域網內活動主機物理地址\arp\Packet.h
?????文件???????3525??2009-10-10?15:02??使用ARP協議獲取局域網內活動主機物理地址\arp\ReadMe.txt
?????文件???????1078??2009-10-10?15:02??使用ARP協議獲取局域網內活動主機物理地址\arp\res\arp.ico
?????文件????????395??2009-10-10?15:02??使用ARP協議獲取局域網內活動主機物理地址\arp\res\arp.rc2
?????文件????????766??2009-10-15?22:31??使用ARP協議獲取局域網內活動主機物理地址\arp\res\icon1.ico
?????文件???????1094??2009-10-15?22:31??使用ARP協議獲取局域網內活動主機物理地址\arp\resource.h
?????文件????????205??2009-10-10?15:02??使用ARP協議獲取局域網內活動主機物理地址\arp\StdAfx.cpp
?????文件???????1054??2009-10-10?15:02??使用ARP協議獲取局域網內活動主機物理地址\arp\StdAfx.h
?????文件??????98304??2009-10-24?21:32??使用ARP協議獲取局域網內活動主機物理地址\Exe\arp.exe
?????目錄??????????0??2009-10-23?19:56??使用ARP協議獲取局域網內活動主機物理地址\arp\res
............此處省略6個文件信息
- 上一篇:TCP數據包轉發程序
- 下一篇:MCS-51單片機原理與應用(C語言版.
評論
共有 條評論