table_maintenance
[generic_table_API]

Routines for maintaining the contents of a table. [詳細]

関数

void * netsnmp_generic_create_table (const char *name, int flags)
 Create a structure to represent the table.
void netsnmp_generic_delete_table (void *table)
 Release the structure representing a table.
void * netsnmp_generic_create_row (void)
 Create a new row structure suitable for this style of table.
void * netsnmp_generic_clone_row (void *row)
 Create a new copy of the specified row.
int netsnmp_generic_copy_row (void *dst_row, void *src_row)
 Copy the contents of one row into another.
void netsnmp_generic_delete_row (void *row)
 Delete a row data structure.
int netsnmp_generic_add_row (void *table, void *row)
 Add a row to the table.
int netsnmp_generic_replace_row (void *table, void *old_row, void *new_row)
 Replace one row with another in the table.
void * netsnmp_generic_remove_row (void *table, void *row)
 Remove a row from the table.
void netsnmp_generic_remove_delete_row (void *table, void *row)
 Remove and delete a row from the table.

説明

Routines for maintaining the contents of a table.

This would typically be part of implementing an SNMP MIB, but could potentially also be used for a standalone table.

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.


関数

int netsnmp_generic_add_row ( void *  table,
void *  row 
)

Add a row to the table.

table_generic.c104 行で定義されています。

void* netsnmp_generic_clone_row ( void *  row  ) 

Create a new copy of the specified row.

table_generic.c82 行で定義されています。

int netsnmp_generic_copy_row ( void *  dst_row,
void *  src_row 
)

Copy the contents of one row into another.

The destination row structure should be created before this routine is called.

table_generic.c90 行で定義されています。

void* netsnmp_generic_create_row ( void   ) 

Create a new row structure suitable for this style of table.

Note that this would typically be a 'standalone' row, and would not automatically be inserted into an actual table.

table_generic.c76 行で定義されています。

void* netsnmp_generic_create_table ( const char *  name,
int  flags 
)

Create a structure to represent the table.

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.

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.

table_generic.c60 行で定義されています。

void netsnmp_generic_delete_row ( void *  row  ) 

Delete a row data structure.

The row should be removed from any relevant table(s) before this routine is called.

table_generic.c98 行で定義されています。

void netsnmp_generic_delete_table ( void *  table  ) 

Release the structure representing a table.

Any rows still contained within the table should also be removed and deleted.

table_generic.c68 行で定義されています。

void netsnmp_generic_remove_delete_row ( void *  table,
void *  row 
)

Remove and delete a row from the table.

table_generic.c127 行で定義されています。

void* netsnmp_generic_remove_row ( void *  table,
void *  row 
)

Remove a row from the table.

The data structure for the row should not be released, and would be the return value of this routine.

table_generic.c121 行で定義されています。

int netsnmp_generic_replace_row ( void *  table,
void *  old_row,
void *  new_row 
)

Replace one row with another in the table.

This will typically (but not necessarily) involve two rows sharing the same index information (e.g. to implement update/restore-style SET behaviour).

table_generic.c113 行で定義されています。


net-snmpに対してSat Sep 5 13:14:30 2009に生成されました。  doxygen 1.4.7