summaryrefslogtreecommitdiffstats
path: root/lanbrowsing
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 22:19:39 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 22:19:39 +0000
commit2bc1d72869b62af05ae4feafd878203b526da8c5 (patch)
tree2676903bb600bd9646644856e354940471ad84e2 /lanbrowsing
parent937b2991d8e78166eea904c80ad04d34607017a4 (diff)
downloadtdenetwork-2bc1d72869b62af05ae4feafd878203b526da8c5.tar.gz
tdenetwork-2bc1d72869b62af05ae4feafd878203b526da8c5.zip
rename the following methods:
tqparent parent tqmask mask git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1246260 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lanbrowsing')
-rw-r--r--lanbrowsing/kcmlisa/findnic.cpp28
-rw-r--r--lanbrowsing/kcmlisa/findnic.h2
-rw-r--r--lanbrowsing/kcmlisa/kcmkiolan.cpp4
-rw-r--r--lanbrowsing/kcmlisa/kcmkiolan.h2
-rw-r--r--lanbrowsing/kcmlisa/kcmlisa.cpp10
-rw-r--r--lanbrowsing/kcmlisa/kcmlisa.h2
-rw-r--r--lanbrowsing/kcmlisa/kcmreslisa.cpp12
-rw-r--r--lanbrowsing/kcmlisa/kcmreslisa.h2
-rw-r--r--lanbrowsing/kcmlisa/main.cpp12
-rw-r--r--lanbrowsing/kcmlisa/portsettingsbar.cpp4
-rw-r--r--lanbrowsing/kcmlisa/portsettingsbar.h2
-rw-r--r--lanbrowsing/kcmlisa/setupwizard.cpp18
-rw-r--r--lanbrowsing/kcmlisa/setupwizard.h2
-rw-r--r--lanbrowsing/lisa/addressvalidator.cpp42
-rw-r--r--lanbrowsing/lisa/addressvalidator.h4
-rw-r--r--lanbrowsing/lisa/client.cpp8
-rw-r--r--lanbrowsing/lisa/client.h2
-rw-r--r--lanbrowsing/lisa/main.cpp4
-rw-r--r--lanbrowsing/lisa/netmanager.cpp12
-rw-r--r--lanbrowsing/lisa/netscanner.cpp12
-rw-r--r--lanbrowsing/lisa/strictmain.cpp4
21 files changed, 94 insertions, 94 deletions
diff --git a/lanbrowsing/kcmlisa/findnic.cpp b/lanbrowsing/kcmlisa/findnic.cpp
index 61996018..d7437848 100644
--- a/lanbrowsing/kcmlisa/findnic.cpp
+++ b/lanbrowsing/kcmlisa/findnic.cpp
@@ -128,10 +128,10 @@ NICList* findNICs()
if (result==0)
{
sinptr = (struct sockaddr_in *) &ifcopy.ifr_addr;
- tmp->nettqmask=inet_ntoa(sinptr->sin_addr);
+ tmp->netmask=inet_ntoa(sinptr->sin_addr);
}
else
- tmp->nettqmask=i18n("Unknown");
+ tmp->netmask=i18n("Unknown");
nl->append(tmp);
break;
@@ -159,14 +159,14 @@ NICList* findNICs()
getnameinfo(ifa->ifa_addr, ifa->ifa_addr->sa_len, buf, 127, 0, 0, NI_NUMERICHOST);
tmp->addr = buf;
- if (ifa->ifa_nettqmask != NULL) {
+ if (ifa->ifa_netmask != NULL) {
#ifdef Q_OS_FREEBSD
- struct sockaddr_in *sinptr = (struct sockaddr_in *)ifa->ifa_nettqmask;
- tmp->nettqmask=inet_ntoa(sinptr->sin_addr);
+ struct sockaddr_in *sinptr = (struct sockaddr_in *)ifa->ifa_netmask;
+ tmp->netmask=inet_ntoa(sinptr->sin_addr);
#else
bzero(buf, 128);
- getnameinfo(ifa->ifa_nettqmask, ifa->ifa_nettqmask->sa_len, buf, 127, 0, 0, NI_NUMERICHOST);
- tmp->nettqmask = buf;
+ getnameinfo(ifa->ifa_netmask, ifa->ifa_netmask->sa_len, buf, 127, 0, 0, NI_NUMERICHOST);
+ tmp->netmask = buf;
#endif
}
@@ -193,12 +193,12 @@ NICList* findNICs()
void suggestSettingsForAddress(const TQString& addrMask, LisaConfigInfo& lci)
{
TQString ip=addrMask.left(addrMask.find("/"));
- TQString tqmask=addrMask.mid(addrMask.find("/")+1);
+ TQString mask=addrMask.mid(addrMask.find("/")+1);
- if (tqmask[tqmask.length()-1]==';')
- tqmask=tqmask.left(tqmask.length()-1);
+ if (mask[mask.length()-1]==';')
+ mask=mask.left(mask.length()-1);
MyNIC tmpNic;
- KInetSocketAddress::stringToAddr(AF_INET, tqmask.latin1(), &tmpNic.nettqmask);
+ KInetSocketAddress::stringToAddr(AF_INET, mask.latin1(), &tmpNic.netmask);
KInetSocketAddress::stringToAddr(AF_INET, ip.latin1(), &tmpNic.addr);
suggestSettingsForNic(&tmpNic,lci);
}
@@ -209,11 +209,11 @@ void suggestSettingsForNic(MyNIC* nic, LisaConfigInfo& lci)
if (nic==0)
return;
TQString address = nic->addr;
- TQString nettqmask = nic->nettqmask;
+ TQString netmask = nic->netmask;
- TQString addrMask(address+"/"+nettqmask+";");
+ TQString addrMask(address+"/"+netmask+";");
struct in_addr tmpaddr;
- inet_aton(nic->nettqmask.latin1(), &tmpaddr);
+ inet_aton(nic->netmask.latin1(), &tmpaddr);
unsigned int tmp= ntohl(tmpaddr.s_addr);
//if the host part is less than 20 bits simply take it
diff --git a/lanbrowsing/kcmlisa/findnic.h b/lanbrowsing/kcmlisa/findnic.h
index 0e9453c0..bff0aabb 100644
--- a/lanbrowsing/kcmlisa/findnic.h
+++ b/lanbrowsing/kcmlisa/findnic.h
@@ -32,7 +32,7 @@ struct MyNIC
{
TQString name;
TQString addr;
- TQString nettqmask;
+ TQString netmask;
TQString state;
TQString type;
};
diff --git a/lanbrowsing/kcmlisa/kcmkiolan.cpp b/lanbrowsing/kcmlisa/kcmkiolan.cpp
index d1c0c4f7..2f02e2fa 100644
--- a/lanbrowsing/kcmlisa/kcmkiolan.cpp
+++ b/lanbrowsing/kcmlisa/kcmkiolan.cpp
@@ -31,8 +31,8 @@
#include <kdebug.h>
#include <kdialog.h>
-IOSlaveSettings::IOSlaveSettings(const TQString& config, TQWidget *tqparent)
-:KCModule(tqparent)
+IOSlaveSettings::IOSlaveSettings(const TQString& config, TQWidget *parent)
+:KCModule(parent)
,m_config(config,false,true)
{
TQVBoxLayout *tqlayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
diff --git a/lanbrowsing/kcmlisa/kcmkiolan.h b/lanbrowsing/kcmlisa/kcmkiolan.h
index 9fc4da67..de57af86 100644
--- a/lanbrowsing/kcmlisa/kcmkiolan.h
+++ b/lanbrowsing/kcmlisa/kcmkiolan.h
@@ -33,7 +33,7 @@ class IOSlaveSettings:public KCModule
Q_OBJECT
TQ_OBJECT
public:
- IOSlaveSettings(const TQString& config, TQWidget *tqparent=0);
+ IOSlaveSettings(const TQString& config, TQWidget *parent=0);
virtual ~IOSlaveSettings() {};
void load();
void save();
diff --git a/lanbrowsing/kcmlisa/kcmlisa.cpp b/lanbrowsing/kcmlisa/kcmlisa.cpp
index 36ab9ba6..01bf9bc2 100644
--- a/lanbrowsing/kcmlisa/kcmlisa.cpp
+++ b/lanbrowsing/kcmlisa/kcmlisa.cpp
@@ -48,8 +48,8 @@
#include <kdebug.h>
-LisaSettings::LisaSettings(const TQString& config, TQWidget *tqparent)
-: KCModule(tqparent, "kcmlanbrowser")
+LisaSettings::LisaSettings(const TQString& config, TQWidget *parent)
+: KCModule(parent, "kcmlanbrowser")
,m_config(config,false,true)
,m_wizard(0)
,m_configFilename(config)
@@ -86,7 +86,7 @@ LisaSettings::LisaSettings(const TQString& config, TQWidget *tqparent)
tqlayout->setStretchFactor(addressesGrid,0);
label=new TQLabel(i18n("&Broadcast network address:"),addressesGrid);
- comment=i18n("Your network address/subnet tqmask (e.g. 192.168.0.0/255.255.255.0;)");
+ comment=i18n("Your network address/subnet mask (e.g. 192.168.0.0/255.255.255.0;)");
TQToolTip::add(label, comment);
m_broadcastNetwork=new KRestrictedLine(addressesGrid,"a","0123456789./;");
@@ -94,7 +94,7 @@ LisaSettings::LisaSettings(const TQString& config, TQWidget *tqparent)
label->setBuddy(m_broadcastNetwork);
label=new TQLabel(i18n("&Trusted IP addresses:"),addressesGrid);
- comment = i18n("Usually your network address/subnet tqmask (e.g. 192.168.0.0/255.255.255.0;)");
+ comment = i18n("Usually your network address/subnet mask (e.g. 192.168.0.0/255.255.255.0;)");
TQToolTip::add(label, comment);
m_allowedAddresses=new KRestrictedLine(addressesGrid,"a","0123456789./;");
@@ -335,7 +335,7 @@ void LisaSettings::suggestSettings()
//not that easy to handle
for (MyNIC* tmp=nics->first(); tmp!=0; tmp=nics->next())
{
- msg+="<b>"+tmp->name+": </b>"+tmp->addr+"/"+tmp->nettqmask+";<br>";
+ msg+="<b>"+tmp->name+": </b>"+tmp->addr+"/"+tmp->netmask+";<br>";
}
KMessageBox::information(0,TQString("<html>%1</html>").tqarg(msg));
}
diff --git a/lanbrowsing/kcmlisa/kcmlisa.h b/lanbrowsing/kcmlisa/kcmlisa.h
index af576ca1..e3fbf46c 100644
--- a/lanbrowsing/kcmlisa/kcmlisa.h
+++ b/lanbrowsing/kcmlisa/kcmlisa.h
@@ -39,7 +39,7 @@ class LisaSettings:public KCModule
Q_OBJECT
TQ_OBJECT
public:
- LisaSettings(const TQString& config, TQWidget *tqparent=0);
+ LisaSettings(const TQString& config, TQWidget *parent=0);
virtual ~LisaSettings() {};
void load();
void save();
diff --git a/lanbrowsing/kcmlisa/kcmreslisa.cpp b/lanbrowsing/kcmlisa/kcmreslisa.cpp
index 06342be4..1ced6c13 100644
--- a/lanbrowsing/kcmlisa/kcmreslisa.cpp
+++ b/lanbrowsing/kcmlisa/kcmreslisa.cpp
@@ -36,8 +36,8 @@
#include <krestrictedline.h>
#include <keditlistbox.h>
-ResLisaSettings::ResLisaSettings(const TQString& config, TQWidget *tqparent)
-: KCModule(tqparent)
+ResLisaSettings::ResLisaSettings(const TQString& config, TQWidget *parent)
+: KCModule(parent)
,m_config(config,false,true)
,m_kiolanConfig("kio_lanrc",false,true)
,m_advancedSettingsButton(0)
@@ -68,7 +68,7 @@ ResLisaSettings::ResLisaSettings(const TQString& config, TQWidget *tqparent)
TQHBox *hbox=new TQHBox(this);
hbox->setSpacing(10);
TQLabel *label=new TQLabel(i18n("&Trusted addresses:"),hbox);
- TQString comment = i18n("Usually your network address/subnet tqmask (e.g. 192.168.0.0/255.255.255.0;)");
+ TQString comment = i18n("Usually your network address/subnet mask (e.g. 192.168.0.0/255.255.255.0;)");
TQToolTip::add(label, comment);
m_allowedAddresses=new KRestrictedLine(hbox,"a","0123456789./;");
TQToolTip::add(m_allowedAddresses,comment);
@@ -218,8 +218,8 @@ void ResLisaSettings::suggestSettings()
MyNIC *nic=nics->first();
TQString address = nic->addr;
- TQString nettqmask = nic->nettqmask;
- m_allowedAddresses->setText(address+"/"+nettqmask+";");
+ TQString netmask = nic->netmask;
+ m_allowedAddresses->setText(address+"/"+netmask+";");
m_secondWait->setValue(0);
m_secondScan->setChecked(FALSE);
m_secondWait->setEnabled(FALSE);
@@ -235,7 +235,7 @@ void ResLisaSettings::suggestSettings()
//not that easy to handle
for (MyNIC* tmp=nics->first(); tmp!=0; tmp=nics->next())
{
- msg+="<b>"+tmp->name+": </b>"+tmp->addr+"/"+tmp->nettqmask+";<br>";
+ msg+="<b>"+tmp->name+": </b>"+tmp->addr+"/"+tmp->netmask+";<br>";
}
KMessageBox::information(0,TQString("<html>%1</html>").tqarg(msg));
}
diff --git a/lanbrowsing/kcmlisa/kcmreslisa.h b/lanbrowsing/kcmlisa/kcmreslisa.h
index 68cd8f4f..ae079784 100644
--- a/lanbrowsing/kcmlisa/kcmreslisa.h
+++ b/lanbrowsing/kcmlisa/kcmreslisa.h
@@ -37,7 +37,7 @@ class ResLisaSettings:public KCModule
Q_OBJECT
TQ_OBJECT
public:
- ResLisaSettings(const TQString& config, TQWidget *tqparent=0);
+ ResLisaSettings(const TQString& config, TQWidget *parent=0);
virtual ~ResLisaSettings() {}
void load();
void save();
diff --git a/lanbrowsing/kcmlisa/main.cpp b/lanbrowsing/kcmlisa/main.cpp
index 83d80ab5..00d03e52 100644
--- a/lanbrowsing/kcmlisa/main.cpp
+++ b/lanbrowsing/kcmlisa/main.cpp
@@ -33,17 +33,17 @@
extern "C"
{
- KDE_EXPORT KCModule *create_lisa(TQWidget *tqparent, const char *)
+ KDE_EXPORT KCModule *create_lisa(TQWidget *parent, const char *)
{
- return new LisaSettings("/etc/lisarc", tqparent);
+ return new LisaSettings("/etc/lisarc", parent);
}
- KDE_EXPORT KCModule *create_reslisa(TQWidget *tqparent, const char *)
+ KDE_EXPORT KCModule *create_reslisa(TQWidget *parent, const char *)
{
- return new ResLisaSettings(TQDir::homeDirPath()+"/.reslisarc", tqparent);
+ return new ResLisaSettings(TQDir::homeDirPath()+"/.reslisarc", parent);
}
- KDE_EXPORT KCModule *create_kiolan(TQWidget *tqparent, const char *)
+ KDE_EXPORT KCModule *create_kiolan(TQWidget *parent, const char *)
{
- return new IOSlaveSettings("kio_lanrc", tqparent);
+ return new IOSlaveSettings("kio_lanrc", parent);
}
}
diff --git a/lanbrowsing/kcmlisa/portsettingsbar.cpp b/lanbrowsing/kcmlisa/portsettingsbar.cpp
index 1b3e7c1b..3e94c730 100644
--- a/lanbrowsing/kcmlisa/portsettingsbar.cpp
+++ b/lanbrowsing/kcmlisa/portsettingsbar.cpp
@@ -23,8 +23,8 @@
#include <tqlabel.h>
-PortSettingsBar::PortSettingsBar(const TQString& title, TQWidget *tqparent)
-:TQHBox(tqparent)
+PortSettingsBar::PortSettingsBar(const TQString& title, TQWidget *parent)
+:TQHBox(parent)
{
TQLabel* label=new TQLabel(title, this);
m_box=new TQComboBox(this);
diff --git a/lanbrowsing/kcmlisa/portsettingsbar.h b/lanbrowsing/kcmlisa/portsettingsbar.h
index bc674788..c2571e94 100644
--- a/lanbrowsing/kcmlisa/portsettingsbar.h
+++ b/lanbrowsing/kcmlisa/portsettingsbar.h
@@ -33,7 +33,7 @@ class PortSettingsBar:public TQHBox
Q_OBJECT
TQ_OBJECT
public:
- PortSettingsBar(const TQString& title, TQWidget *tqparent=0);
+ PortSettingsBar(const TQString& title, TQWidget *parent=0);
virtual ~PortSettingsBar() {};
int selected() const;
void setChecked(int what);
diff --git a/lanbrowsing/kcmlisa/setupwizard.cpp b/lanbrowsing/kcmlisa/setupwizard.cpp
index 82873c00..f5b985e1 100644
--- a/lanbrowsing/kcmlisa/setupwizard.cpp
+++ b/lanbrowsing/kcmlisa/setupwizard.cpp
@@ -31,8 +31,8 @@
#include <netinet/in.h>
#include <arpa/inet.h>
-SetupWizard::SetupWizard(TQWidget* tqparent, LisaConfigInfo* configInfo)
- :TQWizard(tqparent,"hallo",true)
+SetupWizard::SetupWizard(TQWidget* parent, LisaConfigInfo* configInfo)
+ :TQWizard(parent,"hallo",true)
,m_page1(0)
,m_noNicPage(0)
,m_multiNicPage(0)
@@ -208,12 +208,12 @@ void SetupWizard::setupAddressesPage()
{
m_addressesPage=new TQVBox(this);
TQLabel *info=new TQLabel(i18n("All IP addresses included in the specified range will be pinged.<br>"
- "If you are part of a small network, e.g. with network tqmask 255.255.255.0<br>"
- "use your IP address/network tqmask.<br>"),m_addressesPage);
+ "If you are part of a small network, e.g. with network mask 255.255.255.0<br>"
+ "use your IP address/network mask.<br>"),m_addressesPage);
info->setTextFormat(TQt::RichText);
m_pingAddresses=new KRestrictedLine(m_addressesPage,"0123456789./;-");
info=new TQLabel(i18n("<br>There are four ways to specify address ranges:<br>"
- "1. IP address/network tqmask, like <code>192.168.0.0/255.255.255.0;</code><br>"
+ "1. IP address/network mask, like <code>192.168.0.0/255.255.255.0;</code><br>"
"2. single IP addresses, like <code>10.0.0.23;</code><br>"
"3. continuous ranges, like <code>10.0.1.0-10.0.1.200;</code><br>"
"4. ranges for each part of the address, like <code>10-10.1-5.1-25.1-3;</code><br>"
@@ -237,7 +237,7 @@ void SetupWizard::setupAllowedPage()
"It provides a simple IP address based way to specify \"trusted\" hosts.<br>"
"Only hosts which fit into the addresses given here are accepted by LISa as clients. "
"The list of hosts published by LISa will also only contain hosts which fit into this scheme.<br>"
- "Usually you enter your IP address/network tqmask here."),m_allowedAddressesPage);
+ "Usually you enter your IP address/network mask here."),m_allowedAddressesPage);
info->tqsetAlignment(AlignLeft|AlignVCenter|WordBreak);
m_allowedAddresses=new KRestrictedLine(m_allowedAddressesPage,"0123456789./-;");
m_trustedHostsLabel=new TQLabel(m_allowedAddressesPage);
@@ -255,7 +255,7 @@ void SetupWizard::setupAllowedPage()
void SetupWizard::setupBcastPage()
{
m_bcastPage=new TQVBox(this);
- TQLabel *info=new TQLabel(i18n("<br>Enter your IP address and network tqmask here, like <code>192.168.0.1/255.255.255.0</code>"),m_bcastPage);
+ TQLabel *info=new TQLabel(i18n("<br>Enter your IP address and network mask here, like <code>192.168.0.1/255.255.255.0</code>"),m_bcastPage);
info->tqsetAlignment(AlignLeft|AlignVCenter|WordBreak);
m_bcastAddress=new KRestrictedLine(m_bcastPage,"0123456789./");
info=new TQLabel(i18n("<br>To reduce the network load, the LISa servers in one network<br>"
@@ -398,7 +398,7 @@ void SetupWizard::next()
m_nicListBox->clear();
for (MyNIC *nic=m_nics->first(); nic!=0; nic=m_nics->next())
{
- TQString tmp=nic->name+": "+nic->addr+"/"+nic->nettqmask+";";
+ TQString tmp=nic->name+": "+nic->addr+"/"+nic->netmask+";";
m_nicListBox->insertItem(tmp);
}
m_nicListBox->setSelected(0,true);
@@ -462,7 +462,7 @@ void SetupWizard::showPage(TQWidget* page)
text+=i18n("You can use the same syntax as on the previous page.<br>");
else
text+=i18n("There are three ways to specify IP addresses:<br>"
- "1. IP address/network tqmask, like<code> 192.168.0.0/255.255.255.0;</code><br>"
+ "1. IP address/network mask, like<code> 192.168.0.0/255.255.255.0;</code><br>"
"2. continuous ranges, like<code> 10.0.1.0-10.0.1.200;</code><br>"
"3. single IP addresses, like<code> 10.0.0.23;</code><br>"
"You can also enter combinations of 1 to 3, separated by \";\", <br>"
diff --git a/lanbrowsing/kcmlisa/setupwizard.h b/lanbrowsing/kcmlisa/setupwizard.h
index f571bd6e..c67b330b 100644
--- a/lanbrowsing/kcmlisa/setupwizard.h
+++ b/lanbrowsing/kcmlisa/setupwizard.h
@@ -45,7 +45,7 @@ class SetupWizard:public TQWizard
Q_OBJECT
TQ_OBJECT
public:
- SetupWizard(TQWidget* tqparent, LisaConfigInfo* configInfo);
+ SetupWizard(TQWidget* parent, LisaConfigInfo* configInfo);
~SetupWizard();
virtual void showPage(TQWidget* page);
void clearAll();
diff --git a/lanbrowsing/lisa/addressvalidator.cpp b/lanbrowsing/lisa/addressvalidator.cpp
index 70207ece..aa292806 100644
--- a/lanbrowsing/lisa/addressvalidator.cpp
+++ b/lanbrowsing/lisa/addressvalidator.cpp
@@ -33,7 +33,7 @@ using namespace std;
AddressValidator::AddressValidator(const MyString& addressSpecs)
//this is 127.0.0.0
:localhostNet(htonl(0x7f000000))
-//with tqmask 255.255.255.0
+//with mask 255.255.255.0
,localhostMask(htonl(0xffffff00))
{
clearSpecs();
@@ -44,7 +44,7 @@ AddressValidator::AddressValidator(const MyString& addressSpecs)
AddressValidator::AddressValidator()
//this is 127.0.0.0
:localhostNet(htonl(0x7f000000))
- //with tqmask 255.255.255.0
+ //with mask 255.255.255.0
,localhostMask(htonl(0xffffff00))
{
clearSpecs();
@@ -115,11 +115,11 @@ void AddressValidator::setValidAddresses(MyString addressSpecs)
pos=nextPart.find('/');
MyString netStr=nextPart.left(pos);
MyString maskStr=nextPart.mid(pos+1);
- int tqmask=inet_addr(maskStr.data());
- int net= (inet_addr(netStr.data()) & tqmask);
- dcerr<<"setValidAddresses: net/tqmask: "
- <<std::ios::hex<<net<<"/"<<tqmask<<std::ios::dec<<std::endl;
- addSpec(NETMASK_SPEC,net,tqmask);
+ int mask=inet_addr(maskStr.data());
+ int net= (inet_addr(netStr.data()) & mask);
+ dcerr<<"setValidAddresses: net/mask: "
+ <<std::ios::hex<<net<<"/"<<mask<<std::ios::dec<<std::endl;
+ addSpec(NETMASK_SPEC,net,mask);
}
}
}
@@ -130,19 +130,19 @@ void AddressValidator::clearSpecs()
for (int i=0; i<MAX_SPECS; i++)
{
specs[i].address=0;
- specs[i].tqmask=0;
+ specs[i].mask=0;
specs[i].typeOfSpec=NO_SPEC;
}
}
-void AddressValidator::addSpec(int type, int address, int tqmask)
+void AddressValidator::addSpec(int type, int address, int mask)
{
for (int i=0; i<MAX_SPECS; i++)
{
if (specs[i].typeOfSpec==NO_SPEC)
{
specs[i].address=address;
- specs[i].tqmask=tqmask;
+ specs[i].mask=mask;
specs[i].typeOfSpec=type;
return;
}
@@ -155,7 +155,7 @@ int AddressValidator::isValid(int addressNBO)
<<std::ios::hex<<addressNBO<<std::ios::dec<<std::endl;
//localhost is always allowed
dcerr<<"isValid() local net: "<<
- std::ios::hex<<localhostNet<<" tqmask: "<<localhostMask<<" AND: "<<(addressNBO &
+ std::ios::hex<<localhostNet<<" mask: "<<localhostMask<<" AND: "<<(addressNBO &
localhostMask)<<std::ios::dec<<std::endl;
if ((addressNBO & localhostMask) == localhostNet)
return 1;
@@ -183,17 +183,17 @@ int AddressValidator::isValid(int addressNBO)
else if (specs[i].typeOfSpec==NETMASK_SPEC)
{
dcerr<<"isValid: ANDing "<<
- std::ios::hex<<(addressNBO & specs[i].tqmask)<<" "<<
+ std::ios::hex<<(addressNBO & specs[i].mask)<<" "<<
specs[i].address<<std::ios::dec<<std::endl;
- if ((addressNBO & specs[i].tqmask) == specs[i].address)
+ if ((addressNBO & specs[i].mask) == specs[i].address)
{
- dcerr<<"isValid: net/tqmask"<<std::endl;
+ dcerr<<"isValid: net/mask"<<std::endl;
return 1;
}
}
else if (specs[i].typeOfSpec==RANGE_SPEC)
{
- if ((ntohl(addressNBO)>=specs[i].address) && (ntohl(addressNBO)<=specs[i].tqmask))
+ if ((ntohl(addressNBO)>=specs[i].address) && (ntohl(addressNBO)<=specs[i].mask))
{
dcerr<<"isValid: range"<<std::endl;
return 1;
@@ -202,19 +202,19 @@ int AddressValidator::isValid(int addressNBO)
else if (specs[i].typeOfSpec==MULTIRANGE_SPEC)
{
unsigned int addr=ntohl(addressNBO);
- dcerr<<"isValid ntohl="<<hex<<addr<<" addr: "<<specs[i].address<<" ma: "<<specs[i].tqmask<<dec<<std::endl;
- unsigned int tqmask=0x000000ff;
+ dcerr<<"isValid ntohl="<<hex<<addr<<" addr: "<<specs[i].address<<" ma: "<<specs[i].mask<<dec<<std::endl;
+ unsigned int mask=0x000000ff;
int failure=0;
for (int j=0; j<4; j++)
{
- dcerr<<"isValid "<<hex<<"tqmask="<<tqmask<<" addr="<<(addr&tqmask)<<" addr="<<(specs[i].address & tqmask)<<" ma="<<(specs[i].tqmask&tqmask)<<std::endl;
- if (((addr & tqmask) < (specs[i].address & tqmask))
- || ((addr & tqmask) > (specs[i].tqmask & tqmask)))
+ dcerr<<"isValid "<<hex<<"mask="<<mask<<" addr="<<(addr&mask)<<" addr="<<(specs[i].address & mask)<<" ma="<<(specs[i].mask&mask)<<std::endl;
+ if (((addr & mask) < (specs[i].address & mask))
+ || ((addr & mask) > (specs[i].mask & mask)))
{
failure=1;
break;
}
- tqmask=tqmask<<8;
+ mask=mask<<8;
}
dcerr<<"isValid: multirange"<<std::endl;
if (!failure)
diff --git a/lanbrowsing/lisa/addressvalidator.h b/lanbrowsing/lisa/addressvalidator.h
index c2c332ab..6f1c723e 100644
--- a/lanbrowsing/lisa/addressvalidator.h
+++ b/lanbrowsing/lisa/addressvalidator.h
@@ -29,7 +29,7 @@
struct AddressSpec
{
int address;
- int tqmask;
+ int mask;
int typeOfSpec;
};
@@ -48,7 +48,7 @@ class AddressValidator
int localhostNet;
int localhostMask;
MyString allowedHosts;
- void addSpec(int type, int address, int tqmask=0);
+ void addSpec(int type, int address, int mask=0);
AddressSpec specs[MAX_SPECS];
};
diff --git a/lanbrowsing/lisa/client.cpp b/lanbrowsing/lisa/client.cpp
index 92b62dc5..21069a17 100644
--- a/lanbrowsing/lisa/client.cpp
+++ b/lanbrowsing/lisa/client.cpp
@@ -34,8 +34,8 @@
#define dcerr if (LISA_DEBUG==1) std::cerr<<"Client::"
-Client::Client(NetManager* tqparent, int socketFD, int closeOnDelete)
-:parentServer(tqparent)
+Client::Client(NetManager* parent, int socketFD, int closeOnDelete)
+:parentServer(parent)
,m_fd(socketFD)
,m_done(0)
,m_closeOnDelete(closeOnDelete)
@@ -79,13 +79,13 @@ int Client::tryToGetInfo()
/* int pid=fork();
if (pid==-1)
{
- //tqparent
+ //parent
dcerr<<"NetScanner::scan: error occurred"<<std::endl;
return 1;
}
else if (pid!=0)
{
- //tqparent
+ //parent
return 1;
};*/
//child
diff --git a/lanbrowsing/lisa/client.h b/lanbrowsing/lisa/client.h
index b6311235..efcf5f86 100644
--- a/lanbrowsing/lisa/client.h
+++ b/lanbrowsing/lisa/client.h
@@ -23,7 +23,7 @@ class NetManager;
class Client
{
public:
- Client(NetManager* tqparent, int socketFD, int closeOnDelete=1);
+ Client(NetManager* parent, int socketFD, int closeOnDelete=1);
Client();
Client(const Client& c);
~Client();
diff --git a/lanbrowsing/lisa/main.cpp b/lanbrowsing/lisa/main.cpp
index e75fa0c1..7de59389 100644
--- a/lanbrowsing/lisa/main.cpp
+++ b/lanbrowsing/lisa/main.cpp
@@ -225,11 +225,11 @@ int main(int argc, char** argv)
}
}
- //fork and let the tqparent exit
+ //fork and let the parent exit
pid_t pid=fork();
if (pid>0)
{
- //this is the tqparent
+ //this is the parent
exit(0);
}
else if (pid<0)
diff --git a/lanbrowsing/lisa/netmanager.cpp b/lanbrowsing/lisa/netmanager.cpp
index 46002ed1..e652ce97 100644
--- a/lanbrowsing/lisa/netmanager.cpp
+++ b/lanbrowsing/lisa/netmanager.cpp
@@ -142,11 +142,11 @@ void NetManager::configure(Config& config)
MyString netAddressStr=tmp.left(tmp.find('/'));
tmp=tmp.mid(tmp.find('/')+1);
tmp=tmp.left(tmp.find(';'));
- mdcerr<<"NetManager::readConfig: broadcastNet "<<netAddressStr<<" with tqmask "<<tmp<<std::endl;
+ mdcerr<<"NetManager::readConfig: broadcastNet "<<netAddressStr<<" with mask "<<tmp<<std::endl;
int netMask=inet_addr(tmp.c_str());
int netAddress=inet_addr(netAddressStr.c_str());
m_broadcastAddress= netAddress | (~netMask);
- mdcerr<<"NetManager::readConfig: net "<<std::ios::hex<<netAddress<<" with tqmask "<<netMask<<" gives "<<m_broadcastAddress<<std::endl;
+ mdcerr<<"NetManager::readConfig: net "<<std::ios::hex<<netAddress<<" with mask "<<netMask<<" gives "<<m_broadcastAddress<<std::endl;
//maybe this way we can avoid that all servers on the net send
//their requests synchronously, since now the refreshtime isn't
@@ -602,7 +602,7 @@ void NetManager::scan()
}
else if (pid!=0)
{
- //tqparent
+ //parent
::close(fileDescr[1]);
m_pipeFD=fileDescr[0];
m_childPid=pid;
@@ -617,7 +617,7 @@ void NetManager::scan()
doScan();
//in the child we don't have to call setServerServer()
//since this opens the listening socket, what has to be done
- //in the tqparent process
+ //in the parent process
m_serverServer=1;
}
else
@@ -629,7 +629,7 @@ void NetManager::scan()
doScan();
//in the child we don't have to call setServerServer()
//since this opens the listening socket, what has to be done
- //in the tqparent process
+ //in the parent process
m_serverServer=1;
}
else
@@ -639,7 +639,7 @@ void NetManager::scan()
m_serverServer=0;
}
}
- mdcerr<<" NetScanner::scan: sending information to tqparent process"<<std::endl;
+ mdcerr<<" NetScanner::scan: sending information to parent process"<<std::endl;
writeDataToFD(fileDescr[1],m_serverServer);
mdcerr<<" NetScanner::scan: closed FD: "<<::close(fileDescr[1])<<std::endl;
mdcerr<<" NetScanner::scan: exiting now"<<std::endl;
diff --git a/lanbrowsing/lisa/netscanner.cpp b/lanbrowsing/lisa/netscanner.cpp
index 5486c506..acf0515c 100644
--- a/lanbrowsing/lisa/netscanner.cpp
+++ b/lanbrowsing/lisa/netscanner.cpp
@@ -189,15 +189,15 @@ struct in_addr NetScanner::getIPfromArray(unsigned int index)
{
if (tmp.contains('/'))
{
- //mdcerr<<"net/tqmask combination detected"<<std::endl;
+ //mdcerr<<"net/mask combination detected"<<std::endl;
MyString netStr(tmp.left(tmp.find("/")));
MyString maskStr(tmp.mid(tmp.find("/")+1));
- unsigned int tqmask(IPAddress(maskStr).asInt());
- unsigned int net(IPAddress(netStr).asInt()&tqmask);
- if ((~tqmask)<indexLeft)
+ unsigned int mask(IPAddress(maskStr).asInt());
+ unsigned int net(IPAddress(netStr).asInt()&mask);
+ if ((~mask)<indexLeft)
{
- indexLeft=indexLeft-(~tqmask+1);
- tmpIndex+=(~tqmask)+1;
+ indexLeft=indexLeft-(~mask+1);
+ tmpIndex+=(~mask)+1;
//mdcerr<<"i: "<<tmpIndex<<" left: "<<indexLeft<<std::endl;
}
else
diff --git a/lanbrowsing/lisa/strictmain.cpp b/lanbrowsing/lisa/strictmain.cpp
index 829c8f5d..a948d6df 100644
--- a/lanbrowsing/lisa/strictmain.cpp
+++ b/lanbrowsing/lisa/strictmain.cpp
@@ -203,11 +203,11 @@ int main(int argc, char** argv)
}
}
- //fork and let the tqparent exit
+ //fork and let the parent exit
pid_t pid=fork();
if (pid>0)
{
- //this is the tqparent
+ //this is the parent
exit(0);
}
else if (pid<0)