summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter/libwellenreiter/docs
Unidiff
Diffstat (limited to 'noncore/net/wellenreiter/libwellenreiter/docs') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/libwellenreiter/docs/quickintro88
-rw-r--r--noncore/net/wellenreiter/libwellenreiter/docs/wl_conf.817
-rw-r--r--noncore/net/wellenreiter/libwellenreiter/docs/wl_log.812
-rw-r--r--noncore/net/wellenreiter/libwellenreiter/docs/wl_sniff.821
-rw-r--r--noncore/net/wellenreiter/libwellenreiter/docs/wl_sock.826
-rw-r--r--noncore/net/wellenreiter/libwellenreiter/docs/wl_types.825
6 files changed, 0 insertions, 189 deletions
diff --git a/noncore/net/wellenreiter/libwellenreiter/docs/quickintro b/noncore/net/wellenreiter/libwellenreiter/docs/quickintro
deleted file mode 100644
index 97458b7..0000000
--- a/noncore/net/wellenreiter/libwellenreiter/docs/quickintro
+++ b/dev/null
@@ -1,88 +0,0 @@
1
2Name: libwellenreiter
3Author: Martin J. Muench
4
5NOTE: This is just a very short summary of the functions included
6in libwellenreiter, written because a lack of time. The whole
7library will be rewritten with extended documentation and
8test programs.
9
10--
11Wellenreiter types:
12In proto.hh the following type (wl_network_t) is declared:
13
14typedef 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
23When a network is found, the structure has to be set and
24sent to the send_network_found() function.
25
26When the GUI receives a found network string it calls the
27get_network_found() function to get its own structure set.
28
29--
30Included functions:
31
32--
33Protocol:
34
35Send a found network to GUI:
36int send_network_found (const char *, int, void *);
37
38The first two arguments are the guihost and the guiport.
39The third is the filled structure (wl_network_t), that will
40be send to the GUI.
41
42Setup structure for found network:
43int get_network_found (void *, const char *);
44
45When the GUI receives a new network found packet it calls
46this function and passes a wl_network_t structure and the
47received buffer. The function will strip the data from
48the buffer and set it to the structure.
49
50--
51Log to syslog/info:
52void wl_loginfo(const char *, ...);
53
54Log to syslog/err:
55void wl_logerr(const char *, ...);
56
57Use like printf() function with format strings and so on.
58
59--
60Setup udp socket for incoming commands:
61int commsock(const char *, int);
62
63Fist argument is the host where it should listen and second
64is the port. Socket is returned, on failure -1 is returned.
65
66
67Recvfrom socket:
68int recv_commsock(int *, char *, int);
69
70First argument is the address of the socket, second is a buffer
71that should be filled in and the third is the maxlength of the
72buffer. On error, -1 is returned, on success the number of
73packet type is returned. (return value should be used with switch
74command, for types see proto.hh)
75
76Send command to udp socket:
77int sendcomm(const char *, int, const char *, ...);
78
79First two arguments are the host and port where the command should
80be send to, followed by buffer that should be send. On error, -1
81is returned.
82
83
84---
85
86Thats it for the moment.
87
88mjm.
diff --git a/noncore/net/wellenreiter/libwellenreiter/docs/wl_conf.8 b/noncore/net/wellenreiter/libwellenreiter/docs/wl_conf.8
deleted file mode 100644
index 8d2fe27..0000000
--- a/noncore/net/wellenreiter/libwellenreiter/docs/wl_conf.8
+++ b/dev/null
@@ -1,17 +0,0 @@
1wl_conf
2
3#include <wellenreiter/wl_conf.hh>
4
5int wl_checkcfg(void);
6int wl_cfgvalue(const char *token, char *out, int maxlen);
7
8wl_checkcfg checks whether the wellenreiter configfile exists.
9wl_cfgvalue searches for the given token and copies maxlen
10characters of its value to out.
11
12wl_ckeckcfg returns 1 if the file exists and is readable and
130 on error.
14
15wl_cfgvalue returns -1 on error, 0 if nothing was found and
161 on success.
17
diff --git a/noncore/net/wellenreiter/libwellenreiter/docs/wl_log.8 b/noncore/net/wellenreiter/libwellenreiter/docs/wl_log.8
deleted file mode 100644
index 00262bd..0000000
--- a/noncore/net/wellenreiter/libwellenreiter/docs/wl_log.8
+++ b/dev/null
@@ -1,12 +0,0 @@
1wl_log
2
3#include <wellenreiter/wl_log.hh>
4
5void wl_loginfo(const char *string, ...)
6void wl_logerr(const char *string, ...)
7
8wl_loginfo() and wl_err() write string to syslog(),
9either to INFO or to ERR.
10
11no return values
12
diff --git a/noncore/net/wellenreiter/libwellenreiter/docs/wl_sniff.8 b/noncore/net/wellenreiter/libwellenreiter/docs/wl_sniff.8
deleted file mode 100644
index 9a65223..0000000
--- a/noncore/net/wellenreiter/libwellenreiter/docs/wl_sniff.8
+++ b/dev/null
@@ -1,21 +0,0 @@
1sniff.cc
2
3#include <wellenreiter/sniff.hh>
4
5void process_packets(const struct pcap_pkthdr *pkthdr,
6 const unsigned char *packet,
7 char *guihost,
8 int guiport)
9
10The function process_packets() will use libpcap to get the
11informations for a 802.11b packet. When it finds a valid
12network it calls the wl_send function and sends a found
13network packet to the guiport on the guihost.
14
15
16Return value
17
18none
19
20NOTE: process_packets() is void at the moment because there
21will be alot of non-critical and annoying errors.
diff --git a/noncore/net/wellenreiter/libwellenreiter/docs/wl_sock.8 b/noncore/net/wellenreiter/libwellenreiter/docs/wl_sock.8
deleted file mode 100644
index 62e935b..0000000
--- a/noncore/net/wellenreiter/libwellenreiter/docs/wl_sock.8
+++ b/dev/null
@@ -1,26 +0,0 @@
1wl_sock
2
3#include <wellenreiter/wl_sock.hh>
4
5int wl_setupsock(const char *host, int port, struct sockaddr_in *)
6int wl_send(const char *host, int port, const char *string, ...)
7int wl_recv(int *socket, struct sockaddr_in *, char *out, int len)
8
9
10wl_setupsock() returns the number of the activated udp socket.
11
12wl_send() sends string to the given host.
13
14wl_recv() checks for incoming data on a socket (created using
15wl_setupsock()). It writes the incoming data to out with a
16maxlen of len.
17
18
19wl_setupsock() returns -1 on error and the number of socket on
20success.
21wl_send() returns 0 on error and 1 on success.
22wl_recv() returns -1 on error and the type of the received packet
23on success.
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
deleted file mode 100644
index d12f564..0000000
--- a/noncore/net/wellenreiter/libwellenreiter/docs/wl_types.8
+++ b/dev/null
@@ -1,25 +0,0 @@
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.