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 <memory.h>
#include <ctype.h>
#include "MQTTAsync.h"
#include <dlfcn.h>
#include <sys/mman.h>
#include <unistd.h>
Include dependency graph for MQTTVersion.c:

Typedefs

typedef MQTTAsync_nameValue *(* func_type )(void)

Functions

char * FindString (char *filename, const char *eyecatcher_input)
 Finds an eyecatcher in a binary file and returns the following value.
int printVersionInfo (MQTTAsync_nameValue *info)
int loadandcall (char *libname)
void printEyecatchers (char *filename)
int main (int argc, char **argv)

Variables

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

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.


Function Documentation

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

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

Parameters:
filename the name of the file
eyecatcher_input the eyecatcher string to look for
Returns:
the value found - "" if not found

Variable Documentation

const char* eyecatchers[] [static]
Initial value:
 {"MQTTAsyncV3_Version", "MQTTAsyncV3_Timestamp",
                                         "MQTTClientV3_Version", "MQTTClientV3_Timestamp"}
 All Data Structures Files Functions Variables Typedefs Defines

Generated on 26 Oct 2017 for MQTT C Client Libraries Internals by  doxygen 1.6.1