mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-26 01:57:01 +08:00
patch by Freddie Chopin: SNMP: const-correctness around snmp traps and enterprise
This commit is contained in:
@@ -225,7 +225,7 @@ void snmp_inc_snmpoutgetnexts(void);
|
||||
void snmp_inc_snmpoutsetrequests(void);
|
||||
void snmp_inc_snmpoutgetresponses(void);
|
||||
void snmp_inc_snmpouttraps(void);
|
||||
void snmp_get_snmpgrpid_ptr(struct snmp_obj_id **oid);
|
||||
void snmp_get_snmpgrpid_ptr(const struct snmp_obj_id **oid);
|
||||
void snmp_set_snmpenableauthentraps(u8_t *value);
|
||||
void snmp_get_snmpenableauthentraps(u8_t *value);
|
||||
|
||||
|
||||
@@ -84,12 +84,12 @@ err_t snmp_asn1_dec_raw(struct pbuf *p, u16_t ofs, u16_t len, u16_t raw_len, u8_
|
||||
void snmp_asn1_enc_length_cnt(u16_t length, u8_t *octets_needed);
|
||||
void snmp_asn1_enc_u32t_cnt(u32_t value, u16_t *octets_needed);
|
||||
void snmp_asn1_enc_s32t_cnt(s32_t value, u16_t *octets_needed);
|
||||
void snmp_asn1_enc_oid_cnt(u8_t ident_len, s32_t *ident, u16_t *octets_needed);
|
||||
void snmp_asn1_enc_oid_cnt(u8_t ident_len, const s32_t *ident, u16_t *octets_needed);
|
||||
err_t snmp_asn1_enc_type(struct pbuf *p, u16_t ofs, u8_t type);
|
||||
err_t snmp_asn1_enc_length(struct pbuf *p, u16_t ofs, u16_t length);
|
||||
err_t snmp_asn1_enc_u32t(struct pbuf *p, u16_t ofs, u16_t octets_needed, u32_t value);
|
||||
err_t snmp_asn1_enc_s32t(struct pbuf *p, u16_t ofs, u16_t octets_needed, s32_t value);
|
||||
err_t snmp_asn1_enc_oid(struct pbuf *p, u16_t ofs, u8_t ident_len, s32_t *ident);
|
||||
err_t snmp_asn1_enc_oid(struct pbuf *p, u16_t ofs, u8_t ident_len, const s32_t *ident);
|
||||
err_t snmp_asn1_enc_raw(struct pbuf *p, u16_t ofs, u16_t raw_len, u8_t *raw);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -265,7 +265,7 @@ struct snmp_msg_trap
|
||||
ip_addr_t dip;
|
||||
|
||||
/* source enterprise ID (sysObjectID) */
|
||||
struct snmp_obj_id *enterprise;
|
||||
const struct snmp_obj_id *enterprise;
|
||||
/* source IP address, raw network order format */
|
||||
u8_t sip_raw[4];
|
||||
/* generic trap code */
|
||||
@@ -302,7 +302,7 @@ struct snmp_varbind* snmp_varbind_tail_remove(struct snmp_varbind_root *root);
|
||||
/** Handle an internal (recv) or external (private response) event. */
|
||||
void snmp_msg_event(u8_t request_id);
|
||||
err_t snmp_send_response(struct snmp_msg_pstat *m_stat);
|
||||
err_t snmp_send_trap(s8_t generic_trap, struct snmp_obj_id *eoid, s32_t specific_trap);
|
||||
err_t snmp_send_trap(s8_t generic_trap, const struct snmp_obj_id *eoid, s32_t specific_trap);
|
||||
void snmp_coldstart_trap(void);
|
||||
void snmp_authfail_trap(void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user