Hi Magnus! Thanks a lot for your answer.... Well, I know now!!! And that solves my problem.
Thank you very much, Ângela Lázaro -----Original Message----- From: Magnus Fromreide [mailto:[EMAIL PROTECTED] Sent: segunda-feira, 10 de Novembro de 2008 19:11 To: Angela Lazaro Cc: [email protected] Subject: Re: Receive trash on the SET request value tor 2008-11-06 klockan 16:04 +0000 skrev Angela Lazaro: > Hi all! > > I'm using Net-Snmp 5.3.2 and implemented an agent that responds to a > MIB. This MIB has a table of type read-create and to implement this > table I used mib2c command: > > mib2c -c mib2c.iterate.conf tableName > > This table has 3 columns of DisplayString type and it's possible to > perform GET and SET request to these columns. > > When I receive the requests for this table I receive the type of the > requests on the handler and when is a SET request I receive the value > to be written with trash. The value have characters that were not sent > by the SET command. I access to this value using > > request->requestvb->val.string > > where the request is a pointer to a netsnmp_request_info type and > initialized with > > netsnmp_extract_iterator_context (request); > > I have also clean the variable where I store this value but I'm sure > that the trash arrives to the handler in the variable > request->requestvb->val.string > > Do I have to clean anything else first? Can you please give me you > opinion!!! You are aware that requestvb->val.string isn't NUL-terminated but that the length is given by requestvb->val_len, right? /MF ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
