From f55158aac4a23cbdca20145634886b2b757d4465 Mon Sep 17 00:00:00 2001 From: benmeyer Date: Wed, 11 Dec 2002 19:39:18 +0000 Subject: Cleaned up ui files so tab is in correct order --- diff --git a/noncore/net/networksetup/TODO b/noncore/net/networksetup/TODO index 020339f..862d681 100644 --- a/noncore/net/networksetup/TODO +++ b/noncore/net/networksetup/TODO @@ -12,3 +12,61 @@ PPP module needs to scan pppd.tdb to see what is currently active WLAN - add possiblity to input text or hex without knowing "s:" Interface setupimp needs to use kernel calls. + +Automaticly update the main list of interfaces: +> That would be me. :-D netlink, can you point me in the right +> direction where I can get more info on it? (I figured there was some +> kenel call) + +You can look up the meaning of the packets you receive, or you can just go +poll for changes you might be interested in each time you receive _any_ +packet. Anything's better than periodic polling. + +Note that you can't do this as non-root on some kernels. There's a patch +which can go into the hh.org kernel if it's not already there. +cf. http://marc.theaimsgroup.com/?l=linux-kernel&m=103520821605353&w=2 + + +#include +#include +#include +#include + +int main(int argc, char **argv) +{ + int fd; + unsigned char buf[4096]; + int ret; + int i, j; + struct sockaddr_nl snl; + + fd = socket(AF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE); + if (fd < 0) { + perror("socket"); + exit(1); + } + + snl.nl_family = AF_NETLINK; + snl.nl_pad = 0; + snl.nl_pid = getpid(); + snl.nl_groups = RTM_NEWLINK|RTM_DELLINK; + + if (bind(fd, &snl, sizeof(snl)) < 0) { + perror("bind"); + exit(1); + } + while (1) { + ret = recv(fd, buf, 4096, 0); + if (ret < 0) { + perror("recv"); + exit(1); + } + for (i=0; i 0 0 - 233 + 229 268 @@ -150,4 +150,9 @@ accept() + + registeredServicesList + addButton + cancelButton + diff --git a/noncore/net/networksetup/ppp/ppp.ui b/noncore/net/networksetup/ppp/ppp.ui index 67d6735..56e1621 100644 --- a/noncore/net/networksetup/ppp/ppp.ui +++ b/noncore/net/networksetup/ppp/ppp.ui @@ -757,8 +757,6 @@ speed crtscts connectdelay - dial_manual - dial_idle dial_demand idletime defaultroute @@ -766,5 +764,7 @@ usepeerdns dns1 dns2 + dial_manual + dial_idle diff --git a/noncore/net/networksetup/systemadvanced.ui b/noncore/net/networksetup/systemadvanced.ui deleted file mode 100644 index cd7ac61..0000000 --- a/noncore/net/networksetup/systemadvanced.ui +++ b/dev/null @@ -1,396 +0,0 @@ - -SystemNetworking - - QWidget - - name - SystemNetworking - - - geometry - - 0 - 0 - 218 - 289 - - - - caption - System Networking - - - - margin - 0 - - - spacing - 6 - - - QTabWidget - - name - tabWidget - - - layoutMargin - - - QWidget - - name - tab - - - title - DNS - - - - margin - 11 - - - spacing - 6 - - - QLabel - - name - TextLabel6 - - - text - Hostname - - - - QLabel - - name - TextLabel5 - - - text - DNS - - - alignment - AlignTop|AlignLeft - - - vAlign - - - - QListBox - - name - ListBox5 - - - - QLineEdit - - name - LineEdit7 - - - - QLabel - - name - TextLabel7 - - - text - Hosts - - - - QLabel - - name - TextLabel9 - - - text - List here.... - - - - QPushButton - - name - PushButton15 - - - text - &Add - - - - QPushButton - - name - PushButton16 - - - text - &Delete - - - - - name - Spacer14 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - - - QWidget - - name - tab - - - title - Routing - - - - margin - 11 - - - spacing - 6 - - - QListView - - - text - Destination - - - clickable - true - - - resizeable - true - - - - - text - Gateway - - - clickable - true - - - resizeable - true - - - - - text - Genmask - - - clickable - true - - - resizeable - true - - - - - text - Flags - - - clickable - true - - - resizeable - true - - - - - text - Metric - - - clickable - true - - - resizeable - true - - - - - text - Ref - - - clickable - true - - - resizeable - true - - - - - text - Use - - - clickable - true - - - resizeable - true - - - - - text - Iface - - - clickable - true - - - resizeable - true - - - - - text - 192.168.1.0 - - - text - * - - - text - 255.255.255.0 - - - text - U - - - text - 0 - - - text - 0 - - - text - 0 - - - text - eth0 - - - pixmap - - - - pixmap - - - - pixmap - - - - pixmap - - - - pixmap - - - - pixmap - - - - pixmap - - - - pixmap - - - - - name - ListView4 - - - - QPushButton - - name - PushButton17 - - - text - &Add - - - - QPushButton - - name - PushButton18 - - - text - Remove - - - - \ No newline at end of file diff --git a/noncore/net/networksetup/wlan/wlan.ui b/noncore/net/networksetup/wlan/wlan.ui index 1b29a3e..47d6db6 100644 --- a/noncore/net/networksetup/wlan/wlan.ui +++ b/noncore/net/networksetup/wlan/wlan.ui @@ -11,7 +11,7 @@ 0 0 - 238 + 237 286 @@ -500,9 +500,12 @@ tabWidget essNon + essSpecific essSpecificLineEdit networkInfrastructure + network802 networkChannel + wepEnabled authOpen authShared keyRadio0 diff --git a/noncore/settings/networksettings/TODO b/noncore/settings/networksettings/TODO index 020339f..862d681 100644 --- a/noncore/settings/networksettings/TODO +++ b/noncore/settings/networksettings/TODO @@ -12,3 +12,61 @@ PPP module needs to scan pppd.tdb to see what is currently active WLAN - add possiblity to input text or hex without knowing "s:" Interface setupimp needs to use kernel calls. + +Automaticly update the main list of interfaces: +> That would be me. :-D netlink, can you point me in the right +> direction where I can get more info on it? (I figured there was some +> kenel call) + +You can look up the meaning of the packets you receive, or you can just go +poll for changes you might be interested in each time you receive _any_ +packet. Anything's better than periodic polling. + +Note that you can't do this as non-root on some kernels. There's a patch +which can go into the hh.org kernel if it's not already there. +cf. http://marc.theaimsgroup.com/?l=linux-kernel&m=103520821605353&w=2 + + +#include +#include +#include +#include + +int main(int argc, char **argv) +{ + int fd; + unsigned char buf[4096]; + int ret; + int i, j; + struct sockaddr_nl snl; + + fd = socket(AF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE); + if (fd < 0) { + perror("socket"); + exit(1); + } + + snl.nl_family = AF_NETLINK; + snl.nl_pad = 0; + snl.nl_pid = getpid(); + snl.nl_groups = RTM_NEWLINK|RTM_DELLINK; + + if (bind(fd, &snl, sizeof(snl)) < 0) { + perror("bind"); + exit(1); + } + while (1) { + ret = recv(fd, buf, 4096, 0); + if (ret < 0) { + perror("recv"); + exit(1); + } + for (i=0; i 0 0 - 233 + 229 268 @@ -150,4 +150,9 @@ accept() + + registeredServicesList + addButton + cancelButton + diff --git a/noncore/settings/networksettings/ppp/ppp.ui b/noncore/settings/networksettings/ppp/ppp.ui index 67d6735..56e1621 100644 --- a/noncore/settings/networksettings/ppp/ppp.ui +++ b/noncore/settings/networksettings/ppp/ppp.ui @@ -757,8 +757,6 @@ speed crtscts connectdelay - dial_manual - dial_idle dial_demand idletime defaultroute @@ -766,5 +764,7 @@ usepeerdns dns1 dns2 + dial_manual + dial_idle diff --git a/noncore/settings/networksettings/systemadvanced.ui b/noncore/settings/networksettings/systemadvanced.ui deleted file mode 100644 index cd7ac61..0000000 --- a/noncore/settings/networksettings/systemadvanced.ui +++ b/dev/null @@ -1,396 +0,0 @@ - -SystemNetworking - - QWidget - - name - SystemNetworking - - - geometry - - 0 - 0 - 218 - 289 - - - - caption - System Networking - - - - margin - 0 - - - spacing - 6 - - - QTabWidget - - name - tabWidget - - - layoutMargin - - - QWidget - - name - tab - - - title - DNS - - - - margin - 11 - - - spacing - 6 - - - QLabel - - name - TextLabel6 - - - text - Hostname - - - - QLabel - - name - TextLabel5 - - - text - DNS - - - alignment - AlignTop|AlignLeft - - - vAlign - - - - QListBox - - name - ListBox5 - - - - QLineEdit - - name - LineEdit7 - - - - QLabel - - name - TextLabel7 - - - text - Hosts - - - - QLabel - - name - TextLabel9 - - - text - List here.... - - - - QPushButton - - name - PushButton15 - - - text - &Add - - - - QPushButton - - name - PushButton16 - - - text - &Delete - - - - - name - Spacer14 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - - - QWidget - - name - tab - - - title - Routing - - - - margin - 11 - - - spacing - 6 - - - QListView - - - text - Destination - - - clickable - true - - - resizeable - true - - - - - text - Gateway - - - clickable - true - - - resizeable - true - - - - - text - Genmask - - - clickable - true - - - resizeable - true - - - - - text - Flags - - - clickable - true - - - resizeable - true - - - - - text - Metric - - - clickable - true - - - resizeable - true - - - - - text - Ref - - - clickable - true - - - resizeable - true - - - - - text - Use - - - clickable - true - - - resizeable - true - - - - - text - Iface - - - clickable - true - - - resizeable - true - - - - - text - 192.168.1.0 - - - text - * - - - text - 255.255.255.0 - - - text - U - - - text - 0 - - - text - 0 - - - text - 0 - - - text - eth0 - - - pixmap - - - - pixmap - - - - pixmap - - - - pixmap - - - - pixmap - - - - pixmap - - - - pixmap - - - - pixmap - - - - - name - ListView4 - - - - QPushButton - - name - PushButton17 - - - text - &Add - - - - QPushButton - - name - PushButton18 - - - text - Remove - - - - \ No newline at end of file diff --git a/noncore/settings/networksettings/wlan/wlan.ui b/noncore/settings/networksettings/wlan/wlan.ui index 1b29a3e..47d6db6 100644 --- a/noncore/settings/networksettings/wlan/wlan.ui +++ b/noncore/settings/networksettings/wlan/wlan.ui @@ -11,7 +11,7 @@ 0 0 - 238 + 237 286 @@ -500,9 +500,12 @@ tabWidget essNon + essSpecific essSpecificLineEdit networkInfrastructure + network802 networkChannel + wepEnabled authOpen authShared keyRadio0 -- cgit v0.9.0.2