author | benmeyer <benmeyer> | 2002-12-17 21:43:58 (UTC) |
---|---|---|
committer | benmeyer <benmeyer> | 2002-12-17 21:43:58 (UTC) |
commit | 8e895c00e6f77d897033e0e473d6e823e684590c (patch) (side-by-side diff) | |
tree | 831338a161d944b9d42395acd335c014e17ce979 | |
parent | ec9bf724d124b96626a17021a7b4f409c54d60af (diff) | |
download | opie-8e895c00e6f77d897033e0e473d6e823e684590c.zip opie-8e895c00e6f77d897033e0e473d6e823e684590c.tar.gz opie-8e895c00e6f77d897033e0e473d6e823e684590c.tar.bz2 |
Caption Fix
-rw-r--r-- | noncore/net/networksetup/TODO | 26 | ||||
-rw-r--r-- | noncore/net/networksetup/mainwindow.ui | 2 | ||||
-rw-r--r-- | noncore/net/networksetup/opie-networksetup.control | 2 | ||||
-rw-r--r-- | noncore/net/networksetup/wlan/wlanimp.cpp | 3 | ||||
-rw-r--r-- | noncore/settings/networksettings/TODO | 26 | ||||
-rw-r--r-- | noncore/settings/networksettings/mainwindow.ui | 2 | ||||
-rw-r--r-- | noncore/settings/networksettings/opie-networksettings.control | 2 | ||||
-rw-r--r-- | noncore/settings/networksettings/opie-networksetup.control | 2 | ||||
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanimp.cpp | 3 |
9 files changed, 53 insertions, 15 deletions
diff --git a/noncore/net/networksetup/TODO b/noncore/net/networksetup/TODO index 93cbab7..6457836 100644 --- a/noncore/net/networksetup/TODO +++ b/noncore/net/networksetup/TODO @@ -1,77 +1,93 @@ +Types: +-Ethernet Connection (Done) +-ISDN Connection +-Modem COnnection (Started) +-xDSL connection +-Token Ring Connection +-CIPE (VPN) connection (ipsec?) +-Wireless Connection (Done) +-Bluetooth +-IPChains? + test WEP -WEP key in file wireless.conf is not encrypted !, therefore it is very easy to get the key out of the zaurus.. -WEP transimtion rat +Add WEP transimtion rate 1 or 2 5.5 1 Auto udchcp needs to output the dhcp information so interfaces can read it interfacesetupimp really doesn't need a interface* pointer -Possible other modules to write: ppp, ipsec, bluetooth, ipchains - PPP module needs to scan pppd.tdb to see what is currently active -WLAN - add possiblity to input text or hex without knowing "s:" +WLAN +- add possiblity to input text or hex without knowing "s:" +- Handle "any" and any the same way in config Interface setupimp needs to use kernel calls. +Add a route/DNS editor under the ViewAdvancedInfo button + +Use a true TCP/IP widget + +Make it so that pcmcia doesn't need to be stopped/started for wlan + 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 <asm/types.h> #include <sys/socket.h> #include <linux/netlink.h> #include <linux/rtnetlink.h> 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<ret; i++) { printf("%02x ", buf[i]); } printf("\n"); } } -- diff --git a/noncore/net/networksetup/mainwindow.ui b/noncore/net/networksetup/mainwindow.ui index 3d30994..dcabc52 100644 --- a/noncore/net/networksetup/mainwindow.ui +++ b/noncore/net/networksetup/mainwindow.ui @@ -1,84 +1,84 @@ <!DOCTYPE UI><UI> <class>MainWindow</class> <widget> <class>QWidget</class> <property stdset="1"> <name>name</name> <cstring>MainWindow</cstring> </property> <property stdset="1"> <name>geometry</name> <rect> <x>0</x> <y>0</y> <width>240</width> <height>289</height> </rect> </property> <property stdset="1"> <name>caption</name> - <string>Network Setup</string> + <string>Network Settings</string> </property> <vbox> <property stdset="1"> <name>margin</name> <number>0</number> </property> <property stdset="1"> <name>spacing</name> <number>6</number> </property> <widget> <class>QTabWidget</class> <property stdset="1"> <name>name</name> <cstring>tabWidget</cstring> </property> <property> <name>layoutMargin</name> </property> <widget> <class>QWidget</class> <property stdset="1"> <name>name</name> <cstring>Widget3</cstring> </property> <attribute> <name>title</name> <string>Connections</string> </attribute> <vbox> <property stdset="1"> <name>margin</name> <number>0</number> </property> <property stdset="1"> <name>spacing</name> <number>6</number> </property> <widget> <class>QListView</class> <column> <property> <name>text</name> <string>s</string> </property> <property> <name>clickable</name> <bool>true</bool> </property> <property> <name>resizeable</name> <bool>true</bool> </property> </column> <column> <property> <name>text</name> <string>t</string> </property> <property> <name>clickable</name> <bool>true</bool> </property> <property> diff --git a/noncore/net/networksetup/opie-networksetup.control b/noncore/net/networksetup/opie-networksetup.control index 3d6a32c..585e50e 100644 --- a/noncore/net/networksetup/opie-networksetup.control +++ b/noncore/net/networksetup/opie-networksetup.control @@ -1,8 +1,8 @@ Files: bin/networksetup apps/Settings/networksetup.desktop plugins/networksetup/* pics/networksetup/* pics/Network/PPPConnect.png $QTDIR/lib/libinterfaces.so.1.0.0 $QTDIR/lib/libinterfaces.so.1.0 $QTDIR/lib/libinterfaces.so.1 root/usr/bin/changedns bin/getprofile Priority: optional Section: opie/settings Maintainer: Ben Meyer <meyerb@sharpsec.com> Architecture: arm Version: $QPE_VERSION-$SUB_VERSION Depends: opie-base ($QPE_VERSION) -Description: Opie network setup tool +Description: Network settings diff --git a/noncore/net/networksetup/wlan/wlanimp.cpp b/noncore/net/networksetup/wlan/wlanimp.cpp index 648932f..1782c22 100644 --- a/noncore/net/networksetup/wlan/wlanimp.cpp +++ b/noncore/net/networksetup/wlan/wlanimp.cpp @@ -170,75 +170,78 @@ void WLANImp::changeAndSaveSettingFile(){ stream << "\tESSID=" << essSpecificLineEdit->text() << '\n'; stream << "\tMODE=" << ( networkType->currentItem() == 0 ? "Managed" : "ad-hoc") << '\n'; stream << "\tCHANNEL=" << networkChannel->value() << "\n"; } stream << "\t#KEY0=" << keyLineEdit0->text() << "\n"; stream << "\t#KEY1=" << keyLineEdit1->text() << "\n"; stream << "\t#KEY2=" << keyLineEdit2->text() << "\n"; stream << "\t#KEY3=" << keyLineEdit3->text() << "\n"; if(wepEnabled->isChecked()){ stream << "\tKEY=\""; if(keyRadio0->isChecked()) stream << keyLineEdit0->text(); if(keyRadio1->isChecked()) stream << keyLineEdit1->text(); if(keyRadio2->isChecked()) stream << keyLineEdit2->text(); if(keyRadio3->isChecked()) stream << keyLineEdit3->text(); if(authOpen->isChecked()) stream << " open"; else stream << " restricted"; stream << "\"\n"; } stream << "\tRATE=auto\n"; if(line.contains("esac")) stream << line << "\n"; } if(line.contains(";;")) output = true; if(output && (*it).length() ) stream << (*it) << '\n'; } file.close(); } /** * Check to see if the current config is valid * Save wireless.opts, save interfaces */ void WLANImp::accept(){ if(wepEnabled->isChecked()){ if(keyLineEdit0->text().isEmpty() && keyLineEdit1->text().isEmpty() && keyLineEdit2->text().isEmpty() && keyLineEdit3->text().isEmpty() ){ QMessageBox::information(this, "Error", "Please enter a key for WEP.", QMessageBox::Ok); return; } } if(essAny->isChecked() && essSpecificLineEdit->text().isEmpty()){ QMessageBox::information(this, "Error", "Please enter a ESS-ID.", QMessageBox::Ok); return; } // Ok settings are good here, save changeAndSaveSettingFile(); // Try to save the interfaces settings. if(!interfaceSetup->saveChanges()) return; // Restart the device now that the settings have changed QString initpath; if( QDir("/etc/rc.d/init.d").exists() ) initpath = "/etc/rc.d/init.d"; else if( QDir("/etc/init.d").exists() ) initpath = "/etc/init.d"; + + // It would be kinda cool if we didn't have to do this and could just to ifup/down + if( initpath ) system(QString("%1/pcmcia stop").arg(initpath)); if( initpath ) system(QString("%1/pcmcia start").arg(initpath)); // Close out the dialog QDialog::accept(); } // wlanimp.cpp diff --git a/noncore/settings/networksettings/TODO b/noncore/settings/networksettings/TODO index 93cbab7..6457836 100644 --- a/noncore/settings/networksettings/TODO +++ b/noncore/settings/networksettings/TODO @@ -1,77 +1,93 @@ +Types: +-Ethernet Connection (Done) +-ISDN Connection +-Modem COnnection (Started) +-xDSL connection +-Token Ring Connection +-CIPE (VPN) connection (ipsec?) +-Wireless Connection (Done) +-Bluetooth +-IPChains? + test WEP -WEP key in file wireless.conf is not encrypted !, therefore it is very easy to get the key out of the zaurus.. -WEP transimtion rat +Add WEP transimtion rate 1 or 2 5.5 1 Auto udchcp needs to output the dhcp information so interfaces can read it interfacesetupimp really doesn't need a interface* pointer -Possible other modules to write: ppp, ipsec, bluetooth, ipchains - PPP module needs to scan pppd.tdb to see what is currently active -WLAN - add possiblity to input text or hex without knowing "s:" +WLAN +- add possiblity to input text or hex without knowing "s:" +- Handle "any" and any the same way in config Interface setupimp needs to use kernel calls. +Add a route/DNS editor under the ViewAdvancedInfo button + +Use a true TCP/IP widget + +Make it so that pcmcia doesn't need to be stopped/started for wlan + 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 <asm/types.h> #include <sys/socket.h> #include <linux/netlink.h> #include <linux/rtnetlink.h> 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<ret; i++) { printf("%02x ", buf[i]); } printf("\n"); } } -- diff --git a/noncore/settings/networksettings/mainwindow.ui b/noncore/settings/networksettings/mainwindow.ui index 3d30994..dcabc52 100644 --- a/noncore/settings/networksettings/mainwindow.ui +++ b/noncore/settings/networksettings/mainwindow.ui @@ -1,84 +1,84 @@ <!DOCTYPE UI><UI> <class>MainWindow</class> <widget> <class>QWidget</class> <property stdset="1"> <name>name</name> <cstring>MainWindow</cstring> </property> <property stdset="1"> <name>geometry</name> <rect> <x>0</x> <y>0</y> <width>240</width> <height>289</height> </rect> </property> <property stdset="1"> <name>caption</name> - <string>Network Setup</string> + <string>Network Settings</string> </property> <vbox> <property stdset="1"> <name>margin</name> <number>0</number> </property> <property stdset="1"> <name>spacing</name> <number>6</number> </property> <widget> <class>QTabWidget</class> <property stdset="1"> <name>name</name> <cstring>tabWidget</cstring> </property> <property> <name>layoutMargin</name> </property> <widget> <class>QWidget</class> <property stdset="1"> <name>name</name> <cstring>Widget3</cstring> </property> <attribute> <name>title</name> <string>Connections</string> </attribute> <vbox> <property stdset="1"> <name>margin</name> <number>0</number> </property> <property stdset="1"> <name>spacing</name> <number>6</number> </property> <widget> <class>QListView</class> <column> <property> <name>text</name> <string>s</string> </property> <property> <name>clickable</name> <bool>true</bool> </property> <property> <name>resizeable</name> <bool>true</bool> </property> </column> <column> <property> <name>text</name> <string>t</string> </property> <property> <name>clickable</name> <bool>true</bool> </property> <property> diff --git a/noncore/settings/networksettings/opie-networksettings.control b/noncore/settings/networksettings/opie-networksettings.control index 3d6a32c..585e50e 100644 --- a/noncore/settings/networksettings/opie-networksettings.control +++ b/noncore/settings/networksettings/opie-networksettings.control @@ -1,8 +1,8 @@ Files: bin/networksetup apps/Settings/networksetup.desktop plugins/networksetup/* pics/networksetup/* pics/Network/PPPConnect.png $QTDIR/lib/libinterfaces.so.1.0.0 $QTDIR/lib/libinterfaces.so.1.0 $QTDIR/lib/libinterfaces.so.1 root/usr/bin/changedns bin/getprofile Priority: optional Section: opie/settings Maintainer: Ben Meyer <meyerb@sharpsec.com> Architecture: arm Version: $QPE_VERSION-$SUB_VERSION Depends: opie-base ($QPE_VERSION) -Description: Opie network setup tool +Description: Network settings diff --git a/noncore/settings/networksettings/opie-networksetup.control b/noncore/settings/networksettings/opie-networksetup.control index 3d6a32c..585e50e 100644 --- a/noncore/settings/networksettings/opie-networksetup.control +++ b/noncore/settings/networksettings/opie-networksetup.control @@ -1,8 +1,8 @@ Files: bin/networksetup apps/Settings/networksetup.desktop plugins/networksetup/* pics/networksetup/* pics/Network/PPPConnect.png $QTDIR/lib/libinterfaces.so.1.0.0 $QTDIR/lib/libinterfaces.so.1.0 $QTDIR/lib/libinterfaces.so.1 root/usr/bin/changedns bin/getprofile Priority: optional Section: opie/settings Maintainer: Ben Meyer <meyerb@sharpsec.com> Architecture: arm Version: $QPE_VERSION-$SUB_VERSION Depends: opie-base ($QPE_VERSION) -Description: Opie network setup tool +Description: Network settings diff --git a/noncore/settings/networksettings/wlan/wlanimp.cpp b/noncore/settings/networksettings/wlan/wlanimp.cpp index 648932f..1782c22 100644 --- a/noncore/settings/networksettings/wlan/wlanimp.cpp +++ b/noncore/settings/networksettings/wlan/wlanimp.cpp @@ -170,75 +170,78 @@ void WLANImp::changeAndSaveSettingFile(){ stream << "\tESSID=" << essSpecificLineEdit->text() << '\n'; stream << "\tMODE=" << ( networkType->currentItem() == 0 ? "Managed" : "ad-hoc") << '\n'; stream << "\tCHANNEL=" << networkChannel->value() << "\n"; } stream << "\t#KEY0=" << keyLineEdit0->text() << "\n"; stream << "\t#KEY1=" << keyLineEdit1->text() << "\n"; stream << "\t#KEY2=" << keyLineEdit2->text() << "\n"; stream << "\t#KEY3=" << keyLineEdit3->text() << "\n"; if(wepEnabled->isChecked()){ stream << "\tKEY=\""; if(keyRadio0->isChecked()) stream << keyLineEdit0->text(); if(keyRadio1->isChecked()) stream << keyLineEdit1->text(); if(keyRadio2->isChecked()) stream << keyLineEdit2->text(); if(keyRadio3->isChecked()) stream << keyLineEdit3->text(); if(authOpen->isChecked()) stream << " open"; else stream << " restricted"; stream << "\"\n"; } stream << "\tRATE=auto\n"; if(line.contains("esac")) stream << line << "\n"; } if(line.contains(";;")) output = true; if(output && (*it).length() ) stream << (*it) << '\n'; } file.close(); } /** * Check to see if the current config is valid * Save wireless.opts, save interfaces */ void WLANImp::accept(){ if(wepEnabled->isChecked()){ if(keyLineEdit0->text().isEmpty() && keyLineEdit1->text().isEmpty() && keyLineEdit2->text().isEmpty() && keyLineEdit3->text().isEmpty() ){ QMessageBox::information(this, "Error", "Please enter a key for WEP.", QMessageBox::Ok); return; } } if(essAny->isChecked() && essSpecificLineEdit->text().isEmpty()){ QMessageBox::information(this, "Error", "Please enter a ESS-ID.", QMessageBox::Ok); return; } // Ok settings are good here, save changeAndSaveSettingFile(); // Try to save the interfaces settings. if(!interfaceSetup->saveChanges()) return; // Restart the device now that the settings have changed QString initpath; if( QDir("/etc/rc.d/init.d").exists() ) initpath = "/etc/rc.d/init.d"; else if( QDir("/etc/init.d").exists() ) initpath = "/etc/init.d"; + + // It would be kinda cool if we didn't have to do this and could just to ifup/down + if( initpath ) system(QString("%1/pcmcia stop").arg(initpath)); if( initpath ) system(QString("%1/pcmcia start").arg(initpath)); // Close out the dialog QDialog::accept(); } // wlanimp.cpp |