Commit Graph

57 Commits

Author SHA1 Message Date
Matteo Cypriani 829982766d [lib] Rename mac_cmp() -> mac_equals() 2011-03-16 16:44:32 +01:00
Matteo Cypriani 0676462082 Makefiles: use colorgcc (only) if it exists
owlps-positioning/Makefile used to use colorgcc as the default compiler,
without testing its existence. This is fixed.
The makefiles for libowlps and infrastructure-centred modules now use
colorgcc when available.
2011-03-16 16:44:32 +01:00
Matteo Cypriani 85085a24cd [Listener] Disable raw_packet_flags printing 2011-03-16 16:44:31 +01:00
Matteo Cypriani 3f0d07a672 [Listener] Drop packets emitted by ourselves 2011-03-16 16:44:23 +01:00
Matteo Cypriani a4d001c4fb [Listener] Fix autocalibration port printing 2011-03-16 16:44:23 +01:00
Matteo Cypriani 22ee24655a [i-c] Remove ap_ip_addr from autocalibration_hello
The listener does not send its IP address explicitly in the Hello
message anymore. Instead, the aggregator now extract the source address
of the Hello packet.
2011-03-16 16:44:23 +01:00
Matteo Cypriani 2af46ea263 [Listener] Fix Hello emission
The source interface is not forced to wifi_interface anymore.
2011-03-16 16:44:22 +01:00
Matteo Cypriani e2963e676b [Listener] Get rid of the last indent tabs 2011-03-16 16:44:22 +01:00
Matteo Cypriani 5c7ad599a6 [Listener] Add option autocalibration_ip (-D)
This option allows to send the autocalibration requests to an other host
than the aggregation server (which remains the default if -D is not
used).
2011-03-16 16:44:22 +01:00
Matteo Cypriani d9b7a11d3a [Listener] Document -P in the short help 2011-03-16 16:44:22 +01:00
Matteo Cypriani 984ced2d10 [Listener] Add option display_captured (-c/-Q)
The packet captured are no longer displayed when in verbose mode.
The new option 'display_captured' (or command-line -c) activates this
behaviour. One can use -Q to deactivate.
2011-03-16 16:44:22 +01:00
Matteo Cypriani ac8438a33b [Listener] Use verbosity instead of #ifdef DEBUG
Whenever possible, test the value of GET_VERBOSE() instead of a #ifdef
DEBUG.
2011-03-16 16:44:22 +01:00
Matteo Cypriani 3979788c77 [Listener] Change autocalibration requests port
Autocalibration positioning requests were previously (and stupidly) sent
on the aggregation port. We can now chose the port for autocalibration
requests.
2011-03-16 16:44:22 +01:00
Matteo Cypriani ee89f9ea28 [Listener] Reindent macros in header 2011-03-16 16:44:22 +01:00
Matteo Cypriani 57f1331273 [Listener] Fix reading of QoS Data frames
The IEEE 802.11 header size is 2 bytes bigger when a Data frame has QoS
information.
2011-03-16 16:44:08 +01:00
Matteo Cypriani 87e364a633 [Listener] Accept all data frames
The listener dropped all non-bare Data frames. It now accepts Data
subtypes as well (QoS Data, etc.).
2011-03-16 14:52:58 +01:00
Matteo Cypriani 4a89410b49 [Listener] packet_type is now unsigned 2011-03-16 14:52:58 +01:00
Matteo Cypriani 8474fef520 [Listener] Reorganise implicit/explicit code
Reorganise read_packet() code for detection of implicit/explicit
requests. Quite buggy, it was.

Word of the day: OMG GOTOZ LOL111
2011-03-16 14:52:58 +01:00
Matteo Cypriani 2e16e62c44 [Listener] Radiotap header is little-endian!
Use le16toh() instead of ntohs() for rtap header length.
2011-03-16 14:52:58 +01:00
Matteo Cypriani 8fdfd6819e Use -Wextra instead of -W in all Makefiles
This changes nothing except readability.

Fix default build options in Makefile_atheros for Listener.
2011-03-16 14:52:58 +01:00
Matteo Cypriani 68746458f1 [i-c] Update TODOs 2011-03-16 14:52:57 +01:00
Matteo Cypriani 97a1e7c72a [i-c] Use htonl/ntohl() to exchange autocal. orders 2011-03-16 14:52:57 +01:00
Matteo Cypriani 05ceea9950 [i-c] Make more verbose autocalibration exchanges
When in debug mode, aggregator and listener both output information when
sending or receiving autocalibration hello messages or orders.
2011-03-16 14:52:57 +01:00
Matteo Cypriani 2d62705edd [Listener] Use lib-client functions to send Hellos 2011-03-16 14:52:57 +01:00
Matteo Cypriani 5fb93d9dd3 [Listener] Get MAC and IP, then launch threads
Operation order is better that way, because autocalibrate_hello() needs
to know MAC and IP addresses of the AP.
2011-03-16 14:52:57 +01:00
Matteo Cypriani 6cbbcc957b [Listener] Update configuration display
Configuration display when not using libconfuse was outdated.
2011-03-16 14:52:57 +01:00
Matteo Cypriani 737630b8c9 [Listener] Add option -V
The new option -V displays the compilation-time options. In the future,
it should display the version number.

When the user calls the program either with -h or the new option -V, we
do not try any more to open and parse the configuration file (which was
useless since -h, and now -V, exit the program).
2011-03-16 14:52:57 +01:00
Matteo Cypriani 3c0f74fcb3 [Listener] Fix strict-aliasing rule warning 2011-03-16 14:52:57 +01:00
Matteo Cypriani ed7828a339 [Listener] Fix OWLPSFLAGS in Makefiles
Makefiles declared an OWLPSFLAGS variable for compilation-time option,
but did not include it in the compilation command. This is now fixed.
2011-03-16 14:52:57 +01:00
Matteo Cypriani 10e3bb7ab0 [Listener] Fix compilation without pthreads 2011-03-16 14:52:57 +01:00
Matteo Cypriani 58568e276a [i-c] Fix Atheros Makefiles
Add Makefile_atheros for libowlps-client.
Fix Makefile_atheros for listener.
2011-03-16 14:52:57 +01:00
Matteo Cypriani f804855309 [Aggregator] Send order to APs
Add options -C and -K.

Rename default autocalibration values in aggregator and listener.
2011-03-16 14:52:56 +01:00
Matteo Cypriani eff2455897 [Listener] Send IP in Hello messages 2011-03-16 14:52:56 +01:00
Matteo Cypriani d51f136d70 [Listener] Send & receive autocalibration requests 2011-03-16 14:52:56 +01:00
Matteo Cypriani 729c20c8ff [Aggregator] Receive hello messages from listener 2011-03-16 14:52:56 +01:00
Matteo Cypriani c583e0bb54 [Listener] Prepare autocalibration
Send hello messages to the aggregator.
2011-03-16 14:52:56 +01:00
Matteo Cypriani 2150dc1cde [Listener] Use lib-client to create output socket 2011-03-16 14:52:55 +01:00
Matteo Cypriani d6a75a10fc [Listener] Use global variables for the socket
+ Do not use sub-function got-packet() anymore in function capture():
read_packet() is called directly.
2011-03-16 14:52:20 +01:00
Matteo Cypriani a0be0f5bef [Listener] Refactor configuration code 2011-03-16 14:51:17 +01:00
Matteo Cypriani 7aa0b65f72 [Listener] Add -h option 2011-03-16 14:51:17 +01:00
Matteo Cypriani 5eb11af87f [Listener] Translation of comments, 72 col. 2011-03-16 14:51:17 +01:00
Matteo Cypriani 12cf7e7cda [Listener] Use compiler option -D
Fix Makefiles to use -D to activate the use of pthreads and libconfuse.
Comment out #defines in owlps-listener.h.

Fix lib order (needed for the static target).
2011-03-16 14:51:17 +01:00
Matteo Cypriani bd789cd4a1 [Listener] Fix compilation on Atheros
Makefile_atheros:
- Add target 'static' to compile fully statically. (Note: does not
  work in the OpenWRT 8.09 cross-compilation suite, since it does not
  provide libiw.a)
- Add target 'semistatic', that compiles with static libowlps and
  dynamic libiw and libpcap.

Fix (mostly) endianess issues:
- le32toh() is defined only in glibc >= 2.9, so owlps-listener did not
  compile with older glibc or other libc (such as uClibc that we use to
  cross-compile to OpenWRT).
  We now define le32toh() manually, if needed.
- Additionally, the PLATFORM_ATHEROS define is removed. We should now
  test the value of __BYTE_ORDER if needed.
2011-03-16 14:51:16 +01:00
Matteo Cypriani b35a0e1e7c [Listener] Endianess (finish) 2011-03-16 14:51:16 +01:00
Matteo Cypriani 257837962e Makefile Atheros (listener & libowlps)
Last (uncommited) changes in the SVN repo (2/2):
- Add/modify Makefile_atheros for libowlps and owlps-listener.
2011-03-16 14:51:16 +01:00
Matteo Cypriani f8ff9f6794 [Listener] Endianess (beginning)
Last (uncommited) changes in the SVN repo (1/2):
- Endianess in owlps-listener : use of le32toh().
         /!\ *Not* sure it works ! /!\
2011-03-16 14:50:41 +01:00
Matteo Cypriani 3b6eb55e38 Nettoyage du code de listener et libowlps
listener + libowlps : nettoyage, amélioration de la qualité du code,
tests sur le type du paquet capturé.

git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@108 785a6c6c-259e-4ff1-8b91-dc31627914f0
2011-03-16 14:07:23 +01:00
Matteo Cypriani 629ed77470 [i-c] Mode passif dans aggregator et listener
Implantation (basique) du mode passif dans aggregator et listener.

git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@107 785a6c6c-259e-4ff1-8b91-dc31627914f0
2011-03-16 14:07:23 +01:00
Matteo Cypriani 24fef29457 [Listener] Add -v -q -m + other modifications
owlps-listener :
* Détail des erreurs d'ouverture / parcours du fichier de configuration.
* Ajout des option -v et -q permettant de choisir si le programme doit
  être verbeux ou silencieux.
* Modification des en-têtes de capture() et read_packet() pour utiliser
  la structure de configuration plutôt que des passages d'arguments.
  Note : peut-être serait-il bien de déplacer read_packet() dans
  capture() (à la place de got_packet) pour éviter le passage incessant
  des arguments sockfd et server.
* Ajout de l'option -m permettant de choisir le mode (actif, passif,
  mixte).
* Préparation de l'implantation du mode passif (dans read_packet).

git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@106 785a6c6c-259e-4ff1-8b91-dc31627914f0
2011-03-16 14:07:23 +01:00
Matteo Cypriani bb51f59328 [i-c] Ajouts dans les options et fichier de config
aggregator :
* Ajout de l'option getopt manquante pour le port d'envoi.
* Modification des noms des options getopt (options DB en majuscule).
* Correction et harmonisation des noms des options libconfuse et des
  #define correspondants.
* Correction et complément de l'aide.

listener :
* Ajout d'une option pour le port d'écoute (-l / listening_port).
* Passage des listes d'options en global (nécessaire pour le port
  d'écoute).
* Passage de int à long pour le type du port d'agrégation.

Fichier code/infrastructure-centred/TODO :
* Mise à jour et déplacement des lignes pertinentes dans des TODO
  spécialisés (créés pour l'occasion).

git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@99 785a6c6c-259e-4ff1-8b91-dc31627914f0
2011-03-16 14:07:22 +01:00