rendered paste bodycase '9':
system("clear");
printf("Welcome to advance GET mode, type ? for help.\n");
printf("get> ");
scanf("%s", get_adv_val);
while (strcmp (get_adv_val, "exit"))
{
open_session(ip);
get_advance1(get_adv_val);
printf("get> ");
scanf("%s", get_adv_val);
close_session();
}
system("\nread -rs -n1 -p 'Press any key to continue ...'; echo");
break;
void get_advance1(char *get_adv_val) {
// system("clear");
// printf("Welcome to advance GET mode, type ? for help.\n");
// printf("get> ");
// scanf("%s", get_adv_val);
// while (strcmp (get_adv_val, "exit"))
// {
pdu = snmp_pdu_create(SNMP_MSG_GET);
get_node(get_adv_val, id_oid, &id_len);
snmp_add_null_var(pdu, id_oid, id_len);
status = snmp_synch_response(sess_handle, pdu, &response);
for(vars = response->variables; vars; vars = vars->next_variable)
print_value(vars->name, vars->name_length, vars);
// printf("get> ");
// scanf("%s", get_adv_val);
// }
}