Commit Graph

56 Commits

Author SHA1 Message Date
Matteo Cypriani 78f13f2c0b [Listener] Fix byte order macros for OpenBSD >= 5.6 2016-11-03 22:08:06 -04:00
Matteo Cypriani bc6ec14fa8 Update COPYRIGHT.t2t URL 2016-11-03 22:00:33 -04:00
Matteo Cypriani dd8497fb53 [Listener] Radiotap: handle Extended Present Flags
Check the 31st bit of the Present Flags field, i.e. the Ext bit, set
when additional Present Flags fields follow.
2014-03-20 14:53:58 -04:00
Matteo Cypriani f35a96891f [Listener] Remove const from keep_mode_monitor()
keep_mode_monitor()'s argument was marked as const by mistake,
preventing compilation with OWLPS_LISTENER_KEEPS_MONITOR on.
2014-02-18 11:20:58 -05:00
Matteo Cypriani 307a60e6f2 [Listener] Limit the verbose level to a maximum
Same as for Aggregator, the verbose level is limited to 4.
2013-10-04 10:46:26 -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 ef2b4e9e58 [Listener] Add an assert, improve 2 comments 2013-10-02 10:51:55 -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 14e9a4122a [Listener] Improve *_addr()
Improve the code of the get_mac_addr() and get_ip_addr() functions,
their signature and documentation.
2013-07-17 18:09:12 -04:00
Matteo Cypriani a29a43a6fa [Listener] Add option -G (dump configuration)
This new option is just like Aggregator's -G option.
2013-06-12 17:18:46 -04:00
Matteo Cypriani d32813376b CMake: pass installation prefix to programs
The file libowlps/owlps-config.h.in was added to allow CMake to pass the
installation prefix variable to the programs. That allows the programs
to look for their configuration file at the right position (i.e. in the
etc/owlps directory under the installation prefix).
2013-06-12 09:38:38 -04:00
Matteo Cypriani 80fd5b287b Update and centralise copyright information 2013-05-29 13:19:06 -04:00
Matteo Cypriani dad2e543d1 CMake: handle Listener's options 2013-05-22 18:36:20 -04:00
Matteo Cypriani b1fc4a0aa2 [Listener] Always declare print_configuration()
In owlps-listener.h, print_configuration() was declared only in debug
mode, which was wrong.
2013-05-18 23:38:31 -04:00
Matteo Cypriani 559c884499 [Listener] Add display_captured_request()
Create the display_captured_request() function from read_packet() code.
2013-05-16 14:15:25 -04:00
Matteo Cypriani b3f688b2cf [Listener] Improve radiotap parsing
Get rid of the useless parsing loop; make clear we only want to extract
the signal strength and work only for that.
2013-05-16 13:52:57 -04:00
Matteo Cypriani 7a5ed8ec51 [Listener] Remove unused radiotap fields
From the radiotap header, we only use the antenna signal field,
therefore we don't need to handle the fields that are after it. We do
need to take into account the fields preceding the antenna signal field
though, in order to know where it is.
2013-05-16 11:37:18 -04:00
Matteo Cypriani 4a3e1e1091 [Listener] Improve/fix radiotap fields definitions 2013-05-16 11:09:45 -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 2b6a3a73ed [Listener] Fix compilation with confuse (-r/-R)
The handling of -r/-R was buggy with libconfuse enabled.
2013-04-29 10:51:04 -04:00
Matteo Cypriani a046dcd3fb [Listener] Fix radiotap alignment bug
The fields in the radiotap header are naturally aligned, which was not
taken into account by the parser.
2013-04-23 18:54:38 -04:00
Matteo Cypriani e7b639a020 [Listener] Minor fixes, mostly cosmetic 2013-04-23 18:54:38 -04:00
Matteo Cypriani 6ea849625c [Listener] Add -R option (read from pcap file)
The new -R option allows one to read packets from a pcap file instead of
capturing from a network interface.
2013-04-23 18:32:59 -04:00
Matteo Cypriani c95257f26a [Listener] Use pcap_next_ex instead of pcap_loop
pcap_next_ex() will allow us to detect the end of a capture file. Since
we used pcap_loop() to capture one packet at a time anyway, this won't
change anything for live captures.

The variable names were standardised in functions using pcap data types
('pkt_header' and 'pkt_data' instead of 'header' and 'packet').
2013-04-23 18:32:37 -04: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 316db76861 Makefiles: add common-rules.mk, drop openwrt files
This is the sequel of the work on the Makefiles' unification.
2012-05-24 14:19:04 +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 7c7aac31e9 Update time-related default values
Aggregation time, check intervals, etc.
By default the aggregator cannot fully aggregate calibration requests
any more, only the positioning and autocalibration requests.
In order to aggregate calibration requests, the aggregation timeout
needs to be increased, or the number of packets of the request and
the delay between each of them lowered.
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 2ed7ccd4bc [Listener] Daemon mode (-D)
Basic implementation of the daemon mode.
2012-01-11 16:50:39 +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 3fec57b1ae Move all error #defines in owlps.h 2011-08-26 11:09:41 +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 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 1d6016a3ce [lib] Move listener code to owlps-listener.h (bis)
Move the last piece of listener-specific code from owlps.h to
owlps-listener.h.
2011-08-22 22:43:35 +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 ac3c7b4352 [lib] Move listener code to owlps-listener.h
Move listener-specific code (Radiotap fields' definition, etc.) from
owlps.h to owlps-listener.h.
2011-08-03 23:13:16 +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 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 02da7c7851 [Listener] Define le*toh() for OpenBSD
OpenBSD's endian.h uses the names letoh* instead of le*toh.
2011-06-27 10:09:14 +02:00
Matteo Cypriani 306e855ad1 [Listener] Test the platform for endian.h
The <endian.h> header is Glibc-specific. On BSD platforms, one have to
use <sys/endian.h>.
(This was the occasion to improve the preprocessor code here.)
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 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 7499ef9ec5 [Listener] Refactor endianess #defines 2011-04-07 16:14:55 +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