lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] SNMP xxget_value buffer size and SNMP string terminatio


From: Mário Luzeiro
Subject: Re: [lwip-users] SNMP xxget_value buffer size and SNMP string termination
Date: Wed, 20 Nov 2019 11:07:45 +0000

> - 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=address@hidden> on behalf of 
Mário Luzeiro <address@hidden>
Sent: 20 November 2019 09:33
To: address@hidden
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
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users



reply via email to

[Prev in Thread] Current Thread [Next in Thread]