Commit Graph

142 Commits

Author SHA1 Message Date
Matteo Cypriani bce8896b4b Add explicit padding for all the structs
Indicate padding bytes explicitly in all the structures. Some of the
structures could have their size reduced by reordering their fields by
size (especially in owlps.h).
2016-11-23 17:02:21 -05:00
Matteo Cypriani c6e39f7e70 [libowlps] Use labs() for int_fast32_t
int_fast32_t is at least 32-bit wide, like long. Hence, labs() should be
used instead of abs().
2016-11-03 22:08:06 -04:00
Matteo Cypriani 759db45a50 A few old cosmetic changes 2016-11-03 22:00:33 -04:00
Matteo Cypriani bc6ec14fa8 Update COPYRIGHT.t2t URL 2016-11-03 22:00:33 -04:00
Matteo Cypriani c567592167 [lib] owl_close_fd(): handle negative fd 2014-10-31 12:59:39 -04:00
Matteo Cypriani c09ed87f94 [lib] captured_request's alignment in comment
Add position and size of alignment bytes in the _owl_captured_request
structure (in comments).
2014-05-05 12:54:41 -04:00
Matteo Cypriani 4d78da4721 Doc and comments: some typos & small additions 2014-02-18 10:22:35 -05:00
Matteo Cypriani d995cdfc7d [lib] Add macro OWL_IS_REQUEST_TYPE()
This macro allows to check if a given number is a valid request type.
2013-09-25 15:05:02 -04:00
Matteo Cypriani 49066f451b [lib] getaddrinfo() in create_udp_listening_socket() 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 efaf4da6ed [doc] Somewhat improve Doxygen-generated man pages
Fix some problems in the Doxygen-generated man pages (C libraries), the
more noticeable being removing the full path of the files from the
header and synopsis.
2013-09-23 16:10:53 -04:00
Matteo Cypriani 763b36807e Increment lib and lib-client version numbers
libowlps and libowlps-client were changed in this development branch so
we increase the version number.
2013-07-17 18:09:14 -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 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 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 3aa5ae7513 Use Doxygen on lib*
Doxygen comments are now used in libowlps, libowlps-client and
libowlps-resultreader. doc/Doxyfile was added as well as CMake rules to
generate man pages for the libraries' header files.
2013-06-12 09:38:37 -04:00
Matteo Cypriani 410038f38c [lib] Remove unused owl_timestamp_is_null() 2013-06-04 11:07:54 -04:00
Matteo Cypriani abce1f985e [lib] Rework owl_frequency_to_channel() 2013-06-04 11:07:54 -04:00
Matteo Cypriani 80fd5b287b Update and centralise copyright information 2013-05-29 13:19:06 -04:00
Matteo Cypriani 1cb5742ef9 CMake: rework compilation/link flags
- Default compiler and linker flags were added silently. They are now
  set in the cache if no previous values are present.
- Debug flags and regular flags have been merged.
- Position-independent code (doesn't appear in the cache because CMake
  lacks variables like CMAKE_EXE_COMPILE_FLAGS):
  - Shared libraries are compiled with -fPIC.
  - Executables and static libraries are compiled with -fPIE.
  - Executables are linked with -pie -fPIE.
2013-05-22 18:36:21 -04:00
Matteo Cypriani 51cb1ab08a CMake: link libraries to libc and other
Link the libraries to libc explicitely.
Link libowlps to librt on GNU platforms.
2013-05-22 18:36:21 -04:00
Matteo Cypriani c41f6d9547 CMake: add installation targets 2013-05-22 18:36:21 -04:00
Matteo Cypriani 9908ecf905 CMake: handle libraries' sonames
libowlps-client and libowlps-resultreader were never built as shared
libraries, therefore we set their version number to 1.0.

For stable releases, the rule is to increase the minor version number
when changes are made to the library without changing the API, and to
bump the major version number (soname) in case of API change.

In the development branch and for development point releases, the soname
should not be increased, even in case of API break. The minor version
number should be bumped instead.

Following this rule, libowlps' version number is bumped to 3.1, as some
changes were made since version 3.0.
2013-05-22 18:36:20 -04:00
Matteo Cypriani 4467fcd52c Initial CMake setup 2013-05-21 14:23:36 -04:00
Matteo Cypriani 005e5da12e Delete Makefiles 2013-05-20 17:08:33 -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 8df82b9c41 Fix typo "endianness" 2012-11-06 01:22:16 +01:00
Matteo Cypriani cadb64e4c6 [lib] Fix a typo in owlps.h 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 e278aab032 [lib] Force 9 digits to display nanoseconds
In owl_timestamp_to_string(), the conversion of the nanosecond value is
forced to be on 9 digits.
2012-07-13 16:35:00 +02:00
Matteo Cypriani b594505ea7 [lib] Optimise owl_mac_equals()
MAC addresses are more likely to vary in the right octets than in the
left octets, so we compare them starting from the end rather than from
the beginning.
2012-05-25 12:23:06 +02: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 9ec71b800e [lib*] Merge Makefile and Makefile_atheros_openwrt
In libowlps and libowlps-client (libowlps-resultreader does not have an
Atheros Makefile).
2012-05-09 17:38:37 +02:00
Matteo Cypriani 92485f3f67 Add common.mk
Adapt all the Makefiles to use it.
Rename all the Makefile_atheros_openwrt-10.03 to
Makefile_atheros_openwrt.
2012-05-09 15:55:17 +02:00
Matteo Cypriani dc0e56c0ec [lib] Bump so version to 3.0 2012-05-02 17:32:00 +02:00
Matteo Cypriani 9f8c85d9c7 [lib] timestamp_now(): gettimeofday() if needed
Use gettimeofday() when clock_gettime() is not available.
2012-05-02 17:31:59 +02: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 5939bdbd04 [lib] Add nb_packet & packet_id to the structures 2012-02-08 10:52:38 +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 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 a81b539a05 Remove Makefiles for OpenWrt 8.09 2012-01-11 16:50:39 +01:00
Matteo Cypriani 58e86c304a [lib] Bump so version to 2.0 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 93f316d2c6 [lib] Fix time_elapsed()
The previous implementation was very naive and incorrect.
2012-01-11 16:48:59 +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