123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
- <meta http-equiv="X-UA-Compatible" content="IE=9"/>
- <meta name="generator" content="Doxygen 1.8.17"/>
- <meta name="viewport" content="width=device-width, initial-scale=1"/>
- <title>MQTT C Client Libraries Internals: MQTTVersion.c File Reference</title>
- <link href="tabs.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="jquery.js"></script>
- <script type="text/javascript" src="dynsections.js"></script>
- <link href="search/search.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="search/searchdata.js"></script>
- <script type="text/javascript" src="search/search.js"></script>
- <link href="doxygen.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
- <div id="titlearea">
- <table cellspacing="0" cellpadding="0">
- <tbody>
- <tr style="height: 56px;">
- <td id="projectlogo"><img alt="Logo" src="pahologo.png"/></td>
- <td id="projectalign" style="padding-left: 0.5em;">
- <div id="projectname">MQTT C Client Libraries Internals
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!-- end header part -->
- <!-- Generated by Doxygen 1.8.17 -->
- <script type="text/javascript">
- /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
- var searchBox = new SearchBox("searchBox", "search",false,'Search');
- /* @license-end */
- </script>
- <script type="text/javascript" src="menudata.js"></script>
- <script type="text/javascript" src="menu.js"></script>
- <script type="text/javascript">
- /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
- $(function() {
- initMenu('',true,false,'search.php','Search');
- $(document).ready(function() { init_search(); });
- });
- /* @license-end */</script>
- <div id="main-nav"></div>
- <!-- window showing the filter options -->
- <div id="MSearchSelectWindow"
- onmouseover="return searchBox.OnSearchSelectShow()"
- onmouseout="return searchBox.OnSearchSelectHide()"
- onkeydown="return searchBox.OnSearchSelectKey(event)">
- </div>
- <!-- iframe showing the search results (closed by default) -->
- <div id="MSearchResultsWindow">
- <iframe src="javascript:void(0)" frameborder="0"
- name="MSearchResults" id="MSearchResults">
- </iframe>
- </div>
- </div><!-- top -->
- <div class="header">
- <div class="summary">
- <a href="#define-members">Macros</a> |
- <a href="#typedef-members">Typedefs</a> |
- <a href="#func-members">Functions</a> |
- <a href="#var-members">Variables</a> </div>
- <div class="headertitle">
- <div class="title">MQTTVersion.c File Reference</div> </div>
- </div><!--header-->
- <div class="contents">
- <p>MQTTVersion - display the version and build information strings for a library.
- <a href="#details">More...</a></p>
- <div class="textblock"><code>#include <stdio.h></code><br />
- <code>#include <stdlib.h></code><br />
- <code>#include <string.h></code><br />
- <code>#include <errno.h></code><br />
- <code>#include <fcntl.h></code><br />
- <code>#include <sys/types.h></code><br />
- <code>#include <ctype.h></code><br />
- <code>#include "MQTTAsync.h"</code><br />
- <code>#include <dlfcn.h></code><br />
- <code>#include <sys/mman.h></code><br />
- <code>#include <unistd.h></code><br />
- </div><div class="textblock"><div class="dynheader">
- Include dependency graph for MQTTVersion.c:</div>
- <div class="dyncontent">
- <div class="center"><img src="MQTTVersion_8c__incl.png" border="0" usemap="#MQTTVersion_8c" alt=""/></div>
- <map name="MQTTVersion_8c" id="MQTTVersion_8c">
- <area shape="rect" title="MQTTVersion - display the version and build information strings for a library." alt="" coords="371,5,484,32"/>
- <area shape="rect" title=" " alt="" coords="5,80,65,107"/>
- <area shape="rect" title=" " alt="" coords="89,80,152,107"/>
- <area shape="rect" title=" " alt="" coords="177,80,241,107"/>
- <area shape="rect" title=" " alt="" coords="265,80,326,107"/>
- <area shape="rect" title=" " alt="" coords="351,80,408,107"/>
- <area shape="rect" title=" " alt="" coords="432,80,519,107"/>
- <area shape="rect" title=" " alt="" coords="543,80,605,107"/>
- <area shape="rect" title=" " alt="" coords="629,80,689,107"/>
- <area shape="rect" title=" " alt="" coords="713,80,805,107"/>
- <area shape="rect" title=" " alt="" coords="830,80,897,107"/>
- </map>
- </div>
- </div><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
- Macros</h2></td></tr>
- <tr class="memitem:a25f003de16c08a4888b69f619d70f427"><td class="memItemLeft" align="right" valign="top"><a id="a25f003de16c08a4888b69f619d70f427"></a>
- #define </td><td class="memItemRight" valign="bottom"><b>ARRAY_SIZE</b>(a)   (sizeof(a) / sizeof(a[0]))</td></tr>
- <tr class="separator:a25f003de16c08a4888b69f619d70f427"><td class="memSeparator" colspan="2"> </td></tr>
- </table><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
- Typedefs</h2></td></tr>
- <tr class="memitem:a03af212f14771e3a937b54f0b82b5528"><td class="memItemLeft" align="right" valign="top"><a id="a03af212f14771e3a937b54f0b82b5528"></a>
- typedef <a class="el" href="structMQTTAsync__nameValue.html">MQTTAsync_nameValue</a> *(* </td><td class="memItemRight" valign="bottom"><b>func_type</b>) (void)</td></tr>
- <tr class="separator:a03af212f14771e3a937b54f0b82b5528"><td class="memSeparator" colspan="2"> </td></tr>
- </table><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
- Functions</h2></td></tr>
- <tr class="memitem:a60231c316988ddb6d3ecf20a3195fe8d"><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="MQTTVersion_8c.html#a60231c316988ddb6d3ecf20a3195fe8d">FindString</a> (char *filename, const char *eyecatcher_input)</td></tr>
- <tr class="memdesc:a60231c316988ddb6d3ecf20a3195fe8d"><td class="mdescLeft"> </td><td class="mdescRight">Finds an eyecatcher in a binary file and returns the following value. <a href="MQTTVersion_8c.html#a60231c316988ddb6d3ecf20a3195fe8d">More...</a><br /></td></tr>
- <tr class="separator:a60231c316988ddb6d3ecf20a3195fe8d"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a7a069c25310a625d77a9ed2324e0f5ab"><td class="memItemLeft" align="right" valign="top"><a id="a7a069c25310a625d77a9ed2324e0f5ab"></a>
- int </td><td class="memItemRight" valign="bottom"><b>printVersionInfo</b> (<a class="el" href="structMQTTAsync__nameValue.html">MQTTAsync_nameValue</a> *info)</td></tr>
- <tr class="separator:a7a069c25310a625d77a9ed2324e0f5ab"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a00e897e753d83550bb5094bcb153828a"><td class="memItemLeft" align="right" valign="top"><a id="a00e897e753d83550bb5094bcb153828a"></a>
- int </td><td class="memItemRight" valign="bottom"><b>loadandcall</b> (const char *libname)</td></tr>
- <tr class="separator:a00e897e753d83550bb5094bcb153828a"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a889e1ee5b289c4b99cbd5f0ca7e8cbdb"><td class="memItemLeft" align="right" valign="top"><a id="a889e1ee5b289c4b99cbd5f0ca7e8cbdb"></a>
- void </td><td class="memItemRight" valign="bottom"><b>printEyecatchers</b> (char *filename)</td></tr>
- <tr class="separator:a889e1ee5b289c4b99cbd5f0ca7e8cbdb"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a3c04138a5bfe5d72780bb7e82a18e627"><td class="memItemLeft" align="right" valign="top"><a id="a3c04138a5bfe5d72780bb7e82a18e627"></a>
- int </td><td class="memItemRight" valign="bottom"><b>main</b> (int argc, char **argv)</td></tr>
- <tr class="separator:a3c04138a5bfe5d72780bb7e82a18e627"><td class="memSeparator" colspan="2"> </td></tr>
- </table><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
- Variables</h2></td></tr>
- <tr class="memitem:a79de8d8beaad5d50b6f3c6cff3b574f5"><td class="memItemLeft" align="right" valign="top"><a id="a79de8d8beaad5d50b6f3c6cff3b574f5"></a>
- static const char * </td><td class="memItemRight" valign="bottom"><b>libraries</b> [] = {"paho-mqtt3c", "paho-mqtt3cs", "paho-mqtt3a", "paho-mqtt3as"}</td></tr>
- <tr class="separator:a79de8d8beaad5d50b6f3c6cff3b574f5"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:affd3a14730545c8f212ab574376b0824"><td class="memItemLeft" align="right" valign="top">static const char * </td><td class="memItemRight" valign="bottom"><b>eyecatchers</b> []</td></tr>
- <tr class="separator:affd3a14730545c8f212ab574376b0824"><td class="memSeparator" colspan="2"> </td></tr>
- </table>
- <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
- <div class="textblock"><p>MQTTVersion - display the version and build information strings for a library. </p>
- <p>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. <br />
- This will work if the library is not executable in the current environment. </p>
- </div><h2 class="groupheader">Function Documentation</h2>
- <a id="a60231c316988ddb6d3ecf20a3195fe8d"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a60231c316988ddb6d3ecf20a3195fe8d">◆ </a></span>FindString()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">char * FindString </td>
- <td>(</td>
- <td class="paramtype">char * </td>
- <td class="paramname"><em>filename</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">const char * </td>
- <td class="paramname"><em>eyecatcher_input</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Finds an eyecatcher in a binary file and returns the following value. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">filename</td><td>the name of the file </td></tr>
- <tr><td class="paramname">eyecatcher_input</td><td>the eyecatcher string to look for </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>the value found - "" if not found </dd></dl>
- </div>
- </div>
- <h2 class="groupheader">Variable Documentation</h2>
- <a id="affd3a14730545c8f212ab574376b0824"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#affd3a14730545c8f212ab574376b0824">◆ </a></span>eyecatchers</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">const char* eyecatchers[]</td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">static</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <b>Initial value:</b><div class="fragment"><div class="line">= {<span class="stringliteral">"MQTTAsyncV3_Version"</span>, <span class="stringliteral">"MQTTAsyncV3_Timestamp"</span>,</div>
- <div class="line"> <span class="stringliteral">"MQTTClientV3_Version"</span>, <span class="stringliteral">"MQTTClientV3_Timestamp"</span>}</div>
- </div><!-- fragment -->
- </div>
- </div>
- </div><!-- contents -->
- <!-- start footer part -->
- <hr class="footer"/><address class="footer"><small>
- Generated on Thu Sep 29 2022 11:34:46 for MQTT C Client Libraries Internals by  <a href="http://www.doxygen.org/index.html">
- <img class="footer" src="doxygen.png" alt="doxygen"/>
- </a> 1.8.17
- </small></address>
- </body>
- </html>
|