author | benmeyer <benmeyer> | 2002-12-11 19:39:18 (UTC) |
---|---|---|
committer | benmeyer <benmeyer> | 2002-12-11 19:39:18 (UTC) |
commit | f55158aac4a23cbdca20145634886b2b757d4465 (patch) (unidiff) | |
tree | a1cdcc5365f7ebdbeacc955c87b3a03be3e46f60 /noncore/settings/networksettings/TODO | |
parent | b3373b77e12e4b138848110884aedc37b56384e1 (diff) | |
download | opie-f55158aac4a23cbdca20145634886b2b757d4465.zip opie-f55158aac4a23cbdca20145634886b2b757d4465.tar.gz opie-f55158aac4a23cbdca20145634886b2b757d4465.tar.bz2 |
Cleaned up ui files so tab is in correct order
Diffstat (limited to 'noncore/settings/networksettings/TODO') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/TODO | 58 |
1 files changed, 58 insertions, 0 deletions
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 | |||
12 | WLAN - add possiblity to input text or hex without knowing "s:" | 12 | WLAN - add possiblity to input text or hex without knowing "s:" |
13 | 13 | ||
14 | Interface setupimp needs to use kernel calls. | 14 | Interface setupimp needs to use kernel calls. |
15 | |||
16 | Automaticly update the main list of interfaces: | ||
17 | > 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 | ||
19 | > kenel call) | ||
20 | |||
21 | 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_ | ||
23 | packet. Anything's better than periodic polling. | ||
24 | |||
25 | 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. | ||
27 | cf. http://marc.theaimsgroup.com/?l=linux-kernel&m=103520821605353&w=2 | ||
28 | |||
29 | |||
30 | #include <asm/types.h> | ||
31 | #include <sys/socket.h> | ||
32 | #include <linux/netlink.h> | ||
33 | #include <linux/rtnetlink.h> | ||
34 | |||
35 | int main(int argc, char **argv) | ||
36 | { | ||
37 | int fd; | ||
38 | unsigned char buf[4096]; | ||
39 | int ret; | ||
40 | int i, j; | ||
41 | struct sockaddr_nl snl; | ||
42 | |||
43 | fd = socket(AF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE); | ||
44 | if (fd < 0) { | ||
45 | perror("socket"); | ||
46 | exit(1); | ||
47 | } | ||
48 | |||
49 | snl.nl_family = AF_NETLINK; | ||
50 | snl.nl_pad = 0; | ||
51 | snl.nl_pid = getpid(); | ||
52 | snl.nl_groups = RTM_NEWLINK|RTM_DELLINK; | ||
53 | |||
54 | if (bind(fd, &snl, sizeof(snl)) < 0) { | ||
55 | perror("bind"); | ||
56 | exit(1); | ||
57 | } | ||
58 | while (1) { | ||
59 | ret = recv(fd, buf, 4096, 0); | ||
60 | if (ret < 0) { | ||
61 | perror("recv"); | ||
62 | exit(1); | ||
63 | } | ||
64 | for (i=0; i<ret; i++) { | ||
65 | printf("%02x ", buf[i]); | ||
66 | } | ||
67 | printf("\n"); | ||
68 | } | ||
69 | |||
70 | } | ||
71 | -- | ||
72 | |||