diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-04-03 12:58:37 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-04-03 12:58:37 +0000 |
commit | ffd4fa2b692f7658a018be1fa49c1fad0cfab465 (patch) | |
tree | 8910b0357ac02ed9066c7ae7d13a01e7f81d6b6a /src/transport/gnunet-helper-transport-wlan.c | |
parent | 46960874cec563042540b13a60a9aa1d5e284e87 (diff) | |
download | gnunet-ffd4fa2b692f7658a018be1fa49c1fad0cfab465.tar.gz gnunet-ffd4fa2b692f7658a018be1fa49c1fad0cfab465.zip |
-fix assertion, documentation, getting dummy to be closer to work on W32
Diffstat (limited to 'src/transport/gnunet-helper-transport-wlan.c')
-rw-r--r-- | src/transport/gnunet-helper-transport-wlan.c | 43 |
1 files changed, 32 insertions, 11 deletions
diff --git a/src/transport/gnunet-helper-transport-wlan.c b/src/transport/gnunet-helper-transport-wlan.c index 2d68c3655..363925cad 100644 --- a/src/transport/gnunet-helper-transport-wlan.c +++ b/src/transport/gnunet-helper-transport-wlan.c | |||
@@ -30,18 +30,39 @@ | |||
30 | * interface. It will force traffic to be in 'ad-hoc' mode, use the | 30 | * interface. It will force traffic to be in 'ad-hoc' mode, use the |
31 | * proper MAC address of the WLAN interface and use a GNUnet-specific | 31 | * proper MAC address of the WLAN interface and use a GNUnet-specific |
32 | * SSID (and a GNUnet-specific SNAP header). It only takes a single | 32 | * SSID (and a GNUnet-specific SNAP header). It only takes a single |
33 | * argument, which is the name of the interface to use. Since it uses | 33 | * argument, which is the name of the WLAN interface to use. The |
34 | * RAW sockets, it must be installed SUID or run as 'root'. In order | 34 | * program detects if the interface is not a WLAN interface and exits |
35 | * to keep the security risk of the resulting SUID binary minimal, the | 35 | * with an error in that case. |
36 | * program ONLY opens the RAW socket with root privileges, then drops | ||
37 | * them and only then starts to process command line arguments. The | ||
38 | * code also does not link against any shared libraries (except libc) | ||
39 | * and is strictly minimal (except for checking for errors). The | ||
40 | * following list of people have reviewed this code and considered it | ||
41 | * safe since the last modification (if you reviewed it, please have | ||
42 | * your name added to the list): | ||
43 | * | 36 | * |
44 | * - Christian Grothoff (Mar 16th 2012) | 37 | * Once initialized, the program will first send a 'struct |
38 | * GNUNET_TRANSPORT_WLAN_HelperControlMessage' to 'stdout'. That | ||
39 | * message contains the MAC address of the WLAN interface. It will | ||
40 | * then read messages from the WLAN interface and send them together | ||
41 | * with performance information as 'struct | ||
42 | * GNUNET_TRANSPORT_WLAN_RadiotapReceiveMessage' messages to 'stdout'. | ||
43 | * Furthermore, it will read a stream of messages from 'stdin' that | ||
44 | * have the format from 'struct | ||
45 | * GNUNET_TRANSPORT_WLAN_RadiotapSendMessage'. Those messages will | ||
46 | * then be sent via the WLAN interface; however, the sender MAC | ||
47 | * address will be forced to be the correct address from our WLAN | ||
48 | * card. If 'stdin' closes, receiving from the WLAN interface will | ||
49 | * continue. If 'stdout' causes a SIGPIPE, the process dies from the | ||
50 | * signal. Errors cause an error message to be reported to 'stderr', | ||
51 | * in most cases the process also exits (with status code '1'). The | ||
52 | * program never terminates normally; it is safe to kill the | ||
53 | * process with SIGTERM or SIGKILL at any time. | ||
54 | * | ||
55 | * Since it uses RAW sockets, the binary must be installed SUID or run | ||
56 | * as 'root'. In order to keep the security risk of the resulting | ||
57 | * SUID binary minimal, the program ONLY opens the RAW socket with | ||
58 | * root privileges, then drops them and only then starts to process | ||
59 | * command line arguments. The code also does not link against any | ||
60 | * shared libraries (except libc) and is strictly minimal (except for | ||
61 | * checking for errors). The following list of people have reviewed | ||
62 | * this code and considered it safe since the last modification (if | ||
63 | * you reviewed it, please have your name added to the list): | ||
64 | * | ||
65 | * - Christian Grothoff (Apr 3rd 2012) | ||
45 | */ | 66 | */ |
46 | 67 | ||
47 | /*- | 68 | /*- |