Networking code overview

From RetroShare
Jump to: navigation, search

Contents

Diagram

(Click to view full resoluton)
Pqi overview.png

The base classes used throughout Retroshare/PQI.

  • pqi.cc/h
  • pqi_base.cc/.h
  • pqi_data.h

Classes/Interfaces:

  • PQItem : Base of all the streamed classes. inherited by PQFileItem, MsgItem, ChatItem, etc.
  • Person: Generic Identity of a Peer with Network addresses etc. inherited by "cert" which is associated with a Certificate.
  • PQInterface: Basic Exchange Interface.
  • NetInterface: High Level Connection Interface.
  • BinInterface: Basic Binary Streaming Interface.
  • NetBinInterface: standard binary network interface.
  • P3Interface: High-Level Interface for Retroshare.


Interface to OpenSSL / OpenPGP Encryption and Authentication.

  • sslcert.cc/.h

Classes

  • cert: Key Class for handling your peers.
  • sslroot: Manages OpenSSL side of things, Saves/Loads/Authenticates certificates. Hashs/Signs/Verfies Data.

Streaming functionality.

  • pqipacket.cc/.h streaming functions.
  • pqistreamer.cc/.h Implements a PQInterface, transforming the PQItem classes into binary Data Packets, and passing them into a BinInterface.
  • pqitunnel.cc/.h Generic packet tunnelling. This allows
  • pqitunneltst.cc/.h other services to built on top of the base system.


OpenSSL Connection to a Peer

  • pqissl.cc/.h Implements a NetBinInterface using OpenSSL/XPGP. Enables TCP connections to retroshare Peers. This class is extended for UDP connections by pqissludp.
  • pqissllistener.cc/.h Opens a OpenSSL TCP socket to receive connections.


Classes to combine the low level interfaces:

  • pqiperson.cc/.h - Combines a set of BinNetInterfaces together and associates them with a single 'Person/cert'. This allows several different methods to be used to communicate with a Peer. (one active at a time). At the moment these are: pqissl and pqissludp
  • pqihandler.cc/.h - Generic Aggregrator of PQInterfaces (your Peers) into a single P3Interface for retroshare.
  • pqipersongrp.cc/.h - Provides the P3Interface for retroshare.Extends pqihandler as a TunnelServer,

this allows extra services to be added. Uses pqipersons to communicate with Peers.

Services Added: Discovery / Proxies / Channels. pqiperson Connect Methods: pqissl / pqissludp


UDP OpenSSL and Proxy Connection System.

A combination of Proxy Tunnel Service to initiate connections,and a OpenSSL UDP system (uses TCP-On-UDP library). This is designed to enable firewalled peers to connect directly to each other. Requires a third peer to proxy the connections.

This system needs more testing.

  • pqissludp.cc/.h
  • pqistunner.cc/.h
  • pqiproxy.cc/.h
  • pqiudpproxy.cc/.h
  • pqitunnelproxy.cc/.h
  • pqitunnelproxyudp.cc/.h


Neighbour Discovery Service

Used to exchange the certificates and addresses of the friends of your friends. Collates information to determine the best address to connect to. Similistic Algorithm -> could be improved.

  • discItem.cc/.h
  • p3disc.cc/.h

Channel Service

Exciting Planned 'channel distribution system'. Basic functionality is complete but still lots of work to finish it off.

  • pqichannel.cc/.h
  • p3channel.cc.h


Loopback Interfaces.

  • pqiloopback.cc/.h : Loopback PQInterface used for local searches etc.
  • p3loopback.cc/.h : Loopback p3Interface used for testing.


Utility Functions

  • pqinetwork.cc/.h Generic Networking functions. (Platform independent)
  • pqiarchive.cc/.h Save a set of PQItem * with timestamps/cert ids.
  • pqibin.cc/.h BinInterface for Files or Mem. (used with pqiarchive)
  • pqidebug.cc/.h Generic debug output routines. (pqioutput).
  • pqiindic.h Utility
  • pqisecurity.cc/.h Security fns (not used)


SuperNode

special version of retroshare that accepts connections from everyone - to allow increased retroshare connectivity. No Longer used.

  • pqisupernode.cc/.h
  • p3supernode.cc
Personal tools
Namespaces

Variants
Actions
Navigation
External websites
Wiki
Toolbox