Macros | Typedefs | Functions | Variables
MQTTVersion.c File Reference

MQTTVersion - display the version and build information strings for a library. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/types.h>
#include <ctype.h>
#include "MQTTAsync.h"
#include <dlfcn.h>
#include <sys/mman.h>
#include <unistd.h>
Include dependency graph for MQTTVersion.c:

Go to the source code of this file.

Macros

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

Typedefs

typedef MQTTAsync_nameValue *(* func_type) (void)
 

Functions

char * FindString (char *filename, const char *eyecatcher_input)
 
int loadandcall (const char *libname)
 
int main (int argc, char **argv)
 
void printEyecatchers (char *filename)
 
int printVersionInfo (MQTTAsync_nameValue *info)
 

Variables

static const char * eyecatchers []
 
static const char * libraries [] = {"paho-mqtt3c", "paho-mqtt3cs", "paho-mqtt3a", "paho-mqtt3as"}
 

Detailed Description

MQTTVersion - display the version and build information strings for a library.

With no arguments, we try to load and call the version string for the libraries we know about: mqttv3c, mqttv3cs, mqttv3a, mqttv3as. With an argument: 1) we try to load the named library, call getVersionInfo and display those values. 2) If that doesn't work, we look through the binary for eyecatchers, and display those. This will work if the library is not executable in the current environment.

Definition in file MQTTVersion.c.

Macro Definition Documentation

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

Definition at line 172 of file MQTTVersion.c.

Typedef Documentation

typedef MQTTAsync_nameValue*(* func_type) (void)

Definition at line 134 of file MQTTVersion.c.

Function Documentation

char * FindString ( char *  filename,
const char *  eyecatcher_input 
)

Finds an eyecatcher in a binary file and returns the following value.

Parameters
filenamethe name of the file
eyecatcher_inputthe eyecatcher string to look for
Returns
the value found - "" if not found

Definition at line 73 of file MQTTVersion.c.

int loadandcall ( const char *  libname)

Definition at line 136 of file MQTTVersion.c.

int main ( int  argc,
char **  argv 
)

Definition at line 188 of file MQTTVersion.c.

void printEyecatchers ( char *  filename)

Definition at line 175 of file MQTTVersion.c.

int printVersionInfo ( MQTTAsync_nameValue info)

Definition at line 121 of file MQTTVersion.c.

Variable Documentation

const char* eyecatchers[]
static
Initial value:
= {"MQTTAsyncV3_Version", "MQTTAsyncV3_Timestamp",
"MQTTClientV3_Version", "MQTTClientV3_Timestamp"}

Definition at line 57 of file MQTTVersion.c.

const char* libraries[] = {"paho-mqtt3c", "paho-mqtt3cs", "paho-mqtt3a", "paho-mqtt3as"}
static

Definition at line 56 of file MQTTVersion.c.



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