mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-16 19:43:47 +00:00
Added type information
This commit is contained in:
parent
1eaceeb888
commit
afff093728
1 changed files with 7 additions and 1 deletions
|
|
@ -597,7 +597,7 @@ int SNMP::getnextbulk(lua_State* vm, bool skip_first_param) {
|
|||
}
|
||||
|
||||
/* ******************************************* */
|
||||
|
||||
|
||||
int SNMP::set(lua_State* vm, bool skip_first_param) {
|
||||
#ifdef HAVE_LIBSNMP
|
||||
return(snmp_get_fctn(vm, 3 /* SET */, skip_first_param, false));
|
||||
|
|
@ -632,6 +632,12 @@ int SNMP::snmp_get_fctn(lua_State* vm, u_int8_t pduType, bool skip_first_param,
|
|||
/* SET */
|
||||
oid[oid_idx] = (char*)lua_tostring(vm, idx);
|
||||
|
||||
|
||||
/* Types
|
||||
i: INTEGER, u: unsigned INTEGER, t: TIMETICKS, a: IPADDRESS
|
||||
o: OBJID, s: STRING, x: HEX STRING, d: DECIMAL STRING
|
||||
U: unsigned int64, I: signed int64, F: float, D: double
|
||||
*/
|
||||
if(lua_type(vm, idx+1) != LUA_TSTRING) return(CONST_LUA_ERROR);
|
||||
value_types[oid_idx] = ((char*)lua_tostring(vm, idx+1))[0];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue