Commit Graph

34 Commits

Author SHA1 Message Date
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
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 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 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 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