Mobile Multimedia Lab



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





This is the implementation of a P2PWNC protocol client. Whether or not it supports for Elliptic Curve Cryptography depends on the P2PWNC libraries (lib3p.so). The client can operate in both the centralized or the decentralized P2PWNC mode, depending on software configuration/compilation. It also supports traffic monitoring (by reading the /proc/net/dev file).



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 protocol client software.



  • client: Client software implementation

  • conf: Client configuration file

  • keys: Some sample key and certificate files

  • data: (Empty) receipt database files



This module runs on Linux. It has been tested under Linux 2.4/2.6. It depends on the P2PWNC libraries, and in particular libpwnc(protocol module, etc) and lib3p (threading, cryptography). 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 client 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-client.

  • --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-team-server-support: Enable/Disable local receipt storage and repository update functionality (default is NO). If you choose to do so, receipts will be stored in the <prefix>/data/receipts.db file.



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

  • Untar the archive (tar xvfz p2pwnc-client-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
| |- client
|
+-conf
| |-p2pwnc_client.conf
|
+ keys
| |-TEAM0_pub.key
| |-TEAM0_priv.key
| |-member00_pub.key
| |-....
|
+ data
  |-client_receipts.fl

To uninstall it, type 'make uninstall'.



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


#P2PWNC client configuration file
public-key-path ../keys/pub.key
secret-key-path ../keys/secr.key
cert-path ../keys/client.crt
server-addr 192.168.1.1
server-port 9999
ifname wlan0
tolerance 10000

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:Location of the file where the public key of the client is stored

  • secreta-key-path:Location of the file where the secret key of the client is stored

  • cert-path:Location of the client certificate file

  • server-port:The TCP port that the server (access point) is listening for client connections

  • ifname: Network interface name. If not specified, the program will try to autodetect it. If this fails too, the default "wlan0" value will be used.

  • tolerance: Maximum difference (in bytes) between the access point and the client measured traffic in an RREQ message.


To execute the client software you can specify the configuration file using the -c option. For a list of available options, type ./client --help or ./client -h. The available command line options are the same as the configuration options described above. In addition, if the client is compiled with team server support, you can specify the -u flag in order to communicate with the receipt repository and update the receipt repository. When executing the ./client command, you may get the following error:


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

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