MPDC: Multi Party Domain Cryptosystem 1.0.0.0b (A0)
MPDC Interior protocol
client.h File Reference

MPDC Client Functions. More...

#include "common.h"
#include "topology.h"

Go to the source code of this file.

Functions

bool mpdc_client_connect_callback (const mpdc_topology_node_state *rnode)
 Callback function to evaluate an incoming connection request.
 
MPDC_EXPORT_API void mpdc_client_pause_server ()
 Pause the Client server.
 
MPDC_EXPORT_API int32_t mpdc_client_start_server ()
 Start the Client server.
 
MPDC_EXPORT_API void mpdc_client_stop_server ()
 Stop the Client server.
 

Detailed Description

MPDC Client Functions.

This header defines the public interface for the MPDC client, which is responsible for handling secure communications, certificate registration, topology queries, and tunnel establishment on the client side of the Multi-Party Domain Cryptosystem (MPDC). The client module works in coordination with other network components (e.g., MAS, DLA, and Agent) to provide a secure communication channel.

Key functionalities include:

  • Connection Evaluation:
    The client provides a callback function to evaluate incoming connection requests. This function examines the remote topology node requesting the connection and determines whether the connection should be accepted.
  • Server Control Operations:
    Functions are provided to start, pause, and stop the client server. Starting the client server initializes network resources, loads certificates, sets up the user command loop, and begins listening for incoming connections. Pausing the server temporarily halts processing, while stopping the server gracefully terminates the client operation.
  • Secure Tunnel and Topology Management:
    The client module handles master fragment key (mfk) exchanges, incremental updates to the network topology, and secure tunnel establishment. These functions ensure that the client maintains an up-to-date view of the network and can securely communicate with remote nodes.
  • User Command Processing:
    A console-based command loop allows interactive configuration and operation of the client. Commands include certificate generation/import/export, connection requests, registration updates, and more.

Testing: The client module is validated through a series of network simulation tests which exercise:

  • The evaluation of incoming connection requests via the mpdc_client_connect_callback().
  • Registration with remote nodes, mfk key exchange, and topology synchronization.
  • Secure tunnel establishment including both the transmit and receive paths.
  • Proper handling of certificate expiration, error conditions, and user command processing.

These tests collectively ensure that the client correctly implements the MPDC protocol and can maintain secure and reliable communication within the network.

Function Documentation

◆ mpdc_client_connect_callback()

bool mpdc_client_connect_callback ( const mpdc_topology_node_state * rnode)

Callback function to evaluate an incoming connection request.

Use this callback to determine whether a remote node requesting connection should be accepted.

Parameters
rnode[in, const] The remote topology node requesting the connection.
Returns
Returns true if the connection is accepted; otherwise, false.

◆ mpdc_client_pause_server()

MPDC_EXPORT_API void mpdc_client_pause_server ( )

Pause the Client server.

Temporarily pause the MPDC client server, suspending network operations and the user command loop.

◆ mpdc_client_start_server()

MPDC_EXPORT_API int32_t mpdc_client_start_server ( )

Start the Client server.

Initializes and starts the MPDC client server. This function sets up the network socket, loads the local certificate, registers with the network topology, and begins the user command loop along with the secure tunnel interface.

Returns
Returns zero on success; a non-zero value indicates an initialization error.

◆ mpdc_client_stop_server()

MPDC_EXPORT_API void mpdc_client_stop_server ( )

Stop the Client server.

Terminates the MPDC client server, closing all active network connections and stopping the command loop.