1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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"/>
<title>Open SCAP Library: /home/pvrabec/project/openscap/openscap-0.5.12/src/OVAL/probes/probe-main.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File List</span></a></li>
<li><a href="globals.html"><span>Globals</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>/home/pvrabec/project/openscap/openscap-0.5.12/src/OVAL/probes/probe-main.c File Reference</h1>
<p>common probe entry point
<a href="#_details">More...</a></p>
<code>#include <stdlib.h></code><br/>
<code>#include <string.h></code><br/>
<code>#include <pthread.h></code><br/>
<code>#include <signal.h></code><br/>
<code>#include <errno.h></code><br/>
<code>#include <config.h></code><br/>
<code>#include <<a class="el" href="alloc_8h_source.html">alloc.h</a>></code><br/>
<code>#include "<a class="el" href="__probe-api_8h_source.html">_probe-api.h</a>"</code><br/>
<code>#include "probe-entcmp.h"</code><br/>
<code>#include "<a class="el" href="encache_8h_source.html">encache.h</a>"</code><br/>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structprobe__varref__ctx.html">probe_varref_ctx</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structprobe__varref__ctx__ent.html">probe_varref_ctx_ent</a></td></tr>
<tr><td colspan="2"><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8edd7d7c59831a734e11e22ca9119513"></a><!-- doxytag: member="probe-main.c::PROBE_SIGEXIT_CLEAN" ref="a8edd7d7c59831a734e11e22ca9119513" args="" -->
#define </td><td class="memItemRight" valign="bottom"><b>PROBE_SIGEXIT_CLEAN</b> 1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6adddfdf2b054198ee73dccbd4a4e350"></a><!-- doxytag: member="probe-main.c::PROBE_SIGEXIT_UNCLEAN" ref="a6adddfdf2b054198ee73dccbd4a4e350" args="" -->
#define </td><td class="memItemRight" valign="bottom"><b>PROBE_SIGEXIT_UNCLEAN</b> 2</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a315128c39815b3291c4c9ea3f7ea24c2"></a><!-- doxytag: member="probe-main.c::MAX_EVAL_DEPTH" ref="a315128c39815b3291c4c9ea3f7ea24c2" args="" -->
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="probe-main_8c.html#a315128c39815b3291c4c9ea3f7ea24c2">MAX_EVAL_DEPTH</a> 8</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">maximum recursion depth for set evaluation <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acb0616bc24b45ec1a12e7d0e6bb5eed3"></a><!-- doxytag: member="probe-main.c::probe_set_foreach" ref="acb0616bc24b45ec1a12e7d0e6bb5eed3" args="(elm_var, set_list)" -->
#define </td><td class="memItemRight" valign="bottom"><b>probe_set_foreach</b>(elm_var, set_list) SEXP_sublist_foreach (elm_var, set_list, 2, 1000)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab00d1d16725cff3a8aeeccdef0a104aa"></a><!-- doxytag: member="probe-main.c::CASE" ref="ab00d1d16725cff3a8aeeccdef0a104aa" args="(__c1, __rest)" -->
#define </td><td class="memItemRight" valign="bottom"><b>CASE</b>(__c1, __rest) case (__c1): if (strcmp (__rest, member_name + 1) == 0)</td></tr>
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8e07606b804cf83d5ea8895f96c11d79"></a><!-- doxytag: member="probe-main.c::OSCAP_GSYM" ref="a8e07606b804cf83d5ea8895f96c11d79" args="(sigexit)=0" -->
volatile int </td><td class="memItemRight" valign="bottom"><a class="el" href="probe-main_8c.html#a8e07606b804cf83d5ea8895f96c11d79">OSCAP_GSYM</a> (sigexit)=0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">signal exit flag <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a83fb794ac1a1899c6cd7412ef142b292"></a><!-- doxytag: member="probe-main.c::OSCAP_GSYM" ref="a83fb794ac1a1899c6cd7412ef142b292" args="(ctx)" -->
<a class="el" href="structSEAP__CTX.html">SEAP_CTX_t</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="probe-main_8c.html#a83fb794ac1a1899c6cd7412ef142b292">OSCAP_GSYM</a> (ctx)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">SEAP context. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aed9e8fc460057ba4b2c93d99f8feb31a"></a><!-- doxytag: member="probe-main.c::OSCAP_GSYM" ref="aed9e8fc460057ba4b2c93d99f8feb31a" args="(sd)" -->
int </td><td class="memItemRight" valign="bottom"><a class="el" href="probe-main_8c.html#aed9e8fc460057ba4b2c93d99f8feb31a">OSCAP_GSYM</a> (sd)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">SEAP descriptor. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa49f2fc37b96aedf116c172f2bdb4ba7"></a><!-- doxytag: member="probe-main.c::OSCAP_GSYM" ref="aa49f2fc37b96aedf116c172f2bdb4ba7" args="(pcache)" -->
<a class="el" href="structpcache__t.html">pcache_t</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="probe-main_8c.html#aa49f2fc37b96aedf116c172f2bdb4ba7">OSCAP_GSYM</a> (pcache)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">probe item cache <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad898a204d4cffcce67663249b0dc4352"></a><!-- doxytag: member="probe-main.c::OSCAP_GSYM" ref="ad898a204d4cffcce67663249b0dc4352" args="(probe_arg)" -->
void * </td><td class="memItemRight" valign="bottom"><a class="el" href="probe-main_8c.html#ad898a204d4cffcce67663249b0dc4352">OSCAP_GSYM</a> (probe_arg)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">pointer for probe_main, provided by probe_init <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ade28fa567e9ef41cd24b0614043da034"></a><!-- doxytag: member="probe-main.c::OSCAP_GSYM" ref="ade28fa567e9ef41cd24b0614043da034" args="(encache)" -->
<a class="el" href="structencache__t.html">encache_t</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="probe-main_8c.html#ade28fa567e9ef41cd24b0614043da034">OSCAP_GSYM</a> (encache)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">element name cache <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa9f1a390d6de3c3142ca763664d8afc6"></a><!-- doxytag: member="probe-main.c::OSCAP_GSYM" ref="aa9f1a390d6de3c3142ca763664d8afc6" args="(id_desc)" -->
struct <a class="el" href="structid__desc__t.html">id_desc_t</a> </td><td class="memItemRight" valign="bottom"><b>OSCAP_GSYM</b> (id_desc)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="probe-main_8c.html#a8f4f59ad09c12e4764975b61fbe248c8">probe_worker</a> (void *arg)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Worker thread function. <a href="#a8f4f59ad09c12e4764975b61fbe248c8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="probe-main_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Common probe entry point. <a href="#a840291bc02cba5474a4cb46a9b9566fe"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>common probe entry point </p>
<dl class="author"><dt><b>Author:</b></dt><dd>"Daniel Kopecek" <<a href="mailto:dkopecek@redhat.com">dkopecek@redhat.com</a>> </dd>
<dd>
"Tomas Heinrich" <<a href="mailto:theinric@redhat.com">theinric@redhat.com</a>> </dd></dl>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a840291bc02cba5474a4cb46a9b9566fe"></a><!-- doxytag: member="probe-main.c::main" ref="a840291bc02cba5474a4cb46a9b9566fe" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int main </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Common probe entry point. </p>
<p>This is the common main function of all probe processes that initializes all the stuff needed at probe runtime. This function also contains the main loop which listens for new request and in case the result was already evaluated (it is stored in the item cache) it replies to the request immediately. In the other case a new thread is spawned which takes care of the evaluation and reply. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 on success, error code otherwise </dd></dl>
</div>
</div>
<a class="anchor" id="a8f4f59ad09c12e4764975b61fbe248c8"></a><!-- doxytag: member="probe-main.c::probe_worker" ref="a8f4f59ad09c12e4764975b61fbe248c8" args="(void *arg)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void * probe_worker </td>
<td>(</td>
<td class="paramtype">void * </td>
<td class="paramname"> <em>arg</em></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Worker thread function. </p>
<p>This functions handles the evalution of objects and sets. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>arg</em> </td><td>SEAP message with the request which contains the object to be evaluated </td></tr>
</table>
</dd>
</dl>
</div>
</div>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated on 30 Jun 2010 for Open SCAP Library by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>
|