Matteo Cypriani
3782ca9012
Track endianess issues
...
Add some comments, add/remove some endianess conversions. That should be
OK now.
Noticeable changes in owlps.h:
- Type DIRECTION is now an alias for uint8_t instead of an enum.
- Type autocalibration_order now contains an uint8_t instead of an enum.
2011-03-18 15:24:31 +01:00
Matteo Cypriani
0b5ebc524f
[Listener] Use timestamp_to_string()
...
Use owl_timestamp_to_string() instead of owl_timestamp_to_ms() to
display the timestamps.
2011-03-16 16:46:10 +01:00
Matteo Cypriani
c2b7b52a55
[Listener] Fix autocalibration_ip defaulting
...
autocalibration_ip was not set to its default value (aggregation_ip) if
not set.
2011-03-16 16:45:38 +01:00
Matteo Cypriani
8e1466eacc
[Listener] check_configuration(): port numbers
2011-03-16 16:45:38 +01:00
Matteo Cypriani
940c5f74df
[lib] Prefix all functions with owl_
2011-03-16 16:45:37 +01:00
Matteo Cypriani
686ab87a1c
[lib-client] Rename create_socket_to_aggregator()
...
This function had to be renamed, since it allows (and it is used) to
open sockets to other hosts than the aggregator.
2011-03-16 16:45:37 +01:00
Matteo Cypriani
0045ba8a14
[lib-client] Change function prefix (owlclient_)
...
Change the function prefix from "owlps_" to "owlclient_".
2011-03-16 16:45:37 +01:00
Matteo Cypriani
b4ee915e2d
[Listener] read_packet(): drop the data variable
2011-03-16 16:45:37 +01:00
Matteo Cypriani
7671163f62
[Listener] Rename my_mac -> my_mac_bytes
2011-03-16 16:45:37 +01:00
Matteo Cypriani
8123ee3096
Switch to stdint types where possible
...
The use of integer types from inttypes.h & stdint.h should help with
portability issues. It will also force the data transmission between
different architectures to work as intended (if we handle endianess
conversions correctly!).
2011-03-16 16:45:37 +01:00
Matteo Cypriani
00c6cccfa2
[Listener] Use memset() instead of bzero()
2011-03-16 16:45:37 +01:00
Matteo Cypriani
f8e7d9adef
[lib] Use clock_gettime() instead of gettimeofday()
...
Abandon the old struct timeval and gettimeofday(). We now use the new
struct timespec and clock_gettime().
struct timespec has a nanosecond resolution, but we lower the resolution
to keep only milliseconds. The code is inspired from the Timestamp class
of the owlps-positioning.
2011-03-16 16:45:36 +01:00
Matteo Cypriani
4c1da67294
[Listener] Do not use directly TIMESTAMP fields
...
Since struct timeval is now abstracted by TIMESTAMP, we must not use the
structure fields (tv_sec, tv_usec) anymore.
2011-03-16 16:44:32 +01:00
Matteo Cypriani
db8f6dff22
[lib] Add timestamp_now()
...
Use the new function timestamp_now() everywhere instead of
gettimeofday().
2011-03-16 16:44:32 +01:00
Matteo Cypriani
ff81d43cb1
[lib] Introduce type TIMESTAMP
...
The type TIMESTAMP is a wrapper to the currently-used time structure (we
currently use struct timeval).
The function timeval_to_ms() is now timestamp_to_ms().
2011-03-16 16:44:32 +01:00
Matteo Cypriani
829982766d
[lib] Rename mac_cmp() -> mac_equals()
2011-03-16 16:44:32 +01:00
Matteo Cypriani
85085a24cd
[Listener] Disable raw_packet_flags printing
2011-03-16 16:44:31 +01:00
Matteo Cypriani
3f0d07a672
[Listener] Drop packets emitted by ourselves
2011-03-16 16:44:23 +01:00
Matteo Cypriani
a4d001c4fb
[Listener] Fix autocalibration port printing
2011-03-16 16:44:23 +01:00
Matteo Cypriani
22ee24655a
[i-c] Remove ap_ip_addr from autocalibration_hello
...
The listener does not send its IP address explicitly in the Hello
message anymore. Instead, the aggregator now extract the source address
of the Hello packet.
2011-03-16 16:44:23 +01:00
Matteo Cypriani
2af46ea263
[Listener] Fix Hello emission
...
The source interface is not forced to wifi_interface anymore.
2011-03-16 16:44:22 +01:00
Matteo Cypriani
e2963e676b
[Listener] Get rid of the last indent tabs
2011-03-16 16:44:22 +01:00
Matteo Cypriani
5c7ad599a6
[Listener] Add option autocalibration_ip (-D)
...
This option allows to send the autocalibration requests to an other host
than the aggregation server (which remains the default if -D is not
used).
2011-03-16 16:44:22 +01:00
Matteo Cypriani
d9b7a11d3a
[Listener] Document -P in the short help
2011-03-16 16:44:22 +01:00
Matteo Cypriani
984ced2d10
[Listener] Add option display_captured (-c/-Q)
...
The packet captured are no longer displayed when in verbose mode.
The new option 'display_captured' (or command-line -c) activates this
behaviour. One can use -Q to deactivate.
2011-03-16 16:44:22 +01:00
Matteo Cypriani
ac8438a33b
[Listener] Use verbosity instead of #ifdef DEBUG
...
Whenever possible, test the value of GET_VERBOSE() instead of a #ifdef
DEBUG.
2011-03-16 16:44:22 +01:00
Matteo Cypriani
3979788c77
[Listener] Change autocalibration requests port
...
Autocalibration positioning requests were previously (and stupidly) sent
on the aggregation port. We can now chose the port for autocalibration
requests.
2011-03-16 16:44:22 +01:00
Matteo Cypriani
57f1331273
[Listener] Fix reading of QoS Data frames
...
The IEEE 802.11 header size is 2 bytes bigger when a Data frame has QoS
information.
2011-03-16 16:44:08 +01:00
Matteo Cypriani
87e364a633
[Listener] Accept all data frames
...
The listener dropped all non-bare Data frames. It now accepts Data
subtypes as well (QoS Data, etc.).
2011-03-16 14:52:58 +01:00
Matteo Cypriani
4a89410b49
[Listener] packet_type is now unsigned
2011-03-16 14:52:58 +01:00
Matteo Cypriani
8474fef520
[Listener] Reorganise implicit/explicit code
...
Reorganise read_packet() code for detection of implicit/explicit
requests. Quite buggy, it was.
Word of the day: OMG GOTOZ LOL111
2011-03-16 14:52:58 +01:00
Matteo Cypriani
2e16e62c44
[Listener] Radiotap header is little-endian!
...
Use le16toh() instead of ntohs() for rtap header length.
2011-03-16 14:52:58 +01:00
Matteo Cypriani
97a1e7c72a
[i-c] Use htonl/ntohl() to exchange autocal. orders
2011-03-16 14:52:57 +01:00
Matteo Cypriani
05ceea9950
[i-c] Make more verbose autocalibration exchanges
...
When in debug mode, aggregator and listener both output information when
sending or receiving autocalibration hello messages or orders.
2011-03-16 14:52:57 +01:00
Matteo Cypriani
2d62705edd
[Listener] Use lib-client functions to send Hellos
2011-03-16 14:52:57 +01:00
Matteo Cypriani
5fb93d9dd3
[Listener] Get MAC and IP, then launch threads
...
Operation order is better that way, because autocalibrate_hello() needs
to know MAC and IP addresses of the AP.
2011-03-16 14:52:57 +01:00
Matteo Cypriani
6cbbcc957b
[Listener] Update configuration display
...
Configuration display when not using libconfuse was outdated.
2011-03-16 14:52:57 +01:00
Matteo Cypriani
737630b8c9
[Listener] Add option -V
...
The new option -V displays the compilation-time options. In the future,
it should display the version number.
When the user calls the program either with -h or the new option -V, we
do not try any more to open and parse the configuration file (which was
useless since -h, and now -V, exit the program).
2011-03-16 14:52:57 +01:00
Matteo Cypriani
3c0f74fcb3
[Listener] Fix strict-aliasing rule warning
2011-03-16 14:52:57 +01:00
Matteo Cypriani
10e3bb7ab0
[Listener] Fix compilation without pthreads
2011-03-16 14:52:57 +01:00
Matteo Cypriani
f804855309
[Aggregator] Send order to APs
...
Add options -C and -K.
Rename default autocalibration values in aggregator and listener.
2011-03-16 14:52:56 +01:00
Matteo Cypriani
eff2455897
[Listener] Send IP in Hello messages
2011-03-16 14:52:56 +01:00
Matteo Cypriani
d51f136d70
[Listener] Send & receive autocalibration requests
2011-03-16 14:52:56 +01:00
Matteo Cypriani
729c20c8ff
[Aggregator] Receive hello messages from listener
2011-03-16 14:52:56 +01:00
Matteo Cypriani
c583e0bb54
[Listener] Prepare autocalibration
...
Send hello messages to the aggregator.
2011-03-16 14:52:56 +01:00
Matteo Cypriani
2150dc1cde
[Listener] Use lib-client to create output socket
2011-03-16 14:52:55 +01:00
Matteo Cypriani
d6a75a10fc
[Listener] Use global variables for the socket
...
+ Do not use sub-function got-packet() anymore in function capture():
read_packet() is called directly.
2011-03-16 14:52:20 +01:00
Matteo Cypriani
a0be0f5bef
[Listener] Refactor configuration code
2011-03-16 14:51:17 +01:00
Matteo Cypriani
7aa0b65f72
[Listener] Add -h option
2011-03-16 14:51:17 +01:00
Matteo Cypriani
5eb11af87f
[Listener] Translation of comments, 72 col.
2011-03-16 14:51:17 +01:00