|
NetBurner 3.5.7
PDF Version |
Bind one C getter/setter to one OID that ends in .0.
More...
Classes | |
| class | SNMPReadObject |
| Registers a scalar read callback with the SNMP agent. More... | |
| class | SNMPWriteObject |
| Registers a scalar write callback with the SNMP agent. More... | |
Macros | |
| #define | SNMPREADFUNC(w, x, y, z, q) static SNMPReadObject W##w(x, y, z, q); |
| Register a read callback for one SNMP scalar at file scope. | |
| #define | SNMPWRITEFUNC(w, x, y, z, q) static SNMPWriteObject R##w(x, y, z, q); |
| Register a write callback for one SNMP scalar at file scope. | |
Bind one C getter/setter to one OID that ends in .0.
Use SNMPREADFUNC for a read callback and SNMPWRITEFUNC for a write callback. The return type of the read callback (or the value parameter of the write callback) selects the ASN.1 encoding via the matching ASN_type* tag from SMI type aliases, ASN.1 tags, and SET return codes.
| #define SNMPREADFUNC | ( | w, | |
| x, | |||
| y, | |||
| z, | |||
| q ) static SNMPReadObject W##w(x, y, z, q); |
#include <snmp_table.h>
Register a read callback for one SNMP scalar at file scope.
| w | Base identifier used to name the generated static instance. |
| x | Dotted-decimal OID string (scalars end in .0). |
| y | One of the ASN_type* tags (e.g. ASN_typeInteger32). |
| z | Pointer to the read callback (matching one of GetpIFunc etc.). |
| q | Community mask, typically READ_COMMUNITY_MASK. |
Expands to a file-static SNMPReadObject so the callback is registered before main() runs. Use once per scalar; pair with SNMPWRITEFUNC if the variable is writable.
| #define SNMPWRITEFUNC | ( | w, | |
| x, | |||
| y, | |||
| z, | |||
| q ) static SNMPWriteObject R##w(x, y, z, q); |
#include <snmp_table.h>
Register a write callback for one SNMP scalar at file scope.
| w | Base identifier used to name the generated static instance. |
| x | Dotted-decimal OID string (scalars end in .0). |
| y | One of the ASN_type* tags (e.g. ASN_typeInteger32). |
| z | Pointer to the write callback (matching one of PutpIFunc etc.). |
| q | Community mask, typically WRITE_COMMUNITY_MASK. |
Expands to a file-static SNMPWriteObject so the callback is registered before main() runs. The callback is invoked twice for each SET request: first with bTest != 0 for validation, then with bTest == 0 to commit. Return SNMP_SET_OK or SNMP_SET_FAIL.