summaryrefslogtreecommitdiff
path: root/net/knemo-kde4/files
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--net/knemo-kde4/files/patch-kcm-configdialog.cpp78
-rw-r--r--net/knemo-kde4/files/patch-knemod-global.h35
-rw-r--r--net/knemo-kde4/files/patch-knemod-interfacestatusdialog.cpp50
-rw-r--r--net/knemo-kde4/files/patch-knemod-interfacestatusdlg.ui262
-rw-r--r--net/knemo-kde4/files/patch-knemod-interfacetooltip.cpp34
-rw-r--r--net/knemo-kde4/files/patch-knemod-interfaceupdater.cpp291
-rw-r--r--net/knemo-kde4/files/patch-knemod-knemodaemon.cpp11
7 files changed, 0 insertions, 761 deletions
diff --git a/net/knemo-kde4/files/patch-kcm-configdialog.cpp b/net/knemo-kde4/files/patch-kcm-configdialog.cpp
deleted file mode 100644
index 32a00999bf67..000000000000
--- a/net/knemo-kde4/files/patch-kcm-configdialog.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
---- src/kcm/configdialog.cpp.orig Sat Apr 1 21:44:21 2006
-+++ src/kcm/configdialog.cpp Sun Apr 2 19:14:11 2006
-@@ -17,6 +17,16 @@
- Boston, MA 02110-1301, USA.
- */
-
-+#ifdef __FreeBSD__
-+#include <sys/types.h>
-+#include <sys/socket.h>
-+#include <net/if.h>
-+#include <net/if_mib.h>
-+#include <sys/param.h>
-+#include <sys/sysctl.h>
-+#include <net/route.h>
-+#endif
-+
- #include <qfile.h>
- #include <qdict.h>
- #include <qlabel.h>
-@@ -363,6 +373,39 @@
- void ConfigDialog::defaults()
- {
- // Default interfaces
-+#ifdef Q_OS_FREEBSD
-+ /* Determine number of interfaces */
-+ u_int n = 0;
-+ size_t nlen = 0;
-+ nlen = sizeof(n);
-+
-+ if ( sysctlbyname("net.link.generic.system.ifcount", &n, &nlen, NULL, 0) != -1 )
-+ {
-+ mSettingsDict.clear();
-+ mDlg->listBoxInterfaces->clear();
-+
-+ ifmibdata ifmd;
-+ size_t len = 0;
-+ len = sizeof(ifmd);
-+ static int name[] = { CTL_NET,
-+ PF_LINK,
-+ NETLINK_GENERIC,
-+ IFMIB_IFDATA,
-+ 0,
-+ IFDATA_GENERAL };
-+
-+ for (int i = 1; i <= n; ++i)
-+ {
-+ name[4] = i;
-+ /* Get data for iface-number i */
-+ if ( sysctl(name, 6, (void*)&ifmd, (size_t*)&len, (void*)NULL, (size_t)0) == -1 )
-+ continue;
-+
-+ QString interface = QString::fromLatin1(ifmd.ifmd_name);
-+
-+ if ( ifmd.ifmd_flags & IFF_LOOPBACK)
-+ continue;
-+#else
- QFile proc( "/proc/net/dev" );
- if ( proc.open( IO_ReadOnly ) )
- {
-@@ -380,6 +423,7 @@
- if ( interface == "lo" )
- continue;
-
-+#endif
- InterfaceSettings* settings = new InterfaceSettings();
- settings->customCommands = false;
- settings->hideWhenNotAvailable = false;
-@@ -401,8 +445,10 @@
- mDlg->checkBoxStatistics->setChecked( false );
- mDlg->checkBoxCustom->setChecked( false );
- }
-+#ifndef __FreeBSD__
- }
- proc.close();
-+#endif
- }
-
- // Default tool tips
diff --git a/net/knemo-kde4/files/patch-knemod-global.h b/net/knemo-kde4/files/patch-knemod-global.h
deleted file mode 100644
index b20cda0a6a99..000000000000
--- a/net/knemo-kde4/files/patch-knemod-global.h
+++ /dev/null
@@ -1,35 +0,0 @@
---- src/knemod/global.h.orig Sat Apr 1 21:44:22 2006
-+++ src/knemod/global.h Sun Apr 2 21:33:36 2006
-@@ -22,6 +22,7 @@
-
- #include <qpair.h>
- #include <qcolor.h>
-+#include <qdict.h>
- #include <qstring.h>
-
- /**
-@@ -36,6 +37,11 @@
- int toolTipContent;
- };
-
-+struct AddrData {
-+ QString subnetMask;
-+ QString broadcastAddress;
-+};
-+
- struct InterfaceData
- {
- InterfaceData()
-@@ -59,11 +65,9 @@
- unsigned long prevTxBytes;
- unsigned long incomingBytes;
- unsigned long outgoingBytes;
-- QString ipAddress;
-- QString subnetMask;
-+ QDict<AddrData> addrData;
- QString hwAddress;
- QString ptpAddress;
-- QString broadcastAddress;
- QString defaultGateway;
- QString rxString;
- QString txString;
diff --git a/net/knemo-kde4/files/patch-knemod-interfacestatusdialog.cpp b/net/knemo-kde4/files/patch-knemod-interfacestatusdialog.cpp
deleted file mode 100644
index 217998e0b9f2..000000000000
--- a/net/knemo-kde4/files/patch-knemod-interfacestatusdialog.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
---- src/knemod/interfacestatusdialog.cpp.orig Sat Apr 1 21:44:22 2006
-+++ src/knemod/interfacestatusdialog.cpp Sun Apr 2 21:34:55 2006
-@@ -24,6 +24,7 @@
- #include <qtabwidget.h>
-
- #include <kdebug.h>
-+#include <kcombobox.h>
- #include <kconfig.h>
- #include <klocale.h>
- #include <kglobal.h>
-@@ -92,6 +93,10 @@
- mTimer = new QTimer();
- connect( mTimer, SIGNAL( timeout() ), this, SLOT( updateDialog() ) );
- mTimer->start( 1000 );
-+
-+#ifdef Q_OS_FREEBSD
-+ connect( comboBoxIP, SIGNAL( activated(int) ), this, SLOT( updateDialog() ) );
-+#endif
- }
-
- InterfaceStatusDialog::~InterfaceStatusDialog()
-@@ -201,12 +206,28 @@
- if ( data.available )
- {
- // ip tab
-+#ifdef Q_OS_FREEBSD
-+ if ( data.addrData.count() != comboBoxIP->count() )
-+ comboBoxIP->clear();
-+
-+ QDictIterator<AddrData> it( data.addrData );
-+ for( ; it.current(); ++it )
-+ if (!comboBoxIP->contains(it.currentKey()))
-+ comboBoxIP->insertItem( it.currentKey() );
-+
-+ textLabelSubnet->setText(data.addrData[ comboBoxIP->currentText() ]->subnetMask);
-+#else
- textLabelIP->setText( data.ipAddress );
- textLabelSubnet->setText( data.subnetMask );
-+#endif
- if ( mInterface->getType() == Interface::ETHERNET )
- {
- variableLabel1->setText( i18n( "Broadcast Address:" ) );
-+#ifdef Q_OS_FREEBSD
-+ variableText1->setText( data.addrData[ comboBoxIP->currentText() ]->broadcastAddress);
-+#else
- variableText1->setText( data.broadcastAddress );
-+#endif
- variableLabel2->setText( i18n( "Default Gateway:" ) );
- variableText2->setText( data.defaultGateway );
- variableLabel3->setText( i18n( "HW-Address:" ) );
diff --git a/net/knemo-kde4/files/patch-knemod-interfacestatusdlg.ui b/net/knemo-kde4/files/patch-knemod-interfacestatusdlg.ui
deleted file mode 100644
index 073ca19a3734..000000000000
--- a/net/knemo-kde4/files/patch-knemod-interfacestatusdlg.ui
+++ /dev/null
@@ -1,262 +0,0 @@
---- src/knemod/interfacestatusdlg.ui.orig Sat Apr 1 21:44:22 2006
-+++ src/knemod/interfacestatusdlg.ui Sun Apr 2 21:28:01 2006
-@@ -145,7 +145,7 @@
- </property>
- <widget class="QLayoutWidget">
- <property name="name">
-- <cstring>layout3</cstring>
-+ <cstring>layout7</cstring>
- </property>
- <hbox>
- <property name="name">
-@@ -171,18 +171,18 @@
- </property>
- <property name="sizeHint">
- <size>
-- <width>20</width>
-+ <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
-- <widget class="KActiveLabel">
-+ <widget class="KComboBox">
- <property name="name">
-- <cstring>textLabelIP</cstring>
-+ <cstring>comboBoxIP</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
-- <hsizetype>1</hsizetype>
-+ <hsizetype>5</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
-@@ -193,7 +193,7 @@
- </widget>
- <widget class="QLayoutWidget">
- <property name="name">
-- <cstring>layout4</cstring>
-+ <cstring>layout8</cstring>
- </property>
- <hbox>
- <property name="name">
-@@ -207,41 +207,30 @@
- <string>Subnet Mask:</string>
- </property>
- </widget>
-- <spacer>
-- <property name="name">
-- <cstring>spacer13_2</cstring>
-- </property>
-- <property name="orientation">
-- <enum>Horizontal</enum>
-- </property>
-- <property name="sizeType">
-- <enum>Expanding</enum>
-- </property>
-- <property name="sizeHint">
-- <size>
-- <width>71</width>
-- <height>21</height>
-- </size>
-- </property>
-- </spacer>
-- <widget class="KActiveLabel">
-+ <widget class="QLabel">
- <property name="name">
- <cstring>textLabelSubnet</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
-- <hsizetype>1</hsizetype>
-- <vsizetype>0</vsizetype>
-+ <hsizetype>7</hsizetype>
-+ <vsizetype>5</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
-+ <property name="text">
-+ <string></string>
-+ </property>
-+ <property name="alignment">
-+ <set>AlignVCenter|AlignRight</set>
-+ </property>
- </widget>
- </hbox>
- </widget>
- <widget class="QLayoutWidget">
- <property name="name">
-- <cstring>layout5</cstring>
-+ <cstring>layout9</cstring>
- </property>
- <hbox>
- <property name="name">
-@@ -255,41 +244,22 @@
- <string>Broadcast Address:</string>
- </property>
- </widget>
-- <spacer>
-- <property name="name">
-- <cstring>spacer13_3</cstring>
-- </property>
-- <property name="orientation">
-- <enum>Horizontal</enum>
-- </property>
-- <property name="sizeType">
-- <enum>Expanding</enum>
-- </property>
-- <property name="sizeHint">
-- <size>
-- <width>71</width>
-- <height>21</height>
-- </size>
-- </property>
-- </spacer>
-- <widget class="KActiveLabel">
-+ <widget class="QLabel">
- <property name="name">
- <cstring>variableText1</cstring>
- </property>
-- <property name="sizePolicy">
-- <sizepolicy>
-- <hsizetype>1</hsizetype>
-- <vsizetype>0</vsizetype>
-- <horstretch>0</horstretch>
-- <verstretch>0</verstretch>
-- </sizepolicy>
-+ <property name="text">
-+ <string></string>
-+ </property>
-+ <property name="alignment">
-+ <set>AlignVCenter|AlignRight</set>
- </property>
- </widget>
- </hbox>
- </widget>
- <widget class="QLayoutWidget">
- <property name="name">
-- <cstring>layout6</cstring>
-+ <cstring>layout10</cstring>
- </property>
- <hbox>
- <property name="name">
-@@ -303,41 +273,30 @@
- <string>Default Gateway:</string>
- </property>
- </widget>
-- <spacer>
-- <property name="name">
-- <cstring>spacer13_4</cstring>
-- </property>
-- <property name="orientation">
-- <enum>Horizontal</enum>
-- </property>
-- <property name="sizeType">
-- <enum>Expanding</enum>
-- </property>
-- <property name="sizeHint">
-- <size>
-- <width>71</width>
-- <height>21</height>
-- </size>
-- </property>
-- </spacer>
-- <widget class="KActiveLabel">
-+ <widget class="QLabel">
- <property name="name">
- <cstring>variableText2</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
-- <hsizetype>1</hsizetype>
-- <vsizetype>0</vsizetype>
-+ <hsizetype>7</hsizetype>
-+ <vsizetype>5</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
-+ <property name="text">
-+ <string></string>
-+ </property>
-+ <property name="alignment">
-+ <set>AlignVCenter|AlignRight</set>
-+ </property>
- </widget>
- </hbox>
- </widget>
- <widget class="QLayoutWidget">
- <property name="name">
-- <cstring>layout7</cstring>
-+ <cstring>layout11</cstring>
- </property>
- <hbox>
- <property name="name">
-@@ -351,35 +310,24 @@
- <string>HW-Address:</string>
- </property>
- </widget>
-- <spacer>
-- <property name="name">
-- <cstring>spacer13_5</cstring>
-- </property>
-- <property name="orientation">
-- <enum>Horizontal</enum>
-- </property>
-- <property name="sizeType">
-- <enum>Expanding</enum>
-- </property>
-- <property name="sizeHint">
-- <size>
-- <width>71</width>
-- <height>21</height>
-- </size>
-- </property>
-- </spacer>
-- <widget class="KActiveLabel">
-+ <widget class="QLabel">
- <property name="name">
- <cstring>variableText3</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
-- <hsizetype>1</hsizetype>
-- <vsizetype>0</vsizetype>
-+ <hsizetype>7</hsizetype>
-+ <vsizetype>5</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
-+ <property name="text">
-+ <string></string>
-+ </property>
-+ <property name="alignment">
-+ <set>AlignVCenter|AlignRight</set>
-+ </property>
- </widget>
- </hbox>
- </widget>
-@@ -893,8 +841,6 @@
- </widget>
- </vbox>
- </widget>
--<customwidgets>
--</customwidgets>
- <connections>
- <connection>
- <sender>buttonClose</sender>
-@@ -905,10 +851,6 @@
- </connections>
- <layoutdefaults spacing="6" margin="11"/>
- <includehints>
-- <includehint>kactivelabel.h</includehint>
-- <includehint>kactivelabel.h</includehint>
-- <includehint>kactivelabel.h</includehint>
-- <includehint>kactivelabel.h</includehint>
-- <includehint>kactivelabel.h</includehint>
-+ <includehint>kcombobox.h</includehint>
- </includehints>
- </UI>
diff --git a/net/knemo-kde4/files/patch-knemod-interfacetooltip.cpp b/net/knemo-kde4/files/patch-knemod-interfacetooltip.cpp
deleted file mode 100644
index 9dce92066cf6..000000000000
--- a/net/knemo-kde4/files/patch-knemod-interfacetooltip.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
---- src/knemod/interfacetooltip.cpp.orig Sat Apr 1 21:44:22 2006
-+++ src/knemod/interfacetooltip.cpp Sun Apr 2 21:30:52 2006
-@@ -101,6 +101,23 @@
-
- if ( data.available )
- {
-+#ifdef Q_OS_FREEBSD
-+ QDictIterator<AddrData> it( data.addrData );
-+ for( ; it.current(); ++it )
-+ {
-+ if ( toolTipContent & IP_ADDRESS )
-+ text += "<tr><td>" + mToolTips[4].first + "</td><td>" + it.currentKey() + "</td></tr>";
-+ if ( toolTipContent & SUBNET_MASK )
-+ text += "<tr><td>" + mToolTips[5].first + "</td><td>" + it.current()->subnetMask + "</td></tr>";
-+ if ( mInterface->getType() == Interface::ETHERNET )
-+ {
-+ if ( toolTipContent & BCAST_ADDRESS )
-+ text += "<tr><td>" + mToolTips[18].first + "</td><td>" + it.current()->broadcastAddress + "</td></tr>";
-+ }
-+ }
-+ if ( mInterface->getType() == Interface::ETHERNET )
-+ {
-+#else
- if ( toolTipContent & IP_ADDRESS )
- text += "<tr><td>" + mToolTips[4].first + "</td><td>" + data.ipAddress + "</td></tr>";
- if ( toolTipContent & SUBNET_MASK )
-@@ -109,6 +126,7 @@
- {
- if ( toolTipContent & BCAST_ADDRESS )
- text += "<tr><td>" + mToolTips[18].first + "</td><td>" + data.broadcastAddress + "</td></tr>";
-+#endif
- if ( toolTipContent & GATEWAY )
- text += "<tr><td>" + mToolTips[19].first + "</td><td>" + data.defaultGateway + "</td></tr>";
- if ( toolTipContent & HW_ADDRESS )
diff --git a/net/knemo-kde4/files/patch-knemod-interfaceupdater.cpp b/net/knemo-kde4/files/patch-knemod-interfaceupdater.cpp
deleted file mode 100644
index 09ad62f0543f..000000000000
--- a/net/knemo-kde4/files/patch-knemod-interfaceupdater.cpp
+++ /dev/null
@@ -1,291 +0,0 @@
---- src/knemod/interfaceupdater.cpp.orig Mon Jun 12 13:20:13 2006
-+++ src/knemod/interfaceupdater.cpp Mon Jun 12 14:43:02 2006
-@@ -17,6 +17,24 @@
- Boston, MA 02110-1301, USA.
- */
-
-+#ifdef __FreeBSD__
-+#include <sys/types.h>
-+#include <sys/socket.h>
-+#include <sys/sysctl.h>
-+#include <sys/time.h>
-+#include <sys/ioctl.h>
-+#include <net/ethernet.h>
-+#include <net/if_media.h>
-+#include <net/if_types.h>
-+#include <net/if.h>
-+#include <net/if_dl.h>
-+#include <net/if_mib.h>
-+#include <netdb.h>
-+#include <ifaddrs.h>
-+#include <netinet/in.h>
-+#include <arpa/inet.h>
-+#endif
-+
- #include <qmap.h>
- #include <qregexp.h>
- #include <qstringlist.h>
-@@ -40,6 +58,7 @@
-
- InterfaceUpdater::~InterfaceUpdater()
- {
-+#ifndef Q_OS_FREEBSD
- if ( mRouteProcess )
- {
- mRouteProcess->kill();
-@@ -55,10 +74,12 @@
- mIwconfigProcess->kill();
- delete mIwconfigProcess;
- }
-+#endif
- }
-
- void InterfaceUpdater::checkConfig()
- {
-+#ifndef Q_OS_FREEBSD
- if ( !mIfconfigProcess )
- {
- mIfconfigStdout = QString::null;
-@@ -100,6 +121,7 @@
- }
- }
- #endif
-+#endif // Q_OS_FREEBSD
-
- #ifdef PATH_ROUTE
- if ( !mRouteProcess )
-@@ -108,7 +130,11 @@
- mRouteProcess = new KProcess();
- mRouteProcess->setEnvironment( "LANG", "C" );
- mRouteProcess->setEnvironment( "LC_ALL", "C" );
-+#ifdef Q_OS_FREEBSD
-+ *mRouteProcess << PATH_ROUTE << "-n" << "get" << "default";
-+#else
- *mRouteProcess << PATH_ROUTE << "-n";
-+#endif
- connect( mRouteProcess, SIGNAL( receivedStdout( KProcess*, char*, int ) ),
- this, SLOT( routeProcessStdout( KProcess*, char*, int ) ) );
- connect( mRouteProcess, SIGNAL( receivedStderr( KProcess*, char*, int ) ),
-@@ -123,6 +149,140 @@
- }
- }
- #endif
-+
-+#ifdef Q_OS_FREEBSD
-+ // Check interfaces and update accordingly
-+
-+ Interface* interface = 0;
-+ InterfaceData* data = 0;
-+
-+ struct if_data* ifd;
-+ struct ifaddrs *ifap;
-+ char buf[NI_MAXHOST];
-+
-+ // Reset all devices first
-+ QDictIterator<Interface> ifIt( mInterfaceDict );
-+ for ( ; ifIt.current(); ++ifIt )
-+ {
-+ interface = ifIt.current();
-+ interface->getData().existing = false;
-+ interface->getData().available = false;
-+ interface->getData().addrData.clear();
-+ }
-+
-+ // Get IP address and related information
-+ if ( getifaddrs(&ifap) == 0 ) {
-+ for ( ifaddrs *ifa = ifap; ifa; ifa = ifa->ifa_next ) {
-+ switch ( ifa->ifa_addr->sa_family ) {
-+ case AF_INET6:
-+ case AF_INET:
-+ interface = mInterfaceDict[QString::fromLatin1(ifa->ifa_name)];
-+ if ( interface ) {
-+ data = &interface->getData();
-+
-+ bzero(buf, NI_MAXHOST);
-+ getnameinfo(ifa->ifa_addr, ifa->ifa_addr->sa_len, buf, sizeof(buf), 0, 0, NI_NUMERICHOST);
-+ AddrData *addrData = new AddrData;
-+ data->addrData.insert( QString::fromLatin1(buf), addrData);
-+
-+ if ( ifa->ifa_netmask != NULL ) {
-+ if (ifa->ifa_addr->sa_family == AF_INET6 ) {
-+ bzero(buf, NI_MAXHOST);
-+ getnameinfo(ifa->ifa_netmask, ifa->ifa_netmask->sa_len, buf, sizeof(buf), 0, 0, NI_NUMERICHOST);
-+ addrData->subnetMask = QString::fromLatin1( buf );
-+ } else {
-+ struct sockaddr_in *sin = (struct sockaddr_in *)ifa->ifa_netmask;
-+ addrData->subnetMask = QString::fromLatin1( inet_ntoa(sin->sin_addr) );
-+ }
-+ }
-+
-+ if ( ifa->ifa_broadaddr != NULL ) {
-+ bzero(buf, NI_MAXHOST);
-+ getnameinfo(ifa->ifa_broadaddr, ifa->ifa_broadaddr->sa_len, buf, sizeof(buf), 0, 0, NI_NUMERICHOST);
-+ addrData->broadcastAddress = QString::fromLatin1(buf);
-+ }
-+
-+ if ( ifa->ifa_dstaddr != NULL ) {
-+ bzero(buf, NI_MAXHOST);
-+ getnameinfo(ifa->ifa_dstaddr, ifa->ifa_dstaddr->sa_len, buf, sizeof(buf), 0, 0, NI_NUMERICHOST);
-+ data->ptpAddress = QString::fromLatin1(buf);
-+ }
-+
-+ data->existing = true;
-+ interface->setType((ifa->ifa_flags & IFF_POINTOPOINT ) ? Interface::PPP : Interface::ETHERNET );
-+
-+ // Get media status
-+ int s;
-+ if ((s = socket(ifa->ifa_addr->sa_family, SOCK_DGRAM, 0)) >= 0) {
-+ struct ifmediareq ifmr;
-+ (void) memset(&ifmr, 0, sizeof(ifmr));
-+ (void) strncpy(ifmr.ifm_name, ifa->ifa_name, sizeof(ifmr.ifm_name));
-+
-+ if (ioctl(s, SIOCGIFMEDIA, (caddr_t)&ifmr) >= 0) {
-+ if (ifmr.ifm_status & IFM_AVALID)
-+ /*
-+ * The interface is marked available, if the interface is up
-+ * and if it is has carrier (LAN) or is associated (WLAN)
-+ */
-+ data->available = (ifa->ifa_flags & IFF_UP) && (ifmr.ifm_status & IFM_ACTIVE);
-+ }
-+ else
-+ data->available = (ifa->ifa_flags & IFF_UP);
-+
-+ close(s);
-+ }
-+ }
-+ break;
-+
-+ case AF_LINK:
-+ interface = mInterfaceDict[QString::fromLatin1(ifa->ifa_name)];
-+ if ( interface ) {
-+ data = &interface->getData();
-+
-+ // get MAC address
-+ struct sockaddr_dl* sdl = (struct sockaddr_dl*)ifa->ifa_addr;
-+ if (sdl->sdl_type == IFT_ETHER && sdl->sdl_alen == ETHER_ADDR_LEN)
-+ data->hwAddress = QString::fromLatin1(ether_ntoa((struct ether_addr*)LLADDR(sdl)));
-+ else
-+ data->hwAddress = "";
-+
-+ // Get traffic statistics
-+ if (ifa->ifa_data != NULL) {
-+ ifd = (if_data *)ifa->ifa_data;
-+
-+ data->rxPackets = ifd->ifi_ipackets;
-+ data->txPackets = ifd->ifi_opackets;
-+
-+ if ( data->prevRxBytes == 0L )
-+ data->prevRxBytes = ifd->ifi_ibytes;
-+ else
-+ data->prevRxBytes = data->rxBytes;
-+
-+ data->rxBytes = ifd->ifi_ibytes;
-+ data->incomingBytes = data->rxBytes - data->prevRxBytes;
-+ data->rxString = KIO::convertSize( data->rxBytes );
-+
-+ if ( data->prevTxBytes == 0L )
-+ data->prevTxBytes = ifd->ifi_obytes;
-+ else
-+ data->prevTxBytes = data->txBytes;
-+
-+ data->txBytes = ifd->ifi_obytes;
-+ data->outgoingBytes = data->txBytes - data->prevTxBytes;
-+ data->txString = KIO::convertSize( data->txBytes );
-+ }
-+ }
-+ break;
-+ }
-+ }
-+ freeifaddrs(ifap);
-+ }
-+
-+ // Update the display
-+ for ( ifIt.toFirst(); ifIt.current(); ++ifIt )
-+ ifIt.current()->activateMonitor();
-+
-+#endif // Q_OS_FREEBSD
- }
-
- void InterfaceUpdater::routeProcessExited( KProcess* process )
-@@ -172,6 +332,7 @@
-
- void InterfaceUpdater::parseIfconfigOutput()
- {
-+#ifndef Q_OS_FREEBSD
- /* mIfconfigStdout contains the complete output of 'ifconfig' which we
- * are going to parse here.
- */
-@@ -228,10 +389,12 @@
- }
- interface->activateMonitor();
- }
-+#endif
- }
-
- void InterfaceUpdater::updateInterfaceData( QString& config, InterfaceData& data, int type )
- {
-+#ifndef Q_OS_FREEBSD
- QRegExp regExp( ".*RX.*:(\\d+).*:\\d+.*:\\d+.*:\\d+" );
- if ( regExp.search( config ) > -1 )
- data.rxPackets = regExp.cap( 1 ).toULong();
-@@ -321,10 +484,12 @@
- if ( regExp.search( config ) > -1 )
- data.ptpAddress = regExp.cap( 2 );
- }
-+#endif
- }
-
- void InterfaceUpdater::parseIwconfigOutput()
- {
-+#ifndef Q_OS_FREEBSD
- /* mIwconfigStdout contains the complete output of 'iwconfig' which we
- * are going to parse here.
- */
-@@ -367,10 +532,12 @@
- updateWirelessData( configs[key], interface->getWirelessData() );
- }
- }
-+#endif
- }
-
- void InterfaceUpdater::updateWirelessData( QString& config, WirelessData& data )
- {
-+#ifndef Q_OS_FREEBSD
- QRegExp regExp( "ESSID:\"?([^\"]*)\"?" );
- if ( regExp.search( config ) > -1 )
- data.essid = regExp.cap( 1 );
-@@ -404,6 +571,7 @@
- regExp.setPattern( "Link Quality[=:]([\\d/]*)" );
- if ( regExp.search( config ) > -1 )
- data.linkQuality = regExp.cap( 1 );
-+#endif
- }
-
- void InterfaceUpdater::parseRouteOutput()
-@@ -412,16 +580,25 @@
- * are going to parse here.
- */
- QMap<QString, QStringList> configs;
-- QStringList routeList = QStringList::split( "\n", mRouteStdout );
-+ QStringList gateway, routeList = QStringList::split( "\n", mRouteStdout );
- QStringList::Iterator it;
- for ( it = routeList.begin(); it != routeList.end(); ++it )
- {
- QStringList routeParameter = QStringList::split( " ", *it );
-+#ifdef Q_OS_FREEBSD
-+ if ( routeParameter.count() != 2 )
-+ continue;
-+ if ( routeParameter[0] == "gateway:" )
-+ gateway = routeParameter;
-+ if ( routeParameter[0] == "interface:" )
-+ configs[routeParameter[1]] = gateway;
-+#else
- if ( routeParameter.count() < 8 ) // no routing entry
- continue;
- if ( routeParameter[0] != "0.0.0.0" ) // no default route
- continue;
- configs[routeParameter[7]] = routeParameter;
-+#endif
- }
-
- /* We loop over the interfaces the user wishs to monitor.
diff --git a/net/knemo-kde4/files/patch-knemod-knemodaemon.cpp b/net/knemo-kde4/files/patch-knemod-knemodaemon.cpp
deleted file mode 100644
index 11f2cc3e39fe..000000000000
--- a/net/knemo-kde4/files/patch-knemod-knemodaemon.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/knemod/knemodaemon.cpp.orig Mon Jun 12 15:47:54 2006
-+++ src/knemod/knemodaemon.cpp Mon Jun 12 16:30:45 2006
-@@ -306,6 +306,8 @@
-
- // needed to calculate the current speed
- mGeneralData.secondsSinceLastUpdate = mLastUpdateTime.secsTo( QDateTime::currentDateTime() );
-+ if (mGeneralData.secondsSinceLastUpdate == 0)
-+ mGeneralData.secondsSinceLastUpdate = 1;
- mLastUpdateTime.setDate( QDate::currentDate() );
- mLastUpdateTime.setTime( QTime::currentTime() );
-