Commit Graph

67 Commits

Author SHA1 Message Date
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 e239dffa4f [Listener] Do not print a warning if AC_port == 0
If the autocalibration request port was not specified, a warning was
issued. This is now fixed by issuing a warning only if the port is too
big, but not if it is zero.
2012-05-14 14:06:05 +02:00
Matteo Cypriani c4e03520f3 [Listener] Display the packet size 2012-05-10 11:38:21 +02:00
Matteo Cypriani 07f5b16ca0 [Listener] Receive the new request format
Read the packet number and number of packets after the request type.
A bit of refactoring was done.
2012-05-10 11:29:17 +02:00
Matteo Cypriani 96d1c54e54 Send number of packets at the beginning of request
The packet number and number of packets are now sent right after the
packet type, instead of at the end of the request.
2012-05-09 21:13:52 +02:00
Matteo Cypriani 1cc1ce4302 [Listener] Handle the packet numbering 2012-02-08 10:52:39 +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 ee3ab7b383 [Listener] Same port for all requests
The autocalibration requests are now sent on the same port as the
positioning request, by default. There was no real reason to send them
on a different port.
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 a20156a45e [Listener] print_configuration(): fix verbose
The verbose level was displayed as a boolean when the program was
compiled without libconfuse.
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 7fc89a381c [Listener] Check radiotap header length
From time to time, the length of the radiotap header (rtap_bytes in
read_packet()) is 65535. This is a quick & dirty fix to avoid segfaults,
but we should search for the reason why this value sometimes appears.
2012-01-24 16:11:36 +01:00
Matteo Cypriani 2ed7ccd4bc [Listener] Daemon mode (-D)
Basic implementation of the daemon mode.
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 5ffeafb857 [Listener] Option ENABLE_KEEP_MONITOR
Add the compile-time option ENABLE_KEEP_MONITOR to enable/disable the
option -K. That allows to make optional the dependency on iwlib.
This option is disabled by default in the Makefiles.
2012-01-09 11:11:30 +01:00
Matteo Cypriani 8c070d482e Standardise CLI options
Make uniform the command-line options of the various programs.
Positioning: delete some useless short options.
2012-01-09 11:11:30 +01:00
Matteo Cypriani ffd1c1d625 [Listener] Verbose level #4 instead of option -c
Add a fourth verbose level to display the captured packets and suppress
the dedicated options -c / -Q.
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 1debe92624 [Listener] Fix extract_calibration_data() 2011-10-24 13:56:51 +02:00
Matteo Cypriani 603293c5f9 [Listener] Fix request display
Use owl_mac_bytes_to_string_r() instead of owl_mac_bytes_to_string()
when there are more than one address to display in a single printf().
2011-10-13 15:40:05 +02:00
Matteo Cypriani 3fec57b1ae Move all error #defines in owlps.h 2011-08-26 11:09:41 +02:00
Matteo Cypriani 40bc6d0b59 [Listener] Fix reception timestamp
struct pcap_pkthdr.ts is host-endian, not net-endian, so we have to
convert it to net-endianess when reading it from the packet.
2011-08-24 14:05:16 +02:00
Matteo Cypriani 8f48a22482 [Listener] Fix config parsing memory leaks
The configuration parsing function could call exit() (e.g. with -h, -V,
or in case of error), implying a memory leak. This is fixed.
Additionally, minor cleaning in the configuration functions.
2011-08-24 13:39:01 +02:00
Matteo Cypriani ff17c92bfa [lib-client] Change the prefix for "owl_"
Use the prefix "owl_" instead of "owlclient_".
2011-08-23 19:58:49 +02:00
Matteo Cypriani 442c5a4601 [lib] .h all is prefixed with OWL_ or owl_
All the types, defines, etc. are now prefixed with "OWL_" or "owl_".
TRUE and FALSE become owl_true and owl_false.
2011-08-22 22:43:35 +02:00
Matteo Cypriani 462298d6e8 [Listener] Set the signal flags to 0 2011-08-20 20:00:39 +02:00
Matteo Cypriani de74213102 [lib] Rename OWL_TIMESTAMP_STR_LEN OWL_TIMESTAMP_STRLEN 2011-08-18 14:02:17 +02:00
Matteo Cypriani ac4dd87ef9 Use ++var instead of var++ whenever possible 2011-08-18 11:45:36 +02:00
Matteo Cypriani fb9d093d5a [Listener] Add extract_radiotap_data()
Another refactoring step for read_packet().
2011-08-04 00:35:32 +02:00
Matteo Cypriani 4bae0c9b4e [Listener] Add extract_calibration_data()
A first step in the long way of read_packet() refactoring.
2011-08-04 00:25:08 +02:00
Matteo Cypriani 1dae048f0c [lib-client] Delay in ms instead of microseconds
In owlclient_send_request(), the delay between two packets is now in
milliseconds.
Client & Listener updated to reflect the change.
2011-07-25 12:46:20 +02:00
Matteo Cypriani 051ce9147c Use -D DEBUG / NDEBUG in Makefiles
Instead of #define DEBUG, we now prefer to use either verbose levels
or, when needed, NDEBUG. Each Makefile was modified to be able to pass
-D NDEBUG to the compiler (but the corresponding lines are commented),
except in the modules where assert is never used, in which case the
Makefile passes -D DEBUG.

Long story short: to totally disable debugging code, comment-out the
"-D DEBUG" lines and uncomment the "-D NDEBUG" lines, in every Makefile.
2011-07-25 12:46:20 +02:00
Matteo Cypriani f008db0e1c [Listener] Use perror() after recvfrom() 2011-07-25 12:46:20 +02:00
Matteo Cypriani f71a56bb9a [Listener] Use verbose levels 2011-07-25 12:46:20 +02:00
Matteo Cypriani a62387e465 [Listener] Switch verbose mode to verbose level 2011-07-25 12:46:19 +02:00
Matteo Cypriani 5f72702b88 [Listener] Use ETHERTYPE_IP instead of ETH_P_IP
ETH_P_IP is Linux-specific.
2011-06-27 10:09:14 +02:00
Matteo Cypriani 3ac53e7b76 [Listener] Fix compilation without USE_PTHREAD 2011-06-27 10:09:14 +02:00
Matteo Cypriani 95b9ea30bf [lib] Fix #includes for OpenBSD
libowlps now builds on OpenBSD (4.9)!
2011-06-27 10:09:14 +02:00
Matteo Cypriani 00d89efd40 [lib] Move owl_iface_mode_monitor() in Listener
Only owlps-listener uses owl_iface_mode_monitor(), so we don't need to
keep it in libowlps.
2011-06-27 10:09:14 +02:00
Matteo Cypriani cc66eb7c59 [Listener] read_packet(): blank the whole request
Blank the whole request with memset() instead of setting to zero each
field.
2011-05-05 13:21:41 +02:00
Matteo Cypriani be784c8ec0 [Listener] Check SS field before to print it 2011-05-03 13:38:50 +02:00
Matteo Cypriani 52c3b34170 [Listener] Fix -f: do not quit anymore 2011-04-13 00:12:18 +02:00
Matteo Cypriani c23bddffae [Listener] print_version(): print version number
Use git describe to generate a version label. One can also specify a
label:
  make OWLPS_VERSION=v3.14alpha
2011-04-12 23:29:47 +02:00