Commit Graph

432 Commits

Author SHA1 Message Date
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 abb1d170cf [lib] Use memset() instead of bzero() 2011-03-16 16:45:36 +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 3331a6685f [Aggregator] Rename TIMESTAMP compilation option
The TIMESTAMP compilation-time option is now USE_TIMESTAMP.
2011-03-16 16:44:32 +01:00
Matteo Cypriani 10a47246f4 [lib] Rename sub_date() -> time_elapsed() 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 af1c04529d [lib] sigint_handler(): use #ifdef DEBUG 2011-03-16 16:44:32 +01:00
Matteo Cypriani 3d0300cc60 [lib] Translate comments, 72 col. 2011-03-16 16:44:32 +01:00
Matteo Cypriani f33ab91187 [Aggregator] Reorganise usage message, document -o 2011-03-16 16:44:32 +01:00
Matteo Cypriani 0676462082 Makefiles: use colorgcc (only) if it exists
owlps-positioning/Makefile used to use colorgcc as the default compiler,
without testing its existence. This is fixed.
The makefiles for libowlps and infrastructure-centred modules now use
colorgcc when available.
2011-03-16 16:44:32 +01:00
Matteo Cypriani 3027df22a7 [Positioning] Makefile: add help 2011-03-16 16:44:32 +01:00
Matteo Cypriani 8e87249087 [Aggregator] Print mobile MAC to the output file 2011-03-16 16:44:32 +01:00
Matteo Cypriani 47c62a3d5e [Aggregator] Makefile: use -D TIMESTAMP by default 2011-03-16 16:44:31 +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 7139be3070 [Client] Get rid of the last indent tabs 2011-03-16 16:44:22 +01:00
Matteo Cypriani bbe43536ad [Aggregator] Get rid of the last indent tabs 2011-03-16 16:44:22 +01:00
Matteo Cypriani 719514eab6 [lib] Get rid of the last indent tabs 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 7b5600881d [lib-client] Add TODO 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 80f17b08b7 [Aggregator] Fix typo 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 ee89f9ea28 [Listener] Reindent macros in header 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 b07a4eb63d [Client] Add Makefile for OpenWrt 10.03 2011-03-16 14:52:58 +01:00
Matteo Cypriani e3353e835b [Aggregator] Fix deletion of the last AP 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 0a8ef2793b [Aggregator] Check "autocalibration" option
Option "autocalibration" (-a) was implemented but not checked
(autocalibration was always activated). This is now fixed.
2011-03-16 14:52:58 +01:00
Matteo Cypriani 2bfb322728 [Aggregator] Add -v (verbose) option 2011-03-16 14:52:58 +01:00
Matteo Cypriani ae3131c047 [Aggregator] Add some debug messages 2011-03-16 14:52:58 +01:00
Matteo Cypriani 8fdfd6819e Use -Wextra instead of -W in all Makefiles
This changes nothing except readability.

Fix default build options in Makefile_atheros for Listener.
2011-03-16 14:52:58 +01:00
Matteo Cypriani 68746458f1 [i-c] Update TODOs 2011-03-16 14:52:57 +01:00
Matteo Cypriani 8319ca112a [Aggregator] Fix autocalibration scheduler
The list of knowns APs is now handled as a double-linked token ring
instead of a double-linked list.
The scheduler for autocalibration transmissions is now operational!

Delete the now-useless function move_ap_front(), which was not used
before anyway.
2011-03-16 14:52:57 +01:00
Matteo Cypriani 97a1e7c72a [i-c] Use htonl/ntohl() to exchange autocal. orders 2011-03-16 14:52:57 +01:00
Matteo Cypriani bdecd07125 [Aggregator] Launch monitor aps thread 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