author | benmeyer <benmeyer> | 2002-12-11 22:23:23 (UTC) |
---|---|---|
committer | benmeyer <benmeyer> | 2002-12-11 22:23:23 (UTC) |
commit | d65c7e8b910aad92b65f55bbfbb3b7b19465d603 (patch) (unidiff) | |
tree | 4d276956dcb5c897908d65e701ce71a0e5289e8b | |
parent | ee3251a889aed8ef0346743589e5166b7d4f673b (diff) | |
download | opie-d65c7e8b910aad92b65f55bbfbb3b7b19465d603.zip opie-d65c7e8b910aad92b65f55bbfbb3b7b19465d603.tar.gz opie-d65c7e8b910aad92b65f55bbfbb3b7b19465d603.tar.bz2 |
Add wlan stuff
-rw-r--r-- | noncore/net/networksetup/TODO | 5 | ||||
-rw-r--r-- | noncore/settings/networksettings/TODO | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/noncore/net/networksetup/TODO b/noncore/net/networksetup/TODO index 862d681..93cbab7 100644 --- a/noncore/net/networksetup/TODO +++ b/noncore/net/networksetup/TODO | |||
@@ -1,72 +1,77 @@ | |||
1 | test WEP | 1 | test WEP |
2 | WEP key in file wireless.conf is not encrypted !, therefore it is very easy to get the key out of the zaurus.. | 2 | WEP key in file wireless.conf is not encrypted !, therefore it is very easy to get the key out of the zaurus.. |
3 | WEP transimtion rat | ||
4 | 1 or 2 | ||
5 | 5.5 | ||
6 | 1 | ||
7 | Auto | ||
3 | 8 | ||
4 | udchcp needs to output the dhcp information so interfaces can read it | 9 | udchcp needs to output the dhcp information so interfaces can read it |
5 | 10 | ||
6 | interfacesetupimp really doesn't need a interface* pointer | 11 | interfacesetupimp really doesn't need a interface* pointer |
7 | 12 | ||
8 | Possible other modules to write: ppp, ipsec, bluetooth, ipchains | 13 | Possible other modules to write: ppp, ipsec, bluetooth, ipchains |
9 | 14 | ||
10 | PPP module needs to scan pppd.tdb to see what is currently active | 15 | PPP module needs to scan pppd.tdb to see what is currently active |
11 | 16 | ||
12 | WLAN - add possiblity to input text or hex without knowing "s:" | 17 | WLAN - add possiblity to input text or hex without knowing "s:" |
13 | 18 | ||
14 | Interface setupimp needs to use kernel calls. | 19 | Interface setupimp needs to use kernel calls. |
15 | 20 | ||
16 | Automaticly update the main list of interfaces: | 21 | Automaticly update the main list of interfaces: |
17 | > That would be me. :-D netlink, can you point me in the right | 22 | > That would be me. :-D netlink, can you point me in the right |
18 | > direction where I can get more info on it? (I figured there was some | 23 | > direction where I can get more info on it? (I figured there was some |
19 | > kenel call) | 24 | > kenel call) |
20 | 25 | ||
21 | You can look up the meaning of the packets you receive, or you can just go | 26 | You can look up the meaning of the packets you receive, or you can just go |
22 | poll for changes you might be interested in each time you receive _any_ | 27 | poll for changes you might be interested in each time you receive _any_ |
23 | packet. Anything's better than periodic polling. | 28 | packet. Anything's better than periodic polling. |
24 | 29 | ||
25 | Note that you can't do this as non-root on some kernels. There's a patch | 30 | Note that you can't do this as non-root on some kernels. There's a patch |
26 | which can go into the hh.org kernel if it's not already there. | 31 | which can go into the hh.org kernel if it's not already there. |
27 | cf. http://marc.theaimsgroup.com/?l=linux-kernel&m=103520821605353&w=2 | 32 | cf. http://marc.theaimsgroup.com/?l=linux-kernel&m=103520821605353&w=2 |
28 | 33 | ||
29 | 34 | ||
30 | #include <asm/types.h> | 35 | #include <asm/types.h> |
31 | #include <sys/socket.h> | 36 | #include <sys/socket.h> |
32 | #include <linux/netlink.h> | 37 | #include <linux/netlink.h> |
33 | #include <linux/rtnetlink.h> | 38 | #include <linux/rtnetlink.h> |
34 | 39 | ||
35 | int main(int argc, char **argv) | 40 | int main(int argc, char **argv) |
36 | { | 41 | { |
37 | int fd; | 42 | int fd; |
38 | unsigned char buf[4096]; | 43 | unsigned char buf[4096]; |
39 | int ret; | 44 | int ret; |
40 | int i, j; | 45 | int i, j; |
41 | struct sockaddr_nl snl; | 46 | struct sockaddr_nl snl; |
42 | 47 | ||
43 | fd = socket(AF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE); | 48 | fd = socket(AF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE); |
44 | if (fd < 0) { | 49 | if (fd < 0) { |
45 | perror("socket"); | 50 | perror("socket"); |
46 | exit(1); | 51 | exit(1); |
47 | } | 52 | } |
48 | 53 | ||
49 | snl.nl_family = AF_NETLINK; | 54 | snl.nl_family = AF_NETLINK; |
50 | snl.nl_pad = 0; | 55 | snl.nl_pad = 0; |
51 | snl.nl_pid = getpid(); | 56 | snl.nl_pid = getpid(); |
52 | snl.nl_groups = RTM_NEWLINK|RTM_DELLINK; | 57 | snl.nl_groups = RTM_NEWLINK|RTM_DELLINK; |
53 | 58 | ||
54 | if (bind(fd, &snl, sizeof(snl)) < 0) { | 59 | if (bind(fd, &snl, sizeof(snl)) < 0) { |
55 | perror("bind"); | 60 | perror("bind"); |
56 | exit(1); | 61 | exit(1); |
57 | } | 62 | } |
58 | while (1) { | 63 | while (1) { |
59 | ret = recv(fd, buf, 4096, 0); | 64 | ret = recv(fd, buf, 4096, 0); |
60 | if (ret < 0) { | 65 | if (ret < 0) { |
61 | perror("recv"); | 66 | perror("recv"); |
62 | exit(1); | 67 | exit(1); |
63 | } | 68 | } |
64 | for (i=0; i<ret; i++) { | 69 | for (i=0; i<ret; i++) { |
65 | printf("%02x ", buf[i]); | 70 | printf("%02x ", buf[i]); |
66 | } | 71 | } |
67 | printf("\n"); | 72 | printf("\n"); |
68 | } | 73 | } |
69 | 74 | ||
70 | } | 75 | } |
71 | -- | 76 | -- |
72 | 77 | ||
diff --git a/noncore/settings/networksettings/TODO b/noncore/settings/networksettings/TODO index 862d681..93cbab7 100644 --- a/noncore/settings/networksettings/TODO +++ b/noncore/settings/networksettings/TODO | |||
@@ -1,72 +1,77 @@ | |||
1 | test WEP | 1 | test WEP |
2 | WEP key in file wireless.conf is not encrypted !, therefore it is very easy to get the key out of the zaurus.. | 2 | WEP key in file wireless.conf is not encrypted !, therefore it is very easy to get the key out of the zaurus.. |
3 | WEP transimtion rat | ||
4 | 1 or 2 | ||
5 | 5.5 | ||
6 | 1 | ||
7 | Auto | ||
3 | 8 | ||
4 | udchcp needs to output the dhcp information so interfaces can read it | 9 | udchcp needs to output the dhcp information so interfaces can read it |
5 | 10 | ||
6 | interfacesetupimp really doesn't need a interface* pointer | 11 | interfacesetupimp really doesn't need a interface* pointer |
7 | 12 | ||
8 | Possible other modules to write: ppp, ipsec, bluetooth, ipchains | 13 | Possible other modules to write: ppp, ipsec, bluetooth, ipchains |
9 | 14 | ||
10 | PPP module needs to scan pppd.tdb to see what is currently active | 15 | PPP module needs to scan pppd.tdb to see what is currently active |
11 | 16 | ||
12 | WLAN - add possiblity to input text or hex without knowing "s:" | 17 | WLAN - add possiblity to input text or hex without knowing "s:" |
13 | 18 | ||
14 | Interface setupimp needs to use kernel calls. | 19 | Interface setupimp needs to use kernel calls. |
15 | 20 | ||
16 | Automaticly update the main list of interfaces: | 21 | Automaticly update the main list of interfaces: |
17 | > That would be me. :-D netlink, can you point me in the right | 22 | > That would be me. :-D netlink, can you point me in the right |
18 | > direction where I can get more info on it? (I figured there was some | 23 | > direction where I can get more info on it? (I figured there was some |
19 | > kenel call) | 24 | > kenel call) |
20 | 25 | ||
21 | You can look up the meaning of the packets you receive, or you can just go | 26 | You can look up the meaning of the packets you receive, or you can just go |
22 | poll for changes you might be interested in each time you receive _any_ | 27 | poll for changes you might be interested in each time you receive _any_ |
23 | packet. Anything's better than periodic polling. | 28 | packet. Anything's better than periodic polling. |
24 | 29 | ||
25 | Note that you can't do this as non-root on some kernels. There's a patch | 30 | Note that you can't do this as non-root on some kernels. There's a patch |
26 | which can go into the hh.org kernel if it's not already there. | 31 | which can go into the hh.org kernel if it's not already there. |
27 | cf. http://marc.theaimsgroup.com/?l=linux-kernel&m=103520821605353&w=2 | 32 | cf. http://marc.theaimsgroup.com/?l=linux-kernel&m=103520821605353&w=2 |
28 | 33 | ||
29 | 34 | ||
30 | #include <asm/types.h> | 35 | #include <asm/types.h> |
31 | #include <sys/socket.h> | 36 | #include <sys/socket.h> |
32 | #include <linux/netlink.h> | 37 | #include <linux/netlink.h> |
33 | #include <linux/rtnetlink.h> | 38 | #include <linux/rtnetlink.h> |
34 | 39 | ||
35 | int main(int argc, char **argv) | 40 | int main(int argc, char **argv) |
36 | { | 41 | { |
37 | int fd; | 42 | int fd; |
38 | unsigned char buf[4096]; | 43 | unsigned char buf[4096]; |
39 | int ret; | 44 | int ret; |
40 | int i, j; | 45 | int i, j; |
41 | struct sockaddr_nl snl; | 46 | struct sockaddr_nl snl; |
42 | 47 | ||
43 | fd = socket(AF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE); | 48 | fd = socket(AF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE); |
44 | if (fd < 0) { | 49 | if (fd < 0) { |
45 | perror("socket"); | 50 | perror("socket"); |
46 | exit(1); | 51 | exit(1); |
47 | } | 52 | } |
48 | 53 | ||
49 | snl.nl_family = AF_NETLINK; | 54 | snl.nl_family = AF_NETLINK; |
50 | snl.nl_pad = 0; | 55 | snl.nl_pad = 0; |
51 | snl.nl_pid = getpid(); | 56 | snl.nl_pid = getpid(); |
52 | snl.nl_groups = RTM_NEWLINK|RTM_DELLINK; | 57 | snl.nl_groups = RTM_NEWLINK|RTM_DELLINK; |
53 | 58 | ||
54 | if (bind(fd, &snl, sizeof(snl)) < 0) { | 59 | if (bind(fd, &snl, sizeof(snl)) < 0) { |
55 | perror("bind"); | 60 | perror("bind"); |
56 | exit(1); | 61 | exit(1); |
57 | } | 62 | } |
58 | while (1) { | 63 | while (1) { |
59 | ret = recv(fd, buf, 4096, 0); | 64 | ret = recv(fd, buf, 4096, 0); |
60 | if (ret < 0) { | 65 | if (ret < 0) { |
61 | perror("recv"); | 66 | perror("recv"); |
62 | exit(1); | 67 | exit(1); |
63 | } | 68 | } |
64 | for (i=0; i<ret; i++) { | 69 | for (i=0; i<ret; i++) { |
65 | printf("%02x ", buf[i]); | 70 | printf("%02x ", buf[i]); |
66 | } | 71 | } |
67 | printf("\n"); | 72 | printf("\n"); |
68 | } | 73 | } |
69 | 74 | ||
70 | } | 75 | } |
71 | -- | 76 | -- |
72 | 77 | ||