cyassl re-port with cellular comms, PSK test

Dependencies:   VodafoneUSBModem_bleedingedge2 mbed-rtos mbed-src

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers sniffer.h Source File

sniffer.h

00001 /* sniffer.h
00002  *
00003  * Copyright (C) 2006-2012 Sawtooth Consulting Ltd.
00004  *
00005  * This file is part of CyaSSL.
00006  *
00007  * CyaSSL is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License as published by
00009  * the Free Software Foundation; either version 2 of the License, or
00010  * (at your option) any later version.
00011  *
00012  * CyaSSL is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
00020  */
00021 
00022 
00023 #ifndef CYASSL_SNIFFER_H
00024 #define CYASSL_SNIFFER_H
00025 
00026 #include <cyassl/ctaocrypt/settings.h>
00027 
00028 #ifdef _WIN32
00029     #ifdef SSL_SNIFFER_EXPORTS
00030         #define SSL_SNIFFER_API __declspec(dllexport)
00031     #else
00032         #define SSL_SNIFFER_API __declspec(dllimport)
00033     #endif
00034 #else
00035     #define SSL_SNIFFER_API
00036 #endif /* _WIN32 */
00037 
00038 
00039 #ifdef __cplusplus
00040     extern "C" {
00041 #endif
00042 
00043 
00044 CYASSL_API 
00045 SSL_SNIFFER_API int ssl_SetPrivateKey(const char* address, int port,
00046                                       const char* keyFile, int keyType,
00047                                       const char* password, char* error);
00048 
00049 CYASSL_API 
00050 SSL_SNIFFER_API int ssl_DecodePacket(const unsigned char* packet, int length,
00051                                      unsigned char* data, char* error);
00052 
00053 CYASSL_API 
00054 SSL_SNIFFER_API int ssl_Trace(const char* traceFile, char* error);
00055         
00056         
00057 CYASSL_API void ssl_InitSniffer(void);
00058         
00059 CYASSL_API void ssl_FreeSniffer(void);
00060 
00061         
00062 /* ssl_SetPrivateKey keyTypes */
00063 enum {
00064     FILETYPE_PEM = 1,
00065     FILETYPE_DER = 2,
00066 };
00067 
00068 
00069 #ifdef __cplusplus
00070     }  /* extern "C" */
00071 #endif
00072 
00073 #endif /* CyaSSL_SNIFFER_H */
00074