> - from what I see in LWIP SNMP code, it looks that SNMP strings are *not* 
> NULL terminated. Searching in the web it was a bit inconclusive, could some 
> one clarify?

Replying to my own second question:

From what I learned,
SNMP protocol with conformity of the Basic Encoding Rules, sets the type and 
length of the data. As the length is implicit known, it is up to the 
application implementation to handle it correctly.

Mario Luzeiro

________________________________________
From: lwip-users <lwip-users-bounces+mrluzeiro=ua...@nongnu.org> on behalf of 
Mário Luzeiro <mrluze...@ua.pt>
Sent: 20 November 2019 09:33
To: lwip-users@nongnu.org
Subject: [lwip-users] SNMP xxget_value buffer size and SNMP string termination

Hi all,

I have two questions about SNMP buffers and strings:

- on LWIP SNMP, when it gets a value, it passes a "void *value" but there is no 
indication about the buffer size. I learned that the SNMP max length of a 
string is 255. Is it safe to write always that amount of data to *value ?

- from what I see in LWIP SNMP code, it looks that SNMP strings are *not* NULL 
terminated. Searching in the web it was a bit inconclusive, could some one 
clarify?

Regards,
Mario Luzeiro
_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to