-
Notifications
You must be signed in to change notification settings - Fork 0
/
WinMTRDialog.h
133 lines (108 loc) · 2.8 KB
/
WinMTRDialog.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
//*****************************************************************************
// FILE: WinMTRDialog.h
//
//
// DESCRIPTION:
//
//
// NOTES:
//
//
//*****************************************************************************
#ifndef WINMTRDIALOG_H_
#define WINMTRDIALOG_H_
#define WINMTR_DIALOG_TIMER 100
#include "WinMTRStatusBar.h"
#include "WinMTRNet.h"
//*****************************************************************************
// CLASS: WinMTRDialog
//
//
//*****************************************************************************
class WinMTRDialog : public CDialog
{
public:
WinMTRDialog(CWnd* pParent = NULL);
~WinMTRDialog();
enum { IDD = IDD_WINMTR_DIALOG };
afx_msg BOOL InitRegistry();
WinMTRStatusBar statusBar;
enum STATES {
IDLE,
TRACING,
STOPPING,
EXIT
};
enum STATE_TRANSITIONS {
IDLE_TO_IDLE,
IDLE_TO_TRACING,
IDLE_TO_EXIT,
TRACING_TO_TRACING,
TRACING_TO_STOPPING,
TRACING_TO_EXIT,
STOPPING_TO_IDLE,
STOPPING_TO_STOPPING,
STOPPING_TO_EXIT
};
CButton m_buttonOptions;
CButton m_buttonExit;
CButton m_buttonStart;
CComboBox m_comboHost;
CListCtrl m_listMTR;
CStatic m_staticS;
CStatic m_staticJ;
CButton m_buttonExpT;
CButton m_buttonExpH;
int InitMTRNet();
int DisplayRedraw();
void Transit(STATES new_state);
STATES state;
STATE_TRANSITIONS transition;
HANDLE traceThreadMutex;
double interval;
bool hasIntervalFromCmdLine;
int pingsize;
bool hasPingsizeFromCmdLine;
int maxLRU;
bool hasMaxLRUFromCmdLine;
int nrLRU;
BOOL useDNS;
bool hasUseDNSFromCmdLine;
WinMTRNet* wmtrnet;
void SetHostName(const char *host);
void SetInterval(float i);
void SetPingSize(int ps);
void SetMaxLRU(int mlru);
void SetUseDNS(BOOL udns);
protected:
virtual void DoDataExchange(CDataExchange* pDX);
int m_autostart;
char msz_defaulthostname[1000];
HICON m_hIcon;
virtual BOOL OnInitDialog();
afx_msg void OnPaint();
afx_msg void OnSize(UINT, int, int);
afx_msg void OnSizing(UINT, LPRECT);
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnRestart();
afx_msg void OnOptions();
virtual void OnCancel();
afx_msg void OnCTTC();
afx_msg void OnCHTC();
afx_msg void OnEXPT();
afx_msg void OnEXPH();
afx_msg void OnDblclkList(NMHDR* pNMHDR, LRESULT* pResult);
DECLARE_MESSAGE_MAP()
public:
afx_msg void OnCbnSelchangeComboHost();
afx_msg void OnCbnSelendokComboHost();
private:
void ClearHistory();
public:
afx_msg void OnCbnCloseupComboHost();
afx_msg void OnTimer(UINT_PTR nIDEvent);
afx_msg void OnClose();
afx_msg void OnBnClickedCancel();
afx_msg void OnLvnItemchangedListMtr(NMHDR *pNMHDR, LRESULT *pResult);
};
#endif // ifndef WINMTRDIALOG_H_