?? snifferdlg.h
字號:
// snifferDlg.h : header file
//
#if !defined(AFX_SNIFFERDLG_H__962D527F_DC85_4072_93EC_1FD7B9E944D7__INCLUDED_)
#define AFX_SNIFFERDLG_H__962D527F_DC85_4072_93EC_1FD7B9E944D7__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "protocol.h"
#define BUFFER_SIZE 65535
#define WM_REV WM_USER +1
#define HI_WORD(byte) (((byte) >> 4) & 0x0F)
#define LOW_WORD(byte) ((byte) & 0x0F)
typedef struct _IP
{
unsigned short ip_version,
ip_hdr_len,
ip_tos,
ip_total_len,
ip_id,
ip_flags,
ip_ttl,
ip_frag_offset,
ip_proto,
ip_hdr_chksum,
ip_src_port,
ip_dest_port;
unsigned int ip_src,
ip_dest;
}IP;
/////////////////////////////////////////////////////////////////////////////
// CSnifferDlg dialog
class CSnifferDlg : public CDialog
{
IP m_ip;
public:
void AddNewParse();
void DecodeIPHeader(WSABUF *wsabuf);
CSnifferDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CSnifferDlg)
enum { IDD = IDD_SNIFFER_DIALOG };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CSnifferDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
BOOL bstart;
char LocalName[16];
struct hostent *pHost;
SOCKET sock;
char RecvBuf[BUFFER_SIZE];
SOCKADDR_IN addr_in;
CListCtrl m_ListCtrl;
SOCKADDR_IN m_psd_srcaddr,
m_psd_destaddr;
// Generated message map functions
//{{AFX_MSG(CSnifferDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnRecv(WPARAM wParam,LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
virtual void OnOK();
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_SNIFFERDLG_H__962D527F_DC85_4072_93EC_1FD7B9E944D7__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -