Commit Graph

152 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 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 c4cf57c903 [Listener] Test numbers from the command line
Check the return value of relevant calls to strtol().
Force base 10 when reading integers from the command line.
2013-09-27 15:22:57 -04:00
Matteo Cypriani e5883d99d5 Finish supporting getaddrinfo()
- For static buffers, use a size suited for host names and not only IP
- Change variable names.
- Adapt usage messages and documentation.
2013-09-23 17:03:51 -04:00
Matteo Cypriani 75e04cfc17 Quit handling useless network client structures
It is useless to handle a client structure on recvfrom() or accept()
when nothing is done with this information.
Changed in Aggregator, Listener, Positioner and UDP-to-HTTP.
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
2013-09-23 17:03:50 -04:00
Matteo Cypriani 82154b9a46 Cosmetic changes in C modules 2013-09-23 16:10:53 -04:00
Matteo Cypriani 46e1510536 [Listener] Improve config file-related warning
Display a warning when the configuration file cannot be read only when
the -f option was used. As stated in comment, the initial plan was to
also display the warning in verbose mode, but at this point of the
program the command-line is not parsed yet, so it's pointless to test
for it.
2013-07-17 18:09:15 -04:00
Matteo Cypriani b5915aee8d [Listener] Fix/improve help message 2013-07-17 18:09:14 -04:00
Matteo Cypriani 6c1c182039 [Listener] Adapt get_mac_addr() to build on BSD
The get_mac_addr() function was the only real blocker that prevented
building on BSD systems, as it used the Linux-specific SIOCGIFHWADDR
ioctl. When compiling for Linux, we still use this ioctl, but for the
BSD version we use sysctl().

This allows OwlPS Listener to build on BSD (tested on NetBSD, OpenBSD
and DragonFly). That doesn't mean it will actually work when trying to
capture packets though (that has to be tested on real hardware), but
that's still a progress.
2013-07-17 18:09:12 -04:00
Matteo Cypriani 7d3650fb5d [Listener] Improve BSD friendliness 2013-07-17 18:09:12 -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 69cba07122 [lib] Access Point -> Capture Point (API change)
Same work as for Aggregator and Listener to get rid of the old "AP"

API change: structures with an ap_mac_addr_bytes field are modified.
2013-07-17 18:09:12 -04:00
Matteo Cypriani 9e7b55c317 [Listener] Access Point -> Capture Point
Same work as for the Aggregator, without any user-visible change.
2013-07-17 18:09:12 -04:00
Matteo Cypriani 5b6f40f59d Improve Aggregator & Listener's exit messages 2013-06-12 18:55:46 -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 5ddca24738 Print exit message only in verbose mode
Update the exit message printing in all the modules:
- print on standard error
- print only in verbose mode
- use "exiting" instead of "end"
2013-06-12 17:18:46 -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 d32813376b CMake: pass installation prefix to programs
The file libowlps/ 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 62511dbe13 CMake: generate headers after dependencies check
The generated configuration header of OwlPS Listener is now generated
after the dependencies checking, so that if an option was disabled
because of a missing dependency it is reflected in the generated header.
2013-05-29 15:38:39 -04:00
Matteo Cypriani f82cd82d43 Update copyright information 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 1a30b90683 CMake: test for the presence of libiw 2013-05-23 12:24:10 -04:00
Matteo Cypriani c667203c45 CMake: test for the presence of libpcap 2013-05-22 18:36:21 -04:00
Matteo Cypriani 0c6af63657 CMake: test for the presence of Confuse 2013-05-22 18:36:21 -04:00
Matteo Cypriani 8e46aae55c CMake: test for the presence of POSIX threads
We chose a centralised approach, since threads are needed in several
modules: the find_package() is done only once in the rood directory.
Not sure it's the best approach though, but this test is several lines
long so doing that avoids duplication of this code.
2013-05-22 18:36:21 -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 dad2e543d1 CMake: handle Listener's options 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 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 75b6539757 [Listener] Warn if rtap SS field is absent
Display a warning if the radiotap antenna signal is absent and the
signal strength could not be extracted. Change the SS value to 127 dBm
(the maximum and improbable value) in this case.
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 64c2ac9a58 Makefiles: move OS detection in
This fixes compilation on BSD.
2013-04-30 16:50:14 -04:00
Matteo Cypriani 2e4fb5a931 [Listener] Remove errbuf comment (cf. prev. commit)
errbuf doesn't seem to begin with ": " in all cases; I fixed that in
the previous commit but forgot to remove the wrong comment.
2013-04-29 11:50:40 -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 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