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>
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"} |
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.
#define ARRAY_SIZE | ( | a | ) | (sizeof(a) / sizeof(a[0])) |
Definition at line 172 of file MQTTVersion.c.
typedef MQTTAsync_nameValue*(* func_type) (void) |
Definition at line 134 of file MQTTVersion.c.
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 |
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.
|
static |
Definition at line 57 of file MQTTVersion.c.
|
static |
Definition at line 56 of file MQTTVersion.c.