Mobile Multimedia Lab



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





This is the implementation of the P2PWNC Team Server module ("local" receipt repository). The team server is a multithreaded TCP server that waits for RCPT and UPDT messages. Also, there is the option of enabling the team server to reply to QUER messages. The functionality of the team server is similar to that of the TCA.



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 team server software.



  • team_server: Team server software

  • conf: Team server configuration file

  • data: (Empty) receipt repository files (receipts.db, receipts.fl)

  • keys: Some sample key and certificate files


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.



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 team server 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-team-server.

  • --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-ts-judge: Enable support for QUER messages. In this case, the team server will be capable of running the decision algorithm (via the librdb API).


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

  • Untar the archive (tar xvfz p2pwnc-team-server-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
| |- team_server
|
+-conf
| |-p2pwnc_team_server.conf
|
+ data
| |-receipts.db
| |-receipts.fl
|
+-keys
  |-...
  |-...

To uninstall it, type 'make uninstall'.



The team server 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 team server is <prefix>/conf/p2pwnc_tca.conf. However, you can override this setting using the -c flag when starting up the program (that is, ./team_server -c myconf.conf). A sample configuration file is shown below:

# Team Server module configuration file
public-key-path ../keys/TEAM0_PUB.key
server-port 3333
max-threads 50
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:
  • public-key-path: Path where the public key of the team server's team is located

  • server-port: The TCP port that the team server is listening for connections

  • max-threads: Size of thread pool

  • 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 team server software, you can specify the configuration file using the -c option. For a list of available options, type ./team_server --help or ./team_server -h (the available command line options are the same as the configuration options described above).

./team_server: 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 team_server 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)