summaryrefslogtreecommitdiffabout
authorMichael Krelin <hacker@klever.net>2006-02-02 23:07:50 (UTC)
committer Michael Krelin <hacker@klever.net>2006-02-02 23:07:50 (UTC)
commit39bb4331674cc77560a546f4f9b14b143603d4be (patch) (side-by-side diff)
treefbbc1006c655888a5483ddd359c52b863e7a27ab
parentfedc32eb7d20e5278a2125ead3ed125dc63b5746 (diff)
downloadpumpkin-39bb4331674cc77560a546f4f9b14b143603d4be.zip
pumpkin-39bb4331674cc77560a546f4f9b14b143603d4be.tar.gz
pumpkin-39bb4331674cc77560a546f4f9b14b143603d4be.tar.bz2
- version bump to 2.7
- year bump to 2006 - ip-based access control - server switchable off - logging to file git-svn-id: http://svn.klever.net/kin/pumpkin/trunk@144 fe716a7a-6dde-0310-88d9-d003556173a8
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--ACLTargetCombo.cpp85
-rw-r--r--ACLTargetCombo.h42
-rw-r--r--COPYING2
-rw-r--r--PropsACL.cpp290
-rw-r--r--PropsACL.h71
-rw-r--r--PropsServer.cpp19
-rw-r--r--PropsServer.h3
-rw-r--r--PumpKINDlg.cpp109
-rw-r--r--PumpKINDlg.h178
-rw-r--r--Trayer.cpp7
-rw-r--r--Trayer.h1
-rw-r--r--help/pumpkin.cnt1
-rw-r--r--help/pumpkin.rtf15
-rw-r--r--help/pumpkin.xml17
-rw-r--r--install/Install.clw35
-rw-r--r--install/install.cpp2
-rw-r--r--install/install.rc10
-rw-r--r--pumpkin.clw78
-rw-r--r--pumpkin.mak362
-rw-r--r--pumpkin.rc169
-rw-r--r--res/down.icobin0 -> 766 bytes
-rw-r--r--res/remove.icobin0 -> 766 bytes
-rw-r--r--res/up.icobin0 -> 766 bytes
-rw-r--r--resource.h29
24 files changed, 1394 insertions, 131 deletions
diff --git a/ACLTargetCombo.cpp b/ACLTargetCombo.cpp
new file mode 100644
index 0000000..cdbd075
--- a/dev/null
+++ b/ACLTargetCombo.cpp
@@ -0,0 +1,85 @@
+// ACLTargetCombo.cpp : implementation file
+//
+
+#include "stdafx.h"
+#include "PumpKIN.h"
+#include "PumpKINDlg.h"
+#include "ACLTargetCombo.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#undef THIS_FILE
+static char THIS_FILE[] = __FILE__;
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+// CACLTargetCombo
+
+CACLTargetCombo::CACLTargetCombo()
+: m_op(-1)
+{
+}
+
+CACLTargetCombo::~CACLTargetCombo()
+{
+}
+
+
+BEGIN_MESSAGE_MAP(CACLTargetCombo, CComboBox)
+ //{{AFX_MSG_MAP(CACLTargetCombo)
+ // NOTE - the ClassWizard will add and remove mapping macros here.
+ //}}AFX_MSG_MAP
+END_MESSAGE_MAP()
+
+/////////////////////////////////////////////////////////////////////////////
+// CACLTargetCombo message handlers
+
+void CACLTargetCombo::SetOp(int op)
+{
+ m_op=op;
+ ResetContent();
+ switch(op) {
+ case tftp::opRRQ:
+ m_tmap.RemoveAll();
+ SetItemData(m_tmap[acl_rule::rrqNone]=AddString("fallback to global"),acl_rule::rrqNone);
+ SetItemData(m_tmap[acl_rule::rrqDeny]=AddString("deny access"),acl_rule::rrqDeny);
+ SetItemData(m_tmap[acl_rule::rrqPrompt]=AddString("prompt"),acl_rule::rrqPrompt);
+ SetItemData(m_tmap[acl_rule::rrqGrant]=AddString("grant access"),CPumpKINDlg::rrqGrant);
+ SetCurSel(0);
+ EnableWindow(TRUE);
+ break;
+ case tftp::opWRQ:
+ m_tmap.RemoveAll();
+ SetItemData(m_tmap[acl_rule::wrqNone]=AddString("fallback to global"),acl_rule::wrqNone);
+ SetItemData(m_tmap[acl_rule::wrqDeny]=AddString("deny access"),acl_rule::wrqDeny);
+ SetItemData(m_tmap[acl_rule::wrqPrompt]=AddString("prompt"),acl_rule::wrqPrompt);
+ SetItemData(m_tmap[acl_rule::wrqPromptIfExists]=AddString("prompt if file exists"),acl_rule::wrqPromptIfExists);
+ SetItemData(m_tmap[acl_rule::wrqGrant]=AddString("grant access"),acl_rule::wrqGrant);
+ SetCurSel(0);
+ EnableWindow(TRUE);
+ break;
+ default:
+ EnableWindow(FALSE);
+ break;
+ }
+}
+
+int CACLTargetCombo::GetTarget()
+{
+ int cs=GetCurSel();
+ if(cs==CB_ERR)
+ return -1;
+ return GetItemData(cs);
+}
+
+void CACLTargetCombo::SetTarget(int t,int op)
+{
+ if(op>=0)
+ SetOp(op);
+ ASSERT(m_op>=0);
+ int i;
+ if(m_tmap.Lookup(t,i))
+ SetCurSel(i);
+ else
+ SetCurSel(0);
+}
diff --git a/ACLTargetCombo.h b/ACLTargetCombo.h
new file mode 100644
index 0000000..ef7baef
--- a/dev/null
+++ b/ACLTargetCombo.h
@@ -0,0 +1,42 @@
+// ACLTargetCombo.h : header file
+//
+
+/////////////////////////////////////////////////////////////////////////////
+// CACLTargetCombo window
+
+class CACLTargetCombo : public CComboBox
+{
+// Construction
+public:
+ void SetTarget(int t,int op=-1);
+ int GetTarget();
+ void SetOp(int op);
+ int m_op;
+ CACLTargetCombo();
+
+// Attributes
+public:
+ CMap<int,int,int,int> m_tmap;
+
+// Operations
+public:
+
+// Overrides
+ // ClassWizard generated virtual function overrides
+ //{{AFX_VIRTUAL(CACLTargetCombo)
+ //}}AFX_VIRTUAL
+
+// Implementation
+public:
+ virtual ~CACLTargetCombo();
+
+ // Generated message map functions
+protected:
+ //{{AFX_MSG(CACLTargetCombo)
+ // NOTE - the ClassWizard will add and remove member functions here.
+ //}}AFX_MSG
+
+ DECLARE_MESSAGE_MAP()
+};
+
+/////////////////////////////////////////////////////////////////////////////
diff --git a/COPYING b/COPYING
index b830fe7..72571d7 100644
--- a/COPYING
+++ b/COPYING
@@ -1,3 +1,3 @@
-Copyright (c) 1997-2005 Klever Group (http://www.klever.net/)
+Copyright (c) 1997-2006 Klever Group (http://www.klever.net/)
Permission is hereby granted, free of charge, to any person obtaining a copy of
diff --git a/PropsACL.cpp b/PropsACL.cpp
new file mode 100644
index 0000000..6d918ad
--- a/dev/null
+++ b/PropsACL.cpp
@@ -0,0 +1,290 @@
+// PropsACL.cpp : implementation file
+//
+
+#include "stdafx.h"
+#include "PumpKIN.h"
+#include "PumpKINDlg.h"
+#include "ACLTargetCombo.h"
+#include "PropsACL.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#undef THIS_FILE
+static char THIS_FILE[] = __FILE__;
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+// CPropsACL property page
+
+IMPLEMENT_DYNCREATE(CPropsACL, CPropertyPage)
+
+CPropsACL::CPropsACL() : CPropertyPage(CPropsACL::IDD)
+{
+ //{{AFX_DATA_INIT(CPropsACL)
+ //}}AFX_DATA_INIT
+}
+
+CPropsACL::~CPropsACL()
+{
+}
+
+void CPropsACL::DoDataExchange(CDataExchange* pDX)
+{
+ CPropertyPage::DoDataExchange(pDX);
+ //{{AFX_DATA_MAP(CPropsACL)
+ DDX_Control(pDX, IDC_ACL_REPLACE, m_ReplaceCtl);
+ DDX_Control(pDX, IDC_ACL_NETMASK, m_NetmaskCtl);
+ DDX_Control(pDX, IDC_ACL_XFER, m_XferCtl);
+ DDX_Control(pDX, IDC_ACL_UP, m_UpCtl);
+ DDX_Control(pDX, IDC_ACL_RULE, m_RuleCtl);
+ DDX_Control(pDX, IDC_ACL_REMOVE, m_RemoveCtl);
+ DDX_Control(pDX, IDC_ACL_LIST, m_ListCtl);
+ DDX_Control(pDX, IDC_ACL_DOWN, m_DownCtl);
+ DDX_Control(pDX, IDC_ACL_ADDR, m_AddrCtl);
+ DDX_Control(pDX, IDC_ACL_ADD, m_AddCtl);
+ //}}AFX_DATA_MAP
+}
+
+
+BEGIN_MESSAGE_MAP(CPropsACL, CPropertyPage)
+ //{{AFX_MSG_MAP(CPropsACL)
+ ON_CBN_SELCHANGE(IDC_ACL_XFER, OnSelchangeAclXfer)
+ ON_NOTIFY(LVN_ITEMCHANGED, IDC_ACL_LIST, OnItemchangedAclList)
+ ON_BN_CLICKED(IDC_ACL_ADD, OnAclAdd)
+ ON_BN_CLICKED(IDC_ACL_REPLACE, OnAclReplace)
+ ON_BN_CLICKED(IDC_ACL_REMOVE, OnAclRemove)
+ ON_BN_CLICKED(IDC_ACL_UP, OnAclUp)
+ ON_BN_CLICKED(IDC_ACL_DOWN, OnAclDown)
+ //}}AFX_MSG_MAP
+END_MESSAGE_MAP()
+
+/////////////////////////////////////////////////////////////////////////////
+// CPropsACL message handlers
+
+BOOL CPropsACL::OnInitDialog()
+{
+ CPropertyPage::OnInitDialog();
+
+ m_FocusedRule=-1;
+
+ m_Images.Create(16,16,TRUE,2,1);
+ m_iRRQ = m_Images.Add(AfxGetApp()->LoadIcon(IDI_RRQ));
+ m_iWRQ = m_Images.Add(AfxGetApp()->LoadIcon(IDI_WRQ));
+ ASSERT(m_iRRQ>=0); ASSERT(m_iWRQ>=0);
+ m_ListCtl.SetImageList(&m_Images,LVSIL_NORMAL);
+ m_ListCtl.SetImageList(&m_Images,LVSIL_SMALL);
+ m_ListCtl.SetImageList(&m_Images,LVSIL_STATE);
+
+ CRect lrc; m_ListCtl.GetClientRect(&lrc);
+ long lrcw3 = lrc.Width()/3;
+ m_ListCtl.InsertColumn(0,"IP",LVCFMT_LEFT,lrcw3,subitemIP);
+ m_ListCtl.InsertColumn(1,"netmask",LVCFMT_LEFT,lrcw3,subitemNM);
+ m_ListCtl.InsertColumn(2,"action",LVCFMT_LEFT,lrc.Width()-lrcw3*2,subitemAction);
+
+ m_UpCtl.SetIcon(AfxGetApp()->LoadIcon(IDI_UP));
+ m_DownCtl.SetIcon(AfxGetApp()->LoadIcon(IDI_DOWN));
+ m_RemoveCtl.SetIcon(AfxGetApp()->LoadIcon(IDI_REMOVE));
+
+ m_XferCtl.SetItemData(0,tftp::opRRQ);
+ m_XferCtl.SetItemData(1,tftp::opWRQ);
+
+ m_AddrCtl.SetWindowText("192.168.0.0");
+ m_NetmaskCtl.SetWindowText("255.255.255.0");
+
+ for(int i=0;i<m_rulist.GetSize();++i) {
+ m_ListCtl.InsertItem(i,0);
+ SetListRule(i,m_rulist[i]);
+ }
+
+ UpdateControls();
+
+ return TRUE; // return TRUE unless you set the focus to a control
+ // EXCEPTION: OCX Property Pages should return FALSE
+}
+
+void CPropsACL::OnSelchangeAclXfer() {
+ int cs = m_XferCtl.GetCurSel();
+ if(cs==CB_ERR) {
+ m_RuleCtl.EnableWindow(FALSE);
+ }else{
+ int rq = m_XferCtl.GetItemData(cs);
+ m_RuleCtl.SetOp(rq);
+ }
+}
+
+void CPropsACL::OnItemchangedAclList(NMHDR* pNMHDR, LRESULT* pResult) {
+ NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
+ if(
+ (pNMListView->uChanged&LVIF_STATE)
+ &&
+ (pNMListView->uNewState&LVIS_FOCUSED)!=(pNMListView->uOldState&LVIS_FOCUSED)
+ &&
+ pNMListView->iItem>=0 && pNMListView->iItem<m_ListCtl.GetItemCount()
+ ){
+ if(pNMListView->uNewState&LVIS_FOCUSED)
+ m_FocusedRule=pNMListView->iItem;
+ else if(pNMListView->iItem==m_FocusedRule)
+ m_FocusedRule=-1;
+ UpdateControls();
+ }
+
+ *pResult = 0;
+}
+
+void CPropsACL::UpdateControls() {
+ if(m_FocusedRule>=m_rulist.GetSize())
+ m_FocusedRule=-1;
+ if(m_FocusedRule>=0) {
+ m_UpCtl.EnableWindow(m_FocusedRule>0);
+ m_DownCtl.EnableWindow(m_FocusedRule<(m_ListCtl.GetItemCount()-1));
+ acl_rule r;
+ GetListRule(m_FocusedRule,r);
+ SetRule(r);
+ m_AddCtl.EnableWindow(TRUE);
+ m_ReplaceCtl.EnableWindow(TRUE);
+ }else{
+ OnSelchangeAclXfer();
+ m_AddCtl.EnableWindow(TRUE);
+ m_ReplaceCtl.EnableWindow(FALSE);
+ }
+ m_RemoveCtl.EnableWindow(m_ListCtl.GetSelectedCount()!=0 || m_FocusedRule>=0);
+}
+
+void CPropsACL::OnAclAdd() {
+ acl_rule r;
+ UINT err=GetRule(r);
+ if(err) {
+ AfxMessageBox(err,MB_OK);
+ }else{
+ int i=m_rulist.AppendRule(r);
+ ASSERT(r.op==acl_rule::opRRQ || r.op==acl_rule::opWRQ);
+ m_ListCtl.InsertItem(i,0);
+ SetListRule(i,r);
+ }
+}
+
+void CPropsACL::OnAclReplace() {
+ acl_rule r;
+ UINT err=GetRule(r);
+ if(err) {
+ AfxMessageBox(err,MB_OK);
+ }else{
+ ASSERT(m_FocusedRule>=0);
+ m_rulist[m_FocusedRule]=r;
+ SetListRule(m_FocusedRule,r);
+ }
+}
+
+int CPropsACL::GetOp() {
+ int cs=m_XferCtl.GetCurSel();
+ if(cs==CB_ERR)
+ return -1;
+ else
+ return m_XferCtl.GetItemData(cs);
+}
+
+void CPropsACL::SetOp(int op) {
+ int os=m_XferCtl.GetCount();
+ for(int i=0;i<os;++i) {
+ if(m_XferCtl.GetItemData(i)==op) {
+ m_XferCtl.SetCurSel(i);
+ return;
+ }
+ }
+ m_XferCtl.SetCurSel(-1);
+}
+
+void CPropsACL::SetListRule(int i,acl_rule& r) {
+ m_ListCtl.SetItem(i,subitemIP,LVIF_TEXT|LVIF_IMAGE,r.str_addr(),(r.op==acl_rule::opRRQ)?m_iRRQ:m_iWRQ,0,0,0);
+ m_ListCtl.SetItemText(i,subitemNM,r.str_mask());
+ m_ListCtl.SetItemText(i,subitemAction,r.str_target());
+}
+
+void CPropsACL::SetRule(acl_rule& r) {
+ SetOp(r.op);
+ m_AddrCtl.SetWindowText(r.str_addr());
+ m_NetmaskCtl.SetWindowText(r.str_mask());
+ m_RuleCtl.SetTarget(r.target,r.op);
+}
+
+void CPropsACL::GetListRule(int i,acl_rule& r) {
+ r = m_rulist[i];
+}
+
+UINT CPropsACL::GetRule(acl_rule& r)
+{
+ UINT rv=0;
+ r.op=GetOp();
+ if(r.op!=acl_rule::opRRQ && r.op!=acl_rule::opWRQ)
+ rv=IDS_NO_XFER_OP;
+ else{
+ CString t;
+ m_AddrCtl.GetWindowText(t);
+ if(t.IsEmpty() || ( (r.addr=inet_addr((LPCSTR)t))==INADDR_NONE && t!="255.255.255.255") )
+ rv=IDS_INVALID_IP;
+ else{
+ m_NetmaskCtl.GetWindowText(t);
+ if(t.IsEmpty() || ( (r.mask=inet_addr((LPCSTR)t))==INADDR_NONE && t!="255.255.255.255") )
+ rv=IDS_INVALID_NETMASK;
+ else{
+ r.target=m_RuleCtl.GetTarget();
+ if(!r.IsValid())
+ rv=IDS_INVALID_RULE;
+ }
+ }
+ }
+ return rv;
+}
+
+void CPropsACL::OnAclRemove() {
+ ASSERT(m_FocusedRule>=0);
+ int fr=m_FocusedRule;
+ if(fr<0 || fr>=m_rulist.GetSize()) return;
+ m_rulist.DeleteRule(fr);
+ m_ListCtl.DeleteItem(fr);
+ ASSERT(m_rulist.GetSize()==m_ListCtl.GetItemCount());
+ if(fr>=m_rulist.GetSize()) {
+ if(fr>0) {
+ fr=m_rulist.GetSize()-1;
+ }
+ }else
+ fr=-1;
+ if(fr>0)
+ SetListFocusSelection(fr);
+ m_ListCtl.SetFocus();
+}
+
+void CPropsACL::OnAclUp() {
+ int s=m_FocusedRule;
+ if(s<=0) return;
+ int d=s-1;
+ acl_rule r=m_rulist[s];
+ m_rulist[s]=m_rulist[d];
+ m_rulist[d]=r;
+ SetListRule(d,m_rulist[d]);
+ SetListRule(s,m_rulist[s]);
+ SetListFocusSelection(d);
+ m_ListCtl.SetFocus();
+}
+
+void CPropsACL::OnAclDown() {
+ int s=m_FocusedRule;
+ int d=s+1;
+ if(s<0 || d>=m_rulist.GetSize()) return;
+ acl_rule r=m_rulist[s];
+ m_rulist[s]=m_rulist[d];
+ m_rulist[d]=r;
+ SetListRule(d,m_rulist[d]);
+ SetListRule(s,m_rulist[s]);
+ SetListFocusSelection(d);
+ m_ListCtl.SetFocus();
+}
+
+void CPropsACL::SetListFocusSelection(int i) {
+ int s=m_ListCtl.GetItemCount();
+ for(int t=0;t<s;++t)
+ if(t!=i)
+ m_ListCtl.SetItemState(t,0,LVIS_FOCUSED|LVIS_SELECTED);
+ m_ListCtl.SetItemState(i,LVIS_FOCUSED|LVIS_SELECTED,LVIS_FOCUSED|LVIS_SELECTED);
+}
+
diff --git a/PropsACL.h b/PropsACL.h
new file mode 100644
index 0000000..c8773e7
--- a/dev/null
+++ b/PropsACL.h
@@ -0,0 +1,71 @@
+// PropsACL.h : header file
+//
+
+/////////////////////////////////////////////////////////////////////////////
+// CPropsACL dialog
+
+class CPropsACL : public CPropertyPage
+{
+ DECLARE_DYNCREATE(CPropsACL)
+
+// Construction
+public:
+ void SetListFocusSelection(int i);
+ UINT GetRule(acl_rule& r);
+ void GetListRule(int i,acl_rule& r);
+ void SetOp(int op);
+ void SetRule(acl_rule& r);
+ void SetListRule(int i,acl_rule& r);
+ int m_iWRQ;
+ int m_iRRQ;
+ CImageList m_Images;
+ int GetOp();
+ acl_rules_t m_rulist;
+ int m_FocusedRule;
+ void UpdateControls();
+ enum {
+ subitemIP=0, subitemNM, subitemAction
+ };
+
+ CPropsACL();
+ ~CPropsACL();
+
+// Dialog Data
+ //{{AFX_DATA(CPropsACL)
+ enum { IDD = IDD_PROPS_ACL };
+ CButton m_ReplaceCtl;
+ CEdit m_NetmaskCtl;
+ CComboBox m_XferCtl;
+ CButton m_UpCtl;
+ CACLTargetCombo m_RuleCtl;
+ CButton m_RemoveCtl;
+ CListCtrl m_ListCtl;
+ CButton m_DownCtl;
+ CEdit m_AddrCtl;
+ CButton m_AddCtl;
+ //}}AFX_DATA
+
+
+// Overrides
+ // ClassWizard generate virtual function overrides
+ //{{AFX_VIRTUAL(CPropsACL)
+ protected:
+ virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
+ //}}AFX_VIRTUAL
+
+// Implementation
+protected:
+ // Generated message map functions
+ //{{AFX_MSG(CPropsACL)
+ virtual BOOL OnInitDialog();
+ afx_msg void OnSelchangeAclXfer();
+ afx_msg void OnItemchangedAclList(NMHDR* pNMHDR, LRESULT* pResult);
+ afx_msg void OnAclAdd();
+ afx_msg void OnAclReplace();
+ afx_msg void OnAclRemove();
+ afx_msg void OnAclUp();
+ afx_msg void OnAclDown();
+ //}}AFX_MSG
+ DECLARE_MESSAGE_MAP()
+
+};
diff --git a/PropsServer.cpp b/PropsServer.cpp
index 6f1e08c..a3948e0 100644
--- a/PropsServer.cpp
+++ b/PropsServer.cpp
@@ -24,4 +24,5 @@ CPropsServer::CPropsServer() : CPropertyPage(CPropsServer::IDD)
m_TFTPSubdirs = FALSE;
m_WRQMode = -1;
+ m_LogFile = _T("");
//}}AFX_DATA_INIT
}
@@ -35,4 +36,5 @@ void CPropsServer::DoDataExchange(CDataExchange* pDX)
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CPropsServer)
+ DDX_Control(pDX, IDC_LOGFILE_BROWSE, m_LogBrowseCtl);
DDX_Control(pDX, IDC_BROWSE, m_BrowseCtl);
DDX_Control(pDX, IDC_PROMPTTIMEOUT, m_PromptTimeoutCtl);
@@ -41,4 +43,5 @@ void CPropsServer::DoDataExchange(CDataExchange* pDX)
DDX_Check(pDX, IDC_TFTPSUBDIRS, m_TFTPSubdirs);
DDX_Radio(pDX, IDC_WRQ_TAKEALL, m_WRQMode);
+ DDX_Text(pDX, IDC_LOGFILE, m_LogFile);
//}}AFX_DATA_MAP
if(pDX->m_bSaveAndValidate)
@@ -52,4 +55,5 @@ BEGIN_MESSAGE_MAP(CPropsServer, CPropertyPage)
//{{AFX_MSG_MAP(CPropsServer)
ON_BN_CLICKED(IDC_BROWSE, OnBrowse)
+ ON_BN_CLICKED(IDC_LOGFILE_BROWSE, OnLogfileBrowse)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
@@ -64,4 +68,5 @@ BOOL CPropsServer::OnInitDialog()
m_PromptTimeoutCtl.SetRange(5,60);
m_BrowseCtl.SetIcon(AfxGetApp()->LoadIcon(IDI_BROWSE));
+ m_LogBrowseCtl.SetIcon(AfxGetApp()->LoadIcon(IDI_BROWSE));
return TRUE; // return TRUE unless you set the focus to a control
@@ -78,2 +83,16 @@ CString nr = m_TFTPRoot;
}
}
+
+void CPropsServer::OnLogfileBrowse()
+{
+ UpdateData(TRUE);
+ CFileDialog cfd(
+ FALSE, ".log", (LPCSTR)m_LogFile,
+ OFN_EXPLORER|OFN_HIDEREADONLY|OFN_LONGNAMES|OFN_NOCHANGEDIR|OFN_OVERWRITEPROMPT|OFN_PATHMUSTEXIST,
+ "Log files (*.log)|*.log|All Files (*.*)|*.*||",
+ this);
+ if(cfd.DoModal()==IDOK) {
+ m_LogFile = cfd.GetPathName();
+ UpdateData(FALSE);
+ }
+}
diff --git a/PropsServer.h b/PropsServer.h
index 29d85bd..1563479 100644
--- a/PropsServer.h
+++ b/PropsServer.h
@@ -18,4 +18,5 @@ public:
//{{AFX_DATA(CPropsServer)
enum { IDD = IDD_PROPS_SERVER };
+ CButton m_LogBrowseCtl;
CButton m_BrowseCtl;
CSliderCtrl m_PromptTimeoutCtl;
@@ -24,4 +25,5 @@ public:
BOOL m_TFTPSubdirs;
int m_WRQMode;
+ CString m_LogFile;
//}}AFX_DATA
@@ -40,4 +42,5 @@ protected:
virtual BOOL OnInitDialog();
afx_msg void OnBrowse();
+ afx_msg void OnLogfileBrowse();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
diff --git a/PumpKINDlg.cpp b/PumpKINDlg.cpp
index b6b8a36..4cb1633 100644
--- a/PumpKINDlg.cpp
+++ b/PumpKINDlg.cpp
@@ -6,7 +6,9 @@
#include "PumpKINDlg.h"
+#include "ACLTargetCombo.h"
#include "PropsServer.h"
#include "PropsNetwork.h"
#include "PropsSounds.h"
+#include "PropsACL.h"
#include "ConfirmRRQDlg.h"
#include "ConfirmWRQDlg.h"
@@ -80,4 +82,8 @@ CPumpKINDlg::CPumpKINDlg(CWnd* pParent /*=NULL*/)
: CDialog(CPumpKINDlg::IDD, pParent)
{
+ m_Listener.m_Daddy = this;
+
+ m_bListen = TRUE;
+
m_ListenPort = 69;
m_bTFTPSubdirs = TRUE;
@@ -108,4 +114,13 @@ CPumpKINDlg::CPumpKINDlg(CWnd* pParent /*=NULL*/)
m_Trayer = new CTrayer(this);
ASSERT(m_Trayer);
+ /* Ensure we're backwards compatible */
+ ASSERT(CPumpKINDlg::rrqGiveAll==0);
+ ASSERT(CPumpKINDlg::rrqAlwaysConfirm==1);
+ ASSERT(CPumpKINDlg::rrqDenyAll==2);
+ ASSERT(CPumpKINDlg::wrqTakeAll==0);
+ ASSERT(CPumpKINDlg::wrqConfirmIfExists==1);
+ ASSERT(CPumpKINDlg::wrqAlwaysConfirm==2);
+ ASSERT(CPumpKINDlg::wrqDenyAll==3);
+ /* -- */
LoadSettings();
}
@@ -115,4 +130,5 @@ void CPumpKINDlg::DoDataExchange(CDataExchange* pDX)
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CPumpKINDlg)
+ DDX_Control(pDX, IDC_LISTENING, m_ListenCtl);
DDX_Control(pDX, IDC_ABORT, m_AbortCtl);
DDX_Control(pDX, IDC_OPTIONS, m_OptionsCtl);
@@ -152,4 +168,6 @@ BEGIN_MESSAGE_MAP(CPumpKINDlg, CDialog)
ON_WM_DROPFILES()
ON_BN_CLICKED(ID_HELP, OnHelp)
+ ON_BN_CLICKED(IDC_LISTENING, OnListening)
+ ON_COMMAND(ID_TRAY_LISTEN, OnTrayListen)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
@@ -218,4 +236,6 @@ CRect rc, drc;
ShowWindow(SW_HIDE);
+ m_ListenCtl.SetCheck(m_Listener.m_bListen?1:0);
+
// CG: The following block was added by the ToolTips component.
{
@@ -325,9 +345,8 @@ int CPumpKINDlg::OnCreate(LPCREATESTRUCT lpCreateStruct)
return -1;
- m_Listener.m_Daddy=this;
- if(!m_Listener.Create(m_ListenPort,SOCK_DGRAM)){
+ if(!m_Listener.SetListen(m_bListen)) {
+ m_bListen=FALSE;
TRACE0("Failed to create socket\n");
AfxMessageBox(IDS_BOX_CANTBIND,MB_OK|MB_ICONEXCLAMATION);
- return -1;
}
@@ -665,10 +684,13 @@ CString lFile = localFile?localFile:m_FileName;
TurnSlashes(lFile,TRUE);
UpdateList();
- if(!localFile){ // Check only if server
+ if(!localFile){ // Check only for incoming requests
if(CheckBadRelativeness(m_FileName)){
Deny(tftp::errAccessViolation,IDS_TFTP_ERROR_ACCESS);
return TRUE;
}
- switch(m_Daddy->m_RRQMode){
+ int atar=m_Daddy->m_aclRules.FindTarget(acl_rule::opRRQ,m_Peer.sin_addr.s_addr);
+ if(atar<0)
+ atar = m_Daddy->m_RRQMode;
+ switch(atar){
case CPumpKINDlg::rrqGiveAll:
break;
@@ -676,4 +698,6 @@ CString lFile = localFile?localFile:m_FileName;
if(ConfirmRequest())
break;
+ default:
+ TRACE1("Unexpected access target: %d\n",atar);
case CPumpKINDlg::rrqDenyAll:
Deny(tftp::errAccessViolation,IDS_TFTP_ERROR_ACCESS);
@@ -1108,5 +1132,5 @@ int i = m_Daddy->m_List.FindItem(&lvf);
}
-void CPumpKINDlg::LogLine(LPCTSTR str)
+void CPumpKINDlg::LogLineToScreen(LPCTSTR str)
{
ASSERT(m_LogLength);
@@ -1164,4 +1188,5 @@ CPropsServer server;
CPropsNetwork network;
CPropsSounds sounds;
+CPropsACL acl;
server.m_RRQMode=m_RRQMode;
@@ -1170,4 +1195,5 @@ CPropsSounds sounds;
server.m_WRQMode=m_WRQMode;
server.m_PromptTimeOut=m_PromptTimeOut;
+ server.m_LogFile=m_LogFile;
network.m_ListenPort=m_ListenPort;
@@ -1180,7 +1206,10 @@ CPropsSounds sounds;
sounds.m_Abort = m_bnwAbort;
+ acl.m_rulist = m_aclRules;
+
cps.AddPage(&server);
cps.AddPage(&network);
cps.AddPage(&sounds);
+ cps.AddPage(&acl);
if(cps.DoModal()==IDOK){
m_RRQMode=server.m_RRQMode;
@@ -1189,4 +1218,5 @@ CPropsSounds sounds;
m_WRQMode=server.m_WRQMode;
m_PromptTimeOut=server.m_PromptTimeOut;
+ m_LogFile=server.m_LogFile;
m_ListenPort=network.m_ListenPort;
@@ -1198,4 +1228,8 @@ CPropsSounds sounds;
m_bnwSuccess = sounds.m_Success;
m_bnwAbort = sounds.m_Abort;
+
+ m_aclRules = acl.m_rulist;
+
+ m_lastlogerr.Empty();
}
}
@@ -1245,6 +1279,8 @@ CString fn = localFile?ApplyRootGently(localFile):ApplyRoot(lf);
else
m_Rename=exists=FALSE;
- // *** m_WRQMode only if server transfer
- switch(m_Daddy->m_WRQMode){
+ int atar=m_Daddy->m_aclRules.FindTarget(acl_rule::opWRQ,m_Peer.sin_addr.s_addr);
+ if(atar<0)
+ atar=m_Daddy->m_WRQMode;
+ switch(atar){
case CPumpKINDlg::wrqTakeAll:
if(exists){
@@ -1269,4 +1305,6 @@ CString fn = localFile?ApplyRootGently(localFile):ApplyRoot(lf);
break;
}
+ default:
+ TRACE1("Unexpected access target: %d\n",atar);
case CPumpKINDlg::wrqDenyAll:
Deny(tftp::errAccessViolation,IDS_TFTP_ERROR_ACCESS);
@@ -1796,4 +1834,5 @@ void CPumpKINDlg::LoadSettings()
CWinApp *app = AfxGetApp();
ASSERT(app);
+ m_bListen=app->GetProfileInt("TFTPSettings","Listen",m_bListen);
m_bnwRequest=app->GetProfileString("BellsNWhistles","Request",m_bnwRequest);
m_bnwSuccess=app->GetProfileString("BellsNWhistles","Success",m_bnwSuccess);
@@ -1806,4 +1845,5 @@ CWinApp *app = AfxGetApp();
m_SpeakPort=app->GetProfileInt("TFTPSettings","SpeakPort",m_SpeakPort);
m_TFTPRoot=app->GetProfileString("TFTPSettings","TFTPRoot",m_TFTPRoot);
+ m_LogFile=app->GetProfileString("General","LogFile",m_LogFile);
m_TFTPTimeOut=CTimeSpan(app->GetProfileInt("TFTPSettings","TFTPTimeout",m_TFTPTimeOut.GetTotalSeconds()));
m_BlockSize=app->GetProfileInt("TFTPSettings","TFTPBlockSize",m_BlockSize);
@@ -1817,4 +1857,5 @@ CWinApp *app = AfxGetApp();
}
::SetCurrentDirectory(m_TFTPRoot);
+ m_aclRules.LoadProfile(app);
}
@@ -1823,4 +1864,5 @@ void CPumpKINDlg::SaveSettings()
CWinApp *app = AfxGetApp();
ASSERT(app);
+ app->WriteProfileInt("TFTPSettings","Listen",m_bListen);
app->WriteProfileString("BellsNWhistles","Request",m_bnwRequest);
app->WriteProfileString("BellsNWhistles","Success",m_bnwSuccess);
@@ -1833,4 +1875,5 @@ CWinApp *app = AfxGetApp();
app->WriteProfileInt("TFTPSettings","SpeakPort",m_SpeakPort);
app->WriteProfileString("TFTPSettings","TFTPRoot",m_TFTPRoot);
+ app->WriteProfileString("General","LogFile",m_LogFile);
app->WriteProfileInt("TFTPSettings","TFTPTimeout",m_TFTPTimeOut.GetTotalSeconds());
app->WriteProfileInt("TFTPSettings","TFTPBlockSize",m_BlockSize);
@@ -1838,4 +1881,5 @@ CWinApp *app = AfxGetApp();
app->WriteProfileInt("TFTPSettings","WRQMode",m_WRQMode);
app->WriteProfileInt("UISettings","Visble",m_bShown);
+ m_aclRules.SaveProfile(app);
}
@@ -1985,2 +2029,51 @@ void CPumpKINDlg::OnHelp()
AfxGetApp()->WinHelp(0,HELP_FINDER);
}
+
+BOOL CListenSocket::SetListen(BOOL b) {
+ ASSERT(m_Daddy);
+ if(b==m_bListen)
+ return TRUE;
+ if(b) {
+ if(!Create(m_Daddy->m_ListenPort,SOCK_DGRAM))
+ return FALSE;
+ return m_bListen=TRUE;
+ }else{
+ Close(); m_bListen=FALSE;
+ return TRUE;
+ }
+}
+
+void CPumpKINDlg::OnListening()
+{
+ if(!m_Listener.SetListen(m_ListenCtl.GetCheck()==1)) {
+ TRACE0("Failed to create socket\n");
+ AfxMessageBox(IDS_BOX_CANTBIND,MB_OK|MB_ICONEXCLAMATION);
+ }
+ m_ListenCtl.SetCheck(m_Listener.m_bListen?1:0);
+ m_bListen=m_Listener.m_bListen;
+}
+
+void CPumpKINDlg::OnTrayListen()
+{
+ if(!m_Listener.SetListen(!m_Listener.m_bListen)) {
+ TRACE0("Failed to create socket\n");
+ AfxMessageBox(IDS_BOX_CANTBIND,MB_OK|MB_ICONEXCLAMATION);
+ }
+ m_ListenCtl.SetCheck(m_Listener.m_bListen?1:0);
+ m_bListen=m_Listener.m_bListen;
+}
+
+void CPumpKINDlg::LogLine(LPCTSTR str)
+{
+ LogLineToScreen(str);
+ if(!m_LogFile.IsEmpty()) {
+ if(!Klever::LogRecord((LPCTSTR)m_LogFile,str)) {
+ if(m_lastlogerr!=m_LogFile) {
+ CString tmp;
+ tmp.Format(IDS_LOG_LOGERROR,m_LogFile);
+ LogLineToScreen(tmp);
+ m_lastlogerr=m_LogFile;
+ }
+ }
+ }
+}
diff --git a/PumpKINDlg.h b/PumpKINDlg.h
index 42ae62d..b247c56 100644
--- a/PumpKINDlg.h
+++ b/PumpKINDlg.h
@@ -114,9 +114,156 @@ public:
#define tftpSlackSize sizeof(tftp::tftpLength)
+struct acl_rule {
+ enum {
+ opRRQ=tftp::opRRQ, opWRQ=tftp::opWRQ
+ };
+ int op;
+ DWORD addr, mask;
+ enum {
+ rrqGrant=0, rrqPrompt, rrqDeny,
+ rrqRules,
+ rrqNone=-1
+ };
+ enum {
+ wrqGrant=0, wrqPromptIfExists, wrqPrompt, wrqDeny,
+ wrqRules,
+ wrqNone=-1
+ };
+ int target;
+
+ acl_rule()
+ : op(-1), addr(0), mask(0), target(-1) { }
+ acl_rule(int o,DWORD a,DWORD m,int t)
+ : op(o), addr(a), mask(m), target(t) { }
+ acl_rule(const acl_rule& s)
+ : op(s.op), addr(s.addr), mask(s.mask), target(s.target) { }
+
+ BOOL IsValid() {
+ if(op==opRRQ) {
+ if(target<rrqNone || target>=rrqRules)
+ return FALSE;
+ }else if(op==opWRQ) {
+ if(target<wrqNone || target>=wrqRules)
+ return FALSE;
+ }else
+ return FALSE;
+ return TRUE;
+ }
+
+ BOOL IsMatch(int o,DWORD a) {
+ if(o!=op) return FALSE;
+ if( (a&mask) != (addr&mask)) return FALSE;
+ return TRUE;
+ }
+
+ CString str_addr() {
+ return inet_ntoa(*(struct in_addr*)&addr);
+ }
+ CString str_mask() {
+ return inet_ntoa(*(struct in_addr*)&mask);
+ }
+ CString str_target() {
+ if(op==opRRQ) {
+ switch(target) {
+ case rrqNone: return "fallback";
+ case rrqGrant: return "grant";
+ case rrqPrompt: return "prompt";
+ case rrqDeny: return "deny";
+ default: return "?";
+ }
+ }else if(op==opWRQ) {
+ switch(target) {
+ case wrqNone: return "fallback";
+ case wrqGrant: return "grant";
+ case wrqPromptIfExists: return "prompt if exists";
+ case wrqPrompt: return "prompt";
+ case wrqDeny: return "deny";
+ default: return "?";
+ }
+ }else
+ return "?";
+ }
+
+ void SaveProfile(CWinApp* app,int i) {
+ CString n; n.Format("%d",i);
+ app->WriteProfileInt("ACL","op_"+n,op);
+ app->WriteProfileString("ACL","addr_"+n,str_addr());
+ app->WriteProfileString("ACL","mask_"+n,str_mask());
+ app->WriteProfileInt("ACL","target_"+n,target);
+ }
+
+ void LoadProfile(CWinApp* app,int i) {
+ CString n; n.Format("%d",i);
+ op=app->GetProfileInt("ACL","op_"+n,-1);
+ addr=inet_addr(app->GetProfileString("ACL","addr_"+n));
+ mask=inet_addr(app->GetProfileString("ACL","mask_"+n));
+ target=app->GetProfileInt("ACL","target_"+n,-1);
+ }
+
+};
+
+class acl_rules_t : public CArray<acl_rule,acl_rule&> {
+public:
+
+ acl_rules_t& operator=(const acl_rules_t& s) {
+ // Copy(s); XXX: unsuprisingly, there's a bug in MFC Copy, *pDst++=*pSrc (no ++ for Src)
+ RemoveAll();
+ int ns = s.GetSize();
+ SetSize(ns);
+ for(int i=0;i<ns;++i)
+ m_pData[i]=s.m_pData[i];
+ return *this;
+ }
+
+ int AppendRule(acl_rule& r) {
+ return Add(r);
+ }
+
+ void DeleteRule(int r) {
+ RemoveAt(r);
+ }
+
+ int FindRule(int op,DWORD ip) {
+ for(int i=0;i<GetSize();++i)
+ if(m_pData[i].IsMatch(op,ip))
+ return i;
+ return -1;
+ }
+
+ int FindTarget(int op,DWORD ip) {
+ int r=FindRule(op,ip);
+ if(r<0) return -1;
+ return m_pData[r].target;
+ }
+
+ void SaveProfile(CWinApp* app) {
+ int s=GetSize();
+ for(int i=0;i<s;++i)
+ m_pData[i].SaveProfile(app,i);
+ app->WriteProfileInt("ACL","rules",s);
+ }
+ void LoadProfile(CWinApp* app) {
+ RemoveAll();
+ int s=app->GetProfileInt("ACL","rules",0);
+ for(int i=0;i<s;++i) {
+ acl_rule r;
+ r.LoadProfile(app,i);
+ if(r.IsValid())
+ Add(r);
+ }
+ }
+};
+
class CPumpKINDlg;
class CListenSocket : public CAsyncSocket {
public:
- virtual void OnReceive(int nErrorCode);
CPumpKINDlg* m_Daddy;
+ BOOL m_bListen;
+
+ CListenSocket()
+ : m_bListen(FALSE), m_Daddy(0) { }
+
+ BOOL SetListen(BOOL b);
+ virtual void OnReceive(int nErrorCode);
};
@@ -221,4 +368,9 @@ class CPumpKINDlg : public CDialog
// Construction
public:
+ CString m_lastlogerr;
+ void LogLine(LPCTSTR str);
+ CString m_LogFile;
+ BOOL m_bListen;
+ acl_rules_t m_aclRules;
CString m_bnwRequest;
CString m_bnwSuccess;
@@ -241,5 +393,6 @@ public:
void LogLine(UINT msgID);
CTimeMap m_LogTimes;
- void LogLine(LPCTSTR str);
+ void LogLineToFile(LPCTSTR str);
+ void LogLineToScreen(LPCTSTR str);
int m_LogLength;
enum {
@@ -252,13 +405,17 @@ public:
CTimeSpan m_TFTPTimeOut;
enum {
- rrqGiveAll=0,
- rrqAlwaysConfirm,
- rrqDenyAll
+ rrqGiveAll=acl_rule::rrqGrant,
+ rrqAlwaysConfirm=acl_rule::rrqPrompt,
+ rrqDenyAll=acl_rule::rrqDeny,
+ rrqFallback=acl_rule::rrqNone,
+ rrqGrant=rrqGiveAll, rrqDeny=rrqDenyAll, rrqPrompt=rrqAlwaysConfirm
};
enum {
- wrqTakeAll=0,
- wrqConfirmIfExists,
- wrqAlwaysConfirm,
- wrqDenyAll
+ wrqTakeAll=acl_rule::wrqGrant,
+ wrqConfirmIfExists=acl_rule::wrqPromptIfExists,
+ wrqAlwaysConfirm=acl_rule::wrqPrompt,
+ wrqDenyAll=acl_rule::wrqDeny,
+ wrqFallback=acl_rule::wrqNone,
+ wrqGrant=wrqTakeAll,wrqDeny=wrqDenyAll, wrqPrompt=wrqAlwaysConfirm
};
UINT m_RRQMode;
@@ -274,4 +431,5 @@ public:
//{{AFX_DATA(CPumpKINDlg)
enum { IDD = IDD_PUMPKIN_DIALOG };
+ CButton m_ListenCtl;
CButton m_AbortCtl;
CButton m_OptionsCtl;
@@ -311,4 +469,5 @@ protected:
afx_msg void OnClose();
afx_msg void OnTrayShowpumpkinwindow();
+ afx_msg void OnTrayListen();
afx_msg void OnTrayExit();
afx_msg void OnTrayAboutpumpkin();
@@ -323,4 +482,5 @@ protected:
virtual void OnCancel();
afx_msg void OnHelp();
+ afx_msg void OnListening();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
diff --git a/Trayer.cpp b/Trayer.cpp
index 6e8c100..1e1ab3c 100644
--- a/Trayer.cpp
+++ b/Trayer.cpp
@@ -38,4 +38,5 @@ BEGIN_MESSAGE_MAP(CTrayer, CWnd)
ON_COMMAND(ID_TRAY_SENDFILE, OnTraySendfile)
ON_COMMAND(ID_TRAY_SHOWPUMPKINWINDOW, OnTrayShowpumpkinwindow)
+ ON_COMMAND(ID_TRAY_LISTEN, OnTrayListen)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
@@ -66,4 +67,5 @@ LRESULT CTrayer::OnTray(WPARAM wP,LPARAM lP)
SetForegroundWindow();
popUp->CheckMenuItem(ID_TRAY_SHOWPUMPKINWINDOW,MF_BYCOMMAND|(IsWindowVisible()?MF_CHECKED:MF_UNCHECKED));
+ popUp->CheckMenuItem(ID_TRAY_LISTEN,MF_BYCOMMAND|(m_Daddy->m_Listener.m_bListen?MF_CHECKED:MF_UNCHECKED));
popUp->TrackPopupMenu(TPM_RIGHTALIGN|TPM_LEFTBUTTON|TPM_RIGHTBUTTON,pt.x,pt.y,this);
m_inMenu--;
@@ -117,2 +119,7 @@ void CTrayer::OnTrayShowpumpkinwindow()
m_Daddy->SendMessage(WM_COMMAND,ID_TRAY_SHOWPUMPKINWINDOW);
}
+
+void CTrayer::OnTrayListen()
+{
+ m_Daddy->SendMessage(WM_COMMAND,ID_TRAY_LISTEN);
+}
diff --git a/Trayer.h b/Trayer.h
index 061a53a..c5a9465 100644
--- a/Trayer.h
+++ b/Trayer.h
@@ -42,4 +42,5 @@ protected:
afx_msg void OnTraySendfile();
afx_msg void OnTrayShowpumpkinwindow();
+ afx_msg void OnTrayListen();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
diff --git a/help/pumpkin.cnt b/help/pumpkin.cnt
index 0e09da3..dfe42e5 100644
--- a/help/pumpkin.cnt
+++ b/help/pumpkin.cnt
@@ -13,2 +13,3 @@
2 Network Options=NetworkOptions
2 Sounds Options=SoundsOptions
+2 Access Lists=ACL
diff --git a/help/pumpkin.rtf b/help/pumpkin.rtf
index b39ca9c..9c02ca9 100644
--- a/help/pumpkin.rtf
+++ b/help/pumpkin.rtf
@@ -19,5 +19,5 @@ K{\footnote about}
\par\sa120\sb120\qj\pard \f1\fs18\sb120 {\b {\i Enjoy!}}
{
-\par\pard\plain\sb360\sa120 \f1\fs16 Copyright (c) 1997-2005 {\uldb\cf0 Klever Group (http://www.klever.net/)}{\v %!ExecFile("http://www.klever.net/")}
+\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/")}
\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:
\par The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
@@ -29,4 +29,7 @@ K{\footnote about}
#{\footnote News}
${\footnote What's New}
+\par\pard\plain\f1\fs24\qc\cf2\b 2.7 - February 1st, 2006
+\par\pard\plain\fi0\li0\f1\fs18 \bullet Added acess lists based on request IP address and TFTP opcode for automating access policy
+\par\pard\plain\fi0\li0\f1\fs18 \bullet Added possibility to start/stop TFTP server, while keeping client functionality intact
\par\pard\plain\f1\fs24\qc\cf2\b 2.6 - August 6th, 2005
\par\pard\plain\fi0\li0\f1\fs18 \bullet more robust solution to the backslash/slash dilemma
@@ -113,5 +116,5 @@ ${\footnote Server Options}
\pard\plain\keepn
-#{\footnote SoundsOptoins}
+#{\footnote SoundsOptions}
${\footnote Sounds Options}
{ \f1\fs18\b\sb120 Sounds}
@@ -119,3 +122,11 @@ ${\footnote Sounds Options}
\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.
\page
+
+\pard\plain\keepn
+#{\footnote ACL}
+${\footnote Access Lists}
+{ \f1\fs18\b\sb120 Access Lists}
+\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.
+\par\sa120\sb120\qj\pard \f1\fs18\sb120 The rule consists of {\b request type}, source networke ({\b ip} and {\b netmask}) and {\b action} to take (see also {\uldb Server Options}{\v ServerOptions}).
+\page
} \ No newline at end of file
diff --git a/help/pumpkin.xml b/help/pumpkin.xml
index 38c54ca..944bb54 100644
--- a/help/pumpkin.xml
+++ b/help/pumpkin.xml
@@ -6,8 +6,12 @@
<p/>
<p><b><i>Enjoy!</i></b></p>
- <license years="1997-2005"/>
+ <license years="1997-2006"/>
<credist/>
</topic>
<topic id="News" title="What's New">
+ <newsfor version="2.7" date="">
+ <ni>Added acess lists based on request IP address and TFTP opcode for automating access policy</ni>
+ <ni>Added possibility to start/stop TFTP server, while keeping client functionality intact</ni>
+ </newsfor>
<newsfor version="2.6" date="August 6th, 2005">
<ni>more robust solution to the backslash/slash dilemma</ni>
@@ -37,4 +41,5 @@
<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>
<p>Use <a href="#Options">Options</a> button to set <kin>PumpKIN</kin> options.</p>
+ <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>
</topic>
<topic id="ConfirmRRQ" title="Confirm Read Request Dialog">
@@ -84,8 +89,16 @@
</ul>
</topic>
- <topic id="SoundsOptoins" title="Sounds Options">
+ <topic id="SoundsOptions" title="Sounds Options">
<heading scroll="no">Sounds</heading>
<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>
<p>You can select any <b>.wav</b> file or one of the predefined sounds from the dropdown list.</p>
</topic>
+ <topic id="ACL" title="Access Lists">
+ <heading scroll="no">Access Lists</heading>
+ <p>You can slightly automate your access policies by setting up read/write request behavior for different incoming requests.</p>
+ <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>
+ <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>
+ <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>
+ <p>If you wish to amend the rule, select it in the rules list, change parameters below and click the 'Replace rule' button.</p>
+ </topic>
</winhelp>
diff --git a/install/Install.clw b/install/Install.clw
new file mode 100644
index 0000000..6775b4c
--- a/dev/null
+++ b/install/Install.clw
@@ -0,0 +1,35 @@
+; CLW file contains information for the MFC ClassWizard
+
+[General Info]
+Version=1
+LastClass=
+LastTemplate=CDialog
+NewFileInclude1=#include "stdafx.h"
+NewFileInclude2=#include "install.h"
+LastPage=0
+
+ClassCount=0
+
+ResourceCount=2
+Resource1=IDD_INSTALLING (FALSE)
+Resource2=IDD_PATH
+
+[DLG:IDD_INSTALLING (FALSE)]
+Type=1
+Class=?
+ControlCount=4
+Control1=IDCANCEL,button,1342295808
+Control2=IDC_DISKS,SysAnimate32,1342242822
+Control3=IDC_STATE,static,1342308736
+Control4=IDC_PROGRESS,msctls_progress32,1342177280
+
+[DLG:IDD_PATH]
+Type=1
+Class=?
+ControlCount=5
+Control1=IDC_PROMPT,static,1342308352
+Control2=IDC_PATH,edit,1350631552
+Control3=IDC_BROWSE,button,1342242816
+Control4=IDOK,button,1342242817
+Control5=IDCANCEL,button,1342242816
+
diff --git a/install/install.cpp b/install/install.cpp
index d11de03..cfe4d27 100644
--- a/install/install.cpp
+++ b/install/install.cpp
@@ -2,5 +2,5 @@
#include "../shared-code/install.h"
-#define VERSION "2.6"
+#define VERSION "2.7"
#define KINAME "PumpKIN " VERSION
#define SKINAME "PumpKIN"
diff --git a/install/install.rc b/install/install.rc
index cc621ad..9a03edb 100644
--- a/install/install.rc
+++ b/install/install.rc
@@ -132,6 +132,6 @@ IDI_ICON ICON DISCARDABLE "../shared-data/install-icon.ico
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 2,6,0,0
- PRODUCTVERSION 2,6,0,0
+ FILEVERSION 2,7,0,0
+ PRODUCTVERSION 2,7,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
@@ -150,11 +150,11 @@ BEGIN
VALUE "CompanyName", "Klever Group (http://www.klever.net/)\0"
VALUE "FileDescription", "INSTALL: PumpKIN, tftp client/daemon\0"
- VALUE "FileVersion", "2, 6, 0, 0\0"
+ VALUE "FileVersion", "2, 7, 0, 0\0"
VALUE "InternalName", "INSTALL\0"
- VALUE "LegalCopyright", "Copyright © 1997-2005 Klever Group (http://www.klever.net/)\0"
+ VALUE "LegalCopyright", "Copyright © 1997-2006 Klever Group (http://www.klever.net/)\0"
VALUE "LegalTrademarks", "Klever Group (http://www.klever.net/)\0"
VALUE "OriginalFilename", "INSTALL.EXE\0"
VALUE "ProductName", "PumpKIN\0"
- VALUE "ProductVersion", "2, 6, 0, 0\0"
+ VALUE "ProductVersion", "2, 7, 0, 0\0"
END
END
diff --git a/pumpkin.clw b/pumpkin.clw
index 4ae747b..5344bfd 100644
--- a/pumpkin.clw
+++ b/pumpkin.clw
@@ -3,17 +3,17 @@
[General Info]
Version=1
-LastClass=CPropsSounds
-LastTemplate=CPropertyPage
+LastClass=CPropsServer
+LastTemplate=CComboBox
NewFileInclude1=#include "stdafx.h"
NewFileInclude2=#include "PumpKIN.h"
-ClassCount=12
+ClassCount=14
Class1=CPumpKINApp
Class2=CPumpKINDlg
Class3=CAboutDlg
-ResourceCount=9
+ResourceCount=10
Resource1=IDD_REQUEST
-Resource2=IDD_PROPS_SERVER
+Resource2=IDD_PROPS_NETWORK
Resource3=IDD_CONFIRM_RRQ
Resource4=IDD_ABOUTBOX
@@ -21,5 +21,5 @@ Class4=CPropsServer
Class5=CPropsNetwork
Resource5=IDD_CONFIRM_WRQ
-Resource6=IDD_PROPS_NETWORK
+Resource6=IDD_PROPS_ACL
Class6=CConfirmRRQDlg
Class7=CConfirmWRQDlg
@@ -32,4 +32,7 @@ Resource8=IDD_PROPS_SOUNDS
Class12=CPropsSounds
Resource9=IDM_POPUPS
+Class13=CPropsACL
+Class14=CACLTargetCombo
+Resource10=IDD_PROPS_SERVER
[CLS:CPumpKINApp]
@@ -46,5 +49,5 @@ Filter=W
BaseClass=CDialog
VirtualFilter=dWC
-LastObject=ID_HELP
+LastObject=CPumpKINDlg
[CLS:CAboutDlg]
@@ -70,5 +73,5 @@ Control5=IDC_KLEVERNET,button,1342242816
Type=1
Class=CPumpKINDlg
-ControlCount=9
+ControlCount=10
Control1=IDC_CONNECTIONS,SysListView32,1350631681
Control2=IDC_GET,button,1342259200
@@ -80,9 +83,10 @@ Control7=ID_HELP,button,1342259200
Control8=IDC_LOG,listbox,1353728129
Control9=IDCANCEL,button,1073741824
+Control10=IDC_LISTENING,button,1342275619
[DLG:IDD_PROPS_SERVER]
Type=1
Class=CPropsServer
-ControlCount=15
+ControlCount=18
Control1=IDC_STATIC,button,1342177287
Control2=IDC_TFTPROOT,edit,1350631552
@@ -100,4 +104,7 @@ Control13=IDC_WRQ_DENYALL,button,1342177289
Control14=IDC_STATIC,static,1342308609
Control15=IDC_PROMPTTIMEOUT,msctls_trackbar32,1342242823
+Control16=IDC_STATIC,button,1342177287
+Control17=IDC_LOGFILE,edit,1350631552
+Control18=IDC_LOGFILE_BROWSE,button,1342242880
[DLG:IDD_PROPS_NETWORK]
@@ -128,5 +135,5 @@ BaseClass=CPropertyPage
Filter=D
VirtualFilter=idWC
-LastObject=CPropsServer
+LastObject=IDC_LOGFILE_BROWSE
[CLS:CPropsNetwork]
@@ -137,5 +144,5 @@ BaseClass=CPropertyPage
Filter=D
VirtualFilter=idWC
-LastObject=CPropsNetwork
+LastObject=IDC_BLOCKSIZE
[DLG:IDD_CONFIRM_RRQ]
@@ -231,10 +238,11 @@ Command1=ID_TRAY_SENDFILE
Command2=ID_TRAY_FETCHFILE
Command3=ID_TRAY_OPTIONS
-Command4=ID_TRAY_SHOWPUMPKINWINDOW
-Command5=ID_TRAY_OPENFILESFOLDER
-Command6=ID_TRAY_HELP
-Command7=ID_TRAY_ABOUTPUMPKIN
-Command8=ID_TRAY_EXIT
-CommandCount=8
+Command4=ID_TRAY_LISTEN
+Command5=ID_TRAY_SHOWPUMPKINWINDOW
+Command6=ID_TRAY_OPENFILESFOLDER
+Command7=ID_TRAY_HELP
+Command8=ID_TRAY_ABOUTPUMPKIN
+Command9=ID_TRAY_EXIT
+CommandCount=9
[CLS:CRetrier]
@@ -282,2 +290,38 @@ LastObject=CPropsSounds
VirtualFilter=idWC
+[DLG:IDD_PROPS_ACL]
+Type=1
+Class=CPropsACL
+ControlCount=14
+Control1=IDC_ACL_LIST,SysListView32,1350631425
+Control2=IDC_ACL_UP,button,1342246720
+Control3=IDC_ACL_DOWN,button,1342246720
+Control4=IDC_ACL_REMOVE,button,1342246720
+Control5=IDC_STATIC,static,1342308352
+Control6=IDC_ACL_XFER,combobox,1344339971
+Control7=IDC_STATIC,static,1342308352
+Control8=IDC_ACL_ADDR,edit,1350631552
+Control9=IDC_STATIC,static,1342308352
+Control10=IDC_ACL_NETMASK,edit,1350631552
+Control11=IDC_STATIC,static,1342308352
+Control12=IDC_ACL_RULE,combobox,1344339971
+Control13=IDC_ACL_ADD,button,1342242816
+Control14=IDC_ACL_REPLACE,button,1342242816
+
+[CLS:CPropsACL]
+Type=0
+HeaderFile=PropsACL.h
+ImplementationFile=PropsACL.cpp
+BaseClass=CPropertyPage
+Filter=D
+LastObject=CPropsACL
+VirtualFilter=idWC
+
+[CLS:CACLTargetCombo]
+Type=0
+HeaderFile=ACLTargetCombo.h
+ImplementationFile=ACLTargetCombo.cpp
+BaseClass=CComboBox
+Filter=W
+LastObject=CACLTargetCombo
+
diff --git a/pumpkin.mak b/pumpkin.mak
index bd466fe..7d2ec22 100644
--- a/pumpkin.mak
+++ b/pumpkin.mak
@@ -67,6 +67,8 @@ ALL : "$(OUTDIR)\pumpkin.exe" "$(OUTDIR)\pumpkin.ex_" "$(OUTDIR)\pumpkin.hlp"\
CLEAN :
+ -@erase "$(INTDIR)\ACLTargetCombo.obj"
-@erase "$(INTDIR)\ConfirmRRQDlg.obj"
-@erase "$(INTDIR)\ConfirmWRQDlg.obj"
+ -@erase "$(INTDIR)\PropsACL.obj"
-@erase "$(INTDIR)\PropsNetwork.obj"
-@erase "$(INTDIR)\PropsServer.obj"
@@ -116,6 +118,8 @@ LINK32_FLAGS=/nologo /subsystem:windows /incremental:no\
/pdb:"$(OUTDIR)/pumpkin.pdb" /machine:I386 /out:"$(OUTDIR)/pumpkin.exe"
LINK32_OBJS= \
+ "$(INTDIR)\ACLTargetCombo.obj" \
"$(INTDIR)\ConfirmRRQDlg.obj" \
"$(INTDIR)\ConfirmWRQDlg.obj" \
+ "$(INTDIR)\PropsACL.obj" \
"$(INTDIR)\PropsNetwork.obj" \
"$(INTDIR)\PropsServer.obj" \
@@ -170,8 +174,12 @@ ALL : "$(OUTDIR)\pumpkin.exe" "$(OUTDIR)\pumpkin.bsc" "$(OUTDIR)\pumpkin.ex_"\
CLEAN :
+ -@erase "$(INTDIR)\ACLTargetCombo.obj"
+ -@erase "$(INTDIR)\ACLTargetCombo.sbr"
-@erase "$(INTDIR)\ConfirmRRQDlg.obj"
-@erase "$(INTDIR)\ConfirmRRQDlg.sbr"
-@erase "$(INTDIR)\ConfirmWRQDlg.obj"
-@erase "$(INTDIR)\ConfirmWRQDlg.sbr"
+ -@erase "$(INTDIR)\PropsACL.obj"
+ -@erase "$(INTDIR)\PropsACL.sbr"
-@erase "$(INTDIR)\PropsNetwork.obj"
-@erase "$(INTDIR)\PropsNetwork.sbr"
@@ -229,6 +237,8 @@ BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)/pumpkin.bsc"
BSC32_SBRS= \
+ "$(INTDIR)\ACLTargetCombo.sbr" \
"$(INTDIR)\ConfirmRRQDlg.sbr" \
"$(INTDIR)\ConfirmWRQDlg.sbr" \
+ "$(INTDIR)\PropsACL.sbr" \
"$(INTDIR)\PropsNetwork.sbr" \
"$(INTDIR)\PropsServer.sbr" \
@@ -253,6 +263,8 @@ LINK32_FLAGS=/nologo /subsystem:windows /incremental:yes\
/pdb:"$(OUTDIR)/pumpkin.pdb" /debug /machine:I386 /out:"$(OUTDIR)/pumpkin.exe"
LINK32_OBJS= \
+ "$(INTDIR)\ACLTargetCombo.obj" \
"$(INTDIR)\ConfirmRRQDlg.obj" \
"$(INTDIR)\ConfirmWRQDlg.obj" \
+ "$(INTDIR)\PropsACL.obj" \
"$(INTDIR)\PropsNetwork.obj" \
"$(INTDIR)\PropsServer.obj" \
@@ -306,6 +318,8 @@ ALL : "$(OUTDIR)\pumpkin.exe" "$(OUTDIR)\pumpkin.ex_" "$(OUTDIR)\pumpkin.hlp"\
CLEAN :
+ -@erase "$(INTDIR)\ACLTargetCombo.obj"
-@erase "$(INTDIR)\ConfirmRRQDlg.obj"
-@erase "$(INTDIR)\ConfirmWRQDlg.obj"
+ -@erase "$(INTDIR)\PropsACL.obj"
-@erase "$(INTDIR)\PropsNetwork.obj"
-@erase "$(INTDIR)\PropsServer.obj"
@@ -354,6 +368,8 @@ LINK32_FLAGS=/nologo /subsystem:windows /incremental:no\
/pdb:"$(OUTDIR)/pumpkin.pdb" /machine:I386 /out:"$(OUTDIR)/pumpkin.exe"
LINK32_OBJS= \
+ "$(INTDIR)\ACLTargetCombo.obj" \
"$(INTDIR)\ConfirmRRQDlg.obj" \
"$(INTDIR)\ConfirmWRQDlg.obj" \
+ "$(INTDIR)\PropsACL.obj" \
"$(INTDIR)\PropsNetwork.obj" \
"$(INTDIR)\PropsServer.obj" \
@@ -671,6 +687,9 @@ LINK32_OBJS= \
SOURCE=.\PumpKIN.cpp
+
+!IF "$(CFG)" == "PumpKIN - Win32 Release"
+
DEP_CPP_PUMPK=\
- ".\PumpKIN.h"\
+ ".\pumpkin.h"\
".\PumpKINDlg.h"\
".\shared-code\BellsNWhistles.h"\
@@ -679,7 +698,4 @@ DEP_CPP_PUMPK=\
-!IF "$(CFG)" == "PumpKIN - Win32 Release"
-
-
"$(INTDIR)\PumpKIN.obj" : $(SOURCE) $(DEP_CPP_PUMPK) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
@@ -688,4 +704,10 @@ DEP_CPP_PUMPK=\
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
+DEP_CPP_PUMPK=\
+ ".\pumpkin.h"\
+ ".\PumpKINDlg.h"\
+ ".\shared-code\kHelpers.h"\
+ ".\stdafx.h"\
+
"$(INTDIR)\PumpKIN.obj" : $(SOURCE) $(DEP_CPP_PUMPK) "$(INTDIR)"\
@@ -698,4 +720,11 @@ DEP_CPP_PUMPK=\
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
+DEP_CPP_PUMPK=\
+ ".\pumpkin.h"\
+ ".\PumpKINDlg.h"\
+ ".\shared-code\BellsNWhistles.h"\
+ ".\shared-code\kHelpers.h"\
+ ".\stdafx.h"\
+
"$(INTDIR)\PumpKIN.obj" : $(SOURCE) $(DEP_CPP_PUMPK) "$(INTDIR)"\
@@ -710,11 +739,16 @@ DEP_CPP_PUMPK=\
SOURCE=.\PumpKINDlg.cpp
+
+!IF "$(CFG)" == "PumpKIN - Win32 Release"
+
DEP_CPP_PUMPKI=\
+ ".\ACLTargetCombo.h"\
".\ConfirmRRQDlg.h"\
".\ConfirmWRQDlg.h"\
+ ".\PropsACL.h"\
".\PropsNetwork.h"\
".\PropsServer.h"\
".\PropsSounds.h"\
- ".\PumpKIN.h"\
+ ".\pumpkin.h"\
".\PumpKINDlg.h"\
".\RequestDlg.h"\
@@ -727,7 +761,4 @@ DEP_CPP_PUMPKI=\
-!IF "$(CFG)" == "PumpKIN - Win32 Release"
-
-
"$(INTDIR)\PumpKINDlg.obj" : $(SOURCE) $(DEP_CPP_PUMPKI) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
@@ -736,4 +767,22 @@ DEP_CPP_PUMPKI=\
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
+DEP_CPP_PUMPKI=\
+ ".\ACLTargetCombo.h"\
+ ".\ConfirmRRQDlg.h"\
+ ".\ConfirmWRQDlg.h"\
+ ".\PropsACL.h"\
+ ".\PropsNetwork.h"\
+ ".\PropsServer.h"\
+ ".\PropsSounds.h"\
+ ".\pumpkin.h"\
+ ".\PumpKINDlg.h"\
+ ".\RequestDlg.h"\
+ ".\Resolver.h"\
+ ".\Retrier.h"\
+ ".\shared-code\BellsNWhistles.h"\
+ ".\shared-code\kHelpers.h"\
+ ".\stdafx.h"\
+ ".\Trayer.h"\
+
"$(INTDIR)\PumpKINDlg.obj" : $(SOURCE) $(DEP_CPP_PUMPKI) "$(INTDIR)"\
@@ -746,4 +795,22 @@ DEP_CPP_PUMPKI=\
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
+DEP_CPP_PUMPKI=\
+ ".\ACLTargetCombo.h"\
+ ".\ConfirmRRQDlg.h"\
+ ".\ConfirmWRQDlg.h"\
+ ".\PropsACL.h"\
+ ".\PropsNetwork.h"\
+ ".\PropsServer.h"\
+ ".\PropsSounds.h"\
+ ".\pumpkin.h"\
+ ".\PumpKINDlg.h"\
+ ".\RequestDlg.h"\
+ ".\Resolver.h"\
+ ".\Retrier.h"\
+ ".\shared-code\BellsNWhistles.h"\
+ ".\shared-code\kHelpers.h"\
+ ".\stdafx.h"\
+ ".\Trayer.h"\
+
"$(INTDIR)\PumpKINDlg.obj" : $(SOURCE) $(DEP_CPP_PUMPKI) "$(INTDIR)"\
@@ -823,10 +890,13 @@ BuildCmds= \
SOURCE=.\pumpkin.rc
DEP_RSC_PUMPKIN=\
+ ".\res\down.ico"\
".\res\failed.wav"\
".\res\finished.wav"\
".\res\PumpKIN.ico"\
".\res\pumpkin.rc2"\
+ ".\res\remove.ico"\
".\res\ring.wav"\
".\res\rrq.ico"\
+ ".\res\up.ico"\
".\res\wrq.ico"\
".\shared-data\browse-icon.ico"\
@@ -952,7 +1022,10 @@ BuildCmds= \
SOURCE=.\PropsServer.cpp
+
+!IF "$(CFG)" == "PumpKIN - Win32 Release"
+
DEP_CPP_PROPS=\
".\PropsServer.h"\
- ".\PumpKIN.h"\
+ ".\pumpkin.h"\
".\shared-code\BellsNWhistles.h"\
".\shared-code\kHelpers.h"\
@@ -960,7 +1033,4 @@ DEP_CPP_PROPS=\
-!IF "$(CFG)" == "PumpKIN - Win32 Release"
-
-
"$(INTDIR)\PropsServer.obj" : $(SOURCE) $(DEP_CPP_PROPS) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
@@ -969,4 +1039,10 @@ DEP_CPP_PROPS=\
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
+DEP_CPP_PROPS=\
+ ".\PropsServer.h"\
+ ".\pumpkin.h"\
+ ".\shared-code\kHelpers.h"\
+ ".\stdafx.h"\
+
"$(INTDIR)\PropsServer.obj" : $(SOURCE) $(DEP_CPP_PROPS) "$(INTDIR)"\
@@ -979,4 +1055,11 @@ DEP_CPP_PROPS=\
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
+DEP_CPP_PROPS=\
+ ".\PropsServer.h"\
+ ".\pumpkin.h"\
+ ".\shared-code\BellsNWhistles.h"\
+ ".\shared-code\kHelpers.h"\
+ ".\stdafx.h"\
+
"$(INTDIR)\PropsServer.obj" : $(SOURCE) $(DEP_CPP_PROPS) "$(INTDIR)"\
@@ -993,5 +1076,5 @@ SOURCE=.\PropsNetwork.cpp
DEP_CPP_PROPSN=\
".\PropsNetwork.h"\
- ".\PumpKIN.h"\
+ ".\pumpkin.h"\
".\shared-code\BellsNWhistles.h"\
".\shared-code\kHelpers.h"\
@@ -1030,7 +1113,10 @@ DEP_CPP_PROPSN=\
SOURCE=.\ConfirmRRQDlg.cpp
+
+!IF "$(CFG)" == "PumpKIN - Win32 Release"
+
DEP_CPP_CONFI=\
".\ConfirmRRQDlg.h"\
- ".\PumpKIN.h"\
+ ".\pumpkin.h"\
".\PumpKINDlg.h"\
".\shared-code\BellsNWhistles.h"\
@@ -1039,7 +1125,4 @@ DEP_CPP_CONFI=\
-!IF "$(CFG)" == "PumpKIN - Win32 Release"
-
-
"$(INTDIR)\ConfirmRRQDlg.obj" : $(SOURCE) $(DEP_CPP_CONFI) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
@@ -1048,4 +1131,11 @@ DEP_CPP_CONFI=\
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
+DEP_CPP_CONFI=\
+ ".\ConfirmRRQDlg.h"\
+ ".\pumpkin.h"\
+ ".\PumpKINDlg.h"\
+ ".\shared-code\kHelpers.h"\
+ ".\stdafx.h"\
+
"$(INTDIR)\ConfirmRRQDlg.obj" : $(SOURCE) $(DEP_CPP_CONFI) "$(INTDIR)"\
@@ -1058,4 +1148,12 @@ DEP_CPP_CONFI=\
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
+DEP_CPP_CONFI=\
+ ".\ConfirmRRQDlg.h"\
+ ".\pumpkin.h"\
+ ".\PumpKINDlg.h"\
+ ".\shared-code\BellsNWhistles.h"\
+ ".\shared-code\kHelpers.h"\
+ ".\stdafx.h"\
+
"$(INTDIR)\ConfirmRRQDlg.obj" : $(SOURCE) $(DEP_CPP_CONFI) "$(INTDIR)"\
@@ -1070,7 +1168,10 @@ DEP_CPP_CONFI=\
SOURCE=.\ConfirmWRQDlg.cpp
+
+!IF "$(CFG)" == "PumpKIN - Win32 Release"
+
DEP_CPP_CONFIR=\
".\ConfirmWRQDlg.h"\
- ".\PumpKIN.h"\
+ ".\pumpkin.h"\
".\PumpKINDlg.h"\
".\shared-code\BellsNWhistles.h"\
@@ -1079,7 +1180,4 @@ DEP_CPP_CONFIR=\
-!IF "$(CFG)" == "PumpKIN - Win32 Release"
-
-
"$(INTDIR)\ConfirmWRQDlg.obj" : $(SOURCE) $(DEP_CPP_CONFIR) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
@@ -1088,4 +1186,11 @@ DEP_CPP_CONFIR=\
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
+DEP_CPP_CONFIR=\
+ ".\ConfirmWRQDlg.h"\
+ ".\pumpkin.h"\
+ ".\PumpKINDlg.h"\
+ ".\shared-code\kHelpers.h"\
+ ".\stdafx.h"\
+
"$(INTDIR)\ConfirmWRQDlg.obj" : $(SOURCE) $(DEP_CPP_CONFIR) "$(INTDIR)"\
@@ -1098,4 +1203,12 @@ DEP_CPP_CONFIR=\
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
+DEP_CPP_CONFIR=\
+ ".\ConfirmWRQDlg.h"\
+ ".\pumpkin.h"\
+ ".\PumpKINDlg.h"\
+ ".\shared-code\BellsNWhistles.h"\
+ ".\shared-code\kHelpers.h"\
+ ".\stdafx.h"\
+
"$(INTDIR)\ConfirmWRQDlg.obj" : $(SOURCE) $(DEP_CPP_CONFIR) "$(INTDIR)"\
@@ -1111,5 +1224,5 @@ DEP_CPP_CONFIR=\
SOURCE=.\RequestDlg.cpp
DEP_CPP_REQUE=\
- ".\PumpKIN.h"\
+ ".\pumpkin.h"\
".\RequestDlg.h"\
".\shared-code\BellsNWhistles.h"\
@@ -1149,6 +1262,9 @@ DEP_CPP_REQUE=\
SOURCE=.\Resolver.cpp
+
+!IF "$(CFG)" == "PumpKIN - Win32 Release"
+
DEP_CPP_RESOL=\
- ".\PumpKIN.h"\
+ ".\pumpkin.h"\
".\PumpKINDlg.h"\
".\Resolver.h"\
@@ -1158,7 +1274,4 @@ DEP_CPP_RESOL=\
-!IF "$(CFG)" == "PumpKIN - Win32 Release"
-
-
"$(INTDIR)\Resolver.obj" : $(SOURCE) $(DEP_CPP_RESOL) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
@@ -1167,4 +1280,11 @@ DEP_CPP_RESOL=\
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
+DEP_CPP_RESOL=\
+ ".\pumpkin.h"\
+ ".\PumpKINDlg.h"\
+ ".\Resolver.h"\
+ ".\shared-code\kHelpers.h"\
+ ".\stdafx.h"\
+
"$(INTDIR)\Resolver.obj" : $(SOURCE) $(DEP_CPP_RESOL) "$(INTDIR)"\
@@ -1177,4 +1297,12 @@ DEP_CPP_RESOL=\
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
+DEP_CPP_RESOL=\
+ ".\pumpkin.h"\
+ ".\PumpKINDlg.h"\
+ ".\Resolver.h"\
+ ".\shared-code\BellsNWhistles.h"\
+ ".\shared-code\kHelpers.h"\
+ ".\stdafx.h"\
+
"$(INTDIR)\Resolver.obj" : $(SOURCE) $(DEP_CPP_RESOL) "$(INTDIR)"\
@@ -1189,6 +1317,9 @@ DEP_CPP_RESOL=\
SOURCE=.\Retrier.cpp
+
+!IF "$(CFG)" == "PumpKIN - Win32 Release"
+
DEP_CPP_RETRI=\
- ".\PumpKIN.h"\
+ ".\pumpkin.h"\
".\PumpKINDlg.h"\
".\Retrier.h"\
@@ -1198,7 +1329,4 @@ DEP_CPP_RETRI=\
-!IF "$(CFG)" == "PumpKIN - Win32 Release"
-
-
"$(INTDIR)\Retrier.obj" : $(SOURCE) $(DEP_CPP_RETRI) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
@@ -1207,4 +1335,11 @@ DEP_CPP_RETRI=\
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
+DEP_CPP_RETRI=\
+ ".\pumpkin.h"\
+ ".\PumpKINDlg.h"\
+ ".\Retrier.h"\
+ ".\shared-code\kHelpers.h"\
+ ".\stdafx.h"\
+
"$(INTDIR)\Retrier.obj" : $(SOURCE) $(DEP_CPP_RETRI) "$(INTDIR)"\
@@ -1217,4 +1352,12 @@ DEP_CPP_RETRI=\
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
+DEP_CPP_RETRI=\
+ ".\pumpkin.h"\
+ ".\PumpKINDlg.h"\
+ ".\Retrier.h"\
+ ".\shared-code\BellsNWhistles.h"\
+ ".\shared-code\kHelpers.h"\
+ ".\stdafx.h"\
+
"$(INTDIR)\Retrier.obj" : $(SOURCE) $(DEP_CPP_RETRI) "$(INTDIR)"\
@@ -1229,6 +1372,9 @@ DEP_CPP_RETRI=\
SOURCE=.\Trayer.cpp
+
+!IF "$(CFG)" == "PumpKIN - Win32 Release"
+
DEP_CPP_TRAYE=\
- ".\PumpKIN.h"\
+ ".\pumpkin.h"\
".\PumpKINDlg.h"\
".\shared-code\BellsNWhistles.h"\
@@ -1238,7 +1384,4 @@ DEP_CPP_TRAYE=\
-!IF "$(CFG)" == "PumpKIN - Win32 Release"
-
-
"$(INTDIR)\Trayer.obj" : $(SOURCE) $(DEP_CPP_TRAYE) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
@@ -1247,4 +1390,11 @@ DEP_CPP_TRAYE=\
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
+DEP_CPP_TRAYE=\
+ ".\pumpkin.h"\
+ ".\PumpKINDlg.h"\
+ ".\shared-code\kHelpers.h"\
+ ".\stdafx.h"\
+ ".\Trayer.h"\
+
"$(INTDIR)\Trayer.obj" : $(SOURCE) $(DEP_CPP_TRAYE) "$(INTDIR)"\
@@ -1257,4 +1407,12 @@ DEP_CPP_TRAYE=\
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
+DEP_CPP_TRAYE=\
+ ".\pumpkin.h"\
+ ".\PumpKINDlg.h"\
+ ".\shared-code\BellsNWhistles.h"\
+ ".\shared-code\kHelpers.h"\
+ ".\stdafx.h"\
+ ".\Trayer.h"\
+
"$(INTDIR)\Trayer.obj" : $(SOURCE) $(DEP_CPP_TRAYE) "$(INTDIR)"\
@@ -1289,7 +1447,10 @@ SOURCE=.\help\pumpkin.cnt
SOURCE=.\PropsSounds.cpp
+
+!IF "$(CFG)" == "PumpKIN - Win32 Release"
+
DEP_CPP_PROPSS=\
".\PropsSounds.h"\
- ".\PumpKIN.h"\
+ ".\pumpkin.h"\
".\PumpKINDlg.h"\
".\shared-code\BellsNWhistles.h"\
@@ -1298,7 +1459,4 @@ DEP_CPP_PROPSS=\
-!IF "$(CFG)" == "PumpKIN - Win32 Release"
-
-
"$(INTDIR)\PropsSounds.obj" : $(SOURCE) $(DEP_CPP_PROPSS) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
@@ -1307,4 +1465,11 @@ DEP_CPP_PROPSS=\
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
+DEP_CPP_PROPSS=\
+ ".\PropsSounds.h"\
+ ".\pumpkin.h"\
+ ".\PumpKINDlg.h"\
+ ".\shared-code\kHelpers.h"\
+ ".\stdafx.h"\
+
"$(INTDIR)\PropsSounds.obj" : $(SOURCE) $(DEP_CPP_PROPSS) "$(INTDIR)"\
@@ -1317,4 +1482,12 @@ DEP_CPP_PROPSS=\
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
+DEP_CPP_PROPSS=\
+ ".\PropsSounds.h"\
+ ".\pumpkin.h"\
+ ".\PumpKINDlg.h"\
+ ".\shared-code\BellsNWhistles.h"\
+ ".\shared-code\kHelpers.h"\
+ ".\stdafx.h"\
+
"$(INTDIR)\PropsSounds.obj" : $(SOURCE) $(DEP_CPP_PROPSS) "$(INTDIR)"\
@@ -1325,4 +1498,117 @@ DEP_CPP_PROPSS=\
# End Source File
+################################################################################
+# Begin Source File
+
+SOURCE=.\PropsACL.cpp
+
+!IF "$(CFG)" == "PumpKIN - Win32 Release"
+
+DEP_CPP_PROPSA=\
+ ".\ACLTargetCombo.h"\
+ ".\PropsACL.h"\
+ ".\pumpkin.h"\
+ ".\PumpKINDlg.h"\
+ ".\shared-code\BellsNWhistles.h"\
+ ".\shared-code\kHelpers.h"\
+ ".\stdafx.h"\
+
+
+"$(INTDIR)\PropsACL.obj" : $(SOURCE) $(DEP_CPP_PROPSA) "$(INTDIR)"\
+ "$(INTDIR)\pumpkin.pch"
+
+
+!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
+
+DEP_CPP_PROPSA=\
+ ".\ACLTargetCombo.h"\
+ ".\PropsACL.h"\
+ ".\pumpkin.h"\
+ ".\PumpKINDlg.h"\
+ ".\shared-code\kHelpers.h"\
+ ".\stdafx.h"\
+
+
+"$(INTDIR)\PropsACL.obj" : $(SOURCE) $(DEP_CPP_PROPSA) "$(INTDIR)"\
+ "$(INTDIR)\pumpkin.pch"
+
+"$(INTDIR)\PropsACL.sbr" : $(SOURCE) $(DEP_CPP_PROPSA) "$(INTDIR)"\
+ "$(INTDIR)\pumpkin.pch"
+
+
+!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
+
+DEP_CPP_PROPSA=\
+ ".\ACLTargetCombo.h"\
+ ".\PropsACL.h"\
+ ".\pumpkin.h"\
+ ".\PumpKINDlg.h"\
+ ".\shared-code\BellsNWhistles.h"\
+ ".\shared-code\kHelpers.h"\
+ ".\stdafx.h"\
+
+
+"$(INTDIR)\PropsACL.obj" : $(SOURCE) $(DEP_CPP_PROPSA) "$(INTDIR)"\
+ "$(INTDIR)\pumpkin.pch"
+
+
+!ENDIF
+
+# End Source File
+################################################################################
+# Begin Source File
+
+SOURCE=.\ACLTargetCombo.cpp
+
+!IF "$(CFG)" == "PumpKIN - Win32 Release"
+
+DEP_CPP_ACLTA=\
+ ".\ACLTargetCombo.h"\
+ ".\pumpkin.h"\
+ ".\PumpKINDlg.h"\
+ ".\shared-code\BellsNWhistles.h"\
+ ".\shared-code\kHelpers.h"\
+ ".\stdafx.h"\
+
+
+"$(INTDIR)\ACLTargetCombo.obj" : $(SOURCE) $(DEP_CPP_ACLTA) "$(INTDIR)"\
+ "$(INTDIR)\pumpkin.pch"
+
+
+!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
+
+DEP_CPP_ACLTA=\
+ ".\ACLTargetCombo.h"\
+ ".\pumpkin.h"\
+ ".\PumpKINDlg.h"\
+ ".\shared-code\kHelpers.h"\
+ ".\stdafx.h"\
+
+
+"$(INTDIR)\ACLTargetCombo.obj" : $(SOURCE) $(DEP_CPP_ACLTA) "$(INTDIR)"\
+ "$(INTDIR)\pumpkin.pch"
+
+"$(INTDIR)\ACLTargetCombo.sbr" : $(SOURCE) $(DEP_CPP_ACLTA) "$(INTDIR)"\
+ "$(INTDIR)\pumpkin.pch"
+
+
+!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
+
+DEP_CPP_ACLTA=\
+ ".\ACLTargetCombo.h"\
+ ".\pumpkin.h"\
+ ".\PumpKINDlg.h"\
+ ".\shared-code\BellsNWhistles.h"\
+ ".\shared-code\kHelpers.h"\
+ ".\stdafx.h"\
+
+
+"$(INTDIR)\ACLTargetCombo.obj" : $(SOURCE) $(DEP_CPP_ACLTA) "$(INTDIR)"\
+ "$(INTDIR)\pumpkin.pch"
+
+
+!ENDIF
+
+# End Source File
# End Target
################################################################################
diff --git a/pumpkin.rc b/pumpkin.rc
index 7dafe04..87745db 100644
--- a/pumpkin.rc
+++ b/pumpkin.rc
@@ -71,4 +71,7 @@ IDI_BROWSE ICON DISCARDABLE "shared-data/browse-icon.ico"
IDR_MAINFRAME ICON DISCARDABLE "res\\pumpkin.ico"
IDI_PLAY ICON DISCARDABLE "shared-data/play-icon.ico"
+IDI_UP ICON DISCARDABLE "res\\up.ico"
+IDI_DOWN ICON DISCARDABLE "res\\down.ico"
+IDI_REMOVE ICON DISCARDABLE "res\\remove.ico"
/////////////////////////////////////////////////////////////////////////////
@@ -83,7 +86,7 @@ FONT 8, "MS Sans Serif"
BEGIN
ICON IDR_MAINFRAME,IDC_STATIC,7,17,18,20
- LTEXT "PumpKIN, Version 2.6",IDC_STATIC,40,15,119,8,
+ LTEXT "PumpKIN, Version 2.7",IDC_STATIC,40,15,119,8,
SS_NOPREFIX
- LTEXT "Copyright © 1997-2005 Klever Group",IDC_STATIC,40,30,
+ LTEXT "Copyright © 1997-2006 Klever Group",IDC_STATIC,40,30,
170,8
DEFPUSHBUTTON "OK",IDOK,178,7,32,14,WS_GROUP
@@ -91,10 +94,10 @@ BEGIN
END
-IDD_PUMPKIN_DIALOG DIALOGEX 0, 0, 362, 191
+IDD_PUMPKIN_DIALOG DIALOGEX 0, 0, 362, 193
STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION |
WS_SYSMENU
EXSTYLE WS_EX_ACCEPTFILES | WS_EX_APPWINDOW
CAPTION " PumpKIN"
-FONT 8, "MS Sans Serif", 0, 0, 0x1
+FONT 8, "MS Sans Serif"
BEGIN
CONTROL "List1",IDC_CONNECTIONS,"SysListView32",LVS_REPORT |
@@ -111,10 +114,13 @@ BEGIN
PUSHBUTTON "E&xit",IDC_EXIT,305,79,50,17,BS_NOTIFY,WS_EX_CLIENTEDGE
PUSHBUTTON "&Help",ID_HELP,305,97,50,17,BS_NOTIFY,WS_EX_CLIENTEDGE
- LISTBOX IDC_LOG,7,115,348,69,LBS_USETABSTOPS | LBS_NOSEL |
+ LISTBOX IDC_LOG,7,115,348,65,LBS_USETABSTOPS | LBS_NOSEL |
WS_VSCROLL | WS_HSCROLL,WS_EX_DLGMODALFRAME
PUSHBUTTON "..",IDCANCEL,0,183,6,7,NOT WS_VISIBLE | NOT WS_TABSTOP
+ CONTROL "&Server is running",IDC_LISTENING,"Button",
+ BS_AUTOCHECKBOX | BS_LEFTTEXT | BS_FLAT | WS_TABSTOP,286,
+ 180,69,11,WS_EX_TRANSPARENT | WS_EX_STATICEDGE
END
-IDD_PROPS_SERVER DIALOG DISCARDABLE 0, 0, 210, 154
+IDD_PROPS_SERVER DIALOG DISCARDABLE 0, 0, 300, 201
STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Server"
@@ -122,39 +128,44 @@ FONT 8, "MS Sans Serif"
BEGIN
GROUPBOX "TFTP filesystem &root (download path)",IDC_STATIC,7,7,
- 196,38
- EDITTEXT IDC_TFTPROOT,13,16,170,13,ES_AUTOHSCROLL
- PUSHBUTTON "&B",IDC_BROWSE,186,16,13,13,BS_ICON
+ 286,38
+ EDITTEXT IDC_TFTPROOT,13,16,256,13,ES_AUTOHSCROLL
+ PUSHBUTTON "&B",IDC_BROWSE,274,16,13,13,BS_ICON
CONTROL "Allow access to &subdirectories",IDC_TFTPSUBDIRS,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,31,111,10
- GROUPBOX "Read Request Behavior",IDC_STATIC,7,48,153,42
+ GROUPBOX "Read Request Behavior",IDC_STATIC,7,48,243,56
CONTROL "Give &all files",IDC_RRQ_GIVEALL,"Button",
- BS_AUTORADIOBUTTON | BS_NOTIFY | WS_GROUP,13,57,53,10
+ BS_AUTORADIOBUTTON | BS_NOTIFY | WS_GROUP,13,63,53,10
CONTROL "&Prompt before giving file",IDC_RRQ_ALWAYSCONFIRM,
- "Button",BS_AUTORADIOBUTTON | BS_NOTIFY,23,67,91,10
+ "Button",BS_AUTORADIOBUTTON | BS_NOTIFY,43,75,91,10
CONTROL "&Deny all requests",IDC_RRQ_DENYALL,"Button",
- BS_AUTORADIOBUTTON | BS_NOTIFY,33,77,70,10
- GROUPBOX "Write Request Behavior",IDC_STATIC,7,93,172,54,WS_GROUP
+ BS_AUTORADIOBUTTON | BS_NOTIFY,73,87,70,10
+ GROUPBOX "Write Request Behavior",IDC_STATIC,7,106,243,56,
+ WS_GROUP
CONTROL "Take a&ll files",IDC_WRQ_TAKEALL,"Button",
- BS_AUTORADIOBUTTON | WS_GROUP,13,103,55,10
+ BS_AUTORADIOBUTTON | WS_GROUP,13,116,55,10
CONTROL "Prompt if file &exists",IDC_WRQ_PROMPTEXISTING,"Button",
- BS_AUTORADIOBUTTON,23,113,73,10
+ BS_AUTORADIOBUTTON,43,126,73,10
CONTROL "Always pro&mpt before accepting file",
- IDC_WRQ_ALWAYSCONFIRM,"Button",BS_AUTORADIOBUTTON,33,123,
+ IDC_WRQ_ALWAYSCONFIRM,"Button",BS_AUTORADIOBUTTON,73,136,
139,10
CONTROL "D&eny all requests",IDC_WRQ_DENYALL,"Button",
- BS_AUTORADIOBUTTON,43,133,70,10
- CTEXT "Confirmation &timeout",IDC_STATIC,163,52,40,19,
+ BS_AUTORADIOBUTTON,103,146,70,10
+ CTEXT "Confirmation &timeout",IDC_STATIC,253,52,40,19,
SS_NOTIFY
CONTROL "Slider1",IDC_PROMPTTIMEOUT,"msctls_trackbar32",
- TBS_AUTOTICKS | TBS_VERT | TBS_TOP | WS_TABSTOP,182,73,
- 21,74
+ TBS_AUTOTICKS | TBS_VERT | TBS_TOP | WS_TABSTOP,272,72,
+ 21,90
+ GROUPBOX "Log file (leave empty to disable logging to file)",
+ IDC_STATIC,7,165,286,29
+ EDITTEXT IDC_LOGFILE,13,175,256,13,ES_AUTOHSCROLL
+ PUSHBUTTON "",IDC_LOGFILE_BROWSE,274,175,13,13,BS_ICON
END
-IDD_PROPS_NETWORK DIALOG DISCARDABLE 0, 0, 210, 154
+IDD_PROPS_NETWORK DIALOG DISCARDABLE 0, 0, 300, 201
STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Network"
FONT 8, "MS Sans Serif"
BEGIN
- GROUPBOX "UDP Ports",IDC_STATIC,7,7,196,40
+ GROUPBOX "UDP Ports",IDC_STATIC,7,7,286,40
RTEXT "Listen for &incoming requests on port:",IDC_STATIC,13,
18,135,8
@@ -258,5 +269,5 @@ BEGIN
END
-IDD_PROPS_SOUNDS DIALOG DISCARDABLE 0, 0, 210, 154
+IDD_PROPS_SOUNDS DIALOG DISCARDABLE 0, 0, 300, 201
STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Sounds"
@@ -264,18 +275,46 @@ FONT 8, "MS Sans Serif"
BEGIN
LTEXT "&Incoming request:",IDC_STATIC,7,9,57,8
- COMBOBOX IDC_RING,70,7,103,100,CBS_DROPDOWN | CBS_AUTOHSCROLL |
+ COMBOBOX IDC_RING,70,7,188,100,CBS_DROPDOWN | CBS_AUTOHSCROLL |
CBS_SORT | WS_VSCROLL | WS_TABSTOP
- PUSHBUTTON "browse",IDC_RING_BROWSE,175,7,13,13,BS_ICON
- PUSHBUTTON "play",IDC_RING_PLAY,190,7,13,13,BS_ICON
+ PUSHBUTTON "browse",IDC_RING_BROWSE,263,7,13,13,BS_ICON
+ PUSHBUTTON "play",IDC_RING_PLAY,280,7,13,13,BS_ICON
LTEXT "xfer &finished:",IDC_STATIC,7,25,57,8
- COMBOBOX IDC_FINISHED,70,22,103,100,CBS_DROPDOWN |
+ COMBOBOX IDC_FINISHED,70,22,188,100,CBS_DROPDOWN |
CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP
- PUSHBUTTON "browse",IDC_FINISHED_BROWSE,175,22,13,13,BS_ICON
- PUSHBUTTON "play",IDC_FINISHED_PLAY,190,22,13,13,BS_ICON
+ PUSHBUTTON "browse",IDC_FINISHED_BROWSE,263,22,13,13,BS_ICON
+ PUSHBUTTON "play",IDC_FINISHED_PLAY,280,22,13,13,BS_ICON
LTEXT "xfer &aborted:",IDC_STATIC,7,40,57,8
- COMBOBOX IDC_ABORTED,70,37,103,100,CBS_DROPDOWN | CBS_AUTOHSCROLL |
+ COMBOBOX IDC_ABORTED,70,37,188,100,CBS_DROPDOWN | CBS_AUTOHSCROLL |
CBS_SORT | WS_VSCROLL | WS_TABSTOP
- PUSHBUTTON "browse",IDC_ABORTED_BROWSE,175,37,13,13,BS_ICON
- PUSHBUTTON "play",IDC_ABORTED_PLAY,190,37,13,13,BS_ICON
+ PUSHBUTTON "browse",IDC_ABORTED_BROWSE,263,37,13,13,BS_ICON
+ PUSHBUTTON "play",IDC_ABORTED_PLAY,280,37,13,13,BS_ICON
+END
+
+IDD_PROPS_ACL DIALOG DISCARDABLE 0, 0, 300, 201
+STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Access Lists"
+FONT 8, "MS Sans Serif"
+BEGIN
+ CONTROL "List1",IDC_ACL_LIST,"SysListView32",LVS_REPORT |
+ WS_BORDER | WS_TABSTOP,7,7,258,110
+ PUSHBUTTON "&Up",IDC_ACL_UP,273,7,20,30,BS_ICON | BS_CENTER |
+ BS_VCENTER
+ PUSHBUTTON "&Down",IDC_ACL_DOWN,273,87,20,30,BS_ICON | BS_CENTER |
+ BS_VCENTER
+ PUSHBUTTON "&Remove",IDC_ACL_REMOVE,273,47,20,30,BS_ICON |
+ BS_CENTER | BS_VCENTER
+ LTEXT "If",IDC_STATIC,13,128,8,8
+ COMBOBOX IDC_ACL_XFER,21,125,48,67,CBS_DROPDOWNLIST | WS_VSCROLL |
+ WS_TABSTOP
+ LTEXT "request comes from the address in the network",
+ IDC_STATIC,71,128,122,8
+ EDITTEXT IDC_ACL_ADDR,47,143,80,12,ES_AUTOHSCROLL
+ LTEXT "with netmask",IDC_STATIC,129,145,41,8
+ EDITTEXT IDC_ACL_NETMASK,173,143,80,12,ES_AUTOHSCROLL
+ LTEXT "then",IDC_STATIC,124,160,15,8
+ COMBOBOX IDC_ACL_RULE,143,158,123,117,CBS_DROPDOWNLIST |
+ WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "&Add new rule",IDC_ACL_ADD,7,178,130,16
+ PUSHBUTTON "&Replace rule",IDC_ACL_REPLACE,152,178,130,16
END
@@ -288,6 +327,6 @@ END
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 2,6,0,0
- PRODUCTVERSION 2,6,0,0
+ FILEVERSION 2,7,0,0
+ PRODUCTVERSION 2,7,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
@@ -306,11 +345,11 @@ BEGIN
VALUE "CompanyName", "Klever Group (http://www.klever.net/)\0"
VALUE "FileDescription", "PumpKIN, tftp client/daemon\0"
- VALUE "FileVersion", "2, 6, 0, 0\0"
+ VALUE "FileVersion", "2, 7, 0, 0\0"
VALUE "InternalName", "PUMPKIN\0"
- VALUE "LegalCopyright", "Copyright © 1997-2005 Klever Group (http://www.klever.net)\0"
+ VALUE "LegalCopyright", "Copyright © 1997-2006 Klever Group (http://www.klever.net)\0"
VALUE "LegalTrademarks", "Klever Group (http://www.klever.net/)\0"
VALUE "OriginalFilename", "PUMPKIN.EXE\0"
VALUE "ProductName", "PumpKIN\0"
- VALUE "ProductVersion", "2, 6, 0, 0\0"
+ VALUE "ProductVersion", "2, 7, 0, 0\0"
END
END
@@ -345,5 +384,5 @@ BEGIN
RIGHTMARGIN, 355
TOPMARGIN, 7
- BOTTOMMARGIN, 184
+ BOTTOMMARGIN, 186
HORZGUIDE, 115
END
@@ -352,7 +391,7 @@ BEGIN
BEGIN
LEFTMARGIN, 7
- RIGHTMARGIN, 203
+ RIGHTMARGIN, 293
TOPMARGIN, 7
- BOTTOMMARGIN, 147
+ BOTTOMMARGIN, 194
END
@@ -360,7 +399,7 @@ BEGIN
BEGIN
LEFTMARGIN, 7
- RIGHTMARGIN, 203
+ RIGHTMARGIN, 293
TOPMARGIN, 7
- BOTTOMMARGIN, 147
+ BOTTOMMARGIN, 194
END
@@ -392,7 +431,17 @@ BEGIN
BEGIN
LEFTMARGIN, 7
- RIGHTMARGIN, 203
+ RIGHTMARGIN, 293
TOPMARGIN, 7
- BOTTOMMARGIN, 147
+ BOTTOMMARGIN, 194
+ END
+
+ IDD_PROPS_ACL, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 293
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 194
+ HORZGUIDE, 117
+ HORZGUIDE, 125
END
END
@@ -440,4 +489,23 @@ BEGIN
END
+IDD_PROPS_ACL DLGINIT
+BEGIN
+ IDC_ACL_XFER, 0x403, 5, 0
+0x6572, 0x6461, "\000"
+ IDC_ACL_XFER, 0x403, 6, 0
+0x7277, 0x7469, 0x0065,
+ IDC_ACL_RULE, 0x403, 12, 0
+0x6361, 0x6563, 0x7470, 0x6620, 0x6c69, 0x0065,
+ IDC_ACL_RULE, 0x403, 33, 0
+0x6361, 0x6563, 0x7470, 0x6120, 0x646e, 0x7220, 0x6e65, 0x6d61, 0x2065,
+0x6669, 0x6620, 0x6c69, 0x2065, 0x7865, 0x7369, 0x7374, "\000"
+ IDC_ACL_RULE, 0x403, 12, 0
+0x6572, 0x656a, 0x7463, 0x6620, 0x6c69, 0x0065,
+ IDC_ACL_RULE, 0x403, 31, 0
+0x6166, 0x6c6c, 0x6162, 0x6b63, 0x7420, 0x206f, 0x6874, 0x2065, 0x6c67,
+0x626f, 0x6c61, 0x7320, 0x7465, 0x6974, 0x676e, "\000"
+ 0
+END
+
/////////////////////////////////////////////////////////////////////////////
@@ -453,4 +521,5 @@ BEGIN
MENUITEM "F&etch file", ID_TRAY_FETCHFILE
MENUITEM "&Options", ID_TRAY_OPTIONS
+ MENUITEM "&Listen to requests", ID_TRAY_LISTEN
MENUITEM "Show &PumpKIN Window", ID_TRAY_SHOWPUMPKINWINDOW
MENUITEM "Open &Files Folder", ID_TRAY_OPENFILESFOLDER
@@ -534,4 +603,5 @@ BEGIN
ID_TRAY_SHOWPUMPKINWINDOW "Show main window"
ID_TRAY_OPENFILESFOLDER "Explore TFTP root folder"
+ ID_TRAY_LISTEN "Listen for incoming requests"
END
@@ -573,4 +643,7 @@ BEGIN
IDS_TITLE_WAV "Select sound.."
IDS_BOX_CANTBIND "Failed to create listening socket. The port may be in use by another application."
+ IDS_NO_XFER_OP "No request type specified."
+ IDS_INVALID_IP "Invalid IP address."
+ IDS_INVALID_NETMASK "Invalid netmask."
END
@@ -580,4 +653,10 @@ BEGIN
END
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_INVALID_RULE "Invalid access rule."
+ IDS_LOG_LOGERROR "Error logging to '%s'"
+END
+
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
diff --git a/res/down.ico b/res/down.ico
new file mode 100644
index 0000000..433e718
--- a/dev/null
+++ b/res/down.ico
Binary files differ
diff --git a/res/remove.ico b/res/remove.ico
new file mode 100644
index 0000000..8e4473d
--- a/dev/null
+++ b/res/remove.ico
Binary files differ
diff --git a/res/up.ico b/res/up.ico
new file mode 100644
index 0000000..32f684b
--- a/dev/null
+++ b/res/up.ico
Binary files differ
diff --git a/resource.h b/resource.h
index 8755a55..1bdce59 100644
--- a/resource.h
+++ b/resource.h
@@ -74,10 +74,19 @@
#define IDI_PLAY 149
#define IDS_TFTP_ERROR_TSIZE 150
+#define IDD_PROPS_ACL 150
#define IDS_TFTP_ERROR_BSIZE 151
#define IDS_TFTP_ERROR_TOUT 152
+#define IDI_UP 152
#define IDS_SELECT_TFTPROOT 153
+#define IDI_DOWN 153
#define IDS_FILTER_WAV 154
+#define IDI_REMOVE 154
#define IDS_TITLE_WAV 155
#define IDS_BOX_CANTBIND 156
+#define IDS_NO_XFER_OP 157
+#define IDS_INVALID_IP 158
+#define IDS_INVALID_NETMASK 159
+#define IDS_INVALID_RULE 160
+#define IDS_LOG_LOGERROR 161
#define IDC_KLEVERNET 1000
#define IDC_CONNECTIONS 1001
@@ -122,10 +131,23 @@
#define IDC_RING_BROWSE 1042
#define IDC_RING_PLAY 1043
+#define IDC_ACL_LIST 1043
#define IDC_FINISHED 1044
+#define IDC_ACL_UP 1044
#define IDC_FINISHED_BROWSE 1045
+#define IDC_ACL_DOWN 1045
#define IDC_FINISHED_PLAY 1046
+#define IDC_ACL_REMOVE 1046
#define IDC_ABORTED 1047
+#define IDC_ACL_ADDR 1047
#define IDC_ABORTED_BROWSE 1048
+#define IDC_ACL_RULE 1048
#define IDC_ABORTED_PLAY 1049
+#define IDC_ACL_NETMASK 1049
+#define IDC_ACL_ADD 1050
+#define IDC_ACL_XFER 1051
+#define IDC_ACL_REPLACE 1052
+#define IDC_LISTENING 1052
+#define IDC_LOGFILE 1053
+#define IDC_LOGFILE_BROWSE 1054
#define ID_TRAY_HELP 32771
#define ID_TRAY_ABOUTPUMPKIN 32772
@@ -136,4 +158,5 @@
#define ID_TRAY_SHOWPUMPKINWINDOW 32777
#define ID_TRAY_OPENFILESFOLDER 32778
+#define ID_TRAY_LISTEN 32780
// Next default values for new objects
@@ -141,7 +164,7 @@
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 150
-#define _APS_NEXT_COMMAND_VALUE 32780
-#define _APS_NEXT_CONTROL_VALUE 1043
+#define _APS_NEXT_RESOURCE_VALUE 155
+#define _APS_NEXT_COMMAND_VALUE 32781
+#define _APS_NEXT_CONTROL_VALUE 1055
#define _APS_NEXT_SYMED_VALUE 102
#endif