-rwxr-xr-x[-rw-r--r--] | PropsNetwork.cpp | 3 | ||||
-rwxr-xr-x[-rw-r--r--] | PropsNetwork.h | 1 | ||||
-rwxr-xr-x | PumpKINDlg.cpp | 16 | ||||
-rwxr-xr-x[-rw-r--r--] | PumpKINDlg.h | 1 | ||||
-rw-r--r-- | help/pumpkin.rtf | 291 | ||||
-rw-r--r-- | help/pumpkin.xml | 1 | ||||
-rw-r--r-- | pumpkin.clw | 12 | ||||
-rwxr-xr-x[-rw-r--r--] | pumpkin.rc | 30 | ||||
-rwxr-xr-x[-rw-r--r--] | resource.h | 5 |
9 files changed, 188 insertions, 172 deletions
diff --git a/PropsNetwork.cpp b/PropsNetwork.cpp index b5585d7..2dd5913 100644..100755 --- a/PropsNetwork.cpp +++ b/PropsNetwork.cpp | |||
@@ -1,71 +1,74 @@ | |||
1 | // PropsNetwork.cpp : implementation file | 1 | // PropsNetwork.cpp : implementation file |
2 | // | 2 | // |
3 | 3 | ||
4 | #include "stdafx.h" | 4 | #include "stdafx.h" |
5 | #include "PumpKIN.h" | 5 | #include "PumpKIN.h" |
6 | #include "PropsNetwork.h" | 6 | #include "PropsNetwork.h" |
7 | 7 | ||
8 | #ifdef _DEBUG | 8 | #ifdef _DEBUG |
9 | #define new DEBUG_NEW | 9 | #define new DEBUG_NEW |
10 | #undef THIS_FILE | 10 | #undef THIS_FILE |
11 | static char THIS_FILE[] = __FILE__; | 11 | static char THIS_FILE[] = __FILE__; |
12 | #endif | 12 | #endif |
13 | 13 | ||
14 | ///////////////////////////////////////////////////////////////////////////// | 14 | ///////////////////////////////////////////////////////////////////////////// |
15 | // CPropsNetwork property page | 15 | // CPropsNetwork property page |
16 | 16 | ||
17 | IMPLEMENT_DYNCREATE(CPropsNetwork, CPropertyPage) | 17 | IMPLEMENT_DYNCREATE(CPropsNetwork, CPropertyPage) |
18 | 18 | ||
19 | CPropsNetwork::CPropsNetwork() : CPropertyPage(CPropsNetwork::IDD) | 19 | CPropsNetwork::CPropsNetwork() : CPropertyPage(CPropsNetwork::IDD) |
20 | { | 20 | { |
21 | //{{AFX_DATA_INIT(CPropsNetwork) | 21 | //{{AFX_DATA_INIT(CPropsNetwork) |
22 | m_ListenPort = 0; | 22 | m_ListenPort = 0; |
23 | m_SpeakPort = 0; | 23 | m_SpeakPort = 0; |
24 | m_TimeOut = 0; | 24 | m_TimeOut = 0; |
25 | m_BlockSize = 0; | 25 | m_BlockSize = 0; |
26 | m_ListenAddress = _T(""); | ||
26 | //}}AFX_DATA_INIT | 27 | //}}AFX_DATA_INIT |
27 | } | 28 | } |
28 | 29 | ||
29 | CPropsNetwork::~CPropsNetwork() | 30 | CPropsNetwork::~CPropsNetwork() |
30 | { | 31 | { |
31 | } | 32 | } |
32 | 33 | ||
33 | void CPropsNetwork::DoDataExchange(CDataExchange* pDX) | 34 | void CPropsNetwork::DoDataExchange(CDataExchange* pDX) |
34 | { | 35 | { |
35 | CPropertyPage::DoDataExchange(pDX); | 36 | CPropertyPage::DoDataExchange(pDX); |
36 | //{{AFX_DATA_MAP(CPropsNetwork) | 37 | //{{AFX_DATA_MAP(CPropsNetwork) |
37 | DDX_Control(pDX, IDC_BSIZESPIN, m_BSizeSpinCtl); | 38 | DDX_Control(pDX, IDC_BSIZESPIN, m_BSizeSpinCtl); |
38 | DDX_Control(pDX, IDC_TIMESPIN, m_TimeSpinCtl); | 39 | DDX_Control(pDX, IDC_TIMESPIN, m_TimeSpinCtl); |
39 | DDX_Control(pDX, IDC_SPEAKSPIN, m_SpeakSpinCtl); | 40 | DDX_Control(pDX, IDC_SPEAKSPIN, m_SpeakSpinCtl); |
40 | DDX_Control(pDX, IDC_LISTENSPIN, m_ListenSpinCtl); | 41 | DDX_Control(pDX, IDC_LISTENSPIN, m_ListenSpinCtl); |
41 | DDX_Text(pDX, IDC_LISTENPORT, m_ListenPort); | 42 | DDX_Text(pDX, IDC_LISTENPORT, m_ListenPort); |
42 | DDX_Text(pDX, IDC_SPEAKPORT, m_SpeakPort); | 43 | DDX_Text(pDX, IDC_SPEAKPORT, m_SpeakPort); |
43 | DDX_Text(pDX, IDC_TIMEOUT, m_TimeOut); | 44 | DDX_Text(pDX, IDC_TIMEOUT, m_TimeOut); |
44 | DDV_MinMaxUInt(pDX, m_TimeOut, 5, 60); | 45 | DDV_MinMaxUInt(pDX, m_TimeOut, 5, 60); |
45 | DDX_Text(pDX, IDC_BLOCKSIZE, m_BlockSize); | 46 | DDX_Text(pDX, IDC_BLOCKSIZE, m_BlockSize); |
47 | DDX_Text(pDX, IDC_LISTENADDRESS, m_ListenAddress); | ||
48 | DDV_MaxChars(pDX, m_ListenAddress, 15); | ||
46 | //}}AFX_DATA_MAP | 49 | //}}AFX_DATA_MAP |
47 | } | 50 | } |
48 | 51 | ||
49 | 52 | ||
50 | BEGIN_MESSAGE_MAP(CPropsNetwork, CPropertyPage) | 53 | BEGIN_MESSAGE_MAP(CPropsNetwork, CPropertyPage) |
51 | //{{AFX_MSG_MAP(CPropsNetwork) | 54 | //{{AFX_MSG_MAP(CPropsNetwork) |
52 | //}}AFX_MSG_MAP | 55 | //}}AFX_MSG_MAP |
53 | END_MESSAGE_MAP() | 56 | END_MESSAGE_MAP() |
54 | 57 | ||
55 | ///////////////////////////////////////////////////////////////////////////// | 58 | ///////////////////////////////////////////////////////////////////////////// |
56 | // CPropsNetwork message handlers | 59 | // CPropsNetwork message handlers |
57 | 60 | ||
58 | BOOL CPropsNetwork::OnInitDialog() | 61 | BOOL CPropsNetwork::OnInitDialog() |
59 | { | 62 | { |
60 | CPropertyPage::OnInitDialog(); | 63 | CPropertyPage::OnInitDialog(); |
61 | 64 | ||
62 | m_ListenSpinCtl.SetRange(0,32767); | 65 | m_ListenSpinCtl.SetRange(0,32767); |
63 | m_SpeakSpinCtl.SetRange(0,32767); | 66 | m_SpeakSpinCtl.SetRange(0,32767); |
64 | m_TimeSpinCtl.SetRange(5,60); | 67 | m_TimeSpinCtl.SetRange(5,60); |
65 | m_BSizeSpinCtl.SetRange(512,16384); | 68 | m_BSizeSpinCtl.SetRange(512,16384); |
66 | UDACCEL uda = {0,512}; | 69 | UDACCEL uda = {0,512}; |
67 | m_BSizeSpinCtl.SetAccel(1,&uda); | 70 | m_BSizeSpinCtl.SetAccel(1,&uda); |
68 | 71 | ||
69 | return TRUE; // return TRUE unless you set the focus to a control | 72 | return TRUE; // return TRUE unless you set the focus to a control |
70 | // EXCEPTION: OCX Property Pages should return FALSE | 73 | // EXCEPTION: OCX Property Pages should return FALSE |
71 | } | 74 | } |
diff --git a/PropsNetwork.h b/PropsNetwork.h index 67d0b53..565b090 100644..100755 --- a/PropsNetwork.h +++ b/PropsNetwork.h | |||
@@ -1,45 +1,46 @@ | |||
1 | // PropsNetwork.h : header file | 1 | // PropsNetwork.h : header file |
2 | // | 2 | // |
3 | 3 | ||
4 | ///////////////////////////////////////////////////////////////////////////// | 4 | ///////////////////////////////////////////////////////////////////////////// |
5 | // CPropsNetwork dialog | 5 | // CPropsNetwork dialog |
6 | 6 | ||
7 | class CPropsNetwork : public CPropertyPage | 7 | class CPropsNetwork : public CPropertyPage |
8 | { | 8 | { |
9 | DECLARE_DYNCREATE(CPropsNetwork) | 9 | DECLARE_DYNCREATE(CPropsNetwork) |
10 | 10 | ||
11 | // Construction | 11 | // Construction |
12 | public: | 12 | public: |
13 | CPropsNetwork(); | 13 | CPropsNetwork(); |
14 | ~CPropsNetwork(); | 14 | ~CPropsNetwork(); |
15 | 15 | ||
16 | // Dialog Data | 16 | // Dialog Data |
17 | //{{AFX_DATA(CPropsNetwork) | 17 | //{{AFX_DATA(CPropsNetwork) |
18 | enum { IDD = IDD_PROPS_NETWORK }; | 18 | enum { IDD = IDD_PROPS_NETWORK }; |
19 | CSpinButtonCtrlm_BSizeSpinCtl; | 19 | CSpinButtonCtrlm_BSizeSpinCtl; |
20 | CSpinButtonCtrlm_TimeSpinCtl; | 20 | CSpinButtonCtrlm_TimeSpinCtl; |
21 | CSpinButtonCtrlm_SpeakSpinCtl; | 21 | CSpinButtonCtrlm_SpeakSpinCtl; |
22 | CSpinButtonCtrlm_ListenSpinCtl; | 22 | CSpinButtonCtrlm_ListenSpinCtl; |
23 | UINTm_ListenPort; | 23 | UINTm_ListenPort; |
24 | UINTm_SpeakPort; | 24 | UINTm_SpeakPort; |
25 | UINTm_TimeOut; | 25 | UINTm_TimeOut; |
26 | UINTm_BlockSize; | 26 | UINTm_BlockSize; |
27 | CStringm_ListenAddress; | ||
27 | //}}AFX_DATA | 28 | //}}AFX_DATA |
28 | 29 | ||
29 | 30 | ||
30 | // Overrides | 31 | // Overrides |
31 | // ClassWizard generate virtual function overrides | 32 | // ClassWizard generate virtual function overrides |
32 | //{{AFX_VIRTUAL(CPropsNetwork) | 33 | //{{AFX_VIRTUAL(CPropsNetwork) |
33 | protected: | 34 | protected: |
34 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support | 35 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support |
35 | //}}AFX_VIRTUAL | 36 | //}}AFX_VIRTUAL |
36 | 37 | ||
37 | // Implementation | 38 | // Implementation |
38 | protected: | 39 | protected: |
39 | // Generated message map functions | 40 | // Generated message map functions |
40 | //{{AFX_MSG(CPropsNetwork) | 41 | //{{AFX_MSG(CPropsNetwork) |
41 | virtual BOOL OnInitDialog(); | 42 | virtual BOOL OnInitDialog(); |
42 | //}}AFX_MSG | 43 | //}}AFX_MSG |
43 | DECLARE_MESSAGE_MAP() | 44 | DECLARE_MESSAGE_MAP() |
44 | 45 | ||
45 | }; | 46 | }; |
diff --git a/PumpKINDlg.cpp b/PumpKINDlg.cpp index 3ff1500..0c5c19b 100755 --- a/PumpKINDlg.cpp +++ b/PumpKINDlg.cpp | |||
@@ -1,2176 +1,2178 @@ | |||
1 | // PumpKINDlg.cpp : implementation file | 1 | // PumpKINDlg.cpp : implementation file |
2 | // | 2 | // |
3 | 3 | ||
4 | #include "stdafx.h" | 4 | #include "stdafx.h" |
5 | #include "PumpKIN.h" | 5 | #include "PumpKIN.h" |
6 | #include "PumpKINDlg.h" | 6 | #include "PumpKINDlg.h" |
7 | 7 | ||
8 | #include "ACLTargetCombo.h" | 8 | #include "ACLTargetCombo.h" |
9 | #include "PropsServer.h" | 9 | #include "PropsServer.h" |
10 | #include "PropsNetwork.h" | 10 | #include "PropsNetwork.h" |
11 | #include "PropsSounds.h" | 11 | #include "PropsSounds.h" |
12 | #include "PropsACL.h" | 12 | #include "PropsACL.h" |
13 | #include "ConfirmRRQDlg.h" | 13 | #include "ConfirmRRQDlg.h" |
14 | #include "ConfirmWRQDlg.h" | 14 | #include "ConfirmWRQDlg.h" |
15 | #include "RequestDlg.h" | 15 | #include "RequestDlg.h" |
16 | #include "Resolver.h" | 16 | #include "Resolver.h" |
17 | #include "Retrier.h" | 17 | #include "Retrier.h" |
18 | #include "Trayer.h" | 18 | #include "Trayer.h" |
19 | 19 | ||
20 | #include <io.h> | 20 | #include <io.h> |
21 | 21 | ||
22 | #ifdef _DEBUG | 22 | #ifdef _DEBUG |
23 | #define new DEBUG_NEW | 23 | #define new DEBUG_NEW |
24 | #undef THIS_FILE | 24 | #undef THIS_FILE |
25 | static char THIS_FILE[] = __FILE__; | 25 | static char THIS_FILE[] = __FILE__; |
26 | #endif | 26 | #endif |
27 | 27 | ||
28 | IMPLEMENT_DYNAMIC(CXferSocket, CAsyncSocket) | 28 | IMPLEMENT_DYNAMIC(CXferSocket, CAsyncSocket) |
29 | IMPLEMENT_DYNAMIC(CWRQSocket, CXferSocket) | 29 | IMPLEMENT_DYNAMIC(CWRQSocket, CXferSocket) |
30 | IMPLEMENT_DYNAMIC(CRRQSocket, CXferSocket) | 30 | IMPLEMENT_DYNAMIC(CRRQSocket, CXferSocket) |
31 | 31 | ||
32 | ///////////////////////////////////////////////////////////////////////////// | 32 | ///////////////////////////////////////////////////////////////////////////// |
33 | // CAboutDlg dialog used for App About | 33 | // CAboutDlg dialog used for App About |
34 | 34 | ||
35 | class CAboutDlg : public CDialog | 35 | class CAboutDlg : public CDialog |
36 | { | 36 | { |
37 | public: | 37 | public: |
38 | CAboutDlg(); | 38 | CAboutDlg(); |
39 | 39 | ||
40 | // Dialog Data | 40 | // Dialog Data |
41 | //{{AFX_DATA(CAboutDlg) | 41 | //{{AFX_DATA(CAboutDlg) |
42 | enum { IDD = IDD_ABOUTBOX }; | 42 | enum { IDD = IDD_ABOUTBOX }; |
43 | //}}AFX_DATA | 43 | //}}AFX_DATA |
44 | 44 | ||
45 | // ClassWizard generated virtual function overrides | 45 | // ClassWizard generated virtual function overrides |
46 | //{{AFX_VIRTUAL(CAboutDlg) | 46 | //{{AFX_VIRTUAL(CAboutDlg) |
47 | protected: | 47 | protected: |
48 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support | 48 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support |
49 | //}}AFX_VIRTUAL | 49 | //}}AFX_VIRTUAL |
50 | 50 | ||
51 | // Implementation | 51 | // Implementation |
52 | protected: | 52 | protected: |
53 | //{{AFX_MSG(CAboutDlg) | 53 | //{{AFX_MSG(CAboutDlg) |
54 | afx_msg void OnKlevernet(); | 54 | afx_msg void OnKlevernet(); |
55 | //}}AFX_MSG | 55 | //}}AFX_MSG |
56 | DECLARE_MESSAGE_MAP() | 56 | DECLARE_MESSAGE_MAP() |
57 | }; | 57 | }; |
58 | 58 | ||
59 | CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) | 59 | CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) |
60 | { | 60 | { |
61 | //{{AFX_DATA_INIT(CAboutDlg) | 61 | //{{AFX_DATA_INIT(CAboutDlg) |
62 | //}}AFX_DATA_INIT | 62 | //}}AFX_DATA_INIT |
63 | } | 63 | } |
64 | 64 | ||
65 | void CAboutDlg::DoDataExchange(CDataExchange* pDX) | 65 | void CAboutDlg::DoDataExchange(CDataExchange* pDX) |
66 | { | 66 | { |
67 | CDialog::DoDataExchange(pDX); | 67 | CDialog::DoDataExchange(pDX); |
68 | //{{AFX_DATA_MAP(CAboutDlg) | 68 | //{{AFX_DATA_MAP(CAboutDlg) |
69 | //}}AFX_DATA_MAP | 69 | //}}AFX_DATA_MAP |
70 | } | 70 | } |
71 | 71 | ||
72 | BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) | 72 | BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) |
73 | //{{AFX_MSG_MAP(CAboutDlg) | 73 | //{{AFX_MSG_MAP(CAboutDlg) |
74 | ON_BN_CLICKED(IDC_KLEVERNET, OnKlevernet) | 74 | ON_BN_CLICKED(IDC_KLEVERNET, OnKlevernet) |
75 | //}}AFX_MSG_MAP | 75 | //}}AFX_MSG_MAP |
76 | END_MESSAGE_MAP() | 76 | END_MESSAGE_MAP() |
77 | 77 | ||
78 | ///////////////////////////////////////////////////////////////////////////// | 78 | ///////////////////////////////////////////////////////////////////////////// |
79 | // CPumpKINDlg dialog | 79 | // CPumpKINDlg dialog |
80 | 80 | ||
81 | CPumpKINDlg::CPumpKINDlg(CWnd* pParent /*=NULL*/) | 81 | CPumpKINDlg::CPumpKINDlg(CWnd* pParent /*=NULL*/) |
82 | : CDialog(CPumpKINDlg::IDD, pParent), m_MinSize(0,0) | 82 | : CDialog(CPumpKINDlg::IDD, pParent), m_MinSize(0,0) |
83 | { | 83 | { |
84 | m_Listener.m_Daddy = this; | 84 | m_Listener.m_Daddy = this; |
85 | 85 | ||
86 | m_bListen = TRUE; | 86 | m_bListen = TRUE; |
87 | 87 | ||
88 | m_ListenPort = 69; | 88 | m_ListenPort = 69; |
89 | m_bTFTPSubdirs = TRUE; | 89 | m_bTFTPSubdirs = TRUE; |
90 | m_RRQMode = rrqAlwaysConfirm; | 90 | m_RRQMode = rrqAlwaysConfirm; |
91 | m_WRQMode = wrqAlwaysConfirm; | 91 | m_WRQMode = wrqAlwaysConfirm; |
92 | m_TFTPTimeOut = CTimeSpan(0,0,0,30); | 92 | m_TFTPTimeOut = CTimeSpan(0,0,0,30); |
93 | m_RetryTimeOut = CTimeSpan(0,0,0,10); | 93 | m_RetryTimeOut = CTimeSpan(0,0,0,10); |
94 | m_LogLength = 100; | 94 | m_LogLength = 100; |
95 | m_SpeakPort = 69; | 95 | m_SpeakPort = 69; |
96 | m_PromptTimeOut=30; | 96 | m_PromptTimeOut=30; |
97 | m_bShown=TRUE; | 97 | m_bShown=TRUE; |
98 | m_bExiting=FALSE; | 98 | m_bExiting=FALSE; |
99 | m_BlockSize=2048; | 99 | m_BlockSize=2048; |
100 | m_bnw.AssignSound("(bang)",IDR_WAVE_RING,CBellsNWhistles::CBang::bangResource); | 100 | m_bnw.AssignSound("(bang)",IDR_WAVE_RING,CBellsNWhistles::CBang::bangResource); |
101 | m_bnw.AssignSound("(done)",IDR_WAVE_FINISHED,CBellsNWhistles::CBang::bangResource); | 101 | m_bnw.AssignSound("(done)",IDR_WAVE_FINISHED,CBellsNWhistles::CBang::bangResource); |
102 | m_bnw.AssignSound("(oops)",IDR_WAVE_ABORTED,CBellsNWhistles::CBang::bangResource); | 102 | m_bnw.AssignSound("(oops)",IDR_WAVE_ABORTED,CBellsNWhistles::CBang::bangResource); |
103 | m_bnw.AssignSound("(none)",(int)0,CBellsNWhistles::CBang::bangNone); | 103 | m_bnw.AssignSound("(none)",(int)0,CBellsNWhistles::CBang::bangNone); |
104 | m_bnwRequest="(bang)"; m_bnwSuccess="(done)"; | 104 | m_bnwRequest="(bang)"; m_bnwSuccess="(done)"; |
105 | m_bnwAbort="(oops)"; | 105 | m_bnwAbort="(oops)"; |
106 | //{{AFX_DATA_INIT(CPumpKINDlg) | 106 | //{{AFX_DATA_INIT(CPumpKINDlg) |
107 | //}}AFX_DATA_INIT | 107 | //}}AFX_DATA_INIT |
108 | // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 | 108 | // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 |
109 | m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); | 109 | m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); |
110 | m_bmpBack.LoadBitmap(IDB_BACKGROUND); | 110 | m_bmpBack.LoadBitmap(IDB_BACKGROUND); |
111 | m_bmpBack.GetBitmap(&m_bitmapBack); | 111 | m_bmpBack.GetBitmap(&m_bitmapBack); |
112 | m_Retrier = new CRetrier(this); | 112 | m_Retrier = new CRetrier(this); |
113 | ASSERT(m_Retrier); | 113 | ASSERT(m_Retrier); |
114 | m_Trayer = new CTrayer(this); | 114 | m_Trayer = new CTrayer(this); |
115 | ASSERT(m_Trayer); | 115 | ASSERT(m_Trayer); |
116 | /* Ensure we're backwards compatible */ | 116 | /* Ensure we're backwards compatible */ |
117 | ASSERT(CPumpKINDlg::rrqGiveAll==0); | 117 | ASSERT(CPumpKINDlg::rrqGiveAll==0); |
118 | ASSERT(CPumpKINDlg::rrqAlwaysConfirm==1); | 118 | ASSERT(CPumpKINDlg::rrqAlwaysConfirm==1); |
119 | ASSERT(CPumpKINDlg::rrqDenyAll==2); | 119 | ASSERT(CPumpKINDlg::rrqDenyAll==2); |
120 | ASSERT(CPumpKINDlg::wrqTakeAll==0); | 120 | ASSERT(CPumpKINDlg::wrqTakeAll==0); |
121 | ASSERT(CPumpKINDlg::wrqConfirmIfExists==1); | 121 | ASSERT(CPumpKINDlg::wrqConfirmIfExists==1); |
122 | ASSERT(CPumpKINDlg::wrqAlwaysConfirm==2); | 122 | ASSERT(CPumpKINDlg::wrqAlwaysConfirm==2); |
123 | ASSERT(CPumpKINDlg::wrqDenyAll==3); | 123 | ASSERT(CPumpKINDlg::wrqDenyAll==3); |
124 | /* -- */ | 124 | /* -- */ |
125 | LoadSettings(); | 125 | LoadSettings(); |
126 | } | 126 | } |
127 | 127 | ||
128 | void CPumpKINDlg::DoDataExchange(CDataExchange* pDX) | 128 | void CPumpKINDlg::DoDataExchange(CDataExchange* pDX) |
129 | { | 129 | { |
130 | CDialog::DoDataExchange(pDX); | 130 | CDialog::DoDataExchange(pDX); |
131 | //{{AFX_DATA_MAP(CPumpKINDlg) | 131 | //{{AFX_DATA_MAP(CPumpKINDlg) |
132 | DDX_Control(pDX, ID_HELP, m_HelpCtl); | 132 | DDX_Control(pDX, ID_HELP, m_HelpCtl); |
133 | DDX_Control(pDX, IDC_PUT, m_PutCtl); | 133 | DDX_Control(pDX, IDC_PUT, m_PutCtl); |
134 | DDX_Control(pDX, IDC_GET, m_GetCtl); | 134 | DDX_Control(pDX, IDC_GET, m_GetCtl); |
135 | DDX_Control(pDX, IDC_EXIT, m_ExitCtl); | 135 | DDX_Control(pDX, IDC_EXIT, m_ExitCtl); |
136 | DDX_Control(pDX, IDC_LISTENING, m_ListenCtl); | 136 | DDX_Control(pDX, IDC_LISTENING, m_ListenCtl); |
137 | DDX_Control(pDX, IDC_ABORT, m_AbortCtl); | 137 | DDX_Control(pDX, IDC_ABORT, m_AbortCtl); |
138 | DDX_Control(pDX, IDC_OPTIONS, m_OptionsCtl); | 138 | DDX_Control(pDX, IDC_OPTIONS, m_OptionsCtl); |
139 | DDX_Control(pDX, IDC_LOG, m_Log); | 139 | DDX_Control(pDX, IDC_LOG, m_Log); |
140 | DDX_Control(pDX, IDC_CONNECTIONS, m_List); | 140 | DDX_Control(pDX, IDC_CONNECTIONS, m_List); |
141 | //}}AFX_DATA_MAP | 141 | //}}AFX_DATA_MAP |
142 | } | 142 | } |
143 | 143 | ||
144 | BEGIN_MESSAGE_MAP(CPumpKINDlg, CDialog) | 144 | BEGIN_MESSAGE_MAP(CPumpKINDlg, CDialog) |
145 | //{{AFX_MSG_MAP(CPumpKINDlg) | 145 | //{{AFX_MSG_MAP(CPumpKINDlg) |
146 | ON_WM_SYSCOMMAND() | 146 | ON_WM_SYSCOMMAND() |
147 | ON_WM_DESTROY() | 147 | ON_WM_DESTROY() |
148 | ON_WM_PAINT() | 148 | ON_WM_PAINT() |
149 | ON_WM_QUERYDRAGICON() | 149 | ON_WM_QUERYDRAGICON() |
150 | ON_WM_CREATE() | 150 | ON_WM_CREATE() |
151 | ON_BN_CLICKED(IDC_OPTIONS, OnOptions) | 151 | ON_BN_CLICKED(IDC_OPTIONS, OnOptions) |
152 | ON_WM_TIMER() | 152 | ON_WM_TIMER() |
153 | ON_BN_CLICKED(IDC_EXIT, OnExit) | 153 | ON_BN_CLICKED(IDC_EXIT, OnExit) |
154 | ON_BN_CLICKED(IDC_PUT, OnPut) | 154 | ON_BN_CLICKED(IDC_PUT, OnPut) |
155 | ON_BN_CLICKED(IDC_GET, OnGet) | 155 | ON_BN_CLICKED(IDC_GET, OnGet) |
156 | ON_NOTIFY(LVN_DELETEALLITEMS, IDC_CONNECTIONS, OnDeleteallitemsConnections) | 156 | ON_NOTIFY(LVN_DELETEALLITEMS, IDC_CONNECTIONS, OnDeleteallitemsConnections) |
157 | ON_NOTIFY(LVN_DELETEITEM, IDC_CONNECTIONS, OnDeleteitemConnections) | 157 | ON_NOTIFY(LVN_DELETEITEM, IDC_CONNECTIONS, OnDeleteitemConnections) |
158 | ON_NOTIFY(LVN_INSERTITEM, IDC_CONNECTIONS, OnInsertitemConnections) | 158 | ON_NOTIFY(LVN_INSERTITEM, IDC_CONNECTIONS, OnInsertitemConnections) |
159 | ON_NOTIFY(LVN_ITEMCHANGED, IDC_CONNECTIONS, OnItemchangedConnections) | 159 | ON_NOTIFY(LVN_ITEMCHANGED, IDC_CONNECTIONS, OnItemchangedConnections) |
160 | ON_BN_CLICKED(IDC_ABORT, OnAbort) | 160 | ON_BN_CLICKED(IDC_ABORT, OnAbort) |
161 | ON_WM_CLOSE() | 161 | ON_WM_CLOSE() |
162 | ON_COMMAND(ID_TRAY_SHOWPUMPKINWINDOW, OnTrayShowpumpkinwindow) | 162 | ON_COMMAND(ID_TRAY_SHOWPUMPKINWINDOW, OnTrayShowpumpkinwindow) |
163 | ON_COMMAND(ID_TRAY_LISTEN, OnTrayListen) | 163 | ON_COMMAND(ID_TRAY_LISTEN, OnTrayListen) |
164 | ON_COMMAND(ID_TRAY_EXIT, OnTrayExit) | 164 | ON_COMMAND(ID_TRAY_EXIT, OnTrayExit) |
165 | ON_COMMAND(ID_TRAY_ABOUTPUMPKIN, OnTrayAboutpumpkin) | 165 | ON_COMMAND(ID_TRAY_ABOUTPUMPKIN, OnTrayAboutpumpkin) |
166 | ON_COMMAND(ID_TRAY_FETCHFILE, OnTrayFetchfile) | 166 | ON_COMMAND(ID_TRAY_FETCHFILE, OnTrayFetchfile) |
167 | ON_COMMAND(ID_TRAY_HELP, OnTrayHelp) | 167 | ON_COMMAND(ID_TRAY_HELP, OnTrayHelp) |
168 | ON_COMMAND(ID_TRAY_OPTIONS, OnTrayOptions) | 168 | ON_COMMAND(ID_TRAY_OPTIONS, OnTrayOptions) |
169 | ON_COMMAND(ID_TRAY_SENDFILE, OnTraySendfile) | 169 | ON_COMMAND(ID_TRAY_SENDFILE, OnTraySendfile) |
170 | ON_WM_WINDOWPOSCHANGING() | 170 | ON_WM_WINDOWPOSCHANGING() |
171 | ON_LBN_SELCHANGE(IDC_LOG, OnSelchangeLog) | 171 | ON_LBN_SELCHANGE(IDC_LOG, OnSelchangeLog) |
172 | ON_COMMAND(ID_TRAY_OPENFILESFOLDER, OnTrayOpenfilesfolder) | 172 | ON_COMMAND(ID_TRAY_OPENFILESFOLDER, OnTrayOpenfilesfolder) |
173 | ON_WM_DROPFILES() | 173 | ON_WM_DROPFILES() |
174 | ON_BN_CLICKED(ID_HELP, OnHelp) | 174 | ON_BN_CLICKED(ID_HELP, OnHelp) |
175 | ON_BN_CLICKED(IDC_LISTENING, OnListening) | 175 | ON_BN_CLICKED(IDC_LISTENING, OnListening) |
176 | ON_WM_GETMINMAXINFO() | 176 | ON_WM_GETMINMAXINFO() |
177 | ON_WM_SIZE() | 177 | ON_WM_SIZE() |
178 | //}}AFX_MSG_MAP | 178 | //}}AFX_MSG_MAP |
179 | END_MESSAGE_MAP() | 179 | END_MESSAGE_MAP() |
180 | 180 | ||
181 | ///////////////////////////////////////////////////////////////////////////// | 181 | ///////////////////////////////////////////////////////////////////////////// |
182 | // CPumpKINDlg message handlers | 182 | // CPumpKINDlg message handlers |
183 | 183 | ||
184 | BOOL CPumpKINDlg::OnInitDialog() | 184 | BOOL CPumpKINDlg::OnInitDialog() |
185 | { | 185 | { |
186 | CDialog::OnInitDialog(); | 186 | CDialog::OnInitDialog(); |
187 | 187 | ||
188 | // Add "About..." menu item to system menu. | 188 | // Add "About..." menu item to system menu. |
189 | 189 | ||
190 | // IDM_ABOUTBOX must be in the system command range. | 190 | // IDM_ABOUTBOX must be in the system command range. |
191 | ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); | 191 | ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); |
192 | ASSERT(IDM_ABOUTBOX < 0xF000); | 192 | ASSERT(IDM_ABOUTBOX < 0xF000); |
193 | 193 | ||
194 | CMenu* pSysMenu = GetSystemMenu(FALSE); | 194 | CMenu* pSysMenu = GetSystemMenu(FALSE); |
195 | CString strAboutMenu; | 195 | CString strAboutMenu; |
196 | strAboutMenu.LoadString(IDS_ABOUTBOX); | 196 | strAboutMenu.LoadString(IDS_ABOUTBOX); |
197 | if (!strAboutMenu.IsEmpty()) | 197 | if (!strAboutMenu.IsEmpty()) |
198 | { | 198 | { |
199 | pSysMenu->AppendMenu(MF_SEPARATOR); | 199 | pSysMenu->AppendMenu(MF_SEPARATOR); |
200 | pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); | 200 | pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); |
201 | } | 201 | } |
202 | 202 | ||
203 | // Set the icon for this dialog. The framework does this automatically | 203 | // Set the icon for this dialog. The framework does this automatically |
204 | // when the application's main window is not a dialog | 204 | // when the application's main window is not a dialog |
205 | SetIcon(m_hIcon, TRUE); // Set big icon | 205 | SetIcon(m_hIcon, TRUE); // Set big icon |
206 | SetIcon(m_hIcon, FALSE); // Set small icon | 206 | SetIcon(m_hIcon, FALSE); // Set small icon |
207 | 207 | ||
208 | VERIFY(m_Retrier->Create(NULL,"PumpKIN-Retrier",WS_CHILD,CRect(0,0,0,0),this,0)); | 208 | VERIFY(m_Retrier->Create(NULL,"PumpKIN-Retrier",WS_CHILD,CRect(0,0,0,0),this,0)); |
209 | 209 | ||
210 | m_Images.Create(16,16,TRUE,2,1); | 210 | m_Images.Create(16,16,TRUE,2,1); |
211 | m_iRRQ = m_Images.Add(AfxGetApp()->LoadIcon(IDI_RRQ)); | 211 | m_iRRQ = m_Images.Add(AfxGetApp()->LoadIcon(IDI_RRQ)); |
212 | m_iWRQ = m_Images.Add(AfxGetApp()->LoadIcon(IDI_WRQ)); | 212 | m_iWRQ = m_Images.Add(AfxGetApp()->LoadIcon(IDI_WRQ)); |
213 | ASSERT(m_iRRQ>=0); | 213 | ASSERT(m_iRRQ>=0); |
214 | ASSERT(m_iWRQ>=0); | 214 | ASSERT(m_iWRQ>=0); |
215 | m_List.SetImageList(&m_Images,LVSIL_NORMAL); | 215 | m_List.SetImageList(&m_Images,LVSIL_NORMAL); |
216 | m_List.SetImageList(&m_Images,LVSIL_SMALL); | 216 | m_List.SetImageList(&m_Images,LVSIL_SMALL); |
217 | m_List.SetImageList(&m_Images,LVSIL_STATE); | 217 | m_List.SetImageList(&m_Images,LVSIL_STATE); |
218 | m_List.SetTextColor(RGB(255,255,0));// Yellow | 218 | m_List.SetTextColor(RGB(255,255,0));// Yellow |
219 | m_List.SetTextBkColor(RGB(12,167,0));// Green | 219 | m_List.SetTextBkColor(RGB(12,167,0));// Green |
220 | m_List.SetBkColor(RGB(12,167,0));// Green | 220 | m_List.SetBkColor(RGB(12,167,0));// Green |
221 | CRect listrc; | 221 | CRect listrc; |
222 | m_List.GetClientRect(&listrc); | 222 | m_List.GetClientRect(&listrc); |
223 | m_List.InsertColumn(0,"File",LVCFMT_LEFT,listrc.Width()-((listrc.Width()/7)*3+listrc.Width()*2/7),subitemFile); | 223 | m_List.InsertColumn(0,"File",LVCFMT_LEFT,listrc.Width()-((listrc.Width()/7)*3+listrc.Width()*2/7),subitemFile); |
224 | m_List.InsertColumn(1,"type",LVCFMT_CENTER,listrc.Width()/7,subitemType); | 224 | m_List.InsertColumn(1,"type",LVCFMT_CENTER,listrc.Width()/7,subitemType); |
225 | m_List.InsertColumn(2,"peer",LVCFMT_LEFT,listrc.Width()*2/7,subitemPeer); | 225 | m_List.InsertColumn(2,"peer",LVCFMT_LEFT,listrc.Width()*2/7,subitemPeer); |
226 | m_List.InsertColumn(3,"ACK",LVCFMT_RIGHT,listrc.Width()/7,subitemBytes); | 226 | m_List.InsertColumn(3,"ACK",LVCFMT_RIGHT,listrc.Width()/7,subitemBytes); |
227 | m_List.InsertColumn(4,"tsize",LVCFMT_RIGHT,listrc.Width()/7,subitemTSize); | 227 | m_List.InsertColumn(4,"tsize",LVCFMT_RIGHT,listrc.Width()/7,subitemTSize); |
228 | 228 | ||
229 | LogLine(IDS_LOG_START); | 229 | LogLine(IDS_LOG_START); |
230 | 230 | ||
231 | SetupButtons(); | 231 | SetupButtons(); |
232 | 232 | ||
233 | CRect wrci, wrco; | 233 | CRect wrci, wrco; |
234 | GetWindowRect(&wrco); | 234 | GetWindowRect(&wrco); |
235 | GetClientRect(&wrci); | 235 | GetClientRect(&wrci); |
236 | CRect brc; | 236 | CRect brc; |
237 | m_GetCtl.GetWindowRect(&brc); ScreenToClient(&brc); | 237 | m_GetCtl.GetWindowRect(&brc); ScreenToClient(&brc); |
238 | m_rightGapButtons = wrci.right-brc.right; | 238 | m_rightGapButtons = wrci.right-brc.right; |
239 | m_List.GetWindowRect(&brc); ScreenToClient(&brc); | 239 | m_List.GetWindowRect(&brc); ScreenToClient(&brc); |
240 | m_rightGapList = wrci.right-brc.right; | 240 | m_rightGapList = wrci.right-brc.right; |
241 | m_ListenCtl.GetWindowRect(&brc); ScreenToClient(&brc); | 241 | m_ListenCtl.GetWindowRect(&brc); ScreenToClient(&brc); |
242 | m_bottomGapListen = wrci.bottom-brc.bottom; | 242 | m_bottomGapListen = wrci.bottom-brc.bottom; |
243 | m_Log.GetWindowRect(&brc);ScreenToClient(&brc); | 243 | m_Log.GetWindowRect(&brc);ScreenToClient(&brc); |
244 | m_bottomGapLog = wrci.bottom-brc.bottom; | 244 | m_bottomGapLog = wrci.bottom-brc.bottom; |
245 | m_MinSize.cx = wrco.Width(); m_MinSize.cy=wrco.Height(); | 245 | m_MinSize.cx = wrco.Width(); m_MinSize.cy=wrco.Height(); |
246 | 246 | ||
247 | CRect rc, drc; | 247 | CRect rc, drc; |
248 | GetWindowRect(rc); | 248 | GetWindowRect(rc); |
249 | GetDesktopWindow()->GetWindowRect(drc); | 249 | GetDesktopWindow()->GetWindowRect(drc); |
250 | SetWindowPos(NULL,drc.right-6-rc.Width(),6,0,0,SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOZORDER); | 250 | SetWindowPos(NULL,drc.right-6-rc.Width(),6,0,0,SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOZORDER); |
251 | 251 | ||
252 | if(m_bShown) | 252 | if(m_bShown) |
253 | ShowWindow(SW_SHOW); | 253 | ShowWindow(SW_SHOW); |
254 | else | 254 | else |
255 | ShowWindow(SW_HIDE); | 255 | ShowWindow(SW_HIDE); |
256 | 256 | ||
257 | m_ListenCtl.SetCheck(m_Listener.m_bListen?1:0); | 257 | m_ListenCtl.SetCheck(m_Listener.m_bListen?1:0); |
258 | 258 | ||
259 | // CG: The following block was added by the ToolTips component. | 259 | // CG: The following block was added by the ToolTips component. |
260 | { | 260 | { |
261 | // Create the ToolTip control. | 261 | // Create the ToolTip control. |
262 | m_tooltip.Create(this); | 262 | m_tooltip.Create(this); |
263 | m_tooltip.Activate(TRUE); | 263 | m_tooltip.Activate(TRUE); |
264 | 264 | ||
265 | m_tooltip.AddTool(&m_List,IDC_CONNECTIONS); | 265 | m_tooltip.AddTool(&m_List,IDC_CONNECTIONS); |
266 | m_tooltip.AddTool(GetDlgItem(IDC_PUT),IDC_PUT); | 266 | m_tooltip.AddTool(GetDlgItem(IDC_PUT),IDC_PUT); |
267 | m_tooltip.AddTool(GetDlgItem(IDC_GET),IDC_GET); | 267 | m_tooltip.AddTool(GetDlgItem(IDC_GET),IDC_GET); |
268 | m_tooltip.AddTool(&m_AbortCtl,IDC_ABORT); | 268 | m_tooltip.AddTool(&m_AbortCtl,IDC_ABORT); |
269 | m_tooltip.AddTool(GetDlgItem(IDC_OPTIONS),IDC_OPTIONS); | 269 | m_tooltip.AddTool(GetDlgItem(IDC_OPTIONS),IDC_OPTIONS); |
270 | m_tooltip.AddTool(GetDlgItem(IDC_EXIT),IDC_EXIT); | 270 | m_tooltip.AddTool(GetDlgItem(IDC_EXIT),IDC_EXIT); |
271 | m_tooltip.AddTool(GetDlgItem(ID_HELP),ID_HELP); | 271 | m_tooltip.AddTool(GetDlgItem(ID_HELP),ID_HELP); |
272 | m_tooltip.AddTool(GetDlgItem(IDC_LOG),IDC_LOG); | 272 | m_tooltip.AddTool(GetDlgItem(IDC_LOG),IDC_LOG); |
273 | } | 273 | } |
274 | return TRUE; // return TRUE unless you set the focus to a control | 274 | return TRUE; // return TRUE unless you set the focus to a control |
275 | } | 275 | } |
276 | 276 | ||
277 | void CPumpKINDlg::OnSysCommand(UINT nID, LPARAM lParam) | 277 | void CPumpKINDlg::OnSysCommand(UINT nID, LPARAM lParam) |
278 | { | 278 | { |
279 | if ((nID & 0xFFF0) == IDM_ABOUTBOX) | 279 | if ((nID & 0xFFF0) == IDM_ABOUTBOX) |
280 | { | 280 | { |
281 | CAboutDlg dlgAbout; | 281 | CAboutDlg dlgAbout; |
282 | dlgAbout.DoModal(); | 282 | dlgAbout.DoModal(); |
283 | } | 283 | } |
284 | else | 284 | else |
285 | { | 285 | { |
286 | CDialog::OnSysCommand(nID, lParam); | 286 | CDialog::OnSysCommand(nID, lParam); |
287 | } | 287 | } |
288 | } | 288 | } |
289 | 289 | ||
290 | void CPumpKINDlg::OnDestroy() | 290 | void CPumpKINDlg::OnDestroy() |
291 | { | 291 | { |
292 | SaveSettings(); | 292 | SaveSettings(); |
293 | 293 | ||
294 | NOTIFYICONDATA nid; | 294 | NOTIFYICONDATA nid; |
295 | memset(&nid,0,sizeof(nid)); | 295 | memset(&nid,0,sizeof(nid)); |
296 | nid.cbSize=sizeof(nid); | 296 | nid.cbSize=sizeof(nid); |
297 | nid.hWnd=m_Trayer->m_hWnd; | 297 | nid.hWnd=m_Trayer->m_hWnd; |
298 | nid.uID=IDC_TRAYICON; | 298 | nid.uID=IDC_TRAYICON; |
299 | nid.uFlags=0; | 299 | nid.uFlags=0; |
300 | VERIFY(Shell_NotifyIcon(NIM_DELETE,&nid)); | 300 | VERIFY(Shell_NotifyIcon(NIM_DELETE,&nid)); |
301 | 301 | ||
302 | WinHelp(0L, HELP_QUIT); | 302 | WinHelp(0L, HELP_QUIT); |
303 | CDialog::OnDestroy(); | 303 | CDialog::OnDestroy(); |
304 | POSITION p = m_LogTimes.GetStartPosition(); | 304 | POSITION p = m_LogTimes.GetStartPosition(); |
305 | while(p){ | 305 | while(p){ |
306 | CTime *t,*tt; | 306 | CTime *t,*tt; |
307 | m_LogTimes.GetNextAssoc(p,t,tt); | 307 | m_LogTimes.GetNextAssoc(p,t,tt); |
308 | ASSERT(t && tt && t==tt); | 308 | ASSERT(t && tt && t==tt); |
309 | delete t; | 309 | delete t; |
310 | } | 310 | } |
311 | // *** Abort and cleanup transfers | 311 | // *** Abort and cleanup transfers |
312 | m_LogTimes.RemoveAll(); | 312 | m_LogTimes.RemoveAll(); |
313 | } | 313 | } |
314 | 314 | ||
315 | // If you add a minimize button to your dialog, you will need the code below | 315 | // If you add a minimize button to your dialog, you will need the code below |
316 | // to draw the icon. For MFC applications using the document/view model, | 316 | // to draw the icon. For MFC applications using the document/view model, |
317 | // this is automatically done for you by the framework. | 317 | // this is automatically done for you by the framework. |
318 | 318 | ||
319 | void CPumpKINDlg::OnPaint() | 319 | void CPumpKINDlg::OnPaint() |
320 | { | 320 | { |
321 | if (IsIconic()) | 321 | if (IsIconic()) |
322 | { | 322 | { |
323 | CPaintDC dc(this); // device context for painting | 323 | CPaintDC dc(this); // device context for painting |
324 | 324 | ||
325 | SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); | 325 | SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); |
326 | 326 | ||
327 | // Center icon in client rectangle | 327 | // Center icon in client rectangle |
328 | int cxIcon = GetSystemMetrics(SM_CXICON); | 328 | int cxIcon = GetSystemMetrics(SM_CXICON); |
329 | int cyIcon = GetSystemMetrics(SM_CYICON); | 329 | int cyIcon = GetSystemMetrics(SM_CYICON); |
330 | CRect rect; | 330 | CRect rect; |
331 | GetClientRect(&rect); | 331 | GetClientRect(&rect); |
332 | int x = (rect.Width() - cxIcon + 1) / 2; | 332 | int x = (rect.Width() - cxIcon + 1) / 2; |
333 | int y = (rect.Height() - cyIcon + 1) / 2; | 333 | int y = (rect.Height() - cyIcon + 1) / 2; |
334 | 334 | ||
335 | // Draw the icon | 335 | // Draw the icon |
336 | dc.DrawIcon(x, y, m_hIcon); | 336 | dc.DrawIcon(x, y, m_hIcon); |
337 | } | 337 | } |
338 | else | 338 | else |
339 | { | 339 | { |
340 | CPaintDC pDC(this); | 340 | CPaintDC pDC(this); |
341 | CDC bmpDC; | 341 | CDC bmpDC; |
342 | bmpDC.CreateCompatibleDC(&pDC); | 342 | bmpDC.CreateCompatibleDC(&pDC); |
343 | bmpDC.SelectObject(&m_bmpBack); | 343 | bmpDC.SelectObject(&m_bmpBack); |
344 | CRect rc; | 344 | CRect rc; |
345 | GetClientRect(&rc); | 345 | GetClientRect(&rc); |
346 | for(int x=-m_bitmapBack.bmWidth*2/4;x<rc.Width();x+=m_bitmapBack.bmWidth) | 346 | for(int x=-m_bitmapBack.bmWidth*2/4;x<rc.Width();x+=m_bitmapBack.bmWidth) |
347 | for(int y=-m_bitmapBack.bmHeight*2/4;y<rc.Height();y+=m_bitmapBack.bmHeight) | 347 | for(int y=-m_bitmapBack.bmHeight*2/4;y<rc.Height();y+=m_bitmapBack.bmHeight) |
348 | pDC.BitBlt(x,y,m_bitmapBack.bmWidth,m_bitmapBack.bmHeight,&bmpDC,0,0,SRCCOPY); | 348 | pDC.BitBlt(x,y,m_bitmapBack.bmWidth,m_bitmapBack.bmHeight,&bmpDC,0,0,SRCCOPY); |
349 | bmpDC.DeleteDC(); | 349 | bmpDC.DeleteDC(); |
350 | CDialog::OnPaint(); | 350 | CDialog::OnPaint(); |
351 | } | 351 | } |
352 | } | 352 | } |
353 | 353 | ||
354 | // The system calls this to obtain the cursor to display while the user drags | 354 | // The system calls this to obtain the cursor to display while the user drags |
355 | // the minimized window. | 355 | // the minimized window. |
356 | HCURSOR CPumpKINDlg::OnQueryDragIcon() | 356 | HCURSOR CPumpKINDlg::OnQueryDragIcon() |
357 | { | 357 | { |
358 | return (HCURSOR) m_hIcon; | 358 | return (HCURSOR) m_hIcon; |
359 | } | 359 | } |
360 | 360 | ||
361 | int CPumpKINDlg::OnCreate(LPCREATESTRUCT lpCreateStruct) | 361 | int CPumpKINDlg::OnCreate(LPCREATESTRUCT lpCreateStruct) |
362 | { | 362 | { |
363 | if (CDialog::OnCreate(lpCreateStruct) == -1) | 363 | if (CDialog::OnCreate(lpCreateStruct) == -1) |
364 | return -1; | 364 | return -1; |
365 | 365 | ||
366 | if(!m_Listener.SetListen(m_bListen)) { | 366 | if(!m_Listener.SetListen(m_bListen)) { |
367 | m_bListen=FALSE; | 367 | m_bListen=FALSE; |
368 | TRACE0("Failed to create socket\n"); | 368 | TRACE0("Failed to create socket\n"); |
369 | AfxMessageBox(IDS_BOX_CANTBIND,MB_OK|MB_ICONEXCLAMATION); | 369 | AfxMessageBox(IDS_BOX_CANTBIND,MB_OK|MB_ICONEXCLAMATION); |
370 | } | 370 | } |
371 | 371 | ||
372 | if(!m_Trayer->Create(NULL,"PumpKIN TrayIcon",WS_CHILD,CRect(0,0,0,0),this,0)){ | 372 | if(!m_Trayer->Create(NULL,"PumpKIN TrayIcon",WS_CHILD,CRect(0,0,0,0),this,0)){ |
373 | TRACE0("Failed to create trayer\n"); | 373 | TRACE0("Failed to create trayer\n"); |
374 | return -1; | 374 | return -1; |
375 | } | 375 | } |
376 | 376 | ||
377 | NOTIFYICONDATA nid; | 377 | NOTIFYICONDATA nid; |
378 | memset(&nid,0,sizeof(nid)); | 378 | memset(&nid,0,sizeof(nid)); |
379 | nid.cbSize=sizeof(nid); | 379 | nid.cbSize=sizeof(nid); |
380 | nid.hWnd=m_Trayer->m_hWnd; | 380 | nid.hWnd=m_Trayer->m_hWnd; |
381 | nid.uID=IDC_TRAYICON; | 381 | nid.uID=IDC_TRAYICON; |
382 | nid.uFlags=NIF_MESSAGE|NIF_ICON|NIF_TIP; | 382 | nid.uFlags=NIF_MESSAGE|NIF_ICON|NIF_TIP; |
383 | nid.uCallbackMessage=WM_TRAYICON; | 383 | nid.uCallbackMessage=WM_TRAYICON; |
384 | nid.hIcon=AfxGetApp()->LoadIcon(IDR_MAINFRAME); | 384 | nid.hIcon=AfxGetApp()->LoadIcon(IDR_MAINFRAME); |
385 | // *** Load from resource | 385 | // *** Load from resource |
386 | strcpy(nid.szTip,"PumpKIN"); | 386 | strcpy(nid.szTip,"PumpKIN"); |
387 | VERIFY(Shell_NotifyIcon(NIM_ADD,&nid)); | 387 | VERIFY(Shell_NotifyIcon(NIM_ADD,&nid)); |
388 | 388 | ||
389 | return 0; | 389 | return 0; |
390 | } | 390 | } |
391 | 391 | ||
392 | void CListenSocket::OnReceive(int nErrorCode) | 392 | void CListenSocket::OnReceive(int nErrorCode) |
393 | { | 393 | { |
394 | ASSERT(m_Daddy); | 394 | ASSERT(m_Daddy); |
395 | if(nErrorCode){ | 395 | if(nErrorCode){ |
396 | m_Daddy->LogLine(IDS_LOG_LISTENRECEIVEERROR); | 396 | m_Daddy->LogLine(IDS_LOG_LISTENRECEIVEERROR); |
397 | return; | 397 | return; |
398 | } | 398 | } |
399 | DWORD fionread = 0; | 399 | DWORD fionread = 0; |
400 | VERIFY(IOCtl(FIONREAD,&fionread));// *** Do some checking on the value acquired | 400 | VERIFY(IOCtl(FIONREAD,&fionread));// *** Do some checking on the value acquired |
401 | tftp *tftpRQ = tftp::Allocate(fionread); | 401 | tftp *tftpRQ = tftp::Allocate(fionread); |
402 | ASSERT(tftpRQ); | 402 | ASSERT(tftpRQ); |
403 | SOCKADDR_IN sin; | 403 | SOCKADDR_IN sin; |
404 | if(!tftpRQ->Receive(this,fionread,&sin)){ | 404 | if(!tftpRQ->Receive(this,fionread,&sin)){ |
405 | m_Daddy->LogLine(IDS_LOG_LISTENACCEPTERROR); | 405 | m_Daddy->LogLine(IDS_LOG_LISTENACCEPTERROR); |
406 | delete tftpRQ; | 406 | delete tftpRQ; |
407 | return; | 407 | return; |
408 | } | 408 | } |
409 | #ifndefNDEBUG | 409 | #ifndefNDEBUG |
410 | CString tmp; | 410 | CString tmp; |
411 | tmp.Format("%u - %s - %u\n",tftpRQ->Opcode(),inet_ntoa(sin.sin_addr),sin.sin_port); | 411 | tmp.Format("%u - %s - %u\n",tftpRQ->Opcode(),inet_ntoa(sin.sin_addr),sin.sin_port); |
412 | TRACE0(tmp); | 412 | TRACE0(tmp); |
413 | #endif | 413 | #endif |
414 | POSITION p = m_Daddy->m_Xfers.GetStartPosition(); | 414 | POSITION p = m_Daddy->m_Xfers.GetStartPosition(); |
415 | while(p){ | 415 | while(p){ |
416 | SOCKET key; | 416 | SOCKET key; |
417 | CXferSocket *sock; | 417 | CXferSocket *sock; |
418 | m_Daddy->m_Xfers.GetNextAssoc(p,key,sock); | 418 | m_Daddy->m_Xfers.GetNextAssoc(p,key,sock); |
419 | ASSERT(sock); | 419 | ASSERT(sock); |
420 | if(sock->m_Peer.sin_addr.s_addr==sin.sin_addr.s_addr && sock->m_Peer.sin_port==sin.sin_port){ | 420 | if(sock->m_Peer.sin_addr.s_addr==sin.sin_addr.s_addr && sock->m_Peer.sin_port==sin.sin_port){ |
421 | TRACE0("Ignoring request which we are already processing\n"); | 421 | TRACE0("Ignoring request which we are already processing\n"); |
422 | delete tftpRQ; | 422 | delete tftpRQ; |
423 | return; | 423 | return; |
424 | } | 424 | } |
425 | } | 425 | } |
426 | switch(tftpRQ->Opcode()){ | 426 | switch(tftpRQ->Opcode()){ |
427 | case tftp::opRRQ: | 427 | case tftp::opRRQ: |
428 | // Read Request | 428 | // Read Request |
429 | { | 429 | { |
430 | CString tmp; | 430 | CString tmp; |
431 | tmp.Format(IDS_LOG_RRQSERVE,tftpRQ->rqFileName(),tftpRQ->rqType(),inet_ntoa(sin.sin_addr)); | 431 | tmp.Format(IDS_LOG_RRQSERVE,tftpRQ->rqFileName(),tftpRQ->rqType(),inet_ntoa(sin.sin_addr)); |
432 | m_Daddy->LogLine(tmp); | 432 | m_Daddy->LogLine(tmp); |
433 | CRRQSocket *s = new CRRQSocket(m_Daddy,tftpRQ->rqFileName(),tftpRQ->rqType(),&sin); | 433 | CRRQSocket *s = new CRRQSocket(m_Daddy,tftpRQ->rqFileName(),tftpRQ->rqType(),&sin); |
434 | ASSERT(s); | 434 | ASSERT(s); |
435 | tftpRQ->GetOptions(&s->m_Options); | 435 | tftpRQ->GetOptions(&s->m_Options); |
436 | if(!s->Create()) | 436 | if(!s->Create()) |
437 | s->Destroy(FALSE); | 437 | s->Destroy(FALSE); |
438 | } | 438 | } |
439 | break; | 439 | break; |
440 | case tftp::opWRQ: | 440 | case tftp::opWRQ: |
441 | // Write Request | 441 | // Write Request |
442 | { | 442 | { |
443 | CString tmp; | 443 | CString tmp; |
444 | tmp.Format(IDS_LOG_WRQSERVE,tftpRQ->rqFileName(),tftpRQ->rqType(),inet_ntoa(sin.sin_addr)); | 444 | tmp.Format(IDS_LOG_WRQSERVE,tftpRQ->rqFileName(),tftpRQ->rqType(),inet_ntoa(sin.sin_addr)); |
445 | m_Daddy->LogLine(tmp); | 445 | m_Daddy->LogLine(tmp); |
446 | CWRQSocket *s = new CWRQSocket(m_Daddy,tftpRQ->rqFileName(),tftpRQ->rqType(),&sin); | 446 | CWRQSocket *s = new CWRQSocket(m_Daddy,tftpRQ->rqFileName(),tftpRQ->rqType(),&sin); |
447 | ASSERT(s); | 447 | ASSERT(s); |
448 | tftpRQ->GetOptions(&s->m_Options); | 448 | tftpRQ->GetOptions(&s->m_Options); |
449 | if(!s->Create(NULL,NULL)) | 449 | if(!s->Create(NULL,NULL)) |
450 | s->Destroy(FALSE); | 450 | s->Destroy(FALSE); |
451 | } | 451 | } |
452 | break; | 452 | break; |
453 | default: | 453 | default: |
454 | m_Daddy->LogLine(IDS_LOG_LISTENOPCODE); | 454 | m_Daddy->LogLine(IDS_LOG_LISTENOPCODE); |
455 | delete tftpRQ; | 455 | delete tftpRQ; |
456 | return; | 456 | return; |
457 | } | 457 | } |
458 | delete tftpRQ; | 458 | delete tftpRQ; |
459 | } | 459 | } |
460 | 460 | ||
461 | BOOL tftp::Receive(CAsyncSocket* socket,UINT maxLength,SOCKADDR_IN *sin) | 461 | BOOL tftp::Receive(CAsyncSocket* socket,UINT maxLength,SOCKADDR_IN *sin) |
462 | { | 462 | { |
463 | ASSERT(socket); | 463 | ASSERT(socket); |
464 | int saddrLen = sizeof(SOCKADDR_IN); | 464 | int saddrLen = sizeof(SOCKADDR_IN); |
465 | length = sin ? | 465 | length = sin ? |
466 | socket->ReceiveFrom(udpBase(),maxLength,(SOCKADDR*)sin,&saddrLen) | 466 | socket->ReceiveFrom(udpBase(),maxLength,(SOCKADDR*)sin,&saddrLen) |
467 | : | 467 | : |
468 | socket->Receive(udpBase(),maxLength) | 468 | socket->Receive(udpBase(),maxLength) |
469 | ; | 469 | ; |
470 | if(!length) | 470 | if(!length) |
471 | return FALSE; | 471 | return FALSE; |
472 | if(length==(tftpLength)SOCKET_ERROR) | 472 | if(length==(tftpLength)SOCKET_ERROR) |
473 | return FALSE; | 473 | return FALSE; |
474 | return TRUE; | 474 | return TRUE; |
475 | } | 475 | } |
476 | 476 | ||
477 | UINT tftp::Opcode() | 477 | UINT tftp::Opcode() |
478 | { | 478 | { |
479 | return REVERSEBYTES(opcode); | 479 | return REVERSEBYTES(opcode); |
480 | } | 480 | } |
481 | 481 | ||
482 | CString tftp::rqFileName() | 482 | CString tftp::rqFileName() |
483 | { | 483 | { |
484 | ASSERT(length); | 484 | ASSERT(length); |
485 | ASSERT(Opcode()==opRRQ || Opcode()==opWRQ); | 485 | ASSERT(Opcode()==opRRQ || Opcode()==opWRQ); |
486 | CString rv; | 486 | CString rv; |
487 | if(memchr(&data.m_RQ.data,0,length-sizeof(opcode))) | 487 | if(memchr(&data.m_RQ.data,0,length-sizeof(opcode))) |
488 | rv = (LPCTSTR)data.m_RQ.data; | 488 | rv = (LPCTSTR)data.m_RQ.data; |
489 | return rv; | 489 | return rv; |
490 | } | 490 | } |
491 | 491 | ||
492 | CString tftp::rqType() | 492 | CString tftp::rqType() |
493 | { | 493 | { |
494 | ASSERT(length); | 494 | ASSERT(length); |
495 | ASSERT(Opcode()==opRRQ || Opcode()==opWRQ); | 495 | ASSERT(Opcode()==opRRQ || Opcode()==opWRQ); |
496 | CString rv; | 496 | CString rv; |
497 | char *tmp = (char*)memchr(&data.m_RQ.data,0,length-sizeof(opcode)); | 497 | char *tmp = (char*)memchr(&data.m_RQ.data,0,length-sizeof(opcode)); |
498 | if(tmp++) | 498 | if(tmp++) |
499 | rv = (LPCTSTR)tmp; | 499 | rv = (LPCTSTR)tmp; |
500 | return rv; | 500 | return rv; |
501 | } | 501 | } |
502 | 502 | ||
503 | UINT tftp::GetOptions(tftp::tftpOptions* ops) | 503 | UINT tftp::GetOptions(tftp::tftpOptions* ops) |
504 | { | 504 | { |
505 | ASSERT(length); | 505 | ASSERT(length); |
506 | ASSERT(Opcode()==opRRQ || Opcode()==opWRQ || Opcode()==opOACK); | 506 | ASSERT(Opcode()==opRRQ || Opcode()==opWRQ || Opcode()==opOACK); |
507 | ASSERT(ops); | 507 | ASSERT(ops); |
508 | tftpOptions& o = *ops; | 508 | tftpOptions& o = *ops; |
509 | LPSTR base = (LPSTR)&data.m_RQ.data; | 509 | LPSTR base = (LPSTR)&data.m_RQ.data; |
510 | UINT basePtr = 0; | 510 | UINT basePtr = 0; |
511 | if(Opcode()==opRRQ || Opcode()==opWRQ){ | 511 | if(Opcode()==opRRQ || Opcode()==opWRQ){ |
512 | base = (LPSTR)memchr(&data.m_RQ.data,0,length-sizeof(opcode)); | 512 | base = (LPSTR)memchr(&data.m_RQ.data,0,length-sizeof(opcode)); |
513 | if(!base) | 513 | if(!base) |
514 | return 0; | 514 | return 0; |
515 | base++; | 515 | base++; |
516 | basePtr = (base-(LPSTR)&data.m_RQ.data); | 516 | basePtr = (base-(LPSTR)&data.m_RQ.data); |
517 | base = (LPSTR)memchr(base,0,length-basePtr); | 517 | base = (LPSTR)memchr(base,0,length-basePtr); |
518 | if(!base) | 518 | if(!base) |
519 | return 0; | 519 | return 0; |
520 | base++; | 520 | base++; |
521 | basePtr = (base-(LPSTR)&data.m_RQ.data); | 521 | basePtr = (base-(LPSTR)&data.m_RQ.data); |
522 | } | 522 | } |
523 | ops->RemoveAll(); | 523 | ops->RemoveAll(); |
524 | UINT rv = 0; | 524 | UINT rv = 0; |
525 | while(basePtr<(length-sizeof(opcode))){ | 525 | while(basePtr<(length-sizeof(opcode))){ |
526 | CString onam = (LPSTR)&data.m_RQ.data[basePtr]; | 526 | CString onam = (LPSTR)&data.m_RQ.data[basePtr]; |
527 | basePtr+=onam.GetLength()+1; | 527 | basePtr+=onam.GetLength()+1; |
528 | CString oval = (LPSTR)&data.m_RQ.data[basePtr]; | 528 | CString oval = (LPSTR)&data.m_RQ.data[basePtr]; |
529 | basePtr+=oval.GetLength()+1; | 529 | basePtr+=oval.GetLength()+1; |
530 | onam.MakeLower(); | 530 | onam.MakeLower(); |
531 | o[onam]=oval; | 531 | o[onam]=oval; |
532 | rv++; | 532 | rv++; |
533 | } | 533 | } |
534 | return rv; | 534 | return rv; |
535 | } | 535 | } |
536 | 536 | ||
537 | tftp::tftp() | 537 | tftp::tftp() |
538 | { | 538 | { |
539 | length=0; | 539 | length=0; |
540 | } | 540 | } |
541 | 541 | ||
542 | 542 | ||
543 | void CXferSocket::OnSend(int nErrorCode) | 543 | void CXferSocket::OnSend(int nErrorCode) |
544 | { | 544 | { |
545 | if(nErrorCode){ | 545 | if(nErrorCode){ |
546 | ASSERT(m_Daddy); | 546 | ASSERT(m_Daddy); |
547 | m_Daddy->LogLine(IDS_LOG_XFERSEND); | 547 | m_Daddy->LogLine(IDS_LOG_XFERSEND); |
548 | return; | 548 | return; |
549 | } | 549 | } |
550 | if(!m_Queue.IsEmpty()){ | 550 | if(!m_Queue.IsEmpty()){ |
551 | tftp *p = m_Queue.GetHead(); | 551 | tftp *p = m_Queue.GetHead(); |
552 | ASSERT(p); | 552 | ASSERT(p); |
553 | m_Queue.RemoveHead(); | 553 | m_Queue.RemoveHead(); |
554 | if(!p->Send(this,&m_Peer)){ | 554 | if(!p->Send(this,&m_Peer)){ |
555 | ASSERT(m_Daddy); | 555 | ASSERT(m_Daddy); |
556 | m_Daddy->LogLine(IDS_LOG_XFERUDPSEND); | 556 | m_Daddy->LogLine(IDS_LOG_XFERUDPSEND); |
557 | } | 557 | } |
558 | delete p; | 558 | delete p; |
559 | } | 559 | } |
560 | DoSelect(); | 560 | DoSelect(); |
561 | if(m_Queue.IsEmpty()){ | 561 | if(m_Queue.IsEmpty()){ |
562 | switch(state){ | 562 | switch(state){ |
563 | case stateDeny: | 563 | case stateDeny: |
564 | Destroy(FALSE); | 564 | Destroy(FALSE); |
565 | break; | 565 | break; |
566 | case stateFinish: | 566 | case stateFinish: |
567 | Destroy(TRUE); | 567 | Destroy(TRUE); |
568 | break; | 568 | break; |
569 | } | 569 | } |
570 | } | 570 | } |
571 | } | 571 | } |
572 | 572 | ||
573 | BOOL tftp::Send(CAsyncSocket *socket,SOCKADDR_IN* saddr) | 573 | BOOL tftp::Send(CAsyncSocket *socket,SOCKADDR_IN* saddr) |
574 | { | 574 | { |
575 | ASSERT(socket); | 575 | ASSERT(socket); |
576 | int rv = socket->SendTo(udpBase(),length,(SOCKADDR*)saddr,sizeof(SOCKADDR_IN)); | 576 | int rv = socket->SendTo(udpBase(),length,(SOCKADDR*)saddr,sizeof(SOCKADDR_IN)); |
577 | if(rv!=length) | 577 | if(rv!=length) |
578 | return FALSE; | 578 | return FALSE; |
579 | return TRUE; | 579 | return TRUE; |
580 | } | 580 | } |
581 | 581 | ||
582 | void CXferSocket::DoSelect(BOOL do_select) | 582 | void CXferSocket::DoSelect(BOOL do_select) |
583 | { | 583 | { |
584 | if(m_Peer.sin_addr.s_addr!=INADDR_NONE) | 584 | if(m_Peer.sin_addr.s_addr!=INADDR_NONE) |
585 | AsyncSelect(FD_CLOSE|FD_READ|((m_Queue.IsEmpty()&&!do_select)?0:FD_WRITE)); | 585 | AsyncSelect(FD_CLOSE|FD_READ|((m_Queue.IsEmpty()&&!do_select)?0:FD_WRITE)); |
586 | } | 586 | } |
587 | 587 | ||
588 | void CXferSocket::OnReceive(int nErrorCode) | 588 | void CXferSocket::OnReceive(int nErrorCode) |
589 | { | 589 | { |
590 | if(nErrorCode){ | 590 | if(nErrorCode){ |
591 | ASSERT(m_Daddy); | 591 | ASSERT(m_Daddy); |
592 | m_Daddy->LogLine(IDS_LOG_XFERRECEIVE); | 592 | m_Daddy->LogLine(IDS_LOG_XFERRECEIVE); |
593 | return; | 593 | return; |
594 | } | 594 | } |
595 | ASSERT(m_Daddy); | 595 | ASSERT(m_Daddy); |
596 | DWORD fionread = 0; | 596 | DWORD fionread = 0; |
597 | VERIFY(IOCtl(FIONREAD,&fionread)); | 597 | VERIFY(IOCtl(FIONREAD,&fionread)); |
598 | tftp *p = tftp::Allocate(fionread); | 598 | tftp *p = tftp::Allocate(fionread); |
599 | ASSERT(p); | 599 | ASSERT(p); |
600 | SOCKADDR_IN sin; | 600 | SOCKADDR_IN sin; |
601 | if(!p->Receive(this,fionread,&sin)){ | 601 | if(!p->Receive(this,fionread,&sin)){ |
602 | m_Daddy->LogLine(IDS_LOG_XFERUDPRECEIVE); | 602 | m_Daddy->LogLine(IDS_LOG_XFERUDPRECEIVE); |
603 | delete p; | 603 | delete p; |
604 | return; | 604 | return; |
605 | }else | 605 | }else |
606 | if(m_Peer.sin_addr.s_addr==INADDR_NONE){ | 606 | if(m_Peer.sin_addr.s_addr==INADDR_NONE){ |
607 | m_Peer.sin_addr=sin.sin_addr; | 607 | m_Peer.sin_addr=sin.sin_addr; |
608 | m_Peer.sin_port=sin.sin_port; | 608 | m_Peer.sin_port=sin.sin_port; |
609 | } | 609 | } |
610 | BOOL alive = TRUE; | 610 | BOOL alive = TRUE; |
611 | if(state==stateInit){ | 611 | if(state==stateInit){ |
612 | state=stateXfer; | 612 | state=stateXfer; |
613 | m_Peer.sin_port=sin.sin_port; | 613 | m_Peer.sin_port=sin.sin_port; |
614 | UpdateList(); | 614 | UpdateList(); |
615 | } | 615 | } |
616 | if(sin.sin_addr.s_addr!=m_Peer.sin_addr.s_addr || sin.sin_port!=m_Peer.sin_port){ | 616 | if(sin.sin_addr.s_addr!=m_Peer.sin_addr.s_addr || sin.sin_port!=m_Peer.sin_port){ |
617 | m_Daddy->LogLine(IDS_LOG_XFERSOURCETID); | 617 | m_Daddy->LogLine(IDS_LOG_XFERSOURCETID); |
618 | // *** Bounce it! | 618 | // *** Bounce it! |
619 | }else{ | 619 | }else{ |
620 | alive = OnTFTP(p); | 620 | alive = OnTFTP(p); |
621 | } | 621 | } |
622 | delete p; | 622 | delete p; |
623 | if(alive){ | 623 | if(alive){ |
624 | DoSelect(); | 624 | DoSelect(); |
625 | ResetTimeout(); | 625 | ResetTimeout(); |
626 | } | 626 | } |
627 | } | 627 | } |
628 | 628 | ||
629 | void CXferSocket::SetPeer(SOCKADDR_IN *sin) | 629 | void CXferSocket::SetPeer(SOCKADDR_IN *sin) |
630 | { | 630 | { |
631 | ASSERT(sin); | 631 | ASSERT(sin); |
632 | memmove(&m_Peer,sin,sizeof(m_Peer)); | 632 | memmove(&m_Peer,sin,sizeof(m_Peer)); |
633 | } | 633 | } |
634 | 634 | ||
635 | void CXferSocket::UpdateList() | 635 | void CXferSocket::UpdateList() |
636 | { | 636 | { |
637 | ASSERT(m_Daddy); | 637 | ASSERT(m_Daddy); |
638 | LV_FINDINFO lvf; | 638 | LV_FINDINFO lvf; |
639 | memset(&lvf,0,sizeof(lvf)); | 639 | memset(&lvf,0,sizeof(lvf)); |
640 | lvf.flags=LVFI_PARAM; | 640 | lvf.flags=LVFI_PARAM; |
641 | lvf.lParam=(LPARAM)this; | 641 | lvf.lParam=(LPARAM)this; |
642 | int i = m_Daddy->m_List.FindItem(&lvf); | 642 | int i = m_Daddy->m_List.FindItem(&lvf); |
643 | if(i<0){ | 643 | if(i<0){ |
644 | ASSERT(IsKindOf(RUNTIME_CLASS(CRRQSocket)) || IsKindOf(RUNTIME_CLASS(CWRQSocket))); | 644 | ASSERT(IsKindOf(RUNTIME_CLASS(CRRQSocket)) || IsKindOf(RUNTIME_CLASS(CWRQSocket))); |
645 | i=m_Daddy->m_List.InsertItem(0,m_FileName,IsKindOf(RUNTIME_CLASS(CRRQSocket))?m_Daddy->m_iRRQ:m_Daddy->m_iWRQ); | 645 | i=m_Daddy->m_List.InsertItem(0,m_FileName,IsKindOf(RUNTIME_CLASS(CRRQSocket))?m_Daddy->m_iRRQ:m_Daddy->m_iWRQ); |
646 | ASSERT(!(i<0)); | 646 | ASSERT(!(i<0)); |
647 | m_Daddy->m_List.SetItemData(i,(DWORD)this); | 647 | m_Daddy->m_List.SetItemData(i,(DWORD)this); |
648 | } | 648 | } |
649 | m_Daddy->m_List.SetItemText(i,CPumpKINDlg::subitemFile,m_FileName); | 649 | m_Daddy->m_List.SetItemText(i,CPumpKINDlg::subitemFile,m_FileName); |
650 | m_Daddy->m_List.SetItemText(i,CPumpKINDlg::subitemType,m_Type); | 650 | m_Daddy->m_List.SetItemText(i,CPumpKINDlg::subitemType,m_Type); |
651 | m_Daddy->m_List.SetItemText(i,CPumpKINDlg::subitemPeer,inet_ntoa(m_Peer.sin_addr)); | 651 | m_Daddy->m_List.SetItemText(i,CPumpKINDlg::subitemPeer,inet_ntoa(m_Peer.sin_addr)); |
652 | CString tmp; | 652 | CString tmp; |
653 | tmp.Format(IDS_FMT_BYTES,GetACK()); | 653 | tmp.Format(IDS_FMT_BYTES,GetACK()); |
654 | m_Daddy->m_List.SetItemText(i,CPumpKINDlg::subitemBytes,tmp); | 654 | m_Daddy->m_List.SetItemText(i,CPumpKINDlg::subitemBytes,tmp); |
655 | if(m_xferSize>=0){ | 655 | if(m_xferSize>=0){ |
656 | tmp.Format(IDS_FMT_BYTES,m_xferSize); | 656 | tmp.Format(IDS_FMT_BYTES,m_xferSize); |
657 | m_Daddy->m_List.SetItemText(i,CPumpKINDlg::subitemTSize,tmp); | 657 | m_Daddy->m_List.SetItemText(i,CPumpKINDlg::subitemTSize,tmp); |
658 | } | 658 | } |
659 | } | 659 | } |
660 | 660 | ||
661 | CXferSocket::CXferSocket() | 661 | CXferSocket::CXferSocket() |
662 | : m_wndResolver(NULL), m_Retry(NULL), m_bRetry(FALSE), | 662 | : m_wndResolver(NULL), m_Retry(NULL), m_bRetry(FALSE), |
663 | m_blkSize(512), m_timeOut(30), m_xferSize(-1), | 663 | m_blkSize(512), m_timeOut(30), m_xferSize(-1), |
664 | m__blkSize(512), m__timeOut(30) | 664 | m__blkSize(512), m__timeOut(30) |
665 | { | 665 | { |
666 | m_Daddy=NULL; | 666 | m_Daddy=NULL; |
667 | m_Peer.sin_addr.s_addr=INADDR_NONE; | 667 | m_Peer.sin_addr.s_addr=INADDR_NONE; |
668 | m_Peer.sin_family=AF_INET; | 668 | m_Peer.sin_family=AF_INET; |
669 | state=stateNone; | 669 | state=stateNone; |
670 | } | 670 | } |
671 | 671 | ||
672 | ULONG CXferSocket::GetACK() | 672 | ULONG CXferSocket::GetACK() |
673 | { | 673 | { |
674 | return 0; | 674 | return 0; |
675 | } | 675 | } |
676 | 676 | ||
677 | CXferSocket::CXferSocket(CPumpKINDlg *daddy,LPCTSTR fileName,LPCTSTR type,SOCKADDR_IN* sin) | 677 | CXferSocket::CXferSocket(CPumpKINDlg *daddy,LPCTSTR fileName,LPCTSTR type,SOCKADDR_IN* sin) |
678 | : m_wndResolver(NULL), m_Retry(NULL), m_bRetry(FALSE), | 678 | : m_wndResolver(NULL), m_Retry(NULL), m_bRetry(FALSE), |
679 | m_blkSize(512), m_timeOut(30), m_xferSize(-1), | 679 | m_blkSize(512), m_timeOut(30), m_xferSize(-1), |
680 | m__blkSize(512), m__timeOut(30) | 680 | m__blkSize(512), m__timeOut(30) |
681 | { | 681 | { |
682 | m_Peer.sin_family=AF_INET; | 682 | m_Peer.sin_family=AF_INET; |
683 | state=stateNone; | 683 | state=stateNone; |
684 | ASSERT(daddy); | 684 | ASSERT(daddy); |
685 | m_Daddy=daddy; | 685 | m_Daddy=daddy; |
686 | m_timeOut=m__timeOut=m_Daddy->m_TFTPTimeOut.GetTotalSeconds(); | 686 | m_timeOut=m__timeOut=m_Daddy->m_TFTPTimeOut.GetTotalSeconds(); |
687 | if(sin){ | 687 | if(sin){ |
688 | m_Peer.sin_addr.s_addr=sin->sin_addr.s_addr; | 688 | m_Peer.sin_addr.s_addr=sin->sin_addr.s_addr; |
689 | m_Peer.sin_port=sin->sin_port; | 689 | m_Peer.sin_port=sin->sin_port; |
690 | }else | 690 | }else |
691 | m_Peer.sin_addr.s_addr=INADDR_NONE; | 691 | m_Peer.sin_addr.s_addr=INADDR_NONE; |
692 | m_FileName=fileName; | 692 | m_FileName=fileName; |
693 | m_Type=type; | 693 | m_Type=type; |
694 | } | 694 | } |
695 | 695 | ||
696 | BOOL CRRQSocket::Create(LPCTSTR localFile,LPCTSTR hostName) | 696 | BOOL CRRQSocket::Create(LPCTSTR localFile,LPCTSTR hostName) |
697 | { | 697 | { |
698 | if(!CAsyncSocket::Create(0,SOCK_DGRAM)) | 698 | if(!CAsyncSocket::Create(0,SOCK_DGRAM)) |
699 | return FALSE; | 699 | return FALSE; |
700 | ASSERT(m_Daddy); | 700 | ASSERT(m_Daddy); |
701 | ASSERT(m_Peer.sin_addr.s_addr!=INADDR_NONE || hostName); | 701 | ASSERT(m_Peer.sin_addr.s_addr!=INADDR_NONE || hostName); |
702 | m_Daddy->m_Xfers[m_hSocket]=this; | 702 | m_Daddy->m_Xfers[m_hSocket]=this; |
703 | CString lFile = localFile?localFile:m_FileName; | 703 | CString lFile = localFile?localFile:m_FileName; |
704 | TurnSlashes(lFile,TRUE); | 704 | TurnSlashes(lFile,TRUE); |
705 | UpdateList(); | 705 | UpdateList(); |
706 | if(!localFile){// Check only for incoming requests | 706 | if(!localFile){// Check only for incoming requests |
707 | if(CheckBadRelativeness(m_FileName)){ | 707 | if(CheckBadRelativeness(m_FileName)){ |
708 | Deny(tftp::errAccessViolation,IDS_TFTP_ERROR_ACCESS); | 708 | Deny(tftp::errAccessViolation,IDS_TFTP_ERROR_ACCESS); |
709 | return TRUE; | 709 | return TRUE; |
710 | } | 710 | } |
711 | int atar=m_Daddy->m_aclRules.FindTarget(acl_rule::opRRQ,m_Peer.sin_addr.s_addr); | 711 | int atar=m_Daddy->m_aclRules.FindTarget(acl_rule::opRRQ,m_Peer.sin_addr.s_addr); |
712 | if(atar<0) | 712 | if(atar<0) |
713 | atar = m_Daddy->m_RRQMode; | 713 | atar = m_Daddy->m_RRQMode; |
714 | switch(atar){ | 714 | switch(atar){ |
715 | case CPumpKINDlg::rrqGiveAll: | 715 | case CPumpKINDlg::rrqGiveAll: |
716 | break; | 716 | break; |
717 | case CPumpKINDlg::rrqAlwaysConfirm: | 717 | case CPumpKINDlg::rrqAlwaysConfirm: |
718 | if(ConfirmRequest()) | 718 | if(ConfirmRequest()) |
719 | break; | 719 | break; |
720 | default: | 720 | default: |
721 | TRACE1("Unexpected access target: %d\n",atar); | 721 | TRACE1("Unexpected access target: %d\n",atar); |
722 | case CPumpKINDlg::rrqDenyAll: | 722 | case CPumpKINDlg::rrqDenyAll: |
723 | Deny(tftp::errAccessViolation,IDS_TFTP_ERROR_ACCESS); | 723 | Deny(tftp::errAccessViolation,IDS_TFTP_ERROR_ACCESS); |
724 | return TRUE; | 724 | return TRUE; |
725 | } | 725 | } |
726 | } | 726 | } |
727 | CString fn = localFile?ApplyRootGently(lFile):ApplyRoot(lFile); | 727 | CString fn = localFile?ApplyRootGently(lFile):ApplyRoot(lFile); |
728 | CFileException e; | 728 | CFileException e; |
729 | if(!m_File.Open(fn,CFile::modeRead|CFile::shareDenyWrite,&e)){ | 729 | if(!m_File.Open(fn,CFile::modeRead|CFile::shareDenyWrite,&e)){ |
730 | if(localFile){ | 730 | if(localFile){ |
731 | CString tmp; | 731 | CString tmp; |
732 | tmp.Format(IDS_LOG_FAILEDLOCALFILE,fn); | 732 | tmp.Format(IDS_LOG_FAILEDLOCALFILE,fn); |
733 | m_Daddy->LogLine(tmp); | 733 | m_Daddy->LogLine(tmp); |
734 | return FALSE; | 734 | return FALSE; |
735 | } | 735 | } |
736 | Deny(&e); | 736 | Deny(&e); |
737 | return TRUE; | 737 | return TRUE; |
738 | } | 738 | } |
739 | m_xferSize=m_File.GetLength();// *** HANDLE EXCEPTION | 739 | m_xferSize=m_File.GetLength();// *** HANDLE EXCEPTION |
740 | if(hostName){ | 740 | if(hostName){ |
741 | m_HostName=hostName; | 741 | m_HostName=hostName; |
742 | 742 | ||
743 | CString tmp; | 743 | CString tmp; |
744 | tmp.Format(IDS_LOG_SENDING,m_FileName,m_HostName); | 744 | tmp.Format(IDS_LOG_SENDING,m_FileName,m_HostName); |
745 | m_Daddy->LogLine(tmp); | 745 | m_Daddy->LogLine(tmp); |
746 | 746 | ||
747 | CString inAddr = hostName; | 747 | CString inAddr = hostName; |
748 | int at = inAddr.Find('@'); | 748 | int at = inAddr.Find('@'); |
749 | if(at>=0) | 749 | if(at>=0) |
750 | inAddr=inAddr.Mid(at+1); | 750 | inAddr=inAddr.Mid(at+1); |
751 | if((m_Peer.sin_addr.s_addr=inet_addr((LPCTSTR)inAddr))==INADDR_NONE){ | 751 | if((m_Peer.sin_addr.s_addr=inet_addr((LPCTSTR)inAddr))==INADDR_NONE){ |
752 | ASSERT(!m_wndResolver); | 752 | ASSERT(!m_wndResolver); |
753 | m_wndResolver = new CResolver(this); | 753 | m_wndResolver = new CResolver(this); |
754 | ASSERT(m_wndResolver); | 754 | ASSERT(m_wndResolver); |
755 | return m_wndResolver->Resolve(); | 755 | return m_wndResolver->Resolve(); |
756 | } | 756 | } |
757 | else | 757 | else |
758 | OnHostKnown(); | 758 | OnHostKnown(); |
759 | }else{ | 759 | }else{ |
760 | tftp::tftpOptions o; | 760 | tftp::tftpOptions o; |
761 | CString v; | 761 | CString v; |
762 | if(m_Options.Lookup(tftpoBSize,v)){ | 762 | if(m_Options.Lookup(tftpoBSize,v)){ |
763 | m__blkSize=atoi(v); | 763 | m__blkSize=atoi(v); |
764 | if(m__blkSize){ | 764 | if(m__blkSize){ |
765 | m_blkSize=m__blkSize; | 765 | m_blkSize=m__blkSize; |
766 | v.Format("%u",m_blkSize); | 766 | v.Format("%u",m_blkSize); |
767 | o[tftpoBSize]=v; | 767 | o[tftpoBSize]=v; |
768 | } | 768 | } |
769 | } | 769 | } |
770 | if(m_Options.Lookup(tftpoTSize,v)){ | 770 | if(m_Options.Lookup(tftpoTSize,v)){ |
771 | v.Format("%lu",m_xferSize); | 771 | v.Format("%lu",m_xferSize); |
772 | o[tftpoTSize]=v; | 772 | o[tftpoTSize]=v; |
773 | } | 773 | } |
774 | if(m_Options.Lookup(tftpoTOut,v)){ | 774 | if(m_Options.Lookup(tftpoTOut,v)){ |
775 | m__timeOut=atoi(v); | 775 | m__timeOut=atoi(v); |
776 | if(m__timeOut){ | 776 | if(m__timeOut){ |
777 | m_timeOut=m__timeOut; | 777 | m_timeOut=m__timeOut; |
778 | v.Format("%u",m_timeOut); | 778 | v.Format("%u",m_timeOut); |
779 | o[tftpoTOut]=v; | 779 | o[tftpoTOut]=v; |
780 | } | 780 | } |
781 | } | 781 | } |
782 | // XXX: see if we can enforce our preference regarding block size here. | 782 | // XXX: see if we can enforce our preference regarding block size here. |
783 | if(m_xferSize >= (m_blkSize<<16)) { | 783 | if(m_xferSize >= (m_blkSize<<16)) { |
784 | Deny(tftp::errUndefined,IDS_TFTP_ERROR_TOOBIG); | 784 | Deny(tftp::errUndefined,IDS_TFTP_ERROR_TOOBIG); |
785 | return TRUE; | 785 | return TRUE; |
786 | } | 786 | } |
787 | state = stateXfer; | 787 | state = stateXfer; |
788 | m_ACK=0; | 788 | m_ACK=0; |
789 | if(o.GetCount()){ | 789 | if(o.GetCount()){ |
790 | tftp *p = tftp::Allocate(tftp::tftpOACK::tftpSize(&o)); | 790 | tftp *p = tftp::Allocate(tftp::tftpOACK::tftpSize(&o)); |
791 | ASSERT(p); | 791 | ASSERT(p); |
792 | p->SetOpcode(tftp::opOACK); | 792 | p->SetOpcode(tftp::opOACK); |
793 | p->data.m_OACK.Set(&o); | 793 | p->data.m_OACK.Set(&o); |
794 | PostTFTP(p,TRUE); | 794 | PostTFTP(p,TRUE); |
795 | }else | 795 | }else |
796 | DoXfer(); | 796 | DoXfer(); |
797 | } | 797 | } |
798 | return TRUE; | 798 | return TRUE; |
799 | } | 799 | } |
800 | 800 | ||
801 | CRRQSocket::CRRQSocket(CPumpKINDlg *daddy,LPCTSTR fileName,LPCTSTR type,SOCKADDR_IN *sin) | 801 | CRRQSocket::CRRQSocket(CPumpKINDlg *daddy,LPCTSTR fileName,LPCTSTR type,SOCKADDR_IN *sin) |
802 | : CXferSocket(daddy,fileName,type,sin) | 802 | : CXferSocket(daddy,fileName,type,sin) |
803 | { | 803 | { |
804 | m_ACK=0; | 804 | m_ACK=0; |
805 | m_LastSlack=0; | 805 | m_LastSlack=0; |
806 | } | 806 | } |
807 | 807 | ||
808 | UINT tftp::tftpERROR::tftpSize(LPCTSTR msg) | 808 | UINT tftp::tftpERROR::tftpSize(LPCTSTR msg) |
809 | { | 809 | { |
810 | return tftpHdrSize-tftpSlackSize+sizeof(tftp::tftpERROR::tftpErrorCode)+strlen(msg)+1; | 810 | return tftpHdrSize-tftpSlackSize+sizeof(tftp::tftpERROR::tftpErrorCode)+strlen(msg)+1; |
811 | } | 811 | } |
812 | 812 | ||
813 | tftp* tftp::Allocate(UINT tftpSize) | 813 | tftp* tftp::Allocate(UINT tftpSize) |
814 | { | 814 | { |
815 | ASSERT(tftpSize); | 815 | ASSERT(tftpSize); |
816 | tftp* rv = (tftp*) new BYTE[tftpSlackSize+tftpSize]; | 816 | tftp* rv = (tftp*) new BYTE[tftpSlackSize+tftpSize]; |
817 | ASSERT(rv); | 817 | ASSERT(rv); |
818 | rv->length=tftpSize; | 818 | rv->length=tftpSize; |
819 | return rv; | 819 | return rv; |
820 | } | 820 | } |
821 | 821 | ||
822 | void tftp::errSet(UINT code,LPCTSTR msg) | 822 | void tftp::errSet(UINT code,LPCTSTR msg) |
823 | { | 823 | { |
824 | ASSERT(this); | 824 | ASSERT(this); |
825 | ASSERT(length>=data.m_ERROR.tftpSize(msg)); | 825 | ASSERT(length>=data.m_ERROR.tftpSize(msg)); |
826 | strcpy((char*)data.m_ERROR.data,msg); | 826 | strcpy((char*)data.m_ERROR.data,msg); |
827 | data.m_ERROR.SetCode(code); | 827 | data.m_ERROR.SetCode(code); |
828 | } | 828 | } |
829 | 829 | ||
830 | void CXferSocket::PostTFTP(tftp* p,BOOL retryable) | 830 | void CXferSocket::PostTFTP(tftp* p,BOOL retryable) |
831 | { | 831 | { |
832 | ASSERT(p); | 832 | ASSERT(p); |
833 | m_Queue.AddTail(p); | 833 | m_Queue.AddTail(p); |
834 | DoSelect(); | 834 | DoSelect(); |
835 | if(!m_bRetry){ | 835 | if(!m_bRetry){ |
836 | if(retryable) | 836 | if(retryable) |
837 | SetTry(p); | 837 | SetTry(p); |
838 | else | 838 | else |
839 | SetTry(); | 839 | SetTry(); |
840 | } | 840 | } |
841 | ResetTimeout(); | 841 | ResetTimeout(); |
842 | } | 842 | } |
843 | 843 | ||
844 | void CXferSocket::Deny(UINT errCode,UINT errID) | 844 | void CXferSocket::Deny(UINT errCode,UINT errID) |
845 | { | 845 | { |
846 | PostError(errCode,errID); | 846 | PostError(errCode,errID); |
847 | state=stateDeny; | 847 | state=stateDeny; |
848 | } | 848 | } |
849 | 849 | ||
850 | void CRRQSocket::DoXfer() | 850 | void CRRQSocket::DoXfer() |
851 | { | 851 | { |
852 | tftp *p = tftp::Allocate(tftp::tftpDATA::tftpSize(m_blkSize)); | 852 | tftp *p = tftp::Allocate(tftp::tftpDATA::tftpSize(m_blkSize)); |
853 | ASSERT(p); | 853 | ASSERT(p); |
854 | p->SetOpcode(tftp::opDATA); | 854 | p->SetOpcode(tftp::opDATA); |
855 | TRY{ | 855 | TRY{ |
856 | m_File.Seek(m_ACK*m_blkSize,CFile::begin); | 856 | m_File.Seek(m_ACK*m_blkSize,CFile::begin); |
857 | int bytes = m_File.Read(p->data.m_DATA.data,m_blkSize); | 857 | int bytes = m_File.Read(p->data.m_DATA.data,m_blkSize); |
858 | p->data.m_DATA.SetBlock(m_ACK+1); | 858 | p->data.m_DATA.SetBlock(m_ACK+1); |
859 | p->length=p->length-m_blkSize+bytes; | 859 | p->length=p->length-m_blkSize+bytes; |
860 | m_LastSlack = m_blkSize-bytes; | 860 | m_LastSlack = m_blkSize-bytes; |
861 | PostTFTP(p); | 861 | PostTFTP(p); |
862 | if(bytes<m_blkSize){ | 862 | if(bytes<m_blkSize){ |
863 | state=stateClosing; m_ACKtoClose = m_ACK+1; | 863 | state=stateClosing; m_ACKtoClose = m_ACK+1; |
864 | } | 864 | } |
865 | }CATCH(CFileException,e){ | 865 | }CATCH(CFileException,e){ |
866 | Deny(e); | 866 | Deny(e); |
867 | }END_CATCH | 867 | }END_CATCH |
868 | } | 868 | } |
869 | 869 | ||
870 | UINT tftp::tftpDATA::tftpSize(UINT blkSize) | 870 | UINT tftp::tftpDATA::tftpSize(UINT blkSize) |
871 | { | 871 | { |
872 | return tftpHdrSize-tftpSlackSize+sizeof(tftp::tftpDATA) | 872 | return tftpHdrSize-tftpSlackSize+sizeof(tftp::tftpDATA) |
873 | -sizeof(BYTE)+blkSize; | 873 | -sizeof(BYTE)+blkSize; |
874 | } | 874 | } |
875 | 875 | ||
876 | void CXferSocket::Deny(CFileException* e) | 876 | void CXferSocket::Deny(CFileException* e) |
877 | { | 877 | { |
878 | PostError(e); | 878 | PostError(e); |
879 | state=stateDeny; | 879 | state=stateDeny; |
880 | } | 880 | } |
881 | 881 | ||
882 | void CXferSocket::PostError(UINT errCode,UINT errID) | 882 | void CXferSocket::PostError(UINT errCode,UINT errID) |
883 | { | 883 | { |
884 | CString msg; | 884 | CString msg; |
885 | msg.LoadString(errID); | 885 | msg.LoadString(errID); |
886 | ASSERT(m_Daddy); | 886 | ASSERT(m_Daddy); |
887 | CString tmp; | 887 | CString tmp; |
888 | tmp.Format(IDS_LOG_SENTTFTPERROR,errCode,(LPCTSTR)msg); | 888 | tmp.Format(IDS_LOG_SENTTFTPERROR,errCode,(LPCTSTR)msg); |
889 | m_Daddy->LogLine(tmp); | 889 | m_Daddy->LogLine(tmp); |
890 | tftp* err = tftp::Allocate(tftp::tftpERROR::tftpSize(msg)); | 890 | tftp* err = tftp::Allocate(tftp::tftpERROR::tftpSize(msg)); |
891 | err->SetOpcode(tftp::opERROR); | 891 | err->SetOpcode(tftp::opERROR); |
892 | err->errSet(errCode,msg); | 892 | err->errSet(errCode,msg); |
893 | PostTFTP(err); | 893 | PostTFTP(err); |
894 | } | 894 | } |
895 | 895 | ||
896 | void CXferSocket::PostError(CFileException* e) | 896 | void CXferSocket::PostError(CFileException* e) |
897 | { | 897 | { |
898 | UINT eCode; | 898 | UINT eCode; |
899 | UINT eMsgID; | 899 | UINT eMsgID; |
900 | switch(e->m_cause){ | 900 | switch(e->m_cause){ |
901 | case CFileException::fileNotFound: | 901 | case CFileException::fileNotFound: |
902 | eCode=tftp::errNotFound; | 902 | eCode=tftp::errNotFound; |
903 | eMsgID=IDS_TFTP_ERROR_NOTFOUND; | 903 | eMsgID=IDS_TFTP_ERROR_NOTFOUND; |
904 | break; | 904 | break; |
905 | case CFileException::accessDenied: | 905 | case CFileException::accessDenied: |
906 | eCode=tftp::errAccessViolation; | 906 | eCode=tftp::errAccessViolation; |
907 | eMsgID=IDS_TFTP_ERROR_ACCESS; | 907 | eMsgID=IDS_TFTP_ERROR_ACCESS; |
908 | break; | 908 | break; |
909 | case CFileException::directoryFull: | 909 | case CFileException::directoryFull: |
910 | eCode=tftp::errDiskFull; | 910 | eCode=tftp::errDiskFull; |
911 | eMsgID=IDS_TFTP_ERROR_DIRFULL; | 911 | eMsgID=IDS_TFTP_ERROR_DIRFULL; |
912 | break; | 912 | break; |
913 | case CFileException::sharingViolation: | 913 | case CFileException::sharingViolation: |
914 | eCode=tftp::errAccessViolation; | 914 | eCode=tftp::errAccessViolation; |
915 | eMsgID=IDS_TFTP_ERROR_SHARING; | 915 | eMsgID=IDS_TFTP_ERROR_SHARING; |
916 | break; | 916 | break; |
917 | case CFileException::diskFull: | 917 | case CFileException::diskFull: |
918 | eCode=tftp::errDiskFull; | 918 | eCode=tftp::errDiskFull; |
919 | eMsgID=IDS_TFTP_ERROR_DISKFULL; | 919 | eMsgID=IDS_TFTP_ERROR_DISKFULL; |
920 | break; | 920 | break; |
921 | default: | 921 | default: |
922 | eCode=tftp::errUndefined; | 922 | eCode=tftp::errUndefined; |
923 | eMsgID=IDS_TFTP_ERROR_UNDEFINED; | 923 | eMsgID=IDS_TFTP_ERROR_UNDEFINED; |
924 | break; | 924 | break; |
925 | } | 925 | } |
926 | PostError(eCode,eMsgID); | 926 | PostError(eCode,eMsgID); |
927 | } | 927 | } |
928 | 928 | ||
929 | ULONG CRRQSocket::GetACK(void) | 929 | ULONG CRRQSocket::GetACK(void) |
930 | { | 930 | { |
931 | return (m_ACK*m_blkSize)-m_LastSlack; | 931 | return (m_ACK*m_blkSize)-m_LastSlack; |
932 | } | 932 | } |
933 | 933 | ||
934 | BOOL CRRQSocket::OnTFTP(tftp* p) | 934 | BOOL CRRQSocket::OnTFTP(tftp* p) |
935 | { | 935 | { |
936 | BOOL rv = TRUE; | 936 | BOOL rv = TRUE; |
937 | switch(p->Opcode()){ | 937 | switch(p->Opcode()){ |
938 | case tftp::opOACK: | 938 | case tftp::opOACK: |
939 | { | 939 | { |
940 | m_ACK=0; | 940 | m_ACK=0; |
941 | ASSERT(state!=stateFinish); | 941 | ASSERT(state!=stateFinish); |
942 | tftp::tftpOptions o; | 942 | tftp::tftpOptions o; |
943 | if(p->GetOptions(&o)){ | 943 | if(p->GetOptions(&o)){ |
944 | CString v; | 944 | CString v; |
945 | if(o.Lookup(tftpoBSize,v)){ | 945 | if(o.Lookup(tftpoBSize,v)){ |
946 | m_blkSize=atoi(v); | 946 | m_blkSize=atoi(v); |
947 | if(!m_blkSize){// *** More sanity checks | 947 | if(!m_blkSize){// *** More sanity checks |
948 | Deny(tftp::errOption,IDS_TFTP_ERROR_BSIZE); | 948 | Deny(tftp::errOption,IDS_TFTP_ERROR_BSIZE); |
949 | rv = TRUE; | 949 | rv = TRUE; |
950 | break; | 950 | break; |
951 | } | 951 | } |
952 | } | 952 | } |
953 | if(o.Lookup(tftpoTOut,v)){ | 953 | if(o.Lookup(tftpoTOut,v)){ |
954 | m_timeOut=atoi(v); | 954 | m_timeOut=atoi(v); |
955 | if(!m_timeOut){// *** More sanity checks | 955 | if(!m_timeOut){// *** More sanity checks |
956 | Deny(tftp::errOption,IDS_TFTP_ERROR_TOUT); | 956 | Deny(tftp::errOption,IDS_TFTP_ERROR_TOUT); |
957 | rv = TRUE; | 957 | rv = TRUE; |
958 | break; | 958 | break; |
959 | } | 959 | } |
960 | } | 960 | } |
961 | if(o.Lookup(tftpoXResume,v)){ | 961 | if(o.Lookup(tftpoXResume,v)){ |
962 | m_ACK=atoi(v); | 962 | m_ACK=atoi(v); |
963 | } | 963 | } |
964 | } | 964 | } |
965 | UpdateList(); | 965 | UpdateList(); |
966 | DoXfer(); | 966 | DoXfer(); |
967 | } | 967 | } |
968 | break; | 968 | break; |
969 | case tftp::opACK: | 969 | case tftp::opACK: |
970 | m_ACK=p->data.m_ACK.Block(); | 970 | m_ACK=p->data.m_ACK.Block(); |
971 | if(state==stateClosing && m_ACK==m_ACKtoClose) { | 971 | if(state==stateClosing && m_ACK==m_ACKtoClose) { |
972 | state = stateFinish; | 972 | state = stateFinish; |
973 | ASSERT(m_Daddy); | 973 | ASSERT(m_Daddy); |
974 | CString tmp; | 974 | CString tmp; |
975 | tmp.Format(IDS_LOG_XFERRRQFINISHED,(LPCTSTR)m_FileName); | 975 | tmp.Format(IDS_LOG_XFERRRQFINISHED,(LPCTSTR)m_FileName); |
976 | m_Daddy->LogLine(tmp); | 976 | m_Daddy->LogLine(tmp); |
977 | rv = FALSE; | 977 | rv = FALSE; |
978 | DoSelect(TRUE); | 978 | DoSelect(TRUE); |
979 | }else if(state!=stateFinish){ | 979 | }else if(state!=stateFinish){ |
980 | UpdateList(); | 980 | UpdateList(); |
981 | DoXfer(); | 981 | DoXfer(); |
982 | } | 982 | } |
983 | break; | 983 | break; |
984 | case tftp::opERROR: | 984 | case tftp::opERROR: |
985 | { | 985 | { |
986 | ASSERT(m_Daddy); | 986 | ASSERT(m_Daddy); |
987 | CString tmp; | 987 | CString tmp; |
988 | tmp.Format(IDS_LOG_GOTTFTPERROR,p->data.m_ERROR.Code(),(LPCTSTR)p->errMessage()); | 988 | tmp.Format(IDS_LOG_GOTTFTPERROR,p->data.m_ERROR.Code(),(LPCTSTR)p->errMessage()); |
989 | m_Daddy->LogLine(tmp); | 989 | m_Daddy->LogLine(tmp); |
990 | } | 990 | } |
991 | Destroy(FALSE); | 991 | Destroy(FALSE); |
992 | rv = FALSE; | 992 | rv = FALSE; |
993 | break; | 993 | break; |
994 | default: | 994 | default: |
995 | { | 995 | { |
996 | ASSERT(m_Daddy); | 996 | ASSERT(m_Daddy); |
997 | CString tmp; | 997 | CString tmp; |
998 | tmp.Format(IDS_LOG_XFEROPCODE,p->Opcode()); | 998 | tmp.Format(IDS_LOG_XFEROPCODE,p->Opcode()); |
999 | m_Daddy->LogLine(tmp); | 999 | m_Daddy->LogLine(tmp); |
1000 | // *** Self destruct maybe?? | 1000 | // *** Self destruct maybe?? |
1001 | } | 1001 | } |
1002 | break; | 1002 | break; |
1003 | } | 1003 | } |
1004 | return rv; | 1004 | return rv; |
1005 | } | 1005 | } |
1006 | 1006 | ||
1007 | BOOL CWRQSocket::OnTFTP(tftp* p) | 1007 | BOOL CWRQSocket::OnTFTP(tftp* p) |
1008 | { | 1008 | { |
1009 | switch(p->Opcode()){ | 1009 | switch(p->Opcode()){ |
1010 | case tftp::opOACK: | 1010 | case tftp::opOACK: |
1011 | ASSERT(state!=stateFinish); | 1011 | ASSERT(state!=stateFinish); |
1012 | { | 1012 | { |
1013 | if(m_bResume) | 1013 | if(m_bResume) |
1014 | m_ACK=m_File.GetLength()/m_blkSize; | 1014 | m_ACK=m_File.GetLength()/m_blkSize; |
1015 | else | 1015 | else |
1016 | m_ACK=0; | 1016 | m_ACK=0; |
1017 | tftp::tftpOptions o; | 1017 | tftp::tftpOptions o; |
1018 | if(p->GetOptions(&o)){ | 1018 | if(p->GetOptions(&o)){ |
1019 | CString v; | 1019 | CString v; |
1020 | if(o.Lookup(tftpoBSize,v)){ | 1020 | if(o.Lookup(tftpoBSize,v)){ |
1021 | m_blkSize=atoi(v); | 1021 | m_blkSize=atoi(v); |
1022 | if(!m_blkSize){// *** More sanity checks | 1022 | if(!m_blkSize){// *** More sanity checks |
1023 | Deny(tftp::errOption,IDS_TFTP_ERROR_BSIZE); | 1023 | Deny(tftp::errOption,IDS_TFTP_ERROR_BSIZE); |
1024 | return TRUE; | 1024 | return TRUE; |
1025 | } | 1025 | } |
1026 | } | 1026 | } |
1027 | if(o.Lookup(tftpoTOut,v)){ | 1027 | if(o.Lookup(tftpoTOut,v)){ |
1028 | m_timeOut=atoi(v); | 1028 | m_timeOut=atoi(v); |
1029 | if(!m_timeOut){// *** More sanity checks | 1029 | if(!m_timeOut){// *** More sanity checks |
1030 | Deny(tftp::errOption,IDS_TFTP_ERROR_TOUT); | 1030 | Deny(tftp::errOption,IDS_TFTP_ERROR_TOUT); |
1031 | return TRUE; | 1031 | return TRUE; |
1032 | } | 1032 | } |
1033 | } | 1033 | } |
1034 | if(o.Lookup(tftpoTSize,v)){ | 1034 | if(o.Lookup(tftpoTSize,v)){ |
1035 | m_xferSize=atoi(v); | 1035 | m_xferSize=atoi(v); |
1036 | } | 1036 | } |
1037 | if(m_xferSize>=0 && m_xferSize>=(m_blkSize<<16)) { | 1037 | if(m_xferSize>=0 && m_xferSize>=(m_blkSize<<16)) { |
1038 | Deny(tftp::errUndefined,IDS_TFTP_ERROR_TOOBIG); | 1038 | Deny(tftp::errUndefined,IDS_TFTP_ERROR_TOOBIG); |
1039 | return TRUE; | 1039 | return TRUE; |
1040 | } | 1040 | } |
1041 | } | 1041 | } |
1042 | UpdateList(); | 1042 | UpdateList(); |
1043 | DoXfer(); | 1043 | DoXfer(); |
1044 | } | 1044 | } |
1045 | break; | 1045 | break; |
1046 | case tftp::opDATA: | 1046 | case tftp::opDATA: |
1047 | { | 1047 | { |
1048 | UINTblock = p->data.m_DATA.Block(); | 1048 | UINTblock = p->data.m_DATA.Block(); |
1049 | TRY{ | 1049 | TRY{ |
1050 | m_File.Seek((block-1)*m_blkSize,CFile::begin); | 1050 | m_File.Seek((block-1)*m_blkSize,CFile::begin); |
1051 | int bytes = p->length-sizeof(p->data.m_DATA.block)-(tftpHdrSize-tftpSlackSize); | 1051 | int bytes = p->length-sizeof(p->data.m_DATA.block)-(tftpHdrSize-tftpSlackSize); |
1052 | if(bytes){ | 1052 | if(bytes){ |
1053 | m_File.Write(p->data.m_DATA.data,bytes); | 1053 | m_File.Write(p->data.m_DATA.data,bytes); |
1054 | // *** Move to the other place where we can do it not that often | 1054 | // *** Move to the other place where we can do it not that often |
1055 | m_File.SetLength(m_File.GetPosition()); | 1055 | m_File.SetLength(m_File.GetPosition()); |
1056 | } | 1056 | } |
1057 | if(bytes<m_blkSize){ | 1057 | if(bytes<m_blkSize){ |
1058 | state=stateFinish; | 1058 | state=stateFinish; |
1059 | ASSERT(m_Daddy); | 1059 | ASSERT(m_Daddy); |
1060 | CString tmp; | 1060 | CString tmp; |
1061 | tmp.Format(IDS_LOG_XFERWRQFINISHED,(LPCTSTR)m_FileName); | 1061 | tmp.Format(IDS_LOG_XFERWRQFINISHED,(LPCTSTR)m_FileName); |
1062 | m_Daddy->LogLine(tmp); | 1062 | m_Daddy->LogLine(tmp); |
1063 | } | 1063 | } |
1064 | m_ACK=block; | 1064 | m_ACK=block; |
1065 | m_LastSlack=m_blkSize-bytes; | 1065 | m_LastSlack=m_blkSize-bytes; |
1066 | UpdateList(); | 1066 | UpdateList(); |
1067 | DoXfer(); | 1067 | DoXfer(); |
1068 | }CATCH(CFileException,e){ | 1068 | }CATCH(CFileException,e){ |
1069 | Deny(e); | 1069 | Deny(e); |
1070 | }END_CATCH | 1070 | }END_CATCH |
1071 | } | 1071 | } |
1072 | break; | 1072 | break; |
1073 | case tftp::opERROR: | 1073 | case tftp::opERROR: |
1074 | { | 1074 | { |
1075 | ASSERT(m_Daddy); | 1075 | ASSERT(m_Daddy); |
1076 | CString tmp; | 1076 | CString tmp; |
1077 | tmp.Format(IDS_LOG_GOTTFTPERROR,p->data.m_ERROR.Code(),(LPCTSTR)p->errMessage()); | 1077 | tmp.Format(IDS_LOG_GOTTFTPERROR,p->data.m_ERROR.Code(),(LPCTSTR)p->errMessage()); |
1078 | m_Daddy->LogLine(tmp); | 1078 | m_Daddy->LogLine(tmp); |
1079 | } | 1079 | } |
1080 | Destroy(FALSE); | 1080 | Destroy(FALSE); |
1081 | return FALSE; | 1081 | return FALSE; |
1082 | default: | 1082 | default: |
1083 | { | 1083 | { |
1084 | ASSERT(m_Daddy); | 1084 | ASSERT(m_Daddy); |
1085 | CString tmp; | 1085 | CString tmp; |
1086 | tmp.Format(IDS_LOG_XFEROPCODE,p->Opcode()); | 1086 | tmp.Format(IDS_LOG_XFEROPCODE,p->Opcode()); |
1087 | m_Daddy->LogLine(tmp); | 1087 | m_Daddy->LogLine(tmp); |
1088 | // *** Self destruct maybe?? | 1088 | // *** Self destruct maybe?? |
1089 | } | 1089 | } |
1090 | break; | 1090 | break; |
1091 | } | 1091 | } |
1092 | return TRUE; | 1092 | return TRUE; |
1093 | } | 1093 | } |
1094 | 1094 | ||
1095 | void tftp::SetOpcode(WORD op) | 1095 | void tftp::SetOpcode(WORD op) |
1096 | { | 1096 | { |
1097 | opcode = REVERSEBYTES(op); | 1097 | opcode = REVERSEBYTES(op); |
1098 | } | 1098 | } |
1099 | void tftp::tftpDATA::SetBlock(WORD b) | 1099 | void tftp::tftpDATA::SetBlock(WORD b) |
1100 | { | 1100 | { |
1101 | block=REVERSEBYTES(b); | 1101 | block=REVERSEBYTES(b); |
1102 | } | 1102 | } |
1103 | WORD tftp::tftpDATA::Block() | 1103 | WORD tftp::tftpDATA::Block() |
1104 | { | 1104 | { |
1105 | return REVERSEBYTES(block); | 1105 | return REVERSEBYTES(block); |
1106 | } | 1106 | } |
1107 | WORD tftp::tftpACK::Block() | 1107 | WORD tftp::tftpACK::Block() |
1108 | { | 1108 | { |
1109 | return REVERSEBYTES(block); | 1109 | return REVERSEBYTES(block); |
1110 | } | 1110 | } |
1111 | void tftp::tftpACK::SetBlock(WORD b) | 1111 | void tftp::tftpACK::SetBlock(WORD b) |
1112 | { | 1112 | { |
1113 | block = REVERSEBYTES(b); | 1113 | block = REVERSEBYTES(b); |
1114 | } | 1114 | } |
1115 | WORD tftp::tftpERROR::Code() | 1115 | WORD tftp::tftpERROR::Code() |
1116 | { | 1116 | { |
1117 | return REVERSEBYTES(code); | 1117 | return REVERSEBYTES(code); |
1118 | } | 1118 | } |
1119 | void tftp::tftpERROR::SetCode(WORD c) | 1119 | void tftp::tftpERROR::SetCode(WORD c) |
1120 | { | 1120 | { |
1121 | code = REVERSEBYTES(c); | 1121 | code = REVERSEBYTES(c); |
1122 | } | 1122 | } |
1123 | 1123 | ||
1124 | 1124 | ||
1125 | CString tftp::errMessage() | 1125 | CString tftp::errMessage() |
1126 | { | 1126 | { |
1127 | CString rv; | 1127 | CString rv; |
1128 | if(memchr(data.m_ERROR.data,0,length-(tftpHdrSize-tftpSlackSize)-sizeof(data.m_ERROR.code))) | 1128 | if(memchr(data.m_ERROR.data,0,length-(tftpHdrSize-tftpSlackSize)-sizeof(data.m_ERROR.code))) |
1129 | rv = (LPCTSTR)data.m_ERROR.data; | 1129 | rv = (LPCTSTR)data.m_ERROR.data; |
1130 | return rv; | 1130 | return rv; |
1131 | } | 1131 | } |
1132 | 1132 | ||
1133 | void CXferSocket::Destroy(BOOL success) | 1133 | void CXferSocket::Destroy(BOOL success) |
1134 | { | 1134 | { |
1135 | if(m_wndResolver){ | 1135 | if(m_wndResolver){ |
1136 | delete m_wndResolver; | 1136 | delete m_wndResolver; |
1137 | m_wndResolver=NULL; | 1137 | m_wndResolver=NULL; |
1138 | } | 1138 | } |
1139 | SetTry(); | 1139 | SetTry(); |
1140 | m_Daddy->m_bnw.StartSound( | 1140 | m_Daddy->m_bnw.StartSound( |
1141 | success | 1141 | success |
1142 | ? m_Daddy->m_bnwSuccess | 1142 | ? m_Daddy->m_bnwSuccess |
1143 | : m_Daddy->m_bnwAbort | 1143 | : m_Daddy->m_bnwAbort |
1144 | ); | 1144 | ); |
1145 | if(m_File.m_hFile!=CFile::hFileNull){ | 1145 | if(m_File.m_hFile!=CFile::hFileNull){ |
1146 | TRY{ | 1146 | TRY{ |
1147 | m_File.Close(); | 1147 | m_File.Close(); |
1148 | }CATCH(CFileException,e){ | 1148 | }CATCH(CFileException,e){ |
1149 | TRACE0("Error closing file\n"); | 1149 | TRACE0("Error closing file\n"); |
1150 | }END_CATCH | 1150 | }END_CATCH |
1151 | } | 1151 | } |
1152 | ASSERT(m_Daddy); | 1152 | ASSERT(m_Daddy); |
1153 | m_Daddy->KillTimer(m_hSocket); | 1153 | m_Daddy->KillTimer(m_hSocket); |
1154 | m_Daddy->m_Xfers.RemoveKey(m_hSocket); | 1154 | m_Daddy->m_Xfers.RemoveKey(m_hSocket); |
1155 | LV_FINDINFO lvf; | 1155 | LV_FINDINFO lvf; |
1156 | memset(&lvf,0,sizeof(lvf)); | 1156 | memset(&lvf,0,sizeof(lvf)); |
1157 | lvf.flags=LVFI_PARAM; | 1157 | lvf.flags=LVFI_PARAM; |
1158 | lvf.lParam=(LPARAM)this; | 1158 | lvf.lParam=(LPARAM)this; |
1159 | int i = m_Daddy->m_List.FindItem(&lvf); | 1159 | int i = m_Daddy->m_List.FindItem(&lvf); |
1160 | if(i>=0) | 1160 | if(i>=0) |
1161 | m_Daddy->m_List.DeleteItem(i); | 1161 | m_Daddy->m_List.DeleteItem(i); |
1162 | delete this; | 1162 | delete this; |
1163 | } | 1163 | } |
1164 | 1164 | ||
1165 | void CPumpKINDlg::LogLineToScreen(LPCTSTR str) | 1165 | void CPumpKINDlg::LogLineToScreen(LPCTSTR str) |
1166 | { | 1166 | { |
1167 | ASSERT(m_LogLength); | 1167 | ASSERT(m_LogLength); |
1168 | while(m_Log.GetCount()>m_LogLength && m_Log.GetCount()!=LB_ERR){ | 1168 | while(m_Log.GetCount()>m_LogLength && m_Log.GetCount()!=LB_ERR){ |
1169 | CTime *t = (CTime*)m_Log.GetItemData(0); | 1169 | CTime *t = (CTime*)m_Log.GetItemData(0); |
1170 | if(((DWORD)t)!=LB_ERR){ | 1170 | if(((DWORD)t)!=LB_ERR){ |
1171 | ASSERT(t); | 1171 | ASSERT(t); |
1172 | m_LogTimes.RemoveKey(t); | 1172 | m_LogTimes.RemoveKey(t); |
1173 | delete t; | 1173 | delete t; |
1174 | } | 1174 | } |
1175 | m_Log.DeleteString(0); | 1175 | m_Log.DeleteString(0); |
1176 | } | 1176 | } |
1177 | int i = m_Log.AddString(str); | 1177 | int i = m_Log.AddString(str); |
1178 | ASSERT(i!=LB_ERR); | 1178 | ASSERT(i!=LB_ERR); |
1179 | CTime *t = new CTime(CTime::GetCurrentTime()); | 1179 | CTime *t = new CTime(CTime::GetCurrentTime()); |
1180 | m_Log.SetItemData(i,(DWORD)(m_LogTimes[t]=t)); | 1180 | m_Log.SetItemData(i,(DWORD)(m_LogTimes[t]=t)); |
1181 | m_Log.SetCurSel(i); | 1181 | m_Log.SetCurSel(i); |
1182 | } | 1182 | } |
1183 | 1183 | ||
1184 | void CPumpKINDlg::LogLine(UINT msgID) | 1184 | void CPumpKINDlg::LogLine(UINT msgID) |
1185 | { | 1185 | { |
1186 | CString tmp; | 1186 | CString tmp; |
1187 | tmp.Format(msgID); | 1187 | tmp.Format(msgID); |
1188 | LogLine(tmp); | 1188 | LogLine(tmp); |
1189 | } | 1189 | } |
1190 | 1190 | ||
1191 | void CXferSocket::TurnSlashes(CString& fn,BOOL bBack) | 1191 | void CXferSocket::TurnSlashes(CString& fn,BOOL bBack) |
1192 | { | 1192 | { |
1193 | ints = fn.Find(bBack?'/':'\\'); | 1193 | ints = fn.Find(bBack?'/':'\\'); |
1194 | while(s>=0){ | 1194 | while(s>=0){ |
1195 | fn.SetAt(s,bBack?'\\':'/'); | 1195 | fn.SetAt(s,bBack?'\\':'/'); |
1196 | s = fn.Find(bBack?'/':'\\'); | 1196 | s = fn.Find(bBack?'/':'\\'); |
1197 | } | 1197 | } |
1198 | } | 1198 | } |
1199 | 1199 | ||
1200 | CString CXferSocket::ApplyRoot(LPCTSTR fileName) | 1200 | CString CXferSocket::ApplyRoot(LPCTSTR fileName) |
1201 | { | 1201 | { |
1202 | ASSERT(m_Daddy); | 1202 | ASSERT(m_Daddy); |
1203 | CString fn = fileName; | 1203 | CString fn = fileName; |
1204 | CString rv = m_Daddy->m_TFTPRoot; | 1204 | CString rv = m_Daddy->m_TFTPRoot; |
1205 | if(rv.IsEmpty()) | 1205 | if(rv.IsEmpty()) |
1206 | rv = "."; | 1206 | rv = "."; |
1207 | if(rv[rv.GetLength()-1]!='\\') | 1207 | if(rv[rv.GetLength()-1]!='\\') |
1208 | rv+="\\"; | 1208 | rv+="\\"; |
1209 | while((!fn.IsEmpty()) && fn[0]=='\\') | 1209 | while((!fn.IsEmpty()) && fn[0]=='\\') |
1210 | fn=fn.Mid(1); | 1210 | fn=fn.Mid(1); |
1211 | rv+=fn; | 1211 | rv+=fn; |
1212 | return rv; | 1212 | return rv; |
1213 | } | 1213 | } |
1214 | 1214 | ||
1215 | void CPumpKINDlg::OnOptions() | 1215 | void CPumpKINDlg::OnOptions() |
1216 | { | 1216 | { |
1217 | CPropertySheet cps(IDS_TITLE_OPTIONS,this); | 1217 | CPropertySheet cps(IDS_TITLE_OPTIONS,this); |
1218 | CPropsServer server; | 1218 | CPropsServer server; |
1219 | CPropsNetwork network; | 1219 | CPropsNetwork network; |
1220 | CPropsSounds sounds; | 1220 | CPropsSounds sounds; |
1221 | CPropsACL acl; | 1221 | CPropsACL acl; |
1222 | 1222 | ||
1223 | server.m_RRQMode=m_RRQMode; | 1223 | server.m_RRQMode=m_RRQMode; |
1224 | server.m_TFTPRoot=m_TFTPRoot; | 1224 | server.m_TFTPRoot=m_TFTPRoot; |
1225 | server.m_TFTPSubdirs=m_bTFTPSubdirs; | 1225 | server.m_TFTPSubdirs=m_bTFTPSubdirs; |
1226 | server.m_WRQMode=m_WRQMode; | 1226 | server.m_WRQMode=m_WRQMode; |
1227 | server.m_PromptTimeOut=m_PromptTimeOut; | 1227 | server.m_PromptTimeOut=m_PromptTimeOut; |
1228 | server.m_LogFile=m_LogFile; | 1228 | server.m_LogFile=m_LogFile; |
1229 | 1229 | ||
1230 | network.m_ListenPort=m_ListenPort; | 1230 | network.m_ListenPort=m_ListenPort; |
1231 | network.m_ListenAddress=m_ListenAddress; | ||
1231 | network.m_SpeakPort=m_SpeakPort; | 1232 | network.m_SpeakPort=m_SpeakPort; |
1232 | network.m_TimeOut=m_TFTPTimeOut.GetTotalSeconds(); | 1233 | network.m_TimeOut=m_TFTPTimeOut.GetTotalSeconds(); |
1233 | network.m_BlockSize=m_BlockSize; | 1234 | network.m_BlockSize=m_BlockSize; |
1234 | 1235 | ||
1235 | sounds.m_Request = m_bnwRequest; | 1236 | sounds.m_Request = m_bnwRequest; |
1236 | sounds.m_Success = m_bnwSuccess; | 1237 | sounds.m_Success = m_bnwSuccess; |
1237 | sounds.m_Abort = m_bnwAbort; | 1238 | sounds.m_Abort = m_bnwAbort; |
1238 | 1239 | ||
1239 | acl.m_rulist = m_aclRules; | 1240 | acl.m_rulist = m_aclRules; |
1240 | 1241 | ||
1241 | cps.AddPage(&server); | 1242 | cps.AddPage(&server); |
1242 | cps.AddPage(&network); | 1243 | cps.AddPage(&network); |
1243 | cps.AddPage(&sounds); | 1244 | cps.AddPage(&sounds); |
1244 | cps.AddPage(&acl); | 1245 | cps.AddPage(&acl); |
1245 | if(cps.DoModal()==IDOK){ | 1246 | if(cps.DoModal()==IDOK){ |
1246 | m_RRQMode=server.m_RRQMode; | 1247 | m_RRQMode=server.m_RRQMode; |
1247 | m_TFTPRoot=server.m_TFTPRoot; | 1248 | m_TFTPRoot=server.m_TFTPRoot; |
1248 | m_bTFTPSubdirs=server.m_TFTPSubdirs; | 1249 | m_bTFTPSubdirs=server.m_TFTPSubdirs; |
1249 | m_WRQMode=server.m_WRQMode; | 1250 | m_WRQMode=server.m_WRQMode; |
1250 | m_PromptTimeOut=server.m_PromptTimeOut; | 1251 | m_PromptTimeOut=server.m_PromptTimeOut; |
1251 | m_LogFile=server.m_LogFile; | 1252 | m_LogFile=server.m_LogFile; |
1252 | 1253 | ||
1253 | m_ListenPort=network.m_ListenPort; | 1254 | m_ListenPort=network.m_ListenPort; |
1255 | m_ListenAddress=network.m_ListenAddress; | ||
1254 | m_SpeakPort=network.m_SpeakPort; | 1256 | m_SpeakPort=network.m_SpeakPort; |
1255 | m_TFTPTimeOut=CTimeSpan(network.m_TimeOut); | 1257 | m_TFTPTimeOut=CTimeSpan(network.m_TimeOut); |
1256 | m_BlockSize=network.m_BlockSize; | 1258 | m_BlockSize=network.m_BlockSize; |
1257 | 1259 | ||
1258 | m_bnwRequest = sounds.m_Request; | 1260 | m_bnwRequest = sounds.m_Request; |
1259 | m_bnwSuccess = sounds.m_Success; | 1261 | m_bnwSuccess = sounds.m_Success; |
1260 | m_bnwAbort = sounds.m_Abort; | 1262 | m_bnwAbort = sounds.m_Abort; |
1261 | 1263 | ||
1262 | m_aclRules = acl.m_rulist; | 1264 | m_aclRules = acl.m_rulist; |
1263 | 1265 | ||
1264 | m_lastlogerr.Empty(); | 1266 | m_lastlogerr.Empty(); |
1265 | } | 1267 | } |
1266 | } | 1268 | } |
1267 | 1269 | ||
1268 | BOOL CRRQSocket::ConfirmRequest() | 1270 | BOOL CRRQSocket::ConfirmRequest() |
1269 | { | 1271 | { |
1270 | CConfirmRRQDlg cd(NULL); | 1272 | CConfirmRRQDlg cd(NULL); |
1271 | cd.m_Daddy=this; | 1273 | cd.m_Daddy=this; |
1272 | cd.m_File=m_FileName; | 1274 | cd.m_File=m_FileName; |
1273 | cd.m_Host=inet_ntoa(m_Peer.sin_addr); | 1275 | cd.m_Host=inet_ntoa(m_Peer.sin_addr); |
1274 | if(cd.DoModal()==IDOK) | 1276 | if(cd.DoModal()==IDOK) |
1275 | return TRUE; | 1277 | return TRUE; |
1276 | return FALSE; | 1278 | return FALSE; |
1277 | } | 1279 | } |
1278 | 1280 | ||
1279 | CWRQSocket::CWRQSocket(CPumpKINDlg* daddy,LPCTSTR fileName,LPCTSTR type,SOCKADDR_IN *sin) | 1281 | CWRQSocket::CWRQSocket(CPumpKINDlg* daddy,LPCTSTR fileName,LPCTSTR type,SOCKADDR_IN *sin) |
1280 | : CXferSocket(daddy,fileName,type,sin) | 1282 | : CXferSocket(daddy,fileName,type,sin) |
1281 | { | 1283 | { |
1282 | state=stateNone; | 1284 | state=stateNone; |
1283 | m_ACK=0; | 1285 | m_ACK=0; |
1284 | m_LastSlack=0; | 1286 | m_LastSlack=0; |
1285 | m_bResume=FALSE; | 1287 | m_bResume=FALSE; |
1286 | } | 1288 | } |
1287 | 1289 | ||
1288 | BOOL CWRQSocket::Create(LPCTSTR localFile,LPCTSTR hostName) | 1290 | BOOL CWRQSocket::Create(LPCTSTR localFile,LPCTSTR hostName) |
1289 | { | 1291 | { |
1290 | if(!CAsyncSocket::Create(0,SOCK_DGRAM)) | 1292 | if(!CAsyncSocket::Create(0,SOCK_DGRAM)) |
1291 | return FALSE; | 1293 | return FALSE; |
1292 | ASSERT(m_Daddy); | 1294 | ASSERT(m_Daddy); |
1293 | ASSERT(m_Peer.sin_addr.s_addr!=INADDR_NONE || hostName); | 1295 | ASSERT(m_Peer.sin_addr.s_addr!=INADDR_NONE || hostName); |
1294 | m_Daddy->m_Xfers[m_hSocket]=this; | 1296 | m_Daddy->m_Xfers[m_hSocket]=this; |
1295 | UpdateList(); | 1297 | UpdateList(); |
1296 | CString lf; | 1298 | CString lf; |
1297 | if(!localFile) { | 1299 | if(!localFile) { |
1298 | lf = m_FileName; | 1300 | lf = m_FileName; |
1299 | TurnSlashes(lf,TRUE); | 1301 | TurnSlashes(lf,TRUE); |
1300 | } | 1302 | } |
1301 | CString fn = localFile?ApplyRootGently(localFile):ApplyRoot(lf); | 1303 | CString fn = localFile?ApplyRootGently(localFile):ApplyRoot(lf); |
1302 | if(!localFile){// This is an incoming request.. | 1304 | if(!localFile){// This is an incoming request.. |
1303 | if(CheckBadRelativeness(m_FileName)){ | 1305 | if(CheckBadRelativeness(m_FileName)){ |
1304 | Deny(tftp::errAccessViolation,IDS_TFTP_ERROR_ACCESS); | 1306 | Deny(tftp::errAccessViolation,IDS_TFTP_ERROR_ACCESS); |
1305 | return TRUE; | 1307 | return TRUE; |
1306 | } | 1308 | } |
1307 | BOOL exists; | 1309 | BOOL exists; |
1308 | if(!_access((LPCTSTR)fn,0)) | 1310 | if(!_access((LPCTSTR)fn,0)) |
1309 | m_Rename=exists=TRUE; | 1311 | m_Rename=exists=TRUE; |
1310 | else | 1312 | else |
1311 | m_Rename=exists=FALSE; | 1313 | m_Rename=exists=FALSE; |
1312 | int atar=m_Daddy->m_aclRules.FindTarget(acl_rule::opWRQ,m_Peer.sin_addr.s_addr); | 1314 | int atar=m_Daddy->m_aclRules.FindTarget(acl_rule::opWRQ,m_Peer.sin_addr.s_addr); |
1313 | if(atar<0) | 1315 | if(atar<0) |
1314 | atar=m_Daddy->m_WRQMode; | 1316 | atar=m_Daddy->m_WRQMode; |
1315 | switch(atar){ | 1317 | switch(atar){ |
1316 | case CPumpKINDlg::wrqTakeAll: | 1318 | case CPumpKINDlg::wrqTakeAll: |
1317 | if(exists){ | 1319 | if(exists){ |
1318 | if(!RenameFile(fn)){ | 1320 | if(!RenameFile(fn)){ |
1319 | Deny(tftp::errDiskFull,IDS_TFTP_ERROR_FAILEDTORENAME); | 1321 | Deny(tftp::errDiskFull,IDS_TFTP_ERROR_FAILEDTORENAME); |
1320 | return TRUE; | 1322 | return TRUE; |
1321 | } | 1323 | } |
1322 | } | 1324 | } |
1323 | break; | 1325 | break; |
1324 | case CPumpKINDlg::wrqConfirmIfExists: | 1326 | case CPumpKINDlg::wrqConfirmIfExists: |
1325 | if(!exists) | 1327 | if(!exists) |
1326 | break; | 1328 | break; |
1327 | case CPumpKINDlg::wrqAlwaysConfirm: | 1329 | case CPumpKINDlg::wrqAlwaysConfirm: |
1328 | if(exists) | 1330 | if(exists) |
1329 | m_bResume=TRUE; | 1331 | m_bResume=TRUE; |
1330 | if(ConfirmRequest()){ | 1332 | if(ConfirmRequest()){ |
1331 | if(m_Rename){ | 1333 | if(m_Rename){ |
1332 | RenameFile(fn); | 1334 | RenameFile(fn); |
1333 | if(SaveAs(fn)) | 1335 | if(SaveAs(fn)) |
1334 | break; | 1336 | break; |
1335 | }else | 1337 | }else |
1336 | break; | 1338 | break; |
1337 | } | 1339 | } |
1338 | default: | 1340 | default: |
1339 | TRACE1("Unexpected access target: %d\n",atar); | 1341 | TRACE1("Unexpected access target: %d\n",atar); |
1340 | case CPumpKINDlg::wrqDenyAll: | 1342 | case CPumpKINDlg::wrqDenyAll: |
1341 | Deny(tftp::errAccessViolation,IDS_TFTP_ERROR_ACCESS); | 1343 | Deny(tftp::errAccessViolation,IDS_TFTP_ERROR_ACCESS); |
1342 | return TRUE; | 1344 | return TRUE; |
1343 | } | 1345 | } |
1344 | } | 1346 | } |
1345 | CFileException e; | 1347 | CFileException e; |
1346 | if(!m_File.Open( | 1348 | if(!m_File.Open( |
1347 | fn, | 1349 | fn, |
1348 | m_bResume | 1350 | m_bResume |
1349 | ?(CFile::modeWrite|CFile::shareDenyWrite) | 1351 | ?(CFile::modeWrite|CFile::shareDenyWrite) |
1350 | :(CFile::modeCreate|CFile::modeWrite|CFile::shareDenyWrite), | 1352 | :(CFile::modeCreate|CFile::modeWrite|CFile::shareDenyWrite), |
1351 | &e | 1353 | &e |
1352 | )){ | 1354 | )){ |
1353 | if(localFile){// Outgoing request | 1355 | if(localFile){// Outgoing request |
1354 | CString tmp; | 1356 | CString tmp; |
1355 | tmp.Format(IDS_LOG_FAILEDTOOPEN,fn); | 1357 | tmp.Format(IDS_LOG_FAILEDTOOPEN,fn); |
1356 | m_Daddy->LogLine(tmp); | 1358 | m_Daddy->LogLine(tmp); |
1357 | return FALSE; | 1359 | return FALSE; |
1358 | }else{ | 1360 | }else{ |
1359 | Deny(&e); | 1361 | Deny(&e); |
1360 | return TRUE; | 1362 | return TRUE; |
1361 | } | 1363 | } |
1362 | } | 1364 | } |
1363 | if(hostName){ | 1365 | if(hostName){ |
1364 | m_HostName=hostName; | 1366 | m_HostName=hostName; |
1365 | 1367 | ||
1366 | CString tmp; | 1368 | CString tmp; |
1367 | tmp.Format(IDS_LOG_REQUESTING,m_FileName,m_HostName); | 1369 | tmp.Format(IDS_LOG_REQUESTING,m_FileName,m_HostName); |
1368 | m_Daddy->LogLine(tmp); | 1370 | m_Daddy->LogLine(tmp); |
1369 | 1371 | ||
1370 | CString inAddr = hostName; | 1372 | CString inAddr = hostName; |
1371 | int at = inAddr.Find('@'); | 1373 | int at = inAddr.Find('@'); |
1372 | if(at>=0) | 1374 | if(at>=0) |
1373 | inAddr=inAddr.Mid(at+1); | 1375 | inAddr=inAddr.Mid(at+1); |
1374 | if((m_Peer.sin_addr.s_addr=inet_addr((LPCTSTR)inAddr))==INADDR_NONE){ | 1376 | if((m_Peer.sin_addr.s_addr=inet_addr((LPCTSTR)inAddr))==INADDR_NONE){ |
1375 | ASSERT(!m_wndResolver); | 1377 | ASSERT(!m_wndResolver); |
1376 | m_wndResolver = new CResolver(this); | 1378 | m_wndResolver = new CResolver(this); |
1377 | ASSERT(m_wndResolver); | 1379 | ASSERT(m_wndResolver); |
1378 | return m_wndResolver->Resolve(); | 1380 | return m_wndResolver->Resolve(); |
1379 | }else{ | 1381 | }else{ |
1380 | OnHostKnown(); | 1382 | OnHostKnown(); |
1381 | return TRUE; | 1383 | return TRUE; |
1382 | } | 1384 | } |
1383 | } | 1385 | } |
1384 | CString v; | 1386 | CString v; |
1385 | tftp::tftpOptions oack; | 1387 | tftp::tftpOptions oack; |
1386 | if(m_Options.Lookup(tftpoTSize,v)){ | 1388 | if(m_Options.Lookup(tftpoTSize,v)){ |
1387 | m_xferSize=atol(v); | 1389 | m_xferSize=atol(v); |
1388 | if(!m_xferSize){ | 1390 | if(!m_xferSize){ |
1389 | Deny(tftp::errOption,IDS_TFTP_ERROR_TSIZE); | 1391 | Deny(tftp::errOption,IDS_TFTP_ERROR_TSIZE); |
1390 | return TRUE; | 1392 | return TRUE; |
1391 | } | 1393 | } |
1392 | } | 1394 | } |
1393 | if(m_Options.Lookup(tftpoBSize,v)){ | 1395 | if(m_Options.Lookup(tftpoBSize,v)){ |
1394 | m_blkSize=atoi(v); | 1396 | m_blkSize=atoi(v); |
1395 | if(!m_blkSize){// *** Do more about sanity check | 1397 | if(!m_blkSize){// *** Do more about sanity check |
1396 | Deny(tftp::errOption,IDS_TFTP_ERROR_BSIZE); | 1398 | Deny(tftp::errOption,IDS_TFTP_ERROR_BSIZE); |
1397 | return TRUE; | 1399 | return TRUE; |
1398 | } | 1400 | } |
1399 | v.Format("%u",m_blkSize); | 1401 | v.Format("%u",m_blkSize); |
1400 | oack[tftpoBSize]=v; | 1402 | oack[tftpoBSize]=v; |
1401 | } | 1403 | } |
1402 | if(m_Options.Lookup(tftpoTOut,v)){ | 1404 | if(m_Options.Lookup(tftpoTOut,v)){ |
1403 | m_timeOut=atoi(v); | 1405 | m_timeOut=atoi(v); |
1404 | if(!m_timeOut){// *** Do more about sanity check | 1406 | if(!m_timeOut){// *** Do more about sanity check |
1405 | Deny(tftp::errOption,IDS_TFTP_ERROR_TOUT); | 1407 | Deny(tftp::errOption,IDS_TFTP_ERROR_TOUT); |
1406 | return TRUE; | 1408 | return TRUE; |
1407 | } | 1409 | } |
1408 | v.Format("%u",m_timeOut); | 1410 | v.Format("%u",m_timeOut); |
1409 | oack[tftpoTOut]=v; | 1411 | oack[tftpoTOut]=v; |
1410 | } | 1412 | } |
1411 | if(m_Options.Lookup(tftpoXResume,v) && m_bResume){ | 1413 | if(m_Options.Lookup(tftpoXResume,v) && m_bResume){ |
1412 | m_ACK=m_File.GetLength()/m_blkSize; | 1414 | m_ACK=m_File.GetLength()/m_blkSize; |
1413 | v.Format("%u",m_ACK); | 1415 | v.Format("%u",m_ACK); |
1414 | oack[tftpoXResume]=v; | 1416 | oack[tftpoXResume]=v; |
1415 | }else | 1417 | }else |
1416 | m_ACK=0; | 1418 | m_ACK=0; |
1417 | // XXX: see if we can negotiate the right block size somehow | 1419 | // XXX: see if we can negotiate the right block size somehow |
1418 | if(m_xferSize>=0 && m_xferSize>=(m_blkSize<<16)) { | 1420 | if(m_xferSize>=0 && m_xferSize>=(m_blkSize<<16)) { |
1419 | Deny(tftp::errUndefined,IDS_TFTP_ERROR_TOOBIG); | 1421 | Deny(tftp::errUndefined,IDS_TFTP_ERROR_TOOBIG); |
1420 | return TRUE; | 1422 | return TRUE; |
1421 | } | 1423 | } |
1422 | state=stateXfer; | 1424 | state=stateXfer; |
1423 | if(oack.GetCount()){ | 1425 | if(oack.GetCount()){ |
1424 | tftp *p = tftp::Allocate(tftp::tftpOACK::tftpSize(&oack)); | 1426 | tftp *p = tftp::Allocate(tftp::tftpOACK::tftpSize(&oack)); |
1425 | ASSERT(p); | 1427 | ASSERT(p); |
1426 | p->SetOpcode(tftp::opOACK); | 1428 | p->SetOpcode(tftp::opOACK); |
1427 | p->data.m_OACK.Set(&oack); | 1429 | p->data.m_OACK.Set(&oack); |
1428 | PostTFTP(p,TRUE); | 1430 | PostTFTP(p,TRUE); |
1429 | }else | 1431 | }else |
1430 | DoXfer(); | 1432 | DoXfer(); |
1431 | return TRUE; | 1433 | return TRUE; |
1432 | } | 1434 | } |
1433 | 1435 | ||
1434 | BOOL CWRQSocket::ConfirmRequest() | 1436 | BOOL CWRQSocket::ConfirmRequest() |
1435 | { | 1437 | { |
1436 | CConfirmWRQDlg cd(NULL); | 1438 | CConfirmWRQDlg cd(NULL); |
1437 | cd.m_Daddy=this; | 1439 | cd.m_Daddy=this; |
1438 | cd.m_File=m_FileName; | 1440 | cd.m_File=m_FileName; |
1439 | cd.m_Host=inet_ntoa(m_Peer.sin_addr); | 1441 | cd.m_Host=inet_ntoa(m_Peer.sin_addr); |
1440 | switch(cd.DoModal()){ | 1442 | switch(cd.DoModal()){ |
1441 | case IDOK: | 1443 | case IDOK: |
1442 | m_Rename=FALSE; | 1444 | m_Rename=FALSE; |
1443 | m_bResume=FALSE; | 1445 | m_bResume=FALSE; |
1444 | return TRUE; | 1446 | return TRUE; |
1445 | case IDC_RENAME: | 1447 | case IDC_RENAME: |
1446 | m_bResume=FALSE; | 1448 | m_bResume=FALSE; |
1447 | m_Rename=TRUE; | 1449 | m_Rename=TRUE; |
1448 | return TRUE; | 1450 | return TRUE; |
1449 | case IDC_RESUME: | 1451 | case IDC_RESUME: |
1450 | m_Rename=FALSE; | 1452 | m_Rename=FALSE; |
1451 | m_bResume=TRUE; | 1453 | m_bResume=TRUE; |
1452 | return TRUE; | 1454 | return TRUE; |
1453 | case IDCANCEL: | 1455 | case IDCANCEL: |
1454 | return FALSE; | 1456 | return FALSE; |
1455 | } | 1457 | } |
1456 | return FALSE; | 1458 | return FALSE; |
1457 | } | 1459 | } |
1458 | 1460 | ||
1459 | BOOL CWRQSocket::RenameFile(CString& fn) | 1461 | BOOL CWRQSocket::RenameFile(CString& fn) |
1460 | { | 1462 | { |
1461 | CString renamed = fn; | 1463 | CString renamed = fn; |
1462 | if(fn.IsEmpty()) | 1464 | if(fn.IsEmpty()) |
1463 | return FALSE; | 1465 | return FALSE; |
1464 | if(fn[fn.GetLength()-1]==')'){ | 1466 | if(fn[fn.GetLength()-1]==')'){ |
1465 | int op = fn.ReverseFind('('); | 1467 | int op = fn.ReverseFind('('); |
1466 | if(op>0 && fn[op-1]==' '){ | 1468 | if(op>0 && fn[op-1]==' '){ |
1467 | if(fn.Mid(op+1,fn.GetLength()-op-2).SpanExcluding("0123456789").IsEmpty()) | 1469 | if(fn.Mid(op+1,fn.GetLength()-op-2).SpanExcluding("0123456789").IsEmpty()) |
1468 | renamed = renamed.Left(op-1); | 1470 | renamed = renamed.Left(op-1); |
1469 | } | 1471 | } |
1470 | } | 1472 | } |
1471 | CString testFN; | 1473 | CString testFN; |
1472 | for(UINT tmp=0;tmp<32768;tmp++){ | 1474 | for(UINT tmp=0;tmp<32768;tmp++){ |
1473 | testFN.Format("%s (%u)",(LPCTSTR)renamed,tmp); | 1475 | testFN.Format("%s (%u)",(LPCTSTR)renamed,tmp); |
1474 | if(!_access((LPCTSTR)testFN,0)) | 1476 | if(!_access((LPCTSTR)testFN,0)) |
1475 | continue; | 1477 | continue; |
1476 | fn=testFN; | 1478 | fn=testFN; |
1477 | return TRUE; | 1479 | return TRUE; |
1478 | } | 1480 | } |
1479 | return FALSE; | 1481 | return FALSE; |
1480 | } | 1482 | } |
1481 | 1483 | ||
1482 | BOOL CWRQSocket::SaveAs(CString& fn) | 1484 | BOOL CWRQSocket::SaveAs(CString& fn) |
1483 | { | 1485 | { |
1484 | CFileDialog cfd(FALSE,NULL,fn,OFN_EXPLORER|OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT|OFN_PATHMUSTEXIST,NULL,m_Daddy); | 1486 | CFileDialog cfd(FALSE,NULL,fn,OFN_EXPLORER|OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT|OFN_PATHMUSTEXIST,NULL,m_Daddy); |
1485 | CString title; | 1487 | CString title; |
1486 | title.LoadString(IDS_RENAME_TITLE); | 1488 | title.LoadString(IDS_RENAME_TITLE); |
1487 | cfd.m_ofn.lpstrTitle=(LPCTSTR)title; | 1489 | cfd.m_ofn.lpstrTitle=(LPCTSTR)title; |
1488 | if(cfd.DoModal()!=IDOK) | 1490 | if(cfd.DoModal()!=IDOK) |
1489 | return FALSE; | 1491 | return FALSE; |
1490 | fn = cfd.GetPathName(); | 1492 | fn = cfd.GetPathName(); |
1491 | return TRUE; | 1493 | return TRUE; |
1492 | } | 1494 | } |
1493 | 1495 | ||
1494 | void CWRQSocket::DoXfer() | 1496 | void CWRQSocket::DoXfer() |
1495 | { | 1497 | { |
1496 | tftp *p = tftp::Allocate(tftp::tftpACK::tftpSize()); | 1498 | tftp *p = tftp::Allocate(tftp::tftpACK::tftpSize()); |
1497 | ASSERT(p); | 1499 | ASSERT(p); |
1498 | p->SetOpcode(tftp::opACK); | 1500 | p->SetOpcode(tftp::opACK); |
1499 | p->data.m_ACK.SetBlock(m_ACK); | 1501 | p->data.m_ACK.SetBlock(m_ACK); |
1500 | TRACE1("WRQ-ACK-%u\n",m_ACK); | 1502 | TRACE1("WRQ-ACK-%u\n",m_ACK); |
1501 | PostTFTP(p,TRUE);// *** ??? Hope this is right | 1503 | PostTFTP(p,TRUE);// *** ??? Hope this is right |
1502 | } | 1504 | } |
1503 | 1505 | ||
1504 | UINT tftp::tftpACK::tftpSize() | 1506 | UINT tftp::tftpACK::tftpSize() |
1505 | { | 1507 | { |
1506 | return tftpHdrSize-tftpSlackSize+sizeof(tftp::tftpACK); | 1508 | return tftpHdrSize-tftpSlackSize+sizeof(tftp::tftpACK); |
1507 | } | 1509 | } |
1508 | 1510 | ||
1509 | ULONG CWRQSocket::GetACK() | 1511 | ULONG CWRQSocket::GetACK() |
1510 | { | 1512 | { |
1511 | return (m_ACK*m_blkSize)-m_LastSlack; | 1513 | return (m_ACK*m_blkSize)-m_LastSlack; |
1512 | } | 1514 | } |
1513 | 1515 | ||
1514 | void CXferSocket::ResetTimeout() | 1516 | void CXferSocket::ResetTimeout() |
1515 | { | 1517 | { |
1516 | ASSERT(m_Daddy); | 1518 | ASSERT(m_Daddy); |
1517 | m_Daddy->m_Retrier->KillTimer(m_hSocket); | 1519 | m_Daddy->m_Retrier->KillTimer(m_hSocket); |
1518 | if(m_Retry) | 1520 | if(m_Retry) |
1519 | m_Daddy->m_Retrier->SetTimer(m_hSocket,min(60,m_Daddy->m_RetryTimeOut.GetTotalSeconds())*1000,NULL); | 1521 | m_Daddy->m_Retrier->SetTimer(m_hSocket,min(60,m_Daddy->m_RetryTimeOut.GetTotalSeconds())*1000,NULL); |
1520 | if(!m_bRetry){ | 1522 | if(!m_bRetry){ |
1521 | m_Daddy->KillTimer(m_hSocket); | 1523 | m_Daddy->KillTimer(m_hSocket); |
1522 | m_Daddy->SetTimer(m_hSocket,min(60,m_timeOut)*1000,NULL); | 1524 | m_Daddy->SetTimer(m_hSocket,min(60,m_timeOut)*1000,NULL); |
1523 | } | 1525 | } |
1524 | } | 1526 | } |
1525 | 1527 | ||
1526 | void CXferSocket::Abort() | 1528 | void CXferSocket::Abort() |
1527 | { | 1529 | { |
1528 | ASSERT(m_Daddy); | 1530 | ASSERT(m_Daddy); |
1529 | CString tmp; | 1531 | CString tmp; |
1530 | tmp.Format(IDS_LOG_XFERABORTED,(LPCTSTR)m_FileName); | 1532 | tmp.Format(IDS_LOG_XFERABORTED,(LPCTSTR)m_FileName); |
1531 | m_Daddy->LogLine(tmp); | 1533 | m_Daddy->LogLine(tmp); |
1532 | Destroy(FALSE); | 1534 | Destroy(FALSE); |
1533 | } | 1535 | } |
1534 | 1536 | ||
1535 | void CPumpKINDlg::OnTimer(UINT nIDEvent) | 1537 | void CPumpKINDlg::OnTimer(UINT nIDEvent) |
1536 | { | 1538 | { |
1537 | CXferSocket *socket; | 1539 | CXferSocket *socket; |
1538 | if(m_Xfers.Lookup(nIDEvent,socket)){ | 1540 | if(m_Xfers.Lookup(nIDEvent,socket)){ |
1539 | CString tmp; | 1541 | CString tmp; |
1540 | tmp.Format(IDS_LOG_TIMEDOUT,socket->m_FileName); | 1542 | tmp.Format(IDS_LOG_TIMEDOUT,socket->m_FileName); |
1541 | LogLine(tmp); | 1543 | LogLine(tmp); |
1542 | socket->Abort(); | 1544 | socket->Abort(); |
1543 | }else{ | 1545 | }else{ |
1544 | TRACE0("Failed to find timed out socket!\n"); | 1546 | TRACE0("Failed to find timed out socket!\n"); |
1545 | } | 1547 | } |
1546 | CDialog::OnTimer(nIDEvent); | 1548 | CDialog::OnTimer(nIDEvent); |
1547 | } | 1549 | } |
1548 | 1550 | ||
1549 | void CPumpKINDlg::OnExit() | 1551 | void CPumpKINDlg::OnExit() |
1550 | { | 1552 | { |
1551 | if(!m_Xfers.IsEmpty()){ | 1553 | if(!m_Xfers.IsEmpty()){ |
1552 | CString title,text; | 1554 | CString title,text; |
1553 | title.LoadString(IDS_CONFIRMEXIT_TITLE); | 1555 | title.LoadString(IDS_CONFIRMEXIT_TITLE); |
1554 | text.LoadString(IDS_CONFIRMEXIT_TEXT); | 1556 | text.LoadString(IDS_CONFIRMEXIT_TEXT); |
1555 | if(MessageBox(text,title,MB_ICONQUESTION|MB_YESNO)!=IDYES) | 1557 | if(MessageBox(text,title,MB_ICONQUESTION|MB_YESNO)!=IDYES) |
1556 | return; | 1558 | return; |
1557 | } | 1559 | } |
1558 | m_bExiting=TRUE; | 1560 | m_bExiting=TRUE; |
1559 | EndDialog(IDOK); | 1561 | EndDialog(IDOK); |
1560 | } | 1562 | } |
1561 | 1563 | ||
1562 | void CPumpKINDlg::OnPut() | 1564 | void CPumpKINDlg::OnPut() |
1563 | { | 1565 | { |
1564 | CRequestDlg crd(NULL); | 1566 | CRequestDlg crd(NULL); |
1565 | crd.m_Put=TRUE; | 1567 | crd.m_Put=TRUE; |
1566 | crd.m_BSize=m_BlockSize; | 1568 | crd.m_BSize=m_BlockSize; |
1567 | if(crd.DoModal()==IDOK){ | 1569 | if(crd.DoModal()==IDOK){ |
1568 | CRRQSocket *socket = new CRRQSocket(this,crd.m_RemoteFile,crd.m_Type,NULL); | 1570 | CRRQSocket *socket = new CRRQSocket(this,crd.m_RemoteFile,crd.m_Type,NULL); |
1569 | if(crd.m_BSize) | 1571 | if(crd.m_BSize) |
1570 | socket->m__blkSize=crd.m_BSize; | 1572 | socket->m__blkSize=crd.m_BSize; |
1571 | if(!socket->Create(crd.m_LocalFile,crd.m_Host)) | 1573 | if(!socket->Create(crd.m_LocalFile,crd.m_Host)) |
1572 | socket->Destroy(); | 1574 | socket->Destroy(); |
1573 | } | 1575 | } |
1574 | } | 1576 | } |
1575 | 1577 | ||
1576 | void CPumpKINDlg::OnGet() | 1578 | void CPumpKINDlg::OnGet() |
1577 | { | 1579 | { |
1578 | CRequestDlg crd(NULL); | 1580 | CRequestDlg crd(NULL); |
1579 | crd.m_Put=FALSE; | 1581 | crd.m_Put=FALSE; |
1580 | crd.m_BSize=m_BlockSize; | 1582 | crd.m_BSize=m_BlockSize; |
1581 | if(crd.DoModal()==IDOK){ | 1583 | if(crd.DoModal()==IDOK){ |
1582 | CWRQSocket *socket = new CWRQSocket(this,crd.m_RemoteFile,crd.m_Type,NULL); | 1584 | CWRQSocket *socket = new CWRQSocket(this,crd.m_RemoteFile,crd.m_Type,NULL); |
1583 | if(crd.m_BSize) | 1585 | if(crd.m_BSize) |
1584 | socket->m__blkSize=crd.m_BSize; | 1586 | socket->m__blkSize=crd.m_BSize; |
1585 | if(!socket->Create(crd.m_LocalFile,crd.m_Host)) | 1587 | if(!socket->Create(crd.m_LocalFile,crd.m_Host)) |
1586 | socket->Destroy(); | 1588 | socket->Destroy(); |
1587 | } | 1589 | } |
1588 | } | 1590 | } |
1589 | 1591 | ||
1590 | void CPumpKINDlg::SetupButtons() | 1592 | void CPumpKINDlg::SetupButtons() |
1591 | { | 1593 | { |
1592 | m_AbortCtl.EnableWindow(m_List.GetSelectedCount()>0); | 1594 | m_AbortCtl.EnableWindow(m_List.GetSelectedCount()>0); |
1593 | } | 1595 | } |
1594 | 1596 | ||
1595 | void CPumpKINDlg::OnDeleteallitemsConnections(NMHDR* pNMHDR, LRESULT* pResult) | 1597 | void CPumpKINDlg::OnDeleteallitemsConnections(NMHDR* pNMHDR, LRESULT* pResult) |
1596 | { | 1598 | { |
1597 | NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR; | 1599 | NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR; |
1598 | SetupButtons(); | 1600 | SetupButtons(); |
1599 | *pResult = 0; | 1601 | *pResult = 0; |
1600 | } | 1602 | } |
1601 | 1603 | ||
1602 | void CPumpKINDlg::OnDeleteitemConnections(NMHDR* pNMHDR, LRESULT* pResult) | 1604 | void CPumpKINDlg::OnDeleteitemConnections(NMHDR* pNMHDR, LRESULT* pResult) |
1603 | { | 1605 | { |
1604 | NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR; | 1606 | NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR; |
1605 | SetupButtons(); | 1607 | SetupButtons(); |
1606 | *pResult = 0; | 1608 | *pResult = 0; |
1607 | } | 1609 | } |
1608 | 1610 | ||
1609 | void CPumpKINDlg::OnInsertitemConnections(NMHDR* pNMHDR, LRESULT* pResult) | 1611 | void CPumpKINDlg::OnInsertitemConnections(NMHDR* pNMHDR, LRESULT* pResult) |
1610 | { | 1612 | { |
1611 | NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR; | 1613 | NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR; |
1612 | SetupButtons(); | 1614 | SetupButtons(); |
1613 | *pResult = 0; | 1615 | *pResult = 0; |
1614 | } | 1616 | } |
1615 | 1617 | ||
1616 | void CPumpKINDlg::OnItemchangedConnections(NMHDR* pNMHDR, LRESULT* pResult) | 1618 | void CPumpKINDlg::OnItemchangedConnections(NMHDR* pNMHDR, LRESULT* pResult) |
1617 | { | 1619 | { |
1618 | NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR; | 1620 | NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR; |
1619 | SetupButtons(); | 1621 | SetupButtons(); |
1620 | *pResult = 0; | 1622 | *pResult = 0; |
1621 | } | 1623 | } |
1622 | 1624 | ||
1623 | void CPumpKINDlg::OnAbort() | 1625 | void CPumpKINDlg::OnAbort() |
1624 | { | 1626 | { |
1625 | if(!m_List.GetSelectedCount()) | 1627 | if(!m_List.GetSelectedCount()) |
1626 | return; | 1628 | return; |
1627 | intitems = m_List.GetItemCount(); | 1629 | intitems = m_List.GetItemCount(); |
1628 | for(int tmp=0;tmp<items;tmp++){ | 1630 | for(int tmp=0;tmp<items;tmp++){ |
1629 | if(!(m_List.GetItemState(tmp,LVIS_SELECTED)&LVIS_SELECTED)) | 1631 | if(!(m_List.GetItemState(tmp,LVIS_SELECTED)&LVIS_SELECTED)) |
1630 | continue; | 1632 | continue; |
1631 | CXferSocket *xfer = (CXferSocket*) m_List.GetItemData(tmp); | 1633 | CXferSocket *xfer = (CXferSocket*) m_List.GetItemData(tmp); |
1632 | ASSERT(xfer); | 1634 | ASSERT(xfer); |
1633 | xfer->Abort(); | 1635 | xfer->Abort(); |
1634 | } | 1636 | } |
1635 | } | 1637 | } |
1636 | 1638 | ||
1637 | void CXferSocket::OnFailedToResolve() | 1639 | void CXferSocket::OnFailedToResolve() |
1638 | { | 1640 | { |
1639 | TRACE0("Resolve failed\n"); | 1641 | TRACE0("Resolve failed\n"); |
1640 | delete m_wndResolver; | 1642 | delete m_wndResolver; |
1641 | m_wndResolver=NULL; | 1643 | m_wndResolver=NULL; |
1642 | ASSERT(m_Daddy); | 1644 | ASSERT(m_Daddy); |
1643 | CString tmp; | 1645 | CString tmp; |
1644 | tmp.Format(IDS_LOG_RESOLVEFAILED,m_HostName); | 1646 | tmp.Format(IDS_LOG_RESOLVEFAILED,m_HostName); |
1645 | m_Daddy->LogLine(tmp); | 1647 | m_Daddy->LogLine(tmp); |
1646 | Abort(); | 1648 | Abort(); |
1647 | } | 1649 | } |
1648 | 1650 | ||
1649 | void CXferSocket::OnResolved() | 1651 | void CXferSocket::OnResolved() |
1650 | { | 1652 | { |
1651 | delete m_wndResolver; | 1653 | delete m_wndResolver; |
1652 | m_wndResolver=NULL; | 1654 | m_wndResolver=NULL; |
1653 | TRACE0("Resolved\n"); | 1655 | TRACE0("Resolved\n"); |
1654 | m_Peer.sin_addr.s_addr = *(DWORD*)(((hostent*)m_ResolveBuff)->h_addr); | 1656 | m_Peer.sin_addr.s_addr = *(DWORD*)(((hostent*)m_ResolveBuff)->h_addr); |
1655 | } | 1657 | } |
1656 | 1658 | ||
1657 | void CRRQSocket::OnResolved() | 1659 | void CRRQSocket::OnResolved() |
1658 | { | 1660 | { |
1659 | CXferSocket::OnResolved(); | 1661 | CXferSocket::OnResolved(); |
1660 | OnHostKnown(); | 1662 | OnHostKnown(); |
1661 | } | 1663 | } |
1662 | 1664 | ||
1663 | void CRRQSocket::OnHostKnown() | 1665 | void CRRQSocket::OnHostKnown() |
1664 | { | 1666 | { |
1665 | ASSERT(m_Daddy); | 1667 | ASSERT(m_Daddy); |
1666 | m_Peer.sin_port=htons(m_Daddy->m_SpeakPort); | 1668 | m_Peer.sin_port=htons(m_Daddy->m_SpeakPort); |
1667 | tftp::tftpOptions o; | 1669 | tftp::tftpOptions o; |
1668 | CString v; | 1670 | CString v; |
1669 | ASSERT(m_xferSize>=0); | 1671 | ASSERT(m_xferSize>=0); |
1670 | v.Format("%lu",m_xferSize); | 1672 | v.Format("%lu",m_xferSize); |
1671 | o[tftpoTSize] = v; | 1673 | o[tftpoTSize] = v; |
1672 | ASSERT(m__blkSize); | 1674 | ASSERT(m__blkSize); |
1673 | v.Format("%u",m__blkSize); | 1675 | v.Format("%u",m__blkSize); |
1674 | o[tftpoBSize] = v; | 1676 | o[tftpoBSize] = v; |
1675 | ASSERT(m__timeOut); | 1677 | ASSERT(m__timeOut); |
1676 | v.Format("%u",m__timeOut); | 1678 | v.Format("%u",m__timeOut); |
1677 | o[tftpoTOut] = v; | 1679 | o[tftpoTOut] = v; |
1678 | o[tftpoXResume] = "0"; | 1680 | o[tftpoXResume] = "0"; |
1679 | tftp*p = tftp::Allocate(tftp::tftpWRQ::tftpSize(m_FileName,m_Type,&o)); | 1681 | tftp*p = tftp::Allocate(tftp::tftpWRQ::tftpSize(m_FileName,m_Type,&o)); |
1680 | ASSERT(p); | 1682 | ASSERT(p); |
1681 | p->SetOpcode(tftp::opWRQ); | 1683 | p->SetOpcode(tftp::opWRQ); |
1682 | p->data.m_WRQ.Set(m_FileName,m_Type,&o); | 1684 | p->data.m_WRQ.Set(m_FileName,m_Type,&o); |
1683 | PostTFTP(p,TRUE); | 1685 | PostTFTP(p,TRUE); |
1684 | state=stateInit; | 1686 | state=stateInit; |
1685 | UpdateList(); | 1687 | UpdateList(); |
1686 | } | 1688 | } |
1687 | 1689 | ||
1688 | UINT tftp::tftpRQ::tftpSize(LPCTSTR file,LPCTSTR type,tftp::tftpOptions* ops) | 1690 | UINT tftp::tftpRQ::tftpSize(LPCTSTR file,LPCTSTR type,tftp::tftpOptions* ops) |
1689 | { | 1691 | { |
1690 | UINT rv = tftpHdrSize-tftpSlackSize+strlen(file)+1+strlen(type)+1; | 1692 | UINT rv = tftpHdrSize-tftpSlackSize+strlen(file)+1+strlen(type)+1; |
1691 | if(ops){ | 1693 | if(ops){ |
1692 | tftpOptions& o = *ops; | 1694 | tftpOptions& o = *ops; |
1693 | POSITION p = o.GetStartPosition(); | 1695 | POSITION p = o.GetStartPosition(); |
1694 | while(p){ | 1696 | while(p){ |
1695 | CString n,v; | 1697 | CString n,v; |
1696 | o.GetNextAssoc(p,n,v); | 1698 | o.GetNextAssoc(p,n,v); |
1697 | rv+=n.GetLength()+1+v.GetLength()+1; | 1699 | rv+=n.GetLength()+1+v.GetLength()+1; |
1698 | } | 1700 | } |
1699 | } | 1701 | } |
1700 | return rv; | 1702 | return rv; |
1701 | } | 1703 | } |
1702 | UINT tftp::tftpRRQ::tftpSize(LPCTSTR file,LPCTSTR type,tftp::tftpOptions* ops) | 1704 | UINT tftp::tftpRRQ::tftpSize(LPCTSTR file,LPCTSTR type,tftp::tftpOptions* ops) |
1703 | { | 1705 | { |
1704 | return tftp::tftpRQ::tftpSize(file,type,ops); | 1706 | return tftp::tftpRQ::tftpSize(file,type,ops); |
1705 | } | 1707 | } |
1706 | UINT tftp::tftpWRQ::tftpSize(LPCTSTR file,LPCTSTR type,tftp::tftpOptions* ops) | 1708 | UINT tftp::tftpWRQ::tftpSize(LPCTSTR file,LPCTSTR type,tftp::tftpOptions* ops) |
1707 | { | 1709 | { |
1708 | return tftp::tftpRQ::tftpSize(file,type,ops); | 1710 | return tftp::tftpRQ::tftpSize(file,type,ops); |
1709 | } | 1711 | } |
1710 | UINT tftp::tftpOACK::tftpSize(tftp::tftpOptions* ops) | 1712 | UINT tftp::tftpOACK::tftpSize(tftp::tftpOptions* ops) |
1711 | { | 1713 | { |
1712 | UINT rv = tftpHdrSize-tftpSlackSize; | 1714 | UINT rv = tftpHdrSize-tftpSlackSize; |
1713 | if(ops){ | 1715 | if(ops){ |
1714 | tftpOptions& o = *ops; | 1716 | tftpOptions& o = *ops; |
1715 | POSITION p = o.GetStartPosition(); | 1717 | POSITION p = o.GetStartPosition(); |
1716 | while(p){ | 1718 | while(p){ |
1717 | CString n,v; | 1719 | CString n,v; |
1718 | o.GetNextAssoc(p,n,v); | 1720 | o.GetNextAssoc(p,n,v); |
1719 | rv+=n.GetLength()+1+v.GetLength()+1; | 1721 | rv+=n.GetLength()+1+v.GetLength()+1; |
1720 | } | 1722 | } |
1721 | } | 1723 | } |
1722 | return rv; | 1724 | return rv; |
1723 | } | 1725 | } |
1724 | void tftp::tftpRQ::Set(LPCTSTR file,LPCTSTR type,tftp::tftpOptions* ops) | 1726 | void tftp::tftpRQ::Set(LPCTSTR file,LPCTSTR type,tftp::tftpOptions* ops) |
1725 | { | 1727 | { |
1726 | // MAY BE DANGEROUS! | 1728 | // MAY BE DANGEROUS! |
1727 | UINT ptr = 0; | 1729 | UINT ptr = 0; |
1728 | strcpy((LPTSTR)&data[ptr],file); ptr+=strlen(file)+1; | 1730 | strcpy((LPTSTR)&data[ptr],file); ptr+=strlen(file)+1; |
1729 | strcpy((LPTSTR)&data[ptr],type); ptr+=strlen(type)+1; | 1731 | strcpy((LPTSTR)&data[ptr],type); ptr+=strlen(type)+1; |
1730 | if(ops){ | 1732 | if(ops){ |
1731 | tftpOptions& o = *ops; | 1733 | tftpOptions& o = *ops; |
1732 | POSITION p = o.GetStartPosition(); | 1734 | POSITION p = o.GetStartPosition(); |
1733 | while(p){ | 1735 | while(p){ |
1734 | CString n,v; | 1736 | CString n,v; |
1735 | o.GetNextAssoc(p,n,v); | 1737 | o.GetNextAssoc(p,n,v); |
1736 | strcpy((LPTSTR)&data[ptr],(LPCTSTR)n); ptr+=n.GetLength()+1; | 1738 | strcpy((LPTSTR)&data[ptr],(LPCTSTR)n); ptr+=n.GetLength()+1; |
1737 | strcpy((LPTSTR)&data[ptr],(LPCTSTR)v); ptr+=v.GetLength()+1; | 1739 | strcpy((LPTSTR)&data[ptr],(LPCTSTR)v); ptr+=v.GetLength()+1; |
1738 | } | 1740 | } |
1739 | } | 1741 | } |
1740 | } | 1742 | } |
1741 | void tftp::tftpRRQ::Set(LPCTSTR file,LPCTSTR type,tftp::tftpOptions* ops) | 1743 | void tftp::tftpRRQ::Set(LPCTSTR file,LPCTSTR type,tftp::tftpOptions* ops) |
1742 | { | 1744 | { |
1743 | // MAY BE DANGEROUS! | 1745 | // MAY BE DANGEROUS! |
1744 | UINT ptr = 0; | 1746 | UINT ptr = 0; |
1745 | strcpy((LPTSTR)&data[ptr],file); ptr+=strlen(file)+1; | 1747 | strcpy((LPTSTR)&data[ptr],file); ptr+=strlen(file)+1; |
1746 | strcpy((LPTSTR)&data[ptr],type); ptr+=strlen(type)+1; | 1748 | strcpy((LPTSTR)&data[ptr],type); ptr+=strlen(type)+1; |
1747 | if(ops){ | 1749 | if(ops){ |
1748 | tftpOptions& o = *ops; | 1750 | tftpOptions& o = *ops; |
1749 | POSITION p = o.GetStartPosition(); | 1751 | POSITION p = o.GetStartPosition(); |
1750 | while(p){ | 1752 | while(p){ |
1751 | CString n,v; | 1753 | CString n,v; |
1752 | o.GetNextAssoc(p,n,v); | 1754 | o.GetNextAssoc(p,n,v); |
1753 | strcpy((LPTSTR)&data[ptr],(LPCTSTR)n); ptr+=n.GetLength()+1; | 1755 | strcpy((LPTSTR)&data[ptr],(LPCTSTR)n); ptr+=n.GetLength()+1; |
1754 | strcpy((LPTSTR)&data[ptr],(LPCTSTR)v); ptr+=v.GetLength()+1; | 1756 | strcpy((LPTSTR)&data[ptr],(LPCTSTR)v); ptr+=v.GetLength()+1; |
1755 | } | 1757 | } |
1756 | } | 1758 | } |
1757 | } | 1759 | } |
1758 | void tftp::tftpWRQ::Set(LPCTSTR file,LPCTSTR type,tftp::tftpOptions* ops) | 1760 | void tftp::tftpWRQ::Set(LPCTSTR file,LPCTSTR type,tftp::tftpOptions* ops) |
1759 | { | 1761 | { |
1760 | // MAY BE DANGEROUS! | 1762 | // MAY BE DANGEROUS! |
1761 | UINT ptr = 0; | 1763 | UINT ptr = 0; |
1762 | strcpy((LPTSTR)&data[ptr],file); ptr+=strlen(file)+1; | 1764 | strcpy((LPTSTR)&data[ptr],file); ptr+=strlen(file)+1; |
1763 | strcpy((LPTSTR)&data[ptr],type); ptr+=strlen(type)+1; | 1765 | strcpy((LPTSTR)&data[ptr],type); ptr+=strlen(type)+1; |
1764 | if(ops){ | 1766 | if(ops){ |
1765 | tftpOptions& o = *ops; | 1767 | tftpOptions& o = *ops; |
1766 | POSITION p = o.GetStartPosition(); | 1768 | POSITION p = o.GetStartPosition(); |
1767 | while(p){ | 1769 | while(p){ |
1768 | CString n,v; | 1770 | CString n,v; |
1769 | o.GetNextAssoc(p,n,v); | 1771 | o.GetNextAssoc(p,n,v); |
1770 | strcpy((LPTSTR)&data[ptr],(LPCTSTR)n); ptr+=n.GetLength()+1; | 1772 | strcpy((LPTSTR)&data[ptr],(LPCTSTR)n); ptr+=n.GetLength()+1; |
1771 | strcpy((LPTSTR)&data[ptr],(LPCTSTR)v); ptr+=v.GetLength()+1; | 1773 | strcpy((LPTSTR)&data[ptr],(LPCTSTR)v); ptr+=v.GetLength()+1; |
1772 | } | 1774 | } |
1773 | } | 1775 | } |
1774 | } | 1776 | } |
1775 | void tftp::tftpOACK::Set(tftpOptions* ops) | 1777 | void tftp::tftpOACK::Set(tftpOptions* ops) |
1776 | { | 1778 | { |
1777 | ASSERT(ops); | 1779 | ASSERT(ops); |
1778 | UINT ptr = 0; | 1780 | UINT ptr = 0; |
1779 | tftpOptions& o = *ops; | 1781 | tftpOptions& o = *ops; |
1780 | POSITION p = o.GetStartPosition(); | 1782 | POSITION p = o.GetStartPosition(); |
1781 | while(p){ | 1783 | while(p){ |
1782 | CString n,v; | 1784 | CString n,v; |
1783 | o.GetNextAssoc(p,n,v); | 1785 | o.GetNextAssoc(p,n,v); |
1784 | strcpy((LPTSTR)&data[ptr],(LPCTSTR)n); ptr+=n.GetLength()+1; | 1786 | strcpy((LPTSTR)&data[ptr],(LPCTSTR)n); ptr+=n.GetLength()+1; |
1785 | strcpy((LPTSTR)&data[ptr],(LPCTSTR)v); ptr+=v.GetLength()+1; | 1787 | strcpy((LPTSTR)&data[ptr],(LPCTSTR)v); ptr+=v.GetLength()+1; |
1786 | } | 1788 | } |
1787 | } | 1789 | } |
1788 | 1790 | ||
1789 | void CWRQSocket::OnResolved() | 1791 | void CWRQSocket::OnResolved() |
1790 | { | 1792 | { |
1791 | CXferSocket::OnResolved(); | 1793 | CXferSocket::OnResolved(); |
1792 | OnHostKnown(); | 1794 | OnHostKnown(); |
1793 | } | 1795 | } |
1794 | 1796 | ||
1795 | void CWRQSocket::OnHostKnown() | 1797 | void CWRQSocket::OnHostKnown() |
1796 | { | 1798 | { |
1797 | ASSERT(m_Daddy); | 1799 | ASSERT(m_Daddy); |
1798 | m_Peer.sin_port=htons(m_Daddy->m_SpeakPort); | 1800 | m_Peer.sin_port=htons(m_Daddy->m_SpeakPort); |
1799 | tftp::tftpOptions o; | 1801 | tftp::tftpOptions o; |
1800 | CString v; | 1802 | CString v; |
1801 | o[tftpoTSize]="0"; | 1803 | o[tftpoTSize]="0"; |
1802 | if(m__blkSize){ | 1804 | if(m__blkSize){ |
1803 | v.Format("%u",m__blkSize); | 1805 | v.Format("%u",m__blkSize); |
1804 | o[tftpoBSize]=v; | 1806 | o[tftpoBSize]=v; |
1805 | } | 1807 | } |
1806 | if(m__timeOut){ | 1808 | if(m__timeOut){ |
1807 | v.Format("%u",m__timeOut); | 1809 | v.Format("%u",m__timeOut); |
1808 | o[tftpoTOut]=v; | 1810 | o[tftpoTOut]=v; |
1809 | } | 1811 | } |
1810 | tftp*p = tftp::Allocate(tftp::tftpRRQ::tftpSize(m_FileName,m_Type,&o)); | 1812 | tftp*p = tftp::Allocate(tftp::tftpRRQ::tftpSize(m_FileName,m_Type,&o)); |
1811 | ASSERT(p); | 1813 | ASSERT(p); |
1812 | p->SetOpcode(tftp::opRRQ); | 1814 | p->SetOpcode(tftp::opRRQ); |
1813 | p->data.m_RRQ.Set(m_FileName,m_Type,&o); | 1815 | p->data.m_RRQ.Set(m_FileName,m_Type,&o); |
1814 | PostTFTP(p,TRUE); | 1816 | PostTFTP(p,TRUE); |
1815 | state=stateInit; | 1817 | state=stateInit; |
1816 | UpdateList(); | 1818 | UpdateList(); |
1817 | } | 1819 | } |
1818 | 1820 | ||
1819 | void CPumpKINDlg::OnClose() | 1821 | void CPumpKINDlg::OnClose() |
1820 | { | 1822 | { |
1821 | OnTrayShowpumpkinwindow(); | 1823 | OnTrayShowpumpkinwindow(); |
1822 | } | 1824 | } |
1823 | 1825 | ||
1824 | void CPumpKINDlg::OnTrayShowpumpkinwindow() | 1826 | void CPumpKINDlg::OnTrayShowpumpkinwindow() |
1825 | { | 1827 | { |
1826 | if(IsWindowVisible()){ | 1828 | if(IsWindowVisible()){ |
1827 | m_bShown=FALSE; | 1829 | m_bShown=FALSE; |
1828 | ShowWindow(SW_HIDE); | 1830 | ShowWindow(SW_HIDE); |
1829 | }else{ | 1831 | }else{ |
1830 | m_bShown=TRUE; | 1832 | m_bShown=TRUE; |
1831 | ShowWindow(SW_SHOW); | 1833 | ShowWindow(SW_SHOW); |
1832 | SetForegroundWindow(); | 1834 | SetForegroundWindow(); |
1833 | SetFocus(); | 1835 | SetFocus(); |
1834 | } | 1836 | } |
1835 | } | 1837 | } |
1836 | 1838 | ||
1837 | void CPumpKINDlg::OnTrayExit() | 1839 | void CPumpKINDlg::OnTrayExit() |
1838 | { | 1840 | { |
1839 | OnExit(); | 1841 | OnExit(); |
1840 | } | 1842 | } |
1841 | 1843 | ||
1842 | void CPumpKINDlg::OnTrayAboutpumpkin() | 1844 | void CPumpKINDlg::OnTrayAboutpumpkin() |
1843 | { | 1845 | { |
1844 | CAboutDlg dlgAbout; | 1846 | CAboutDlg dlgAbout; |
1845 | dlgAbout.DoModal(); | 1847 | dlgAbout.DoModal(); |
1846 | } | 1848 | } |
1847 | 1849 | ||
1848 | void CPumpKINDlg::OnTrayFetchfile() | 1850 | void CPumpKINDlg::OnTrayFetchfile() |
1849 | { | 1851 | { |
1850 | OnGet(); | 1852 | OnGet(); |
1851 | } | 1853 | } |
1852 | 1854 | ||
1853 | void CPumpKINDlg::OnTrayHelp() | 1855 | void CPumpKINDlg::OnTrayHelp() |
1854 | { | 1856 | { |
1855 | OnHelp(); | 1857 | OnHelp(); |
1856 | } | 1858 | } |
1857 | 1859 | ||
1858 | void CPumpKINDlg::OnTrayOptions() | 1860 | void CPumpKINDlg::OnTrayOptions() |
1859 | { | 1861 | { |
1860 | OnOptions(); | 1862 | OnOptions(); |
1861 | } | 1863 | } |
1862 | 1864 | ||
1863 | void CPumpKINDlg::OnTraySendfile() | 1865 | void CPumpKINDlg::OnTraySendfile() |
1864 | { | 1866 | { |
1865 | OnPut(); | 1867 | OnPut(); |
1866 | } | 1868 | } |
1867 | 1869 | ||
1868 | void CPumpKINDlg::LoadSettings() | 1870 | void CPumpKINDlg::LoadSettings() |
1869 | { | 1871 | { |
1870 | CWinApp *app = AfxGetApp(); | 1872 | CWinApp *app = AfxGetApp(); |
1871 | ASSERT(app); | 1873 | ASSERT(app); |
1872 | m_bListen=app->GetProfileInt("TFTPSettings","Listen",m_bListen); | 1874 | m_bListen=app->GetProfileInt("TFTPSettings","Listen",m_bListen); |
1873 | m_bnwRequest=app->GetProfileString("BellsNWhistles","Request",m_bnwRequest); | 1875 | m_bnwRequest=app->GetProfileString("BellsNWhistles","Request",m_bnwRequest); |
1874 | m_bnwSuccess=app->GetProfileString("BellsNWhistles","Success",m_bnwSuccess); | 1876 | m_bnwSuccess=app->GetProfileString("BellsNWhistles","Success",m_bnwSuccess); |
1875 | m_bnwAbort=app->GetProfileString("BellsNWhistles","Abort",m_bnwAbort); | 1877 | m_bnwAbort=app->GetProfileString("BellsNWhistles","Abort",m_bnwAbort); |
1876 | m_bTFTPSubdirs=app->GetProfileInt("TFTPSettings","Subdirs",m_bTFTPSubdirs); | 1878 | m_bTFTPSubdirs=app->GetProfileInt("TFTPSettings","Subdirs",m_bTFTPSubdirs); |
1877 | m_ListenPort=app->GetProfileInt("TFTPSettings","ListenPort",m_ListenPort); | 1879 | m_ListenPort=app->GetProfileInt("TFTPSettings","ListenPort",m_ListenPort); |
1880 | m_ListenAddress=app->GetProfileString("TFTPSettings","ListenAddress",m_ListenAddress); | ||
1878 | m_LogLength=app->GetProfileInt("UISettings","LogLength",m_LogLength); | 1881 | m_LogLength=app->GetProfileInt("UISettings","LogLength",m_LogLength); |
1879 | m_PromptTimeOut=app->GetProfileInt("UISettings","PromptTimeout",m_PromptTimeOut); | 1882 | m_PromptTimeOut=app->GetProfileInt("UISettings","PromptTimeout",m_PromptTimeOut); |
1880 | m_RRQMode=app->GetProfileInt("TFTPSettings","RRQMode",m_RRQMode); | 1883 | m_RRQMode=app->GetProfileInt("TFTPSettings","RRQMode",m_RRQMode); |
1881 | m_SpeakPort=app->GetProfileInt("TFTPSettings","SpeakPort",m_SpeakPort); | 1884 | m_SpeakPort=app->GetProfileInt("TFTPSettings","SpeakPort",m_SpeakPort); |
1882 | m_TFTPRoot=app->GetProfileString("TFTPSettings","TFTPRoot",m_TFTPRoot); | 1885 | m_TFTPRoot=app->GetProfileString("TFTPSettings","TFTPRoot",m_TFTPRoot); |
1883 | m_LogFile=app->GetProfileString("General","LogFile",m_LogFile); | 1886 | m_LogFile=app->GetProfileString("General","LogFile",m_LogFile); |
1884 | m_TFTPTimeOut=CTimeSpan(app->GetProfileInt("TFTPSettings","TFTPTimeout",m_TFTPTimeOut.GetTotalSeconds())); | 1887 | m_TFTPTimeOut=CTimeSpan(app->GetProfileInt("TFTPSettings","TFTPTimeout",m_TFTPTimeOut.GetTotalSeconds())); |
1885 | m_BlockSize=app->GetProfileInt("TFTPSettings","TFTPBlockSize",m_BlockSize); | 1888 | m_BlockSize=app->GetProfileInt("TFTPSettings","TFTPBlockSize",m_BlockSize); |
1886 | m_RetryTimeOut=CTimeSpan(app->GetProfileInt("TFTPSettings","RetryTimeout",m_RetryTimeOut.GetTotalSeconds())); | 1889 | m_RetryTimeOut=CTimeSpan(app->GetProfileInt("TFTPSettings","RetryTimeout",m_RetryTimeOut.GetTotalSeconds())); |
1887 | m_WRQMode=app->GetProfileInt("TFTPSettings","WRQMode",m_WRQMode); | 1890 | m_WRQMode=app->GetProfileInt("TFTPSettings","WRQMode",m_WRQMode); |
1888 | m_bShown=app->GetProfileInt("UISettings","Visble",m_bShown); | 1891 | m_bShown=app->GetProfileInt("UISettings","Visble",m_bShown); |
1889 | if(m_TFTPRoot.IsEmpty()){ | 1892 | if(m_TFTPRoot.IsEmpty()){ |
1890 | DWORD dL = ::GetCurrentDirectory(0,NULL); | 1893 | DWORD dL = ::GetCurrentDirectory(0,NULL); |
1891 | VERIFY(::GetCurrentDirectory(dL,m_TFTPRoot.GetBuffer(dL))); | 1894 | VERIFY(::GetCurrentDirectory(dL,m_TFTPRoot.GetBuffer(dL))); |
1892 | m_TFTPRoot.ReleaseBuffer(); | 1895 | m_TFTPRoot.ReleaseBuffer(); |
1893 | } | 1896 | } |
1894 | ::SetCurrentDirectory(m_TFTPRoot); | 1897 | ::SetCurrentDirectory(m_TFTPRoot); |
1895 | m_aclRules.LoadProfile(app); | 1898 | m_aclRules.LoadProfile(app); |
1896 | } | 1899 | } |
1897 | 1900 | ||
1898 | void CPumpKINDlg::SaveSettings() | 1901 | void CPumpKINDlg::SaveSettings() |
1899 | { | 1902 | { |
1900 | CWinApp *app = AfxGetApp(); | 1903 | CWinApp *app = AfxGetApp(); |
1901 | ASSERT(app); | 1904 | ASSERT(app); |
1902 | app->WriteProfileInt("TFTPSettings","Listen",m_bListen); | 1905 | app->WriteProfileInt("TFTPSettings","Listen",m_bListen); |
1903 | app->WriteProfileString("BellsNWhistles","Request",m_bnwRequest); | 1906 | app->WriteProfileString("BellsNWhistles","Request",m_bnwRequest); |
1904 | app->WriteProfileString("BellsNWhistles","Success",m_bnwSuccess); | 1907 | app->WriteProfileString("BellsNWhistles","Success",m_bnwSuccess); |
1905 | app->WriteProfileString("BellsNWhistles","Abort",m_bnwAbort); | 1908 | app->WriteProfileString("BellsNWhistles","Abort",m_bnwAbort); |
1906 | app->WriteProfileInt("TFTPSettings","Subdirs",m_bTFTPSubdirs); | 1909 | app->WriteProfileInt("TFTPSettings","Subdirs",m_bTFTPSubdirs); |
1907 | app->WriteProfileInt("TFTPSettings","ListenPort",m_ListenPort); | 1910 | app->WriteProfileInt("TFTPSettings","ListenPort",m_ListenPort); |
1911 | app->WriteProfileString("TFTPSettings","ListenAddress",m_ListenAddress); | ||
1908 | app->WriteProfileInt("UISettings","LogLength",m_LogLength); | 1912 | app->WriteProfileInt("UISettings","LogLength",m_LogLength); |
1909 | app->WriteProfileInt("UISettings","PromptTimeout",m_PromptTimeOut); | 1913 | app->WriteProfileInt("UISettings","PromptTimeout",m_PromptTimeOut); |
1910 | app->WriteProfileInt("TFTPSettings","RRQMode",m_RRQMode); | 1914 | app->WriteProfileInt("TFTPSettings","RRQMode",m_RRQMode); |
1911 | app->WriteProfileInt("TFTPSettings","SpeakPort",m_SpeakPort); | 1915 | app->WriteProfileInt("TFTPSettings","SpeakPort",m_SpeakPort); |
1912 | app->WriteProfileString("TFTPSettings","TFTPRoot",m_TFTPRoot); | 1916 | app->WriteProfileString("TFTPSettings","TFTPRoot",m_TFTPRoot); |
1913 | app->WriteProfileString("General","LogFile",m_LogFile); | 1917 | app->WriteProfileString("General","LogFile",m_LogFile); |
1914 | app->WriteProfileInt("TFTPSettings","TFTPTimeout",m_TFTPTimeOut.GetTotalSeconds()); | 1918 | app->WriteProfileInt("TFTPSettings","TFTPTimeout",m_TFTPTimeOut.GetTotalSeconds()); |
1915 | app->WriteProfileInt("TFTPSettings","TFTPBlockSize",m_BlockSize); | 1919 | app->WriteProfileInt("TFTPSettings","TFTPBlockSize",m_BlockSize); |
1916 | app->WriteProfileInt("TFTPSettings","RetryTimeout",m_RetryTimeOut.GetTotalSeconds()); | 1920 | app->WriteProfileInt("TFTPSettings","RetryTimeout",m_RetryTimeOut.GetTotalSeconds()); |
1917 | app->WriteProfileInt("TFTPSettings","WRQMode",m_WRQMode); | 1921 | app->WriteProfileInt("TFTPSettings","WRQMode",m_WRQMode); |
1918 | app->WriteProfileInt("UISettings","Visble",m_bShown); | 1922 | app->WriteProfileInt("UISettings","Visble",m_bShown); |
1919 | m_aclRules.SaveProfile(app); | 1923 | m_aclRules.SaveProfile(app); |
1920 | } | 1924 | } |
1921 | 1925 | ||
1922 | void CPumpKINDlg::OnWindowPosChanging(WINDOWPOS FAR* lpwndpos) | 1926 | void CPumpKINDlg::OnWindowPosChanging(WINDOWPOS FAR* lpwndpos) |
1923 | { | 1927 | { |
1924 | CDialog::OnWindowPosChanging(lpwndpos); | 1928 | CDialog::OnWindowPosChanging(lpwndpos); |
1925 | if(!m_bExiting){ | 1929 | if(!m_bExiting){ |
1926 | if(m_bShown){ | 1930 | if(m_bShown){ |
1927 | lpwndpos->flags&=~SWP_HIDEWINDOW; | 1931 | lpwndpos->flags&=~SWP_HIDEWINDOW; |
1928 | lpwndpos->flags|=SWP_SHOWWINDOW; | 1932 | lpwndpos->flags|=SWP_SHOWWINDOW; |
1929 | }else{ | 1933 | }else{ |
1930 | lpwndpos->flags&=~SWP_SHOWWINDOW; | 1934 | lpwndpos->flags&=~SWP_SHOWWINDOW; |
1931 | lpwndpos->flags|=SWP_HIDEWINDOW; | 1935 | lpwndpos->flags|=SWP_HIDEWINDOW; |
1932 | if(::GetForegroundWindow()==m_hWnd && (m_Trayer && !m_Trayer->m_inMenu)) | 1936 | if(::GetForegroundWindow()==m_hWnd && (m_Trayer && !m_Trayer->m_inMenu)) |
1933 | GetDesktopWindow()->SetForegroundWindow(); | 1937 | GetDesktopWindow()->SetForegroundWindow(); |
1934 | } | 1938 | } |
1935 | } | 1939 | } |
1936 | } | 1940 | } |
1937 | 1941 | ||
1938 | CString CXferSocket::ApplyRootGently(LPCTSTR fn) | 1942 | CString CXferSocket::ApplyRootGently(LPCTSTR fn) |
1939 | { | 1943 | { |
1940 | CString f = fn; | 1944 | CString f = fn; |
1941 | CString rv = f; | 1945 | CString rv = f; |
1942 | if((!f.IsEmpty()) && f[0]!='\\' && f.Find(":")<0 && f.Find("\\")<0) | 1946 | if((!f.IsEmpty()) && f[0]!='\\' && f.Find(":")<0 && f.Find("\\")<0) |
1943 | rv = ApplyRoot(f); | 1947 | rv = ApplyRoot(f); |
1944 | return rv; | 1948 | return rv; |
1945 | } | 1949 | } |
1946 | 1950 | ||
1947 | BOOL CXferSocket::CheckBadRelativeness(LPCTSTR file) | 1951 | BOOL CXferSocket::CheckBadRelativeness(LPCTSTR file) |
1948 | { | 1952 | { |
1949 | CString tmp = file; | 1953 | CString tmp = file; |
1950 | if(tmp.IsEmpty()) | 1954 | if(tmp.IsEmpty()) |
1951 | return FALSE; | 1955 | return FALSE; |
1952 | if(tmp.Find("..")>=0) | 1956 | if(tmp.Find("..")>=0) |
1953 | return TRUE; | 1957 | return TRUE; |
1954 | if(tmp.Find(":")>=0) | 1958 | if(tmp.Find(":")>=0) |
1955 | return TRUE; | 1959 | return TRUE; |
1956 | if((!m_Daddy->m_bTFTPSubdirs) && m_FileName.Find('\\')>=0) | 1960 | if((!m_Daddy->m_bTFTPSubdirs) && m_FileName.Find('\\')>=0) |
1957 | return TRUE; | 1961 | return TRUE; |
1958 | return FALSE; | 1962 | return FALSE; |
1959 | } | 1963 | } |
1960 | 1964 | ||
1961 | void CAboutDlg::OnKlevernet() | 1965 | void CAboutDlg::OnKlevernet() |
1962 | { | 1966 | { |
1963 | CString url; | 1967 | CString url; |
1964 | url.LoadString(IDS_KLEVERNET_URL); | 1968 | url.LoadString(IDS_KLEVERNET_URL); |
1965 | ShellExecute(::GetDesktopWindow(),"open",url,NULL,NULL,SW_SHOWMAXIMIZED); | 1969 | ShellExecute(::GetDesktopWindow(),"open",url,NULL,NULL,SW_SHOWMAXIMIZED); |
1966 | } | 1970 | } |
1967 | 1971 | ||
1968 | BOOL CPumpKINDlg::PreTranslateMessage(MSG* pMsg) | 1972 | BOOL CPumpKINDlg::PreTranslateMessage(MSG* pMsg) |
1969 | { | 1973 | { |
1970 | // CG: The following block was added by the ToolTips component. | 1974 | // CG: The following block was added by the ToolTips component. |
1971 | { | 1975 | { |
1972 | // Let the ToolTip process this message. | 1976 | // Let the ToolTip process this message. |
1973 | m_tooltip.RelayEvent(pMsg); | 1977 | m_tooltip.RelayEvent(pMsg); |
1974 | 1978 | ||
1975 | return CDialog::PreTranslateMessage(pMsg); | 1979 | return CDialog::PreTranslateMessage(pMsg); |
1976 | } | 1980 | } |
1977 | } | 1981 | } |
1978 | 1982 | ||
1979 | void CPumpKINDlg::OnSelchangeLog() | 1983 | void CPumpKINDlg::OnSelchangeLog() |
1980 | { | 1984 | { |
1981 | int sel = m_Log.GetCurSel(); | 1985 | int sel = m_Log.GetCurSel(); |
1982 | if(sel==LB_ERR){ | 1986 | if(sel==LB_ERR){ |
1983 | TRACE0("Error retrieving selection\n"); | 1987 | TRACE0("Error retrieving selection\n"); |
1984 | }else{ | 1988 | }else{ |
1985 | CTime *t = (CTime*)m_Log.GetItemData(sel); | 1989 | CTime *t = (CTime*)m_Log.GetItemData(sel); |
1986 | ASSERT(t); | 1990 | ASSERT(t); |
1987 | m_tooltip.UpdateTipText(t->Format(IDS_LOGTIMEFORMAT),&m_Log); | 1991 | m_tooltip.UpdateTipText(t->Format(IDS_LOGTIMEFORMAT),&m_Log); |
1988 | } | 1992 | } |
1989 | } | 1993 | } |
1990 | 1994 | ||
1991 | void CPumpKINDlg::OnTrayOpenfilesfolder() | 1995 | void CPumpKINDlg::OnTrayOpenfilesfolder() |
1992 | { | 1996 | { |
1993 | ShellExecute(::GetDesktopWindow(),NULL,m_TFTPRoot,NULL,NULL,SW_SHOWDEFAULT); | 1997 | ShellExecute(::GetDesktopWindow(),NULL,m_TFTPRoot,NULL,NULL,SW_SHOWDEFAULT); |
1994 | } | 1998 | } |
1995 | 1999 | ||
1996 | void CPumpKINDlg::OnDropFiles(HDROP hDropInfo) | 2000 | void CPumpKINDlg::OnDropFiles(HDROP hDropInfo) |
1997 | { | 2001 | { |
1998 | UINT files = ::DragQueryFile(hDropInfo,0xFFFFFFFF,NULL,0); | 2002 | UINT files = ::DragQueryFile(hDropInfo,0xFFFFFFFF,NULL,0); |
1999 | ASSERT(files); | 2003 | ASSERT(files); |
2000 | for(UINT file=0;file<files;file++){ | 2004 | for(UINT file=0;file<files;file++){ |
2001 | CString theFile; | 2005 | CString theFile; |
2002 | UINT fileNameLength = ::DragQueryFile(hDropInfo,file,NULL,0); | 2006 | UINT fileNameLength = ::DragQueryFile(hDropInfo,file,NULL,0); |
2003 | ASSERT(fileNameLength); | 2007 | ASSERT(fileNameLength); |
2004 | VERIFY(::DragQueryFile(hDropInfo,file,theFile.GetBuffer(fileNameLength+5),fileNameLength+4)<=fileNameLength); | 2008 | VERIFY(::DragQueryFile(hDropInfo,file,theFile.GetBuffer(fileNameLength+5),fileNameLength+4)<=fileNameLength); |
2005 | theFile.ReleaseBuffer(); | 2009 | theFile.ReleaseBuffer(); |
2006 | // Send it over! | 2010 | // Send it over! |
2007 | CRequestDlg crd(NULL); | 2011 | CRequestDlg crd(NULL); |
2008 | crd.m_Drop=TRUE; | 2012 | crd.m_Drop=TRUE; |
2009 | crd.m_Put=TRUE; | 2013 | crd.m_Put=TRUE; |
2010 | crd.m_BSize=m_BlockSize; | 2014 | crd.m_BSize=m_BlockSize; |
2011 | crd.m_LocalFile=theFile; | 2015 | crd.m_LocalFile=theFile; |
2012 | if(crd.DoModal()==IDOK){ | 2016 | if(crd.DoModal()==IDOK){ |
2013 | CRRQSocket *socket = new CRRQSocket(this,crd.m_RemoteFile,crd.m_Type,NULL); | 2017 | CRRQSocket *socket = new CRRQSocket(this,crd.m_RemoteFile,crd.m_Type,NULL); |
2014 | if(crd.m_BSize) | 2018 | if(crd.m_BSize) |
2015 | socket->m__blkSize=crd.m_BSize; | 2019 | socket->m__blkSize=crd.m_BSize; |
2016 | if(!socket->Create(crd.m_LocalFile,crd.m_Host)) | 2020 | if(!socket->Create(crd.m_LocalFile,crd.m_Host)) |
2017 | socket->Destroy(); | 2021 | socket->Destroy(); |
2018 | } | 2022 | } |
2019 | } | 2023 | } |
2020 | ::DragFinish(hDropInfo); | 2024 | ::DragFinish(hDropInfo); |
2021 | } | 2025 | } |
2022 | 2026 | ||
2023 | void CPumpKINDlg::OnCancel() | 2027 | void CPumpKINDlg::OnCancel() |
2024 | { | 2028 | { |
2025 | OnClose(); | 2029 | OnClose(); |
2026 | } | 2030 | } |
2027 | 2031 | ||
2028 | CPumpKINDlg::~CPumpKINDlg() | 2032 | CPumpKINDlg::~CPumpKINDlg() |
2029 | { | 2033 | { |
2030 | delete m_Trayer; | 2034 | delete m_Trayer; |
2031 | delete m_Retrier; | 2035 | delete m_Retrier; |
2032 | } | 2036 | } |
2033 | 2037 | ||
2034 | void CXferSocket::OnRetry() | 2038 | void CXferSocket::OnRetry() |
2035 | { | 2039 | { |
2036 | if(!m_Retry){ | 2040 | if(!m_Retry){ |
2037 | TRACE("Retrying unretriable..\n"); | 2041 | TRACE("Retrying unretriable..\n"); |
2038 | return; | 2042 | return; |
2039 | } | 2043 | } |
2040 | TRACE0("Retrying..\n"); | 2044 | TRACE0("Retrying..\n"); |
2041 | m_bRetry=TRUE; | 2045 | m_bRetry=TRUE; |
2042 | PostTFTP(tftp::Copy(m_Retry)); | 2046 | PostTFTP(tftp::Copy(m_Retry)); |
2043 | m_bRetry=FALSE; | 2047 | m_bRetry=FALSE; |
2044 | } | 2048 | } |
2045 | 2049 | ||
2046 | tftp* tftp::Copy(tftp *src) | 2050 | tftp* tftp::Copy(tftp *src) |
2047 | { | 2051 | { |
2048 | ASSERT(src); | 2052 | ASSERT(src); |
2049 | ASSERT(src->length); | 2053 | ASSERT(src->length); |
2050 | tftp* rv = Allocate(src->length); | 2054 | tftp* rv = Allocate(src->length); |
2051 | ASSERT(rv); | 2055 | ASSERT(rv); |
2052 | memmove(rv,src,tftpSlackSize+src->length); | 2056 | memmove(rv,src,tftpSlackSize+src->length); |
2053 | return rv; | 2057 | return rv; |
2054 | } | 2058 | } |
2055 | 2059 | ||
2056 | void CXferSocket::SetTry(tftp *p) | 2060 | void CXferSocket::SetTry(tftp *p) |
2057 | { | 2061 | { |
2058 | if(m_Retry) | 2062 | if(m_Retry) |
2059 | delete m_Retry; | 2063 | delete m_Retry; |
2060 | m_Retry=p?tftp::Copy(p):NULL; | 2064 | m_Retry=p?tftp::Copy(p):NULL; |
2061 | } | 2065 | } |
2062 | 2066 | ||
2063 | void CPumpKINDlg::OnHelp() | 2067 | void CPumpKINDlg::OnHelp() |
2064 | { | 2068 | { |
2065 | AfxGetApp()->WinHelp(0,HELP_FINDER); | 2069 | AfxGetApp()->WinHelp(0,HELP_FINDER); |
2066 | } | 2070 | } |
2067 | 2071 | ||
2068 | BOOL CListenSocket::SetListen(BOOL b) { | 2072 | BOOL CListenSocket::SetListen(BOOL b) { |
2069 | ASSERT(m_Daddy); | 2073 | ASSERT(m_Daddy); |
2070 | if(b==m_bListen) | 2074 | if(b==m_bListen) return TRUE; |
2071 | return TRUE; | 2075 | if(!b) { |
2072 | if(b) { | ||
2073 | if(!Create(m_Daddy->m_ListenPort,SOCK_DGRAM)) | ||
2074 | return FALSE; | ||
2075 | return m_bListen=TRUE; | ||
2076 | }else{ | ||
2077 | Close(); m_bListen=FALSE; | 2076 | Close(); m_bListen=FALSE; |
2078 | return TRUE; | 2077 | return TRUE; |
2079 | } | 2078 | } |
2079 | return m_bListen=Create(m_Daddy->m_ListenPort,SOCK_DGRAM, | ||
2080 | FD_READ|FD_WRITE|FD_OOB|FD_ACCEPT|FD_CONNECT|FD_CLOSE, | ||
2081 | m_Daddy->m_ListenAddress.IsEmpty()?NULL:(LPCTSTR)m_Daddy->m_ListenAddress); | ||
2080 | } | 2082 | } |
2081 | 2083 | ||
2082 | void CPumpKINDlg::OnListening() | 2084 | void CPumpKINDlg::OnListening() |
2083 | { | 2085 | { |
2084 | if(!m_Listener.SetListen(m_ListenCtl.GetCheck()==1)) { | 2086 | if(!m_Listener.SetListen(m_ListenCtl.GetCheck()==1)) { |
2085 | TRACE0("Failed to create socket\n"); | 2087 | TRACE0("Failed to create socket\n"); |
2086 | AfxMessageBox(IDS_BOX_CANTBIND,MB_OK|MB_ICONEXCLAMATION); | 2088 | AfxMessageBox(IDS_BOX_CANTBIND,MB_OK|MB_ICONEXCLAMATION); |
2087 | } | 2089 | } |
2088 | m_ListenCtl.SetCheck(m_Listener.m_bListen?1:0); | 2090 | m_ListenCtl.SetCheck(m_Listener.m_bListen?1:0); |
2089 | m_bListen=m_Listener.m_bListen; | 2091 | m_bListen=m_Listener.m_bListen; |
2090 | } | 2092 | } |
2091 | 2093 | ||
2092 | void CPumpKINDlg::OnTrayListen() | 2094 | void CPumpKINDlg::OnTrayListen() |
2093 | { | 2095 | { |
2094 | if(!m_Listener.SetListen(!m_Listener.m_bListen)) { | 2096 | if(!m_Listener.SetListen(!m_Listener.m_bListen)) { |
2095 | TRACE0("Failed to create socket\n"); | 2097 | TRACE0("Failed to create socket\n"); |
2096 | AfxMessageBox(IDS_BOX_CANTBIND,MB_OK|MB_ICONEXCLAMATION); | 2098 | AfxMessageBox(IDS_BOX_CANTBIND,MB_OK|MB_ICONEXCLAMATION); |
2097 | } | 2099 | } |
2098 | m_ListenCtl.SetCheck(m_Listener.m_bListen?1:0); | 2100 | m_ListenCtl.SetCheck(m_Listener.m_bListen?1:0); |
2099 | m_bListen=m_Listener.m_bListen; | 2101 | m_bListen=m_Listener.m_bListen; |
2100 | } | 2102 | } |
2101 | 2103 | ||
2102 | void CPumpKINDlg::LogLine(LPCTSTR str) | 2104 | void CPumpKINDlg::LogLine(LPCTSTR str) |
2103 | { | 2105 | { |
2104 | LogLineToScreen(str); | 2106 | LogLineToScreen(str); |
2105 | if(!m_LogFile.IsEmpty()) { | 2107 | if(!m_LogFile.IsEmpty()) { |
2106 | if(!Klever::LogRecord((LPCTSTR)m_LogFile,str)) { | 2108 | if(!Klever::LogRecord((LPCTSTR)m_LogFile,str)) { |
2107 | if(m_lastlogerr!=m_LogFile) { | 2109 | if(m_lastlogerr!=m_LogFile) { |
2108 | CString tmp; | 2110 | CString tmp; |
2109 | tmp.Format(IDS_LOG_LOGERROR,m_LogFile); | 2111 | tmp.Format(IDS_LOG_LOGERROR,m_LogFile); |
2110 | LogLineToScreen(tmp); | 2112 | LogLineToScreen(tmp); |
2111 | m_lastlogerr=m_LogFile; | 2113 | m_lastlogerr=m_LogFile; |
2112 | } | 2114 | } |
2113 | } | 2115 | } |
2114 | } | 2116 | } |
2115 | } | 2117 | } |
2116 | 2118 | ||
2117 | void CPumpKINDlg::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI) | 2119 | void CPumpKINDlg::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI) |
2118 | { | 2120 | { |
2119 | CDialog::OnGetMinMaxInfo(lpMMI); | 2121 | CDialog::OnGetMinMaxInfo(lpMMI); |
2120 | if(m_MinSize.cx>0 && m_MinSize.cy>0){ | 2122 | if(m_MinSize.cx>0 && m_MinSize.cy>0){ |
2121 | lpMMI->ptMinTrackSize.x = m_MinSize.cx; | 2123 | lpMMI->ptMinTrackSize.x = m_MinSize.cx; |
2122 | lpMMI->ptMinTrackSize.y = m_MinSize.cy; | 2124 | lpMMI->ptMinTrackSize.y = m_MinSize.cy; |
2123 | } | 2125 | } |
2124 | } | 2126 | } |
2125 | 2127 | ||
2126 | void CPumpKINDlg::OnSize(UINT nType, int cx, int cy) | 2128 | void CPumpKINDlg::OnSize(UINT nType, int cx, int cy) |
2127 | { | 2129 | { |
2128 | CDialog::OnSize(nType, cx, cy); | 2130 | CDialog::OnSize(nType, cx, cy); |
2129 | if(nType==SIZE_RESTORED) | 2131 | if(nType==SIZE_RESTORED) |
2130 | RecalcLayout(cx,cy); | 2132 | RecalcLayout(cx,cy); |
2131 | } | 2133 | } |
2132 | 2134 | ||
2133 | void CPumpKINDlg::RecalcLayout(int,int) | 2135 | void CPumpKINDlg::RecalcLayout(int,int) |
2134 | { | 2136 | { |
2135 | CRect wrc; | 2137 | CRect wrc; |
2136 | GetClientRect(&wrc); | 2138 | GetClientRect(&wrc); |
2137 | AdjustButton(m_GetCtl,wrc); | 2139 | AdjustButton(m_GetCtl,wrc); |
2138 | AdjustButton(m_PutCtl,wrc); | 2140 | AdjustButton(m_PutCtl,wrc); |
2139 | AdjustButton(m_AbortCtl,wrc); | 2141 | AdjustButton(m_AbortCtl,wrc); |
2140 | AdjustButton(m_HelpCtl,wrc); | 2142 | AdjustButton(m_HelpCtl,wrc); |
2141 | AdjustButton(m_ExitCtl,wrc); | 2143 | AdjustButton(m_ExitCtl,wrc); |
2142 | AdjustButton(m_OptionsCtl,wrc); | 2144 | AdjustButton(m_OptionsCtl,wrc); |
2143 | CRect brc; | 2145 | CRect brc; |
2144 | m_List.GetWindowRect(&brc); ScreenToClient(&brc); | 2146 | m_List.GetWindowRect(&brc); ScreenToClient(&brc); |
2145 | m_List.SetWindowPos( | 2147 | m_List.SetWindowPos( |
2146 | 0, | 2148 | 0, |
2147 | brc.left, brc.top, | 2149 | brc.left, brc.top, |
2148 | wrc.right-m_rightGapList-brc.left, brc.bottom-brc.top, | 2150 | wrc.right-m_rightGapList-brc.left, brc.bottom-brc.top, |
2149 | SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOZORDER|SWP_NOCOPYBITS ); | 2151 | SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOZORDER|SWP_NOCOPYBITS ); |
2150 | m_Log.GetWindowRect(&brc); ScreenToClient(&brc); | 2152 | m_Log.GetWindowRect(&brc); ScreenToClient(&brc); |
2151 | m_Log.SetWindowPos( | 2153 | m_Log.SetWindowPos( |
2152 | 0, | 2154 | 0, |
2153 | brc.left, brc.top, | 2155 | brc.left, brc.top, |
2154 | wrc.right-m_rightGapButtons-brc.left, wrc.bottom-m_bottomGapLog-brc.top, | 2156 | wrc.right-m_rightGapButtons-brc.left, wrc.bottom-m_bottomGapLog-brc.top, |
2155 | SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOZORDER|SWP_NOCOPYBITS ); | 2157 | SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOZORDER|SWP_NOCOPYBITS ); |
2156 | m_ListenCtl.GetWindowRect(&brc); ScreenToClient(&brc); | 2158 | m_ListenCtl.GetWindowRect(&brc); ScreenToClient(&brc); |
2157 | m_ListenCtl.SetWindowPos( | 2159 | m_ListenCtl.SetWindowPos( |
2158 | 0, | 2160 | 0, |
2159 | wrc.right-brc.Width()-m_rightGapButtons, wrc.bottom-brc.Height()-m_bottomGapListen, | 2161 | wrc.right-brc.Width()-m_rightGapButtons, wrc.bottom-brc.Height()-m_bottomGapListen, |
2160 | 0,0, | 2162 | 0,0, |
2161 | SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER|SWP_NOCOPYBITS ); | 2163 | SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER|SWP_NOCOPYBITS ); |
2162 | int i = m_Log.GetCount(); | 2164 | int i = m_Log.GetCount(); |
2163 | if(i!=LB_ERR) | 2165 | if(i!=LB_ERR) |
2164 | m_Log.SetCurSel(i-1); | 2166 | m_Log.SetCurSel(i-1); |
2165 | } | 2167 | } |
2166 | 2168 | ||
2167 | void CPumpKINDlg::AdjustButton(CWnd& w,CRect& wrc) | 2169 | void CPumpKINDlg::AdjustButton(CWnd& w,CRect& wrc) |
2168 | { | 2170 | { |
2169 | CRect brc; | 2171 | CRect brc; |
2170 | w.GetWindowRect(&brc); ScreenToClient(&brc); | 2172 | w.GetWindowRect(&brc); ScreenToClient(&brc); |
2171 | w.SetWindowPos( | 2173 | w.SetWindowPos( |
2172 | 0, | 2174 | 0, |
2173 | wrc.right-brc.Width()-m_rightGapButtons, brc.top, | 2175 | wrc.right-brc.Width()-m_rightGapButtons, brc.top, |
2174 | 0, 0, | 2176 | 0, 0, |
2175 | SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER|SWP_NOCOPYBITS ); | 2177 | SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER|SWP_NOCOPYBITS ); |
2176 | } | 2178 | } |
diff --git a/PumpKINDlg.h b/PumpKINDlg.h index 23c2657..9077292 100644..100755 --- a/PumpKINDlg.h +++ b/PumpKINDlg.h | |||
@@ -1,501 +1,502 @@ | |||
1 | // PumpKINDlg.h : header file | 1 | // PumpKINDlg.h : header file |
2 | // | 2 | // |
3 | 3 | ||
4 | //#define REVERSEBYTES(w)MAKEWORD(HIBYTE(w),LOBYTE(w)); | 4 | //#define REVERSEBYTES(w)MAKEWORD(HIBYTE(w),LOBYTE(w)); |
5 | #defineREVERSEBYTES(w) (htons((WORD)w)) | 5 | #defineREVERSEBYTES(w) (htons((WORD)w)) |
6 | #define tftpoBSize"blksize" | 6 | #define tftpoBSize"blksize" |
7 | #define tftpoTSize"tsize" | 7 | #define tftpoTSize"tsize" |
8 | #define tftpoTOut"timeout" | 8 | #define tftpoTOut"timeout" |
9 | 9 | ||
10 | #define tftpoXResume"x-resume" | 10 | #define tftpoXResume"x-resume" |
11 | 11 | ||
12 | struct tftp{ | 12 | struct tftp{ |
13 | typedef CMapStringToString tftpOptions; | 13 | typedef CMapStringToString tftpOptions; |
14 | typedef WORD tftpLength; | 14 | typedef WORD tftpLength; |
15 | typedef WORD tftpOpcode; | 15 | typedef WORD tftpOpcode; |
16 | tftpLengthlength; | 16 | tftpLengthlength; |
17 | tftpOpcode opcode; | 17 | tftpOpcode opcode; |
18 | enum{ | 18 | enum{ |
19 | opRRQ = 1, | 19 | opRRQ = 1, |
20 | opWRQ = 2, | 20 | opWRQ = 2, |
21 | opDATA = 3, | 21 | opDATA = 3, |
22 | opACK = 4, | 22 | opACK = 4, |
23 | opERROR = 5, | 23 | opERROR = 5, |
24 | opOACK = 6, | 24 | opOACK = 6, |
25 | 25 | ||
26 | errUndefined = 0, | 26 | errUndefined = 0, |
27 | errNotFound = 1, | 27 | errNotFound = 1, |
28 | errAccessViolation = 2, | 28 | errAccessViolation = 2, |
29 | errDiskFull = 3, | 29 | errDiskFull = 3, |
30 | errIllegalOp = 4, | 30 | errIllegalOp = 4, |
31 | errUnknownTID = 5, | 31 | errUnknownTID = 5, |
32 | errFileExists = 6, | 32 | errFileExists = 6, |
33 | errNoUser = 7, | 33 | errNoUser = 7, |
34 | errOption = 8 | 34 | errOption = 8 |
35 | }; | 35 | }; |
36 | structtftpUNKNOWN { | 36 | structtftpUNKNOWN { |
37 | BYTE data[1]; | 37 | BYTE data[1]; |
38 | }; | 38 | }; |
39 | structtftpRQ { | 39 | structtftpRQ { |
40 | BYTE data[1]; | 40 | BYTE data[1]; |
41 | public: | 41 | public: |
42 | void Set(LPCTSTR file,LPCTSTR type,tftpOptions* ops=NULL); | 42 | void Set(LPCTSTR file,LPCTSTR type,tftpOptions* ops=NULL); |
43 | static UINT tftpSize(LPCTSTR file,LPCTSTR type,tftpOptions* ops=NULL); | 43 | static UINT tftpSize(LPCTSTR file,LPCTSTR type,tftpOptions* ops=NULL); |
44 | }; | 44 | }; |
45 | structtftpRRQ { | 45 | structtftpRRQ { |
46 | BYTE data[1]; | 46 | BYTE data[1]; |
47 | public: | 47 | public: |
48 | void Set(LPCTSTR file,LPCTSTR type,tftpOptions* ops=NULL); | 48 | void Set(LPCTSTR file,LPCTSTR type,tftpOptions* ops=NULL); |
49 | static UINT tftpSize(LPCTSTR file,LPCTSTR type,tftpOptions* ops=NULL); | 49 | static UINT tftpSize(LPCTSTR file,LPCTSTR type,tftpOptions* ops=NULL); |
50 | }; | 50 | }; |
51 | structtftpWRQ { | 51 | structtftpWRQ { |
52 | BYTE data[1]; | 52 | BYTE data[1]; |
53 | public: | 53 | public: |
54 | void Set(LPCTSTR file,LPCTSTR type,tftpOptions* ops=NULL); | 54 | void Set(LPCTSTR file,LPCTSTR type,tftpOptions* ops=NULL); |
55 | static UINT tftpSize(LPCTSTR file,LPCTSTR type,tftpOptions* ops=NULL); | 55 | static UINT tftpSize(LPCTSTR file,LPCTSTR type,tftpOptions* ops=NULL); |
56 | }; | 56 | }; |
57 | structtftpDATA { | 57 | structtftpDATA { |
58 | WORD block; | 58 | WORD block; |
59 | BYTE data[1]; | 59 | BYTE data[1]; |
60 | public: | 60 | public: |
61 | WORD Block(); | 61 | WORD Block(); |
62 | void SetBlock(WORD b); | 62 | void SetBlock(WORD b); |
63 | static UINT tftpSize(UINT blkSize=512); | 63 | static UINT tftpSize(UINT blkSize=512); |
64 | }; | 64 | }; |
65 | struct tftpACK { | 65 | struct tftpACK { |
66 | WORD block; | 66 | WORD block; |
67 | public: | 67 | public: |
68 | static UINT tftpSize(); | 68 | static UINT tftpSize(); |
69 | void SetBlock(WORD b); | 69 | void SetBlock(WORD b); |
70 | WORD Block(); | 70 | WORD Block(); |
71 | }; | 71 | }; |
72 | structtftpERROR { | 72 | structtftpERROR { |
73 | typedef WORD tftpErrorCode; | 73 | typedef WORD tftpErrorCode; |
74 | tftpErrorCode code; | 74 | tftpErrorCode code; |
75 | BYTE data[1]; | 75 | BYTE data[1]; |
76 | public: | 76 | public: |
77 | void SetCode(WORD c); | 77 | void SetCode(WORD c); |
78 | WORD Code(); | 78 | WORD Code(); |
79 | static UINT tftpSize(LPCTSTR msg); | 79 | static UINT tftpSize(LPCTSTR msg); |
80 | }; | 80 | }; |
81 | struct tftpOACK { | 81 | struct tftpOACK { |
82 | BYTE data[1]; | 82 | BYTE data[1]; |
83 | public: | 83 | public: |
84 | void Set(tftpOptions* ops); | 84 | void Set(tftpOptions* ops); |
85 | static UINT tftpSize(tftpOptions* ops); | 85 | static UINT tftpSize(tftpOptions* ops); |
86 | }; | 86 | }; |
87 | uniontftpPacket { | 87 | uniontftpPacket { |
88 | tftpUNKNOWN m_UNKNOWN; | 88 | tftpUNKNOWN m_UNKNOWN; |
89 | tftpRQ m_RQ; | 89 | tftpRQ m_RQ; |
90 | tftpRRQ m_RRQ; | 90 | tftpRRQ m_RRQ; |
91 | tftpWRQ m_WRQ; | 91 | tftpWRQ m_WRQ; |
92 | tftpDATA m_DATA; | 92 | tftpDATA m_DATA; |
93 | tftpACK m_ACK; | 93 | tftpACK m_ACK; |
94 | tftpERROR m_ERROR; | 94 | tftpERROR m_ERROR; |
95 | tftpOACK m_OACK; | 95 | tftpOACK m_OACK; |
96 | }data; | 96 | }data; |
97 | 97 | ||
98 | void *udpBase(void){ return &opcode; } | 98 | void *udpBase(void){ return &opcode; } |
99 | public: | 99 | public: |
100 | static tftp* Copy(tftp *src); | 100 | static tftp* Copy(tftp *src); |
101 | CString errMessage(); | 101 | CString errMessage(); |
102 | void SetOpcode(WORD op); | 102 | void SetOpcode(WORD op); |
103 | void errSet(UINT code,LPCTSTR msg); | 103 | void errSet(UINT code,LPCTSTR msg); |
104 | static tftp* Allocate(UINT tftpSize=0); | 104 | static tftp* Allocate(UINT tftpSize=0); |
105 | BOOL Send(CAsyncSocket *socket,SOCKADDR_IN* saddr); | 105 | BOOL Send(CAsyncSocket *socket,SOCKADDR_IN* saddr); |
106 | CString rqType(); | 106 | CString rqType(); |
107 | CString rqFileName(); | 107 | CString rqFileName(); |
108 | UINT GetOptions(tftpOptions* ops); | 108 | UINT GetOptions(tftpOptions* ops); |
109 | tftp(); | 109 | tftp(); |
110 | UINT Opcode(); | 110 | UINT Opcode(); |
111 | BOOL Receive(CAsyncSocket* socket,UINT maxLength,SOCKADDR_IN *sin=NULL); | 111 | BOOL Receive(CAsyncSocket* socket,UINT maxLength,SOCKADDR_IN *sin=NULL); |
112 | }; | 112 | }; |
113 | #define tftpHdrSize(sizeof(tftp)-sizeof(tftp::tftpPacket)) | 113 | #define tftpHdrSize(sizeof(tftp)-sizeof(tftp::tftpPacket)) |
114 | #definetftpSlackSize sizeof(tftp::tftpLength) | 114 | #definetftpSlackSize sizeof(tftp::tftpLength) |
115 | 115 | ||
116 | struct acl_rule { | 116 | struct acl_rule { |
117 | enum { | 117 | enum { |
118 | opRRQ=tftp::opRRQ, opWRQ=tftp::opWRQ | 118 | opRRQ=tftp::opRRQ, opWRQ=tftp::opWRQ |
119 | }; | 119 | }; |
120 | int op; | 120 | int op; |
121 | DWORD addr, mask; | 121 | DWORD addr, mask; |
122 | enum { | 122 | enum { |
123 | rrqGrant=0, rrqPrompt, rrqDeny, | 123 | rrqGrant=0, rrqPrompt, rrqDeny, |
124 | rrqRules, | 124 | rrqRules, |
125 | rrqNone=-1 | 125 | rrqNone=-1 |
126 | }; | 126 | }; |
127 | enum { | 127 | enum { |
128 | wrqGrant=0, wrqPromptIfExists, wrqPrompt, wrqDeny, | 128 | wrqGrant=0, wrqPromptIfExists, wrqPrompt, wrqDeny, |
129 | wrqRules, | 129 | wrqRules, |
130 | wrqNone=-1 | 130 | wrqNone=-1 |
131 | }; | 131 | }; |
132 | int target; | 132 | int target; |
133 | 133 | ||
134 | acl_rule() | 134 | acl_rule() |
135 | : op(-1), addr(0), mask(0), target(-1) { } | 135 | : op(-1), addr(0), mask(0), target(-1) { } |
136 | acl_rule(int o,DWORD a,DWORD m,int t) | 136 | acl_rule(int o,DWORD a,DWORD m,int t) |
137 | : op(o), addr(a), mask(m), target(t) { } | 137 | : op(o), addr(a), mask(m), target(t) { } |
138 | acl_rule(const acl_rule& s) | 138 | acl_rule(const acl_rule& s) |
139 | : op(s.op), addr(s.addr), mask(s.mask), target(s.target) { } | 139 | : op(s.op), addr(s.addr), mask(s.mask), target(s.target) { } |
140 | 140 | ||
141 | BOOL IsValid() { | 141 | BOOL IsValid() { |
142 | if(op==opRRQ) { | 142 | if(op==opRRQ) { |
143 | if(target<rrqNone || target>=rrqRules) | 143 | if(target<rrqNone || target>=rrqRules) |
144 | return FALSE; | 144 | return FALSE; |
145 | }else if(op==opWRQ) { | 145 | }else if(op==opWRQ) { |
146 | if(target<wrqNone || target>=wrqRules) | 146 | if(target<wrqNone || target>=wrqRules) |
147 | return FALSE; | 147 | return FALSE; |
148 | }else | 148 | }else |
149 | return FALSE; | 149 | return FALSE; |
150 | return TRUE; | 150 | return TRUE; |
151 | } | 151 | } |
152 | 152 | ||
153 | BOOL IsMatch(int o,DWORD a) { | 153 | BOOL IsMatch(int o,DWORD a) { |
154 | if(o!=op) return FALSE; | 154 | if(o!=op) return FALSE; |
155 | if( (a&mask) != (addr&mask)) return FALSE; | 155 | if( (a&mask) != (addr&mask)) return FALSE; |
156 | return TRUE; | 156 | return TRUE; |
157 | } | 157 | } |
158 | 158 | ||
159 | CString str_addr() { | 159 | CString str_addr() { |
160 | return inet_ntoa(*(struct in_addr*)&addr); | 160 | return inet_ntoa(*(struct in_addr*)&addr); |
161 | } | 161 | } |
162 | CString str_mask() { | 162 | CString str_mask() { |
163 | return inet_ntoa(*(struct in_addr*)&mask); | 163 | return inet_ntoa(*(struct in_addr*)&mask); |
164 | } | 164 | } |
165 | CString str_target() { | 165 | CString str_target() { |
166 | if(op==opRRQ) { | 166 | if(op==opRRQ) { |
167 | switch(target) { | 167 | switch(target) { |
168 | case rrqNone: return "fallback"; | 168 | case rrqNone: return "fallback"; |
169 | case rrqGrant: return "grant"; | 169 | case rrqGrant: return "grant"; |
170 | case rrqPrompt: return "prompt"; | 170 | case rrqPrompt: return "prompt"; |
171 | case rrqDeny: return "deny"; | 171 | case rrqDeny: return "deny"; |
172 | default: return "?"; | 172 | default: return "?"; |
173 | } | 173 | } |
174 | }else if(op==opWRQ) { | 174 | }else if(op==opWRQ) { |
175 | switch(target) { | 175 | switch(target) { |
176 | case wrqNone: return "fallback"; | 176 | case wrqNone: return "fallback"; |
177 | case wrqGrant: return "grant"; | 177 | case wrqGrant: return "grant"; |
178 | case wrqPromptIfExists: return "prompt if exists"; | 178 | case wrqPromptIfExists: return "prompt if exists"; |
179 | case wrqPrompt: return "prompt"; | 179 | case wrqPrompt: return "prompt"; |
180 | case wrqDeny: return "deny"; | 180 | case wrqDeny: return "deny"; |
181 | default: return "?"; | 181 | default: return "?"; |
182 | } | 182 | } |
183 | }else | 183 | }else |
184 | return "?"; | 184 | return "?"; |
185 | } | 185 | } |
186 | 186 | ||
187 | void SaveProfile(CWinApp* app,int i) { | 187 | void SaveProfile(CWinApp* app,int i) { |
188 | CString n; n.Format("%d",i); | 188 | CString n; n.Format("%d",i); |
189 | app->WriteProfileInt("ACL","op_"+n,op); | 189 | app->WriteProfileInt("ACL","op_"+n,op); |
190 | app->WriteProfileString("ACL","addr_"+n,str_addr()); | 190 | app->WriteProfileString("ACL","addr_"+n,str_addr()); |
191 | app->WriteProfileString("ACL","mask_"+n,str_mask()); | 191 | app->WriteProfileString("ACL","mask_"+n,str_mask()); |
192 | app->WriteProfileInt("ACL","target_"+n,target); | 192 | app->WriteProfileInt("ACL","target_"+n,target); |
193 | } | 193 | } |
194 | 194 | ||
195 | void LoadProfile(CWinApp* app,int i) { | 195 | void LoadProfile(CWinApp* app,int i) { |
196 | CString n; n.Format("%d",i); | 196 | CString n; n.Format("%d",i); |
197 | op=app->GetProfileInt("ACL","op_"+n,-1); | 197 | op=app->GetProfileInt("ACL","op_"+n,-1); |
198 | addr=inet_addr(app->GetProfileString("ACL","addr_"+n)); | 198 | addr=inet_addr(app->GetProfileString("ACL","addr_"+n)); |
199 | mask=inet_addr(app->GetProfileString("ACL","mask_"+n)); | 199 | mask=inet_addr(app->GetProfileString("ACL","mask_"+n)); |
200 | target=app->GetProfileInt("ACL","target_"+n,-1); | 200 | target=app->GetProfileInt("ACL","target_"+n,-1); |
201 | } | 201 | } |
202 | 202 | ||
203 | }; | 203 | }; |
204 | 204 | ||
205 | class acl_rules_t : public CArray<acl_rule,acl_rule&> { | 205 | class acl_rules_t : public CArray<acl_rule,acl_rule&> { |
206 | public: | 206 | public: |
207 | 207 | ||
208 | acl_rules_t& operator=(const acl_rules_t& s) { | 208 | acl_rules_t& operator=(const acl_rules_t& s) { |
209 | // Copy(s); XXX: unsuprisingly, there's a bug in MFC Copy, *pDst++=*pSrc (no ++ for Src) | 209 | // Copy(s); XXX: unsuprisingly, there's a bug in MFC Copy, *pDst++=*pSrc (no ++ for Src) |
210 | RemoveAll(); | 210 | RemoveAll(); |
211 | int ns = s.GetSize(); | 211 | int ns = s.GetSize(); |
212 | SetSize(ns); | 212 | SetSize(ns); |
213 | for(int i=0;i<ns;++i) | 213 | for(int i=0;i<ns;++i) |
214 | m_pData[i]=s.m_pData[i]; | 214 | m_pData[i]=s.m_pData[i]; |
215 | return *this; | 215 | return *this; |
216 | } | 216 | } |
217 | 217 | ||
218 | int AppendRule(acl_rule& r) { | 218 | int AppendRule(acl_rule& r) { |
219 | return Add(r); | 219 | return Add(r); |
220 | } | 220 | } |
221 | 221 | ||
222 | void DeleteRule(int r) { | 222 | void DeleteRule(int r) { |
223 | RemoveAt(r); | 223 | RemoveAt(r); |
224 | } | 224 | } |
225 | 225 | ||
226 | int FindRule(int op,DWORD ip) { | 226 | int FindRule(int op,DWORD ip) { |
227 | for(int i=0;i<GetSize();++i) | 227 | for(int i=0;i<GetSize();++i) |
228 | if(m_pData[i].IsMatch(op,ip)) | 228 | if(m_pData[i].IsMatch(op,ip)) |
229 | return i; | 229 | return i; |
230 | return -1; | 230 | return -1; |
231 | } | 231 | } |
232 | 232 | ||
233 | int FindTarget(int op,DWORD ip) { | 233 | int FindTarget(int op,DWORD ip) { |
234 | int r=FindRule(op,ip); | 234 | int r=FindRule(op,ip); |
235 | if(r<0) return -1; | 235 | if(r<0) return -1; |
236 | return m_pData[r].target; | 236 | return m_pData[r].target; |
237 | } | 237 | } |
238 | 238 | ||
239 | void SaveProfile(CWinApp* app) { | 239 | void SaveProfile(CWinApp* app) { |
240 | int s=GetSize(); | 240 | int s=GetSize(); |
241 | for(int i=0;i<s;++i) | 241 | for(int i=0;i<s;++i) |
242 | m_pData[i].SaveProfile(app,i); | 242 | m_pData[i].SaveProfile(app,i); |
243 | app->WriteProfileInt("ACL","rules",s); | 243 | app->WriteProfileInt("ACL","rules",s); |
244 | } | 244 | } |
245 | void LoadProfile(CWinApp* app) { | 245 | void LoadProfile(CWinApp* app) { |
246 | RemoveAll(); | 246 | RemoveAll(); |
247 | int s=app->GetProfileInt("ACL","rules",0); | 247 | int s=app->GetProfileInt("ACL","rules",0); |
248 | for(int i=0;i<s;++i) { | 248 | for(int i=0;i<s;++i) { |
249 | acl_rule r; | 249 | acl_rule r; |
250 | r.LoadProfile(app,i); | 250 | r.LoadProfile(app,i); |
251 | if(r.IsValid()) | 251 | if(r.IsValid()) |
252 | Add(r); | 252 | Add(r); |
253 | } | 253 | } |
254 | } | 254 | } |
255 | }; | 255 | }; |
256 | 256 | ||
257 | class CPumpKINDlg; | 257 | class CPumpKINDlg; |
258 | class CListenSocket : public CAsyncSocket{ | 258 | class CListenSocket : public CAsyncSocket{ |
259 | public: | 259 | public: |
260 | CPumpKINDlg* m_Daddy; | 260 | CPumpKINDlg* m_Daddy; |
261 | BOOL m_bListen; | 261 | BOOL m_bListen; |
262 | 262 | ||
263 | CListenSocket() | 263 | CListenSocket() |
264 | : m_bListen(FALSE), m_Daddy(0) { } | 264 | : m_bListen(FALSE), m_Daddy(0) { } |
265 | 265 | ||
266 | BOOL SetListen(BOOL b); | 266 | BOOL SetListen(BOOL b); |
267 | virtual void OnReceive(int nErrorCode); | 267 | virtual void OnReceive(int nErrorCode); |
268 | }; | 268 | }; |
269 | 269 | ||
270 | typedef CList<tftp*,tftp*>CTFTPList; | 270 | typedef CList<tftp*,tftp*>CTFTPList; |
271 | class CResolver; | 271 | class CResolver; |
272 | class CXferSocket : public CAsyncSocket{ | 272 | class CXferSocket : public CAsyncSocket{ |
273 | public: | 273 | public: |
274 | UINT m__timeOut; | 274 | UINT m__timeOut; |
275 | UINT m__blkSize; | 275 | UINT m__blkSize; |
276 | tftp::tftpOptions m_Options; | 276 | tftp::tftpOptions m_Options; |
277 | LONG m_xferSize; | 277 | LONG m_xferSize; |
278 | UINT m_timeOut; | 278 | UINT m_timeOut; |
279 | UINT m_blkSize; | 279 | UINT m_blkSize; |
280 | BOOL m_bRetry; | 280 | BOOL m_bRetry; |
281 | void SetTry(tftp *p=NULL); | 281 | void SetTry(tftp *p=NULL); |
282 | tftp* m_Retry; | 282 | tftp* m_Retry; |
283 | void OnRetry(); | 283 | void OnRetry(); |
284 | BOOL CheckBadRelativeness(LPCTSTR file); | 284 | BOOL CheckBadRelativeness(LPCTSTR file); |
285 | CString ApplyRootGently(LPCTSTR fn); | 285 | CString ApplyRootGently(LPCTSTR fn); |
286 | CString m_HostName; | 286 | CString m_HostName; |
287 | virtual void OnResolved(); | 287 | virtual void OnResolved(); |
288 | virtual void OnFailedToResolve(); | 288 | virtual void OnFailedToResolve(); |
289 | CResolver *m_wndResolver; | 289 | CResolver *m_wndResolver; |
290 | BYTE m_ResolveBuff[MAXGETHOSTSTRUCT]; | 290 | BYTE m_ResolveBuff[MAXGETHOSTSTRUCT]; |
291 | virtual void Abort(); | 291 | virtual void Abort(); |
292 | void ResetTimeout(); | 292 | void ResetTimeout(); |
293 | enum{ | 293 | enum{ |
294 | stateNone, stateDeny, stateInit, stateOACK, stateXfer, stateFinish, stateClosing | 294 | stateNone, stateDeny, stateInit, stateOACK, stateXfer, stateFinish, stateClosing |
295 | }; | 295 | }; |
296 | int state; | 296 | int state; |
297 | void Deny(UINT errCode,UINT errID); | 297 | void Deny(UINT errCode,UINT errID); |
298 | void Deny(CFileException* e); | 298 | void Deny(CFileException* e); |
299 | CString ApplyRoot(LPCTSTR fileName); | 299 | CString ApplyRoot(LPCTSTR fileName); |
300 | void TurnSlashes(CString& fn,BOOL bBack=TRUE); | 300 | void TurnSlashes(CString& fn,BOOL bBack=TRUE); |
301 | virtual void Destroy(BOOL success=TRUE); | 301 | virtual void Destroy(BOOL success=TRUE); |
302 | void PostError(CFileException* e); | 302 | void PostError(CFileException* e); |
303 | void PostError(UINT errCode,UINT errID); | 303 | void PostError(UINT errCode,UINT errID); |
304 | void PostTFTP(tftp* p,BOOL retryable=FALSE); | 304 | void PostTFTP(tftp* p,BOOL retryable=FALSE); |
305 | CXferSocket(CPumpKINDlg *daddy,LPCTSTR fileName,LPCTSTR type,SOCKADDR_IN* sin); | 305 | CXferSocket(CPumpKINDlg *daddy,LPCTSTR fileName,LPCTSTR type,SOCKADDR_IN* sin); |
306 | CFile m_File; | 306 | CFile m_File; |
307 | virtual ULONG GetACK(); | 307 | virtual ULONG GetACK(); |
308 | CString m_Type; | 308 | CString m_Type; |
309 | CString m_FileName; | 309 | CString m_FileName; |
310 | CXferSocket(); | 310 | CXferSocket(); |
311 | void UpdateList(); | 311 | void UpdateList(); |
312 | void SetPeer(SOCKADDR_IN *sin); | 312 | void SetPeer(SOCKADDR_IN *sin); |
313 | virtual BOOL OnTFTP(tftp* p) = 0; | 313 | virtual BOOL OnTFTP(tftp* p) = 0; |
314 | virtual void OnReceive(int nErrorCode); | 314 | virtual void OnReceive(int nErrorCode); |
315 | void DoSelect(BOOL do_select=FALSE); | 315 | void DoSelect(BOOL do_select=FALSE); |
316 | SOCKADDR_IN m_Peer; | 316 | SOCKADDR_IN m_Peer; |
317 | virtual void OnSend(int nErrorCode); | 317 | virtual void OnSend(int nErrorCode); |
318 | CPumpKINDlg* m_Daddy; | 318 | CPumpKINDlg* m_Daddy; |
319 | CTFTPList m_Queue; | 319 | CTFTPList m_Queue; |
320 | 320 | ||
321 | DECLARE_DYNAMIC(CXferSocket) | 321 | DECLARE_DYNAMIC(CXferSocket) |
322 | }; | 322 | }; |
323 | class CWRQSocket : public CXferSocket { | 323 | class CWRQSocket : public CXferSocket { |
324 | public: | 324 | public: |
325 | BOOL m_bResume; | 325 | BOOL m_bResume; |
326 | void OnHostKnown(); | 326 | void OnHostKnown(); |
327 | virtual void OnResolved(); | 327 | virtual void OnResolved(); |
328 | UINT m_LastSlack; | 328 | UINT m_LastSlack; |
329 | ULONG GetACK(); | 329 | ULONG GetACK(); |
330 | void DoXfer(); | 330 | void DoXfer(); |
331 | UINT m_ACK; | 331 | UINT m_ACK; |
332 | BOOL SaveAs(CString& fn); | 332 | BOOL SaveAs(CString& fn); |
333 | BOOL RenameFile(CString& fn); | 333 | BOOL RenameFile(CString& fn); |
334 | BOOL m_Rename; | 334 | BOOL m_Rename; |
335 | BOOL ConfirmRequest(); | 335 | BOOL ConfirmRequest(); |
336 | BOOL Create(LPCTSTR localFile=NULL,LPCTSTR hostName=NULL); | 336 | BOOL Create(LPCTSTR localFile=NULL,LPCTSTR hostName=NULL); |
337 | CWRQSocket(CPumpKINDlg* daddy,LPCTSTR fileName,LPCTSTR type,SOCKADDR_IN *sin); | 337 | CWRQSocket(CPumpKINDlg* daddy,LPCTSTR fileName,LPCTSTR type,SOCKADDR_IN *sin); |
338 | BOOL OnTFTP(tftp* p); | 338 | BOOL OnTFTP(tftp* p); |
339 | 339 | ||
340 | DECLARE_DYNAMIC(CWRQSocket) | 340 | DECLARE_DYNAMIC(CWRQSocket) |
341 | }; | 341 | }; |
342 | class CRRQSocket : public CXferSocket { | 342 | class CRRQSocket : public CXferSocket { |
343 | public: | 343 | public: |
344 | UINT m_ACKtoClose; | 344 | UINT m_ACKtoClose; |
345 | void OnHostKnown(); | 345 | void OnHostKnown(); |
346 | virtual void OnResolved(); | 346 | virtual void OnResolved(); |
347 | BOOL ConfirmRequest(); | 347 | BOOL ConfirmRequest(); |
348 | WORD m_LastSlack; | 348 | WORD m_LastSlack; |
349 | UINT m_ACK; | 349 | UINT m_ACK; |
350 | BOOL OnTFTP(tftp* p); | 350 | BOOL OnTFTP(tftp* p); |
351 | ULONG GetACK(void); | 351 | ULONG GetACK(void); |
352 | void DoXfer(); | 352 | void DoXfer(); |
353 | CRRQSocket(CPumpKINDlg *daddy,LPCTSTR fileName,LPCTSTR type,SOCKADDR_IN *sin); | 353 | CRRQSocket(CPumpKINDlg *daddy,LPCTSTR fileName,LPCTSTR type,SOCKADDR_IN *sin); |
354 | BOOL Create(LPCTSTR localFile=NULL,LPCTSTR hostName=NULL); | 354 | BOOL Create(LPCTSTR localFile=NULL,LPCTSTR hostName=NULL); |
355 | 355 | ||
356 | DECLARE_DYNAMIC(CRRQSocket) | 356 | DECLARE_DYNAMIC(CRRQSocket) |
357 | }; | 357 | }; |
358 | 358 | ||
359 | typedef CMap<SOCKET,SOCKET,CXferSocket*,CXferSocket*>CTIDMap; | 359 | typedef CMap<SOCKET,SOCKET,CXferSocket*,CXferSocket*>CTIDMap; |
360 | typedef CMap<CTime*,CTime*,CTime*,CTime*> CTimeMap; | 360 | typedef CMap<CTime*,CTime*,CTime*,CTime*> CTimeMap; |
361 | 361 | ||
362 | ///////////////////////////////////////////////////////////////////////////// | 362 | ///////////////////////////////////////////////////////////////////////////// |
363 | // CPumpKINDlg dialog | 363 | // CPumpKINDlg dialog |
364 | 364 | ||
365 | class CTrayer; | 365 | class CTrayer; |
366 | class CRetrier; | 366 | class CRetrier; |
367 | class CPumpKINDlg : public CDialog | 367 | class CPumpKINDlg : public CDialog |
368 | { | 368 | { |
369 | // Construction | 369 | // Construction |
370 | public: | 370 | public: |
371 | void AdjustButton(CWnd& w,CRect& wrc); | 371 | void AdjustButton(CWnd& w,CRect& wrc); |
372 | void RecalcLayout(int,int); | 372 | void RecalcLayout(int,int); |
373 | CSize m_MinSize; | 373 | CSize m_MinSize; |
374 | UINT m_bottomGapLog; | 374 | UINT m_bottomGapLog; |
375 | UINT m_bottomGapListen; | 375 | UINT m_bottomGapListen; |
376 | UINT m_rightGapList; | 376 | UINT m_rightGapList; |
377 | UINT m_rightGapButtons; | 377 | UINT m_rightGapButtons; |
378 | CString m_lastlogerr; | 378 | CString m_lastlogerr; |
379 | void LogLine(LPCTSTR str); | 379 | void LogLine(LPCTSTR str); |
380 | CString m_LogFile; | 380 | CString m_LogFile; |
381 | BOOL m_bListen; | 381 | BOOL m_bListen; |
382 | acl_rules_t m_aclRules; | 382 | acl_rules_t m_aclRules; |
383 | CString m_bnwRequest; | 383 | CString m_bnwRequest; |
384 | CString m_bnwSuccess; | 384 | CString m_bnwSuccess; |
385 | CString m_bnwAbort; | 385 | CString m_bnwAbort; |
386 | CBellsNWhistles m_bnw; | 386 | CBellsNWhistles m_bnw; |
387 | CTrayer *m_Trayer; | 387 | CTrayer *m_Trayer; |
388 | CTimeSpan m_RetryTimeOut; | 388 | CTimeSpan m_RetryTimeOut; |
389 | virtual ~CPumpKINDlg(); | 389 | virtual ~CPumpKINDlg(); |
390 | CRetrier* m_Retrier; | 390 | CRetrier* m_Retrier; |
391 | virtual BOOL PreTranslateMessage(MSG* pMsg); | 391 | virtual BOOL PreTranslateMessage(MSG* pMsg); |
392 | BOOL m_bShown; | 392 | BOOL m_bShown; |
393 | BOOL m_bExiting; | 393 | BOOL m_bExiting; |
394 | void SaveSettings(); | 394 | void SaveSettings(); |
395 | void LoadSettings(); | 395 | void LoadSettings(); |
396 | void SetupButtons(); | 396 | void SetupButtons(); |
397 | BITMAP m_bitmapBack; | 397 | BITMAP m_bitmapBack; |
398 | CBitmap m_bmpBack; | 398 | CBitmap m_bmpBack; |
399 | UINT m_PromptTimeOut; | 399 | UINT m_PromptTimeOut; |
400 | UINT m_SpeakPort; | 400 | UINT m_SpeakPort; |
401 | void LogLine(UINT msgID); | 401 | void LogLine(UINT msgID); |
402 | CTimeMap m_LogTimes; | 402 | CTimeMap m_LogTimes; |
403 | void LogLineToFile(LPCTSTR str); | 403 | void LogLineToFile(LPCTSTR str); |
404 | void LogLineToScreen(LPCTSTR str); | 404 | void LogLineToScreen(LPCTSTR str); |
405 | int m_LogLength; | 405 | int m_LogLength; |
406 | enum{ | 406 | enum{ |
407 | subitemFile=0, subitemType, subitemPeer, subitemBytes, subitemTSize | 407 | subitemFile=0, subitemType, subitemPeer, subitemBytes, subitemTSize |
408 | }; | 408 | }; |
409 | int m_iWRQ; | 409 | int m_iWRQ; |
410 | int m_iRRQ; | 410 | int m_iRRQ; |
411 | CImageList m_Images; | 411 | CImageList m_Images; |
412 | CTIDMap m_Xfers; | 412 | CTIDMap m_Xfers; |
413 | CTimeSpan m_TFTPTimeOut; | 413 | CTimeSpan m_TFTPTimeOut; |
414 | enum{ | 414 | enum{ |
415 | rrqGiveAll=acl_rule::rrqGrant, | 415 | rrqGiveAll=acl_rule::rrqGrant, |
416 | rrqAlwaysConfirm=acl_rule::rrqPrompt, | 416 | rrqAlwaysConfirm=acl_rule::rrqPrompt, |
417 | rrqDenyAll=acl_rule::rrqDeny, | 417 | rrqDenyAll=acl_rule::rrqDeny, |
418 | rrqFallback=acl_rule::rrqNone, | 418 | rrqFallback=acl_rule::rrqNone, |
419 | rrqGrant=rrqGiveAll, rrqDeny=rrqDenyAll, rrqPrompt=rrqAlwaysConfirm | 419 | rrqGrant=rrqGiveAll, rrqDeny=rrqDenyAll, rrqPrompt=rrqAlwaysConfirm |
420 | }; | 420 | }; |
421 | enum{ | 421 | enum{ |
422 | wrqTakeAll=acl_rule::wrqGrant, | 422 | wrqTakeAll=acl_rule::wrqGrant, |
423 | wrqConfirmIfExists=acl_rule::wrqPromptIfExists, | 423 | wrqConfirmIfExists=acl_rule::wrqPromptIfExists, |
424 | wrqAlwaysConfirm=acl_rule::wrqPrompt, | 424 | wrqAlwaysConfirm=acl_rule::wrqPrompt, |
425 | wrqDenyAll=acl_rule::wrqDeny, | 425 | wrqDenyAll=acl_rule::wrqDeny, |
426 | wrqFallback=acl_rule::wrqNone, | 426 | wrqFallback=acl_rule::wrqNone, |
427 | wrqGrant=wrqTakeAll,wrqDeny=wrqDenyAll, wrqPrompt=wrqAlwaysConfirm | 427 | wrqGrant=wrqTakeAll,wrqDeny=wrqDenyAll, wrqPrompt=wrqAlwaysConfirm |
428 | }; | 428 | }; |
429 | UINT m_RRQMode; | 429 | UINT m_RRQMode; |
430 | UINT m_WRQMode; | 430 | UINT m_WRQMode; |
431 | BOOL m_bTFTPSubdirs; | 431 | BOOL m_bTFTPSubdirs; |
432 | CString m_TFTPRoot; | 432 | CString m_TFTPRoot; |
433 | UINT m_ListenPort; | 433 | UINT m_ListenPort; |
434 | CString m_ListenAddress; | ||
434 | UINT m_BlockSize; | 435 | UINT m_BlockSize; |
435 | CListenSocket m_Listener; | 436 | CListenSocket m_Listener; |
436 | CPumpKINDlg(CWnd* pParent = NULL);// standard constructor | 437 | CPumpKINDlg(CWnd* pParent = NULL);// standard constructor |
437 | 438 | ||
438 | // Dialog Data | 439 | // Dialog Data |
439 | //{{AFX_DATA(CPumpKINDlg) | 440 | //{{AFX_DATA(CPumpKINDlg) |
440 | enum { IDD = IDD_PUMPKIN_DIALOG }; | 441 | enum { IDD = IDD_PUMPKIN_DIALOG }; |
441 | CButtonm_HelpCtl; | 442 | CButtonm_HelpCtl; |
442 | CButtonm_PutCtl; | 443 | CButtonm_PutCtl; |
443 | CButtonm_GetCtl; | 444 | CButtonm_GetCtl; |
444 | CButtonm_ExitCtl; | 445 | CButtonm_ExitCtl; |
445 | CButtonm_ListenCtl; | 446 | CButtonm_ListenCtl; |
446 | CButtonm_AbortCtl; | 447 | CButtonm_AbortCtl; |
447 | CButtonm_OptionsCtl; | 448 | CButtonm_OptionsCtl; |
448 | CListBoxm_Log; | 449 | CListBoxm_Log; |
449 | CListCtrlm_List; | 450 | CListCtrlm_List; |
450 | //}}AFX_DATA | 451 | //}}AFX_DATA |
451 | 452 | ||
452 | // ClassWizard generated virtual function overrides | 453 | // ClassWizard generated virtual function overrides |
453 | //{{AFX_VIRTUAL(CPumpKINDlg) | 454 | //{{AFX_VIRTUAL(CPumpKINDlg) |
454 | protected: | 455 | protected: |
455 | virtual void DoDataExchange(CDataExchange* pDX);// DDX/DDV support | 456 | virtual void DoDataExchange(CDataExchange* pDX);// DDX/DDV support |
456 | //}}AFX_VIRTUAL | 457 | //}}AFX_VIRTUAL |
457 | 458 | ||
458 | // Implementation | 459 | // Implementation |
459 | protected: | 460 | protected: |
460 | CToolTipCtrl m_tooltip; | 461 | CToolTipCtrl m_tooltip; |
461 | HICON m_hIcon; | 462 | HICON m_hIcon; |
462 | 463 | ||
463 | // Generated message map functions | 464 | // Generated message map functions |
464 | //{{AFX_MSG(CPumpKINDlg) | 465 | //{{AFX_MSG(CPumpKINDlg) |
465 | virtual BOOL OnInitDialog(); | 466 | virtual BOOL OnInitDialog(); |
466 | afx_msg void OnSysCommand(UINT nID, LPARAM lParam); | 467 | afx_msg void OnSysCommand(UINT nID, LPARAM lParam); |
467 | afx_msg void OnDestroy(); | 468 | afx_msg void OnDestroy(); |
468 | afx_msg void OnPaint(); | 469 | afx_msg void OnPaint(); |
469 | afx_msg HCURSOR OnQueryDragIcon(); | 470 | afx_msg HCURSOR OnQueryDragIcon(); |
470 | afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); | 471 | afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); |
471 | afx_msg void OnOptions(); | 472 | afx_msg void OnOptions(); |
472 | afx_msg void OnTimer(UINT nIDEvent); | 473 | afx_msg void OnTimer(UINT nIDEvent); |
473 | afx_msg void OnExit(); | 474 | afx_msg void OnExit(); |
474 | afx_msg void OnPut(); | 475 | afx_msg void OnPut(); |
475 | afx_msg void OnGet(); | 476 | afx_msg void OnGet(); |
476 | afx_msg void OnDeleteallitemsConnections(NMHDR* pNMHDR, LRESULT* pResult); | 477 | afx_msg void OnDeleteallitemsConnections(NMHDR* pNMHDR, LRESULT* pResult); |
477 | afx_msg void OnDeleteitemConnections(NMHDR* pNMHDR, LRESULT* pResult); | 478 | afx_msg void OnDeleteitemConnections(NMHDR* pNMHDR, LRESULT* pResult); |
478 | afx_msg void OnInsertitemConnections(NMHDR* pNMHDR, LRESULT* pResult); | 479 | afx_msg void OnInsertitemConnections(NMHDR* pNMHDR, LRESULT* pResult); |
479 | afx_msg void OnItemchangedConnections(NMHDR* pNMHDR, LRESULT* pResult); | 480 | afx_msg void OnItemchangedConnections(NMHDR* pNMHDR, LRESULT* pResult); |
480 | afx_msg void OnAbort(); | 481 | afx_msg void OnAbort(); |
481 | afx_msg void OnClose(); | 482 | afx_msg void OnClose(); |
482 | afx_msg void OnTrayShowpumpkinwindow(); | 483 | afx_msg void OnTrayShowpumpkinwindow(); |
483 | afx_msg void OnTrayListen(); | 484 | afx_msg void OnTrayListen(); |
484 | afx_msg void OnTrayExit(); | 485 | afx_msg void OnTrayExit(); |
485 | afx_msg void OnTrayAboutpumpkin(); | 486 | afx_msg void OnTrayAboutpumpkin(); |
486 | afx_msg void OnTrayFetchfile(); | 487 | afx_msg void OnTrayFetchfile(); |
487 | afx_msg void OnTrayHelp(); | 488 | afx_msg void OnTrayHelp(); |
488 | afx_msg void OnTrayOptions(); | 489 | afx_msg void OnTrayOptions(); |
489 | afx_msg void OnTraySendfile(); | 490 | afx_msg void OnTraySendfile(); |
490 | afx_msg void OnWindowPosChanging(WINDOWPOS FAR* lpwndpos); | 491 | afx_msg void OnWindowPosChanging(WINDOWPOS FAR* lpwndpos); |
491 | afx_msg void OnSelchangeLog(); | 492 | afx_msg void OnSelchangeLog(); |
492 | afx_msg void OnTrayOpenfilesfolder(); | 493 | afx_msg void OnTrayOpenfilesfolder(); |
493 | afx_msg void OnDropFiles(HDROP hDropInfo); | 494 | afx_msg void OnDropFiles(HDROP hDropInfo); |
494 | virtual void OnCancel(); | 495 | virtual void OnCancel(); |
495 | afx_msg void OnHelp(); | 496 | afx_msg void OnHelp(); |
496 | afx_msg void OnListening(); | 497 | afx_msg void OnListening(); |
497 | afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI); | 498 | afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI); |
498 | afx_msg void OnSize(UINT nType, int cx, int cy); | 499 | afx_msg void OnSize(UINT nType, int cx, int cy); |
499 | //}}AFX_MSG | 500 | //}}AFX_MSG |
500 | DECLARE_MESSAGE_MAP() | 501 | DECLARE_MESSAGE_MAP() |
501 | }; | 502 | }; |
diff --git a/help/pumpkin.rtf b/help/pumpkin.rtf index 8358490..39fc02a 100644 --- a/help/pumpkin.rtf +++ b/help/pumpkin.rtf | |||
@@ -1,145 +1,148 @@ | |||
1 | {\rtf1\ansi | 1 | {\rtf1\ansi |
2 | @{\footnote | 2 | @{\footnote |
3 | THIS FILE WAS AUTOMATICALLY GENERATED FROM XML DOCUMENT. | 3 | THIS FILE WAS AUTOMATICALLY GENERATED FROM XML DOCUMENT. |
4 | DO NOT MODIFY THIS FILE DIRECTLY. EDIT XML DOCUMENT INSTEAD | 4 | DO NOT MODIFY THIS FILE DIRECTLY. EDIT XML DOCUMENT INSTEAD |
5 | } | 5 | } |
6 | {\fonttbl{\f0\froman Times New Roman;}{\f1\fswiss Arial;}{\f3\froman Symbol;}}{\colortbl; | 6 | {\fonttbl{\f0\froman Times New Roman;}{\f1\fswiss Arial;}{\f3\froman Symbol;}}{\colortbl; |
7 | \red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0; | 7 | \red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0; |
8 | \red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255; | 8 | \red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255; |
9 | \red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128; | 9 | \red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128; |
10 | \red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;} | 10 | \red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;} |
11 | 11 | ||
12 | \pard\plain\keepn | 12 | \pard\plain\keepn |
13 | #{\footnote About} | 13 | #{\footnote About} |
14 | ${\footnote About PumpKIN} | 14 | ${\footnote About PumpKIN} |
15 | K{\footnote about} | 15 | K{\footnote about} |
16 | { \f1\fs18\b\sb120 About {\b PumpKIN}} | 16 | { \f1\fs18\b\sb120 About {\b PumpKIN}} |
17 | \par\sa120\sb120\qj\pard \f1\fs18\sb120 {\b PumpKIN} is a program designed to send and receive files over the net while having {\uldb {\b T42}}{\v %!ExecFile("http://kin.klever.net/T42/")} or {\b\cf6 Wintalk} session running using {\i TFTP} ({\uldb {\b RFC1350}}{\v %!ExecFile("http://www.rfc-editor.org/rfc/rfc1350.txt")}) protocol. It includes full-functional {\i TFTP} server/client so it may be useful for maintaining {\uldb CISCO}{\v %!ExecFile("http://www.cisco.com/")} routers and other network equipment. | 17 | \par\sa120\sb120\qj \f1\fs18\sb120 {\b PumpKIN} is a program designed to send and receive files over the net while having {\uldb {\b T42}}{\v %!ExecFile("http://kin.klever.net/T42/")} or {\b\cf6 Wintalk} session running using {\i TFTP} ({\uldb {\b RFC1350}}{\v %!ExecFile("http://www.rfc-editor.org/rfc/rfc1350.txt")}) protocol. It includes full-functional {\i TFTP} server/client so it may be useful for maintaining {\uldb CISCO}{\v %!ExecFile("http://www.cisco.com/")} routers and other network equipment. |
18 | \par\sa120\sb120\qj\pard \f1\fs18\sb120 | 18 | \par\sa120\sb120\qj \f1\fs18\sb120 |
19 | \par\sa120\sb120\qj\pard \f1\fs18\sb120 {\b {\i Enjoy!}} | 19 | \par\sa120\sb120\qj \f1\fs18\sb120 {\b {\i Enjoy!}} |
20 | { | 20 | { |
21 | \par\pard\plain\sb360\sa120 \f1\fs16 Copyright (c) 1997-2006 {\uldb\cf0 Klever Group (http://www.klever.net/)}{\v %!ExecFile("http://www.klever.net/")} | 21 | \par\pard\plain\sb360\sa120 \f1\fs16 Copyright (c) 1997-2011 {\uldb\cf0 Klever Group (http://www.klever.net/)}{\v %!ExecFile("http://www.klever.net/")} |
22 | \par\qj\sb120\sa120Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | 22 | \par\qj\sb120\sa120Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: |
23 | \par The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | 23 | \par The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
24 | \par \sa360 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | 24 | \par \sa360 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
25 | } | 25 | } |
26 | \page | 26 | \page |
27 | 27 | ||
28 | \pard\plain | 28 | \pard\plain |
29 | #{\footnote News} | 29 | #{\footnote News} |
30 | ${\footnote What's New} | 30 | ${\footnote What's New} |
31 | \par\pard\plain\f1\fs24\qc\cf2\b 2.7.2 - October 18th, 2006 | 31 | \par\pard\plain\f1\fs24\qc\cf2\b 2.7.2.1 - Apr 27th, 2011 |
32 | \par\pard\plain\fi0\li0\f1\fs18 \bullet Added rejecting of too large file requests with explicit error message about the block size | 32 | \par\pard\plain\fi0\li0\f1\fs18 \bullet Fixed a minor bug that lead to misdiagnosis of the packet from unexpected source |
33 | \par\pard\plain\fi0\li0\f1\fs18 \bullet A bit more elaborate logging | 33 | \par\pard\plain\f1\fs24\qc\cf2\b 2.7.2 - October 18th, 2006 |
34 | \par\pard\plain\fi0\li0\f1\fs18 \bullet Not closing receive socket until the last ACK receved now | 34 | \par\pard\plain\fi0\li0\f1\fs18 \bullet Added rejecting of too large file requests with explicit error message about the block size |
35 | \par\pard\plain\f1\fs24\qc\cf2\b 2.7.1 - March 13th, 2006 | 35 | \par\pard\plain\fi0\li0\f1\fs18 \bullet A bit more elaborate logging |
36 | \par\pard\plain\fi0\li0\f1\fs18 \bullet Bugfix release | 36 | \par\pard\plain\fi0\li0\f1\fs18 \bullet Not closing receive socket until the last ACK receved now |
37 | \par\pard\plain\f1\fs24\qc\cf2\b 2.7 - February 28th, 2006 | 37 | \par\pard\plain\f1\fs24\qc\cf2\b 2.7.1 - March 13th, 2006 |
38 | \par\pard\plain\fi0\li0\f1\fs18 \bullet Access lists based on request IP address and TFTP opcode for automating access policy | 38 | \par\pard\plain\fi0\li0\f1\fs18 \bullet Bugfix release |
39 | \par\pard\plain\fi0\li0\f1\fs18 \bullet Possibility to start/stop TFTP server, while keeping client functionality intact | 39 | \par\pard\plain\f1\fs24\qc\cf2\b 2.7 - February 28th, 2006 |
40 | \par\pard\plain\fi0\li0\f1\fs18 \bullet Logging to file | 40 | \par\pard\plain\fi0\li0\f1\fs18 \bullet Access lists based on request IP address and TFTP opcode for automating access policy |
41 | \par\pard\plain\fi0\li0\f1\fs18 \bullet Resizable main window | 41 | \par\pard\plain\fi0\li0\f1\fs18 \bullet Possibility to start/stop TFTP server, while keeping client functionality intact |
42 | \par\pard\plain\f1\fs24\qc\cf2\b 2.6 - August 6th, 2005 | 42 | \par\pard\plain\fi0\li0\f1\fs18 \bullet Logging to file |
43 | \par\pard\plain\fi0\li0\f1\fs18 \bullet more robust solution to the backslash/slash dilemma | 43 | \par\pard\plain\fi0\li0\f1\fs18 \bullet Resizable main window |
44 | \par\pard\plain\fi0\li0\f1\fs18 \bullet A bit more elaborate error reporting | 44 | \par\pard\plain\f1\fs24\qc\cf2\b 2.6 - August 6th, 2005 |
45 | \par\pard\plain\fi0\li0\f1\fs18 \bullet Fixed uninstall procedure so that it works on XP | 45 | \par\pard\plain\fi0\li0\f1\fs18 \bullet more robust solution to the backslash/slash dilemma |
46 | \par\pard\plain\f1\fs24\qc\cf2\b 2.5 - July 11th, 2004 | 46 | \par\pard\plain\fi0\li0\f1\fs18 \bullet A bit more elaborate error reporting |
47 | \par\pard\plain\fi0\li0\f1\fs18 \bullet Change of {\uldb license}{\v About} and opening the source. | 47 | \par\pard\plain\fi0\li0\f1\fs18 \bullet Fixed uninstall procedure so that it works on XP |
48 | \par\pard\plain\fi0\li0\f1\fs18 \bullet Minor cosmetic changes | 48 | \par\pard\plain\f1\fs24\qc\cf2\b 2.5 - July 11th, 2004 |
49 | \par\pard\plain\f1\fs24\qc\cf2\b 2.0 - June 13th, 1998 | 49 | \par\pard\plain\fi0\li0\f1\fs18 \bullet Change of {\uldb license}{\v About} and opening the source. |
50 | \par\pard\plain\fi0\li0\f1\fs18 \bullet Sounds customization. Now you can customize {\b PumpKIN} bells and whistles or turn them off completely. | 50 | \par\pard\plain\fi0\li0\f1\fs18 \bullet Minor cosmetic changes |
51 | \par\pard\plain\fi0\li0\f1\fs18 \bullet Previous version of {\b PumpKIN} had a bug causing it to misbehave when you're requesting file from remote {\i tftp} server using {\b IP Address} (as opposed to {\b hostname}). | 51 | \par\pard\plain\f1\fs24\qc\cf2\b 2.0 - June 13th, 1998 |
52 | \par\pard\plain\fi0\li0\f1\fs18 \bullet Typo causing {\b PumpKIN} to log outgoing request in reverse (i.e. {\i Requesting 'hostname' from 'filename'}) fixed. | 52 | \par\pard\plain\fi0\li0\f1\fs18 \bullet Sounds customization. Now you can customize {\b PumpKIN} bells and whistles or turn them off completely. |
53 | \par\pard\plain\fi0\li0\f1\fs18 \bullet Something else that you may not notice and I can not remember. | 53 | \par\pard\plain\fi0\li0\f1\fs18 \bullet Previous version of {\b PumpKIN} had a bug causing it to misbehave when you're requesting file from remote {\i tftp} server using {\b IP Address} (as opposed to {\b hostname}). |
54 | \par\pard\plain\f1\fs24\qc\cf2\b 1.5 - February 12th, 1998 | 54 | \par\pard\plain\fi0\li0\f1\fs18 \bullet Typo causing {\b PumpKIN} to log outgoing request in reverse (i.e. {\i Requesting 'hostname' from 'filename'}) fixed. |
55 | \par\pard\plain\fi0\li0\f1\fs18 \bullet Transfer resumes. No checking on file contents is done, so it's up to you to decide whether you want to start transmission from the beginning or resume unfinished transfer. | 55 | \par\pard\plain\fi0\li0\f1\fs18 \bullet Something else that you may not notice and I can not remember. |
56 | \par\pard\plain\fi0\li0\f1\fs18 \bullet Support for {\b block size}, {\b trasnfer size} and {\b transfer timeout} options as described in {\uldb {\b RFC1782}}{\v %!ExecFile("http://www.rfc-editor.org/rfc/rfc1782.txt")}, {\uldb {\b RFC1783}}{\v %!ExecFile("http://www.rfc-editor.org/rfc/rfc1783.txt")} and {\uldb {\b RFC1784}}{\v %!ExecFile("http://www.rfc-editor.org/rfc/rfc1784.txt")}. I'm not sure if there are any other {\i TFTP} implementations supporting this, but at least it makes sense if you use {\b PumpKIN} on both ends. | 56 | \par\pard\plain\f1\fs24\qc\cf2\b 1.5 - February 12th, 1998 |
57 | \par\pard\plain\fi0\li0\f1\fs18 \bullet New Install program | 57 | \par\pard\plain\fi0\li0\f1\fs18 \bullet Transfer resumes. No checking on file contents is done, so it's up to you to decide whether you want to start transmission from the beginning or resume unfinished transfer. |
58 | \page | 58 | \par\pard\plain\fi0\li0\f1\fs18 \bullet Support for {\b block size}, {\b trasnfer size} and {\b transfer timeout} options as described in {\uldb {\b RFC1782}}{\v %!ExecFile("http://www.rfc-editor.org/rfc/rfc1782.txt")}, {\uldb {\b RFC1783}}{\v %!ExecFile("http://www.rfc-editor.org/rfc/rfc1783.txt")} and {\uldb {\b RFC1784}}{\v %!ExecFile("http://www.rfc-editor.org/rfc/rfc1784.txt")}. I'm not sure if there are any other {\i TFTP} implementations supporting this, but at least it makes sense if you use {\b PumpKIN} on both ends. |
59 | 59 | \par\pard\plain\fi0\li0\f1\fs18 \bullet New Install program | |
60 | \pard\plain\keepn | 60 | \page |
61 | #{\footnote Using} | 61 | |
62 | ${\footnote Using PumpKIN} | 62 | \pard\plain\keepn |
63 | { \f1\fs18\b\sb120 Using {\b PumpKIN}} | 63 | #{\footnote Using} |
64 | \par\sa120\sb120\qj\pard \f1\fs18\sb120 This is a simple program for file exchange between two parties. It allows you to send files over the network to your party while having a {\uldb {\b T42}}{\v %!ExecFile("http://kin.klever.net/T42/")} or {\b\cf6 Wintalk} conversation. It uses open sessions to determine IP address of your party. Also you may use it as a {\i TFTP} client/server by itself. To get/put files from/to {\i TFTP} server you need to enter host name/IP address manually in the {\uldb Request Dialog}{\v Request}. | 64 | ${\footnote Using PumpKIN} |
65 | \par\sa120\sb120\qj\pard \f1\fs18\sb120 To Abort transfer(s) currently in progress - select transfer(s) you want to terminate in the list and click {\b Abort xfer} button. | 65 | { \f1\fs18\b\sb120 Using {\b PumpKIN}} |
66 | \par\sa120\sb120\qj\pard \f1\fs18\sb120 You may want to hide {\b PumpKIN} window and leave it as a tray icon only. Just click the \{bmct pumpkin.bmp\} icon in the tray or simply close the window. | 66 | \par\sa120\sb120\qj \f1\fs18\sb120 This is a simple program for file exchange between two parties. It allows you to send files over the network to your party while having a {\uldb {\b T42}}{\v %!ExecFile("http://kin.klever.net/T42/")} or {\b\cf6 Wintalk} conversation. It uses open sessions to determine IP address of your party. Also you may use it as a {\i TFTP} client/server by itself. To get/put files from/to {\i TFTP} server you need to enter host name/IP address manually in the {\uldb Request Dialog}{\v Request}. |
67 | \par\sa120\sb120\qj\pard \f1\fs18\sb120 Use {\uldb Options}{\v Options} button to set {\b PumpKIN} options. | 67 | \par\sa120\sb120\qj \f1\fs18\sb120 To Abort transfer(s) currently in progress - select transfer(s) you want to terminate in the list and click {\b Abort xfer} button. |
68 | \par\sa120\sb120\qj\pard \f1\fs18\sb120 You can start and stop {\b PumpKIN}'s {\i TFTP} server by checking and unchecking the {\b Server is running} checkbox in the lower right corner of main {\b PumpKIN} window. | 68 | \par\sa120\sb120\qj \f1\fs18\sb120 You may want to hide {\b PumpKIN} window and leave it as a tray icon only. Just click the \{bmct pumpkin.bmp\} icon in the tray or simply close the window. |
69 | \page | 69 | \par\sa120\sb120\qj \f1\fs18\sb120 Use {\uldb Options}{\v Options} button to set {\b PumpKIN} options. |
70 | 70 | \par\sa120\sb120\qj \f1\fs18\sb120 You can start and stop {\b PumpKIN}'s {\i TFTP} server by checking and unchecking the {\b Server is running} checkbox in the lower right corner of main {\b PumpKIN} window. | |
71 | \pard\plain\keepn | 71 | \page |
72 | #{\footnote ConfirmRRQ} | 72 | |
73 | ${\footnote Confirm Read Request Dialog} | 73 | \pard\plain\keepn |
74 | { \f1\fs18\b\sb120 Confirm Read Request Dialog} | 74 | #{\footnote ConfirmRRQ} |
75 | \par\sa120\sb120\qj\pard \f1\fs18\sb120 When the file is requested from your {\i TFTP} server you may choose to {\b Grant Access} to this file or to {\b Deny Access}. If you hesitate to answer for {\uldb {\b Confirmation timeout}}{\v ConfirmationTimeout} ({\i default - 30 seconds}) {\b PumpKIN} defaults to denial of all requests. | 75 | ${\footnote Confirm Read Request Dialog} |
76 | \page | 76 | { \f1\fs18\b\sb120 Confirm Read Request Dialog} |
77 | 77 | \par\sa120\sb120\qj \f1\fs18\sb120 When the file is requested from your {\i TFTP} server you may choose to {\b Grant Access} to this file or to {\b Deny Access}. If you hesitate to answer for {\uldb {\b Confirmation timeout}}{\v ConfirmationTimeout} ({\i default - 30 seconds}) {\b PumpKIN} defaults to denial of all requests. | |
78 | \pard\plain\keepn | 78 | \page |
79 | #{\footnote ConfirmWRQ} | 79 | |
80 | ${\footnote Confirm Write Request Dialog} | 80 | \pard\plain\keepn |
81 | { \f1\fs18\b\sb120 Confirm Write Request Dialog} | 81 | #{\footnote ConfirmWRQ} |
82 | \par\sa120\sb120\qj\pard \f1\fs18\sb120 Whenever your party sends you a file you have always a choice to accept it or not. You can also save the file under a different name by choosing the {\b Rename} option. If you already have file with such name you may chose to {\b resume} transfer. No checking on file contents is done. This option may or may not work depending on remote implementation of protocol. It does work if you use {\b PumpKIN} on both ends. If you are still unsure for {\uldb {\b Confirmation timeout}}{\v ConfirmationTimeOut} ({\i default - 30 seconds}) {\b PumpKIN} will make safe decision for you (deny). | 82 | ${\footnote Confirm Write Request Dialog} |
83 | \page | 83 | { \f1\fs18\b\sb120 Confirm Write Request Dialog} |
84 | 84 | \par\sa120\sb120\qj \f1\fs18\sb120 Whenever your party sends you a file you have always a choice to accept it or not. You can also save the file under a different name by choosing the {\b Rename} option. If you already have file with such name you may chose to {\b resume} transfer. No checking on file contents is done. This option may or may not work depending on remote implementation of protocol. It does work if you use {\b PumpKIN} on both ends. If you are still unsure for {\uldb {\b Confirmation timeout}}{\v ConfirmationTimeOut} ({\i default - 30 seconds}) {\b PumpKIN} will make safe decision for you (deny). | |
85 | \pard\plain\keepn | 85 | \page |
86 | #{\footnote Request} | 86 | |
87 | ${\footnote Request Dialog} | 87 | \pard\plain\keepn |
88 | { \f1\fs18\b\sb120 Request Dialog} | 88 | #{\footnote Request} |
89 | \par\sa120\sb120\qj\pard \f1\fs18\sb120 Request dialog is aimed to let you form read or write request. You may set the following options:\pard | 89 | ${\footnote Request Dialog} |
90 | \par \fi0\li0 \bullet {\b Local File} - You can change the name of the file you're sending (or destination in case you're receiving) right here. You may also use {\b Browse} button to select the file. | 90 | { \f1\fs18\b\sb120 Request Dialog} |
91 | \par \fi0\li0 \bullet {\b Remote File} Specifies the name of file on the remote host you're requesting (in case of read request) or the name of file you want your file to appear as (in case of write request). | 91 | \par\sa120\sb120\qj \f1\fs18\sb120 Request dialog is aimed to let you form read or write request. You may set the following options:\pard |
92 | \par \fi0\li0 \bullet {\b Remote Host} is your party's host or {\i TFTP} server you're requesting file from/sending file to. To refresh the list of your talk windows use {\b REFRESH} button. | 92 | \par \fi0\li0 \bullet {\b Local File} - You can change the name of the file you're sending (or destination in case you're receiving) right here. You may also use {\b Browse} button to select the file. |
93 | \par \fi0\li0 \bullet {\b Type} is the type of transfer as defined in {\uldb {\b RFC1350}}{\v %!ExecFile("http://www.rfc-editor.org/rfc/rfc1350.txt")}. Doesn't mean much, really. Defined types are '{\i octet}' or '{\i netascii}'. Default is '{\i octet}'. | 93 | \par \fi0\li0 \bullet {\b Remote File} Specifies the name of file on the remote host you're requesting (in case of read request) or the name of file you want your file to appear as (in case of write request). |
94 | \par \fi0\li0 \bullet {\b Block Size} - Use this block size if remote is {\uldb {\b RFC1783}}{\v %!ExecFile("http://www.rfc-editor.org/rfc/rfc1783.txt")}-compliant. If remote doesn't support this option {\b PumpKIN} will fallback to 512 bytes per block.\pard | 94 | \par \fi0\li0 \bullet {\b Remote Host} is your party's host or {\i TFTP} server you're requesting file from/sending file to. To refresh the list of your talk windows use {\b REFRESH} button. |
95 | \page | 95 | \par \fi0\li0 \bullet {\b Type} is the type of transfer as defined in {\uldb {\b RFC1350}}{\v %!ExecFile("http://www.rfc-editor.org/rfc/rfc1350.txt")}. Doesn't mean much, really. Defined types are '{\i octet}' or '{\i netascii}'. Default is '{\i octet}'. |
96 | 96 | \par \fi0\li0 \bullet {\b Block Size} - Use this block size if remote is {\uldb {\b RFC1783}}{\v %!ExecFile("http://www.rfc-editor.org/rfc/rfc1783.txt")}-compliant. If remote doesn't support this option {\b PumpKIN} will fallback to 512 bytes per block.\pard | |
97 | \pard\plain\keepn | 97 | \page |
98 | #{\footnote Options} | 98 | |
99 | ${\footnote Options} | 99 | \pard\plain\keepn |
100 | { \f1\fs18\b\sb120 Options} | 100 | #{\footnote Options} |
101 | \par\sa120\sb120\qj\pard \f1\fs18\sb120 {\b PumpKIN} options property sheet consists of two tabs. For more information see {\uldb {\b Network}}{\v NetworkOptions} and {\b Server} options. | 101 | ${\footnote Options} |
102 | \page | 102 | { \f1\fs18\b\sb120 Options} |
103 | 103 | \par\sa120\sb120\qj \f1\fs18\sb120 {\b PumpKIN} options property sheet consists of two tabs. For more information see {\uldb {\b Network}}{\v NetworkOptions} and {\b Server} options. | |
104 | \pard\plain\keepn | 104 | \page |
105 | #{\footnote NetworkOptions} | 105 | |
106 | ${\footnote Network Options} | 106 | \pard\plain\keepn |
107 | { \f1\fs18\b\sb120 Network Options}\pard | 107 | #{\footnote NetworkOptions} |
108 | \par \fi0\li0 \bullet {\b UDP Ports}\pard | 108 | ${\footnote Network Options} |
109 | \par \fi0\li0 \bullet {\b Listen for incoming connections on port} - specifies the port we're listening to. The default as defined in {\uldb {\b RFC1350}}{\v %!ExecFile("http://www.rfc-editor.org/rfc/rfc1350.txt")} is 69. | 109 | { \f1\fs18\b\sb120 Network Options}\pard |
110 | \par \fi0\li0 \bullet {\b Send outgoing requests to port} - specifies the port we're going to send all requests to.\pard | 110 | \par \fi0\li0 \bullet {\b UDP Ports}\pard |
111 | \par \fi0\li0 \bullet {\b Default Connection timeout} - if there's no activity for specified time, transfer is considered to be dead and terminated. {\b PumpKIN} tries to propagate this value to remote as described in {\uldb {\b RFC1782}}{\v %!ExecFile("http://www.rfc-editor.org/rfc/rfc1782.txt")} and {\uldb {\b RFC1784}}{\v %!ExecFile("http://www.rfc-editor.org/rfc/rfc1784.txt")} if possible. | 111 | \par \fi0\li0 \bullet {\b Listen for incoming connections on port} - specifies the port we're listening to. The default as defined in {\uldb {\b RFC1350}}{\v %!ExecFile("http://www.rfc-editor.org/rfc/rfc1350.txt")} is 69. |
112 | \par \fi0\li0 \bullet {\b Default Block Size} - {\b PumpKIN} tries to negotiate block size with remote using this value unless specified explicitly in request. If remote doesn't support {\uldb {\b RFC1782}}{\v %!ExecFile("http://www.rfc-editor.org/rfc/rfc1782.txt")} and {\uldb {\b RFC1783}}{\v %!ExecFile("http://www.rfc-editor.org/rfc/rfc1783.txt")}{\b PumpKIN} falls back to 512 bytes per block.\pard | 112 | \par \fi0\li0 \bullet {\b ip address} - ip address to listen to. |
113 | \page | 113 | \par \fi0\li0 \bullet {\b Send outgoing requests to port} - specifies the port we're going to send all requests to.\pard |
114 | 114 | \par \fi0\li0 \bullet {\b Default Connection timeout} - if there's no activity for specified time, transfer is considered to be dead and terminated. {\b PumpKIN} tries to propagate this value to remote as described in {\uldb {\b RFC1782}}{\v %!ExecFile("http://www.rfc-editor.org/rfc/rfc1782.txt")} and {\uldb {\b RFC1784}}{\v %!ExecFile("http://www.rfc-editor.org/rfc/rfc1784.txt")} if possible. | |
115 | \pard\plain\keepn | 115 | \par \fi0\li0 \bullet {\b Default Block Size} - {\b PumpKIN} tries to negotiate block size with remote using this value unless specified explicitly in request. If remote doesn't support {\uldb {\b RFC1782}}{\v %!ExecFile("http://www.rfc-editor.org/rfc/rfc1782.txt")} and {\uldb {\b RFC1783}}{\v %!ExecFile("http://www.rfc-editor.org/rfc/rfc1783.txt")}{\b PumpKIN} falls back to 512 bytes per block.\pard |
116 | #{\footnote ServerOptions} | 116 | \page |
117 | ${\footnote Server Options} | 117 | |
118 | { \f1\fs18\b\sb120 Server Options}\pard | 118 | \pard\plain\keepn |
119 | \par \fi0\li0 \bullet {\b TFTP Filesystem root} - Specifies the location of files you're transmitting or where to start looking for them from. Defaults to the directory you start {\b PumpKIN} for the first time from. | 119 | #{\footnote ServerOptions} |
120 | \par \fi0\li0 \bullet {\b Allow access to subdirectories} - specifies whether you want allow access to the whole subtree of {\b TFTP Root} or only to the directory itself. | 120 | ${\footnote Server Options} |
121 | \par \fi0\li0 \bullet {\b Read Request Behavior} - You may choose to automatically agree to give all files requested, to be prompted to confirm these operations, or to deny all requests as if you're not even here. | 121 | { \f1\fs18\b\sb120 Server Options}\pard |
122 | \par \fi0\li0 \bullet {\b Write Request Behavior} - You may chose to {\b take all files} ({\i not recommended}), to {\b prompt only if file exists already}, {\b Always prompt} or {\b Deny all requests}. | 122 | \par \fi0\li0 \bullet {\b TFTP Filesystem root} - Specifies the location of files you're transmitting or where to start looking for them from. Defaults to the directory you start {\b PumpKIN} for the first time from. |
123 | \par \fi0\li0 \bullet {#{\footnote ConfirmationTimeOut}}{\b Confirmation timeout} - this is the time {\b PumpKIN} will wait for you to accept or deny request before it will give up and take default action which is always deny. | 123 | \par \fi0\li0 \bullet {\b Allow access to subdirectories} - specifies whether you want allow access to the whole subtree of {\b TFTP Root} or only to the directory itself. |
124 | \par \fi0\li0 \bullet {\b Log file} - If you want to enable logging to file, set the destination file here.\pard | 124 | \par \fi0\li0 \bullet {\b Read Request Behavior} - You may choose to automatically agree to give all files requested, to be prompted to confirm these operations, or to deny all requests as if you're not even here. |
125 | \page | 125 | \par \fi0\li0 \bullet {\b Write Request Behavior} - You may chose to {\b take all files} ({\i not recommended}), to {\b prompt only if file exists already}, {\b Always prompt} or {\b Deny all requests}. |
126 | 126 | \par \fi0\li0 \bullet {#{\footnote ConfirmationTimeOut}}{\b Confirmation timeout} - this is the time {\b PumpKIN} will wait for you to accept or deny request before it will give up and take default action which is always deny. | |
127 | \pard\plain\keepn | 127 | \par \fi0\li0 \bullet {\b Log file} - If you want to enable logging to file, set the destination file here.\pard |
128 | #{\footnote SoundsOptions} | 128 | \page |
129 | ${\footnote Sounds Options} | 129 | |
130 | { \f1\fs18\b\sb120 Sounds} | 130 | \pard\plain\keepn |
131 | \par\sa120\sb120\qj\pard \f1\fs18\sb120 You can customize {\b PumpKIN} sounds notifications here. There are three customizable sounds defined - {\b Incoming request}, which notifies you about incoming request prompt if you're set to be prompted whenever incoming request occurs. {\b xfer Aborted} - which happens to sound every time transfer is interrupted for whatever reason - time out, explicit kill, denied access, etc. {\b xfer Finished} means that your file was successfully transmitted. | 131 | #{\footnote SoundsOptions} |
132 | \par\sa120\sb120\qj\pard \f1\fs18\sb120 You can select any {\b .wav} file or one of the predefined sounds from the dropdown list. | 132 | ${\footnote Sounds Options} |
133 | \page | 133 | { \f1\fs18\b\sb120 Sounds} |
134 | 134 | \par\sa120\sb120\qj \f1\fs18\sb120 You can customize {\b PumpKIN} sounds notifications here. There are three customizable sounds defined - {\b Incoming request}, which notifies you about incoming request prompt if you're set to be prompted whenever incoming request occurs. {\b xfer Aborted} - which happens to sound every time transfer is interrupted for whatever reason - time out, explicit kill, denied access, etc. {\b xfer Finished} means that your file was successfully transmitted. | |
135 | \pard\plain\keepn | 135 | \par\sa120\sb120\qj \f1\fs18\sb120 You can select any {\b .wav} file or one of the predefined sounds from the dropdown list. |
136 | #{\footnote ACL} | 136 | \page |
137 | ${\footnote Access Lists} | 137 | |
138 | { \f1\fs18\b\sb120 Access Lists} | 138 | \pard\plain\keepn |
139 | \par\sa120\sb120\qj\pard \f1\fs18\sb120 You can slightly automate your access policies by setting up read/write request behavior for different incoming requests. | 139 | #{\footnote ACL} |
140 | \par\sa120\sb120\qj\pard \f1\fs18\sb120 The rule consists of {\b request type}, source network ({\b ip} and {\b netmask}) and {\b action} to take (see also {\uldb Server Options}{\v ServerOptions}). | 140 | ${\footnote Access Lists} |
141 | \par\sa120\sb120\qj\pard \f1\fs18\sb120 When {\b PumpKIN} receives request it goes through the list of rules and bases its decision on the first matching rule. To rearrange order of rules, select the rule you wish to move and use up and down arrows buttons on the right. To remove rule, use the cross button. | 141 | { \f1\fs18\b\sb120 Access Lists} |
142 | \par\sa120\sb120\qj\pard \f1\fs18\sb120 To add a new rule fill in the information about {\b request type}, source {\b address} and {\b netmask} and desired action. Then click on the 'Add new rule' button. | 142 | \par\sa120\sb120\qj \f1\fs18\sb120 You can slightly automate your access policies by setting up read/write request behavior for different incoming requests. |
143 | \par\sa120\sb120\qj\pard \f1\fs18\sb120 If you wish to amend the rule, select it in the rules list, change parameters below and click the 'Replace rule' button. | 143 | \par\sa120\sb120\qj \f1\fs18\sb120 The rule consists of {\b request type}, source network ({\b ip} and {\b netmask}) and {\b action} to take (see also {\uldb Server Options}{\v ServerOptions}). |
144 | \page | 144 | \par\sa120\sb120\qj \f1\fs18\sb120 When {\b PumpKIN} receives request it goes through the list of rules and bases its decision on the first matching rule. To rearrange order of rules, select the rule you wish to move and use up and down arrows buttons on the right. To remove rule, use the cross button. |
145 | \par\sa120\sb120\qj \f1\fs18\sb120 To add a new rule fill in the information about {\b request type}, source {\b address} and {\b netmask} and desired action. Then click on the 'Add new rule' button. | ||
146 | \par\sa120\sb120\qj \f1\fs18\sb120 If you wish to amend the rule, select it in the rules list, change parameters below and click the 'Replace rule' button. | ||
147 | \page | ||
145 | } \ No newline at end of file | 148 | } \ No newline at end of file |
diff --git a/help/pumpkin.xml b/help/pumpkin.xml index 2e53edd..153219a 100644 --- a/help/pumpkin.xml +++ b/help/pumpkin.xml | |||
@@ -1,115 +1,116 @@ | |||
1 | <?xml version="1.0"?> | 1 | <?xml version="1.0"?> |
2 | <winhelp> | 2 | <winhelp> |
3 | <topic id="About" title="About PumpKIN" keywords="about"> | 3 | <topic id="About" title="About PumpKIN" keywords="about"> |
4 | <heading scroll="no">About <kin>PumpKIN</kin></heading> | 4 | <heading scroll="no">About <kin>PumpKIN</kin></heading> |
5 | <p><kin>PumpKIN</kin> is a program designed to send and receive files over the net while having <kin href="http://kin.klever.net/T42/">T42</kin> or <product>Wintalk</product> session running using <term>TFTP</term> (<rfc num="1350"/>) protocol. It includes full-functional <term>TFTP</term> server/client so it may be useful for maintaining <a href="http://www.cisco.com/">CISCO</a> routers and other network equipment.</p> | 5 | <p><kin>PumpKIN</kin> is a program designed to send and receive files over the net while having <kin href="http://kin.klever.net/T42/">T42</kin> or <product>Wintalk</product> session running using <term>TFTP</term> (<rfc num="1350"/>) protocol. It includes full-functional <term>TFTP</term> server/client so it may be useful for maintaining <a href="http://www.cisco.com/">CISCO</a> routers and other network equipment.</p> |
6 | <p/> | 6 | <p/> |
7 | <p><b><i>Enjoy!</i></b></p> | 7 | <p><b><i>Enjoy!</i></b></p> |
8 | <license years="1997-2006"/> | 8 | <license years="1997-2006"/> |
9 | <credist/> | 9 | <credist/> |
10 | </topic> | 10 | </topic> |
11 | <topic id="News" title="What's New"> | 11 | <topic id="News" title="What's New"> |
12 | <newsfor version="2.7.2" date="October 18th, 2006"> | 12 | <newsfor version="2.7.2" date="October 18th, 2006"> |
13 | <ni>Added rejecting of too large file requests with explicit error message about the block size</ni> | 13 | <ni>Added rejecting of too large file requests with explicit error message about the block size</ni> |
14 | <ni>A bit more elaborate logging</ni> | 14 | <ni>A bit more elaborate logging</ni> |
15 | <ni>Not closing receive socket until the last ACK receved now</ni> | 15 | <ni>Not closing receive socket until the last ACK receved now</ni> |
16 | </newsfor> | 16 | </newsfor> |
17 | <newsfor version="2.7.1" date="March 13th, 2006"> | 17 | <newsfor version="2.7.1" date="March 13th, 2006"> |
18 | <ni>Bugfix release</ni> | 18 | <ni>Bugfix release</ni> |
19 | </newsfor> | 19 | </newsfor> |
20 | <newsfor version="2.7" date="February 28th, 2006"> | 20 | <newsfor version="2.7" date="February 28th, 2006"> |
21 | <ni>Access lists based on request IP address and TFTP opcode for automating access policy</ni> | 21 | <ni>Access lists based on request IP address and TFTP opcode for automating access policy</ni> |
22 | <ni>Possibility to start/stop TFTP server, while keeping client functionality intact</ni> | 22 | <ni>Possibility to start/stop TFTP server, while keeping client functionality intact</ni> |
23 | <ni>Logging to file</ni> | 23 | <ni>Logging to file</ni> |
24 | <ni>Resizable main window</ni> | 24 | <ni>Resizable main window</ni> |
25 | </newsfor> | 25 | </newsfor> |
26 | <newsfor version="2.6" date="August 6th, 2005"> | 26 | <newsfor version="2.6" date="August 6th, 2005"> |
27 | <ni>more robust solution to the backslash/slash dilemma</ni> | 27 | <ni>more robust solution to the backslash/slash dilemma</ni> |
28 | <ni>A bit more elaborate error reporting</ni> | 28 | <ni>A bit more elaborate error reporting</ni> |
29 | <ni>Fixed uninstall procedure so that it works on XP</ni> | 29 | <ni>Fixed uninstall procedure so that it works on XP</ni> |
30 | </newsfor> | 30 | </newsfor> |
31 | <newsfor version="2.5" date="July 11th, 2004"> | 31 | <newsfor version="2.5" date="July 11th, 2004"> |
32 | <ni>Change of <a href="#About">license</a> and opening the source.</ni> | 32 | <ni>Change of <a href="#About">license</a> and opening the source.</ni> |
33 | <ni>Minor cosmetic changes</ni> | 33 | <ni>Minor cosmetic changes</ni> |
34 | </newsfor> | 34 | </newsfor> |
35 | <newsfor version="2.0" date="June 13th, 1998"> | 35 | <newsfor version="2.0" date="June 13th, 1998"> |
36 | <ni>Sounds customization. Now you can customize <kin>PumpKIN</kin> bells and whistles or turn them off completely.</ni> | 36 | <ni>Sounds customization. Now you can customize <kin>PumpKIN</kin> bells and whistles or turn them off completely.</ni> |
37 | <ni>Previous version of <kin>PumpKIN</kin> had a bug causing it to misbehave when you're requesting file from remote <term>tftp</term> server using <b>IP Address</b> (as opposed to <b>hostname</b>).</ni> | 37 | <ni>Previous version of <kin>PumpKIN</kin> had a bug causing it to misbehave when you're requesting file from remote <term>tftp</term> server using <b>IP Address</b> (as opposed to <b>hostname</b>).</ni> |
38 | <ni>Typo causing <kin>PumpKIN</kin> to log outgoing request in reverse (i.e. <i>Requesting 'hostname' from 'filename'</i>) fixed.</ni> | 38 | <ni>Typo causing <kin>PumpKIN</kin> to log outgoing request in reverse (i.e. <i>Requesting 'hostname' from 'filename'</i>) fixed.</ni> |
39 | <ni>Something else that you may not notice and I can not remember.</ni> | 39 | <ni>Something else that you may not notice and I can not remember.</ni> |
40 | </newsfor> | 40 | </newsfor> |
41 | <newsfor version="1.5" date="February 12th, 1998"> | 41 | <newsfor version="1.5" date="February 12th, 1998"> |
42 | <ni>Transfer resumes. No checking on file contents is done, so it's up to you to decide whether you want to start transmission from the beginning or resume unfinished transfer.</ni> | 42 | <ni>Transfer resumes. No checking on file contents is done, so it's up to you to decide whether you want to start transmission from the beginning or resume unfinished transfer.</ni> |
43 | <ni>Support for <b>block size</b>, <b>trasnfer size</b> and <b>transfer timeout</b> options as described in <rfc num="1782"/>, <rfc num="1783"/> and <rfc num="1784"/>. I'm not sure if there are any other <term>TFTP</term> implementations supporting this, but at least it makes sense if you use <kin>PumpKIN</kin> on both ends.</ni> | 43 | <ni>Support for <b>block size</b>, <b>trasnfer size</b> and <b>transfer timeout</b> options as described in <rfc num="1782"/>, <rfc num="1783"/> and <rfc num="1784"/>. I'm not sure if there are any other <term>TFTP</term> implementations supporting this, but at least it makes sense if you use <kin>PumpKIN</kin> on both ends.</ni> |
44 | <ni>New Install program</ni> | 44 | <ni>New Install program</ni> |
45 | </newsfor> | 45 | </newsfor> |
46 | </topic> | 46 | </topic> |
47 | <topic id="Using" title="Using PumpKIN"> | 47 | <topic id="Using" title="Using PumpKIN"> |
48 | <heading scroll="no">Using <kin>PumpKIN</kin></heading> | 48 | <heading scroll="no">Using <kin>PumpKIN</kin></heading> |
49 | <p>This is a simple program for file exchange between two parties. It allows you to send files over the network to your party while having a <kin href="http://kin.klever.net/T42/">T42</kin> or <product>Wintalk</product> conversation. It uses open sessions to determine IP address of your party. Also you may use it as a <term>TFTP</term> client/server by itself. To get/put files from/to <term>TFTP</term> server you need to enter host name/IP address manually in the <a href="#Request">Request Dialog</a>.</p> | 49 | <p>This is a simple program for file exchange between two parties. It allows you to send files over the network to your party while having a <kin href="http://kin.klever.net/T42/">T42</kin> or <product>Wintalk</product> conversation. It uses open sessions to determine IP address of your party. Also you may use it as a <term>TFTP</term> client/server by itself. To get/put files from/to <term>TFTP</term> server you need to enter host name/IP address manually in the <a href="#Request">Request Dialog</a>.</p> |
50 | <p>To Abort transfer(s) currently in progress - select transfer(s) you want to terminate in the list and click <b>Abort xfer</b> button.</p> | 50 | <p>To Abort transfer(s) currently in progress - select transfer(s) you want to terminate in the list and click <b>Abort xfer</b> button.</p> |
51 | <p>You may want to hide <kin>PumpKIN</kin> window and leave it as a tray icon only. Just click the <image source="pumpkin.bmp"/> icon in the tray or simply close the window.</p> | 51 | <p>You may want to hide <kin>PumpKIN</kin> window and leave it as a tray icon only. Just click the <image source="pumpkin.bmp"/> icon in the tray or simply close the window.</p> |
52 | <p>Use <a href="#Options">Options</a> button to set <kin>PumpKIN</kin> options.</p> | 52 | <p>Use <a href="#Options">Options</a> button to set <kin>PumpKIN</kin> options.</p> |
53 | <p>You can start and stop <kin>PumpKIN</kin>'s <term>TFTP</term> server by checking and unchecking the <b>Server is running</b> checkbox in the lower right corner of main <kin>PumpKIN</kin> window.</p> | 53 | <p>You can start and stop <kin>PumpKIN</kin>'s <term>TFTP</term> server by checking and unchecking the <b>Server is running</b> checkbox in the lower right corner of main <kin>PumpKIN</kin> window.</p> |
54 | </topic> | 54 | </topic> |
55 | <topic id="ConfirmRRQ" title="Confirm Read Request Dialog"> | 55 | <topic id="ConfirmRRQ" title="Confirm Read Request Dialog"> |
56 | <heading scroll="no">Confirm Read Request Dialog</heading> | 56 | <heading scroll="no">Confirm Read Request Dialog</heading> |
57 | <p>When the file is requested from your <term>TFTP</term> server you may choose to <b>Grant Access</b> to this file or to <b>Deny Access</b>. If you hesitate to answer for <a href="#ConfirmationTimeout"><b>Confirmation timeout</b></a> (<i>default - 30 seconds</i>) <kin>PumpKIN</kin> defaults to denial of all requests.</p> | 57 | <p>When the file is requested from your <term>TFTP</term> server you may choose to <b>Grant Access</b> to this file or to <b>Deny Access</b>. If you hesitate to answer for <a href="#ConfirmationTimeout"><b>Confirmation timeout</b></a> (<i>default - 30 seconds</i>) <kin>PumpKIN</kin> defaults to denial of all requests.</p> |
58 | </topic> | 58 | </topic> |
59 | <topic id="ConfirmWRQ" title="Confirm Write Request Dialog"> | 59 | <topic id="ConfirmWRQ" title="Confirm Write Request Dialog"> |
60 | <heading scroll="no">Confirm Write Request Dialog</heading> | 60 | <heading scroll="no">Confirm Write Request Dialog</heading> |
61 | <p>Whenever your party sends you a file you have always a choice to accept it or not. You can also save the file under a different name by choosing the <b>Rename</b> option. If you already have file with such name you may chose to <b>resume</b> transfer. No checking on file contents is done. This option may or may not work depending on remote implementation of protocol. It does work if you use <kin>PumpKIN</kin> on both ends. If you are still unsure for <a href="#ConfirmationTimeOut"><b>Confirmation timeout</b></a> (<i>default - 30 seconds</i>) <kin>PumpKIN</kin> will make safe decision for you (deny).</p> | 61 | <p>Whenever your party sends you a file you have always a choice to accept it or not. You can also save the file under a different name by choosing the <b>Rename</b> option. If you already have file with such name you may chose to <b>resume</b> transfer. No checking on file contents is done. This option may or may not work depending on remote implementation of protocol. It does work if you use <kin>PumpKIN</kin> on both ends. If you are still unsure for <a href="#ConfirmationTimeOut"><b>Confirmation timeout</b></a> (<i>default - 30 seconds</i>) <kin>PumpKIN</kin> will make safe decision for you (deny).</p> |
62 | </topic> | 62 | </topic> |
63 | <topic id="Request" title="Request Dialog"> | 63 | <topic id="Request" title="Request Dialog"> |
64 | <heading scroll="no">Request Dialog</heading> | 64 | <heading scroll="no">Request Dialog</heading> |
65 | <p>Request dialog is aimed to let you form read or write request. You may set the following options:</p> | 65 | <p>Request dialog is aimed to let you form read or write request. You may set the following options:</p> |
66 | <ul> | 66 | <ul> |
67 | <li><b>Local File</b> - You can change the name of the file you're sending (or destination in case you're receiving) right here. You may also use <b>Browse</b> button to select the file.</li> | 67 | <li><b>Local File</b> - You can change the name of the file you're sending (or destination in case you're receiving) right here. You may also use <b>Browse</b> button to select the file.</li> |
68 | <li><b>Remote File</b> Specifies the name of file on the remote host you're requesting (in case of read request) or the name of file you want your file to appear as (in case of write request).</li> | 68 | <li><b>Remote File</b> Specifies the name of file on the remote host you're requesting (in case of read request) or the name of file you want your file to appear as (in case of write request).</li> |
69 | <li><b>Remote Host</b> is your party's host or <term>TFTP</term> server you're requesting file from/sending file to. To refresh the list of your talk windows use <b>REFRESH</b> button.</li> | 69 | <li><b>Remote Host</b> is your party's host or <term>TFTP</term> server you're requesting file from/sending file to. To refresh the list of your talk windows use <b>REFRESH</b> button.</li> |
70 | <li><b>Type</b> is the type of transfer as defined in <rfc num="1350"/>. Doesn't mean much, really. Defined types are '<i>octet</i>' or '<i>netascii</i>'. Default is '<i>octet</i>'.</li> | 70 | <li><b>Type</b> is the type of transfer as defined in <rfc num="1350"/>. Doesn't mean much, really. Defined types are '<i>octet</i>' or '<i>netascii</i>'. Default is '<i>octet</i>'.</li> |
71 | <li><b>Block Size</b> - Use this block size if remote is <rfc num="1783"/>-compliant. If remote doesn't support this option <kin>PumpKIN</kin> will fallback to 512 bytes per block.</li> | 71 | <li><b>Block Size</b> - Use this block size if remote is <rfc num="1783"/>-compliant. If remote doesn't support this option <kin>PumpKIN</kin> will fallback to 512 bytes per block.</li> |
72 | </ul> | 72 | </ul> |
73 | </topic> | 73 | </topic> |
74 | <topic id="Options" title="Options"> | 74 | <topic id="Options" title="Options"> |
75 | <heading scroll="no">Options</heading> | 75 | <heading scroll="no">Options</heading> |
76 | <p><kin>PumpKIN</kin> options property sheet consists of two tabs. For more information see <a href="#NetworkOptions"><b>Network</b></a> and <a herf="#ServerOptions"><b>Server</b></a> options.</p> | 76 | <p><kin>PumpKIN</kin> options property sheet consists of two tabs. For more information see <a href="#NetworkOptions"><b>Network</b></a> and <a herf="#ServerOptions"><b>Server</b></a> options.</p> |
77 | </topic> | 77 | </topic> |
78 | <topic id="NetworkOptions" title="Network Options"> | 78 | <topic id="NetworkOptions" title="Network Options"> |
79 | <heading scroll="no">Network Options</heading> | 79 | <heading scroll="no">Network Options</heading> |
80 | <ul> | 80 | <ul> |
81 | <li><b>UDP Ports</b> | 81 | <li><b>UDP Ports</b> |
82 | <ul> | 82 | <ul> |
83 | <li><b>Listen for incoming connections on port</b> - specifies the port we're listening to. The default as defined in <rfc num="1350"/> is 69.</li> | 83 | <li><b>Listen for incoming connections on port</b> - specifies the port we're listening to. The default as defined in <rfc num="1350"/> is 69.</li> |
84 | <li><b>ip address</b> - ip address to listen to.</li> | ||
84 | <li><b>Send outgoing requests to port</b> - specifies the port we're going to send all requests to.</li> | 85 | <li><b>Send outgoing requests to port</b> - specifies the port we're going to send all requests to.</li> |
85 | </ul> | 86 | </ul> |
86 | </li> | 87 | </li> |
87 | <li><b>Default Connection timeout</b> - if there's no activity for specified time, transfer is considered to be dead and terminated. <kin>PumpKIN</kin> tries to propagate this value to remote as described in <rfc num="1782"/> and <rfc num="1784"/> if possible.</li> | 88 | <li><b>Default Connection timeout</b> - if there's no activity for specified time, transfer is considered to be dead and terminated. <kin>PumpKIN</kin> tries to propagate this value to remote as described in <rfc num="1782"/> and <rfc num="1784"/> if possible.</li> |
88 | <li><b>Default Block Size</b> - <kin>PumpKIN</kin> tries to negotiate block size with remote using this value unless specified explicitly in request. If remote doesn't support <rfc num="1782"/> and <rfc num="1783"/> <kin>PumpKIN</kin> falls back to 512 bytes per block.</li> | 89 | <li><b>Default Block Size</b> - <kin>PumpKIN</kin> tries to negotiate block size with remote using this value unless specified explicitly in request. If remote doesn't support <rfc num="1782"/> and <rfc num="1783"/> <kin>PumpKIN</kin> falls back to 512 bytes per block.</li> |
89 | </ul> | 90 | </ul> |
90 | </topic> | 91 | </topic> |
91 | <topic id="ServerOptions" title="Server Options"> | 92 | <topic id="ServerOptions" title="Server Options"> |
92 | <heading scroll="no">Server Options</heading> | 93 | <heading scroll="no">Server Options</heading> |
93 | <ul> | 94 | <ul> |
94 | <li><b>TFTP Filesystem root</b> - Specifies the location of files you're transmitting or where to start looking for them from. Defaults to the directory you start <kin>PumpKIN</kin> for the first time from.</li> | 95 | <li><b>TFTP Filesystem root</b> - Specifies the location of files you're transmitting or where to start looking for them from. Defaults to the directory you start <kin>PumpKIN</kin> for the first time from.</li> |
95 | <li><b>Allow access to subdirectories</b> - specifies whether you want allow access to the whole subtree of <b>TFTP Root</b> or only to the directory itself.</li> | 96 | <li><b>Allow access to subdirectories</b> - specifies whether you want allow access to the whole subtree of <b>TFTP Root</b> or only to the directory itself.</li> |
96 | <li><b>Read Request Behavior</b> - You may choose to automatically agree to give all files requested, to be prompted to confirm these operations, or to deny all requests as if you're not even here.</li> | 97 | <li><b>Read Request Behavior</b> - You may choose to automatically agree to give all files requested, to be prompted to confirm these operations, or to deny all requests as if you're not even here.</li> |
97 | <li><b>Write Request Behavior</b> - You may chose to <b>take all files</b> (<i>not recommended</i>), to <b>prompt only if file exists already</b>, <b>Always prompt</b> or <b>Deny all requests</b>.</li> | 98 | <li><b>Write Request Behavior</b> - You may chose to <b>take all files</b> (<i>not recommended</i>), to <b>prompt only if file exists already</b>, <b>Always prompt</b> or <b>Deny all requests</b>.</li> |
98 | <li><a name="ConfirmationTimeOut"/><b>Confirmation timeout</b> - this is the time <kin>PumpKIN</kin> will wait for you to accept or deny request before it will give up and take default action which is always deny.</li> | 99 | <li><a name="ConfirmationTimeOut"/><b>Confirmation timeout</b> - this is the time <kin>PumpKIN</kin> will wait for you to accept or deny request before it will give up and take default action which is always deny.</li> |
99 | <li><b>Log file</b> - If you want to enable logging to file, set the destination file here.</li> | 100 | <li><b>Log file</b> - If you want to enable logging to file, set the destination file here.</li> |
100 | </ul> | 101 | </ul> |
101 | </topic> | 102 | </topic> |
102 | <topic id="SoundsOptions" title="Sounds Options"> | 103 | <topic id="SoundsOptions" title="Sounds Options"> |
103 | <heading scroll="no">Sounds</heading> | 104 | <heading scroll="no">Sounds</heading> |
104 | <p>You can customize <kin>PumpKIN</kin> sounds notifications here. There are three customizable sounds defined - <b>Incoming request</b>, which notifies you about incoming request prompt if you're set to be prompted whenever incoming request occurs. <b>xfer Aborted</b> - which happens to sound every time transfer is interrupted for whatever reason - time out, explicit kill, denied access, etc. <b>xfer Finished</b> means that your file was successfully transmitted.</p> | 105 | <p>You can customize <kin>PumpKIN</kin> sounds notifications here. There are three customizable sounds defined - <b>Incoming request</b>, which notifies you about incoming request prompt if you're set to be prompted whenever incoming request occurs. <b>xfer Aborted</b> - which happens to sound every time transfer is interrupted for whatever reason - time out, explicit kill, denied access, etc. <b>xfer Finished</b> means that your file was successfully transmitted.</p> |
105 | <p>You can select any <b>.wav</b> file or one of the predefined sounds from the dropdown list.</p> | 106 | <p>You can select any <b>.wav</b> file or one of the predefined sounds from the dropdown list.</p> |
106 | </topic> | 107 | </topic> |
107 | <topic id="ACL" title="Access Lists"> | 108 | <topic id="ACL" title="Access Lists"> |
108 | <heading scroll="no">Access Lists</heading> | 109 | <heading scroll="no">Access Lists</heading> |
109 | <p>You can slightly automate your access policies by setting up read/write request behavior for different incoming requests.</p> | 110 | <p>You can slightly automate your access policies by setting up read/write request behavior for different incoming requests.</p> |
110 | <p>The rule consists of <b>request type</b>, source network (<b>ip</b> and <b>netmask</b>) and <b>action</b> to take (see also <a href="#ServerOptions">Server Options</a>).</p> | 111 | <p>The rule consists of <b>request type</b>, source network (<b>ip</b> and <b>netmask</b>) and <b>action</b> to take (see also <a href="#ServerOptions">Server Options</a>).</p> |
111 | <p>When <kin>PumpKIN</kin> receives request it goes through the list of rules and bases its decision on the first matching rule. To rearrange order of rules, select the rule you wish to move and use up and down arrows buttons on the right. To remove rule, use the cross button.</p> | 112 | <p>When <kin>PumpKIN</kin> receives request it goes through the list of rules and bases its decision on the first matching rule. To rearrange order of rules, select the rule you wish to move and use up and down arrows buttons on the right. To remove rule, use the cross button.</p> |
112 | <p>To add a new rule fill in the information about <b>request type</b>, source <b>address</b> and <b>netmask</b> and desired action. Then click on the 'Add new rule' button.</p> | 113 | <p>To add a new rule fill in the information about <b>request type</b>, source <b>address</b> and <b>netmask</b> and desired action. Then click on the 'Add new rule' button.</p> |
113 | <p>If you wish to amend the rule, select it in the rules list, change parameters below and click the 'Replace rule' button.</p> | 114 | <p>If you wish to amend the rule, select it in the rules list, change parameters below and click the 'Replace rule' button.</p> |
114 | </topic> | 115 | </topic> |
115 | </winhelp> | 116 | </winhelp> |
diff --git a/pumpkin.clw b/pumpkin.clw index 213d8c1..7fa927b 100644 --- a/pumpkin.clw +++ b/pumpkin.clw | |||
@@ -1,327 +1,329 @@ | |||
1 | ; CLW file contains information for the MFC ClassWizard | 1 | ; CLW file contains information for the MFC ClassWizard |
2 | 2 | ||
3 | [General Info] | 3 | [General Info] |
4 | Version=1 | 4 | Version=1 |
5 | LastClass=CPumpKINDlg | 5 | LastClass=CPropsNetwork |
6 | LastTemplate=CComboBox | 6 | LastTemplate=CComboBox |
7 | NewFileInclude1=#include "stdafx.h" | 7 | NewFileInclude1=#include "stdafx.h" |
8 | NewFileInclude2=#include "PumpKIN.h" | 8 | NewFileInclude2=#include "PumpKIN.h" |
9 | 9 | ||
10 | ClassCount=14 | 10 | ClassCount=14 |
11 | Class1=CPumpKINApp | 11 | Class1=CPumpKINApp |
12 | Class2=CPumpKINDlg | 12 | Class2=CPumpKINDlg |
13 | Class3=CAboutDlg | 13 | Class3=CAboutDlg |
14 | 14 | ||
15 | ResourceCount=10 | 15 | ResourceCount=10 |
16 | Resource1=IDD_REQUEST | 16 | Resource1=IDD_REQUEST |
17 | Resource2=IDD_PROPS_NETWORK | 17 | Resource2=IDD_PUMPKIN_DIALOG |
18 | Resource3=IDD_CONFIRM_RRQ | 18 | Resource3=IDD_CONFIRM_RRQ |
19 | Resource4=IDD_PROPS_SERVER | 19 | Resource4=IDD_PROPS_SERVER |
20 | Class4=CPropsServer | 20 | Class4=CPropsServer |
21 | Class5=CPropsNetwork | 21 | Class5=CPropsNetwork |
22 | Resource5=IDD_CONFIRM_WRQ | 22 | Resource5=IDD_CONFIRM_WRQ |
23 | Resource6=IDD_PROPS_ACL | 23 | Resource6=IDD_PROPS_ACL |
24 | Class6=CConfirmRRQDlg | 24 | Class6=CConfirmRRQDlg |
25 | Class7=CConfirmWRQDlg | 25 | Class7=CConfirmWRQDlg |
26 | Resource7=IDD_ABOUTBOX | 26 | Resource7=IDD_ABOUTBOX |
27 | Class8=CRequestDlg | 27 | Class8=CRequestDlg |
28 | Class9=CResolver | 28 | Class9=CResolver |
29 | Class10=CRetrier | 29 | Class10=CRetrier |
30 | Class11=CTrayer | 30 | Class11=CTrayer |
31 | Resource8=IDD_PROPS_SOUNDS | 31 | Resource8=IDD_PROPS_SOUNDS |
32 | Class12=CPropsSounds | 32 | Class12=CPropsSounds |
33 | Resource9=IDM_POPUPS | 33 | Resource9=IDM_POPUPS |
34 | Class13=CPropsACL | 34 | Class13=CPropsACL |
35 | Class14=CACLTargetCombo | 35 | Class14=CACLTargetCombo |
36 | Resource10=IDD_PUMPKIN_DIALOG | 36 | Resource10=IDD_PROPS_NETWORK |
37 | 37 | ||
38 | [CLS:CPumpKINApp] | 38 | [CLS:CPumpKINApp] |
39 | Type=0 | 39 | Type=0 |
40 | HeaderFile=PumpKIN.h | 40 | HeaderFile=PumpKIN.h |
41 | ImplementationFile=PumpKIN.cpp | 41 | ImplementationFile=PumpKIN.cpp |
42 | Filter=N | 42 | Filter=N |
43 | 43 | ||
44 | [CLS:CPumpKINDlg] | 44 | [CLS:CPumpKINDlg] |
45 | Type=0 | 45 | Type=0 |
46 | HeaderFile=PumpKINDlg.h | 46 | HeaderFile=PumpKINDlg.h |
47 | ImplementationFile=PumpKINDlg.cpp | 47 | ImplementationFile=PumpKINDlg.cpp |
48 | Filter=W | 48 | Filter=W |
49 | BaseClass=CDialog | 49 | BaseClass=CDialog |
50 | VirtualFilter=dWC | 50 | VirtualFilter=dWC |
51 | LastObject=CPumpKINDlg | 51 | LastObject=CPumpKINDlg |
52 | 52 | ||
53 | [CLS:CAboutDlg] | 53 | [CLS:CAboutDlg] |
54 | Type=0 | 54 | Type=0 |
55 | HeaderFile=PumpKINDlg.h | 55 | HeaderFile=PumpKINDlg.h |
56 | ImplementationFile=PumpKINDlg.cpp | 56 | ImplementationFile=PumpKINDlg.cpp |
57 | Filter=D | 57 | Filter=D |
58 | BaseClass=CDialog | 58 | BaseClass=CDialog |
59 | VirtualFilter=dWC | 59 | VirtualFilter=dWC |
60 | LastObject=CAboutDlg | 60 | LastObject=CAboutDlg |
61 | 61 | ||
62 | [DLG:IDD_ABOUTBOX] | 62 | [DLG:IDD_ABOUTBOX] |
63 | Type=1 | 63 | Type=1 |
64 | Class=CAboutDlg | 64 | Class=CAboutDlg |
65 | ControlCount=5 | 65 | ControlCount=5 |
66 | Control1=IDC_STATIC,static,1342177283 | 66 | Control1=IDC_STATIC,static,1342177283 |
67 | Control2=IDC_STATIC,static,1342308480 | 67 | Control2=IDC_STATIC,static,1342308480 |
68 | Control3=IDC_STATIC,static,1342308352 | 68 | Control3=IDC_STATIC,static,1342308352 |
69 | Control4=IDOK,button,1342373889 | 69 | Control4=IDOK,button,1342373889 |
70 | Control5=IDC_KLEVERNET,button,1342242816 | 70 | Control5=IDC_KLEVERNET,button,1342242816 |
71 | 71 | ||
72 | [DLG:IDD_PUMPKIN_DIALOG] | 72 | [DLG:IDD_PUMPKIN_DIALOG] |
73 | Type=1 | 73 | Type=1 |
74 | Class=CPumpKINDlg | 74 | Class=CPumpKINDlg |
75 | ControlCount=10 | 75 | ControlCount=10 |
76 | Control1=IDC_CONNECTIONS,SysListView32,1350631681 | 76 | Control1=IDC_CONNECTIONS,SysListView32,1350631681 |
77 | Control2=IDC_GET,button,1342259200 | 77 | Control2=IDC_GET,button,1342259200 |
78 | Control3=IDC_PUT,button,1342259200 | 78 | Control3=IDC_PUT,button,1342259200 |
79 | Control4=IDC_ABORT,button,1342259200 | 79 | Control4=IDC_ABORT,button,1342259200 |
80 | Control5=IDC_OPTIONS,button,1342259200 | 80 | Control5=IDC_OPTIONS,button,1342259200 |
81 | Control6=IDC_EXIT,button,1342259200 | 81 | Control6=IDC_EXIT,button,1342259200 |
82 | Control7=ID_HELP,button,1342259200 | 82 | Control7=ID_HELP,button,1342259200 |
83 | Control8=IDC_LOG,listbox,1353728385 | 83 | Control8=IDC_LOG,listbox,1353728385 |
84 | Control9=IDCANCEL,button,1073741824 | 84 | Control9=IDCANCEL,button,1073741824 |
85 | Control10=IDC_LISTENING,button,1342275619 | 85 | Control10=IDC_LISTENING,button,1342275619 |
86 | 86 | ||
87 | [DLG:IDD_PROPS_SERVER] | 87 | [DLG:IDD_PROPS_SERVER] |
88 | Type=1 | 88 | Type=1 |
89 | Class=CPropsServer | 89 | Class=CPropsServer |
90 | ControlCount=18 | 90 | ControlCount=18 |
91 | Control1=IDC_STATIC,button,1342177287 | 91 | Control1=IDC_STATIC,button,1342177287 |
92 | Control2=IDC_TFTPROOT,edit,1350631552 | 92 | Control2=IDC_TFTPROOT,edit,1350631552 |
93 | Control3=IDC_BROWSE,button,1342242880 | 93 | Control3=IDC_BROWSE,button,1342242880 |
94 | Control4=IDC_TFTPSUBDIRS,button,1342242819 | 94 | Control4=IDC_TFTPSUBDIRS,button,1342242819 |
95 | Control5=IDC_STATIC,button,1342177287 | 95 | Control5=IDC_STATIC,button,1342177287 |
96 | Control6=IDC_RRQ_GIVEALL,button,1342324745 | 96 | Control6=IDC_RRQ_GIVEALL,button,1342324745 |
97 | Control7=IDC_RRQ_ALWAYSCONFIRM,button,1342193673 | 97 | Control7=IDC_RRQ_ALWAYSCONFIRM,button,1342193673 |
98 | Control8=IDC_RRQ_DENYALL,button,1342193673 | 98 | Control8=IDC_RRQ_DENYALL,button,1342193673 |
99 | Control9=IDC_STATIC,button,1342308359 | 99 | Control9=IDC_STATIC,button,1342308359 |
100 | Control10=IDC_WRQ_TAKEALL,button,1342308361 | 100 | Control10=IDC_WRQ_TAKEALL,button,1342308361 |
101 | Control11=IDC_WRQ_PROMPTEXISTING,button,1342177289 | 101 | Control11=IDC_WRQ_PROMPTEXISTING,button,1342177289 |
102 | Control12=IDC_WRQ_ALWAYSCONFIRM,button,1342177289 | 102 | Control12=IDC_WRQ_ALWAYSCONFIRM,button,1342177289 |
103 | Control13=IDC_WRQ_DENYALL,button,1342177289 | 103 | Control13=IDC_WRQ_DENYALL,button,1342177289 |
104 | Control14=IDC_STATIC,static,1342308609 | 104 | Control14=IDC_STATIC,static,1342308609 |
105 | Control15=IDC_PROMPTTIMEOUT,msctls_trackbar32,1342242823 | 105 | Control15=IDC_PROMPTTIMEOUT,msctls_trackbar32,1342242823 |
106 | Control16=IDC_STATIC,button,1342177287 | 106 | Control16=IDC_STATIC,button,1342177287 |
107 | Control17=IDC_LOGFILE,edit,1350631552 | 107 | Control17=IDC_LOGFILE,edit,1350631552 |
108 | Control18=IDC_LOGFILE_BROWSE,button,1342242880 | 108 | Control18=IDC_LOGFILE_BROWSE,button,1342242880 |
109 | 109 | ||
110 | [DLG:IDD_PROPS_NETWORK] | 110 | [DLG:IDD_PROPS_NETWORK] |
111 | Type=1 | 111 | Type=1 |
112 | Class=CPropsNetwork | 112 | Class=CPropsNetwork |
113 | ControlCount=15 | 113 | ControlCount=17 |
114 | Control1=IDC_STATIC,button,1342177287 | 114 | Control1=IDC_STATIC,button,1342177287 |
115 | Control2=IDC_STATIC,static,1342308354 | 115 | Control2=IDC_STATIC,static,1342308354 |
116 | Control3=IDC_LISTENPORT,edit,1350631552 | 116 | Control3=IDC_LISTENPORT,edit,1350631552 |
117 | Control4=IDC_LISTENSPIN,msctls_updown32,1342177463 | 117 | Control4=IDC_LISTENSPIN,msctls_updown32,1342177463 |
118 | Control5=IDC_STATIC,static,1342308354 | 118 | Control5=IDC_STATIC,static,1342308354 |
119 | Control6=IDC_SPEAKPORT,edit,1350631552 | 119 | Control6=IDC_SPEAKPORT,edit,1350631552 |
120 | Control7=IDC_SPEAKSPIN,msctls_updown32,1342177463 | 120 | Control7=IDC_SPEAKSPIN,msctls_updown32,1342177463 |
121 | Control8=IDC_STATIC,static,1342308352 | 121 | Control8=IDC_STATIC,static,1342308352 |
122 | Control9=IDC_TIMEOUT,edit,1350639744 | 122 | Control9=IDC_TIMEOUT,edit,1350639744 |
123 | Control10=IDC_TIMESPIN,msctls_updown32,1342177463 | 123 | Control10=IDC_TIMESPIN,msctls_updown32,1342177463 |
124 | Control11=IDC_STATIC,static,1342308352 | 124 | Control11=IDC_STATIC,static,1342308352 |
125 | Control12=IDC_STATIC,static,1342308352 | 125 | Control12=IDC_STATIC,static,1342308352 |
126 | Control13=IDC_STATIC,static,1342308352 | 126 | Control13=IDC_STATIC,static,1342308352 |
127 | Control14=IDC_BLOCKSIZE,edit,1350639744 | 127 | Control14=IDC_BLOCKSIZE,edit,1350639744 |
128 | Control15=IDC_BSIZESPIN,msctls_updown32,1342177463 | 128 | Control15=IDC_BSIZESPIN,msctls_updown32,1342177463 |
129 | Control16=IDC_STATIC,static,1342308354 | ||
130 | Control17=IDC_LISTENADDRESS,edit,1350631552 | ||
129 | 131 | ||
130 | [CLS:CPropsServer] | 132 | [CLS:CPropsServer] |
131 | Type=0 | 133 | Type=0 |
132 | HeaderFile=PropsServer.h | 134 | HeaderFile=PropsServer.h |
133 | ImplementationFile=PropsServer.cpp | 135 | ImplementationFile=PropsServer.cpp |
134 | BaseClass=CPropertyPage | 136 | BaseClass=CPropertyPage |
135 | Filter=D | 137 | Filter=D |
136 | VirtualFilter=idWC | 138 | VirtualFilter=idWC |
137 | LastObject=CPropsServer | 139 | LastObject=CPropsServer |
138 | 140 | ||
139 | [CLS:CPropsNetwork] | 141 | [CLS:CPropsNetwork] |
140 | Type=0 | 142 | Type=0 |
141 | HeaderFile=PropsNetwork.h | 143 | HeaderFile=PropsNetwork.h |
142 | ImplementationFile=PropsNetwork.cpp | 144 | ImplementationFile=PropsNetwork.cpp |
143 | BaseClass=CPropertyPage | 145 | BaseClass=CPropertyPage |
144 | Filter=D | 146 | Filter=D |
145 | VirtualFilter=idWC | 147 | VirtualFilter=idWC |
146 | LastObject=IDC_BLOCKSIZE | 148 | LastObject=IDC_LISTENADDRESS |
147 | 149 | ||
148 | [DLG:IDD_CONFIRM_RRQ] | 150 | [DLG:IDD_CONFIRM_RRQ] |
149 | Type=1 | 151 | Type=1 |
150 | Class=CConfirmRRQDlg | 152 | Class=CConfirmRRQDlg |
151 | ControlCount=9 | 153 | ControlCount=9 |
152 | Control1=IDOK,button,1342242817 | 154 | Control1=IDOK,button,1342242817 |
153 | Control2=IDCANCEL,button,1342242816 | 155 | Control2=IDCANCEL,button,1342242816 |
154 | Control3=IDC_STATIC,static,1342308352 | 156 | Control3=IDC_STATIC,static,1342308352 |
155 | Control4=IDC_HOST,static,1350701313 | 157 | Control4=IDC_HOST,static,1350701313 |
156 | Control5=IDC_STATIC,static,1342308353 | 158 | Control5=IDC_STATIC,static,1342308353 |
157 | Control6=IDC_FILE,static,1350701313 | 159 | Control6=IDC_FILE,static,1350701313 |
158 | Control7=IDC_STATIC,static,1342177296 | 160 | Control7=IDC_STATIC,static,1342177296 |
159 | Control8=IDC_STATIC,static,1342177283 | 161 | Control8=IDC_STATIC,static,1342177283 |
160 | Control9=IDC_STATIC,static,1342177283 | 162 | Control9=IDC_STATIC,static,1342177283 |
161 | 163 | ||
162 | [DLG:IDD_CONFIRM_WRQ] | 164 | [DLG:IDD_CONFIRM_WRQ] |
163 | Type=1 | 165 | Type=1 |
164 | Class=CConfirmWRQDlg | 166 | Class=CConfirmWRQDlg |
165 | ControlCount=11 | 167 | ControlCount=11 |
166 | Control1=IDOK,button,1342242817 | 168 | Control1=IDOK,button,1342242817 |
167 | Control2=IDC_RENAME,button,1342242816 | 169 | Control2=IDC_RENAME,button,1342242816 |
168 | Control3=IDCANCEL,button,1342242816 | 170 | Control3=IDCANCEL,button,1342242816 |
169 | Control4=IDC_STATIC,static,1342308352 | 171 | Control4=IDC_STATIC,static,1342308352 |
170 | Control5=IDC_HOST,static,1350701313 | 172 | Control5=IDC_HOST,static,1350701313 |
171 | Control6=IDC_STATIC,static,1342308353 | 173 | Control6=IDC_STATIC,static,1342308353 |
172 | Control7=IDC_FILE,static,1350701313 | 174 | Control7=IDC_FILE,static,1350701313 |
173 | Control8=IDC_STATIC,static,1342177296 | 175 | Control8=IDC_STATIC,static,1342177296 |
174 | Control9=IDC_STATIC,static,1342177283 | 176 | Control9=IDC_STATIC,static,1342177283 |
175 | Control10=IDC_STATIC,static,1342177283 | 177 | Control10=IDC_STATIC,static,1342177283 |
176 | Control11=IDC_RESUME,button,1342242816 | 178 | Control11=IDC_RESUME,button,1342242816 |
177 | 179 | ||
178 | [CLS:CConfirmRRQDlg] | 180 | [CLS:CConfirmRRQDlg] |
179 | Type=0 | 181 | Type=0 |
180 | HeaderFile=ConfirmRRQDlg.h | 182 | HeaderFile=ConfirmRRQDlg.h |
181 | ImplementationFile=ConfirmRRQDlg.cpp | 183 | ImplementationFile=ConfirmRRQDlg.cpp |
182 | BaseClass=CDialog | 184 | BaseClass=CDialog |
183 | Filter=D | 185 | Filter=D |
184 | VirtualFilter=dWC | 186 | VirtualFilter=dWC |
185 | LastObject=CConfirmRRQDlg | 187 | LastObject=CConfirmRRQDlg |
186 | 188 | ||
187 | [CLS:CConfirmWRQDlg] | 189 | [CLS:CConfirmWRQDlg] |
188 | Type=0 | 190 | Type=0 |
189 | HeaderFile=ConfirmWRQDlg.h | 191 | HeaderFile=ConfirmWRQDlg.h |
190 | ImplementationFile=ConfirmWRQDlg.cpp | 192 | ImplementationFile=ConfirmWRQDlg.cpp |
191 | BaseClass=CDialog | 193 | BaseClass=CDialog |
192 | Filter=D | 194 | Filter=D |
193 | VirtualFilter=dWC | 195 | VirtualFilter=dWC |
194 | LastObject=IDC_RESUME | 196 | LastObject=IDC_RESUME |
195 | 197 | ||
196 | [DLG:IDD_REQUEST] | 198 | [DLG:IDD_REQUEST] |
197 | Type=1 | 199 | Type=1 |
198 | Class=CRequestDlg | 200 | Class=CRequestDlg |
199 | ControlCount=15 | 201 | ControlCount=15 |
200 | Control1=IDC_STATIC,static,1342308608 | 202 | Control1=IDC_STATIC,static,1342308608 |
201 | Control2=IDC_LOCALFILE,edit,1350631552 | 203 | Control2=IDC_LOCALFILE,edit,1350631552 |
202 | Control3=IDC_BROWSE,button,1342242880 | 204 | Control3=IDC_BROWSE,button,1342242880 |
203 | Control4=IDC_STATIC,static,1342308608 | 205 | Control4=IDC_STATIC,static,1342308608 |
204 | Control5=IDC_REMOTEFILE,edit,1350631552 | 206 | Control5=IDC_REMOTEFILE,edit,1350631552 |
205 | Control6=IDC_STATIC,static,1342308608 | 207 | Control6=IDC_STATIC,static,1342308608 |
206 | Control7=IDC_TALKS,combobox,1344341313 | 208 | Control7=IDC_TALKS,combobox,1344341313 |
207 | Control8=IDC_REFRESH,button,1342271232 | 209 | Control8=IDC_REFRESH,button,1342271232 |
208 | Control9=IDC_STATIC,static,1342308352 | 210 | Control9=IDC_STATIC,static,1342308352 |
209 | Control10=IDC_TYPE,combobox,1344356418 | 211 | Control10=IDC_TYPE,combobox,1344356418 |
210 | Control11=IDC_STATIC,static,1342308352 | 212 | Control11=IDC_STATIC,static,1342308352 |
211 | Control12=IDC_BSIZE,combobox,1344339970 | 213 | Control12=IDC_BSIZE,combobox,1344339970 |
212 | Control13=IDOK,button,1342242817 | 214 | Control13=IDOK,button,1342242817 |
213 | Control14=IDCANCEL,button,1342242816 | 215 | Control14=IDCANCEL,button,1342242816 |
214 | Control15=IDC_STATIC,static,1342177297 | 216 | Control15=IDC_STATIC,static,1342177297 |
215 | 217 | ||
216 | [CLS:CRequestDlg] | 218 | [CLS:CRequestDlg] |
217 | Type=0 | 219 | Type=0 |
218 | HeaderFile=RequestDlg.h | 220 | HeaderFile=RequestDlg.h |
219 | ImplementationFile=RequestDlg.cpp | 221 | ImplementationFile=RequestDlg.cpp |
220 | BaseClass=CDialog | 222 | BaseClass=CDialog |
221 | Filter=W | 223 | Filter=W |
222 | VirtualFilter=dWC | 224 | VirtualFilter=dWC |
223 | LastObject=CRequestDlg | 225 | LastObject=CRequestDlg |
224 | 226 | ||
225 | [CLS:CResolver] | 227 | [CLS:CResolver] |
226 | Type=0 | 228 | Type=0 |
227 | HeaderFile=Resolver.h | 229 | HeaderFile=Resolver.h |
228 | ImplementationFile=Resolver.cpp | 230 | ImplementationFile=Resolver.cpp |
229 | BaseClass=CWnd | 231 | BaseClass=CWnd |
230 | Filter=W | 232 | Filter=W |
231 | LastObject=CResolver | 233 | LastObject=CResolver |
232 | VirtualFilter=WC | 234 | VirtualFilter=WC |
233 | 235 | ||
234 | [MNU:IDM_POPUPS] | 236 | [MNU:IDM_POPUPS] |
235 | Type=1 | 237 | Type=1 |
236 | Class=CPumpKINDlg | 238 | Class=CPumpKINDlg |
237 | Command1=ID_TRAY_SENDFILE | 239 | Command1=ID_TRAY_SENDFILE |
238 | Command2=ID_TRAY_FETCHFILE | 240 | Command2=ID_TRAY_FETCHFILE |
239 | Command3=ID_TRAY_OPTIONS | 241 | Command3=ID_TRAY_OPTIONS |
240 | Command4=ID_TRAY_LISTEN | 242 | Command4=ID_TRAY_LISTEN |
241 | Command5=ID_TRAY_SHOWPUMPKINWINDOW | 243 | Command5=ID_TRAY_SHOWPUMPKINWINDOW |
242 | Command6=ID_TRAY_OPENFILESFOLDER | 244 | Command6=ID_TRAY_OPENFILESFOLDER |
243 | Command7=ID_TRAY_HELP | 245 | Command7=ID_TRAY_HELP |
244 | Command8=ID_TRAY_ABOUTPUMPKIN | 246 | Command8=ID_TRAY_ABOUTPUMPKIN |
245 | Command9=ID_TRAY_EXIT | 247 | Command9=ID_TRAY_EXIT |
246 | CommandCount=9 | 248 | CommandCount=9 |
247 | 249 | ||
248 | [CLS:CRetrier] | 250 | [CLS:CRetrier] |
249 | Type=0 | 251 | Type=0 |
250 | HeaderFile=Retrier.h | 252 | HeaderFile=Retrier.h |
251 | ImplementationFile=Retrier.cpp | 253 | ImplementationFile=Retrier.cpp |
252 | BaseClass=CWnd | 254 | BaseClass=CWnd |
253 | Filter=W | 255 | Filter=W |
254 | LastObject=CRetrier | 256 | LastObject=CRetrier |
255 | VirtualFilter=WC | 257 | VirtualFilter=WC |
256 | 258 | ||
257 | [CLS:CTrayer] | 259 | [CLS:CTrayer] |
258 | Type=0 | 260 | Type=0 |
259 | HeaderFile=Trayer.h | 261 | HeaderFile=Trayer.h |
260 | ImplementationFile=Trayer.cpp | 262 | ImplementationFile=Trayer.cpp |
261 | BaseClass=CWnd | 263 | BaseClass=CWnd |
262 | Filter=W | 264 | Filter=W |
263 | LastObject=CTrayer | 265 | LastObject=CTrayer |
264 | VirtualFilter=WC | 266 | VirtualFilter=WC |
265 | 267 | ||
266 | [DLG:IDD_PROPS_SOUNDS] | 268 | [DLG:IDD_PROPS_SOUNDS] |
267 | Type=1 | 269 | Type=1 |
268 | Class=CPropsSounds | 270 | Class=CPropsSounds |
269 | ControlCount=12 | 271 | ControlCount=12 |
270 | Control1=IDC_STATIC,static,1342308352 | 272 | Control1=IDC_STATIC,static,1342308352 |
271 | Control2=IDC_RING,combobox,1344340290 | 273 | Control2=IDC_RING,combobox,1344340290 |
272 | Control3=IDC_RING_BROWSE,button,1342242880 | 274 | Control3=IDC_RING_BROWSE,button,1342242880 |
273 | Control4=IDC_RING_PLAY,button,1342242880 | 275 | Control4=IDC_RING_PLAY,button,1342242880 |
274 | Control5=IDC_STATIC,static,1342308352 | 276 | Control5=IDC_STATIC,static,1342308352 |
275 | Control6=IDC_FINISHED,combobox,1344340290 | 277 | Control6=IDC_FINISHED,combobox,1344340290 |
276 | Control7=IDC_FINISHED_BROWSE,button,1342242880 | 278 | Control7=IDC_FINISHED_BROWSE,button,1342242880 |
277 | Control8=IDC_FINISHED_PLAY,button,1342242880 | 279 | Control8=IDC_FINISHED_PLAY,button,1342242880 |
278 | Control9=IDC_STATIC,static,1342308352 | 280 | Control9=IDC_STATIC,static,1342308352 |
279 | Control10=IDC_ABORTED,combobox,1344340290 | 281 | Control10=IDC_ABORTED,combobox,1344340290 |
280 | Control11=IDC_ABORTED_BROWSE,button,1342242880 | 282 | Control11=IDC_ABORTED_BROWSE,button,1342242880 |
281 | Control12=IDC_ABORTED_PLAY,button,1342242880 | 283 | Control12=IDC_ABORTED_PLAY,button,1342242880 |
282 | 284 | ||
283 | [CLS:CPropsSounds] | 285 | [CLS:CPropsSounds] |
284 | Type=0 | 286 | Type=0 |
285 | HeaderFile=PropsSounds.h | 287 | HeaderFile=PropsSounds.h |
286 | ImplementationFile=PropsSounds.cpp | 288 | ImplementationFile=PropsSounds.cpp |
287 | BaseClass=CPropertyPage | 289 | BaseClass=CPropertyPage |
288 | Filter=D | 290 | Filter=D |
289 | LastObject=CPropsSounds | 291 | LastObject=CPropsSounds |
290 | VirtualFilter=idWC | 292 | VirtualFilter=idWC |
291 | 293 | ||
292 | [DLG:IDD_PROPS_ACL] | 294 | [DLG:IDD_PROPS_ACL] |
293 | Type=1 | 295 | Type=1 |
294 | Class=CPropsACL | 296 | Class=CPropsACL |
295 | ControlCount=14 | 297 | ControlCount=14 |
296 | Control1=IDC_ACL_LIST,SysListView32,1350631425 | 298 | Control1=IDC_ACL_LIST,SysListView32,1350631425 |
297 | Control2=IDC_ACL_UP,button,1342246720 | 299 | Control2=IDC_ACL_UP,button,1342246720 |
298 | Control3=IDC_ACL_DOWN,button,1342246720 | 300 | Control3=IDC_ACL_DOWN,button,1342246720 |
299 | Control4=IDC_ACL_REMOVE,button,1342246720 | 301 | Control4=IDC_ACL_REMOVE,button,1342246720 |
300 | Control5=IDC_STATIC,static,1342308352 | 302 | Control5=IDC_STATIC,static,1342308352 |
301 | Control6=IDC_ACL_XFER,combobox,1344339971 | 303 | Control6=IDC_ACL_XFER,combobox,1344339971 |
302 | Control7=IDC_STATIC,static,1342308352 | 304 | Control7=IDC_STATIC,static,1342308352 |
303 | Control8=IDC_ACL_ADDR,edit,1350631552 | 305 | Control8=IDC_ACL_ADDR,edit,1350631552 |
304 | Control9=IDC_STATIC,static,1342308352 | 306 | Control9=IDC_STATIC,static,1342308352 |
305 | Control10=IDC_ACL_NETMASK,edit,1350631552 | 307 | Control10=IDC_ACL_NETMASK,edit,1350631552 |
306 | Control11=IDC_STATIC,static,1342308352 | 308 | Control11=IDC_STATIC,static,1342308352 |
307 | Control12=IDC_ACL_RULE,combobox,1344339971 | 309 | Control12=IDC_ACL_RULE,combobox,1344339971 |
308 | Control13=IDC_ACL_ADD,button,1342242816 | 310 | Control13=IDC_ACL_ADD,button,1342242816 |
309 | Control14=IDC_ACL_REPLACE,button,1342242816 | 311 | Control14=IDC_ACL_REPLACE,button,1342242816 |
310 | 312 | ||
311 | [CLS:CPropsACL] | 313 | [CLS:CPropsACL] |
312 | Type=0 | 314 | Type=0 |
313 | HeaderFile=PropsACL.h | 315 | HeaderFile=PropsACL.h |
314 | ImplementationFile=PropsACL.cpp | 316 | ImplementationFile=PropsACL.cpp |
315 | BaseClass=CPropertyPage | 317 | BaseClass=CPropertyPage |
316 | Filter=D | 318 | Filter=D |
317 | LastObject=CPropsACL | 319 | LastObject=CPropsACL |
318 | VirtualFilter=idWC | 320 | VirtualFilter=idWC |
319 | 321 | ||
320 | [CLS:CACLTargetCombo] | 322 | [CLS:CACLTargetCombo] |
321 | Type=0 | 323 | Type=0 |
322 | HeaderFile=ACLTargetCombo.h | 324 | HeaderFile=ACLTargetCombo.h |
323 | ImplementationFile=ACLTargetCombo.cpp | 325 | ImplementationFile=ACLTargetCombo.cpp |
324 | BaseClass=CComboBox | 326 | BaseClass=CComboBox |
325 | Filter=W | 327 | Filter=W |
326 | LastObject=CACLTargetCombo | 328 | LastObject=CACLTargetCombo |
327 | 329 | ||
diff --git a/pumpkin.rc b/pumpkin.rc index f52c4bd..babd066 100644..100755 --- a/pumpkin.rc +++ b/pumpkin.rc | |||
@@ -1,687 +1,689 @@ | |||
1 | //Microsoft Developer Studio generated resource script. | 1 | //Microsoft Developer Studio generated resource script. |
2 | // | 2 | // |
3 | #include "resource.h" | 3 | #include "resource.h" |
4 | 4 | ||
5 | #define APSTUDIO_READONLY_SYMBOLS | 5 | #define APSTUDIO_READONLY_SYMBOLS |
6 | ///////////////////////////////////////////////////////////////////////////// | 6 | ///////////////////////////////////////////////////////////////////////////// |
7 | // | 7 | // |
8 | // Generated from the TEXTINCLUDE 2 resource. | 8 | // Generated from the TEXTINCLUDE 2 resource. |
9 | // | 9 | // |
10 | #include "afxres.h" | 10 | #include "afxres.h" |
11 | 11 | ||
12 | ///////////////////////////////////////////////////////////////////////////// | 12 | ///////////////////////////////////////////////////////////////////////////// |
13 | #undef APSTUDIO_READONLY_SYMBOLS | 13 | #undef APSTUDIO_READONLY_SYMBOLS |
14 | 14 | ||
15 | ///////////////////////////////////////////////////////////////////////////// | 15 | ///////////////////////////////////////////////////////////////////////////// |
16 | // English (U.S.) resources | 16 | // English (U.S.) resources |
17 | 17 | ||
18 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) | 18 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) |
19 | #ifdef _WIN32 | 19 | #ifdef _WIN32 |
20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US | 20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US |
21 | #pragma code_page(1252) | 21 | #pragma code_page(1252) |
22 | #endif //_WIN32 | 22 | #endif //_WIN32 |
23 | 23 | ||
24 | #ifdef APSTUDIO_INVOKED | 24 | #ifdef APSTUDIO_INVOKED |
25 | ///////////////////////////////////////////////////////////////////////////// | 25 | ///////////////////////////////////////////////////////////////////////////// |
26 | // | 26 | // |
27 | // TEXTINCLUDE | 27 | // TEXTINCLUDE |
28 | // | 28 | // |
29 | 29 | ||
30 | 1 TEXTINCLUDE DISCARDABLE | 30 | 1 TEXTINCLUDE DISCARDABLE |
31 | BEGIN | 31 | BEGIN |
32 | "resource.h\0" | 32 | "resource.h\0" |
33 | END | 33 | END |
34 | 34 | ||
35 | 2 TEXTINCLUDE DISCARDABLE | 35 | 2 TEXTINCLUDE DISCARDABLE |
36 | BEGIN | 36 | BEGIN |
37 | "#include ""afxres.h""\r\n" | 37 | "#include ""afxres.h""\r\n" |
38 | "\0" | 38 | "\0" |
39 | END | 39 | END |
40 | 40 | ||
41 | 3 TEXTINCLUDE DISCARDABLE | 41 | 3 TEXTINCLUDE DISCARDABLE |
42 | BEGIN | 42 | BEGIN |
43 | "#define _AFX_NO_SPLITTER_RESOURCES\r\n" | 43 | "#define _AFX_NO_SPLITTER_RESOURCES\r\n" |
44 | "#define _AFX_NO_OLE_RESOURCES\r\n" | 44 | "#define _AFX_NO_OLE_RESOURCES\r\n" |
45 | "#define _AFX_NO_TRACKER_RESOURCES\r\n" | 45 | "#define _AFX_NO_TRACKER_RESOURCES\r\n" |
46 | "#define _AFX_NO_PROPERTY_RESOURCES\r\n" | 46 | "#define _AFX_NO_PROPERTY_RESOURCES\r\n" |
47 | "\r\n" | 47 | "\r\n" |
48 | "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" | 48 | "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" |
49 | "#ifdef _WIN32\r\n" | 49 | "#ifdef _WIN32\r\n" |
50 | "LANGUAGE 9, 1\r\n" | 50 | "LANGUAGE 9, 1\r\n" |
51 | "#pragma code_page(1252)\r\n" | 51 | "#pragma code_page(1252)\r\n" |
52 | "#endif\r\n" | 52 | "#endif\r\n" |
53 | "#include ""res\\PumpKIN.rc2"" // non-Microsoft Visual C++ edited resources\r\n" | 53 | "#include ""res\\PumpKIN.rc2"" // non-Microsoft Visual C++ edited resources\r\n" |
54 | "#include ""afxres.rc"" // Standard components\r\n" | 54 | "#include ""afxres.rc"" // Standard components\r\n" |
55 | "#endif\0" | 55 | "#endif\0" |
56 | END | 56 | END |
57 | 57 | ||
58 | #endif // APSTUDIO_INVOKED | 58 | #endif // APSTUDIO_INVOKED |
59 | 59 | ||
60 | 60 | ||
61 | ///////////////////////////////////////////////////////////////////////////// | 61 | ///////////////////////////////////////////////////////////////////////////// |
62 | // | 62 | // |
63 | // Icon | 63 | // Icon |
64 | // | 64 | // |
65 | 65 | ||
66 | // Icon with lowest ID value placed first to ensure application icon | 66 | // Icon with lowest ID value placed first to ensure application icon |
67 | // remains consistent on all systems. | 67 | // remains consistent on all systems. |
68 | IDI_RRQ ICON DISCARDABLE "res\\wrq.ico" | 68 | IDI_RRQ ICON DISCARDABLE "res\\wrq.ico" |
69 | IDI_WRQ ICON DISCARDABLE "res\\rrq.ico" | 69 | IDI_WRQ ICON DISCARDABLE "res\\rrq.ico" |
70 | IDI_BROWSE ICON DISCARDABLE "shared-data/browse-icon.ico" | 70 | IDI_BROWSE ICON DISCARDABLE "shared-data/browse-icon.ico" |
71 | IDR_MAINFRAME ICON DISCARDABLE "res\\pumpkin.ico" | 71 | IDR_MAINFRAME ICON DISCARDABLE "res\\pumpkin.ico" |
72 | IDI_PLAY ICON DISCARDABLE "shared-data/play-icon.ico" | 72 | IDI_PLAY ICON DISCARDABLE "shared-data/play-icon.ico" |
73 | IDI_UP ICON DISCARDABLE "res\\up.ico" | 73 | IDI_UP ICON DISCARDABLE "res\\up.ico" |
74 | IDI_DOWN ICON DISCARDABLE "res\\down.ico" | 74 | IDI_DOWN ICON DISCARDABLE "res\\down.ico" |
75 | IDI_REMOVE ICON DISCARDABLE "res\\remove.ico" | 75 | IDI_REMOVE ICON DISCARDABLE "res\\remove.ico" |
76 | 76 | ||
77 | ///////////////////////////////////////////////////////////////////////////// | 77 | ///////////////////////////////////////////////////////////////////////////// |
78 | // | 78 | // |
79 | // Dialog | 79 | // Dialog |
80 | // | 80 | // |
81 | 81 | ||
82 | IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 217, 74 | 82 | IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 217, 74 |
83 | STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | 83 | STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU |
84 | CAPTION "About PumpKIN" | 84 | CAPTION "About PumpKIN" |
85 | FONT 8, "MS Sans Serif" | 85 | FONT 8, "MS Sans Serif" |
86 | BEGIN | 86 | BEGIN |
87 | ICON IDR_MAINFRAME,IDC_STATIC,7,17,18,20 | 87 | ICON IDR_MAINFRAME,IDC_STATIC,7,17,18,20 |
88 | LTEXT "PumpKIN, Version 2.7.2",IDC_STATIC,40,15,119,8, | 88 | LTEXT "PumpKIN, Version 2.7.2",IDC_STATIC,40,15,119,8, |
89 | SS_NOPREFIX | 89 | SS_NOPREFIX |
90 | LTEXT "Copyright © 1997-2006 Klever Group",IDC_STATIC,40,30, | 90 | LTEXT "Copyright © 1997-2006 Klever Group",IDC_STATIC,40,30, |
91 | 170,8 | 91 | 170,8 |
92 | DEFPUSHBUTTON "OK",IDOK,178,7,32,14,WS_GROUP | 92 | DEFPUSHBUTTON "OK",IDOK,178,7,32,14,WS_GROUP |
93 | PUSHBUTTON "http://www.klever.net/",IDC_KLEVERNET,124,53,86,14 | 93 | PUSHBUTTON "http://www.klever.net/",IDC_KLEVERNET,124,53,86,14 |
94 | END | 94 | END |
95 | 95 | ||
96 | IDD_PUMPKIN_DIALOG DIALOGEX 0, 0, 362, 193 | 96 | IDD_PUMPKIN_DIALOG DIALOGEX 0, 0, 362, 193 |
97 | STYLE DS_3DLOOK | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | 97 | STYLE DS_3DLOOK | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME |
98 | EXSTYLE WS_EX_ACCEPTFILES | WS_EX_APPWINDOW | 98 | EXSTYLE WS_EX_ACCEPTFILES | WS_EX_APPWINDOW |
99 | CAPTION " PumpKIN" | 99 | CAPTION " PumpKIN" |
100 | FONT 8, "MS Sans Serif", 0, 0, 0x1 | 100 | FONT 8, "MS Sans Serif", 0, 0, 0x1 |
101 | BEGIN | 101 | BEGIN |
102 | CONTROL "List1",IDC_CONNECTIONS,"SysListView32",LVS_REPORT | | 102 | CONTROL "List1",IDC_CONNECTIONS,"SysListView32",LVS_REPORT | |
103 | LVS_AUTOARRANGE | WS_BORDER | WS_TABSTOP,7,7,295,108, | 103 | LVS_AUTOARRANGE | WS_BORDER | WS_TABSTOP,7,7,295,108, |
104 | WS_EX_DLGMODALFRAME | 104 | WS_EX_DLGMODALFRAME |
105 | PUSHBUTTON "&Get File",IDC_GET,305,7,50,17,BS_NOTIFY, | 105 | PUSHBUTTON "&Get File",IDC_GET,305,7,50,17,BS_NOTIFY, |
106 | WS_EX_CLIENTEDGE | 106 | WS_EX_CLIENTEDGE |
107 | PUSHBUTTON "&Put File",IDC_PUT,305,25,50,17,BS_NOTIFY, | 107 | PUSHBUTTON "&Put File",IDC_PUT,305,25,50,17,BS_NOTIFY, |
108 | WS_EX_CLIENTEDGE | 108 | WS_EX_CLIENTEDGE |
109 | PUSHBUTTON "&Abort xfer",IDC_ABORT,305,43,50,17,BS_NOTIFY, | 109 | PUSHBUTTON "&Abort xfer",IDC_ABORT,305,43,50,17,BS_NOTIFY, |
110 | WS_EX_CLIENTEDGE | 110 | WS_EX_CLIENTEDGE |
111 | PUSHBUTTON "&Options",IDC_OPTIONS,305,61,50,17,BS_NOTIFY, | 111 | PUSHBUTTON "&Options",IDC_OPTIONS,305,61,50,17,BS_NOTIFY, |
112 | WS_EX_CLIENTEDGE | 112 | WS_EX_CLIENTEDGE |
113 | PUSHBUTTON "E&xit",IDC_EXIT,305,79,50,17,BS_NOTIFY,WS_EX_CLIENTEDGE | 113 | PUSHBUTTON "E&xit",IDC_EXIT,305,79,50,17,BS_NOTIFY,WS_EX_CLIENTEDGE |
114 | PUSHBUTTON "&Help",ID_HELP,305,97,50,17,BS_NOTIFY,WS_EX_CLIENTEDGE | 114 | PUSHBUTTON "&Help",ID_HELP,305,97,50,17,BS_NOTIFY,WS_EX_CLIENTEDGE |
115 | LISTBOX IDC_LOG,7,115,348,64,LBS_USETABSTOPS | | 115 | LISTBOX IDC_LOG,7,115,348,64,LBS_USETABSTOPS | |
116 | LBS_NOINTEGRALHEIGHT | LBS_NOSEL | WS_VSCROLL | | 116 | LBS_NOINTEGRALHEIGHT | LBS_NOSEL | WS_VSCROLL | |
117 | WS_HSCROLL,WS_EX_DLGMODALFRAME | 117 | WS_HSCROLL,WS_EX_DLGMODALFRAME |
118 | PUSHBUTTON "..",IDCANCEL,0,183,6,7,NOT WS_VISIBLE | NOT WS_TABSTOP | 118 | PUSHBUTTON "..",IDCANCEL,0,183,6,7,NOT WS_VISIBLE | NOT WS_TABSTOP |
119 | CONTROL "&Server is running",IDC_LISTENING,"Button", | 119 | CONTROL "&Server is running",IDC_LISTENING,"Button", |
120 | BS_AUTOCHECKBOX | BS_LEFTTEXT | BS_FLAT | WS_TABSTOP,286, | 120 | BS_AUTOCHECKBOX | BS_LEFTTEXT | BS_FLAT | WS_TABSTOP,286, |
121 | 181,69,11,WS_EX_TRANSPARENT | WS_EX_STATICEDGE | 121 | 181,69,11,WS_EX_TRANSPARENT | WS_EX_STATICEDGE |
122 | END | 122 | END |
123 | 123 | ||
124 | IDD_PROPS_SERVER DIALOG DISCARDABLE 0, 0, 300, 201 | 124 | IDD_PROPS_SERVER DIALOG DISCARDABLE 0, 0, 300, 201 |
125 | STYLE WS_CHILD | WS_DISABLED | WS_CAPTION | 125 | STYLE WS_CHILD | WS_DISABLED | WS_CAPTION |
126 | CAPTION "Server" | 126 | CAPTION "Server" |
127 | FONT 8, "MS Sans Serif" | 127 | FONT 8, "MS Sans Serif" |
128 | BEGIN | 128 | BEGIN |
129 | GROUPBOX "TFTP filesystem &root (download path)",IDC_STATIC,7,7, | 129 | GROUPBOX "TFTP filesystem &root (download path)",IDC_STATIC,7,7, |
130 | 286,38 | 130 | 286,38 |
131 | EDITTEXT IDC_TFTPROOT,13,16,256,13,ES_AUTOHSCROLL | 131 | EDITTEXT IDC_TFTPROOT,13,16,256,13,ES_AUTOHSCROLL |
132 | PUSHBUTTON "&B",IDC_BROWSE,274,16,13,13,BS_ICON | 132 | PUSHBUTTON "&B",IDC_BROWSE,274,16,13,13,BS_ICON |
133 | CONTROL "Allow access to &subdirectories",IDC_TFTPSUBDIRS, | 133 | CONTROL "Allow access to &subdirectories",IDC_TFTPSUBDIRS, |
134 | "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,31,111,10 | 134 | "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,31,111,10 |
135 | GROUPBOX "Read Request Behavior",IDC_STATIC,7,48,243,56 | 135 | GROUPBOX "Read Request Behavior",IDC_STATIC,7,48,243,56 |
136 | CONTROL "Give &all files",IDC_RRQ_GIVEALL,"Button", | 136 | CONTROL "Give &all files",IDC_RRQ_GIVEALL,"Button", |
137 | BS_AUTORADIOBUTTON | BS_NOTIFY | WS_GROUP,13,63,53,10 | 137 | BS_AUTORADIOBUTTON | BS_NOTIFY | WS_GROUP,13,63,53,10 |
138 | CONTROL "&Prompt before giving file",IDC_RRQ_ALWAYSCONFIRM, | 138 | CONTROL "&Prompt before giving file",IDC_RRQ_ALWAYSCONFIRM, |
139 | "Button",BS_AUTORADIOBUTTON | BS_NOTIFY,43,75,91,10 | 139 | "Button",BS_AUTORADIOBUTTON | BS_NOTIFY,43,75,91,10 |
140 | CONTROL "&Deny all requests",IDC_RRQ_DENYALL,"Button", | 140 | CONTROL "&Deny all requests",IDC_RRQ_DENYALL,"Button", |
141 | BS_AUTORADIOBUTTON | BS_NOTIFY,73,87,70,10 | 141 | BS_AUTORADIOBUTTON | BS_NOTIFY,73,87,70,10 |
142 | GROUPBOX "Write Request Behavior",IDC_STATIC,7,106,243,56, | 142 | GROUPBOX "Write Request Behavior",IDC_STATIC,7,106,243,56, |
143 | WS_GROUP | 143 | WS_GROUP |
144 | CONTROL "Take a&ll files",IDC_WRQ_TAKEALL,"Button", | 144 | CONTROL "Take a&ll files",IDC_WRQ_TAKEALL,"Button", |
145 | BS_AUTORADIOBUTTON | WS_GROUP,13,116,55,10 | 145 | BS_AUTORADIOBUTTON | WS_GROUP,13,116,55,10 |
146 | CONTROL "Prompt if file &exists",IDC_WRQ_PROMPTEXISTING,"Button", | 146 | CONTROL "Prompt if file &exists",IDC_WRQ_PROMPTEXISTING,"Button", |
147 | BS_AUTORADIOBUTTON,43,126,73,10 | 147 | BS_AUTORADIOBUTTON,43,126,73,10 |
148 | CONTROL "Always pro&mpt before accepting file", | 148 | CONTROL "Always pro&mpt before accepting file", |
149 | IDC_WRQ_ALWAYSCONFIRM,"Button",BS_AUTORADIOBUTTON,73,136, | 149 | IDC_WRQ_ALWAYSCONFIRM,"Button",BS_AUTORADIOBUTTON,73,136, |
150 | 139,10 | 150 | 139,10 |
151 | CONTROL "D&eny all requests",IDC_WRQ_DENYALL,"Button", | 151 | CONTROL "D&eny all requests",IDC_WRQ_DENYALL,"Button", |
152 | BS_AUTORADIOBUTTON,103,146,70,10 | 152 | BS_AUTORADIOBUTTON,103,146,70,10 |
153 | CTEXT "Confirmation &timeout",IDC_STATIC,253,52,40,19, | 153 | CTEXT "Confirmation &timeout",IDC_STATIC,253,52,40,19, |
154 | SS_NOTIFY | 154 | SS_NOTIFY |
155 | CONTROL "Slider1",IDC_PROMPTTIMEOUT,"msctls_trackbar32", | 155 | CONTROL "Slider1",IDC_PROMPTTIMEOUT,"msctls_trackbar32", |
156 | TBS_AUTOTICKS | TBS_VERT | TBS_TOP | WS_TABSTOP,272,72, | 156 | TBS_AUTOTICKS | TBS_VERT | TBS_TOP | WS_TABSTOP,272,72, |
157 | 21,90 | 157 | 21,90 |
158 | GROUPBOX "Log file (leave empty to disable logging to file)", | 158 | GROUPBOX "Log file (leave empty to disable logging to file)", |
159 | IDC_STATIC,7,165,286,29 | 159 | IDC_STATIC,7,165,286,29 |
160 | EDITTEXT IDC_LOGFILE,13,175,256,13,ES_AUTOHSCROLL | 160 | EDITTEXT IDC_LOGFILE,13,175,256,13,ES_AUTOHSCROLL |
161 | PUSHBUTTON "",IDC_LOGFILE_BROWSE,274,175,13,13,BS_ICON | 161 | PUSHBUTTON "",IDC_LOGFILE_BROWSE,274,175,13,13,BS_ICON |
162 | END | 162 | END |
163 | 163 | ||
164 | IDD_PROPS_NETWORK DIALOG DISCARDABLE 0, 0, 300, 201 | 164 | IDD_PROPS_NETWORK DIALOG DISCARDABLE 0, 0, 300, 201 |
165 | STYLE WS_CHILD | WS_DISABLED | WS_CAPTION | 165 | STYLE WS_CHILD | WS_DISABLED | WS_CAPTION |
166 | CAPTION "Network" | 166 | CAPTION "Network" |
167 | FONT 8, "MS Sans Serif" | 167 | FONT 8, "MS Sans Serif" |
168 | BEGIN | 168 | BEGIN |
169 | GROUPBOX "UDP Ports",IDC_STATIC,7,7,286,40 | 169 | GROUPBOX "UDP Ports",IDC_STATIC,7,7,286,55 |
170 | RTEXT "Listen for &incoming requests on port:",IDC_STATIC,13, | 170 | RTEXT "Listen for &incoming requests on port:",IDC_STATIC,13, |
171 | 18,135,8 | 171 | 18,135,8 |
172 | EDITTEXT IDC_LISTENPORT,154,16,40,13,ES_AUTOHSCROLL | 172 | EDITTEXT IDC_LISTENPORT,154,16,61,13,ES_AUTOHSCROLL |
173 | CONTROL "Spin1",IDC_LISTENSPIN,"msctls_updown32",UDS_WRAP | | 173 | CONTROL "Spin1",IDC_LISTENSPIN,"msctls_updown32",UDS_WRAP | |
174 | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | | 174 | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | |
175 | UDS_ARROWKEYS | UDS_NOTHOUSANDS,183,16,11,13 | 175 | UDS_ARROWKEYS | UDS_NOTHOUSANDS,204,16,11,13 |
176 | RTEXT "Send &outging requests to port:",IDC_STATIC,13,31,135,8 | 176 | RTEXT "Send &outging requests to port:",IDC_STATIC,13,46,135,8 |
177 | EDITTEXT IDC_SPEAKPORT,154,29,40,13,ES_AUTOHSCROLL | 177 | EDITTEXT IDC_SPEAKPORT,154,44,61,13,ES_AUTOHSCROLL |
178 | CONTROL "Spin1",IDC_SPEAKSPIN,"msctls_updown32",UDS_WRAP | | 178 | CONTROL "Spin1",IDC_SPEAKSPIN,"msctls_updown32",UDS_WRAP | |
179 | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | | 179 | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | |
180 | UDS_ARROWKEYS | UDS_NOTHOUSANDS,183,29,11,13 | 180 | UDS_ARROWKEYS | UDS_NOTHOUSANDS,204,43,11,13 |
181 | LTEXT "Default connection timeout:",IDC_STATIC,7,52,88,8 | 181 | LTEXT "Default connection timeout:",IDC_STATIC,7,66,88,8 |
182 | EDITTEXT IDC_TIMEOUT,110,50,40,13,ES_AUTOHSCROLL | ES_NUMBER | 182 | EDITTEXT IDC_TIMEOUT,110,64,40,13,ES_AUTOHSCROLL | ES_NUMBER |
183 | CONTROL "Spin3",IDC_TIMESPIN,"msctls_updown32",UDS_WRAP | | 183 | CONTROL "Spin3",IDC_TIMESPIN,"msctls_updown32",UDS_WRAP | |
184 | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | | 184 | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | |
185 | UDS_ARROWKEYS | UDS_NOTHOUSANDS,140,50,11,13 | 185 | UDS_ARROWKEYS | UDS_NOTHOUSANDS,140,64,11,13 |
186 | LTEXT "Default block size:",IDC_STATIC,7,66,59,8 | 186 | LTEXT "Default block size:",IDC_STATIC,7,80,59,8 |
187 | LTEXT "seconds",IDC_STATIC,154,52,28,8 | 187 | LTEXT "seconds",IDC_STATIC,154,66,28,8 |
188 | LTEXT "bytes",IDC_STATIC,154,66,18,8 | 188 | LTEXT "bytes",IDC_STATIC,154,80,18,8 |
189 | EDITTEXT IDC_BLOCKSIZE,110,64,40,13,ES_AUTOHSCROLL | ES_NUMBER | 189 | EDITTEXT IDC_BLOCKSIZE,110,78,40,13,ES_AUTOHSCROLL | ES_NUMBER |
190 | CONTROL "Spin3",IDC_BSIZESPIN,"msctls_updown32",UDS_WRAP | | 190 | CONTROL "Spin3",IDC_BSIZESPIN,"msctls_updown32",UDS_WRAP | |
191 | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | | 191 | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | |
192 | UDS_ARROWKEYS | UDS_NOTHOUSANDS,140,64,11,13 | 192 | UDS_ARROWKEYS | UDS_NOTHOUSANDS,140,78,11,13 |
193 | RTEXT "ip address:",IDC_STATIC,13,32,135,8 | ||
194 | EDITTEXT IDC_LISTENADDRESS,154,28,61,14,ES_AUTOHSCROLL | ||
193 | END | 195 | END |
194 | 196 | ||
195 | IDD_CONFIRM_RRQ DIALOGEX 0, 0, 181, 79 | 197 | IDD_CONFIRM_RRQ DIALOGEX 0, 0, 181, 79 |
196 | STYLE DS_MODALFRAME | DS_NOIDLEMSG | DS_SETFOREGROUND | DS_3DLOOK | WS_POPUP | | 198 | STYLE DS_MODALFRAME | DS_NOIDLEMSG | DS_SETFOREGROUND | DS_3DLOOK | WS_POPUP | |
197 | WS_CAPTION | 199 | WS_CAPTION |
198 | EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE | 200 | EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE |
199 | CAPTION " PumpKIN - Confirm Read Request" | 201 | CAPTION " PumpKIN - Confirm Read Request" |
200 | FONT 8, "MS Sans Serif", 0, 0, 0x1 | 202 | FONT 8, "MS Sans Serif", 0, 0, 0x1 |
201 | BEGIN | 203 | BEGIN |
202 | DEFPUSHBUTTON "&Grant Access",IDOK,27,58,54,14 | 204 | DEFPUSHBUTTON "&Grant Access",IDOK,27,58,54,14 |
203 | PUSHBUTTON "&Deny Access",IDCANCEL,97,58,54,14 | 205 | PUSHBUTTON "&Deny Access",IDCANCEL,97,58,54,14 |
204 | LTEXT "The host",IDC_STATIC,77,7,29,8 | 206 | LTEXT "The host",IDC_STATIC,77,7,29,8 |
205 | CTEXT "255.255.255.255",IDC_HOST,57,15,68,14,SS_NOTIFY | | 207 | CTEXT "255.255.255.255",IDC_HOST,57,15,68,14,SS_NOTIFY | |
206 | SS_SUNKEN | WS_BORDER,WS_EX_DLGMODALFRAME | | 208 | SS_SUNKEN | WS_BORDER,WS_EX_DLGMODALFRAME | |
207 | WS_EX_CLIENTEDGE | 209 | WS_EX_CLIENTEDGE |
208 | CTEXT "is requesting the file",IDC_STATIC,23,29,135,8 | 210 | CTEXT "is requesting the file",IDC_STATIC,23,29,135,8 |
209 | CTEXT "",IDC_FILE,23,37,135,14,SS_NOTIFY | SS_SUNKEN | | 211 | CTEXT "",IDC_FILE,23,37,135,14,SS_NOTIFY | SS_SUNKEN | |
210 | WS_BORDER,WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE | 212 | WS_BORDER,WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE |
211 | CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,7,54,167,1 | 213 | CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,7,54,167,1 |
212 | ICON IDR_MAINFRAME,IDC_STATIC,7,7,18,20 | 214 | ICON IDR_MAINFRAME,IDC_STATIC,7,7,18,20 |
213 | ICON IDR_MAINFRAME,IDC_STATIC,153,7,18,20 | 215 | ICON IDR_MAINFRAME,IDC_STATIC,153,7,18,20 |
214 | END | 216 | END |
215 | 217 | ||
216 | IDD_CONFIRM_WRQ DIALOGEX 0, 0, 201, 95 | 218 | IDD_CONFIRM_WRQ DIALOGEX 0, 0, 201, 95 |
217 | STYLE DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | WS_POPUP | WS_CAPTION | 219 | STYLE DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | WS_POPUP | WS_CAPTION |
218 | EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE | 220 | EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE |
219 | CAPTION " PumpKIN - Confirm Write Request" | 221 | CAPTION " PumpKIN - Confirm Write Request" |
220 | FONT 8, "MS Sans Serif", 0, 0, 0x1 | 222 | FONT 8, "MS Sans Serif", 0, 0, 0x1 |
221 | BEGIN | 223 | BEGIN |
222 | DEFPUSHBUTTON "&Accept",IDOK,7,58,59,14 | 224 | DEFPUSHBUTTON "&Accept",IDOK,7,58,59,14 |
223 | PUSHBUTTON "&Rename",IDC_RENAME,71,58,59,14 | 225 | PUSHBUTTON "&Rename",IDC_RENAME,71,58,59,14 |
224 | PUSHBUTTON "&Deny Access",IDCANCEL,135,58,59,14 | 226 | PUSHBUTTON "&Deny Access",IDCANCEL,135,58,59,14 |
225 | LTEXT "The host",IDC_STATIC,87,7,29,8 | 227 | LTEXT "The host",IDC_STATIC,87,7,29,8 |
226 | CTEXT "255.255.255.255",IDC_HOST,67,15,68,14,SS_NOTIFY | | 228 | CTEXT "255.255.255.255",IDC_HOST,67,15,68,14,SS_NOTIFY | |
227 | SS_SUNKEN | WS_BORDER,WS_EX_DLGMODALFRAME | | 229 | SS_SUNKEN | WS_BORDER,WS_EX_DLGMODALFRAME | |
228 | WS_EX_CLIENTEDGE | 230 | WS_EX_CLIENTEDGE |
229 | CTEXT "is attempting to send you a file",IDC_STATIC,33,29,135, | 231 | CTEXT "is attempting to send you a file",IDC_STATIC,33,29,135, |
230 | 8 | 232 | 8 |
231 | CTEXT "",IDC_FILE,33,37,135,14,SS_NOTIFY | SS_SUNKEN | | 233 | CTEXT "",IDC_FILE,33,37,135,14,SS_NOTIFY | SS_SUNKEN | |
232 | WS_BORDER,WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE | 234 | WS_BORDER,WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE |
233 | CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,7,54,187,1 | 235 | CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,7,54,187,1 |
234 | ICON IDR_MAINFRAME,IDC_STATIC,7,7,21,20 | 236 | ICON IDR_MAINFRAME,IDC_STATIC,7,7,21,20 |
235 | ICON IDR_MAINFRAME,IDC_STATIC,173,7,21,20 | 237 | ICON IDR_MAINFRAME,IDC_STATIC,173,7,21,20 |
236 | PUSHBUTTON "Res&ume",IDC_RESUME,71,74,59,14 | 238 | PUSHBUTTON "Res&ume",IDC_RESUME,71,74,59,14 |
237 | END | 239 | END |
238 | 240 | ||
239 | IDD_REQUEST DIALOGEX 0, 0, 191, 161 | 241 | IDD_REQUEST DIALOGEX 0, 0, 191, 161 |
240 | STYLE DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | WS_POPUP | WS_CAPTION | | 242 | STYLE DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | WS_POPUP | WS_CAPTION | |
241 | WS_SYSMENU | 243 | WS_SYSMENU |
242 | EXSTYLE WS_EX_CLIENTEDGE | 244 | EXSTYLE WS_EX_CLIENTEDGE |
243 | CAPTION "Request" | 245 | CAPTION "Request" |
244 | FONT 8, "MS Sans Serif", 0, 0, 0x1 | 246 | FONT 8, "MS Sans Serif", 0, 0, 0x1 |
245 | BEGIN | 247 | BEGIN |
246 | LTEXT "&Local file:",IDC_STATIC,7,7,31,8,SS_NOTIFY | 248 | LTEXT "&Local file:",IDC_STATIC,7,7,31,8,SS_NOTIFY |
247 | EDITTEXT IDC_LOCALFILE,7,16,157,14,ES_AUTOHSCROLL, | 249 | EDITTEXT IDC_LOCALFILE,7,16,157,14,ES_AUTOHSCROLL, |
248 | WS_EX_CLIENTEDGE | WS_EX_STATICEDGE | 250 | WS_EX_CLIENTEDGE | WS_EX_STATICEDGE |
249 | PUSHBUTTON "...",IDC_BROWSE,165,16,19,14,BS_ICON,WS_EX_STATICEDGE | 251 | PUSHBUTTON "...",IDC_BROWSE,165,16,19,14,BS_ICON,WS_EX_STATICEDGE |
250 | LTEXT "&Remote file:",IDC_STATIC,7,34,38,8,SS_NOTIFY | 252 | LTEXT "&Remote file:",IDC_STATIC,7,34,38,8,SS_NOTIFY |
251 | EDITTEXT IDC_REMOTEFILE,7,44,177,14,ES_AUTOHSCROLL, | 253 | EDITTEXT IDC_REMOTEFILE,7,44,177,14,ES_AUTOHSCROLL, |
252 | WS_EX_CLIENTEDGE | WS_EX_STATICEDGE | 254 | WS_EX_CLIENTEDGE | WS_EX_STATICEDGE |
253 | LTEXT "Remote &host:",IDC_STATIC,7,61,43,8,SS_NOTIFY | 255 | LTEXT "Remote &host:",IDC_STATIC,7,61,43,8,SS_NOTIFY |
254 | COMBOBOX IDC_TALKS,7,72,157,66,CBS_SIMPLE | CBS_AUTOHSCROLL | | 256 | COMBOBOX IDC_TALKS,7,72,157,66,CBS_SIMPLE | CBS_AUTOHSCROLL | |
255 | CBS_SORT | CBS_NOINTEGRALHEIGHT | WS_VSCROLL | | 257 | CBS_SORT | CBS_NOINTEGRALHEIGHT | WS_VSCROLL | |
256 | WS_TABSTOP,WS_EX_CLIENTEDGE | WS_EX_STATICEDGE | 258 | WS_TABSTOP,WS_EX_CLIENTEDGE | WS_EX_STATICEDGE |
257 | PUSHBUTTON "R\nE\n&F\nR\nE\nS\nH",IDC_REFRESH,165,72,19,66, | 259 | PUSHBUTTON "R\nE\n&F\nR\nE\nS\nH",IDC_REFRESH,165,72,19,66, |
258 | BS_CENTER | BS_VCENTER | BS_MULTILINE | BS_NOTIFY, | 260 | BS_CENTER | BS_VCENTER | BS_MULTILINE | BS_NOTIFY, |
259 | WS_EX_CLIENTEDGE | 261 | WS_EX_CLIENTEDGE |
260 | LTEXT "&Type:",IDC_STATIC,58,34,19,8 | 262 | LTEXT "&Type:",IDC_STATIC,58,34,19,8 |
261 | COMBOBOX IDC_TYPE,80,31,43,41,CBS_DROPDOWN | CBS_AUTOHSCROLL | | 263 | COMBOBOX IDC_TYPE,80,31,43,41,CBS_DROPDOWN | CBS_AUTOHSCROLL | |
262 | CBS_LOWERCASE | WS_VSCROLL | WS_TABSTOP | 264 | CBS_LOWERCASE | WS_VSCROLL | WS_TABSTOP |
263 | LTEXT "&Block:",IDC_STATIC,127,34,21,8 | 265 | LTEXT "&Block:",IDC_STATIC,127,34,21,8 |
264 | COMBOBOX IDC_BSIZE,149,31,35,53,CBS_DROPDOWN | WS_VSCROLL | | 266 | COMBOBOX IDC_BSIZE,149,31,35,53,CBS_DROPDOWN | WS_VSCROLL | |
265 | WS_TABSTOP | 267 | WS_TABSTOP |
266 | DEFPUSHBUTTON "OK",IDOK,35,140,50,14 | 268 | DEFPUSHBUTTON "OK",IDOK,35,140,50,14 |
267 | PUSHBUTTON "Cancel",IDCANCEL,101,140,50,14 | 269 | PUSHBUTTON "Cancel",IDCANCEL,101,140,50,14 |
268 | CONTROL "",IDC_STATIC,"Static",SS_ETCHEDVERT,52,32,1,11 | 270 | CONTROL "",IDC_STATIC,"Static",SS_ETCHEDVERT,52,32,1,11 |
269 | END | 271 | END |
270 | 272 | ||
271 | IDD_PROPS_SOUNDS DIALOG DISCARDABLE 0, 0, 300, 201 | 273 | IDD_PROPS_SOUNDS DIALOG DISCARDABLE 0, 0, 300, 201 |
272 | STYLE WS_CHILD | WS_DISABLED | WS_CAPTION | 274 | STYLE WS_CHILD | WS_DISABLED | WS_CAPTION |
273 | CAPTION "Sounds" | 275 | CAPTION "Sounds" |
274 | FONT 8, "MS Sans Serif" | 276 | FONT 8, "MS Sans Serif" |
275 | BEGIN | 277 | BEGIN |
276 | LTEXT "&Incoming request:",IDC_STATIC,7,9,57,8 | 278 | LTEXT "&Incoming request:",IDC_STATIC,7,9,57,8 |
277 | COMBOBOX IDC_RING,70,7,188,100,CBS_DROPDOWN | CBS_AUTOHSCROLL | | 279 | COMBOBOX IDC_RING,70,7,188,100,CBS_DROPDOWN | CBS_AUTOHSCROLL | |
278 | CBS_SORT | WS_VSCROLL | WS_TABSTOP | 280 | CBS_SORT | WS_VSCROLL | WS_TABSTOP |
279 | PUSHBUTTON "browse",IDC_RING_BROWSE,263,7,13,13,BS_ICON | 281 | PUSHBUTTON "browse",IDC_RING_BROWSE,263,7,13,13,BS_ICON |
280 | PUSHBUTTON "play",IDC_RING_PLAY,280,7,13,13,BS_ICON | 282 | PUSHBUTTON "play",IDC_RING_PLAY,280,7,13,13,BS_ICON |
281 | LTEXT "xfer &finished:",IDC_STATIC,7,25,57,8 | 283 | LTEXT "xfer &finished:",IDC_STATIC,7,25,57,8 |
282 | COMBOBOX IDC_FINISHED,70,22,188,100,CBS_DROPDOWN | | 284 | COMBOBOX IDC_FINISHED,70,22,188,100,CBS_DROPDOWN | |
283 | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP | 285 | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP |
284 | PUSHBUTTON "browse",IDC_FINISHED_BROWSE,263,22,13,13,BS_ICON | 286 | PUSHBUTTON "browse",IDC_FINISHED_BROWSE,263,22,13,13,BS_ICON |
285 | PUSHBUTTON "play",IDC_FINISHED_PLAY,280,22,13,13,BS_ICON | 287 | PUSHBUTTON "play",IDC_FINISHED_PLAY,280,22,13,13,BS_ICON |
286 | LTEXT "xfer &aborted:",IDC_STATIC,7,40,57,8 | 288 | LTEXT "xfer &aborted:",IDC_STATIC,7,40,57,8 |
287 | COMBOBOX IDC_ABORTED,70,37,188,100,CBS_DROPDOWN | CBS_AUTOHSCROLL | | 289 | COMBOBOX IDC_ABORTED,70,37,188,100,CBS_DROPDOWN | CBS_AUTOHSCROLL | |
288 | CBS_SORT | WS_VSCROLL | WS_TABSTOP | 290 | CBS_SORT | WS_VSCROLL | WS_TABSTOP |
289 | PUSHBUTTON "browse",IDC_ABORTED_BROWSE,263,37,13,13,BS_ICON | 291 | PUSHBUTTON "browse",IDC_ABORTED_BROWSE,263,37,13,13,BS_ICON |
290 | PUSHBUTTON "play",IDC_ABORTED_PLAY,280,37,13,13,BS_ICON | 292 | PUSHBUTTON "play",IDC_ABORTED_PLAY,280,37,13,13,BS_ICON |
291 | END | 293 | END |
292 | 294 | ||
293 | IDD_PROPS_ACL DIALOG DISCARDABLE 0, 0, 300, 201 | 295 | IDD_PROPS_ACL DIALOG DISCARDABLE 0, 0, 300, 201 |
294 | STYLE WS_CHILD | WS_DISABLED | WS_CAPTION | 296 | STYLE WS_CHILD | WS_DISABLED | WS_CAPTION |
295 | CAPTION "Access Lists" | 297 | CAPTION "Access Lists" |
296 | FONT 8, "MS Sans Serif" | 298 | FONT 8, "MS Sans Serif" |
297 | BEGIN | 299 | BEGIN |
298 | CONTROL "List1",IDC_ACL_LIST,"SysListView32",LVS_REPORT | | 300 | CONTROL "List1",IDC_ACL_LIST,"SysListView32",LVS_REPORT | |
299 | WS_BORDER | WS_TABSTOP,7,7,258,110 | 301 | WS_BORDER | WS_TABSTOP,7,7,258,110 |
300 | PUSHBUTTON "&Up",IDC_ACL_UP,273,7,20,30,BS_ICON | BS_CENTER | | 302 | PUSHBUTTON "&Up",IDC_ACL_UP,273,7,20,30,BS_ICON | BS_CENTER | |
301 | BS_VCENTER | 303 | BS_VCENTER |
302 | PUSHBUTTON "&Down",IDC_ACL_DOWN,273,87,20,30,BS_ICON | BS_CENTER | | 304 | PUSHBUTTON "&Down",IDC_ACL_DOWN,273,87,20,30,BS_ICON | BS_CENTER | |
303 | BS_VCENTER | 305 | BS_VCENTER |
304 | PUSHBUTTON "&Remove",IDC_ACL_REMOVE,273,47,20,30,BS_ICON | | 306 | PUSHBUTTON "&Remove",IDC_ACL_REMOVE,273,47,20,30,BS_ICON | |
305 | BS_CENTER | BS_VCENTER | 307 | BS_CENTER | BS_VCENTER |
306 | LTEXT "If",IDC_STATIC,13,128,8,8 | 308 | LTEXT "If",IDC_STATIC,13,128,8,8 |
307 | COMBOBOX IDC_ACL_XFER,21,125,48,67,CBS_DROPDOWNLIST | WS_VSCROLL | | 309 | COMBOBOX IDC_ACL_XFER,21,125,48,67,CBS_DROPDOWNLIST | WS_VSCROLL | |
308 | WS_TABSTOP | 310 | WS_TABSTOP |
309 | LTEXT "request comes from the address in the network", | 311 | LTEXT "request comes from the address in the network", |
310 | IDC_STATIC,71,128,122,8 | 312 | IDC_STATIC,71,128,122,8 |
311 | EDITTEXT IDC_ACL_ADDR,47,143,80,12,ES_AUTOHSCROLL | 313 | EDITTEXT IDC_ACL_ADDR,47,143,80,12,ES_AUTOHSCROLL |
312 | LTEXT "with netmask",IDC_STATIC,129,145,41,8 | 314 | LTEXT "with netmask",IDC_STATIC,129,145,41,8 |
313 | EDITTEXT IDC_ACL_NETMASK,173,143,80,12,ES_AUTOHSCROLL | 315 | EDITTEXT IDC_ACL_NETMASK,173,143,80,12,ES_AUTOHSCROLL |
314 | LTEXT "then",IDC_STATIC,124,160,15,8 | 316 | LTEXT "then",IDC_STATIC,124,160,15,8 |
315 | COMBOBOX IDC_ACL_RULE,143,158,123,117,CBS_DROPDOWNLIST | | 317 | COMBOBOX IDC_ACL_RULE,143,158,123,117,CBS_DROPDOWNLIST | |
316 | WS_VSCROLL | WS_TABSTOP | 318 | WS_VSCROLL | WS_TABSTOP |
317 | PUSHBUTTON "&Add new rule",IDC_ACL_ADD,7,178,130,16 | 319 | PUSHBUTTON "&Add new rule",IDC_ACL_ADD,7,178,130,16 |
318 | PUSHBUTTON "&Replace rule",IDC_ACL_REPLACE,152,178,130,16 | 320 | PUSHBUTTON "&Replace rule",IDC_ACL_REPLACE,152,178,130,16 |
319 | END | 321 | END |
320 | 322 | ||
321 | 323 | ||
322 | #ifndef _MAC | 324 | #ifndef _MAC |
323 | ///////////////////////////////////////////////////////////////////////////// | 325 | ///////////////////////////////////////////////////////////////////////////// |
324 | // | 326 | // |
325 | // Version | 327 | // Version |
326 | // | 328 | // |
327 | 329 | ||
328 | VS_VERSION_INFO VERSIONINFO | 330 | VS_VERSION_INFO VERSIONINFO |
329 | FILEVERSION 2,7,2,0 | 331 | FILEVERSION 2,7,2,0 |
330 | PRODUCTVERSION 2,7,2,0 | 332 | PRODUCTVERSION 2,7,2,0 |
331 | FILEFLAGSMASK 0x3fL | 333 | FILEFLAGSMASK 0x3fL |
332 | #ifdef _DEBUG | 334 | #ifdef _DEBUG |
333 | FILEFLAGS 0x1L | 335 | FILEFLAGS 0x1L |
334 | #else | 336 | #else |
335 | FILEFLAGS 0x0L | 337 | FILEFLAGS 0x0L |
336 | #endif | 338 | #endif |
337 | FILEOS 0x4L | 339 | FILEOS 0x4L |
338 | FILETYPE 0x1L | 340 | FILETYPE 0x1L |
339 | FILESUBTYPE 0x0L | 341 | FILESUBTYPE 0x0L |
340 | BEGIN | 342 | BEGIN |
341 | BLOCK "StringFileInfo" | 343 | BLOCK "StringFileInfo" |
342 | BEGIN | 344 | BEGIN |
343 | BLOCK "040904b0" | 345 | BLOCK "040904b0" |
344 | BEGIN | 346 | BEGIN |
345 | VALUE "CompanyName", "Klever Group (http://www.klever.net/)\0" | 347 | VALUE "CompanyName", "Klever Group (http://www.klever.net/)\0" |
346 | VALUE "FileDescription", "PumpKIN, tftp client/daemon\0" | 348 | VALUE "FileDescription", "PumpKIN, tftp client/daemon\0" |
347 | VALUE "FileVersion", "2, 7, 2, 0\0" | 349 | VALUE "FileVersion", "2, 7, 2, 0\0" |
348 | VALUE "InternalName", "PUMPKIN\0" | 350 | VALUE "InternalName", "PUMPKIN\0" |
349 | VALUE "LegalCopyright", "Copyright © 1997-2006 Klever Group (http://www.klever.net)\0" | 351 | VALUE "LegalCopyright", "Copyright © 1997-2006 Klever Group (http://www.klever.net)\0" |
350 | VALUE "LegalTrademarks", "Klever Group (http://www.klever.net/)\0" | 352 | VALUE "LegalTrademarks", "Klever Group (http://www.klever.net/)\0" |
351 | VALUE "OriginalFilename", "PUMPKIN.EXE\0" | 353 | VALUE "OriginalFilename", "PUMPKIN.EXE\0" |
352 | VALUE "ProductName", "PumpKIN\0" | 354 | VALUE "ProductName", "PumpKIN\0" |
353 | VALUE "ProductVersion", "2, 7, 2, 0\0" | 355 | VALUE "ProductVersion", "2, 7, 2, 0\0" |
354 | END | 356 | END |
355 | END | 357 | END |
356 | BLOCK "VarFileInfo" | 358 | BLOCK "VarFileInfo" |
357 | BEGIN | 359 | BEGIN |
358 | VALUE "Translation", 0x409, 1200 | 360 | VALUE "Translation", 0x409, 1200 |
359 | END | 361 | END |
360 | END | 362 | END |
361 | 363 | ||
362 | #endif // !_MAC | 364 | #endif // !_MAC |
363 | 365 | ||
364 | 366 | ||
365 | ///////////////////////////////////////////////////////////////////////////// | 367 | ///////////////////////////////////////////////////////////////////////////// |
366 | // | 368 | // |
367 | // DESIGNINFO | 369 | // DESIGNINFO |
368 | // | 370 | // |
369 | 371 | ||
370 | #ifdef APSTUDIO_INVOKED | 372 | #ifdef APSTUDIO_INVOKED |
371 | GUIDELINES DESIGNINFO DISCARDABLE | 373 | GUIDELINES DESIGNINFO DISCARDABLE |
372 | BEGIN | 374 | BEGIN |
373 | IDD_ABOUTBOX, DIALOG | 375 | IDD_ABOUTBOX, DIALOG |
374 | BEGIN | 376 | BEGIN |
375 | LEFTMARGIN, 7 | 377 | LEFTMARGIN, 7 |
376 | RIGHTMARGIN, 210 | 378 | RIGHTMARGIN, 210 |
377 | TOPMARGIN, 7 | 379 | TOPMARGIN, 7 |
378 | BOTTOMMARGIN, 67 | 380 | BOTTOMMARGIN, 67 |
379 | END | 381 | END |
380 | 382 | ||
381 | IDD_PUMPKIN_DIALOG, DIALOG | 383 | IDD_PUMPKIN_DIALOG, DIALOG |
382 | BEGIN | 384 | BEGIN |
383 | LEFTMARGIN, 7 | 385 | LEFTMARGIN, 7 |
384 | RIGHTMARGIN, 355 | 386 | RIGHTMARGIN, 355 |
385 | TOPMARGIN, 7 | 387 | TOPMARGIN, 7 |
386 | BOTTOMMARGIN, 186 | 388 | BOTTOMMARGIN, 186 |
387 | HORZGUIDE, 115 | 389 | HORZGUIDE, 115 |
388 | END | 390 | END |
389 | 391 | ||
390 | IDD_PROPS_SERVER, DIALOG | 392 | IDD_PROPS_SERVER, DIALOG |
391 | BEGIN | 393 | BEGIN |
392 | LEFTMARGIN, 7 | 394 | LEFTMARGIN, 7 |
393 | RIGHTMARGIN, 293 | 395 | RIGHTMARGIN, 293 |
394 | TOPMARGIN, 7 | 396 | TOPMARGIN, 7 |
395 | BOTTOMMARGIN, 194 | 397 | BOTTOMMARGIN, 194 |
396 | END | 398 | END |
397 | 399 | ||
398 | IDD_PROPS_NETWORK, DIALOG | 400 | IDD_PROPS_NETWORK, DIALOG |
399 | BEGIN | 401 | BEGIN |
400 | LEFTMARGIN, 7 | 402 | LEFTMARGIN, 7 |
401 | RIGHTMARGIN, 293 | 403 | RIGHTMARGIN, 293 |
402 | TOPMARGIN, 7 | 404 | TOPMARGIN, 7 |
403 | BOTTOMMARGIN, 194 | 405 | BOTTOMMARGIN, 194 |
404 | END | 406 | END |
405 | 407 | ||
406 | IDD_CONFIRM_RRQ, DIALOG | 408 | IDD_CONFIRM_RRQ, DIALOG |
407 | BEGIN | 409 | BEGIN |
408 | LEFTMARGIN, 7 | 410 | LEFTMARGIN, 7 |
409 | RIGHTMARGIN, 174 | 411 | RIGHTMARGIN, 174 |
410 | TOPMARGIN, 7 | 412 | TOPMARGIN, 7 |
411 | BOTTOMMARGIN, 72 | 413 | BOTTOMMARGIN, 72 |
412 | END | 414 | END |
413 | 415 | ||
414 | IDD_CONFIRM_WRQ, DIALOG | 416 | IDD_CONFIRM_WRQ, DIALOG |
415 | BEGIN | 417 | BEGIN |
416 | LEFTMARGIN, 7 | 418 | LEFTMARGIN, 7 |
417 | RIGHTMARGIN, 194 | 419 | RIGHTMARGIN, 194 |
418 | TOPMARGIN, 7 | 420 | TOPMARGIN, 7 |
419 | BOTTOMMARGIN, 88 | 421 | BOTTOMMARGIN, 88 |
420 | END | 422 | END |
421 | 423 | ||
422 | IDD_REQUEST, DIALOG | 424 | IDD_REQUEST, DIALOG |
423 | BEGIN | 425 | BEGIN |
424 | LEFTMARGIN, 7 | 426 | LEFTMARGIN, 7 |
425 | RIGHTMARGIN, 184 | 427 | RIGHTMARGIN, 184 |
426 | TOPMARGIN, 7 | 428 | TOPMARGIN, 7 |
427 | BOTTOMMARGIN, 154 | 429 | BOTTOMMARGIN, 154 |
428 | END | 430 | END |
429 | 431 | ||
430 | IDD_PROPS_SOUNDS, DIALOG | 432 | IDD_PROPS_SOUNDS, DIALOG |
431 | BEGIN | 433 | BEGIN |
432 | LEFTMARGIN, 7 | 434 | LEFTMARGIN, 7 |
433 | RIGHTMARGIN, 293 | 435 | RIGHTMARGIN, 293 |
434 | TOPMARGIN, 7 | 436 | TOPMARGIN, 7 |
435 | BOTTOMMARGIN, 194 | 437 | BOTTOMMARGIN, 194 |
436 | END | 438 | END |
437 | 439 | ||
438 | IDD_PROPS_ACL, DIALOG | 440 | IDD_PROPS_ACL, DIALOG |
439 | BEGIN | 441 | BEGIN |
440 | LEFTMARGIN, 7 | 442 | LEFTMARGIN, 7 |
441 | RIGHTMARGIN, 293 | 443 | RIGHTMARGIN, 293 |
442 | TOPMARGIN, 7 | 444 | TOPMARGIN, 7 |
443 | BOTTOMMARGIN, 194 | 445 | BOTTOMMARGIN, 194 |
444 | HORZGUIDE, 117 | 446 | HORZGUIDE, 117 |
445 | HORZGUIDE, 125 | 447 | HORZGUIDE, 125 |
446 | END | 448 | END |
447 | END | 449 | END |
448 | #endif // APSTUDIO_INVOKED | 450 | #endif // APSTUDIO_INVOKED |
449 | 451 | ||
450 | 452 | ||
451 | ///////////////////////////////////////////////////////////////////////////// | 453 | ///////////////////////////////////////////////////////////////////////////// |
452 | // | 454 | // |
453 | // Bitmap | 455 | // Bitmap |
454 | // | 456 | // |
455 | 457 | ||
456 | IDB_BACKGROUND BITMAP DISCARDABLE "shared-data/klever-background.bmp" | 458 | IDB_BACKGROUND BITMAP DISCARDABLE "shared-data/klever-background.bmp" |
457 | 459 | ||
458 | ///////////////////////////////////////////////////////////////////////////// | 460 | ///////////////////////////////////////////////////////////////////////////// |
459 | // | 461 | // |
460 | // WAVE | 462 | // WAVE |
461 | // | 463 | // |
462 | 464 | ||
463 | IDR_WAVE_RING WAVE DISCARDABLE "res\\ring.wav" | 465 | IDR_WAVE_RING WAVE DISCARDABLE "res\\ring.wav" |
464 | IDR_WAVE_FINISHED WAVE DISCARDABLE "res\\finished.wav" | 466 | IDR_WAVE_FINISHED WAVE DISCARDABLE "res\\finished.wav" |
465 | IDR_WAVE_ABORTED WAVE DISCARDABLE "res\\failed.wav" | 467 | IDR_WAVE_ABORTED WAVE DISCARDABLE "res\\failed.wav" |
466 | 468 | ||
467 | ///////////////////////////////////////////////////////////////////////////// | 469 | ///////////////////////////////////////////////////////////////////////////// |
468 | // | 470 | // |
469 | // Dialog Info | 471 | // Dialog Info |
470 | // | 472 | // |
471 | 473 | ||
472 | IDD_REQUEST DLGINIT | 474 | IDD_REQUEST DLGINIT |
473 | BEGIN | 475 | BEGIN |
474 | IDC_TYPE, 0x403, 6, 0 | 476 | IDC_TYPE, 0x403, 6, 0 |
475 | 0x636f, 0x6574, 0x0074, | 477 | 0x636f, 0x6574, 0x0074, |
476 | IDC_TYPE, 0x403, 9, 0 | 478 | IDC_TYPE, 0x403, 9, 0 |
477 | 0x656e, 0x6174, 0x6373, 0x6969, "\000" | 479 | 0x656e, 0x6174, 0x6373, 0x6969, "\000" |
478 | IDC_BSIZE, 0x403, 4, 0 | 480 | IDC_BSIZE, 0x403, 4, 0 |
479 | 0x3135, 0x0032, | 481 | 0x3135, 0x0032, |
480 | IDC_BSIZE, 0x403, 5, 0 | 482 | IDC_BSIZE, 0x403, 5, 0 |
481 | 0x3031, 0x3432, "\000" | 483 | 0x3031, 0x3432, "\000" |
482 | IDC_BSIZE, 0x403, 5, 0 | 484 | IDC_BSIZE, 0x403, 5, 0 |
483 | 0x3032, 0x3834, "\000" | 485 | 0x3032, 0x3834, "\000" |
484 | IDC_BSIZE, 0x403, 5, 0 | 486 | IDC_BSIZE, 0x403, 5, 0 |
485 | 0x3034, 0x3639, "\000" | 487 | 0x3034, 0x3639, "\000" |
486 | IDC_BSIZE, 0x403, 5, 0 | 488 | IDC_BSIZE, 0x403, 5, 0 |
487 | 0x3138, 0x3239, "\000" | 489 | 0x3138, 0x3239, "\000" |
488 | 0 | 490 | 0 |
489 | END | 491 | END |
490 | 492 | ||
491 | IDD_PROPS_ACL DLGINIT | 493 | IDD_PROPS_ACL DLGINIT |
492 | BEGIN | 494 | BEGIN |
493 | IDC_ACL_XFER, 0x403, 5, 0 | 495 | IDC_ACL_XFER, 0x403, 5, 0 |
494 | 0x6572, 0x6461, "\000" | 496 | 0x6572, 0x6461, "\000" |
495 | IDC_ACL_XFER, 0x403, 6, 0 | 497 | IDC_ACL_XFER, 0x403, 6, 0 |
496 | 0x7277, 0x7469, 0x0065, | 498 | 0x7277, 0x7469, 0x0065, |
497 | IDC_ACL_RULE, 0x403, 12, 0 | 499 | IDC_ACL_RULE, 0x403, 12, 0 |
498 | 0x6361, 0x6563, 0x7470, 0x6620, 0x6c69, 0x0065, | 500 | 0x6361, 0x6563, 0x7470, 0x6620, 0x6c69, 0x0065, |
499 | IDC_ACL_RULE, 0x403, 33, 0 | 501 | IDC_ACL_RULE, 0x403, 33, 0 |
500 | 0x6361, 0x6563, 0x7470, 0x6120, 0x646e, 0x7220, 0x6e65, 0x6d61, 0x2065, | 502 | 0x6361, 0x6563, 0x7470, 0x6120, 0x646e, 0x7220, 0x6e65, 0x6d61, 0x2065, |
501 | 0x6669, 0x6620, 0x6c69, 0x2065, 0x7865, 0x7369, 0x7374, "\000" | 503 | 0x6669, 0x6620, 0x6c69, 0x2065, 0x7865, 0x7369, 0x7374, "\000" |
502 | IDC_ACL_RULE, 0x403, 12, 0 | 504 | IDC_ACL_RULE, 0x403, 12, 0 |
503 | 0x6572, 0x656a, 0x7463, 0x6620, 0x6c69, 0x0065, | 505 | 0x6572, 0x656a, 0x7463, 0x6620, 0x6c69, 0x0065, |
504 | IDC_ACL_RULE, 0x403, 31, 0 | 506 | IDC_ACL_RULE, 0x403, 31, 0 |
505 | 0x6166, 0x6c6c, 0x6162, 0x6b63, 0x7420, 0x206f, 0x6874, 0x2065, 0x6c67, | 507 | 0x6166, 0x6c6c, 0x6162, 0x6b63, 0x7420, 0x206f, 0x6874, 0x2065, 0x6c67, |
506 | 0x626f, 0x6c61, 0x7320, 0x7465, 0x6974, 0x676e, "\000" | 508 | 0x626f, 0x6c61, 0x7320, 0x7465, 0x6974, 0x676e, "\000" |
507 | 0 | 509 | 0 |
508 | END | 510 | END |
509 | 511 | ||
510 | 512 | ||
511 | ///////////////////////////////////////////////////////////////////////////// | 513 | ///////////////////////////////////////////////////////////////////////////// |
512 | // | 514 | // |
513 | // Menu | 515 | // Menu |
514 | // | 516 | // |
515 | 517 | ||
516 | IDM_POPUPS MENU DISCARDABLE | 518 | IDM_POPUPS MENU DISCARDABLE |
517 | BEGIN | 519 | BEGIN |
518 | POPUP "&Tray" | 520 | POPUP "&Tray" |
519 | BEGIN | 521 | BEGIN |
520 | MENUITEM "&Send File", ID_TRAY_SENDFILE | 522 | MENUITEM "&Send File", ID_TRAY_SENDFILE |
521 | MENUITEM "F&etch file", ID_TRAY_FETCHFILE | 523 | MENUITEM "F&etch file", ID_TRAY_FETCHFILE |
522 | MENUITEM "&Options", ID_TRAY_OPTIONS | 524 | MENUITEM "&Options", ID_TRAY_OPTIONS |
523 | MENUITEM "&Listen to requests", ID_TRAY_LISTEN | 525 | MENUITEM "&Listen to requests", ID_TRAY_LISTEN |
524 | MENUITEM "Show &PumpKIN Window", ID_TRAY_SHOWPUMPKINWINDOW | 526 | MENUITEM "Show &PumpKIN Window", ID_TRAY_SHOWPUMPKINWINDOW |
525 | MENUITEM "Open &Files Folder", ID_TRAY_OPENFILESFOLDER | 527 | MENUITEM "Open &Files Folder", ID_TRAY_OPENFILESFOLDER |
526 | MENUITEM SEPARATOR | 528 | MENUITEM SEPARATOR |
527 | MENUITEM "&Help Topics", ID_TRAY_HELP | 529 | MENUITEM "&Help Topics", ID_TRAY_HELP |
528 | MENUITEM "&About PumpKIN", ID_TRAY_ABOUTPUMPKIN | 530 | MENUITEM "&About PumpKIN", ID_TRAY_ABOUTPUMPKIN |
529 | MENUITEM SEPARATOR | 531 | MENUITEM SEPARATOR |
530 | MENUITEM "E&xit", ID_TRAY_EXIT | 532 | MENUITEM "E&xit", ID_TRAY_EXIT |
531 | END | 533 | END |
532 | END | 534 | END |
533 | 535 | ||
534 | 536 | ||
535 | ///////////////////////////////////////////////////////////////////////////// | 537 | ///////////////////////////////////////////////////////////////////////////// |
536 | // | 538 | // |
537 | // String Table | 539 | // String Table |
538 | // | 540 | // |
539 | 541 | ||
540 | STRINGTABLE DISCARDABLE | 542 | STRINGTABLE DISCARDABLE |
541 | BEGIN | 543 | BEGIN |
542 | IDS_ABOUTBOX "&About PumpKIN..." | 544 | IDS_ABOUTBOX "&About PumpKIN..." |
543 | IDS_FMT_BYTES "%lu" | 545 | IDS_FMT_BYTES "%lu" |
544 | IDP_SOCKETS_INIT_FAILED "Windows sockets initialization failed." | 546 | IDP_SOCKETS_INIT_FAILED "Windows sockets initialization failed." |
545 | IDS_TFTP_ERROR_ACCESS "Access violation" | 547 | IDS_TFTP_ERROR_ACCESS "Access violation" |
546 | IDS_TFTP_ERROR_NOTFOUND "File not found" | 548 | IDS_TFTP_ERROR_NOTFOUND "File not found" |
547 | IDS_TFTP_ERROR_DIRFULL "Directory is full" | 549 | IDS_TFTP_ERROR_DIRFULL "Directory is full" |
548 | IDS_TFTP_ERROR_SHARING "Sharing violation" | 550 | IDS_TFTP_ERROR_SHARING "Sharing violation" |
549 | IDS_TFTP_ERROR_DISKFULL "Disk full" | 551 | IDS_TFTP_ERROR_DISKFULL "Disk full" |
550 | IDS_TFTP_ERROR_UNDEFINED "Undefined error" | 552 | IDS_TFTP_ERROR_UNDEFINED "Undefined error" |
551 | IDS_LOG_START "PumpKIN started" | 553 | IDS_LOG_START "PumpKIN started" |
552 | IDS_LOG_LISTENRECEIVEERROR "Error listening for incoming connections" | 554 | IDS_LOG_LISTENRECEIVEERROR "Error listening for incoming connections" |
553 | END | 555 | END |
554 | 556 | ||
555 | STRINGTABLE DISCARDABLE | 557 | STRINGTABLE DISCARDABLE |
556 | BEGIN | 558 | BEGIN |
557 | IDS_LOG_LISTENACCEPTERROR "Error accepting incoming connection" | 559 | IDS_LOG_LISTENACCEPTERROR "Error accepting incoming connection" |
558 | IDS_LOG_RRQSERVE "'%s' of type '%s' is requested from %s" | 560 | IDS_LOG_RRQSERVE "'%s' of type '%s' is requested from %s" |
559 | IDS_LOG_LISTENOPCODE "Invalid opcode in initial connection request" | 561 | IDS_LOG_LISTENOPCODE "Invalid opcode in initial connection request" |
560 | IDS_LOG_XFERUDPSEND "UDP packet send failed" | 562 | IDS_LOG_XFERUDPSEND "UDP packet send failed" |
561 | IDS_LOG_XFERRECEIVE "Error on xfer socket" | 563 | IDS_LOG_XFERRECEIVE "Error on xfer socket" |
562 | IDS_LOG_XFERSEND "Error on xfer socket" | 564 | IDS_LOG_XFERSEND "Error on xfer socket" |
563 | IDS_LOG_XFERUDPRECEIVE "UDP packet receive failed" | 565 | IDS_LOG_XFERUDPRECEIVE "UDP packet receive failed" |
564 | IDS_LOG_XFERSOURCETID "Packet from unexpected source" | 566 | IDS_LOG_XFERSOURCETID "Packet from unexpected source" |
565 | IDS_LOG_SENTTFTPERROR ">> %u: %s" | 567 | IDS_LOG_SENTTFTPERROR ">> %u: %s" |
566 | IDS_LOG_GOTTFTPERROR "TFTP:%u: %s" | 568 | IDS_LOG_GOTTFTPERROR "TFTP:%u: %s" |
567 | IDS_LOG_XFEROPCODE "Invalid opcode (%u) during transfer received" | 569 | IDS_LOG_XFEROPCODE "Invalid opcode (%u) during transfer received" |
568 | IDS_LOG_XFERRRQFINISHED "Transfer of '%s' has successfully completed" | 570 | IDS_LOG_XFERRRQFINISHED "Transfer of '%s' has successfully completed" |
569 | IDS_TITLE_OPTIONS "Options" | 571 | IDS_TITLE_OPTIONS "Options" |
570 | IDS_LOG_WRQSERVE "Writing of '%s' of type '%s' is requested by %s" | 572 | IDS_LOG_WRQSERVE "Writing of '%s' of type '%s' is requested by %s" |
571 | IDS_TFTP_ERROR_FAILEDTORENAME "Too many clones of the file" | 573 | IDS_TFTP_ERROR_FAILEDTORENAME "Too many clones of the file" |
572 | IDS_RENAME_TITLE "Save As" | 574 | IDS_RENAME_TITLE "Save As" |
573 | END | 575 | END |
574 | 576 | ||
575 | STRINGTABLE DISCARDABLE | 577 | STRINGTABLE DISCARDABLE |
576 | BEGIN | 578 | BEGIN |
577 | IDS_LOG_TIMEDOUT "Transmission of '%s' is timed out" | 579 | IDS_LOG_TIMEDOUT "Transmission of '%s' is timed out" |
578 | IDS_CONFIRMEXIT_TITLE "Exit" | 580 | IDS_CONFIRMEXIT_TITLE "Exit" |
579 | IDS_CONFIRMEXIT_TEXT "File transmission is currently in progress. Are you sure you want to exit?" | 581 | IDS_CONFIRMEXIT_TEXT "File transmission is currently in progress. Are you sure you want to exit?" |
580 | IDS_LOG_XFERWRQFINISHED "Transfer of '%s' has successfully completed" | 582 | IDS_LOG_XFERWRQFINISHED "Transfer of '%s' has successfully completed" |
581 | IDS_LOG_XFERABORTED "Transfer of '%s' was aborted" | 583 | IDS_LOG_XFERABORTED "Transfer of '%s' was aborted" |
582 | IDS_TITLE_PUTREQUEST "Send file" | 584 | IDS_TITLE_PUTREQUEST "Send file" |
583 | IDS_TITLE_GETREQUEST "Fetch file" | 585 | IDS_TITLE_GETREQUEST "Fetch file" |
584 | IDS_WTALKHEADING "Talk with " | 586 | IDS_WTALKHEADING "Talk with " |
585 | IDS_TITLE_BROWSEFILE "Browse" | 587 | IDS_TITLE_BROWSEFILE "Browse" |
586 | IDS_LOG_RESOLVEFAILED "Failed to resolve host address for '%s'" | 588 | IDS_LOG_RESOLVEFAILED "Failed to resolve host address for '%s'" |
587 | IDS_LOG_FAILEDLOCALFILE "Failed to open local file '%s'" | 589 | IDS_LOG_FAILEDLOCALFILE "Failed to open local file '%s'" |
588 | IDS_LOG_FAILEDTOOPEN "Failed to open '%s'" | 590 | IDS_LOG_FAILEDTOOPEN "Failed to open '%s'" |
589 | IDS_OTALXHEADING "Open Talks: talking to " | 591 | IDS_OTALXHEADING "Open Talks: talking to " |
590 | IDS_REGISTRYKEY "Klever Group" | 592 | IDS_REGISTRYKEY "Klever Group" |
591 | IDS_KLEVERNET_URL "http://www.klever.net/" | 593 | IDS_KLEVERNET_URL "http://www.klever.net/" |
592 | IDS_LOGTIMEFORMAT "%H:%M:%S %B %d" | 594 | IDS_LOGTIMEFORMAT "%H:%M:%S %B %d" |
593 | END | 595 | END |
594 | 596 | ||
595 | STRINGTABLE DISCARDABLE | 597 | STRINGTABLE DISCARDABLE |
596 | BEGIN | 598 | BEGIN |
597 | ID_TRAY_HELP "Read the help on PumpKIN" | 599 | ID_TRAY_HELP "Read the help on PumpKIN" |
598 | ID_TRAY_ABOUTPUMPKIN "Learn about PumpKIN and it's creator" | 600 | ID_TRAY_ABOUTPUMPKIN "Learn about PumpKIN and it's creator" |
599 | ID_TRAY_EXIT "Close PumpKIN" | 601 | ID_TRAY_EXIT "Close PumpKIN" |
600 | ID_TRAY_SENDFILE "Send file over the network to your tete-a-tete" | 602 | ID_TRAY_SENDFILE "Send file over the network to your tete-a-tete" |
601 | ID_TRAY_FETCHFILE "Fetch file from remote computer" | 603 | ID_TRAY_FETCHFILE "Fetch file from remote computer" |
602 | ID_TRAY_OPTIONS "Set PumpKIN options" | 604 | ID_TRAY_OPTIONS "Set PumpKIN options" |
603 | ID_TRAY_SHOWPUMPKINWINDOW "Show main window" | 605 | ID_TRAY_SHOWPUMPKINWINDOW "Show main window" |
604 | ID_TRAY_OPENFILESFOLDER "Explore TFTP root folder" | 606 | ID_TRAY_OPENFILESFOLDER "Explore TFTP root folder" |
605 | ID_TRAY_LISTEN "Listen for incoming requests" | 607 | ID_TRAY_LISTEN "Listen for incoming requests" |
606 | END | 608 | END |
607 | 609 | ||
608 | STRINGTABLE DISCARDABLE | 610 | STRINGTABLE DISCARDABLE |
609 | BEGIN | 611 | BEGIN |
610 | IDC_CONNECTIONS "Active transfers" | 612 | IDC_CONNECTIONS "Active transfers" |
611 | IDC_LOG "PumpKIN Activity Log" | 613 | IDC_LOG "PumpKIN Activity Log" |
612 | IDC_GET "Fetch file from remote server" | 614 | IDC_GET "Fetch file from remote server" |
613 | IDC_PUT "Send file over the net" | 615 | IDC_PUT "Send file over the net" |
614 | IDC_ABORT "Abort transfer currently in progress" | 616 | IDC_ABORT "Abort transfer currently in progress" |
615 | IDC_EXIT "Close PumpKIN" | 617 | IDC_EXIT "Close PumpKIN" |
616 | END | 618 | END |
617 | 619 | ||
618 | STRINGTABLE DISCARDABLE | 620 | STRINGTABLE DISCARDABLE |
619 | BEGIN | 621 | BEGIN |
620 | IDC_OPTIONS "Set PumpKIN options" | 622 | IDC_OPTIONS "Set PumpKIN options" |
621 | IDC_REFRESH "Refresh talks list" | 623 | IDC_REFRESH "Refresh talks list" |
622 | IDC_BROWSE "Browse" | 624 | IDC_BROWSE "Browse" |
623 | END | 625 | END |
624 | 626 | ||
625 | STRINGTABLE DISCARDABLE | 627 | STRINGTABLE DISCARDABLE |
626 | BEGIN | 628 | BEGIN |
627 | ID_HELP "Read help on PumpKIN" | 629 | ID_HELP "Read help on PumpKIN" |
628 | END | 630 | END |
629 | 631 | ||
630 | STRINGTABLE DISCARDABLE | 632 | STRINGTABLE DISCARDABLE |
631 | BEGIN | 633 | BEGIN |
632 | IDS_DROPFILES_TITLE "Drop Files" | 634 | IDS_DROPFILES_TITLE "Drop Files" |
633 | IDS_NOMULTIPLEDROP_TEXT "You can't drop more than one file here. Only the first one will be accepted" | 635 | IDS_NOMULTIPLEDROP_TEXT "You can't drop more than one file here. Only the first one will be accepted" |
634 | IDS_LOG_REQUESTING "Requesting '%s' from '%s'" | 636 | IDS_LOG_REQUESTING "Requesting '%s' from '%s'" |
635 | IDS_LOG_SENDING "Sending '%s' to '%s'" | 637 | IDS_LOG_SENDING "Sending '%s' to '%s'" |
636 | IDS_WTALKAT "@" | 638 | IDS_WTALKAT "@" |
637 | IDS_OTALXAT " at " | 639 | IDS_OTALXAT " at " |
638 | IDS_TFTP_ERROR_TSIZE "Invalid transfer size" | 640 | IDS_TFTP_ERROR_TSIZE "Invalid transfer size" |
639 | IDS_TFTP_ERROR_BSIZE "Invalid block size" | 641 | IDS_TFTP_ERROR_BSIZE "Invalid block size" |
640 | IDS_TFTP_ERROR_TOUT "Invalid timeout" | 642 | IDS_TFTP_ERROR_TOUT "Invalid timeout" |
641 | IDS_SELECT_TFTPROOT "Select TFTP filesystem root.." | 643 | IDS_SELECT_TFTPROOT "Select TFTP filesystem root.." |
642 | IDS_FILTER_WAV "Sound Files (*.wav)|*.wav||" | 644 | IDS_FILTER_WAV "Sound Files (*.wav)|*.wav||" |
643 | IDS_TITLE_WAV "Select sound.." | 645 | IDS_TITLE_WAV "Select sound.." |
644 | IDS_BOX_CANTBIND "Failed to create listening socket. The port may be in use by another application." | 646 | IDS_BOX_CANTBIND "Failed to create listening socket. The port may be in use by another application." |
645 | IDS_NO_XFER_OP "No request type specified." | 647 | IDS_NO_XFER_OP "No request type specified." |
646 | IDS_INVALID_IP "Invalid IP address." | 648 | IDS_INVALID_IP "Invalid IP address." |
647 | IDS_INVALID_NETMASK "Invalid netmask." | 649 | IDS_INVALID_NETMASK "Invalid netmask." |
648 | END | 650 | END |
649 | 651 | ||
650 | STRINGTABLE DISCARDABLE | 652 | STRINGTABLE DISCARDABLE |
651 | BEGIN | 653 | BEGIN |
652 | AFX_IDS_APP_TITLE "PUMPKIN" | 654 | AFX_IDS_APP_TITLE "PUMPKIN" |
653 | END | 655 | END |
654 | 656 | ||
655 | STRINGTABLE DISCARDABLE | 657 | STRINGTABLE DISCARDABLE |
656 | BEGIN | 658 | BEGIN |
657 | IDS_INVALID_RULE "Invalid access rule." | 659 | IDS_INVALID_RULE "Invalid access rule." |
658 | IDS_LOG_LOGERROR "Error logging to '%s'" | 660 | IDS_LOG_LOGERROR "Error logging to '%s'" |
659 | IDS_TFTP_ERROR_TOOBIG "File is too big, try increasing block size" | 661 | IDS_TFTP_ERROR_TOOBIG "File is too big, try increasing block size" |
660 | END | 662 | END |
661 | 663 | ||
662 | #endif // English (U.S.) resources | 664 | #endif // English (U.S.) resources |
663 | ///////////////////////////////////////////////////////////////////////////// | 665 | ///////////////////////////////////////////////////////////////////////////// |
664 | 666 | ||
665 | 667 | ||
666 | 668 | ||
667 | #ifndef APSTUDIO_INVOKED | 669 | #ifndef APSTUDIO_INVOKED |
668 | ///////////////////////////////////////////////////////////////////////////// | 670 | ///////////////////////////////////////////////////////////////////////////// |
669 | // | 671 | // |
670 | // Generated from the TEXTINCLUDE 3 resource. | 672 | // Generated from the TEXTINCLUDE 3 resource. |
671 | // | 673 | // |
672 | #define _AFX_NO_SPLITTER_RESOURCES | 674 | #define _AFX_NO_SPLITTER_RESOURCES |
673 | #define _AFX_NO_OLE_RESOURCES | 675 | #define _AFX_NO_OLE_RESOURCES |
674 | #define _AFX_NO_TRACKER_RESOURCES | 676 | #define _AFX_NO_TRACKER_RESOURCES |
675 | #define _AFX_NO_PROPERTY_RESOURCES | 677 | #define _AFX_NO_PROPERTY_RESOURCES |
676 | 678 | ||
677 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) | 679 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) |
678 | #ifdef _WIN32 | 680 | #ifdef _WIN32 |
679 | LANGUAGE 9, 1 | 681 | LANGUAGE 9, 1 |
680 | #pragma code_page(1252) | 682 | #pragma code_page(1252) |
681 | #endif | 683 | #endif |
682 | #include "res\PumpKIN.rc2" // non-Microsoft Visual C++ edited resources | 684 | #include "res\PumpKIN.rc2" // non-Microsoft Visual C++ edited resources |
683 | #include "afxres.rc" // Standard components | 685 | #include "afxres.rc" // Standard components |
684 | #endif | 686 | #endif |
685 | ///////////////////////////////////////////////////////////////////////////// | 687 | ///////////////////////////////////////////////////////////////////////////// |
686 | #endif // not APSTUDIO_INVOKED | 688 | #endif // not APSTUDIO_INVOKED |
687 | 689 | ||
diff --git a/resource.h b/resource.h index 7961e5e..2c2fa02 100644..100755 --- a/resource.h +++ b/resource.h | |||
@@ -1,173 +1,174 @@ | |||
1 | //{{NO_DEPENDENCIES}} | 1 | //{{NO_DEPENDENCIES}} |
2 | // Microsoft Developer Studio generated include file. | 2 | // Microsoft Developer Studio generated include file. |
3 | // Used by PumpKIN.rc | 3 | // Used by PumpKIN.rc |
4 | // | 4 | // |
5 | #define IDM_ABOUTBOX 0x0010 | 5 | #define IDM_ABOUTBOX 0x0010 |
6 | #define IDD_ABOUTBOX 100 | 6 | #define IDD_ABOUTBOX 100 |
7 | #define IDS_ABOUTBOX 101 | 7 | #define IDS_ABOUTBOX 101 |
8 | #define IDC_TRAYICON 101 | 8 | #define IDC_TRAYICON 101 |
9 | #define IDD_PUMPKIN_DIALOG 102 | 9 | #define IDD_PUMPKIN_DIALOG 102 |
10 | #define IDS_FMT_BYTES 102 | 10 | #define IDS_FMT_BYTES 102 |
11 | #define IDP_SOCKETS_INIT_FAILED 103 | 11 | #define IDP_SOCKETS_INIT_FAILED 103 |
12 | #define IDS_TFTP_ERROR_ACCESS 104 | 12 | #define IDS_TFTP_ERROR_ACCESS 104 |
13 | #define IDS_TFTP_ERROR_NOTFOUND 105 | 13 | #define IDS_TFTP_ERROR_NOTFOUND 105 |
14 | #define IDS_TFTP_ERROR_DIRFULL 106 | 14 | #define IDS_TFTP_ERROR_DIRFULL 106 |
15 | #define IDD_PROPS_SERVER 106 | 15 | #define IDD_PROPS_SERVER 106 |
16 | #define IDS_TFTP_ERROR_SHARING 107 | 16 | #define IDS_TFTP_ERROR_SHARING 107 |
17 | #define IDD_PROPS_NETWORK 107 | 17 | #define IDD_PROPS_NETWORK 107 |
18 | #define IDS_TFTP_ERROR_DISKFULL 108 | 18 | #define IDS_TFTP_ERROR_DISKFULL 108 |
19 | #define IDS_TFTP_ERROR_UNDEFINED 109 | 19 | #define IDS_TFTP_ERROR_UNDEFINED 109 |
20 | #define IDS_LOG_START 110 | 20 | #define IDS_LOG_START 110 |
21 | #define IDS_LOG_LISTENRECEIVEERROR 111 | 21 | #define IDS_LOG_LISTENRECEIVEERROR 111 |
22 | #define IDS_LOG_LISTENACCEPTERROR 112 | 22 | #define IDS_LOG_LISTENACCEPTERROR 112 |
23 | #define IDS_LOG_RRQSERVE 113 | 23 | #define IDS_LOG_RRQSERVE 113 |
24 | #define IDS_LOG_LISTENOPCODE 114 | 24 | #define IDS_LOG_LISTENOPCODE 114 |
25 | #define IDS_LOG_XFERUDPSEND 115 | 25 | #define IDS_LOG_XFERUDPSEND 115 |
26 | #define IDS_LOG_XFERRECEIVE 116 | 26 | #define IDS_LOG_XFERRECEIVE 116 |
27 | #define IDS_LOG_XFERSEND 117 | 27 | #define IDS_LOG_XFERSEND 117 |
28 | #define IDS_LOG_XFERUDPRECEIVE 118 | 28 | #define IDS_LOG_XFERUDPRECEIVE 118 |
29 | #define IDS_LOG_XFERSOURCETID 119 | 29 | #define IDS_LOG_XFERSOURCETID 119 |
30 | #define IDS_LOG_SENTTFTPERROR 120 | 30 | #define IDS_LOG_SENTTFTPERROR 120 |
31 | #define IDS_LOG_GOTTFTPERROR 121 | 31 | #define IDS_LOG_GOTTFTPERROR 121 |
32 | #define IDS_LOG_XFEROPCODE 122 | 32 | #define IDS_LOG_XFEROPCODE 122 |
33 | #define IDS_LOG_XFERRRQFINISHED 123 | 33 | #define IDS_LOG_XFERRRQFINISHED 123 |
34 | #define IDS_TITLE_OPTIONS 124 | 34 | #define IDS_TITLE_OPTIONS 124 |
35 | #define IDS_LOG_WRQSERVE 125 | 35 | #define IDS_LOG_WRQSERVE 125 |
36 | #define IDS_TFTP_ERROR_FAILEDTORENAME 126 | 36 | #define IDS_TFTP_ERROR_FAILEDTORENAME 126 |
37 | #define IDS_RENAME_TITLE 127 | 37 | #define IDS_RENAME_TITLE 127 |
38 | #define IDR_MAINFRAME 128 | 38 | #define IDR_MAINFRAME 128 |
39 | #define IDS_LOG_TIMEDOUT 128 | 39 | #define IDS_LOG_TIMEDOUT 128 |
40 | #define IDS_CONFIRMEXIT_TITLE 129 | 40 | #define IDS_CONFIRMEXIT_TITLE 129 |
41 | #define IDI_RRQ 129 | 41 | #define IDI_RRQ 129 |
42 | #define IDS_CONFIRMEXIT_TEXT 130 | 42 | #define IDS_CONFIRMEXIT_TEXT 130 |
43 | #define IDI_WRQ 130 | 43 | #define IDI_WRQ 130 |
44 | #define IDD_CONFIRM_RRQ 131 | 44 | #define IDD_CONFIRM_RRQ 131 |
45 | #define IDS_LOG_XFERWRQFINISHED 131 | 45 | #define IDS_LOG_XFERWRQFINISHED 131 |
46 | #define IDD_CONFIRM_WRQ 132 | 46 | #define IDD_CONFIRM_WRQ 132 |
47 | #define IDB_BACKGROUND 132 | 47 | #define IDB_BACKGROUND 132 |
48 | #define IDS_LOG_XFERABORTED 132 | 48 | #define IDS_LOG_XFERABORTED 132 |
49 | #define IDS_TITLE_PUTREQUEST 133 | 49 | #define IDS_TITLE_PUTREQUEST 133 |
50 | #define IDS_TITLE_GETREQUEST 134 | 50 | #define IDS_TITLE_GETREQUEST 134 |
51 | #define IDR_WAVE_RING 135 | 51 | #define IDR_WAVE_RING 135 |
52 | #define IDS_TALKHEADING 135 | 52 | #define IDS_TALKHEADING 135 |
53 | #define IDS_WTALKHEADING 135 | 53 | #define IDS_WTALKHEADING 135 |
54 | #define IDR_WAVE_FINISHED 136 | 54 | #define IDR_WAVE_FINISHED 136 |
55 | #define IDS_TITLE_BROWSEFILE 136 | 55 | #define IDS_TITLE_BROWSEFILE 136 |
56 | #define IDD_REQUEST 137 | 56 | #define IDD_REQUEST 137 |
57 | #define IDS_LOG_RESOLVEFAILED 137 | 57 | #define IDS_LOG_RESOLVEFAILED 137 |
58 | #define IDS_LOG_FAILEDLOCALFILE 138 | 58 | #define IDS_LOG_FAILEDLOCALFILE 138 |
59 | #define IDD_PROPS_SOUNDS 138 | 59 | #define IDD_PROPS_SOUNDS 138 |
60 | #define IDS_LOG_FAILEDTOOPEN 139 | 60 | #define IDS_LOG_FAILEDTOOPEN 139 |
61 | #define IDM_POPUPS 140 | 61 | #define IDM_POPUPS 140 |
62 | #define IDS_OTALXHEADING 140 | 62 | #define IDS_OTALXHEADING 140 |
63 | #define IDS_REGISTRYKEY 141 | 63 | #define IDS_REGISTRYKEY 141 |
64 | #define IDS_KLEVERNET_URL 142 | 64 | #define IDS_KLEVERNET_URL 142 |
65 | #define IDR_WAVE_ABORTED 142 | 65 | #define IDR_WAVE_ABORTED 142 |
66 | #define IDS_LOGTIMEFORMAT 143 | 66 | #define IDS_LOGTIMEFORMAT 143 |
67 | #define IDS_DROPFILES_TITLE 144 | 67 | #define IDS_DROPFILES_TITLE 144 |
68 | #define IDS_NOMULTIPLEDROP_TEXT 145 | 68 | #define IDS_NOMULTIPLEDROP_TEXT 145 |
69 | #define IDI_BROWSE 145 | 69 | #define IDI_BROWSE 145 |
70 | #define IDS_LOG_REQUESTING 146 | 70 | #define IDS_LOG_REQUESTING 146 |
71 | #define IDS_LOG_SENDING 147 | 71 | #define IDS_LOG_SENDING 147 |
72 | #define IDS_WTALKAT 148 | 72 | #define IDS_WTALKAT 148 |
73 | #define IDS_OTALXAT 149 | 73 | #define IDS_OTALXAT 149 |
74 | #define IDI_PLAY 149 | 74 | #define IDI_PLAY 149 |
75 | #define IDS_TFTP_ERROR_TSIZE 150 | 75 | #define IDS_TFTP_ERROR_TSIZE 150 |
76 | #define IDD_PROPS_ACL 150 | 76 | #define IDD_PROPS_ACL 150 |
77 | #define IDS_TFTP_ERROR_BSIZE 151 | 77 | #define IDS_TFTP_ERROR_BSIZE 151 |
78 | #define IDS_TFTP_ERROR_TOUT 152 | 78 | #define IDS_TFTP_ERROR_TOUT 152 |
79 | #define IDI_UP 152 | 79 | #define IDI_UP 152 |
80 | #define IDS_SELECT_TFTPROOT 153 | 80 | #define IDS_SELECT_TFTPROOT 153 |
81 | #define IDI_DOWN 153 | 81 | #define IDI_DOWN 153 |
82 | #define IDS_FILTER_WAV 154 | 82 | #define IDS_FILTER_WAV 154 |
83 | #define IDI_REMOVE 154 | 83 | #define IDI_REMOVE 154 |
84 | #define IDS_TITLE_WAV 155 | 84 | #define IDS_TITLE_WAV 155 |
85 | #define IDS_BOX_CANTBIND 156 | 85 | #define IDS_BOX_CANTBIND 156 |
86 | #define IDS_NO_XFER_OP 157 | 86 | #define IDS_NO_XFER_OP 157 |
87 | #define IDS_INVALID_IP 158 | 87 | #define IDS_INVALID_IP 158 |
88 | #define IDS_INVALID_NETMASK 159 | 88 | #define IDS_INVALID_NETMASK 159 |
89 | #define IDS_INVALID_RULE 160 | 89 | #define IDS_INVALID_RULE 160 |
90 | #define IDS_LOG_LOGERROR 161 | 90 | #define IDS_LOG_LOGERROR 161 |
91 | #define IDS_TFTP_ERROR_TOOBIG 162 | 91 | #define IDS_TFTP_ERROR_TOOBIG 162 |
92 | #define IDS_LOG_DENYING 163 | 92 | #define IDS_LOG_DENYING 163 |
93 | #define IDC_KLEVERNET 1000 | 93 | #define IDC_KLEVERNET 1000 |
94 | #define IDC_CONNECTIONS 1001 | 94 | #define IDC_CONNECTIONS 1001 |
95 | #define IDC_LOG 1003 | 95 | #define IDC_LOG 1003 |
96 | #define IDC_GET 1004 | 96 | #define IDC_GET 1004 |
97 | #define IDC_PUT 1005 | 97 | #define IDC_PUT 1005 |
98 | #define IDC_ABORT 1006 | 98 | #define IDC_ABORT 1006 |
99 | #define IDC_EXIT 1007 | 99 | #define IDC_EXIT 1007 |
100 | #define IDC_TFTPROOT 1008 | 100 | #define IDC_TFTPROOT 1008 |
101 | #define IDC_TFTPSUBDIRS 1009 | 101 | #define IDC_TFTPSUBDIRS 1009 |
102 | #define IDC_RRQ_GIVEALL 1010 | 102 | #define IDC_RRQ_GIVEALL 1010 |
103 | #define IDC_RRQ_ALWAYSCONFIRM 1011 | 103 | #define IDC_RRQ_ALWAYSCONFIRM 1011 |
104 | #define IDC_RRQ_DENYALL 1012 | 104 | #define IDC_RRQ_DENYALL 1012 |
105 | #define IDC_WRQ_TAKEALL 1013 | 105 | #define IDC_WRQ_TAKEALL 1013 |
106 | #define IDC_WRQ_PROMPTEXISTING 1014 | 106 | #define IDC_WRQ_PROMPTEXISTING 1014 |
107 | #define IDC_WRQ_ALWAYSCONFIRM 1015 | 107 | #define IDC_WRQ_ALWAYSCONFIRM 1015 |
108 | #define IDC_WRQ_DENYALL 1016 | 108 | #define IDC_WRQ_DENYALL 1016 |
109 | #define IDC_PROMPTTIMEOUT 1017 | 109 | #define IDC_PROMPTTIMEOUT 1017 |
110 | #define IDC_LISTENPORT 1018 | 110 | #define IDC_LISTENPORT 1018 |
111 | #define IDC_LISTENSPIN 1019 | 111 | #define IDC_LISTENSPIN 1019 |
112 | #define IDC_SPEAKPORT 1020 | 112 | #define IDC_SPEAKPORT 1020 |
113 | #define IDC_SPEAKSPIN 1021 | 113 | #define IDC_SPEAKSPIN 1021 |
114 | #define IDC_MAXUDPSIZE 1022 | 114 | #define IDC_MAXUDPSIZE 1022 |
115 | #define IDC_MAXUDPSPIN 1023 | 115 | #define IDC_MAXUDPSPIN 1023 |
116 | #define IDC_TIMEOUT 1024 | 116 | #define IDC_TIMEOUT 1024 |
117 | #define IDC_TIMESPIN 1025 | 117 | #define IDC_TIMESPIN 1025 |
118 | #define IDC_OPTIONS 1026 | 118 | #define IDC_OPTIONS 1026 |
119 | #define IDC_BLOCKSIZE 1026 | 119 | #define IDC_BLOCKSIZE 1026 |
120 | #define IDC_BSIZESPIN 1027 | 120 | #define IDC_BSIZESPIN 1027 |
121 | #define IDC_HOST 1028 | 121 | #define IDC_HOST 1028 |
122 | #define IDC_FILE 1029 | 122 | #define IDC_FILE 1029 |
123 | #define IDC_RENAME 1030 | 123 | #define IDC_RENAME 1030 |
124 | #define IDC_REMOTEFILE 1030 | 124 | #define IDC_REMOTEFILE 1030 |
125 | #define IDC_RESUME 1031 | 125 | #define IDC_RESUME 1031 |
126 | #define IDC_REFRESH 1032 | 126 | #define IDC_REFRESH 1032 |
127 | #define IDC_BROWSE 1034 | 127 | #define IDC_BROWSE 1034 |
128 | #define IDC_TALKS 1035 | 128 | #define IDC_TALKS 1035 |
129 | #define IDC_LOCALFILE 1036 | 129 | #define IDC_LOCALFILE 1036 |
130 | #define IDC_TYPE 1037 | 130 | #define IDC_TYPE 1037 |
131 | #define IDC_BSIZE 1039 | 131 | #define IDC_BSIZE 1039 |
132 | #define IDC_RING 1041 | 132 | #define IDC_RING 1041 |
133 | #define IDC_RING_BROWSE 1042 | 133 | #define IDC_RING_BROWSE 1042 |
134 | #define IDC_RING_PLAY 1043 | 134 | #define IDC_RING_PLAY 1043 |
135 | #define IDC_ACL_LIST 1043 | 135 | #define IDC_ACL_LIST 1043 |
136 | #define IDC_FINISHED 1044 | 136 | #define IDC_FINISHED 1044 |
137 | #define IDC_ACL_UP 1044 | 137 | #define IDC_ACL_UP 1044 |
138 | #define IDC_FINISHED_BROWSE 1045 | 138 | #define IDC_FINISHED_BROWSE 1045 |
139 | #define IDC_ACL_DOWN 1045 | 139 | #define IDC_ACL_DOWN 1045 |
140 | #define IDC_FINISHED_PLAY 1046 | 140 | #define IDC_FINISHED_PLAY 1046 |
141 | #define IDC_ACL_REMOVE 1046 | 141 | #define IDC_ACL_REMOVE 1046 |
142 | #define IDC_ABORTED 1047 | 142 | #define IDC_ABORTED 1047 |
143 | #define IDC_ACL_ADDR 1047 | 143 | #define IDC_ACL_ADDR 1047 |
144 | #define IDC_ABORTED_BROWSE 1048 | 144 | #define IDC_ABORTED_BROWSE 1048 |
145 | #define IDC_ACL_RULE 1048 | 145 | #define IDC_ACL_RULE 1048 |
146 | #define IDC_ABORTED_PLAY 1049 | 146 | #define IDC_ABORTED_PLAY 1049 |
147 | #define IDC_ACL_NETMASK 1049 | 147 | #define IDC_ACL_NETMASK 1049 |
148 | #define IDC_ACL_ADD 1050 | 148 | #define IDC_ACL_ADD 1050 |
149 | #define IDC_ACL_XFER 1051 | 149 | #define IDC_ACL_XFER 1051 |
150 | #define IDC_ACL_REPLACE 1052 | 150 | #define IDC_ACL_REPLACE 1052 |
151 | #define IDC_LISTENING 1052 | 151 | #define IDC_LISTENING 1052 |
152 | #define IDC_LOGFILE 1053 | 152 | #define IDC_LOGFILE 1053 |
153 | #define IDC_LOGFILE_BROWSE 1054 | 153 | #define IDC_LOGFILE_BROWSE 1054 |
154 | #define IDC_LISTENADDRESS 1055 | ||
154 | #define ID_TRAY_HELP 32771 | 155 | #define ID_TRAY_HELP 32771 |
155 | #define ID_TRAY_ABOUTPUMPKIN 32772 | 156 | #define ID_TRAY_ABOUTPUMPKIN 32772 |
156 | #define ID_TRAY_EXIT 32773 | 157 | #define ID_TRAY_EXIT 32773 |
157 | #define ID_TRAY_SENDFILE 32774 | 158 | #define ID_TRAY_SENDFILE 32774 |
158 | #define ID_TRAY_FETCHFILE 32775 | 159 | #define ID_TRAY_FETCHFILE 32775 |
159 | #define ID_TRAY_OPTIONS 32776 | 160 | #define ID_TRAY_OPTIONS 32776 |
160 | #define ID_TRAY_SHOWPUMPKINWINDOW 32777 | 161 | #define ID_TRAY_SHOWPUMPKINWINDOW 32777 |
161 | #define ID_TRAY_OPENFILESFOLDER 32778 | 162 | #define ID_TRAY_OPENFILESFOLDER 32778 |
162 | #define ID_TRAY_LISTEN 32780 | 163 | #define ID_TRAY_LISTEN 32780 |
163 | 164 | ||
164 | // Next default values for new objects | 165 | // Next default values for new objects |
165 | // | 166 | // |
166 | #ifdef APSTUDIO_INVOKED | 167 | #ifdef APSTUDIO_INVOKED |
167 | #ifndef APSTUDIO_READONLY_SYMBOLS | 168 | #ifndef APSTUDIO_READONLY_SYMBOLS |
168 | #define _APS_NEXT_RESOURCE_VALUE 155 | 169 | #define _APS_NEXT_RESOURCE_VALUE 156 |
169 | #define _APS_NEXT_COMMAND_VALUE 32781 | 170 | #define _APS_NEXT_COMMAND_VALUE 32781 |
170 | #define _APS_NEXT_CONTROL_VALUE 1055 | 171 | #define _APS_NEXT_CONTROL_VALUE 1056 |
171 | #define _APS_NEXT_SYMED_VALUE 102 | 172 | #define _APS_NEXT_SYMED_VALUE 102 |
172 | #endif | 173 | #endif |
173 | #endif | 174 | #endif |