| Current File : //usr/share/doc/net-snmp/html/group__table__maintenance.html |
<!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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>net-snmp: table_maintenance</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">net-snmp
 <span id="projectnumber">5.4.1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Generated by Doxygen 1.7.6.1 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<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><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">table_maintenance</div> </div>
<div class="ingroups"><a class="el" href="group__table__generic.html">generic_table_API</a></div></div><!--header-->
<div class="contents">
<p>Routines for maintaining the contents of a table.
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__table__maintenance.html#ga2dae0e20fa8d8352c1f065da5485155b">netsnmp_generic_create_table</a> (const char *name, int flags)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Create a structure to represent the table. <a href="#ga2dae0e20fa8d8352c1f065da5485155b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__table__maintenance.html#ga29460959abf24bf3f05c32eac1a1194e">netsnmp_generic_delete_table</a> (void *table)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Release the structure representing a table. <a href="#ga29460959abf24bf3f05c32eac1a1194e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__table__maintenance.html#ga9f5039604610308581321b215728a875">netsnmp_generic_create_row</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Create a new row structure suitable for this style of table. <a href="#ga9f5039604610308581321b215728a875"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__table__maintenance.html#ga4c6b4251a4fe479002a0ce0b04856fc6">netsnmp_generic_clone_row</a> (void *row)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Create a new copy of the specified row. <a href="#ga4c6b4251a4fe479002a0ce0b04856fc6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__table__maintenance.html#ga32262ca93137a37dd5505ab662be4e5a">netsnmp_generic_copy_row</a> (void *dst_row, void *src_row)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Copy the contents of one row into another. <a href="#ga32262ca93137a37dd5505ab662be4e5a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__table__maintenance.html#ga90f2e37b35c62064067d635d35a162d0">netsnmp_generic_delete_row</a> (void *row)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Delete a row data structure. <a href="#ga90f2e37b35c62064067d635d35a162d0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__table__maintenance.html#gabd12b099c47dc358877cb07e1c09490f">netsnmp_generic_add_row</a> (void *table, void *row)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Add a row to the table. <a href="#gabd12b099c47dc358877cb07e1c09490f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__table__maintenance.html#gabea775e88ec15582a9759d25228ddf2d">netsnmp_generic_replace_row</a> (void *table, void *old_row, void *new_row)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Replace one row with another in the table. <a href="#gabea775e88ec15582a9759d25228ddf2d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__table__maintenance.html#ga4b869d4947d72cb554c9748ae3757070">netsnmp_generic_remove_row</a> (void *table, void *row)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Remove a row from the table. <a href="#ga4b869d4947d72cb554c9748ae3757070"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__table__maintenance.html#ga57ca0a142ea72ce0f2e8cf9fdf6001f5">netsnmp_generic_remove_delete_row</a> (void *table, void *row)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Remove and delete a row from the table. <a href="#ga57ca0a142ea72ce0f2e8cf9fdf6001f5"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<p>Routines for maintaining the contents of a table. </p>
<p>This would typically be part of implementing an SNMP MIB, but could potentially also be used for a standalone table.</p>
<p>This section of the generic API is primarily relevant to table helpers where the representation of the table is constructed and maintained within the helper itself. "External" tables will typically look after such aspects directly, although this section of the abstract API framework could also help direct the design of such table-specific implementations. </p>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gabd12b099c47dc358877cb07e1c09490f"></a><!-- doxytag: member="table_generic.c::netsnmp_generic_add_row" ref="gabd12b099c47dc358877cb07e1c09490f" args="(void *table, void *row)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="group__table__maintenance.html#gabd12b099c47dc358877cb07e1c09490f">netsnmp_generic_add_row</a> </td>
<td>(</td>
<td class="paramtype">void * </td>
<td class="paramname"><em>table</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"><em>row</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Add a row to the table. </p>
<p>Definition at line <a class="el" href="table__generic_8c_source.html#l00104">104</a> of file <a class="el" href="table__generic_8c_source.html">table_generic.c</a>.</p>
</div>
</div>
<a class="anchor" id="ga4c6b4251a4fe479002a0ce0b04856fc6"></a><!-- doxytag: member="table_generic.c::netsnmp_generic_clone_row" ref="ga4c6b4251a4fe479002a0ce0b04856fc6" args="(void *row)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* <a class="el" href="group__table__maintenance.html#ga4c6b4251a4fe479002a0ce0b04856fc6">netsnmp_generic_clone_row</a> </td>
<td>(</td>
<td class="paramtype">void * </td>
<td class="paramname"><em>row</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Create a new copy of the specified row. </p>
<p>Definition at line <a class="el" href="table__generic_8c_source.html#l00082">82</a> of file <a class="el" href="table__generic_8c_source.html">table_generic.c</a>.</p>
</div>
</div>
<a class="anchor" id="ga32262ca93137a37dd5505ab662be4e5a"></a><!-- doxytag: member="table_generic.c::netsnmp_generic_copy_row" ref="ga32262ca93137a37dd5505ab662be4e5a" args="(void *dst_row, void *src_row)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="group__table__maintenance.html#ga32262ca93137a37dd5505ab662be4e5a">netsnmp_generic_copy_row</a> </td>
<td>(</td>
<td class="paramtype">void * </td>
<td class="paramname"><em>dst_row</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"><em>src_row</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Copy the contents of one row into another. </p>
<p>The destination row structure should be created before this routine is called. </p>
<p>Definition at line <a class="el" href="table__generic_8c_source.html#l00090">90</a> of file <a class="el" href="table__generic_8c_source.html">table_generic.c</a>.</p>
</div>
</div>
<a class="anchor" id="ga9f5039604610308581321b215728a875"></a><!-- doxytag: member="table_generic.c::netsnmp_generic_create_row" ref="ga9f5039604610308581321b215728a875" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* <a class="el" href="group__table__maintenance.html#ga9f5039604610308581321b215728a875">netsnmp_generic_create_row</a> </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Create a new row structure suitable for this style of table. </p>
<p>Note that this would typically be a 'standalone' row, and would not automatically be inserted into an actual table. </p>
<p>Definition at line <a class="el" href="table__generic_8c_source.html#l00076">76</a> of file <a class="el" href="table__generic_8c_source.html">table_generic.c</a>.</p>
</div>
</div>
<a class="anchor" id="ga2dae0e20fa8d8352c1f065da5485155b"></a><!-- doxytag: member="table_generic.c::netsnmp_generic_create_table" ref="ga2dae0e20fa8d8352c1f065da5485155b" args="(const char *name, int flags)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* <a class="el" href="group__table__maintenance.html#ga2dae0e20fa8d8352c1f065da5485155b">netsnmp_generic_create_table</a> </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>flags</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Create a structure to represent the table. </p>
<p>This could be as simple as the head of a linked list, or a more complex container structure. The 'name' field would typically be used to distinguish between several tables implemented using the same table helper. The 'flags' field would be used to control various (helper-specific) aspects of table behaviour.</p>
<p>The table structure returned should typically be regarded as an opaque, private structure. All operations on the content of the table should ideally use the appropriate routines from this API. </p>
<p>Definition at line <a class="el" href="table__generic_8c_source.html#l00060">60</a> of file <a class="el" href="table__generic_8c_source.html">table_generic.c</a>.</p>
</div>
</div>
<a class="anchor" id="ga90f2e37b35c62064067d635d35a162d0"></a><!-- doxytag: member="table_generic.c::netsnmp_generic_delete_row" ref="ga90f2e37b35c62064067d635d35a162d0" args="(void *row)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="group__table__maintenance.html#ga90f2e37b35c62064067d635d35a162d0">netsnmp_generic_delete_row</a> </td>
<td>(</td>
<td class="paramtype">void * </td>
<td class="paramname"><em>row</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Delete a row data structure. </p>
<p>The row should be removed from any relevant table(s) before this routine is called. </p>
<p>Definition at line <a class="el" href="table__generic_8c_source.html#l00098">98</a> of file <a class="el" href="table__generic_8c_source.html">table_generic.c</a>.</p>
</div>
</div>
<a class="anchor" id="ga29460959abf24bf3f05c32eac1a1194e"></a><!-- doxytag: member="table_generic.c::netsnmp_generic_delete_table" ref="ga29460959abf24bf3f05c32eac1a1194e" args="(void *table)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="group__table__maintenance.html#ga29460959abf24bf3f05c32eac1a1194e">netsnmp_generic_delete_table</a> </td>
<td>(</td>
<td class="paramtype">void * </td>
<td class="paramname"><em>table</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Release the structure representing a table. </p>
<p>Any rows still contained within the table should also be removed and deleted. </p>
<p>Definition at line <a class="el" href="table__generic_8c_source.html#l00068">68</a> of file <a class="el" href="table__generic_8c_source.html">table_generic.c</a>.</p>
</div>
</div>
<a class="anchor" id="ga57ca0a142ea72ce0f2e8cf9fdf6001f5"></a><!-- doxytag: member="table_generic.c::netsnmp_generic_remove_delete_row" ref="ga57ca0a142ea72ce0f2e8cf9fdf6001f5" args="(void *table, void *row)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="group__table__maintenance.html#ga57ca0a142ea72ce0f2e8cf9fdf6001f5">netsnmp_generic_remove_delete_row</a> </td>
<td>(</td>
<td class="paramtype">void * </td>
<td class="paramname"><em>table</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"><em>row</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Remove and delete a row from the table. </p>
<p>Definition at line <a class="el" href="table__generic_8c_source.html#l00127">127</a> of file <a class="el" href="table__generic_8c_source.html">table_generic.c</a>.</p>
</div>
</div>
<a class="anchor" id="ga4b869d4947d72cb554c9748ae3757070"></a><!-- doxytag: member="table_generic.c::netsnmp_generic_remove_row" ref="ga4b869d4947d72cb554c9748ae3757070" args="(void *table, void *row)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* <a class="el" href="group__table__maintenance.html#ga4b869d4947d72cb554c9748ae3757070">netsnmp_generic_remove_row</a> </td>
<td>(</td>
<td class="paramtype">void * </td>
<td class="paramname"><em>table</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"><em>row</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Remove a row from the table. </p>
<p>The data structure for the row should not be released, and would be the return value of this routine. </p>
<p>Definition at line <a class="el" href="table__generic_8c_source.html#l00121">121</a> of file <a class="el" href="table__generic_8c_source.html">table_generic.c</a>.</p>
</div>
</div>
<a class="anchor" id="gabea775e88ec15582a9759d25228ddf2d"></a><!-- doxytag: member="table_generic.c::netsnmp_generic_replace_row" ref="gabea775e88ec15582a9759d25228ddf2d" args="(void *table, void *old_row, void *new_row)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="group__table__maintenance.html#gabea775e88ec15582a9759d25228ddf2d">netsnmp_generic_replace_row</a> </td>
<td>(</td>
<td class="paramtype">void * </td>
<td class="paramname"><em>table</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"><em>old_row</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"><em>new_row</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Replace one row with another in the table. </p>
<p>This will typically (but not necessarily) involve two rows sharing the same index information (e.g. to implement update/restore-style SET behaviour). </p>
<p>Definition at line <a class="el" href="table__generic_8c_source.html#l00113">113</a> of file <a class="el" href="table__generic_8c_source.html">table_generic.c</a>.</p>
</div>
</div>
</div><!-- contents -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>
</body>
</html>