zrtp_global_ctx Struct Reference
[libzrtp types for developers]

Library global context Compilers and linkers on some operating systems don't support the declaration of global variables in c files. Storing a context allows us to solve this problem in a way that unifies component use. The context is created by calling zrtp_init(), and is destroyed with zrtp_down(). It contains data necessary for crypto-component algorithms, including hash schemes, cipher types, SAS schemes etc. Context data can be divided into three groups: More...

#include <zrtp_types.h>

Collaboration diagram for zrtp_global_ctx:

[legend]

Data Fields

uint32_t lic_mode
zrtp_string16_t client_id
uint8_t is_mitm
MD_CTX rand_ctx
uint8_t rand_initialized
zrtp_string128_t def_cache_path
zrtp_mutex_t * rng_protector
BigNum one
BigNum G
BigNum P_3072
BigNum P_3072_1
BigNum P_4096
BigNum P_4096_1
uint8_t P_3072_data [384]
uint8_t P_4096_data [512]
mlist_t _hash_head
mlist_t _cipher_head
mlist_t _atl_head
mlist_t _pktype_head
mlist_t _sas_head
zrtp_mutex_t * _comp_protector
void * srtp_global
mlist_t _sessions_head
uint32_t sessions_count
zrtp_mutex_t * _sessions_protector
zrtp_mutex_t * _cache_protector
zrtp_callback_t _cb

Detailed Description

Library global context Compilers and linkers on some operating systems don't support the declaration of global variables in c files. Storing a context allows us to solve this problem in a way that unifies component use. The context is created by calling zrtp_init(), and is destroyed with zrtp_down(). It contains data necessary for crypto-component algorithms, including hash schemes, cipher types, SAS schemes etc. Context data can be divided into three groups:

See also:
zrtp_init() zrtp_down() zrtp_init_session_ctx()

Definition at line 182 of file zrtp_types.h.


Field Documentation

uint32_t zrtp_global_ctx::lic_mode

ZRTP license mode.

Definition at line 185 of file zrtp_types.h.

zrtp_string16_t zrtp_global_ctx::client_id

Local ZRTP client ID.

Definition at line 188 of file zrtp_types.h.

uint8_t zrtp_global_ctx::is_mitm

Flags defines that the local endpoint acts as ZRTP MiTM.

Definition at line 191 of file zrtp_types.h.

MD_CTX zrtp_global_ctx::rand_ctx

Hash context for entropy accumulation for the RNG unit.

Definition at line 194 of file zrtp_types.h.

uint8_t zrtp_global_ctx::rand_initialized

RNG unit initialization flag.

Definition at line 197 of file zrtp_types.h.

zrtp_string128_t zrtp_global_ctx::def_cache_path

Definition at line 199 of file zrtp_types.h.

zrtp_mutex_t* zrtp_global_ctx::rng_protector

This object is used to protect the shared RNG hash zrtp_global_ctx::rand_ctx

Definition at line 202 of file zrtp_types.h.

struct BigNum zrtp_global_ctx::one

This section provides static data for DH3K and DH4K components

Definition at line 205 of file zrtp_types.h.

struct BigNum zrtp_global_ctx::G

Definition at line 206 of file zrtp_types.h.

struct BigNum zrtp_global_ctx::P_3072

Definition at line 207 of file zrtp_types.h.

struct BigNum zrtp_global_ctx::P_3072_1

Definition at line 208 of file zrtp_types.h.

struct BigNum zrtp_global_ctx::P_4096

Definition at line 209 of file zrtp_types.h.

struct BigNum zrtp_global_ctx::P_4096_1

Definition at line 210 of file zrtp_types.h.

uint8_t zrtp_global_ctx::P_3072_data[384]

Definition at line 211 of file zrtp_types.h.

uint8_t zrtp_global_ctx::P_4096_data[512]

Definition at line 212 of file zrtp_types.h.

mlist_t zrtp_global_ctx::_hash_head

Head of hash components list

Definition at line 215 of file zrtp_types.h.

mlist_t zrtp_global_ctx::_cipher_head

Head of ciphers list

Definition at line 218 of file zrtp_types.h.

mlist_t zrtp_global_ctx::_atl_head

Head of ATL components list

Definition at line 221 of file zrtp_types.h.

mlist_t zrtp_global_ctx::_pktype_head

Head of public key exchange schemes list

Definition at line 224 of file zrtp_types.h.

mlist_t zrtp_global_ctx::_sas_head

SAS schemes list

Definition at line 227 of file zrtp_types.h.

zrtp_mutex_t* zrtp_global_ctx::_comp_protector

This object is used to synchronize crypto-components list operations

Definition at line 234 of file zrtp_types.h.

void* zrtp_global_ctx::srtp_global

Storage for some SRTP global data

Definition at line 237 of file zrtp_types.h.

mlist_t zrtp_global_ctx::_sessions_head

Head of ZRTP sessions list

Definition at line 240 of file zrtp_types.h.

uint32_t zrtp_global_ctx::sessions_count

Global sessions count used to create ZRTP session IDs. For debug purposes mostly.

Definition at line 243 of file zrtp_types.h.

zrtp_mutex_t* zrtp_global_ctx::_sessions_protector

This object is used to synchronize sessions list operations

Definition at line 246 of file zrtp_types.h.

zrtp_mutex_t* zrtp_global_ctx::_cache_protector

Synchronization object for cache operations (reading, writing from parallel sessions).

Definition at line 249 of file zrtp_types.h.

zrtp_callback_t zrtp_global_ctx::_cb

Set of feedback callbacks used by libzrtp to interact witrh the user-space.

Definition at line 252 of file zrtp_types.h.


The documentation for this struct was generated from the following file:
This file is part of the documentation for Zfone.
Copyright ©  2006-2008 Philip R. Zimmermann. All rights reserved.
Generated on Mon November 10 2008 by doxygen 1.5.7-20060202. Written by Viktor Krikun, © 2006-2008