|
NetBurner 3.5.7
PDF Version |
Register per-row read callbacks and per-cell write callbacks for tabular MIB objects, and remove rows at runtime. More...
Typedefs | |
| typedef void | TableElementFunc(SNMP_Request &req, void *data_el, int subid) |
| Signature of a table-element read callback. | |
Functions | |
| void | AddToIndex (int asn_type, snmp_typeInteger32 val, int &len, int *oidadd) |
| Append a value to the OID index being constructed for a table row. | |
| void | AddSnmpEntry (int subid, const char *root, int add_len, int *suffix, TableElementFunc *pf, void *pData, uint32_t comm_mask) |
| Register a read entry for one column of an SNMP table row. | |
| void | AddSnmpWriteEntry (int asn_type, const char *root, int add_len, int *suffix, PutIFuncTab *pf, void *pData, uint32_t comm_mask) |
| Register a write callback for a single cell of an SNMP table. | |
| void | SnmpRemoveTableElement (const char *root, void *data_el) |
| Remove a previously registered table element from the SNMP agent. | |
Register per-row read callbacks and per-cell write callbacks for tabular MIB objects, and remove rows at runtime.
| typedef void TableElementFunc(SNMP_Request &req, void *data_el, int subid) |
#include <snmp_table.h>
Signature of a table-element read callback.
Called by the agent when an SNMP request targets an entry in a table registered with AddSnmpEntry. The callback is responsible for emitting the value for the requested sub-identifier.
| req | Current SNMP request context. |
| data_el | User pointer supplied at registration time (per-row context). |
| subid | Column sub-identifier within the table row. |
| void AddSnmpEntry | ( | int | subid, |
| const char * | root, | ||
| int | add_len, | ||
| int * | suffix, | ||
| TableElementFunc * | pf, | ||
| void * | pData, | ||
| uint32_t | comm_mask ) |
#include <snmp_table.h>
Register a read entry for one column of an SNMP table row.
| subid | Column sub-identifier within the row. |
| root | Base OID of the table (e.g. "1.3.6.1.4.1.8174.20.1"). |
| add_len | Length of the per-row index suffix. |
| suffix | Per-row index components appended after root. |
| pf | Callback invoked on GET / GETNEXT for this column. |
| pData | Per-row context pointer passed to pf. |
| comm_mask | Community mask, typically READ_COMMUNITY_MASK. |
| void AddSnmpWriteEntry | ( | int | asn_type, |
| const char * | root, | ||
| int | add_len, | ||
| int * | suffix, | ||
| PutIFuncTab * | pf, | ||
| void * | pData, | ||
| uint32_t | comm_mask ) |
#include <snmp_table.h>
Register a write callback for a single cell of an SNMP table.
Overloaded on every table write-callback signature in Read/write callback function signatures — the compiler picks the matching overload based on the signature of pf.
| asn_type | One of the ASN_type* tags for the column's value. |
| root | Base OID of the table. |
| add_len | Length of the per-row index suffix. |
| suffix | Per-row index components appended after root. |
| pf | Write callback for the column. |
| pData | Per-row context pointer passed to pf. |
| comm_mask | Community mask, typically WRITE_COMMUNITY_MASK. |
| void AddToIndex | ( | int | asn_type, |
| snmp_typeInteger32 | val, | ||
| int & | len, | ||
| int * | oidadd ) |
#include <snmp_table.h>
Append a value to the OID index being constructed for a table row.
Call from a TableElementFunc to build the row's full OID from its index components. Overloaded on every SMI type in SMI type aliases, ASN.1 tags, and SET return codes — the compiler picks the right one based on the type of val.
| asn_type | The ASN_type* tag that matches the type of val. |
| val | The index component value to append. |
| len | Running length of the OID; incremented by this call. |
| oidadd | OID buffer to append into. |
| void SnmpRemoveTableElement | ( | const char * | root, |
| void * | data_el ) |
#include <snmp_table.h>
Remove a previously registered table element from the SNMP agent.
| root | Base OID of the table. |
| data_el | The per-row context pointer used when registering with AddSnmpEntry. |