diff options
Diffstat (limited to 'lanbrowsing/kcmlisa/findnic.cpp')
-rw-r--r-- | lanbrowsing/kcmlisa/findnic.cpp | 28 |
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 |