Re: Trouble with send_v2trap

2013-10-30 Thread Niels Baggesen
Den 30-10-2013 19:04, Чугунов Дмитрий skrev: > Hello. > > I've tried to send trap using example notification.c. It works fine. It sends > trap to .1.3.6.1.4.1.8072.2.3.0.1. But if I change this OID to > .1.3.6.1.4.1.8072.2.3.1 (zero is removed) snmptt also say that trap > .1.3.6.1.4.1.8072.2.3.0

Trouble with send_v2trap

2013-10-30 Thread Чугунов Дмитрий
Hello. I've tried to send trap using example notification.c. It works fine. It sends trap to .1.3.6.1.4.1.8072.2.3.0.1. But if I change this OID to .1.3.6.1.4.1.8072.2.3.1 (zero is removed) snmptt also say that trap .1.3.6.1.4.1.8072.2.3.0.1 (with zero) is accepted. Why? my snmptrapd.conf file

Re: Trouble in concatenate a value to a string

2013-10-30 Thread Rafael Ratacheski
My problem is the same: I have two functions, print_ip(const char* buf, size_t buflen), and save_ip(const char* buf, size_t buflen). In the print_ip the value is cast correctly, but in save_ip not. void print_ip(const char* buf, size_t buflen) { unsigned const char* bp = (unsigned const char*)

RE: Trouble in concatenate a value to a string

2013-10-30 Thread Rafael Ratacheski
Sorry Walter and Magnus. I didnt expose my quest properly. The input of function is a variable with the value of the oid "netdotmediaipadress" and the size of this value. This function make two things: save the input value in a string in the standard ip adress format. And print the input value at t