libZRTP error definitions
[ZRTP API REFERENCE]

Collaboration diagram for libZRTP error definitions:

Typedefs

typedef enum zrtp_protocol_error zrtp_protocol_error_t
 Define protocol error codes according to ZRTP Internet Draft sec. 6.9.

Enumerations

enum  zrtp_protocol_error {
  zrtp_error_unknown = 0, zrtp_error_timeout = 1, zrtp_error_invalid_packet = 0x10, zrtp_error_software = 0x20,
  zrtp_error_version = 0x30, zrtp_error_hello_mistmatch = 0x40, zrtp_error_hash_unsp = 0x51, zrtp_error_cipher_unsp = 0x52,
  zrtp_error_pktype_unsp = 0x53, zrtp_error_auth_unsp = 0x54, zrtp_error_sas_unsp = 0x55, zrtp_error_possible_mitm1 = 0x61,
  zrtp_error_possible_mitm2 = 0x62, zrtp_error_possible_mitm3 = 0x63, zrtp_error_auth_decrypt = 0x70, zrtp_error_nonse_reuse = 0x80,
  zrtp_error_equal_zid = 0x90, zrtp_error_service_unavail = 0xA0, zrtp_error_goclear_unsp = 0x100, zrtp_error_wrong_meshash = 0x201,
  zrtp_error_wrong_zid = 0x202, zrtp_error_wrong_meshmac = 0x203
}
 Define protocol error codes according to ZRTP Internet Draft sec. 6.9. More...
enum  zrtp_status_t {
  zrtp_status_ok = 0, zrtp_status_fail = 1, zrtp_status_bad_param = 2, zrtp_status_alloc_fail = 3,
  zrtp_status_dealloc_fail = 4, zrtp_status_init_fail = 5, zrtp_status_terminus = 6, zrtp_status_auth_fail = 7,
  zrtp_status_cipher_fail = 8, zrtp_status_algo_fail = 11, zrtp_status_no_such_op = 12, zrtp_status_no_ctx = 13,
  zrtp_status_cant_check = 14, zrtp_status_key_expired = 15, zrtp_status_buffer_size = 16, zrtp_status_drop = 17,
  zrtp_status_forward = 18, zrtp_status_changed = 19, zrtp_status_open_fail = 22, zrtp_status_close_fail = 23,
  zrtp_status_read_fail = 24, zrtp_status_write_fail = 25, zrtp_status_skip = 26, zrtp_status_old_pkt = 27,
  zrtp_status_rp_fail = 28, zrtp_status_zrtprp_fail = 29, zrtp_status_crc_fail = 30, zrtp_status_rng_fail = 31,
  zrtp_status_wrong_state = 32, zrtp_status_attack = 33
}
 libzrtp functions error codes. Note that the value of err_status_ok is equal to zero. This can simplify error checking somewhat. More...


Detailed Description

In this section the ZRTP protocol error codes and the library internal errors are defined. Protocol error codes are used in special ERROR packets and are stored in the context variable zrtp_conn_ctx::last_error when the callback function with type zrtp_event_t::ZRTP_EVENT_ERROR is called. Protocol errors are represented as 4-byte integer constants and defined in ZRTP Internet Draft sec. 6.9. Error codes of the libzrtp itself are defined by zrtp_status_t type. The majority of libzrtp functions use this type for returning their status.

Typedef Documentation

typedef enum zrtp_protocol_error zrtp_protocol_error_t

Define protocol error codes according to ZRTP Internet Draft sec. 6.9.


Enumeration Type Documentation

enum zrtp_protocol_error

Define protocol error codes according to ZRTP Internet Draft sec. 6.9.

Enumerator:
zrtp_error_unknown 
zrtp_error_timeout 
zrtp_error_invalid_packet 
zrtp_error_software  Malformed packet (CRC OK, but wrong structure)
zrtp_error_version  Critical software error: no memory, can't call some system function, etc
zrtp_error_hello_mistmatch  Error showing incompatibility of libzrtp versions
zrtp_error_hash_unsp  Hello components mismatch
zrtp_error_cipher_unsp  Hash type is not supported by the current implementation
zrtp_error_pktype_unsp  Cipher type is not supported by the current implementation
zrtp_error_auth_unsp  Public key exchange scheme isn't supported by the current implementation
zrtp_error_sas_unsp  Authentication tag length isn't supported by the current implementation
zrtp_error_possible_mitm1  Authentication scheme isn't supported by the current implementation
zrtp_error_possible_mitm2  DH Error: bad pvi or pvr ( == 1, 0, or p-1)
zrtp_error_possible_mitm3  MitM attack on "trusted MitM" scheme Generated by the client side (_mitm_mode equals RTP_MITM_MODE_CLIENT) when sending the transferred SAS from an unverified ZRTP point and other secrets don't match.
zrtp_error_auth_decrypt 
zrtp_error_nonse_reuse  Auth. Error: Bad Confirm pkt HMAC
zrtp_error_equal_zid  Nonce reuse
zrtp_error_service_unavail  This error is generated if local ZID is equal to the remote one
zrtp_error_goclear_unsp  Service unavailable
zrtp_error_wrong_meshash  "Stay secure" option is enabled but GoClear packet received
zrtp_error_wrong_zid  Message hash doesn't match with pre-received one - looks like DOS attack
zrtp_error_wrong_meshmac  ZID received in new Hello doesn't equal to ZID from the previous stream

Definition at line 29 of file zrtp_error.h.

enum zrtp_status_t

libzrtp functions error codes. Note that the value of err_status_ok is equal to zero. This can simplify error checking somewhat.

Enumerator:
zrtp_status_ok  nothing to report
zrtp_status_fail  unspecified failure
zrtp_status_bad_param  unsupported parameter
zrtp_status_alloc_fail  couldn't allocate memory
zrtp_status_dealloc_fail  couldn't deallocate properly
zrtp_status_init_fail  couldn't initialize
zrtp_status_terminus  can't process as much data as requested
zrtp_status_auth_fail  authentication failure
zrtp_status_cipher_fail  cipher failure
zrtp_status_algo_fail  algorithm failed test routine
zrtp_status_no_such_op  unsupported operation
zrtp_status_no_ctx  no appropriate context found
zrtp_status_cant_check  unable to perform desired validation
zrtp_status_key_expired  can't use key any more
zrtp_status_buffer_size  buffer too small
zrtp_status_drop  drop data
zrtp_status_forward  forward packet
zrtp_status_changed  packet changed
zrtp_status_open_fail  failed to open file/device
zrtp_status_close_fail  failed to close file/device
zrtp_status_read_fail  unable to read data from the file
zrtp_status_write_fail  unable to write to the file/stream
zrtp_status_skip  processing skipped
zrtp_status_old_pkt  srtp packet is out of sliding window
zrtp_status_rp_fail  RTP replay protection failed
zrtp_status_zrtprp_fail  RTP replay protection failed
zrtp_status_crc_fail  ZRTP packet CRC is wrong
zrtp_status_rng_fail  Can't generate random value
zrtp_status_wrong_state  Illegal operation in current state Some error in protocol packet structure or contents which can't happened accidentally
zrtp_status_attack 

Definition at line 70 of file zrtp_error.h.


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