Initalization and Configuration
[API]

Collaboration diagram for Initalization and Configuration:

Data Structures

struct  zrtp_config_t
 ZRTP global configuration options. More...
struct  zrtp_profile_t
 ZRTP session profile

ZRTP Sessions are configured with a profile scheme. Each profile is defined by a structure of the given type. zrtp_profile_t contains a set of preferences for crypto components and other protocol parameters. More...


Enumerations

enum  zrtp_license_mode_t { ZRTP_LICENSE_MODE_PASSIVE = 0, ZRTP_LICENSE_MODE_ACTIVE, ZRTP_LICENSE_MODE_UNLIMITED }
 Enumeration for ZRTP Licensing modes

A ZRTP endpoint that is Passive will never send a Commit message, which means that it cannot be the initiator in the ZRTP exchange. Since at least one of the two parties must be the initiator, two Passive endpoints cannot make a secure connection. However, a non-Passive ZRTP endpoint can send a Commit message, enabling it to act as the initiator in a ZRTP exchange. This allows it to make a secure connection to a Passive endpoint, or to another non-Passive endpoint. More...


Functions

void zrtp_config_defaults (zrtp_config_t *config)
 Initializes libzrtp global config.
zrtp_status_t zrtp_init (zrtp_config_t *config, zrtp_global_t **zrtp)
 Initializing libzrtp.
zrtp_status_t zrtp_down (zrtp_global_t *zrtp)
 Shutting down the library.

Enumeration Type Documentation

Enumeration for ZRTP Licensing modes

A ZRTP endpoint that is Passive will never send a Commit message, which means that it cannot be the initiator in the ZRTP exchange. Since at least one of the two parties must be the initiator, two Passive endpoints cannot make a secure connection. However, a non-Passive ZRTP endpoint can send a Commit message, enabling it to act as the initiator in a ZRTP exchange. This allows it to make a secure connection to a Passive endpoint, or to another non-Passive endpoint.

In addition, a Passive ZRTP endpoint declares that it is Passive by setting the passive flag in the Hello message, which means the other party will recognize it as Passive. This allows for a Passive mode and two forms of Active mode-- Active, or Unlimited. These three possible behaviors for a ZRTP endpoint are defined as:

  • Passive: Never send a Commit message, and thus can never be the initiator.
  • Active: Will send a Commit message, but only to non-Passive ZRTP partners.
  • Unlimited: Will send a Commit message to any ZRTP partner, Passive or non-Passive.

This can be used to provide three classes of service, which can be licensed t different price points. Passive can be used in freeware for widest possible deployment, Active can be used in discount products that can only talk to non-freeware, and Unlimited can be used in full-price products that will benefit from the network effect of widely deployed Passive freeware.

Enumerator:
ZRTP_LICENSE_MODE_PASSIVE  Never send a Commit message, and thus can never be the initiator.
ZRTP_LICENSE_MODE_ACTIVE  Will initiate ZRTP exchange, but only to non-Passive ZRTP partners.
ZRTP_LICENSE_MODE_UNLIMITED  Will send a Commit message to any ZRTP partner, Passive or non-Passive.


Function Documentation

void zrtp_config_defaults ( zrtp_config_t config  ) 

Initializes libzrtp global config.

zrtp_config_defaults() prepares all fields of zrtp_config_t for further usage in zrtp_init(). This function allocates all necessary resources and initialize zrtp_config_t::cb with default implementations.

Parameters:
config - libzrtp config for initialization.
Warning:
this function must be used before start operating with the config.

zrtp_status_t zrtp_down ( zrtp_global_t *  zrtp  ) 

Shutting down the library.

Frees all allocated structures and resources. This function must be called at the end of use to stop libzrtp correctly. zrtp_down() doesn't stop in-progress ZRTP streams. To avoid mistakes, close all sessions before library deinitialization.

Parameters:
zrtp - global ZRTP context previously allocated by zrtp_init();
Returns:
  • zrtp_status_ok if successfully shut down;
  • zrtp_status_fail if an error occurred.
See also:
zrtp_init()

zrtp_status_t zrtp_init ( zrtp_config_t config,
zrtp_global_t **  zrtp 
)

Initializing libzrtp.

This function initializes the library and all its components. zrtp_init() initialize global data for all sessions and streams. Fields of the global zrtp context are initialized automatically and shouldn't be modified. For correct memory management, global context should be released by calling zrtp_down().

Parameters:
config - libzrtp inital parameters
zrtp - out parameter, pointer to allocated zrtp global context structure;
Warning:
this function must be called before any operation with libzrtp.
Returns:
  • zrtp_status_ok in successfully initialized or one of zrtp status errors in other case.
See also:
zrtp_down()


Generated on Wed Dec 9 17:31:06 2009 for libzrtp  zfone