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
Matteo Cypriani
d31ac3864e
Position endianess conversion in all modules
2011-04-07 16:15:46 +02:00
Matteo Cypriani
d1c6abdaf7
[Listener] Send coordinates in autocalib. requests
...
One can now provide the coordinates of the listener on the command line.
2011-04-07 09:17:46 +02:00
Matteo Cypriani
c1f4c4e77e
[Listener] Check autocalibration_nb_packets
...
Display a warning if the number of autocalibration packets to send is
null.
2011-04-07 09:17:46 +02:00
Matteo Cypriani
df5ed19834
Include headers as needed
...
Move #includes from .h to .c wherever possible.
2011-03-31 16:03:22 +02:00
Matteo Cypriani
d62a7500b1
[lib] Rename run -> owl_run
2011-03-31 16:03:22 +02:00
Matteo Cypriani
4f74524f05
Handle request type in Listener & Aggregator
...
The listener now sends the request type to the aggregator. The
aggregator writes it to the CSV file and transmit it to the positioning
server.
2011-03-25 17:20:18 +01:00
Matteo Cypriani
204750b8c5
[lib] Rename PACKET_TYPE_* -> OWL_REQUEST_*
2011-03-25 16:30:40 +01:00
Matteo Cypriani
4720399513
[lib] mac_bytes_to_string(): do not malloc anymore
...
owl_mac_bytes_to_string() now uses a static buffer, so the caller do not
need to free the returned buffer manually. Because of this static
buffer, it is not thread-safe anymore, therefore we introduce
owl_mac_bytes_to_string_r() that is a thread-safe version.
2011-03-25 11:48:25 +01:00
Matteo Cypriani
e8aa0838f4
Use ETHER_ADDR_LEN instead of 6
2011-03-25 11:48:25 +01:00
Matteo Cypriani
5f9de6e1dc
[Listener] Fix the "don't want to quit" bug
...
In capture(), the pcap_loop() call was blocking, so the program did not
quit if no packet came on rtap_iface. This is now fixed by a call to
pcap_breakloop() in the signal handlers.
2011-03-25 11:48:24 +01:00
Matteo Cypriani
0a52205916
[Listener] Use pthread_cleanup*
2011-03-25 11:48:24 +01:00
Matteo Cypriani
6c4af9020f
close(fd) instead of (void) close(fd)
2011-03-25 11:48:24 +01:00
Matteo Cypriani
98386514e5
Use INET_ADDRSTRLEN instead of 16
2011-03-25 11:48:23 +01:00
Matteo Cypriani
f71a4650e2
[Listener] Better handling of threads
...
Fix thread headers, check the return value of pthread_create(), and wait
for the threads at the end of the program.
2011-03-25 11:48:23 +01:00
Matteo Cypriani
d4e9d9c97b
[Listener] Rename variable couple -> request
2011-03-25 11:48:22 +01:00
Matteo Cypriani
91cba33dcd
[lib] Rename types
...
- Lowercase all defined types.
- Prefix with "owl_".
- Rename couple_message -> owl_captured_request.
- Rename couple_info -> owl_request_info.
2011-03-25 11:48:22 +01:00
Matteo Cypriani
a72a76d5a9
mv /infrastructure-centred/* /
...
Get rid of the infrastructure-centred directory: all the modules are now
at the same level.
2011-03-25 11:48:22 +01:00