Skip to content

Commit

Permalink
Updated documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Github Action <[email protected]>
  • Loading branch information
Github Action committed Mar 26, 2024
1 parent ef7feaa commit 955ea37
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion globals.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
: <a class="el" href="ubpf_8h.html#a53971fe3966198c6fec238d81d94bfe8">ubpf.h</a>
</li>
<li>external_function_dispatcher_t
: <a class="el" href="ubpf_8h.html#aedbb751597cb132ea1a0827aec4ecf2e">ubpf.h</a>
: <a class="el" href="ubpf_8h.html#aa819644ac2adf81271cf703f9eb5614b">ubpf.h</a>
</li>
<li>external_function_t
: <a class="el" href="ubpf_8h.html#a97c06ae6f43ae6e0cbca64ac1e70bc30">ubpf.h</a>
Expand Down
2 changes: 1 addition & 1 deletion globals_type.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<div class="contents">
&#160;<ul>
<li>external_function_dispatcher_t
: <a class="el" href="ubpf_8h.html#aedbb751597cb132ea1a0827aec4ecf2e">ubpf.h</a>
: <a class="el" href="ubpf_8h.html#aa819644ac2adf81271cf703f9eb5614b">ubpf.h</a>
</li>
<li>external_function_t
: <a class="el" href="ubpf_8h.html#a97c06ae6f43ae6e0cbca64ac1e70bc30">ubpf.h</a>
Expand Down
2 changes: 1 addition & 1 deletion search/all_1.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var searchData=
[
['external_5ffunction_5fdispatcher_5ft_1',['external_function_dispatcher_t',['../ubpf_8h.html#aedbb751597cb132ea1a0827aec4ecf2e',1,'ubpf.h']]],
['external_5ffunction_5fdispatcher_5ft_1',['external_function_dispatcher_t',['../ubpf_8h.html#aa819644ac2adf81271cf703f9eb5614b',1,'ubpf.h']]],
['external_5ffunction_5ft_2',['external_function_t',['../ubpf_8h.html#a97c06ae6f43ae6e0cbca64ac1e70bc30',1,'ubpf.h']]],
['external_5ffunction_5fvalidate_5ft_3',['external_function_validate_t',['../ubpf_8h.html#a28a27475942992fb5f4b7536fc757fd7',1,'ubpf.h']]]
];
2 changes: 1 addition & 1 deletion search/typedefs_0.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var searchData=
[
['external_5ffunction_5fdispatcher_5ft_49',['external_function_dispatcher_t',['../ubpf_8h.html#aedbb751597cb132ea1a0827aec4ecf2e',1,'ubpf.h']]],
['external_5ffunction_5fdispatcher_5ft_49',['external_function_dispatcher_t',['../ubpf_8h.html#aa819644ac2adf81271cf703f9eb5614b',1,'ubpf.h']]],
['external_5ffunction_5ft_50',['external_function_t',['../ubpf_8h.html#a97c06ae6f43ae6e0cbca64ac1e70bc30',1,'ubpf.h']]],
['external_5ffunction_5fvalidate_5ft_51',['external_function_validate_t',['../ubpf_8h.html#a28a27475942992fb5f4b7536fc757fd7',1,'ubpf.h']]]
];
16 changes: 8 additions & 8 deletions ubpf_8h.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@
<tr class="memitem:a97c06ae6f43ae6e0cbca64ac1e70bc30"><td class="memItemLeft" align="right" valign="top">typedef uint64_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubpf_8h.html#a97c06ae6f43ae6e0cbca64ac1e70bc30">external_function_t</a>) (uint64_t p0, uint64_t p1, uint64_t p2, uint64_t p3, uint64_t p4)</td></tr>
<tr class="memdesc:a97c06ae6f43ae6e0cbca64ac1e70bc30"><td class="mdescLeft">&#160;</td><td class="mdescRight">The type of an external function. <a href="ubpf_8h.html#a97c06ae6f43ae6e0cbca64ac1e70bc30">More...</a><br /></td></tr>
<tr class="separator:a97c06ae6f43ae6e0cbca64ac1e70bc30"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aedbb751597cb132ea1a0827aec4ecf2e"><td class="memItemLeft" align="right" valign="top">typedef uint64_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubpf_8h.html#aedbb751597cb132ea1a0827aec4ecf2e">external_function_dispatcher_t</a>) (void *cookie, unsigned int index, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t)</td></tr>
<tr class="memdesc:aedbb751597cb132ea1a0827aec4ecf2e"><td class="mdescLeft">&#160;</td><td class="mdescRight">The type of an external helper dispatcher function. <a href="ubpf_8h.html#aedbb751597cb132ea1a0827aec4ecf2e">More...</a><br /></td></tr>
<tr class="separator:aedbb751597cb132ea1a0827aec4ecf2e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa819644ac2adf81271cf703f9eb5614b"><td class="memItemLeft" align="right" valign="top">typedef uint64_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubpf_8h.html#aa819644ac2adf81271cf703f9eb5614b">external_function_dispatcher_t</a>) (uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, unsigned int index, void *cookie)</td></tr>
<tr class="memdesc:aa819644ac2adf81271cf703f9eb5614b"><td class="mdescLeft">&#160;</td><td class="mdescRight">The type of an external helper dispatcher function. <a href="ubpf_8h.html#aa819644ac2adf81271cf703f9eb5614b">More...</a><br /></td></tr>
<tr class="separator:aa819644ac2adf81271cf703f9eb5614b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a28a27475942992fb5f4b7536fc757fd7"><td class="memItemLeft" align="right" valign="top">typedef bool(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubpf_8h.html#a28a27475942992fb5f4b7536fc757fd7">external_function_validate_t</a>) (unsigned int index, void *cookie)</td></tr>
<tr class="memdesc:a28a27475942992fb5f4b7536fc757fd7"><td class="mdescLeft">&#160;</td><td class="mdescRight">The type of an external helper validation function. <a href="ubpf_8h.html#a28a27475942992fb5f4b7536fc757fd7">More...</a><br /></td></tr>
<tr class="separator:a28a27475942992fb5f4b7536fc757fd7"><td class="memSeparator" colspan="2">&#160;</td></tr>
Expand Down Expand Up @@ -133,7 +133,7 @@
<tr class="memitem:a398c1c9b6d59876005eb64bbfab7b2b4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubpf_8h.html#a398c1c9b6d59876005eb64bbfab7b2b4">ubpf_register</a> (struct ubpf_vm *vm, unsigned int index, const char *name, <a class="el" href="ubpf_8h.html#a97c06ae6f43ae6e0cbca64ac1e70bc30">external_function_t</a> fn)</td></tr>
<tr class="memdesc:a398c1c9b6d59876005eb64bbfab7b2b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Register an external function. The immediate field of a CALL instruction is an index into an array of functions registered by the user. This API associates a function with an index. <a href="ubpf_8h.html#a398c1c9b6d59876005eb64bbfab7b2b4">More...</a><br /></td></tr>
<tr class="separator:a398c1c9b6d59876005eb64bbfab7b2b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a05bd76bca3d6351db8e6da1d542b37fa"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubpf_8h.html#a05bd76bca3d6351db8e6da1d542b37fa">ubpf_register_external_dispatcher</a> (struct ubpf_vm *vm, <a class="el" href="ubpf_8h.html#aedbb751597cb132ea1a0827aec4ecf2e">external_function_dispatcher_t</a> dispatcher, <a class="el" href="ubpf_8h.html#a28a27475942992fb5f4b7536fc757fd7">external_function_validate_t</a> validater, void *cookie)</td></tr>
<tr class="memitem:a05bd76bca3d6351db8e6da1d542b37fa"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubpf_8h.html#a05bd76bca3d6351db8e6da1d542b37fa">ubpf_register_external_dispatcher</a> (struct ubpf_vm *vm, <a class="el" href="ubpf_8h.html#aa819644ac2adf81271cf703f9eb5614b">external_function_dispatcher_t</a> dispatcher, <a class="el" href="ubpf_8h.html#a28a27475942992fb5f4b7536fc757fd7">external_function_validate_t</a> validater, void *cookie)</td></tr>
<tr class="memdesc:a05bd76bca3d6351db8e6da1d542b37fa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Register a function that dispatches to external helpers The immediate field of a CALL instruction is an index of a helper function to invoke. This API sets a callback that will choose the helper function to invoke (based on the index) and then invoke it. This API also sets a callback that the validator will use to determine if a given index is a valid external function. <a href="ubpf_8h.html#a05bd76bca3d6351db8e6da1d542b37fa">More...</a><br /></td></tr>
<tr class="separator:a05bd76bca3d6351db8e6da1d542b37fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d32748c100c98d69dba8dcf0e9d4d0d"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ubpf_8h.html#a8d32748c100c98d69dba8dcf0e9d4d0d">ubpf_load</a> (struct ubpf_vm *vm, const void *code, uint32_t code_len, char **errmsg)</td></tr>
Expand Down Expand Up @@ -220,14 +220,14 @@ <h2 class="memtitle"><span class="permalink"><a href="#ab41a6986b0045cc2e5c84a75
</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="aedbb751597cb132ea1a0827aec4ecf2e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aedbb751597cb132ea1a0827aec4ecf2e">&#9670;&nbsp;</a></span>external_function_dispatcher_t</h2>
<a id="aa819644ac2adf81271cf703f9eb5614b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa819644ac2adf81271cf703f9eb5614b">&#9670;&nbsp;</a></span>external_function_dispatcher_t</h2>

<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef uint64_t(* external_function_dispatcher_t) (void *cookie, unsigned int index, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t)</td>
<td class="memname">typedef uint64_t(* external_function_dispatcher_t) (uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, unsigned int index, void *cookie)</td>
</tr>
</table>
</div><div class="memdoc">
Expand Down Expand Up @@ -758,7 +758,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#a05bd76bca3d6351db8e6da1d
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="ubpf_8h.html#aedbb751597cb132ea1a0827aec4ecf2e">external_function_dispatcher_t</a>&#160;</td>
<td class="paramtype"><a class="el" href="ubpf_8h.html#aa819644ac2adf81271cf703f9eb5614b">external_function_dispatcher_t</a>&#160;</td>
<td class="paramname"><em>dispatcher</em>, </td>
</tr>
<tr>
Expand Down
8 changes: 4 additions & 4 deletions ubpf_8h_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,15 @@
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; <span class="keywordtype">int</span></div>
<div class="line"><a name="l00132"></a><span class="lineno"><a class="line" href="ubpf_8h.html#a398c1c9b6d59876005eb64bbfab7b2b4"> 132</a></span>&#160; <a class="code" href="ubpf_8h.html#a398c1c9b6d59876005eb64bbfab7b2b4">ubpf_register</a>(<span class="keyword">struct</span> ubpf_vm* vm, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> index, <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <a class="code" href="ubpf_8h.html#a97c06ae6f43ae6e0cbca64ac1e70bc30">external_function_t</a> fn);</div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; </div>
<div class="line"><a name="l00137"></a><span class="lineno"><a class="line" href="ubpf_8h.html#aedbb751597cb132ea1a0827aec4ecf2e"> 137</a></span>&#160; <span class="keyword">typedef</span> uint64_t (*<a class="code" href="ubpf_8h.html#aedbb751597cb132ea1a0827aec4ecf2e">external_function_dispatcher_t</a>)(</div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; <span class="keywordtype">void</span>* cookie, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> index, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t);</div>
<div class="line"><a name="l00137"></a><span class="lineno"><a class="line" href="ubpf_8h.html#aa819644ac2adf81271cf703f9eb5614b"> 137</a></span>&#160; <span class="keyword">typedef</span> uint64_t (*<a class="code" href="ubpf_8h.html#aa819644ac2adf81271cf703f9eb5614b">external_function_dispatcher_t</a>)(</div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> index, <span class="keywordtype">void</span>* cookie);</div>
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; </div>
<div class="line"><a name="l00143"></a><span class="lineno"><a class="line" href="ubpf_8h.html#a28a27475942992fb5f4b7536fc757fd7"> 143</a></span>&#160; <span class="keyword">typedef</span> bool (*<a class="code" href="ubpf_8h.html#a28a27475942992fb5f4b7536fc757fd7">external_function_validate_t</a>)(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> index, <span class="keywordtype">void</span>* cookie);</div>
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; </div>
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160; <span class="keywordtype">int</span></div>
<div class="line"><a name="l00164"></a><span class="lineno"><a class="line" href="ubpf_8h.html#a05bd76bca3d6351db8e6da1d542b37fa"> 164</a></span>&#160; <a class="code" href="ubpf_8h.html#a05bd76bca3d6351db8e6da1d542b37fa">ubpf_register_external_dispatcher</a>(</div>
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; <span class="keyword">struct</span> ubpf_vm* vm,</div>
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; <a class="code" href="ubpf_8h.html#aedbb751597cb132ea1a0827aec4ecf2e">external_function_dispatcher_t</a> dispatcher,</div>
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; <a class="code" href="ubpf_8h.html#aa819644ac2adf81271cf703f9eb5614b">external_function_dispatcher_t</a> dispatcher,</div>
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; <a class="code" href="ubpf_8h.html#a28a27475942992fb5f4b7536fc757fd7">external_function_validate_t</a> validater,</div>
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; <span class="keywordtype">void</span>* cookie);</div>
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160; </div>
Expand Down Expand Up @@ -245,12 +245,12 @@
<div class="ttc" id="aubpf_8h_html_a845988047e3c2fe9713e2f8a404d0751"><div class="ttname"><a href="ubpf_8h.html#a845988047e3c2fe9713e2f8a404d0751">ubpf_create</a></div><div class="ttdeci">struct ubpf_vm * ubpf_create(void)</div><div class="ttdoc">Create a new uBPF VM.</div></div>
<div class="ttc" id="aubpf_8h_html_a8d32748c100c98d69dba8dcf0e9d4d0d"><div class="ttname"><a href="ubpf_8h.html#a8d32748c100c98d69dba8dcf0e9d4d0d">ubpf_load</a></div><div class="ttdeci">int ubpf_load(struct ubpf_vm *vm, const void *code, uint32_t code_len, char **errmsg)</div><div class="ttdoc">Load code into a VM. This must be done before calling ubpf_exec or ubpf_compile and after registering...</div></div>
<div class="ttc" id="aubpf_8h_html_a97c06ae6f43ae6e0cbca64ac1e70bc30"><div class="ttname"><a href="ubpf_8h.html#a97c06ae6f43ae6e0cbca64ac1e70bc30">external_function_t</a></div><div class="ttdeci">uint64_t(* external_function_t)(uint64_t p0, uint64_t p1, uint64_t p2, uint64_t p3, uint64_t p4)</div><div class="ttdoc">The type of an external function.</div><div class="ttdef"><b>Definition:</b> ubpf.h:104</div></div>
<div class="ttc" id="aubpf_8h_html_aa819644ac2adf81271cf703f9eb5614b"><div class="ttname"><a href="ubpf_8h.html#aa819644ac2adf81271cf703f9eb5614b">external_function_dispatcher_t</a></div><div class="ttdeci">uint64_t(* external_function_dispatcher_t)(uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, unsigned int index, void *cookie)</div><div class="ttdoc">The type of an external helper dispatcher function.</div><div class="ttdef"><b>Definition:</b> ubpf.h:137</div></div>
<div class="ttc" id="aubpf_8h_html_ab34e26c0a46366345df354ce992448c4"><div class="ttname"><a href="ubpf_8h.html#ab34e26c0a46366345df354ce992448c4">ubpf_translate</a></div><div class="ttdeci">int ubpf_translate(struct ubpf_vm *vm, uint8_t *buffer, size_t *size, char **errmsg)</div><div class="ttdoc">Translate the eBPF byte code to x64 machine code.</div></div>
<div class="ttc" id="aubpf_8h_html_ae69dfc8e94c60e15a5db25fb6316274f"><div class="ttname"><a href="ubpf_8h.html#ae69dfc8e94c60e15a5db25fb6316274f">ubpf_destroy</a></div><div class="ttdeci">void ubpf_destroy(struct ubpf_vm *vm)</div><div class="ttdoc">Free a uBPF VM.</div></div>
<div class="ttc" id="aubpf_8h_html_ae7e25aeeb15d5dc04a58f99239c4774c"><div class="ttname"><a href="ubpf_8h.html#ae7e25aeeb15d5dc04a58f99239c4774c">ubpf_set_error_print</a></div><div class="ttdeci">void ubpf_set_error_print(struct ubpf_vm *vm, int(*error_printf)(FILE *stream, const char *format,...))</div><div class="ttdoc">Set the function to be invoked if the program hits a fatal error.</div></div>
<div class="ttc" id="aubpf_8h_html_ae95b334d7eeb18072da3b9f4eeb66c25"><div class="ttname"><a href="ubpf_8h.html#ae95b334d7eeb18072da3b9f4eeb66c25">ubpf_unload_code</a></div><div class="ttdeci">void ubpf_unload_code(struct ubpf_vm *vm)</div><div class="ttdoc">Unload code from a VM.</div></div>
<div class="ttc" id="aubpf_8h_html_aeb0990b88e11d2a0ba89fbaf8086cc0f"><div class="ttname"><a href="ubpf_8h.html#aeb0990b88e11d2a0ba89fbaf8086cc0f">ubpf_set_registers</a></div><div class="ttdeci">void ubpf_set_registers(struct ubpf_vm *vm, uint64_t *regs)</div><div class="ttdoc">Override the storage location for the BPF registers in the VM.</div></div>
<div class="ttc" id="aubpf_8h_html_aedbb751597cb132ea1a0827aec4ecf2e"><div class="ttname"><a href="ubpf_8h.html#aedbb751597cb132ea1a0827aec4ecf2e">external_function_dispatcher_t</a></div><div class="ttdeci">uint64_t(* external_function_dispatcher_t)(void *cookie, unsigned int index, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t)</div><div class="ttdoc">The type of an external helper dispatcher function.</div><div class="ttdef"><b>Definition:</b> ubpf.h:137</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Expand Down

0 comments on commit 955ea37

Please sign in to comment.