-rw-r--r-- | noncore/net/wellenreiter/libwellenreiter/docs/quickintro | 46 |
1 files changed, 45 insertions, 1 deletions
diff --git a/noncore/net/wellenreiter/libwellenreiter/docs/quickintro b/noncore/net/wellenreiter/libwellenreiter/docs/quickintro index e4978a1..a027a4e 100644 --- a/noncore/net/wellenreiter/libwellenreiter/docs/quickintro +++ b/noncore/net/wellenreiter/libwellenreiter/docs/quickintro | |||
@@ -1,35 +1,79 @@ | |||
1 | 1 | ||
2 | Name: libwellenreiter | 2 | Name: libwellenreiter |
3 | Author: Martin J. Muench | 3 | Author: Martin J. Muench |
4 | 4 | ||
5 | NOTE: This is just a very short summary of the functions included | 5 | NOTE: This is just a very short summary of the functions included |
6 | in libwellenreiter, written because a lack of time. The whole | 6 | in libwellenreiter, written because a lack of time. The whole |
7 | library will be rewritten with extended documentation and | 7 | library will be rewritten with extended documentation and |
8 | test programs. | 8 | test programs. |
9 | 9 | ||
10 | -- | ||
11 | Wellenreiter types: | ||
12 | In proto.hh the following type (wl_network_t) is declared: | ||
13 | |||
14 | typedef struct { | ||
15 | int net_type; /* 1 = Accesspoint ; 2 = Ad-Hoc */ | ||
16 | int ssid_len; /* Length of SSID */ | ||
17 | int channel; /* Channel */ | ||
18 | int wep; /* 1 = WEP enabled ; 0 = disabled */ | ||
19 | char mac[64]; /* MAC address of Accesspoint */ | ||
20 | char bssid[128]; /* BSSID of Accesspoint */ | ||
21 | } wl_network_t; | ||
22 | |||
23 | When a network is found, the structure has to be set and | ||
24 | sent to the send_network_found() function. | ||
25 | |||
26 | When the GUI receives a found network string it calls the | ||
27 | get_network_found() function to get its own structure set. | ||
28 | |||
29 | -- | ||
10 | Included functions: | 30 | Included functions: |
11 | 31 | ||
32 | -- | ||
33 | Protocol: | ||
34 | |||
35 | Send a found network to GUI: | ||
36 | int send_network_found (const char *, int, void *); | ||
37 | |||
38 | The first two arguments are the guihost and the guiport. | ||
39 | The third is the filled structure (wl_network_t), that will | ||
40 | be send to the GUI. | ||
41 | |||
42 | Setup structure for found network: | ||
43 | int get_network_found (void *, const char *); | ||
44 | |||
45 | When the GUI receives a new network found packet it calls | ||
46 | this function and passes a wl_network_t structure and the | ||
47 | received buffer. The function will strip the data from | ||
48 | the buffer and set it to the structure. | ||
49 | |||
50 | -- | ||
12 | Log to syslog/info: | 51 | Log to syslog/info: |
13 | void wl_loginfo(const char *, ...); | 52 | void wl_loginfo(const char *, ...); |
14 | 53 | ||
15 | Log to syslog/err: | 54 | Log to syslog/err: |
16 | void wl_logerr(const char *, ...); | 55 | void wl_logerr(const char *, ...); |
17 | 56 | ||
18 | Use like printf() function with format strings and so on. | 57 | Use like printf() function with format strings and so on. |
19 | 58 | ||
20 | 59 | -- | |
21 | Setup udp socket for incoming commands: | 60 | Setup udp socket for incoming commands: |
22 | int commsock(const char *, int); | 61 | int commsock(const char *, int); |
23 | 62 | ||
24 | Fist argument is the host where it should listen and second | 63 | Fist argument is the host where it should listen and second |
25 | is the port. | 64 | is the port. |
26 | 65 | ||
27 | Return values: | 66 | Return values: |
28 | 67 | ||
29 | Send command to udp socket: | 68 | Send command to udp socket: |
30 | int sendcomm(const char *, int, const char *, ...); | 69 | int sendcomm(const char *, int, const char *, ...); |
31 | 70 | ||
32 | First two arguments are the host and port where the command should | 71 | First two arguments are the host and port where the command should |
33 | be send to, followed by buffer that should be send. | 72 | be send to, followed by buffer that should be send. |
34 | 73 | ||
74 | |||
75 | --- | ||
76 | |||
35 | Thats it for the moment. | 77 | Thats it for the moment. |
78 | |||
79 | mjm. | ||