From: Matteo B. <mat...@fo...> - 2024-08-22 16:31:29
|
Hello Net-SNMP community, first of all thank you for this amazing free software package! I'm writing an application that relies on SNMP to exchange data. Following the documentation and the code samples I've written the client part that handles GET-NEXT requests, that I will use to display SNMP tables. However I'm puzzled by a behaviour difference from snmpgetnext: when I receive the PDU response, the next_variable of the variable_list struct is always NULL. However this is not the case, looking at the code for snmpgetnext. apps/snmpgetnext.c:189 > status = snmp_synch_response(ss, pdu, &response); > if (status == STAT_SUCCESS) { > if (response->errstat == SNMP_ERR_NOERROR) { > for (vars = response->variables; vars; > vars = vars->next_variable) > print_variable(vars->name, vars->name_length, vars); This not a big deal, since the answer is correct, but it's not where I would expect it to be. I read it from the variables pointer, instead of the next_variable one. I'm using Net-SNMP version 5.9.3 on Debian GNU/Linux. I've attached a sample of my code. Thank you for your input. -- Matteo Bini |