Mobile Multimedia Lab



P2PWNC: Peer-to-peer Wireless Network Confederation RI - Documentation





This is the implementation of the P2PWNC Trusted Central Authority module (central receipt repository). The TCA is a multithreaded TCP server that waits for QUER or RCPT messages. Also, if the system uses *fixed* team identities (i.e. a team cannot switch identities at will and team keys are issued by the TCA, thus the TCA *knows* which are the valid teams in the P2PWNC system), it listens for messages on a System V IPC message queue. The TCA administrator can notify the TCA process that a new team has been generated via a separate process (teamgen - can be found in the p2pwnc-utils package) over the message queue.



This is free software, available under the GNU General Public Licence. For more information see COPYING.



This is version 0.0.1 of the P2PWNC TCA software.



  • tca: TCA software

  • conf: TCA configuration file

  • data: (Empty) receipt repository files (receipts.db, receipts.fl) and directory where team public keys are stored(data/teams)


This module runs on Linux. It has been tested under Linux 2.4/2.6. It depends on *all* the P2PWNC libraries, that is libpwnc, lib3p *and* librdb. Therefore, in order to build this software for your system, make sure the P2PWNC libraries are already installed. Also, you need to have support for System V IPC.



For generic configuration instructions see the INSTALL file or type ./configure --help. Next, there is a list of some configuration directives specific to the P2PWNC TCA software:


  • --prefix=<some path>: Replace <some_path> with the installation path for the software. By default, this prefix is /usr/local. However, you are encouraged to change it to a directory of your preference, such as /usr/local/p2pwnc-tca.

  • --with-p2pwnc-libs=<path_to_p2pwnc_libraries>: Supply the path where the P2PWNC libraries are installed. By default, this path is /usr/local/p2pwnc-libs. Change it to the path where these libraries are installed on your system.

  • --enable-fixed-ids: Enable it to support for *fixed* team identities.



To build the software, you can follow the steps below:

  • Untar the archive (tar xvfz p2pwnc-tca-vXXX.tar.gz)

  • cd to the source directory

  • Configure the software typing ./configure and using the above instructions

  • Type make to compile the sources



After building the software, type 'make install'. This will install the software to the <prefix> directory (as specified when configuring the package). This will create the following directory structure:


+-prefix
|
+-bin
| |- tca
|
+-conf
| |-p2pwnc_tca.conf
|
+ data
  |-receipts.db
  |-receipts.fl
  |
  +-teams

To uninstall it, type 'make uninstall'.



The TCA reads information from a configuration file (optionally, these information can be provided as command line options). The default location for the configuration file of the TCA is <prefix>/conf/p2pwnc_tca.conf. However, you can override this setting using the -c flag when starting up the program (that is, ./tca -c myconf.conf). A sample configuration file is shown below:


# TCA module configuration file server-port 3333
mq-key 321
max-threads 40
teams-dir ../data/teams
rdb-file ../data/receipts.db
rdb-free-list ../data/receipts.fl

Lines starting with a "#" are ignored. The first column represents configuration variables and the second is their value. These options are explained below:
  • server-port: The TCP port that the TCA server is listening for connections

  • mq-key: The key of the message queue used for the communication between the TCA and the "teamgen" program (see above).

  • max-threads: Size of thread pool

  • teams-dir: Directory where team public keys are stored

  • rdb-file: File where receipts are stored

  • rdb-free-list: List of free positions (positions where a receipt can be stored) in the receipts database file (rdb-file)


To execute the TCA software, you can specify the configuration file using the -c option. For a list of available options, type ./tca --help or ./tca -h (the available command line options are the same as the configuration options described above).


When executing the ./tca command, you may get the following error:

./tca: error while loading shared libraries: libssl.so.0.9.8: cannot open shared object file: No such file or directory


The solution is to set the LD_LIBRARY_PATH environment variable appropriately, since the system cannot locate the libraries against which the P2PWNC tca software has been linked. To set this variable issue the following command:

export LD_LIBRARY_PATH=/usr/local/p2pwnc/lib/:/usr/local/openssl/lib/


(these are sample paths, use the paths specific to your installation)