Commit Graph

93 Commits

Author SHA1 Message Date
Matteo Cypriani bc6ec14fa8 Update COPYRIGHT.t2t URL 2016-11-03 22:00:33 -04:00
Matteo Cypriani 52106177a1 [Aggregator] Improve UDP socket-related code 2014-10-31 13:59:52 -04:00
Matteo Cypriani 56edcc623a [Aggregator] Limit the verbose level to a maximum
For now the maximum verbose level is 4, so it is best for the user to
avoid displaying a verbose level higher than that in the configuration.
2013-10-04 10:44:40 -04:00
Matteo Cypriani 69e8b49300 Mark arguments as const as needed in C programs
This was already done in the libraries, but not in the programs.
2013-10-02 11:28:48 -04:00
Matteo Cypriani 89f0b583e3 [Aggregator] Test numbers from the command line
Check the return value of most calls to strtol().
Force base 10 when reading integers from the command line.
2013-09-27 15:22:48 -04:00
Matteo Cypriani e5883d99d5 Finish supporting getaddrinfo()
- For static buffers, use a size suited for host names and not only IP
  addresses.
- Change variable names.
- Adapt usage messages and documentation.
2013-09-23 17:03:51 -04:00
Matteo Cypriani 75e04cfc17 Quit handling useless network client structures
It is useless to handle a client structure on recvfrom() or accept()
when nothing is done with this information.
Changed in Aggregator, Listener, Positioner and UDP-to-HTTP.
2013-09-23 17:03:50 -04:00
Matteo Cypriani 25cc1ee67a [lib] getaddrinfo() in create_udp_trx_socket()
Use getaddrinfo() to resolve names in owl_create_udp_trx_socket(). The
client_description parameter has been removed from the function's
synopsis.
2013-09-23 17:03:50 -04:00
Matteo Cypriani 82154b9a46 Cosmetic changes in C modules 2013-09-23 16:10:53 -04:00
Matteo Cypriani 0650059bca [Aggregator] Fix usage message 2013-09-23 16:10:52 -04:00
Matteo Cypriani ec8cd9dddd [Aggregator] Improve config file-related warning
Same modification as for the Listener.
2013-07-17 18:09:15 -04:00
Matteo Cypriani 69cba07122 [lib] Access Point -> Capture Point (API change)
Same work as for Aggregator and Listener to get rid of the old "AP"
terminology.

API change: structures with an ap_mac_addr_bytes field are modified.
2013-07-17 18:09:12 -04:00
Matteo Cypriani 0c3083bd41 [Aggregator] Access Point -> Capture Point
Use the new terminology "capture point" (CP) instead of "access point"
(AP) everywhere in Aggregator. The only user-visible change is that the
ap_keep_timeout option is now called cp_keep_timeout.
2013-07-17 18:09:12 -04:00
Matteo Cypriani 91cd819730 [Aggregator] ap_check_interval -> ac_order_interval
The option ap_check_interval is now named ac_order_interval, which is
(hopefully) more meaningful.
2013-07-17 18:09:12 -04:00
Matteo Cypriani 5bf1bcb4d2 Handle aggregation CSV format version
The first field of the Aggregator's CSV output files is now an unsigned
integer that announces the version of the CSV format used. Current
version is 1 and the subsequent fields are not modified, so that an
aggregation file generated with a previous version can still be used by
adding "1;" at the beginning of each line.

The Positioner has been adapted to handle this new format.
2013-07-17 18:08:27 -04:00
Matteo Cypriani 61aa4af3a3 [Aggregator] Refactor got_request()
Create add_captured_request() out of got_request(). Now,
add_captured_request() will need to be refactored.
2013-06-12 18:55:48 -04:00
Matteo Cypriani 068553ee49 [Aggregator] got_request(): pointer parameter
For performance's sake, the request passed in parameter of got_request()
is now a const pointer instead of a struct.
2013-06-12 18:55:48 -04:00
Matteo Cypriani ef154b6d91 [Aggregator] Refactor read_loop()
Create print_captured_request() out of read_loop().
2013-06-12 18:55:48 -04:00
Matteo Cypriani 0e913a2938 [Aggregator] More monitor_requests() refactoring
Create scan_request_list() out of monitor_requests().
2013-06-12 18:55:48 -04:00
Matteo Cypriani 5b6f40f59d Improve Aggregator & Listener's exit messages 2013-06-12 18:55:46 -04:00
Matteo Cypriani d9344673b0 [Aggregator] Flush the requests' list at exit
Instead of just freeing the requests' list, output every request and
free the list at the same time.
2013-06-12 18:51:38 -04:00
Matteo Cypriani 47103f3360 [Aggregator] Refactor monitor_requests()
Create output_request() out of monitor_requests().
2013-06-12 18:44:24 -04:00
Matteo Cypriani 45d4eeb791 [Aggregator] Reorder functions
Reorder the functions in owlps-aggregatord.c to respect the order of
owlps-aggregator.h.
2013-06-12 18:44:24 -04:00
Matteo Cypriani 3a9ce442d1 [Aggregator] Add -F option (don't flush output)
Add the -F option to turn off flushing of the output file after each
analyse of the requests' list.
2013-06-12 18:44:03 -04:00
Matteo Cypriani 6761650648 [Aggregator] Make -o optional
The -o parameter is now optional, and the default output file is the
standard output.
2013-06-12 17:18:46 -04:00
Matteo Cypriani 94e5c5cbab [Aggregator] Add option -G (dump configuration)
Add the option -G (like "Generate configuration file") that dumps the
current configuration on the standard output, so the user can call
  owlps-aggregatord [custom options] -G >owlps-aggregator.conf
to generate the configuration file owlps-aggregator.conf.
2013-06-12 17:18:46 -04:00
Matteo Cypriani 5ddca24738 Print exit message only in verbose mode
Update the exit message printing in all the modules:
- print on standard error
- print only in verbose mode
- use "exiting" instead of "end"
2013-06-12 17:18:46 -04:00
Matteo Cypriani 80fd5b287b Update and centralise copyright information 2013-05-29 13:19:06 -04:00
Matteo Cypriani 0614b52219 [lib] Stop defining owl_bool (use stdbool.h)
We don't define our own boolean type in owlps.h any more: bool (from
stdbool.h) is used instead.
2013-05-15 15:46:13 -04:00
Matteo Cypriani 4aed9c1ef0 Radiotap Antenna Signal field is signed
Using int8_t instead of uint8_t which was erroneously used to code the
Antenna Signal radiotap field.
2013-04-24 10:59:55 -04:00
Matteo Cypriani d1c64212d8 Test malloc/realloc return values 2012-11-03 16:51:13 +01:00
Matteo Cypriani 8455dd0d74 Add copyright & license information
Add the file COPYRIGHT, the CeCILL license's text, and update the source
files' headers with the copyright and license information.
2012-11-03 14:52:33 +01:00
Matteo Cypriani e98474e678 [Aggregator] Send the capture time to Positioner
The Aggregator now transmits the capture timestamp of each packet to the
positioning server. For now this timestamp is not stored, only displayed
(in verbose mode) when a request is received.
2012-05-02 17:31:49 +02:00
Matteo Cypriani b60d0d380f [Aggregator] Send the mobile's IP to Positioner
For now the positioning server only displays the mobile's IP address (in
verbose mode) and updates it in the stored Mobile.
2012-05-02 17:31:42 +02:00
Matteo Cypriani 5ab5b4f22f [Aggregator] Handle the packet numbering 2012-02-08 10:52:39 +01:00
Matteo Cypriani d5e2c975ae Rename Positioning -> Positioner
To be consistent with the other modules, the positioning server must be
called OwlPS Positioner instead of Positioning, and the executable
owlps-positionerd (even if the daemon mode is not implemented yet).
That's a big commit for a tiny change.
2012-02-06 17:48:43 +01:00
Matteo Cypriani 6b7e5668fa Add/update headers on the top of each source file 2012-02-06 16:44:09 +01:00
Matteo Cypriani 3ed19bb012 Version printing: "Owl" instead of "Open Wireless" 2012-02-06 13:27:05 +01:00
Matteo Cypriani 1ebc0c57ed Different port for autocal. orders and hello
Differentiate the port on which the autocalibration hello messages are
sent to the aggregator by the listeners, and the one on which the
autocalibration orders are sent by the aggregator to the listeners.

This will allow to run a listener and an aggregator on the same machine
with autocalibration enabled.

Both in the listener and the aggregator, the option -a (autocalibration
port) has been replaced by the options -O (autocalibration order port)
and -H (autocalibration hello port). In the listener, the option -H was
previously used to set the hello delay; this is now the role of the -T
option.
2012-02-06 13:27:05 +01:00
Matteo Cypriani a0005e9dad Don't use inet_ntoa() any more 2012-02-06 13:27:05 +01:00
Matteo Cypriani 16eaecc53f Avoid displaying non-ASCII characters
Avoid displaying UTF-8 characters on the terminal (French quotes &
ellipsis).
2012-02-06 13:26:50 +01:00
Matteo Cypriani dd01705608 Wrap help messages at 80 columns
In Client, Listener and Aggregator, wrap the help message text at 80
columns to make them easier to read on a standard console.
2012-01-24 18:29:50 +01:00
Matteo Cypriani a1bc3db310 Fix daemon modes (Aggregator, Listener, Client)
daemon() must be called prior to set up signal handlers and threads.
2012-01-24 17:27:46 +01:00
Matteo Cypriani a4857e4b1f [Aggregator] Daemon mode (-D) 2012-01-11 16:50:39 +01:00
Matteo Cypriani cf73bf6309 [lib] Avoid struct arguments & return values
Modify the *time*() functions to avoid passing structures in arguments
(using const pointers instead) or returning structures (using result
arguments instead).
2012-01-11 16:50:36 +01:00
Matteo Cypriani 4dc45acff7 Get rid of the SS - 0x100 problems
In the listener & aggregator, the signal strength is stored as an
unsigned byte. To display the actual (negative) value, one must
substract 256 (0x100) to the unsigned value.
This commit changes several things:
 - Use the decimal (256) instead of the hexadecimal value (0x100).
 - Don't substract 256 when copying the value to another unsigned byte
   (aggregator).
 - Be careful with the type length. In the positioning server, a SS
   could be copied to a signed byte, while (theoretically) the negative
   value can exceed the capacity of the signed byte. measurement.hh now
   defines a type ss_t to store a signal strength value with the good
   size (it is currently an int_fast16_t).
2012-01-09 11:11:31 +01:00
Matteo Cypriani 58ba4c79ff [lib] Rename start_time -> capture_time
"start_time" was meaningless in the global data structures of owlps.h,
and could lead to errors in the aggregator, since it defines a field
start_time in one of its internal structures.
2012-01-09 11:11:30 +01:00
Matteo Cypriani aa8d11e12b [lib] Rename antenna_signal_dbm -> ss_dbm
Use "ss" instead of "antenna_signal" in the data types declared in
owlps.h. Shorter, and as meaningful.
2012-01-09 11:11:30 +01:00
Matteo Cypriani b3b1f8eda2 [Listener] Display the mobile's IP address
When displaying the request to send, display the IP address of the
mobile.
Aggregator: clean the code for displaying requests.
2011-11-22 19:59:01 +01:00
Matteo Cypriani ac6d5d7854 [Aggregator] Fix position endianess
Convert endianess of the coordinates prior to send a request to the
positioning server.
2011-10-24 17:43:04 +02:00