2022-11-22 13:16:09 +00:00
|
|
|
#ifndef _BIRD_SNMP_UTILS_H_
|
|
|
|
#define _BIRD_SNMP_UTILS_H_
|
|
|
|
|
|
|
|
#include "subagent.h"
|
|
|
|
|
|
|
|
size_t snmp_pkt_len(byte *buf, byte *pkt);
|
|
|
|
size_t snmp_str_size(const char *str);
|
|
|
|
int snmp_is_oid_empty(struct oid *oid);
|
|
|
|
int snmp_valid_ip4_index(struct oid *o, uint start);
|
|
|
|
int snmp_valid_ip4_index_unsafe(struct oid *o, uint start);
|
|
|
|
uint snmp_oid_size(struct oid *o);
|
|
|
|
uint snmp_varbind_size(struct agentx_varbind *vb);
|
|
|
|
|
|
|
|
struct agentx_varbind *snmp_create_varbind(byte* buf, struct oid *oid);
|
|
|
|
byte *snmp_fix_varbind(struct agentx_varbind *vb, struct oid *new);
|
|
|
|
|
|
|
|
int snmp_oid_compare(struct oid *first, struct oid *second);
|
|
|
|
|
|
|
|
byte *snmp_no_such_object(byte *buf, struct agentx_varbind *vb, struct oid *oid);
|
|
|
|
byte *snmp_no_such_instance(byte *buf, struct agentx_varbind *vb, struct oid *oid);
|
|
|
|
|
|
|
|
byte *snmp_put_str(byte *buf, const char *str);
|
|
|
|
byte *snmp_put_blank(byte *buf);
|
|
|
|
byte *snmp_put_oid(byte *buf, struct oid *oid);
|
|
|
|
|
|
|
|
byte *snmp_put_fbyte(byte *buf, u8 data);
|
|
|
|
|
|
|
|
void snmp_oid_ip4_index(struct oid *o, uint start, ip4_addr addr);
|
|
|
|
|
|
|
|
void snmp_oid_dump(struct oid *oid);
|
|
|
|
|
2022-11-29 15:30:20 +00:00
|
|
|
int snmp_oid_compare(struct oid *left, struct oid *right);
|
|
|
|
|
2022-12-06 15:32:26 +00:00
|
|
|
struct oid *snmp_prefixize(struct snmp_proto *p, struct oid *o, int byte_ord);
|
2022-11-22 13:16:09 +00:00
|
|
|
#endif
|