MQTT C Client Libraries Internals
|
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>
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) |
Finds an eyecatcher in a binary file and returns the following value. More... | |
int | printVersionInfo (MQTTAsync_nameValue *info) |
int | loadandcall (const 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 [] |
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.
char * FindString | ( | char * | filename, |
const char * | eyecatcher_input | ||
) |
Finds an eyecatcher in a binary file and returns the following value.
filename | the name of the file |
eyecatcher_input | the eyecatcher string to look for |
|
static |