mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-08-10 17:43:39 +08:00
patch by Freddie Chopin: SNMP: const-correctness around snmp traps and enterprise
This commit is contained in:
@@ -139,7 +139,7 @@ snmp_asn1_enc_s32t_cnt(s32_t value, u16_t *octets_needed)
|
||||
* @param octets_needed points to the return value
|
||||
*/
|
||||
void
|
||||
snmp_asn1_enc_oid_cnt(u8_t ident_len, s32_t *ident, u16_t *octets_needed)
|
||||
snmp_asn1_enc_oid_cnt(u8_t ident_len, const s32_t *ident, u16_t *octets_needed)
|
||||
{
|
||||
s32_t sub_id;
|
||||
u8_t cnt;
|
||||
@@ -435,7 +435,7 @@ snmp_asn1_enc_s32t(struct pbuf *p, u16_t ofs, u16_t octets_needed, s32_t value)
|
||||
* @return ERR_OK if successful, ERR_ARG if we can't (or won't) encode
|
||||
*/
|
||||
err_t
|
||||
snmp_asn1_enc_oid(struct pbuf *p, u16_t ofs, u8_t ident_len, s32_t *ident)
|
||||
snmp_asn1_enc_oid(struct pbuf *p, u16_t ofs, u8_t ident_len, const s32_t *ident)
|
||||
{
|
||||
u16_t plen, base;
|
||||
u8_t *msg_ptr;
|
||||
|
||||
@@ -2022,7 +2022,7 @@ void snmp_inc_snmpouttraps(void)
|
||||
snmpouttraps++;
|
||||
}
|
||||
|
||||
void snmp_get_snmpgrpid_ptr(struct snmp_obj_id **oid)
|
||||
void snmp_get_snmpgrpid_ptr(const struct snmp_obj_id **oid)
|
||||
{
|
||||
*oid = &snmpgrp_id;
|
||||
}
|
||||
|
||||
@@ -218,7 +218,7 @@ snmp_send_response(struct snmp_msg_pstat *m_stat)
|
||||
* (sysObjectID) for specific traps.
|
||||
*/
|
||||
err_t
|
||||
snmp_send_trap(s8_t generic_trap, struct snmp_obj_id *eoid, s32_t specific_trap)
|
||||
snmp_send_trap(s8_t generic_trap, const struct snmp_obj_id *eoid, s32_t specific_trap)
|
||||
{
|
||||
struct snmp_trap_dst *td;
|
||||
struct netif *dst_if;
|
||||
|
||||
Reference in New Issue
Block a user