summaryrefslogtreecommitdiffstats
path: root/lanbrowsing/kcmlisa/findnic.cpp
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/kcmlisa/findnic.cpp
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/kcmlisa/findnic.cpp')
-rw-r--r--lanbrowsing/kcmlisa/findnic.cpp28
1 files changed, 14 insertions, 14 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