testUtils.h 1.46 KB
Newer Older
johan's avatar
johan committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
/**
 @file testUtils.c

 @author Johan Pascal

 @copyright Copyright (C) 2014 Belledonne Communications, Grenoble, France
 
 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
 as published by the Free Software Foundation; either version 2
 of the License, or (at your option) any later version.
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
20
 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
johan's avatar
johan committed
21 22 23 24 25
 */
#include <stdint.h>
#include "typedef.h"
#include "packetParser.h"

johan's avatar
johan committed
26 27
extern int verbose;

johan's avatar
johan committed
28 29 30 31
void printHex(char *title, uint8_t *data, uint32_t length); 
void packetDump(bzrtpPacket_t *zrtpPacket, uint8_t addRawMessage);
void dumpContext(char *title, bzrtpContext_t *zrtpContext);

johan's avatar
johan committed
32 33 34 35 36
const char *bzrtp_hash_toString(uint8_t hashAlgo);
const char *bzrtp_keyAgreement_toString(uint8_t keyAgreementAlgo);
const char *bzrtp_cipher_toString(uint8_t cipherAlgo);
const char *bzrtp_authtag_toString(uint8_t authtagAlgo);
const char *bzrtp_sas_toString(uint8_t sasAlgo);
johan's avatar
johan committed
37 38 39
#ifdef ZIDCACHE_ENABLED
int bzrtptester_sqlite3_open(const char *db_file, sqlite3 **db);
#endif /* ZIDCACHE_ENABLED */