NetBurner 3.5.7
PDF Version
Read/write callback function signatures

Function typedefs your callbacks must match. The shape of the callback selects the dispatcher overload automatically. More...

Scalar read-callback signatures

A scalar read callback takes no arguments and returns the current value of the variable. Pick the signature whose return type matches the ASN_type* tag passed to SNMPREADFUNC — the correct internal dispatcher is chosen by the SNMPReadObject constructor overload that matches your callback's type.

typedef int * GetpIFunc()
 Returns pointer-to-int (OID values).
 
typedef const char * GetCCFunc()
 Returns a C string.
 
typedef void GetOTFunc(uint8_t *&pData, int &len)
 Returns a raw octet buffer and its length.
 
typedef int GetIFunc()
 Returns signed int.
 
typedef unsigned int GetuIFunc()
 Returns unsigned int.
 
typedef unsigned long GetulFunc()
 Returns unsigned long.
 
typedef unsigned long long GetullFunc()
 Returns unsigned long long.
 
typedef MACADR GetMadrFunc()
 Returns a MAC address.
 

Scalar write-callback signatures

A scalar write callback receives the incoming value plus a bTest flag. When bTest != 0 the callback should validate the value without committing; when bTest == 0 it should apply the value. Return SNMP_SET_OK if the value is acceptable / was applied, or SNMP_SET_FAIL otherwise.

typedef int PutpIFunc(int *, int)
 Writes pointer-to-int.
 
typedef int PutCCFunc(const char *, int)
 Writes a C string.
 
typedef int PutOTFunc(const unsigned char *, int, int)
 Writes an octet string (buffer, length, bTest).
 
typedef int PutIFunc(int, int)
 Writes signed int.
 
typedef int PutuIFunc(unsigned int, int)
 Writes unsigned int.
 
typedef int PutulFunc(unsigned long, int)
 Writes unsigned long.
 
typedef int PutullFunc(unsigned long long, int)
 Writes unsigned long long.
 
typedef int PutMadrFunc(MACADR, int)
 Writes a MAC address.
 

Table write-callback signatures

Identical to the scalar write signatures but with an extra void * user context pointer so one callback can service many table rows. Used with AddSnmpWriteEntry.

typedef int PutpIFuncTab(int *, int, void *)
 Table variant of PutpIFunc.
 
typedef int PutCCFuncTab(const char *, int, void *)
 Table variant of PutCCFunc.
 
typedef int PutOTFuncTab(const unsigned char *, int, int, void *)
 Table variant of PutOTFunc.
 
typedef int PutIFuncTab(int, int, void *)
 Table variant of PutIFunc.
 
typedef int PutuIFuncTab(unsigned int, int, void *)
 Table variant of PutuIFunc.
 
typedef int PutulFuncTab(unsigned long, int, void *)
 Table variant of PutulFunc.
 
typedef int PutullFuncTab(unsigned long long, int, void *)
 Table variant of PutullFunc.
 
typedef int PutMadrFuncTab(MACADR, int, void *)
 Table variant of PutMadrFunc.
 

Detailed Description

Function typedefs your callbacks must match. The shape of the callback selects the dispatcher overload automatically.