Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
sniffer.h
00001 /* sniffer.h 00002 * 00003 * Copyright (C) 2006-2016 wolfSSL Inc. 00004 * 00005 * This file is part of wolfSSL. 00006 * 00007 * wolfSSL 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 * wolfSSL 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA 00020 */ 00021 00022 00023 00024 #ifndef WOLFSSL_SNIFFER_H 00025 #define WOLFSSL_SNIFFER_H 00026 00027 #include <wolfssl/wolfcrypt/settings.h> 00028 00029 #ifdef _WIN32 00030 #ifdef SSL_SNIFFER_EXPORTS 00031 #define SSL_SNIFFER_API __declspec(dllexport) 00032 #else 00033 #define SSL_SNIFFER_API __declspec(dllimport) 00034 #endif 00035 #else 00036 #define SSL_SNIFFER_API 00037 #endif /* _WIN32 */ 00038 00039 00040 #ifdef __cplusplus 00041 extern "C" { 00042 #endif 00043 00044 /* @param typeK: (formerly keyType) was shadowing a global declaration in 00045 * wolfssl/wolfcrypt/asn.h line 175 00046 */ 00047 WOLFSSL_API 00048 SSL_SNIFFER_API int ssl_SetPrivateKey(const char* address, int port, 00049 const char* keyFile, int typeK, 00050 const char* password, char* error); 00051 00052 WOLFSSL_API 00053 SSL_SNIFFER_API int ssl_SetNamedPrivateKey(const char* name, 00054 const char* address, int port, 00055 const char* keyFile, int typeK, 00056 const char* password, char* error); 00057 00058 WOLFSSL_API 00059 SSL_SNIFFER_API int ssl_DecodePacket(const unsigned char* packet, int length, 00060 unsigned char** data, char* error); 00061 00062 WOLFSSL_API 00063 SSL_SNIFFER_API int ssl_FreeDecodeBuffer(unsigned char** data, char* error); 00064 00065 WOLFSSL_API 00066 SSL_SNIFFER_API int ssl_Trace(const char* traceFile, char* error); 00067 00068 WOLFSSL_API 00069 SSL_SNIFFER_API int ssl_EnableRecovery(int onOff, int maxMemory, char* error); 00070 00071 WOLFSSL_API 00072 SSL_SNIFFER_API int ssl_GetSessionStats(unsigned int* active, 00073 unsigned int* total, 00074 unsigned int* peak, 00075 unsigned int* maxSessions, 00076 unsigned int* missedData, 00077 unsigned int* reassemblyMemory, 00078 char* error); 00079 00080 WOLFSSL_API void ssl_InitSniffer(void); 00081 00082 WOLFSSL_API void ssl_FreeSniffer(void); 00083 00084 00085 /* ssl_SetPrivateKey typeKs */ 00086 enum { 00087 FILETYPE_PEM = 1, 00088 FILETYPE_DER = 2, 00089 }; 00090 00091 00092 #ifdef __cplusplus 00093 } /* extern "C" */ 00094 #endif 00095 00096 #endif /* wolfSSL_SNIFFER_H */ 00097 00098
Generated on Tue Jul 12 2022 15:55:20 by
1.7.2