Commit Graph

90 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 dce4416bc6 Fix missing/wrong includes for BSD
Fix a few missing includes that prevented building on BSD systems.

* Client: the proper way to get MAXHOSTNAMELEN is from <sys/param.h>,
  not from <rpc/types.h>.

* Positioner/Direction: std::hash is declared in <functional>.

* Positioner/OutputNetworkSocket: get struct sockaddr from
  <sys/socket.h>, not from <netinet/in.h>.
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 d5755a3df6 [Client] Display sleeping time only in verbose
Display sleeping and transmission times only in verbose mode.
2014-03-24 07:53:17 -04:00
Matteo Cypriani 6c8d97ace3 [Client] With -N, print nb of remaining trx
When the -N option is used, the number of remaining request
transmissions is printed after each transmission.
2014-03-24 07:50:11 -04:00
Matteo Cypriani f7194dce71 [Client] parse_command_line(): move arg_ulong
Move arg_ulong's declaration to avoid a warning when
OWLPS_CLIENT_RECEIVES_POSITION is off.
2014-02-18 11:30:31 -05: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 ed690ad196 [Client] Test numbers from the command line
Check the return value of most calls to strto*().
Force base 10 when reading integers from the command line.
2013-09-27 15:22:36 -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 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 e58d158286 [Client] Change -F option's behaviour
In flood mode, the delay is now counted from the beginning of the
transmission of a request, instead of after the end of the transmission.
The old behaviour is still supported by adding a '+' before the delay
duration on the command line.
2013-09-23 16:10:54 -04:00
Matteo Cypriani 9ca63f0858 [Client] Print config on stdout (not stderr) 2013-09-23 16:10:53 -04:00
Matteo Cypriani 82154b9a46 Cosmetic changes in C modules 2013-09-23 16:10:53 -04:00
Matteo Cypriani bd94f128b3 [Client] check_configuration(): add missing options 2013-09-23 16:10:53 -04:00
Matteo Cypriani e114a6997a [lib-client] Add "verbose" parameters
owl_send_request() and owl_send_packet() get a boolean "verbose"
parameter that allow to enable or disable message display on run-time
and allow to get rid of the OWLPS_DEBUG compile-time option.
2013-06-12 09:38:38 -04:00
Matteo Cypriani b859734d23 [Client] Add verbose and quiet options (-v / -q) 2013-06-12 09:38:38 -04:00
Matteo Cypriani f82cd82d43 Update copyright information in *.h.in
The CMake templates were forgotten when the centralisation of copyright
information was done. Fixed!
2013-05-29 15:35:07 -04:00
Matteo Cypriani 80fd5b287b Update and centralise copyright information 2013-05-29 13:19:06 -04:00
Matteo Cypriani 9aa9099e6a DEBUG compile-time option -> OWLPS_DEBUG
The former DEBUG compilation-time option was renamed OWLPS_DEBUG to be
consistent with the other options.
2013-05-23 12:24:11 -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 c41f6d9547 CMake: add installation targets 2013-05-22 18:36:21 -04:00
Matteo Cypriani 4264210dcc CMake: add static targets
The pseudo-targets "semistatic" and "static" were added to build
everything in semistatic or static mode.
2013-05-22 18:36:20 -04:00
Matteo Cypriani 688580c7d2 CMake: don't compile semistatic by default
Exclude semistatic targets from the 'all' target.
2013-05-22 18:36:20 -04:00
Matteo Cypriani 93adfdc55c CMake: handle Client's options 2013-05-21 14:23:36 -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 64c2ac9a58 Makefiles: move OS detection in common.mk
This fixes compilation on BSD.
2013-04-30 16:50:14 -04:00
Matteo Cypriani 8df82b9c41 Fix typo "endianness" 2012-11-06 01:22:16 +01:00
Matteo Cypriani d1c64212d8 Test malloc/realloc return values 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 5d94fe8cc4 [Client] Add option -N (number of requests)
New option to use in conjunction with -F, in order to stop after a given
number of requests.
2012-08-29 12:20:34 +02:00
Matteo Cypriani 60e32ac500 [Client] Minor cosmetic fixes 2012-08-29 12:17:26 +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 bb45348f05 [Client] Fix printf conversion for MAX_PKT_SIZE 2012-05-23 18:46:55 +02:00
Matteo Cypriani 412b77d37f [Client] Refactor make_packet() 2012-05-10 11:38:21 +02:00
Matteo Cypriani 775687a1dc [Client] Add option -s (packet size) 2012-05-10 11:38:21 +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 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 8e7aac1e6e [Client] make_packet(): include the packet number
The prepared packet now includes the number of packets of the request
and the current packet ID. The packet ID is initialised to 1 for the
first packet.
2012-02-08 10:52:38 +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 2c1697b78a Enable compilation on GNU/kFreeBSD 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 08a8626354 Makefiles: improve static compilation
Add a static target for Listener, Aggregator and Positioning.
Strip the static and semistatic targets.
2012-01-11 16:50:39 +01:00
Matteo Cypriani c9c82211d8 [Client] Compile-time option ENABLE_RECEIVE_POSITION
Enables or disables the -l option at compile-time.
2012-01-11 16:50:39 +01:00
Matteo Cypriani a81b539a05 Remove Makefiles for OpenWrt 8.09 2012-01-11 16:50:39 +01:00
Matteo Cypriani 327f8ae199 [Client] Daemon mode (-D) 2012-01-11 16:50:39 +01:00