#include "zrtp_types.h"Go to the source code of this file.
Data Structures | |
| struct | zrtp_stringn |
| struct | zrtp_string8 |
| struct | zrtp_string16 |
| struct | zrtp_string32 |
| struct | zrtp_string64 |
| struct | zrtp_string128 |
| struct | zrtp_string1024 |
Defines | |
| #define | ZRTP_STRING8 12 |
| #define | ZRTP_STRING16 20 |
| #define | ZRTP_STRING32 36 |
| #define | ZRTP_STRING64 68 |
| #define | ZRTP_STRING128 132 |
| #define | ZRTP_STRING1024 1028 |
| #define | ZSTR_GET_VALUE(pstr) (zrtp_stringn_t*)((char*)pstr.buffer - sizeof(pstr.max_length) - sizeof(pstr.length)) |
| Casts zrtp_stringXX_t to a pointer to zrtp_stringn_t. This macro prevents static casts caused by using zstring functions. Prevents mistakes and makes zstrings safer to use. | |
| #define | ZSTR_GET_VALUEP(pstr) (zrtp_stringn_t*)((char*)pstr->buffer - sizeof(pstr->max_length) - sizeof(pstr->length)) |
| Casts zrtp_stringXX_t* to a pointer to zrtp_stringn_t. This macro prevents static casts from using zstring functions. | |
| #define | INIT_EMPTY_ZRTP_STRING(a) { 0, sizeof(a.buffer) - 1, { 0 }} |
| Macro for empty zstring initialization. | |
| #define | INIT_ZRTP_STRING(s) { sizeof(s) - 1, 0, s} |
| Macro for zstring initialization from a constant C-string usage:. | |
| #define | SET_EMPTY_ZRTP_STRING(a) { a.length = 0; a.max_length = sizeof(a.buffer) - 1; a.buffer[0] = 0; } |
| macro for zstring clearing Use this macro for initializing already created zstrings usage: | |
Typedefs | |
| typedef zrtp_stringn | zrtp_stringn_t |
| typedef zrtp_string8 | zrtp_string8_t |
| typedef zrtp_string16 | zrtp_string16_t |
| typedef zrtp_string32 | zrtp_string32_t |
| typedef zrtp_string64 | zrtp_string64_t |
| typedef zrtp_string128 | zrtp_string128_t |
| typedef zrtp_string1024 | zrtp_string1024_t |
Functions | |
| int | zrtp_zstrcmp (const zrtp_stringn_t *left, const zrtp_stringn_t *right) |
| compare two zstrings Function compares the two strings left and right. | |
| void | zrtp_zstrcpy (zrtp_stringn_t *dst, const zrtp_stringn_t *src) |
| Copy a zstring The zrtp_zstrcpy function copies the string pointed by src to the structure pointed to by dst. | |
| void | zrtp_zstrncpy (zrtp_stringn_t *dst, const zrtp_stringn_t *src, uint16_t size) |
| Copy first N bytes of zstring The zrtp_zstrncpy function copies the first N bytes from the string pointed to by src to the structure pointed by dst. | |
| void | zrtp_zstrncpyc (zrtp_stringn_t *dst, const char *src, uint16_t size) |
| Copy first N bytes of a c-string into a z-string. | |
| void | zrtp_zstrcat (zrtp_stringn_t *dst, const zrtp_stringn_t *src) |
| Concatenate two strings The zrtp_zstrcat function appends the src string to the dst string. If dst string doesn't have enough space it will be truncated. | |
| void | zrtp_init_zstring (zrtp_stringn_t *zstr, const char *str) |
| Initialize a string Initialize the source zstring (zstr) structure and copy data from C-string (str). | |
| void | zrtp_wipe_zstring (zrtp_stringn_t *zstr) |
| Clear a zstring. | |
| int | zrtp_memcmp (const void *s1, const void *s2, uint32_t n) |
| const char * | hex2str (const char *bin, int bin_size, char *buff, int buff_size) |
| Converts binary data to the hex string representation. | |
| char * | str2hex (const char *buff, int buff_size, char *bin, int bin_size) |
| Converts hex string to the binary representation. | |
| #define ZRTP_STRING1024 1028 |
Definition at line 25 of file zrtp_string.h.
| #define ZRTP_STRING128 132 |
Definition at line 24 of file zrtp_string.h.
| #define ZRTP_STRING16 20 |
Definition at line 21 of file zrtp_string.h.
| #define ZRTP_STRING32 36 |
Definition at line 22 of file zrtp_string.h.
| #define ZRTP_STRING64 68 |
Definition at line 23 of file zrtp_string.h.
| #define ZRTP_STRING8 12 |
Definition at line 20 of file zrtp_string.h.
| typedef struct zrtp_string1024 zrtp_string1024_t |
| typedef struct zrtp_string128 zrtp_string128_t |
| typedef struct zrtp_string16 zrtp_string16_t |
| typedef struct zrtp_string32 zrtp_string32_t |
| typedef struct zrtp_string64 zrtp_string64_t |
| typedef struct zrtp_string8 zrtp_string8_t |
| typedef struct zrtp_stringn zrtp_stringn_t |