Classes | Macros | Functions | Variables
test3.c File Reference
#include "MQTTClient.h"
#include <string.h>
#include <stdlib.h>
#include <sys/time.h>
#include <sys/socket.h>
#include <unistd.h>
#include <errno.h>
#include <stdarg.h>
#include <time.h>
#include <sys/timeb.h>
Include dependency graph for test3.c:

Go to the source code of this file.

Classes

struct  Clients
 
struct  MQTTClients
 
struct  Options
 

Macros

#define ARRAY_SIZE(a)   (sizeof(a) / sizeof(a[0]))
 
#define assert(a, b, c, d)   myassert(__FILE__, __LINE__, a, b, c, d)
 
#define assert1(a, b, c, d, e)   myassert(__FILE__, __LINE__, a, b, c, d, e)
 
#define LOGA_DEBUG   0
 
#define LOGA_INFO   1
 
#define mqsleep   sleep
 
#define START_TIME_TYPE   struct timeval
 

Functions

long elapsed (START_TIME_TYPE start_time)
 
void getopts (int argc, char **argv)
 
int main (int argc, char **argv)
 
void multiThread_deliveryComplete (void *context, MQTTClient_deliveryToken dt)
 
int multiThread_messageArrived (void *context, char *topicName, int topicLen, MQTTClient_message *m)
 
void multiThread_sendAndReceive (MQTTClient *c, int qos, char *test_topic)
 
int myassert (char *filename, int lineno, char *description, int value, char *format,...)
 
void MyLog (int LOGA_level, char *format,...)
 
static unsigned int onPSKAuth (const char *hint, char *identity, unsigned int max_identity_len, unsigned char *psk, unsigned int max_psk_len, void *context)
 
void singleThread_sendAndReceive (MQTTClient *c, int qos, char *test_topic)
 
START_TIME_TYPE start_clock (void)
 
int test1 (struct Options options)
 
int test2a_m (struct Options options)
 
int test2a_s (struct Options options)
 
int test2b (struct Options options)
 
int test2c (struct Options options)
 
int test2e_s (struct Options options)
 
int test3a_m (struct Options options)
 
int test3a_s (struct Options options)
 
int test3b (struct Options options)
 
int test4_m (struct Options options)
 
int test4_s (struct Options options)
 
int test5a (struct Options options)
 
int test5b (struct Options options)
 
int test5c (struct Options options)
 
int test6 (struct Options options)
 
void usage (void)
 
void write_test_result (void)
 

Variables

char * cur_output = output
 
int failures = 0
 
START_TIME_TYPE global_start_time
 
volatile int multiThread_arrivedcount = 0
 
int multiThread_deliveryCompleted = 0
 
MQTTClient_message multiThread_pubmsg = MQTTClient_message_initializer
 
struct Options options
 
char output [3000]
 
char * persistenceStore = NULL
 
char * test_map []
 
int tests = 0
 
FILE * xml
 

Detailed Description

SSL tests for the Eclipse Paho MQTT C client

Definition in file test3.c.

Macro Definition Documentation

#define ARRAY_SIZE (   a)    (sizeof(a) / sizeof(a[0]))

Definition at line 54 of file test3.c.

#define assert (   a,
  b,
  c,
  d 
)    myassert(__FILE__, __LINE__, a, b, c, d)

Definition at line 363 of file test3.c.

#define assert1 (   a,
  b,
  c,
  d,
 
)    myassert(__FILE__, __LINE__, a, b, c, d, e)

Definition at line 364 of file test3.c.

#define LOGA_DEBUG   0

Definition at line 48 of file test3.c.

#define LOGA_INFO   1

Definition at line 49 of file test3.c.

#define mqsleep   sleep

Definition at line 324 of file test3.c.

#define START_TIME_TYPE   struct timeval

Definition at line 325 of file test3.c.

Function Documentation

long elapsed ( START_TIME_TYPE  start_time)

Definition at line 352 of file test3.c.

void getopts ( int  argc,
char **  argv 
)

Definition at line 128 of file test3.c.

int main ( int  argc,
char **  argv 
)

Definition at line 1703 of file test3.c.

void multiThread_deliveryComplete ( void *  context,
MQTTClient_deliveryToken  dt 
)

Definition at line 487 of file test3.c.

int multiThread_messageArrived ( void *  context,
char *  topicName,
int  topicLen,
MQTTClient_message m 
)

Definition at line 492 of file test3.c.

void multiThread_sendAndReceive ( MQTTClient c,
int  qos,
char *  test_topic 
)

Definition at line 509 of file test3.c.

int myassert ( char *  filename,
int  lineno,
char *  description,
int  value,
char *  format,
  ... 
)

Definition at line 389 of file test3.c.

void MyLog ( int  LOGA_level,
char *  format,
  ... 
)

Definition at line 268 of file test3.c.

static unsigned int onPSKAuth ( const char *  hint,
char *  identity,
unsigned int  max_identity_len,
unsigned char *  psk,
unsigned int  max_psk_len,
void *  context 
)
static

Definition at line 1588 of file test3.c.

void singleThread_sendAndReceive ( MQTTClient c,
int  qos,
char *  test_topic 
)

Definition at line 417 of file test3.c.

START_TIME_TYPE start_clock ( void  )

Definition at line 327 of file test3.c.

int test1 ( struct Options  options)

Definition at line 582 of file test3.c.

int test2a_m ( struct Options  options)

Definition at line 728 of file test3.c.

int test2a_s ( struct Options  options)

Definition at line 644 of file test3.c.

int test2b ( struct Options  options)

Definition at line 810 of file test3.c.

int test2c ( struct Options  options)

Definition at line 870 of file test3.c.

int test2e_s ( struct Options  options)

Definition at line 931 of file test3.c.

int test3a_m ( struct Options  options)

Definition at line 1093 of file test3.c.

int test3a_s ( struct Options  options)

Definition at line 1014 of file test3.c.

int test3b ( struct Options  options)

Definition at line 1167 of file test3.c.

int test4_m ( struct Options  options)

Definition at line 1296 of file test3.c.

int test4_s ( struct Options  options)

Definition at line 1219 of file test3.c.

int test5a ( struct Options  options)

Definition at line 1370 of file test3.c.

int test5b ( struct Options  options)

Definition at line 1449 of file test3.c.

int test5c ( struct Options  options)

Definition at line 1531 of file test3.c.

int test6 ( struct Options  options)

Definition at line 1607 of file test3.c.

void usage ( void  )

Definition at line 56 of file test3.c.

void write_test_result ( void  )

Definition at line 375 of file test3.c.

Variable Documentation

char* cur_output = output

Definition at line 372 of file test3.c.

int failures = 0

Definition at line 368 of file test3.c.

START_TIME_TYPE global_start_time

Definition at line 370 of file test3.c.

volatile int multiThread_arrivedcount = 0

Definition at line 483 of file test3.c.

int multiThread_deliveryCompleted = 0

Definition at line 484 of file test3.c.

Definition at line 485 of file test3.c.

struct Options options
Initial value:
=
{
"ssl://m2m.eclipse.org:18883",
"ssl://m2m.eclipse.org:18884",
"ssl://m2m.eclipse.org:18887",
"ssl://m2m.eclipse.org:18885",
"ssl://m2m.eclipse.org:18886",
"ssl://m2m.eclipse.org:18888",
NULL,
0,
"../../../test/ssl/client.pem",
NULL,
"../../../test/ssl/test-root-ca.crt",
NULL,
0,
0,
0,
}
char output[3000]

Definition at line 371 of file test3.c.

char* persistenceStore = NULL

Definition at line 45 of file test3.c.

char* test_map[]
Initial value:
=
{
"none",
"1",
"2a_s",
"2a_m",
"2b",
"2c",
"3a_s",
"3a_m",
"3b",
"4s",
"4m",
"5a",
"5b",
"5c",
}

Definition at line 109 of file test3.c.

int tests = 0

Definition at line 367 of file test3.c.

FILE* xml

Definition at line 369 of file test3.c.



plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 04:02:49