summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/libwellenreiter/docs/wl_sock.88
-rw-r--r--noncore/net/wellenreiter/libwellenreiter/docs/wl_types.825
2 files changed, 30 insertions, 3 deletions
diff --git a/noncore/net/wellenreiter/libwellenreiter/docs/wl_sock.8 b/noncore/net/wellenreiter/libwellenreiter/docs/wl_sock.8
index ebecd82..62e935b 100644
--- a/noncore/net/wellenreiter/libwellenreiter/docs/wl_sock.8
+++ b/noncore/net/wellenreiter/libwellenreiter/docs/wl_sock.8
@@ -1,13 +1,13 @@
1wl_sock 1wl_sock
2 2
3#include <wellenreiter/wl_sock.hh> 3#include <wellenreiter/wl_sock.hh>
4 4
5int wl_setupsock(const char *host, int port) 5int wl_setupsock(const char *host, int port, struct sockaddr_in *)
6int wl_send(const char *host, int port, const char *string, ...) 6int wl_send(const char *host, int port, const char *string, ...)
7int wl_recv(int *socket, char *out, int len) 7int wl_recv(int *socket, struct sockaddr_in *, char *out, int len)
8 8
9 9
10wl_setupsock() returns the number of the activated udp socket. 10wl_setupsock() returns the number of the activated udp socket.
11 11
12wl_send() sends string to the given host. 12wl_send() sends string to the given host.
13 13
@@ -15,10 +15,12 @@ wl_recv() checks for incoming data on a socket (created using
15wl_setupsock()). It writes the incoming data to out with a 15wl_setupsock()). It writes the incoming data to out with a
16maxlen of len. 16maxlen of len.
17 17
18 18
19wl_setupsock() returns -1 on error and the number of socket on 19wl_setupsock() returns -1 on error and the number of socket on
20success. 20success.
21wl_send() returns -1 on error and 0 on success. 21wl_send() returns 0 on error and 1 on success.
22wl_recv() returns -1 on error and the type of the received packet 22wl_recv() returns -1 on error and the type of the received packet
23on success. 23on success.
24 24
25Note: To use this function you have to set a sockaddr_in structure
26and pass it to wl_setupsock and wl_receive.
diff --git a/noncore/net/wellenreiter/libwellenreiter/docs/wl_types.8 b/noncore/net/wellenreiter/libwellenreiter/docs/wl_types.8
new file mode 100644
index 0000000..d12f564
--- a/dev/null
+++ b/noncore/net/wellenreiter/libwellenreiter/docs/wl_types.8
@@ -0,0 +1,25 @@
1wl_types.hh
2
3wl_types.hh contains the global buffers and type definitions.
4
5At the moment these are:
6
7/* Type definitions, to be continued */
8#define WL_NETFOUND 01
9#define WL_NETLOST 02
10#define WL_STARTSNIFF 98
11#define WL_STOPSNIFF 99
12
13#define WL_SOCKBUF 512 /* Buffer for wl_send and wl_recv calls */
14
15/* WL network structure */
16typedef struct {
17 int net_type; /* 1 = Accesspoint ; 2 = Ad-Hoc */
18 int ssid_len; /* Length of SSID */
19 int channel; /* Channel */
20 int wep; /* 1 = WEP enabled ; 0 = disabled */
21 char mac[64]; /* MAC address of Accesspoint */
22 char bssid[128]; /* BSSID of Net */
23} wl_network_t;
24
25Will be filled up with other structs and size definitions asap.